898835da98
The generator will generate a Requires on filesystem(unmerged-sbin-symlinks), i.e. effectively on a new-enough version of _this_ package. This is needed to solve the following problem: as packages are rebuilt in a merged-sbin environment, their payload paths change from /usr/sbin to /usr/bin. In all the cases where there were other packages that dependended on the old paths via explicit Requires, compat Provides on the old path was added along with Requires:filesystem(unmerged-sbin-symlinks). This means that those packages will not be installed with an older filesystem.rpm. But for packages that didn't need this special treatment, no dependency is generated. When they are installed into an upgraded environment which still has split-sbin and has an older copy of filesystem, the file is moved without the compat symlink being created. Thus, any scripts, or systemd service files, etc., referring to the old path are now broken. We need to require a new-enough filesystem.rpm to be installed so avoid breakage on such partially upgraded systems.
16 lines
461 B
Plaintext
16 lines
461 B
Plaintext
# Convenience macro for the transition to merged-sbin
|
|
# (https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin)
|
|
# Usage:
|
|
# List all files listed in %%files as %%_sbindir/foo.
|
|
# Example:
|
|
# %%sbin_merge_compat /usr/sbin/foobar
|
|
# %%{sbin_merge_compat /usr/sbin/bar1
|
|
# /usr/sbin/bar2
|
|
# }
|
|
|
|
%sbin_merge_compat() \
|
|
%if "%{_sbindir}" == "%{_bindir}" \
|
|
Requires: filesystem(unmerged-sbin-symlinks) \
|
|
Provides: %{shrink:%{?*}} \
|
|
%endif
|