dnf-bootc's only job is to Require python3-gobject-base and ostree-libs,
which are needed to check the unlock status on bootc systems. We don't
want to add these dependencies on `python3-dnf` because we don't want
them on non-bootc systems, so we use a subpackage.
Fedora CI rpmdeplint test failed for dnf-automic in Fedora 42 because
dnf5-plugin-automatic package obsoletes dnf-automatic package there:
Upgrade problems:
dnf-automatic-4.21.1-1.fc42.noarch would be obsoleted by dnf5-plugin-automatic-5.2.5.0-2.fc41.x86_64 from repo fedora-42-x86_64
This patch fixes it by not building dnf-automatic package if a macro
for obsoleting dnf by dnf5 is set. (Similar to a previous
f519e602a7 commit.)
Fedora CI installability and rpmdeplint tests failed on Fedoras where
dnf5 obsoletes dnf and yum packages because the tests attempt to
install just built dnf and yum packages, but DNF5 refuses installing
them because they are obsoleted by an already installed dnf5:
--------------------------------------------------------
| |
| Running install test for dnf-0:4.21.0-3.fc41.noarch |
| |
--------------------------------------------------------
Updating and loading repositories:
Repo for 121841198 Brew build 100% | 4.7 MiB/s | 4.8 KiB | 00m00s
Repositories loaded.
Failed to resolve the transaction:
Problem: problem with installed package
- installed package dnf5-5.2.5.0-2.fc41.x86_64 obsoletes dnf < 5 provided by dnf-4.21.0-3.fc41.noarch from brew-121841198
- package dnf5-5.2.5.0-2.fc41.x86_64 from fedora obsoletes dnf < 5 provided by dnf-4.21.0-3.fc41.noarch from brew-121841198
- package dnf5-5.2.5.0-2.fc41.x86_64 from updates obsoletes dnf < 5 provided by dnf-4.21.0-3.fc41.noarch from brew-121841198
- package dnf5-5.2.5.0-2.fc41.x86_64 from rawhide obsoletes dnf < 5 provided by dnf-4.21.0-3.fc41.noarch from brew-121841198
- package dnf5-5.2.5.0-2.fc41.x86_64 from fedora-41-buildroot obsoletes dnf < 5 provided by dnf-4.21.0-3.fc41.noarch from brew-121841198
- package dnf5-5.2.5.0-2.fc41.x86_64 from testing-farm-tag-repository obsoletes dnf < 5 provided by dnf-4.21.0-3.fc41.noarch from brew-121841198
- conflicting requests
(The same happesn for yum package.)
Solution this patch implements is not building the two obsolete
packages. At the end, they cannot be installed.
This patch fixes two mistakes:
(1) In minimal yum_compat_levels (default one) rpmbuild complained:
RPM build warnings:
File not found: /home/test/rpmbuild/BUILDROOT/dnf-4.21.0-4.fc40.x86_64/etc/yum/pluginconf.d
File not found: /home/test/rpmbuild/BUILDROOT/dnf-4.21.0-4.fc40.x86_64/etc/yum/protected.d
File not found: /home/test/rpmbuild/BUILDROOT/dnf-4.21.0-4.fc40.x86_64/etc/yum/vars
(2) In full yum_compat_levels /etc/yum directory was not owned by yum package
CMake build script stopped creating yum4 executable when
Python 2 support was removed with commit
92f03d1e13 ([spec] Remove python 2).
Therefore the preview level cannot be enabled anymore and this patch
removes it to simplify the spec file.
There was a bug in dnf and dnf-automatic that caused traceback
when running the Python interpreter with the `-P` argument.
Since the bug has been fixed, the `-P` argument can be used.
Adds `-s` to shebang lines.
The `-s` flag ensures that the user’s Python packages (e.g. installed by
pip install --user) don’t interfere with the RPM installed software.
According to Fedora Python Packaging Guidelines, the flag is added using
`%py3_shebang_fix` macro.
Note:
DNF supports plugins. There is a risk that the change will break
a custom plugins that require something from PIP.
Therefore, the change is only in the .spec file and is only allowed
for Fedora >= 41 and RHEL >= 10.
It is a reflection of https://fedoraproject.org/wiki/Changes/Drop_Delta_RPMs
Not installing DeltaRPMs by default on new systems make sence because
using RPM deltas is by default swithed off.
The change will slightly make systems smaller.
DNF workflow - check configuration option `deltarpm` then check whether binary
deltarpm is available, then request repository for deltas.
Related: https://bugzilla.redhat.com/show_bug.cgi?id=2252128
Instead, hardcode the protection of dnf in libdnf. This way, DNF 5 will
be able to uninstall DNF 4.
= changelog =
msg: Allow dnf to be removed by DNF 5
type: enhancement
We are using the `rpm.blockSignals()` around RPM transactions to prevent interrupting them from outside. With rpm < 4.18.0, unblocking signals via this API caused termination on `SIGPIPE` signal which is unwanted as we have an overridden handler for this signal in DNF. With rpm >= 4.18.0 this is not happening anymore, therefore bumping the version.
This reverts commit 352b174a0b.
adding the condition %{witout dnf5_obsoletes_dnf} to keep the
unprotected directive for chroots that build dnf with rpm
option with=dnf5_obsoletes_dnf
This change makes it resilient in some corner cases, such as if the user
has installed an old version of libdnf5 that doesn't provide
/etc/dnf/dnf.conf.
Move command provides to python3-dnf
In fedora distribution there are two packages that depends on those
provides therefor the movement of those provide to real provider should
help with transition to dnf5 or at least it allows to use the old dnf4
after obsolete of dnf package.