diff --git a/0010-allow-mount.nfs-to-be-writeable-by-owner.patch b/0010-allow-mount.nfs-to-be-writeable-by-owner.patch new file mode 100644 index 0000000000000000000000000000000000000000..2faababb0bd1215778cd09d92382d8f420a45361 --- /dev/null +++ b/0010-allow-mount.nfs-to-be-writeable-by-owner.patch @@ -0,0 +1,46 @@ +From 385c89c64274c75e65f7ce09f7cec4896b981292 Mon Sep 17 00:00:00 2001 +From: Scott Mayhew +Date: Sat, 9 Nov 2024 13:16:41 -0500 +Subject: [PATCH] Makefile.am: allow mount.nfs to be writeable by owner + +On Red Hat-based systems, the debug symbol files are built with a +.gdb_index section to speed up gdb initialization. The gdb-add-index +program calls objcopy to merge the index file into the object file. +That fails if the object file isn't writeable by the owner. + +Signed-off-by: Scott Mayhew +Signed-off-by: Steve Dickson +--- + utils/mount/Makefile.am | 2 +- + utils/mount/Makefile.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/utils/mount/Makefile.am b/utils/mount/Makefile.am +index 5ff1148..83a8ee1 100644 +--- a/utils/mount/Makefile.am ++++ b/utils/mount/Makefile.am +@@ -50,7 +50,7 @@ install-exec-hook: + ln -sf mount.nfs mount.nfs4 && \ + ln -sf mount.nfs umount.nfs && \ + ln -sf mount.nfs umount.nfs4 && \ +- chmod 4511 mount.nfs ) ++ chmod 4711 mount.nfs ) + uninstall-hook: + (cd $(DESTDIR)$(sbindir) && \ + rm -f mount.nfs4 umount.nfs umount.nfs4) +diff --git a/utils/mount/Makefile.in b/utils/mount/Makefile.in +index 31e7fd3..f9b7a0e 100644 +--- a/utils/mount/Makefile.in ++++ b/utils/mount/Makefile.in +@@ -940,7 +940,7 @@ install-exec-hook: + ln -sf mount.nfs mount.nfs4 && \ + ln -sf mount.nfs umount.nfs && \ + ln -sf mount.nfs umount.nfs4 && \ +- chmod 4511 mount.nfs ) ++ chmod 4711 mount.nfs ) + uninstall-hook: + (cd $(DESTDIR)$(sbindir) && \ + rm -f mount.nfs4 umount.nfs umount.nfs4) +-- +1.8.3.1 + diff --git a/nfs-utils.spec b/nfs-utils.spec index 9373b86abf9b1ad111b1e4e38e4fdec9767fcb3e..004d913282ae116337276503a0e1510ef6c2ea3c 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -4,7 +4,7 @@ Name: nfs-utils Version: 2.6.3 -Release: 3 +Release: 4 Epoch: 2 Summary: The Linux NFS userland utility package License: MIT and GPLv2 and GPLv2+ and BSD @@ -22,7 +22,8 @@ Patch6: 0006-nfsidmap-fix-a-memory-leak.patch Patch7: 0007-rpc-gssd-service-has-status-failed-due-to-segfault.patch Patch8: 0008-fixed-a-regression-in-the-junction-code.patch Patch9: 0009-libnfsidmap-try-to-get-the-domain-directly-from-host.patch - +Patch10: 0010-allow-mount.nfs-to-be-writeable-by-owner.patch + BuildRequires: libevent-devel,libcap-devel, libtirpc-devel libblkid-devel BuildRequires: krb5-libs >= 1.4 autoconf >= 2.57 openldap-devel >= 2.2 BuildRequires: automake, libtool, gcc, device-mapper-devel @@ -111,12 +112,7 @@ Conflicts: nfs-utils %description -n nfs-utils-min Minimal NFS utilities for supporting clients -%package help -Summary: Including man files for nfs-utils -Requires: man - -%description help -This contains man files for the using of nfs-utils. +%package_help %prep %autosetup -n %{name}-%{version} -p1 @@ -127,6 +123,7 @@ sh -x autogen.sh %configure \ CFLAGS="%{build_cflags} -D_FILE_OFFSET_BITS=64" \ LDFLAGS="%{build_ldflags}" \ + --disable-static \ --enable-mountconfig \ --enable-ipv6 \ --with-statdpath=%{_statdpath} \ @@ -135,11 +132,11 @@ sh -x autogen.sh --without-tcp-wrappers \ --with-pluginpath=%{_libdir}/libnfsidmap -%make_build all +%make_build %install %make_install - +%delete_la install -D -m 644 utils/nfsidmap/id_resolver.conf $RPM_BUILD_ROOT%{_sysconfdir}/request-key.d/id_resolver.conf install -s -m 755 tools/rpcdebug/rpcdebug $RPM_BUILD_ROOT%{_sbindir} @@ -160,11 +157,8 @@ ln -s rpc-gssd.service nfs-secure.service ln -s nfs-server.service nfs.service ln -s nfs-idmapd.service nfs-idmap.service -rm -rf $RPM_BUILD_ROOT%{_libdir}/{*.a,*.la} -rm -rf $RPM_BUILD_ROOT%{_libdir}/libnfsidmap/{*.a,*.la} - %check -make check +%make_build check %pre if [ -f /var/lock/subsys/rpc.gssd ]; then @@ -284,7 +278,8 @@ fi %{_prefix}/lib/systemd/*/var-lib-nfs-rpc_pipefs.mount %files -n libnfsidmap -%doc support/nfsidmap/AUTHORS support/nfsidmap/README support/nfsidmap/COPYING +%license support/nfsidmap/COPYING +%doc support/nfsidmap/AUTHORS support/nfsidmap/README %config(noreplace) %{_sysconfdir}/idmapd.conf %{_libdir}/libnfsidmap.so.* %{_libdir}/libnfsidmap/*.so @@ -294,6 +289,9 @@ fi %{_mandir}/*/* %changelog +* Tue Mar 11 2025 Funda Wang - 2:2.6.3-4 +- fix permission of mount.nfs + * Mon Nov 18 2024 zhangjian - 2:2.6.3-3 - backport bugfix patches from community