From patchwork Tue Jun 24 00:05:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Cristian_Rodr=C3=ADguez?= X-Patchwork-Id: 363250 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from aserp1040.oracle.com (aserp1040.oracle.com [141.146.126.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id BCA9714008F for ; Tue, 24 Jun 2014 10:06:00 +1000 (EST) Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s5O05uFQ009675 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 24 Jun 2014 00:05:56 GMT Received: from oss.oracle.com (oss-external.oracle.com [137.254.96.51]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s5O05t41006034 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 24 Jun 2014 00:05:55 GMT Received: from localhost ([127.0.0.1] helo=oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1WzEFH-0007Zj-0l; Mon, 23 Jun 2014 17:05:55 -0700 Received: from ucsinet22.oracle.com ([156.151.31.94]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1WzEFD-0007Za-G5 for fedfs-utils-devel@oss.oracle.com; Mon, 23 Jun 2014 17:05:51 -0700 Received: from aserp1020.oracle.com (aserp1020.oracle.com [141.146.126.67]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id s5O05ovi008644 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Tue, 24 Jun 2014 00:05:51 GMT Received: from mail-qg0-f48.google.com (mail-qg0-f48.google.com [209.85.192.48]) by aserp1020.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s5O05mGC029667 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Tue, 24 Jun 2014 00:05:49 GMT Authentication-Results: aserp1020.oracle.com; dkim=pass reason="1024-bit key" header.d=cristianrodriguez.net header.i=@cristianrodriguez.net header.b=Fu8Y1LdD Received: by mail-qg0-f48.google.com with SMTP id q108so6513993qgd.21 for ; Mon, 23 Jun 2014 17:05:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:message-id:date:from:user-agent :mime-version:to:subject:references:in-reply-to:openpgp:content-type; bh=JWgVi2ZqKbXf7hOyfsNEc2adY8OP8fDqeIsipAuaAt0=; b=igZdUI5eFlLMXokdckBSppMef/yoF8+BuWZLH9fN7MOtMgOgFJp10Y8rTe5iEtsVAj JJdnpt3W8lDy8P9kSN2M0qZyMbY+f1Pv18LsauYQq6iIqmKtVH803uHMwTRnp3Yhom9l d1S3Ge8GFaZuaMpP4Y7r5OZnt7st2ubYjd96B4sqeDr7W1YDgEc2AkcIamT8YkPPr0xd cREkDjrRnysF7RKYWGdForN8hXIqwhlyKOE7KLpbscKPYDknRN/Ap5jjCvvNIP4Ba/F2 oOQNzplq9qMxspIBeRDP28txE/4jnwS8Fomb45CzhtHS5AGyLPDZtSVyAU5sZ+uYmjq1 y81Q== X-Gm-Message-State: ALoCoQmP6TEBe8OwzX68b3+AX6NwqDJQ4NHUfqULiGeGs0pmZzMOtkupwc4wQ3TNKjHDYuMDCpiu X-Received: by 10.140.50.167 with SMTP id s36mr17411062qga.36.1403568348531; Mon, 23 Jun 2014 17:05:48 -0700 (PDT) Received: from xps9000.cristianrodriguez.net (pc-42-108-74-200.cm.vtr.net. [200.74.108.42]) by mx.google.com with ESMTPSA id q5sm32637062qam.37.2014.06.23.17.05.45 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 23 Jun 2014 17:05:46 -0700 (PDT) Message-ID: <53A8C0D8.9070802@opensuse.org> Date: Mon, 23 Jun 2014 20:05:44 -0400 From: =?windows-1252?Q?Cristian_Rodr=EDguez?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Chuck Lever , fedfs-utils Developers References: <1403560273-109277-1-git-send-email-crrodriguez@opensuse.org> <51BB9AA2-67AB-4EE2-AF3A-3DFE850FDA07@oracle.com> <53A8AC6A.4000108@opensuse.org> <53A8B173.3020604@opensuse.org> <4C479BD3-F706-4A01-AF69-D1B50FBF54CC@oracle.com> In-Reply-To: <4C479BD3-F706-4A01-AF69-D1B50FBF54CC@oracle.com> X-Enigmail-Version: 1.6 OpenPGP: id=1ABD5081 X-Flow-Control-Info: class=Pass-to-MM reputation=ipRisk-All ip=209.85.192.48 ct-class=R5 ct-vol1=-90 ct-vol2=8 ct-vol3=8 ct-risk=46 ct-spam1=72 ct-spam2=7 ct-bulk=7 rcpts=1 size=5282 X-Sendmail-CM-Score: 0.00% X-Sendmail-CM-Analysis: v=2.1 cv=Tv7f2lnh c=1 sm=1 tr=0 a=yBce02Xj7p0KOWc5mWOjOg==:117 a=J2bjX+VmJHyowkERD6GbLw==:17 a=ekOJvlQLSnQA:10 a=X8GEc18K0B0A:10 a=DShNZHa3boEA:10 a=KSb9T-wMAAAA:8 a=1XWaLZrsAAAA:8 a=UwLn2DXyAAAA:8 a=cgs6fjTgAAAA:8 a=r77TgQKjGQsHNAKrUKIA :9 a=9iDbn-4jx3cA:10 a=cKsnjEOsciEA:10 a=oLvDPhhEnCLra3rDknwA:9 a=pILNOxqGKmIA:10 a=dQ-OxBcGOlMA:10 a=mDV3o1hIAAAA:8 a=Ty9RpS33OdoOKxS8uY4A:9 X-Sendmail-CT-RefID: str=0001.0A090201.53A8C0DD.0072, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-Sendmail-CT-Classification: not spam Subject: Re: [fedfs-utils] [PATCH] Do not look for libattr. is enough X-BeenThere: fedfs-utils-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list Reply-To: fedfs-utils Developers List-Id: fedfs-utils Developers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: fedfs-utils-devel-bounces@oss.oracle.com Errors-To: fedfs-utils-devel-bounces@oss.oracle.com X-Source-IP: acsinet21.oracle.com [141.146.126.237] El 23/06/14 19:17, Chuck Lever escribió: > > On Jun 23, 2014, at 7:00 PM, Cristian Rodríguez wrote: > >> El 23/06/14 18:54, Chuck Lever escribió: >>> >>> On Jun 23, 2014, at 6:38 PM, Cristian Rodríguez wrote: >>> >>>> Of course the package build will have libattr-devel as a build >>>> dependency, since this code include and will fail >>>> without it.. however...the code is not even linking the attr library so >>>> it will never get used. >>>> >>>> AC_CHECK_LIB([attr], [fgetxattr], >>>> [AC_SUBST([LIBATTR], ["-lattr"]) >>>> AC_DEFINE([HAVE_LIBATTR], [1], >>>> [Define if you have libattr])], >>>> [AC_MSG_ERROR([libattr not found.])]) >>>> >>>> Does not add -lattr to $LIBS and the variable LIBATTR is never >>>> referenced anywhere in the makefiles.. the build succeeds because >>>> libattr duplicates libc functionality…. >>> >>> Then commit f5c16606 is incorrect: configure.ac should be looking for >>> the attr/xattr.h header, not the libattr.so library. >> >> Nope, it should be only looking for as glibc 2.3 that >> contains this functionality was released in 2002.. 12 years ago.. the >> xattr functions that are provided by glibc will disappear in upcoming >> releases of libattr...working on that too.. > > Can you point me to something that documents the deprecation of attr/xattr.h? There is no document about it but it is quite simple.. no one wants to maintain duplicate interfaces.. attr/xattr.h wont go away.. the library and headers will be modified, attr/xattr.h will just include .. the functions that are already provided by glibc will only stay available for existing binaries but they will disappear from the default version, hence AC_CHECK_LIB or similar won't find it there anymore.. Ok,, attached is a different patch that will probably make everyone happy..otherwise we will be arguing about this until next year thing that I am not particularly interested in doing. >From 1cfae152d1a2d6d2fbfe3621ccbf693e7339c349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= Date: Mon, 23 Jun 2014 20:00:22 -0400 Subject: [PATCH] Prefer sys/xattr.h instead of attr/xattr.h Xattrs functions are implemented in glibc nowadays and must be prefered instead of those in libattr. --- configure.ac | 8 +++----- src/libjunction/display-junction.c | 7 +++++++ src/libjunction/junction.c | 7 +++++++ 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index a35c798..a87f6d0 100644 --- a/configure.ac +++ b/configure.ac @@ -141,11 +141,9 @@ AC_CHECK_LIB([ssl], [SSL_CTX_new], AC_DEFINE([HAVE_LIBSSL], [1], [Define if you have libssl])], [AC_MSG_ERROR([libssl not found.])]) -AC_CHECK_LIB([attr], [fgetxattr], - [AC_SUBST([LIBATTR], ["-lattr"]) - AC_DEFINE([HAVE_LIBATTR], [1], - [Define if you have libattr])], - [AC_MSG_ERROR([libattr not found.])]) + +AC_SEARCH_LIBS([fgetxattr], [attr], [AC_CHECK_HEADERS([sys/xattr.h attr/xattr.h])], AC_MSG_ERROR([No xattr support found])) + AC_CHECK_LIB([gssapi_krb5], [gss_acquire_cred], [AC_SUBST([LIBGSSAPI_KRB5], ["-lgssapi_krb5"]) AC_DEFINE([HAVE_LIBGSSAPI_KRB5], [1], diff --git a/src/libjunction/display-junction.c b/src/libjunction/display-junction.c index ac5797b..87d8f6d 100644 --- a/src/libjunction/display-junction.c +++ b/src/libjunction/display-junction.c @@ -23,6 +23,7 @@ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt */ +#include "config.h" #include #include @@ -35,7 +36,13 @@ #include #include +#ifdef HAVE_SYS_XATTR_H +#include +#elif HAVE_ATTR_XATTR_H #include +#else +#error no xattr implementation present +#endif #include "junction.h" #include "junction-internal.h" diff --git a/src/libjunction/junction.c b/src/libjunction/junction.c index 7b7b2e4..6227bf0 100644 --- a/src/libjunction/junction.c +++ b/src/libjunction/junction.c @@ -23,6 +23,7 @@ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt */ +#include "config.h" #include #include @@ -38,7 +39,13 @@ #include #include +#ifdef HAVE_SYS_XATTR_H +#include +#elif HAVE_ATTR_XATTR_H #include +#else +#error no xattr implementation present +#endif #include "fedfs.h" #include "nsdb.h" -- 2.0.0