linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nfsidmap: auto disable when keyutils is not found
@ 2011-09-02 19:16 Mike Frysinger
  2011-09-14 18:27 ` Steve Dickson
  2011-12-22 14:38 ` Jeff Layton
  0 siblings, 2 replies; 6+ messages in thread
From: Mike Frysinger @ 2011-09-02 19:16 UTC (permalink / raw)
  To: linux-nfs

Since we already auto-disable based on libnfsidmap capabilities, don't
make keyutils a hard failure.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 aclocal/keyutils.m4    |    4 ++--
 aclocal/libnfsidmap.m4 |    3 +--
 configure.ac           |    2 +-
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/aclocal/keyutils.m4 b/aclocal/keyutils.m4
index 84bc112..a392c0e 100644
--- a/aclocal/keyutils.m4
+++ b/aclocal/keyutils.m4
@@ -6,6 +6,6 @@ AC_DEFUN([AC_KEYUTILS], [
   AC_CHECK_LIB([keyutils], [keyctl_instantiate], [LIBKEYUTILS=-lkeyutils], ,)
   AC_SUBST(LIBKEYUTILS)
 
-  AC_CHECK_HEADERS([keyutils.h], ,
-  		   [AC_MSG_ERROR([keyutils.h header not found.])])
+  AC_CHECK_HEADERS([keyutils.h])
+
 ])dnl
