Do not use macros is file path Requires

This is in preparation for
https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin.

When the package is rebuilt with a different %_sbindir (in particular
%_sbindir==%_bindir), those BuildRequires and Requires will stop working
with the providers of those requires that were built with the old definition.
We don't want to force a transition of all packages at the same time,
so instead use a fixed path. (The providers, when they are updated to
the new path, will retain a compat Provides for the old path.)

The tests fail in test-tar-xz-curl, but this doesn't seem to be
related to the path changes, but instead something about fs internals.

(cherry picked from commit 86fa43d05eb96c722fa2e79ce92edf5cdf0ee997)
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2024-04-13 13:47:02 +02:00 committed by Richard W.M. Jones
parent 12ec8046d8
commit 70aa55152e

View File

@ -143,25 +143,25 @@ BuildRequires: gnupg2
%endif
# Only for running the test suite:
BuildRequires: %{_bindir}/bc
BuildRequires: %{_bindir}/certtool
BuildRequires: %{_bindir}/cut
BuildRequires: /usr/bin/bc
BuildRequires: /usr/bin/certtool
BuildRequires: /usr/bin/cut
BuildRequires: expect
BuildRequires: %{_bindir}/hexdump
BuildRequires: %{_sbindir}/ip
BuildRequires: /usr/bin/hexdump
BuildRequires: /usr/sbin/ip
BuildRequires: jq
BuildRequires: %{_bindir}/nbdcopy
BuildRequires: %{_bindir}/nbdinfo
BuildRequires: %{_bindir}/nbdsh
BuildRequires: %{_bindir}/qemu-img
BuildRequires: %{_bindir}/qemu-io
BuildRequires: %{_bindir}/qemu-nbd
BuildRequires: %{_sbindir}/sfdisk
BuildRequires: /usr/bin/nbdcopy
BuildRequires: /usr/bin/nbdinfo
BuildRequires: /usr/bin/nbdsh
BuildRequires: /usr/bin/qemu-img
BuildRequires: /usr/bin/qemu-io
BuildRequires: /usr/bin/qemu-nbd
BuildRequires: /usr/sbin/sfdisk
%if !0%{?rhel}
BuildRequires: %{_bindir}/socat
BuildRequires: /usr/bin/socat
%endif
BuildRequires: %{_sbindir}/ss
BuildRequires: %{_bindir}/stat
BuildRequires: /usr/sbin/ss
BuildRequires: /usr/bin/stat
# This package has RPM rules that create the automatic Provides: for
# nbdkit plugins and filters. This means nbdkit build depends on
@ -316,7 +316,7 @@ for %{name}.
Summary: Write small inline C plugins and scripts for %{name}
Requires: %{name}-server%{?_isa} = %{version}-%{release}
Requires: gcc
Requires: %{_bindir}/cat
Requires: /usr/bin/cat
%description cc-plugin
This package contains support for writing inline C plugins and scripts