Commit Graph

9708 Commits

Author SHA1 Message Date
Jan Kolarik 6a6b575244 automatic: Fix applying the color option
The `color` option value wasn't passed in `dnf-automatic` usage so far.

In the standard `dnf` command, the `Term` object is created before parsing the entire configuration, including command-line parameters. The `Term` is reinitialized within `Cli.configure` if the `color` option value was changed. In `dnf-automatic`, where configuration is processed in a single place, we can directly pass the value from the configuration.
2023-10-25 07:50:49 +02: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
Evan Goode a68fa17f74 Document shell-like parameter expansion for variables
=changelog=
msg: Support ${parameter:-word} and ${parameter:+word} parameter expansion in variables
type: enhancement
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1789346
2023-10-16 19:39:31 +00:00
Evan Goode e1df1903b7 Document $releasever_major and $releasever_minor
=changelog=
msg: Automatically derive $releasever_major and $releasever_minor from $releasever
type: enhancement
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1789346
2023-10-16 19:39:31 +00:00
Evan Goode 2c1a38875e Split $releasever to $releasever_major and $releasever_minor
Whenever the `releasever` substitution variable is set, automatically
derive and set the `releasever_major` and `releasever_minor` vars by
splitting `releasever` on the first ".".

Companion to the DNF 5 implementation here: https://github.com/rpm-software-management/dnf5/pull/800

DNF 5 issue: https://github.com/rpm-software-management/dnf5/issues/710

For https://bugzilla.redhat.com/show_bug.cgi?id=1789346
2023-10-11 15:16:57 -04:00
Evan Goode 9e730554ea [conf] Add test for shell-like variable expansion
Requires https://github.com/rpm-software-management/libdnf/pull/1622

This is the same test case used by the DNF 5 implementation: https://github.com/rpm-software-management/dnf5/pull/800
2023-10-11 10:55:41 -04:00
Jan Kolarik c19ce847a5 distro-sync: Print better info message when no match
Print better error message when the package specified in the argument is installed but is not available in the currently enabled repositories.

Resolves: https://issues.redhat.com/browse/RHEL-7018
2023-10-11 11:44:38 +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
Jan Kolarik 64c2832144 Revert "Block signals during RPM transaction processing"
As the change is causing problems when building other packages in Koji buildroot, reverting this until the root cause is properly resolved.
2023-09-25 08:07:43 +02:00
Jan Kolarik 7ee0a82b34 comps: Fix marking a group package as installed (RhBug:2066638)
When a new group is being installed or an installed group is upgraded, do not mark the packages within the group as 'not installed' directly. Instead, check the actual package state in the database to determine if it was already installed by another group.

= changelog =
msg: comps: Fix removing packages belonging to another installed group
type: bugfix
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2066638
2023-09-25 07:59:28 +02:00
Marek Blaha a9593d266f base: Add obsoleters of only latest versions
Resolves situations where a package is in older version obsoleted, but
there is newer (not obsoleted) version available.
This patch covers installation of group packages and arch specific
packages. The rest is in hawkey library.

Relevant bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=2183279
https://bugzilla.redhat.com/show_bug.cgi?id=2176263
2023-09-22 10:27:14 +02:00
Marek Blaha 9074f44622 Update translations 2023-09-21 14:10:54 +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
Jaroslav Mracek b2acddd4f6 Does not print Verify: package (RhBug:1908253)
It was replace by RPM transaction item return code and it only prints
a message to terminal. It was not remove to keep compatibility of
outputs, but it does nothing.

https://bugzilla.redhat.com/show_bug.cgi?id=1908253
2023-09-19 14:11:04 +00:00
Jan Kolarik a31687c169 Release 4.17.0 2023-09-01 10:02:51 +02:00
Dominik Mierzejewski 3cf246e90a add myself to contributors list 2023-08-31 14:58:29 +02:00
Dominik 'Rathann' Mierzejewski 5d23b9d7ef document email_tls option in the reference file 2023-08-31 14:58:29 +02:00
Dominik 'Rathann' Mierzejewski a0acc88efc add a default option for email_tls in automatic.conf 2023-08-31 14:58:29 +02:00
Dominik 'Rathann' Mierzejewski 0a3648c167 automatic: allow use of STARTTLS/TLS
Add the ability to use STARTTLS/TLS for sending e-mail via the `email`
emitter.

