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
This commit is contained in:
parent
ff1b1d1314
commit
875f38afa0
@ -52,7 +52,7 @@
|
||||
Name: resource-agents
|
||||
Summary: Open Source HA Reusable Cluster Resource Scripts
|
||||
Version: 4.13.0
|
||||
Release: 2%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}.2
|
||||
Release: 2%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}.3
|
||||
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
||||
URL: https://github.com/ClusterLabs/resource-agents
|
||||
Source0: %{upstream_prefix}-%{upstream_version}.tar.gz
|
||||
@ -109,7 +109,7 @@ Requires: /usr/sbin/fuser
|
||||
%endif
|
||||
|
||||
# Filesystem / fs.sh / netfs.sh
|
||||
%if 0%{?suse_version}
|
||||
%if 0%{?fedora} > 39 || 0%{?suse_version}
|
||||
Requires: /usr/sbin/fsck
|
||||
%else
|
||||
Requires: /sbin/fsck
|
||||
@ -150,9 +150,14 @@ Requires: /usr/sbin/ethtool
|
||||
Requires: /sbin/rdisc /usr/sbin/arping /bin/ping /bin/ping6
|
||||
|
||||
# nfsexport.sh
|
||||
%if 0%{?fedora} > 39
|
||||
Requires: /usr/sbin/findfs
|
||||
Requires: /usr/sbin/quotaon /usr/sbin/quotacheck
|
||||
%else
|
||||
Requires: /sbin/findfs
|
||||
Requires: /sbin/quotaon /sbin/quotacheck
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%description
|
||||
A set of scripts to interface with several services to operate in a
|
||||
@ -390,6 +395,10 @@ ccs_update_schema > /dev/null 2>&1 ||:
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Jan 30 2024 Zbigniew Jedrzejewski-Szmek <zbyszek@in.waw.pl> - 4.13.0-2.3
|
||||
- Replace /sbin by /usr/sbin in some paths so that the package remains
|
||||
installable without full filepath metadata (rhbz#2229951)
|
||||
|
||||
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.13.0-2.2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user