diff --git a/aclocal/libnfsidmap.m4 b/aclocal/libnfsidmap.m4
index 4faa923..484b1ec 100644
--- a/aclocal/libnfsidmap.m4
+++ b/aclocal/libnfsidmap.m4
@@ -15,7 +15,6 @@ AC_DEFUN([AC_LIBNFSIDMAP], [
                           [Define to 1 if you have the `nfs4_set_debug' function.])])
 
   dnl only enable nfsidmap when libnfsidmap supports it
-  AC_CHECK_LIB([nfsidmap], [nfs4_owner_to_uid], [enable_nfsidmap=yes],
-               [enable_nfsidmap=no])
+  AC_CHECK_LIB([nfsidmap], [nfs4_owner_to_uid])
 
 ])dnl
diff --git a/configure.ac b/configure.ac
index c9fb27b..1a28f8a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -266,7 +266,7 @@ if test "$enable_nfsv4" = yes; then
   fi
 fi
 dnl enable nfsidmap when its support by libnfsidmap
-AM_CONDITIONAL(CONFIG_NFSIDMAP, [test "$enable_nfsidmap" = "yes"])
+AM_CONDITIONAL(CONFIG_NFSIDMAP, [test "$ac_cv_header_keyutils_h$ac_cv_lib_nfsidmap_nfs4_owner_to_uid" = "yesyes"])
 
 
 if test "$knfsd_cv_glibc2" = no; then
-- 
1.7.6


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] nfsidmap: auto disable when keyutils is not found
  2011-09-02 19:16 [PATCH] nfsidmap: auto disable when keyutils is not found Mike Frysinger
@ 2011-09-14 18:27 ` Steve Dickson
  2011-12-22 14:38 ` Jeff Layton
  1 sibling, 0 replies; 6+ messages in thread
From: Steve Dickson @ 2011-09-14 18:27 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: linux-nfs



On 09/02/2011 03:16 PM, Mike Frysinger wrote:
> Since we already auto-disable based on libnfsidmap capabilities, don't
> make keyutils a hard failure.
> 
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Committed...

steved.

> ---
>  aclocal/keyutils.m4    |    4 ++--
>  aclocal/libnfsidmap.m4 |    3 +--
>  configure.ac           |    2 +-
>  3 files changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/aclocal/keyutils.m4 b/aclocal/keyutils.m4
> index 84bc112..a392c0e 100644
> --- a/aclocal/keyutils.m4
> +++ b/aclocal/keyutils.m4
> @@ -6,6 +6,6 @@ AC_DEFUN([AC_KEYUTILS], [
>    AC_CHECK_LIB([keyutils], [keyctl_instantiate], [LIBKEYUTILS=-lkeyutils], ,)
>    AC_SUBST(LIBKEYUTILS)
>  
> -  AC_CHECK_HEADERS([keyutils.h], ,
> -  		   [AC_MSG_ERROR([keyutils.h header not found.])])
> +  AC_CHECK_HEADERS([keyutils.h])
> +
>  ])dnl
> diff --git a/aclocal/libnfsidmap.m4 b/aclocal/libnfsidmap.m4
> index 4faa923..484b1ec 100644
> --- a/aclocal/libnfsidmap.m4
> +++ b/aclocal/libnfsidmap.m4
> @@ -15,7 +15,6 @@ AC_DEFUN([AC_LIBNFSIDMAP], [
>                            [Define to 1 if you have the `nfs4_set_debug' function.])])
>  
>    dnl only enable nfsidmap when libnfsidmap supports it
> -  AC_CHECK_LIB([nfsidmap], [nfs4_owner_to_uid], [enable_nfsidmap=yes],
> -               [enable_nfsidmap=no])
> +  AC_CHECK_LIB([nfsidmap], [nfs4_owner_to_uid])
>  
>  ])dnl
> diff --git a/configure.ac b/configure.ac
> index c9fb27b..1a28f8a 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -266,7 +266,7 @@ if test "$enable_nfsv4" = yes; then
>    fi
>  fi
>  dnl enable nfsidmap when its support by libnfsidmap
> -AM_CONDITIONAL(CONFIG_NFSIDMAP, [test "$enable_nfsidmap" = "yes"])
> +AM_CONDITIONAL(CONFIG_NFSIDMAP, [test "$ac_cv_header_keyutils_h$ac_cv_lib_nfsidmap_nfs4_owner_to_uid" = "yesyes"])
>  
>  
>  if test "$knfsd_cv_glibc2" = no; then

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] nfsidmap: auto disable when keyutils is not found
  2011-09-02 19:16 [PATCH] nfsidmap: auto disable when keyutils is not found Mike Frysinger
  2011-09-14 18:27 ` Steve Dickson
@ 2011-12-22 14:38 ` Jeff Layton
  2011-12-22 16:20   ` Mike Frysinger
  1 sibling, 1 reply; 6+ messages in thread
From: Jeff Layton @ 2011-12-22 14:38 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: linux-nfs, steved

On Fri,  2 Sep 2011 15:16:55 -0400
Mike Frysinger <vapier@gentoo.org> wrote:

> Since we already auto-disable based on libnfsidmap capabilities, don't
> make keyutils a hard failure.
> 
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
>  aclocal/keyutils.m4    |    4 ++--
>  aclocal/libnfsidmap.m4 |    3 +--
>  configure.ac           |    2 +-
>  3 files changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/aclocal/keyutils.m4 b/aclocal/keyutils.m4
> index 84bc112..a392c0e 100644
> --- a/aclocal/keyutils.m4
> +++ b/aclocal/keyutils.m4
> @@ -6,6 +6,6 @@ AC_DEFUN([AC_KEYUTILS], [
>    AC_CHECK_LIB([keyutils], [keyctl_instantiate], [LIBKEYUTILS=-lkeyutils], ,)
>    AC_SUBST(LIBKEYUTILS)
>  
> -  AC_CHECK_HEADERS([keyutils.h], ,
> -  		   [AC_MSG_ERROR([keyutils.h header not found.])])
> +  AC_CHECK_HEADERS([keyutils.h])
> +
>  ])dnl
> diff --git a/aclocal/libnfsidmap.m4 b/aclocal/libnfsidmap.m4
> index 4faa923..484b1ec 100644
> --- a/aclocal/libnfsidmap.m4
> +++ b/aclocal/libnfsidmap.m4
> @@ -15,7 +15,6 @@ AC_DEFUN([AC_LIBNFSIDMAP], [
>                            [Define to 1 if you have the `nfs4_set_debug' function.])])
>  
>    dnl only enable nfsidmap when libnfsidmap supports it
> -  AC_CHECK_LIB([nfsidmap], [nfs4_owner_to_uid], [enable_nfsidmap=yes],
> -               [enable_nfsidmap=no])
> +  AC_CHECK_LIB([nfsidmap], [nfs4_owner_to_uid])
>  
>  ])dnl

