Open Source HA Reusable Cluster Resource Scripts
Go to file
Zbigniew Jędrzejewski-Szmek 875f38afa0 spec: use /usr/sbin paths for Fedora 40+
Based on the patch from Oyvind Albrigtsen <oalbrigt@redhat.com>:
6516e089c9.

Note that the upstream commit updates all paths, but it turns out that
this is not what we need. nfs-utils actually has files with both /sbin
and /usr/sbin:

  $ rpm -ql nfs-utils|grep bin
  /sbin/mount.nfs
  /sbin/mount.nfs4
  /sbin/nfsdcltrack
  /sbin/rpc.statd
  /sbin/umount.nfs
  /sbin/umount.nfs4
  /usr/sbin/blkmapd
  /usr/sbin/exportfs
  /usr/sbin/fsidd
  /usr/sbin/mountstats
  /usr/sbin/nfsconf
  /usr/sbin/nfsdcld
  /usr/sbin/nfsdclddb
  /usr/sbin/nfsdclnts
  /usr/sbin/nfsidmap
  /usr/sbin/nfsiostat
  /usr/sbin/nfsref
  /usr/sbin/nfsstat
  /usr/sbin/rpc.gssd
  /usr/sbin/rpc.idmapd
  /usr/sbin/rpc.mountd
  /usr/sbin/rpc.nfsd
  /usr/sbin/rpcctl
  /usr/sbin/rpcdebug
  /usr/sbin/showmount
  /usr/sbin/sm-notify
  /usr/sbin/start-statd

I was confused by the fact that a) the paths in the file system are
actually always /usr/s?bin, because /bin and /sbin and symlinks, and
b) rpm query works for the real paths:

  $ rpm -qf /sbin/mount.nfs /usr/sbin/mount.nfs
  nfs-utils-2.6.4-0.rc2.fc39.x86_64
  nfs-utils-2.6.4-0.rc2.fc39.x86_64

But we can only use the declared path in dependencies, and that is
/sbin/* in a few cases.

I was surprised by this, but nfs-utils is actually following the
Packaging Guidelines in this case [1]:

  > As a packager you may need to pay attention to where other
  > packages expect to find your files. Things that history has placed
  > into /bin, /sbin, /lib, or /lib64 should be listed in the %files
  > section as being in those directories. Things that history placed
  > in /usr/bin, /usr/sbin, etc, should be listed in the %files
  > section as being in %{_bindir}, %{_sbindir}, etc.

I think the Packaging Guidelines should be updated to drop this, but
currently they are what they are. Thus, this patch updates the paths
the are _declared_ as /usr/s?bin/* in other packages only.

[1] https://docs.fedoraproject.org/en-US/packaging-guidelines/#_effect_of_the_usrmove_fedora_feature
2024-01-31 14:10:29 +01:00
.gitignore - Rebase to resource-agents 4.1.0 upstream release 2018-01-10 10:22:35 +01:00
bz2256836-configure-fix-sanity-check-autoconf-2.72.patch - configure: fix "C preprocessor "gcc -E" fails sanity check" error 2024-01-10 15:00:25 +01:00
resource-agents.spec spec: use /usr/sbin paths for Fedora 40+ 2024-01-31 14:10:29 +01:00
sources - Rebase to resource-agents 4.13.0 upstream release. 2023-10-11 09:37:45 +02:00