Commit Graph

421 Commits

Author SHA1 Message Date
Evan Goode 942e9421ab dnf-bootc depends on python3-dnf = %{version}-%{release} 2025-02-04 14:23:50 -05:00
Evan Goode 5c30896035 dnf-bootc depends on ostree, util-linux-core 2025-02-04 08:37:34 -05:00
Evan Goode 960b2f4ba0 spec: Add dnf-bootc subpackage
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.
2025-01-31 17:48:16 -05:00
Petr Písař d50a6b2a63 spec: If DNF5 obsoletes DNF, do not build dnf-automatic
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.)
2024-09-23 15:28:10 +02:00
Petr Písař f519e602a7 spec: If DNF5 obsoletes DNF, do not build dnf and yum packages
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.
2024-09-06 09:56:33 +02:00
Petr Písař f29a017b00 spec: Fix ownership of /etc/yum tree
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
2024-08-19 15:05:02 +02:00
Petr Písař be7001149d spec: Simplify %files dnf section for both yum_compat_levels
Miminal level is a subset of full level.
2024-08-19 15:05:02 +02:00
Petr Písař 917a8baba0 spec: Remove preview yum_compat_level
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.
2024-08-19 15:05:02 +02:00
Petr Písař e8ad542ea9 spec: Move /var/cache/dnf from dnf to python3-dnf
The cache directory is used by /usr/bin/dnf-3 program packaged
in python3-dnf. dnf package requires python3-dnf.
2024-08-19 15:05:02 +02:00
Evan Goode 9717c055b5 Release 4.21.1 2024-08-14 23:03:26 +00:00
Evan Goode d29dfa0634 Release 4.21.0 2024-06-18 16:10:33 -04:00
Jaroslav Mracek 78e2838c62 Drop collect file for ABRT
It looks like that it is not required anymore

Resolve: https://issues.redhat.com/browse/RHEL-40382
2024-06-12 10:38:10 +02:00
Jaroslav Rohel 22fc33c71e Allow `%py3_shebang_fix` macro to add `-P` argument to shebang lines
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.
2024-04-29 12:48:30 +02:00
Jan Kolarik e3cb438c0f Release 4.20.0 2024-04-24 13:16:32 +02:00
Jan Kolarik bc67d0d54e Prepare for switch of dnf5 in Rawhide 2024-04-22 09:32:19 +02:00
Jaroslav Rohel caa17e39b4 Do not add user site-packages directory to sys.path (RHEL-26646)
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.
2024-04-04 15:40:39 +02:00
Jan Kolarik cb464d4351 man: Prepare pages for dnf5 switch 2024-04-03 11:29:43 +02:00
Evan Goode 9b2b2e8dda Release 4.19.2 2024-03-29 11:38:32 -04:00
Evan Goode e84837bea9 Release 4.19.1 2024-03-28 15:01:12 -04:00
Jan Kolarik 4334ea254a bash-completion: Prepare ownerships for dnf5 switch
Use `dnf-3` and `dnf4` files for bash completion and link the `dnf` only when `dnf5` is not used yet.
2024-03-28 14:04:31 +01:00
Jan Kolarik 75803f54d1 bash-completion: Complete dnf command only if we own it 2024-03-28 14:04:31 +01:00
Stephen Gallagher b7e4766fdc ELN: Don't obsolete DNF with DNF5 yet
Matches https://github.com/rpm-software-management/dnf5/pull/1309 for
 DNF 5.

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
2024-03-28 08:43:49 +01:00
Jan Kolarik ec445c17f0 build: Adapt to changes in Fedora packaging of bash-completion
See also https://github.com/rpm-software-management/dnf5/issues/1252.
2024-02-20 17:41:12 +01:00
Jan Kolarik fe3742aaae Drop dnf obsoletion temporarily
To allow us and others to prepare for switching dnf5 as the default in Rawhide.
2024-02-19 06:56:27 +01:00
Jan Kolarik 1032c2c316 Add 4.19.0 changelog 2024-02-08 15:24:54 +00:00
Jaroslav Mracek 76cbf76d4a Remove Recommends: deltarpm for Fedora 40+
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
2024-02-01 09:14:41 +01:00
Jan Kolarik 0e40047074 Bump the version and update libdnf due to new filelists behavior 2024-01-26 09:33:46 +01:00
Jan Kolarik 1c43d09991 Release 4.18.2 2023-12-08 11:44:42 +01:00
Jan Kolarik 41a287e2bd Release 4.18.1 2023-11-07 08:09:45 +01:00
Jan Kolarik 91aada52d2 Fix release notes 2023-10-18 13:48:11 +02:00
Jan Kolarik 8dfa0c9050 Release 4.18.0 2023-10-18 13:31:53 +02:00
Your Name 43e9249e9c Include dist-info for python3-dnf
This is the DNF 4 cousin to this patch [0] for DNF 5.

