Undo rpminspect-related changes from previous build

I was unaware that the rpminspect data was per major RHEL version:
https://gitlab.cee.redhat.com/osci/rpminspect-data-redhat/-/merge_requests/197#note_14431048

That makes it pretty hard to fix the pathmigration test in RHEL9, so
let's just use rpminspect.yaml to ignore the handful of programs still
in /sbin.

In a similar vein, let's not add an explicit version requirement for
libnfsidmap in RHEL9.  Add an ignore directive in rpminspect.yaml for
that too.

Finally, make the badfuncs configuration in rpminspect.yaml more
specific instead of turning it off completely.

Resolves: RHEL-69771
Resolves: RHEL-78107
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
This commit is contained in:
Scott Mayhew 2025-02-07 16:23:19 -05:00
parent 917ca94bf1
commit 0244ccf962
3 changed files with 56 additions and 115 deletions

View File

@ -1,89 +0,0 @@
From 49822c2130a2a6e1d5a9e414f5a0726a461d9b00 Mon Sep 17 00:00:00 2001
From: NeilBrown <neilb@suse.de>
Date: Mon, 25 Oct 2021 12:08:46 -0400
Subject: [nfs-utils 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 bc2d0f02..93626d62 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 ad0be93b..3101f7ab 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 2f7fe3de..769e4a45 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.48.1

View File

@ -2,7 +2,7 @@ Summary: NFS utilities and supporting clients and daemons for the kernel NFS ser
Name: nfs-utils
URL: http://linux-nfs.org/
Version: 2.5.4
Release: 31%{?dist}
Release: 32%{?dist}
Epoch: 1
# group all 32bit related archs
@ -72,8 +72,7 @@ Patch028: nfs-utils-2.5.4-rpcidmapd-nfsopen-failure.patch
Patch029: nfs-utils-2.5.4-mount-writable.patch
Patch030: nfs-utils-2.5.4-mount-v3-retry.patch
Patch031: nfs-utils-2.5.4-conffile-argument.patch
Patch032: nfs-utils-2.5.4-add-disable-sbin-override.patch
Patch033: nfs-utils-2.5.4-fix-nfsdcld-starting-too-early.patch
Patch032: nfs-utils-2.5.4-fix-nfsdcld-starting-too-early.patch
Patch100: nfs-utils-1.2.1-statdpath-man.patch
Patch101: nfs-utils-1.2.1-exp-subtree-warn-off.patch
@ -115,7 +114,7 @@ Requires(pre): shadow-utils >= 4.0.3-25
Requires(pre): util-linux
Requires(pre): coreutils
Requires(preun): coreutils
Requires: libnfsidmap%{?_isa} = %{epoch}:%{version}-%{release} libevent
Requires: libnfsidmap libevent
Requires: libtirpc >= 0.2.3-1 libblkid libcap libmount
Requires: gssproxy => 0.7.0-3
Requires: rpcbind, sed, gawk, grep
@ -134,7 +133,6 @@ Provides: umount.nfs4 = %{epoch}:%{version}-%{release}
Provides: start-statd = %{epoch}:%{version}-%{release}
Provides: nfsidmap = %{epoch}:%{version}-%{release}
Provides: showmount = %{epoch}:%{version}-%{release}
Requires: libnfsidmap%{?_isa} = %{epoch}:%{version}-%{release}
Requires: rpcbind
%{?systemd_requires}
@ -159,7 +157,6 @@ Provides: mount.nfs4 = %{epoch}:%{version}-%{release}
Provides: umount.nfs = %{epoch}:%{version}-%{release}
Provides: umount.nfs4 = %{epoch}:%{version}-%{release}
Provides: nfsidmap = %{epoch}:%{version}-%{release}
Requires: libnfsidmap%{?_isa} = %{epoch}:%{version}-%{release}
Requires: gssproxy => 0.7.0-3
%description -n nfsv4-client-utils
@ -220,8 +217,7 @@ sh -x autogen.sh
--with-systemd \
--without-tcp-wrappers \
--with-pluginpath=%{_libdir}/libnfsidmap \
--enable-junction \
--disable-sbin-override
--enable-junction
%make_build all
@ -230,6 +226,7 @@ sh -x autogen.sh
rm -rf $RPM_BUILD_ROOT/*
mkdir -p $RPM_BUILD_ROOT/sbin
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/nfs-utils/
mkdir -p $RPM_BUILD_ROOT%{_pkgdir}/system
@ -257,6 +254,7 @@ rm -rf $RPM_BUILD_ROOT%{_libdir}/libnfsidmap/*.{a,la}
mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/nfs/rpc_pipefs
touch $RPM_BUILD_ROOT%{_sharedstatedir}/nfs/rmtab
mv $RPM_BUILD_ROOT%{_sbindir}/rpc.statd $RPM_BUILD_ROOT/sbin
mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/nfs/statd/sm
mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/nfs/statd/sm.bak
@ -380,8 +378,8 @@ fi
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/gssproxy/24-nfs-server.conf
%doc linux-nfs/ChangeLog linux-nfs/KNOWNBUGS linux-nfs/NEW linux-nfs/README
%doc linux-nfs/THANKS linux-nfs/TODO
%{_sbindir}/rpc.statd
%{_sbindir}/nfsdcltrack
/sbin/rpc.statd
/sbin/nfsdcltrack
%{_sbindir}/exportfs
%{_sbindir}/nfsstat
%{_sbindir}/rpcdebug
@ -407,11 +405,11 @@ fi
%{_mandir}/*/*
%{_pkgdir}/*/*
%attr(4755,root,root) %{_sbindir}/mount.nfs
%attr(4755,root,root) /sbin/mount.nfs
%{_sbindir}/mount.nfs4
%{_sbindir}/umount.nfs
%{_sbindir}/umount.nfs4
/sbin/mount.nfs4
/sbin/umount.nfs
/sbin/umount.nfs4
%files -n libnfsidmap
%doc support/nfsidmap/AUTHORS support/nfsidmap/README support/nfsidmap/COPYING
@ -442,11 +440,11 @@ fi
%{_sbindir}/showmount
%{_libexecdir}/nfsrahead
%{_udevrulesdir}/99-nfs.rules
%attr(4755,root,root) %{_sbindir}/mount.nfs
%{_sbindir}/mount.nfs4
%{_sbindir}/rpc.statd
%{_sbindir}/umount.nfs
%{_sbindir}/umount.nfs4
%attr(4755,root,root) /sbin/mount.nfs
/sbin/mount.nfs4
/sbin/rpc.statd
/sbin/umount.nfs
/sbin/umount.nfs4
%{_mandir}/*/nfs.5.gz
%{_mandir}/*/nfs.conf.5.gz
%{_mandir}/*/nfsmount.conf.5.gz
@ -484,10 +482,10 @@ fi
%{_sbindir}/nfsstat
%{_libexecdir}/nfsrahead
%{_udevrulesdir}/99-nfs.rules
%attr(4755,root,root) %{_sbindir}/mount.nfs
%{_sbindir}/mount.nfs4
%{_sbindir}/umount.nfs
%{_sbindir}/umount.nfs4
%attr(4755,root,root) /sbin/mount.nfs
/sbin/mount.nfs4
/sbin/umount.nfs
/sbin/umount.nfs4
%{_mandir}/*/nfs.5.gz
%{_mandir}/*/nfs.conf.5.gz
%{_mandir}/*/nfsmount.conf.5.gz
@ -516,6 +514,11 @@ fi
%{_mandir}/*/nfsiostat.8.gz
%changelog
* Fri Feb 7 2025 Scott Mayhew <smayhew@redhat.com> 2.5.4-32
- Undo 'Add explicit version requirement for libnfsidmap' from previous build (RHEL-78107)
- Undo 'Add --disable-sbin-override for when /sbin is a symlink' from previous build (RHEL-69771)
- Undo 'Move remaining binaries from /sbin to /usr/sbin' from previous build (RHEL-69771)
* Thu Feb 6 2025 Scott Mayhew <smayhew@redhat.com> 2.5.4-31
- nfsdcld: prevent from accessing /var/lib/nfs/nfsdcld in read-only file system during boot (RHEL-78177)
- Replace functional gating tests with the ones from RHEL10 (RHEL-78110)

View File

@ -1,4 +1,31 @@
---
inspections:
# https://issues.redhat.com/browse/RHEL-69768
badfuncs: off
# https://issues.redhat.com/browse/RHEL-69768
badfuncs:
allowed:
/sbin/mount.nfs:
- gethostbyname
- inet_aton
- inet_ntoa
/usr/lib*/libnfsidmap.so*:
- gethostbyname
/usr/lib/systemd/system-generators/nfs-server-generator:
- gethostbyname
/usr/sbin/exportfs:
- gethostbyname
/usr/sbin/rpc.mountd:
- gethostbyname
# https://issues.redhat.com/browse/RHEL-69771
pathmigration:
ignore:
- /sbin/mount.nfs
- /sbin/mount.nfs4
- /sbin/umount.nfs
- /sbin/umount.nfs4
- /sbin/rpc.statd
- /sbin/nfsdcltrack
# https://issues.redhat.com/browse/RHEL-78107
rpmdeps:
ignore:
requires: ^libnfsidmap\.so.*$