The `email_tls` option supports three settings: ``starttls``, used to
switch to TLS on plaintext ports like 25 or 587 and ``yes``, used to
wrap the entire connection in TLS, usually on port 465. Any other
setting (``off`` by default) will use plain unencrypted SMTP.

Note: this depends on #1956 .

= changelog =
msg: Add `email_tls` option to DNF Automatic
type: enhancement
resolves: #1954
2023-08-31 14:58:29 +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
Jan Kolarik 233bbce851 Block signals during RPM transaction processing
Prevent signals to interrupt the processing of the RPM transaction inside the DNF.

This was originally committed in db833ff, but reverted later in 969781d as the provided API wasn't available on some systems rebasing from upstream which is not the case anymore.

Resolves https://issues.redhat.com/browse/RHEL-1235.
2023-08-31 11:44:04 +02:00
Jaroslav Rohel 60f7eae60b crypto: Print warning when deprecated features are used 2023-08-31 08:55:43 +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
Dominik 'Rathann' Mierzejewski 727012bad0 document the email_port option in the reference file 2023-08-29 12:41:56 +02:00
Dominik 'Rathann' Mierzejewski 6642e3daf2 add a default option for email_port in automatic.conf 2023-08-29 12:41:56 +02:00
Dominik 'Rathann' Mierzejewski fd27e77d14 automatic: use email_port specified in config
This allows user to override the default SMTP port.

Resolves #1955.
2023-08-29 12:41:56 +02:00
grumpey 33fde245b0 Fix bash completion due to sqlite changes
= changelog =
msg:  Fix bash completion due to sqlite changes          
type:  bugfix
resolves:  https://bugzilla.redhat.com/show_bug.cgi?id=2232052   
related:  https://sqlite.org/src/info/c995932c3ffe7f27
2023-08-21 08:52:25 -04: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
Anish Bhatt cb654bbdff Add to authors 2023-07-11 11:49:16 +02:00
Anish Bhatt 4d57212f4c When parsing over a KVP list, do not return till the whole list is parsed 2023-07-11 11:49:16 +02:00
zengwei2000 41da7f09bc Add provide exception handling 2023-07-06 17:38:14 +00:00
Evan Goode 56803b792e typo in doc/command_ref.rst 2023-07-03 08:44:21 +02:00
Aleš Matěj 96b5df9cde Update repo metadata cache pattern to include zstd
Also add missing escape before `.` for zck.
2023-06-16 08:38:17 +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
Evan Goode a2a9d5963d Document symbols in `dnf history list` output
This patch adds documentation for the symbols shown in the "Action(s)"
and "Altered" columns of `dnf history list`

The "Action(s)" column abbreviates the names of transaction actions when
there was more than one action, e.g. a transaction that both installs
and upgrades packages would be displayed as "I, U".

The "Altered" column prints some extra symbols when something unusual
happened with the transaction, like if any warnings were printed or if
it completed with a non-zero status.

Some language was taken from the yum man pages:
https://github.com/rpm-software-management/yum/blob/master/docs/yum.8.
It appears we no longer use the "P" or "s" symbols.

Resolves https://bugzilla.redhat.com/show_bug.cgi?id=2172067
(RhBug:2172067)

= changelog =
msg: Document the symbols in the output of `dnf history list`
type: bugfix
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2172067
2023-05-31 08:56:08 +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
Evan Goode 9aa063db3a dnf-automatic: require python3-dnf, not dnf 2023-05-25 15:50:25 +02:00
Evan Goode aa5a8e2adf Add requirement of libdnf5 to python3-dnf, dnf-data 2023-05-25 15:50:25 +02:00