The above delta in this patch has caused a build-time regression.

When you eliminated the 3rd argument to AC_CHECK_LIB, this started
adding -lnfsidmap to $LIBS. That means that that library gets linked
into every binary that's being built.

I haven't determined the right fix for this yet, but I think
libnfsidmap.m4 could use some cleanup.

Any thoughts on the proper fix?

> diff --git a/configure.ac b/configure.ac
> index c9fb27b..1a28f8a 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -266,7 +266,7 @@ if test "$enable_nfsv4" = yes; then
>    fi
>  fi
>  dnl enable nfsidmap when its support by libnfsidmap
> -AM_CONDITIONAL(CONFIG_NFSIDMAP, [test "$enable_nfsidmap" = "yes"])
> +AM_CONDITIONAL(CONFIG_NFSIDMAP, [test "$ac_cv_header_keyutils_h$ac_cv_lib_nfsidmap_nfs4_owner_to_uid" = "yesyes"])
>  
>  
>  if test "$knfsd_cv_glibc2" = no; then

Cheers
-- 
Jeff Layton <jlayton@redhat.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] nfsidmap: auto disable when keyutils is not found
  2011-12-22 14:38 ` Jeff Layton
@ 2011-12-22 16:20   ` Mike Frysinger
  2011-12-23 14:34     ` Jeff Layton
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Frysinger @ 2011-12-22 16:20 UTC (permalink / raw)
  To: Jeff Layton; +Cc: linux-nfs, steved

[-- Attachment #1: Type: Text/Plain, Size: 796 bytes --]

On Thursday 22 December 2011 09:38:55 Jeff Layton wrote:
> On Fri,  2 Sep 2011 15:16:55 -0400 Mike Frysinger wrote:
> > --- a/aclocal/libnfsidmap.m4
> > +++ b/aclocal/libnfsidmap.m4
> > 
> > -  AC_CHECK_LIB([nfsidmap], [nfs4_owner_to_uid], [enable_nfsidmap=yes],
> > -               [enable_nfsidmap=no])
> > +  AC_CHECK_LIB([nfsidmap], [nfs4_owner_to_uid])
> 
> The above delta in this patch has caused a build-time regression.
> 
> When you eliminated the 3rd argument to AC_CHECK_LIB, this started
> adding -lnfsidmap to $LIBS. That means that that library gets linked
> into every binary that's being built.
> 
> I haven't determined the right fix for this yet, but I think
> libnfsidmap.m4 could use some cleanup.

AC_CHECK_LIB([nfsidmap], [nfs4_owner_to_uid], [])
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] nfsidmap: auto disable when keyutils is not found
  2011-12-22 16:20   ` Mike Frysinger
@ 2011-12-23 14:34     ` Jeff Layton
  2011-12-23 17:04       ` Jeff Layton
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff Layton @ 2011-12-23 14:34 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: linux-nfs, steved

