What's the right way to create an RPM that modifies the
%config(noreplace)
files installed by another RPM?
Specific instance of the general question: We want to modify the repository definitions installed by almalinux-repos
so that the definitions have a baseurl
pointing to our internal mirror. Because the repository definitions are %config(noreplace)
in almalinux-repos
, we could modify them any number of ways. However, we'd like to have our modifications packaged as well.
One idea is to create a new package that Obsoletes: almalinux-repos
. This would suggest using almalinux-repos
as a BuildRequires
and then including its files in the buildroot. It's so easy for Obsoletes
to go bad that we are averse to this approach.
Another idea is to create a new package that Requires: almalinux-repos
and then uses %patch
to modify its files.
Secondary question: Assuming we use the %patch
mechanism, should we add Supplements: almalinux-repos
to our new package so that it is automatically included in package resolution?
Asked by David M
(123 rep)
Mar 7, 2023, 07:53 PM
Last activity: Mar 7, 2023, 08:07 PM
Last activity: Mar 7, 2023, 08:07 PM