Per [1], Python packages should include some minimal distribution
metadata, e.g. to make the package appear in `pip list`.

Perhaps the "proper way" to generate this dist-info metadata would be to
write a pyproject.toml and use a conventional Python build system like
Poetry to build `python3-dnf` rather than doing it with CMake, but this
is a way to do it with minimal changes to the build process.

Closes RhBug:2239323 [2]

[0] https://github.com/rpm-software-management/dnf5/pull/447
[1] https://packaging.python.org/en/latest/specifications/core-metadata/#core-metadata,
[2] https://bugzilla.redhat.com/show_bug.cgi?id=2239323

= changelog =
msg: Add metadata for `dnf` Python package
type: bugfix
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2239323
2023-10-09 08:37:24 +02:00
Evan Goode 552e61ef0b [spec] Bump version and depend on libdnf 0.71.1
Require new version of libdnf so that dnf remains a protected package,
see https://github.com/rpm-software-management/libdnf/pull/1621.
2023-09-25 10:39:09 +02:00
Evan Goode df137e7c7f [spec] Remove /etc/dnf/protected.d/dnf.conf
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
2023-09-25 10:39:09 +02:00
Jan Kolarik a14ea99cdf Revert "Bump rpm version to 4.18.0"
The calls to RPM block signals API was reverted for now, so we don't need this bump yet.
2023-09-25 08:07:43 +02:00
Joe Walker 2d2047e273 [spec] Add Recommends %{_bindir}/sqlite3 for bash-completion for Fedora
https://github.com/rpm-software-management/dnf/pull/1817 added the ability to utilize sqlite cache when available.
https://discussion.fedoraproject.org/t/why-bash-auto-completion-is-so-slow-with-dnf/88944
and https://discussion.fedoraproject.org/t/dnf-autocompletion-is-too-slow/64038
Are users noting that bash completion is slow without sqlite installed.

= changelog =
msg:   [spec] Add Recommends %{_bindir}/sqlite3 for bash-completion for Fedora
type:  enhancement
related: https://github.com/rpm-software-management/dnf/pull/1817
related: https://discussion.fedoraproject.org/t/why-bash-auto-completion-is-so-slow-with-dnf/88944
related: https://discussion.fedoraproject.org/t/dnf-autocompletion-is-too-slow/64038
2023-09-20 10:10:32 +02:00
Jan Kolarik a31687c169 Release 4.17.0 2023-09-01 10:02:51 +02:00
Jan Kolarik 293eca539f Bump rpm version to 4.18.0
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.
2023-08-31 11:44:04 +02:00
Jaroslav Rohel 8806b2ee99 crypto: Use libdnf crypto API instead of using GnuPG/GpgME
- It is compatible with the new librepo. The new librepo may use
  a different backend than GpgME internally.

- Removes dependency on GnuPG/gpgme.
2023-08-31 08:55:43 +02:00
Nicola Sella 0f15b2d04e Revert "Unprotect dnf and yum, protect python3-dnf"
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
2023-08-30 16:58:25 +00:00
Jan Kolarik 30537a4adf Fix bcond typo in spec 2023-08-16 15:08:52 +02:00
Nicola Sella 45332fd2ee Invert dnf5 obsolete logic and make macro more explicit 2023-08-16 15:02:20 +02:00
Nicola Sella 48c3dd51e6 Configure copr repo dnf5-testing 2023-08-15 14:40:42 +02:00
Jaroslav Mracek 8e7ae4fcdf Synchronize spec with DNF5
It is required for proper movement of dnf.conf file and ownership
of directories from dnf to DNF5.
2023-08-04 11:41:58 +02:00
Nicola Sella cb1b361563 Release 4.16.2 2023-07-27 13:04:24 +02:00
Evan Goode 9e8ec4848a python3-dnf: Provide /usr/bin/dnf4 symlink to /usr/bin/dnf-3 2023-07-18 07:27:55 +02:00
Evan Goode 3e434c82eb dnf-data: depend on /etc/dnf/dnf.conf, not libdnf5
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.
2023-06-02 19:18:42 +02:00
Jan Kolarik 94b7cc7956 Release 4.16.1 2023-05-29 14:25:58 +02:00
Jaroslav Mracek 4548e6a443 DNF5 should not deprecate DNF on Fedora38
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.
2023-05-26 16:31:59 +02:00
Jan Kolarik 74491afd61 Release 4.16.0 2023-05-25 16:39:05 +02:00