- add Add-disable-sbin-override-for-when-sbin-is-a-symlink.patch
and use it to move last few binaries from /sbin to /usr/sbin (bsc#1191082) - Move nfsdclddb and nfsdclnts from nfs-client to nfs-kernel-server and fix their permissions. OBS-URL: https://build.opensuse.org/package/show/Base:System/nfs-utils?expand=0&rev=247
This commit is contained in:
parent
b4544bb5ca
commit
07e3ad36fa
88
Add-disable-sbin-override-for-when-sbin-is-a-symlink.patch
Normal file
88
Add-disable-sbin-override-for-when-sbin-is-a-symlink.patch
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
From 49822c2130a2a6e1d5a9e414f5a0726a461d9b00 Mon Sep 17 00:00:00 2001
|
||||||
|
From: NeilBrown <neilb@suse.de>
|
||||||
|
Date: Mon, 25 Oct 2021 12:08:46 -0400
|
||||||
|
Subject: [PATCH] Add --disable-sbin-override for when /sbin is a symlink
|
||||||
|
|
||||||
|
mount.nfs* umount.nfs* and nfsdcltrack are currently always installed in
|
||||||
|
/sbin.
|
||||||
|
|
||||||
|
Many distros are moving to a "merged /usr" where /sbin and others are
|
||||||
|
symlinks into /usr/sbin or similar. In these cases it is inelegant to
|
||||||
|
install in /sbin (i.e. install through a symlink).
|
||||||
|
|
||||||
|
So we add "--disable-sbin-override" as a configure option. This causes
|
||||||
|
the same sbindir to be used for *mount.nfs* and nfsdcltrack as for other
|
||||||
|
system binaries.
|
||||||
|
|
||||||
|
Note that autotools notices if we simply define "sbindir=/sbin"
|
||||||
|
inside an "if CONFIG_foo" clause, gives a warning, and defeats our
|
||||||
|
intent.
|
||||||
|
|
||||||
|
So instead, we use the @CONFIG_SBIN_OVERRIDE_TRUE@ prefix to find
|
||||||
|
the new declaration when we don't want it.
|
||||||
|
|
||||||
|
Signed-off-by: NeilBrown <neilb@suse.de>
|
||||||
|
Signed-off-by: Steve Dickson <steved@redhat.com>
|
||||||
|
---
|
||||||
|
configure.ac | 6 ++++++
|
||||||
|
utils/mount/Makefile.am | 8 +++++---
|
||||||
|
utils/nfsdcltrack/Makefile.am | 9 ++++++---
|
||||||
|
3 files changed, 17 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index bc2d0f02979c..93626d62be40 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -187,6 +187,12 @@ else
|
||||||
|
enable_libmount=no
|
||||||
|
fi
|
||||||
|
|
||||||
|
+AC_ARG_ENABLE(sbin-override,
|
||||||
|
+ [AC_HELP_STRING([--disable-sbin-override],
|
||||||
|
+ [Don't force nfsdcltrack and mount helpers into /sbin: always honour --sbindir])],
|
||||||
|
+ enable_sbin_override=$enableval,
|
||||||
|
+ enable_sbin_override=yes)
|
||||||
|
+ AM_CONDITIONAL(CONFIG_SBIN_OVERRIDE, [test "$enable_sbin_override" = "yes"])
|
||||||
|
AC_ARG_ENABLE(junction,
|
||||||
|
[AC_HELP_STRING([--enable-junction],
|
||||||
|
[enable support for NFS junctions @<:@default=no@:>@])],
|
||||||
|
diff --git a/utils/mount/Makefile.am b/utils/mount/Makefile.am
|
||||||
|
index ad0be93b1def..3101f7abd7f4 100644
|
||||||
|
--- a/utils/mount/Makefile.am
|
||||||
|
+++ b/utils/mount/Makefile.am
|
||||||
|
@@ -1,8 +1,10 @@
|
||||||
|
## Process this file with automake to produce Makefile.in
|
||||||
|
|
||||||
|
-# These binaries go in /sbin (not /usr/sbin), and that cannot be
|
||||||
|
-# overridden at config time.
|
||||||
|
-sbindir = /sbin
|
||||||
|
+# These binaries go in /sbin (not /usr/sbin), unless CONFIG_SBIN_OVERRIDE
|
||||||
|
+# is disabled as may be appropriate when /sbin is a symlink.
|
||||||
|
+# Note that we don't use "if CONFIG_SBIN_OVERRIDE" as that
|
||||||
|
+# causes autotools to notice the override and disable it.
|
||||||
|
+@CONFIG_SBIN_OVERRIDE_TRUE@sbindir = /sbin
|
||||||
|
|
||||||
|
man8_MANS = mount.nfs.man umount.nfs.man
|
||||||
|
man5_MANS = nfs.man
|
||||||
|
diff --git a/utils/nfsdcltrack/Makefile.am b/utils/nfsdcltrack/Makefile.am
|
||||||
|
index 2f7fe3de6922..769e4a455fcf 100644
|
||||||
|
--- a/utils/nfsdcltrack/Makefile.am
|
||||||
|
+++ b/utils/nfsdcltrack/Makefile.am
|
||||||
|
@@ -1,8 +1,11 @@
|
||||||
|
## Process this file with automake to produce Makefile.in
|
||||||
|
|
||||||
|
-# These binaries go in /sbin (not /usr/sbin), and that cannot be
|
||||||
|
-# overridden at config time. The kernel "knows" the /sbin name.
|
||||||
|
-sbindir = /sbin
|
||||||
|
+# These binaries go in /sbin (not /usr/sbin) as the kernel "knows" the
|
||||||
|
+# /sbin name. If /sbin is a symlink, CONFIG_SBIN_OVERRIDE can be
|
||||||
|
+# disabled to install in /usr/sbin anyway.
|
||||||
|
+# Note that we don't use "if CONFIG_SBIN_OVERRIDE" as that
|
||||||
|
+# causes autotools to notice the override and disable it.
|
||||||
|
+@CONFIG_SBIN_OVERRIDE_TRUE@sbindir = /sbin
|
||||||
|
|
||||||
|
man8_MANS = nfsdcltrack.man
|
||||||
|
EXTRA_DIST = $(man8_MANS)
|
||||||
|
--
|
||||||
|
2.33.1
|
||||||
|
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Oct 25 23:53:37 UTC 2021 - Neil Brown <nfbrown@suse.com>
|
||||||
|
|
||||||
|
- add Add-disable-sbin-override-for-when-sbin-is-a-symlink.patch
|
||||||
|
and use it to move last few binaries from /sbin to /usr/sbin
|
||||||
|
(bsc#1191082)
|
||||||
|
- Move nfsdclddb and nfsdclnts from nfs-client to
|
||||||
|
nfs-kernel-server and fix their permissions.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Sep 9 23:35:04 UTC 2021 - Neil Brown <nfbrown@suse.com>
|
Thu Sep 9 23:35:04 UTC 2021 - Neil Brown <nfbrown@suse.com>
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@ Source26: nfs.conf
|
|||||||
Source27: nfs-kernel-server.tmpfiles.conf
|
Source27: nfs-kernel-server.tmpfiles.conf
|
||||||
Patch0: nfs-utils-1.0.7-bind-syntax.patch
|
Patch0: nfs-utils-1.0.7-bind-syntax.patch
|
||||||
Patch1: 0001-gssd-fix-crash-in-debug-message.patch
|
Patch1: 0001-gssd-fix-crash-in-debug-message.patch
|
||||||
|
Patch2: Add-disable-sbin-override-for-when-sbin-is-a-symlink.patch
|
||||||
|
|
||||||
BuildRequires: e2fsprogs-devel
|
BuildRequires: e2fsprogs-devel
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
@ -141,6 +142,7 @@ export LDFLAGS="-pie"
|
|||||||
--enable-mount \
|
--enable-mount \
|
||||||
--enable-libmount-mount \
|
--enable-libmount-mount \
|
||||||
--disable-static \
|
--disable-static \
|
||||||
|
--disable-sbin-override \
|
||||||
--with-pluginpath=%{_libdir}/libnfsidmap-1.0.0 \
|
--with-pluginpath=%{_libdir}/libnfsidmap-1.0.0 \
|
||||||
--enable-mountconfig
|
--enable-mountconfig
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
@ -206,7 +208,7 @@ fi
|
|||||||
###
|
###
|
||||||
%{fillup_only -n nfs nfs}
|
%{fillup_only -n nfs nfs}
|
||||||
#
|
#
|
||||||
%set_permissions /sbin/mount.nfs
|
%set_permissions %{_sbindir}/mount.nfs
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
%service_add_post auth-rpcgss-module.service nfs-idmapd.service nfs-blkmap.service rpc-statd-notify.service rpc-gssd.service rpc-statd.service rpc-svcgssd.service
|
%service_add_post auth-rpcgss-module.service nfs-idmapd.service nfs-blkmap.service rpc-statd-notify.service rpc-gssd.service rpc-statd.service rpc-svcgssd.service
|
||||||
|
|
||||||
@ -218,7 +220,7 @@ fi
|
|||||||
%service_del_postun auth-rpcgss-module.service nfs-idmapd.service nfs-blkmap.service rpc-statd-notify.service rpc-gssd.service rpc-statd.service rpc-svcgssd.service
|
%service_del_postun auth-rpcgss-module.service nfs-idmapd.service nfs-blkmap.service rpc-statd-notify.service rpc-gssd.service rpc-statd.service rpc-svcgssd.service
|
||||||
|
|
||||||
%verifyscript -n nfs-client
|
%verifyscript -n nfs-client
|
||||||
%verify_permissions -e /sbin/mount.nfs
|
%verify_permissions -e %{_sbindir}/mount.nfs
|
||||||
|
|
||||||
%pre -n nfs-kernel-server
|
%pre -n nfs-kernel-server
|
||||||
%service_add_pre nfs-svcgssd.service nfs-mountd.service nfs-server.service
|
%service_add_pre nfs-svcgssd.service nfs-mountd.service nfs-server.service
|
||||||
@ -254,14 +256,12 @@ fi
|
|||||||
%config %{_sysconfdir}/idmapd.conf
|
%config %{_sysconfdir}/idmapd.conf
|
||||||
%config %{_sysconfdir}/nfsmount.conf
|
%config %{_sysconfdir}/nfsmount.conf
|
||||||
%config %{_sysconfdir}/nfs.conf
|
%config %{_sysconfdir}/nfs.conf
|
||||||
%verify(not mode) %attr(0755,root,root) /sbin/mount.nfs
|
%verify(not mode) %attr(0755,root,root) %{_sbindir}/mount.nfs
|
||||||
/sbin/mount.nfs4
|
%{_sbindir}/mount.nfs4
|
||||||
/sbin/umount.nfs
|
%{_sbindir}/umount.nfs
|
||||||
/sbin/umount.nfs4
|
%{_sbindir}/umount.nfs4
|
||||||
%attr(0755,root,root) %{_sbindir}/mountstats
|
%attr(0755,root,root) %{_sbindir}/mountstats
|
||||||
%attr(0755,root,root) %{_sbindir}/nfsiostat
|
%attr(0755,root,root) %{_sbindir}/nfsiostat
|
||||||
%{_sbindir}/nfsdclddb
|
|
||||||
%{_sbindir}/nfsdclnts
|
|
||||||
%{_sbindir}/nfsdcld
|
%{_sbindir}/nfsdcld
|
||||||
%{_sbindir}/nfsidmap
|
%{_sbindir}/nfsidmap
|
||||||
%{_sbindir}/nfsstat
|
%{_sbindir}/nfsstat
|
||||||
@ -343,7 +343,9 @@ fi
|
|||||||
%{_sbindir}/rcnfs-server
|
%{_sbindir}/rcnfs-server
|
||||||
%{_sbindir}/rpc.mountd
|
%{_sbindir}/rpc.mountd
|
||||||
%{_sbindir}/rpc.nfsd
|
%{_sbindir}/rpc.nfsd
|
||||||
/sbin/nfsdcltrack
|
%{_sbindir}/nfsdcltrack
|
||||||
|
%attr(0755,root,root) %{_sbindir}/nfsdclddb
|
||||||
|
%attr(0755,root,root) %{_sbindir}/nfsdclnts
|
||||||
%{_mandir}/man5/exports.5%{ext_man}
|
%{_mandir}/man5/exports.5%{ext_man}
|
||||||
%{_mandir}/man7/nfsd.7%{ext_man}
|
%{_mandir}/man7/nfsd.7%{ext_man}
|
||||||
%{_mandir}/man8/exportfs.8%{ext_man}
|
%{_mandir}/man8/exportfs.8%{ext_man}
|
||||||
|
Loading…
Reference in New Issue
Block a user