[-- Attachment #1: Type: text/plain, Size: 1208 bytes --]

On Thu, 22 Dec 2011 11:20:11 -0500
Mike Frysinger <vapier@gentoo.org> wrote:

> On Thursday 22 December 2011 09:38:55 Jeff Layton wrote:
> > On Fri,  2 Sep 2011 15:16:55 -0400 Mike Frysinger wrote:
> > > --- a/aclocal/libnfsidmap.m4
> > > +++ b/aclocal/libnfsidmap.m4
> > > 
> > > -  AC_CHECK_LIB([nfsidmap], [nfs4_owner_to_uid], [enable_nfsidmap=yes],
> > > -               [enable_nfsidmap=no])
> > > +  AC_CHECK_LIB([nfsidmap], [nfs4_owner_to_uid])
> > 
> > The above delta in this patch has caused a build-time regression.
> > 
> > When you eliminated the 3rd argument to AC_CHECK_LIB, this started
> > adding -lnfsidmap to $LIBS. That means that that library gets linked
> > into every binary that's being built.
> > 
> > I haven't determined the right fix for this yet, but I think
> > libnfsidmap.m4 could use some cleanup.
> 
> AC_CHECK_LIB([nfsidmap], [nfs4_owner_to_uid], [])
> -mike

Uhhh, no. That turns the result of this test into a noop. We might as
well remove it at that point.

Perhaps I should phrase this question differently: What is the above
test supposed to achieve? IOW, what should happen if it passes or fails?

-- 
Jeff Layton <jlayton@redhat.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] nfsidmap: auto disable when keyutils is not found
  2011-12-23 14:34     ` Jeff Layton
@ 2011-12-23 17:04       ` Jeff Layton
  0 siblings, 0 replies; 6+ messages in thread
From: Jeff Layton @ 2011-12-23 17:04 UTC (permalink / raw)
  To: Jeff Layton; +Cc: Mike Frysinger, linux-nfs, steved

On Fri, 23 Dec 2011 09:34:01 -0500
Jeff Layton <jlayton@redhat.com> wrote:

> On Thu, 22 Dec 2011 11:20:11 -0500
> Mike Frysinger <vapier@gentoo.org> wrote:
> 
> > On Thursday 22 December 2011 09:38:55 Jeff Layton wrote:
> > > On Fri,  2 Sep 2011 15:16:55 -0400 Mike Frysinger wrote:
> > > > --- a/aclocal/libnfsidmap.m4
> > > > +++ b/aclocal/libnfsidmap.m4
> > > > 
> > > > -  AC_CHECK_LIB([nfsidmap], [nfs4_owner_to_uid], [enable_nfsidmap=yes],
> > > > -               [enable_nfsidmap=no])
> > > > +  AC_CHECK_LIB([nfsidmap], [nfs4_owner_to_uid])
> > > 
> > > The above delta in this patch has caused a build-time regression.
> > > 
> > > When you eliminated the 3rd argument to AC_CHECK_LIB, this started
> > > adding -lnfsidmap to $LIBS. That means that that library gets linked
> > > into every binary that's being built.
> > > 
> > > I haven't determined the right fix for this yet, but I think
> > > libnfsidmap.m4 could use some cleanup.
> > 
> > AC_CHECK_LIB([nfsidmap], [nfs4_owner_to_uid], [])
> > -mike
> 
> Uhhh, no. That turns the result of this test into a noop. We might as
> well remove it at that point.
> 
> Perhaps I should phrase this question differently: What is the above
> test supposed to achieve? IOW, what should happen if it passes or fails?
> 

Ahh nm, I think I see now...

We just need to ensure that $ac_cv_lib_nfsidmap_nfs4_owner_to_uid gets
set properly. If that's the case, then we probably want something like
this:

    AC_CHECK_LIB([nfsidmap], [nfs4_owner_to_uid], [:])

...autoconf treats bare brackets as if the argument weren't specified.
I have a patch that I'll pass along once I've done a bit of testing
with it.

-- 
Jeff Layton <jlayton@redhat.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-12-23 17:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-02 19:16 [PATCH] nfsidmap: auto disable when keyutils is not found Mike Frysinger
2011-09-14 18:27 ` Steve Dickson
2011-12-22 14:38 ` Jeff Layton
2011-12-22 16:20   ` Mike Frysinger
2011-12-23 14:34     ` Jeff Layton
2011-12-23 17:04       ` Jeff Layton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).