[fedfs-utils] [PATCH] autotools: install mount.fedfs in /sbin

Chuck Lever chuck.lever at oracle.com
Wed Aug 31 12:49:37 PDT 2011


On Aug 31, 2011, at 9:27 AM, Jeff Layton wrote:

> On Tue, 30 Aug 2011 13:42:05 -0400
> Chuck Lever <chuck.lever at oracle.com> wrote:
> 
>> 
>> On Aug 30, 2011, at 12:41 PM, Jeff Layton wrote:
>> 
>>> /bin/mount expects to find mount helpers in /sbin, so set up the code to
>>> install it there. We can't, however redefine the code to install it in
>>> /sbin unconditionally as that will break "make distcheck".
>>> 
>>> This patch instead borrows the scheme used by util-linux-ng. If the
>>> prefix is '/usr' or NONE, then we set root_sbindir to '/sbin'. If it's
>>> anything else, then it is set to the same value as the sbindir.
>>> 
>>> That allows "make distcheck" to pass and still allows mount.fedfs to
>>> be installed in the right place for distro packaging tools.
>> 
>> "make install" seems to want to put mount.fedfs in /sbin (as expected), but fedfs-map-nfs4 is installed in /usr/local/sbin.  I would have expected /usr/sbin.  Does nfs-utils and utils-linux-ng install into /usr/local by default?
>> 
> 
> Yes, the default ${prefix} for autoconf is generally "/usr/local",
> unless you've done something to override that. I don't think fedfs has
> done anything so that's also the default location for its install as
> well.

I'm just wondering, though, if nfs-utils, cifs-utils, utils-linux-ng, and others use a different default.  fedfs-utils should use the same default others do.

That's besides the bug fixed in this patch.  If you confirm that your RPM works as expected with this patch applied, I'll include it in 0.7.0.

> 
>>> Signed-off-by: Jeff Layton <jlayton at redhat.com>
>>> ---
>>> configure.ac          |    9 +++++++++
>>> src/mount/Makefile.am |    3 ++-
>>> 2 files changed, 11 insertions(+), 1 deletions(-)
>>> 
>>> diff --git a/configure.ac b/configure.ac
>>> index d46694c..c4e2823 100644
>>> --- a/configure.ac
>>> +++ b/configure.ac
>>> @@ -89,6 +89,15 @@ AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
>>> AC_FUNC_MALLOC
>>> AC_CHECK_FUNCS([atexit memset nl_langinfo pathconf setlocale socket strcasecmp strchr strdup strerror strndup strrchr strtoul])
>>> 
>>> +# Check whether exec_prefix=/usr:
>>> +root_sbindir="${sbindir}"
>>> +case $exec_prefix:$prefix in
>>> +NONE:NONE | NONE:/usr | /usr:*)
>>> +	root_sbindir="/sbin"
>>> +esac
>>> +
>>> +AC_SUBST([root_sbindir])
>>> +
>>> AC_CONFIG_FILES([Makefile
>>>                 doc/Makefile
>>>                 doc/ldap/Makefile
>>> diff --git a/src/mount/Makefile.am b/src/mount/Makefile.am
>>> index 4d0a83a..8a324f9 100644
>>> --- a/src/mount/Makefile.am
>>> +++ b/src/mount/Makefile.am
>>> @@ -24,7 +24,8 @@
>>> ##
>>> 
>>> noinst_HEADERS		= nls.h
>>> -sbin_PROGRAMS		= mount.fedfs fedfs-map-nfs4
>>> +root_sbin_PROGRAMS	= mount.fedfs
>>> +sbin_PROGRAMS		= fedfs-map-nfs4
>>> fedfs_map_nfs4_SOURCES	= fedfs-map-nfs4.c
>>> fedfs_map_nfs4_LDADD	= -lresolv \
>>> 			  $(top_builddir)/src/libsi/libsi.a
>>> -- 
>>> 1.7.6
>>> 
>>> 
>>> _______________________________________________
>>> fedfs-utils-devel mailing list
>>> fedfs-utils-devel at oss.oracle.com
>>> http://oss.oracle.com/mailman/listinfo/fedfs-utils-devel
>> 
> 
> 
> -- 
> Jeff Layton <jlayton at poochiereds.net>

-- 
Chuck Lever
chuck[dot]lever[at]oracle[dot]com







More information about the fedfs-utils-devel mailing list