Commit Graph

9708 Commits

Author SHA1 Message Date
Evan Goode 6d978062a1 Remove ownership of dnf.conf, protected.d, vars 2023-05-25 15:50:25 +02:00
Jan Kolarik 1ef42f78b5 Release 4.15.1 2023-05-18 10:27:51 +02:00
Evan Goode 352b174a0b Unprotect dnf and yum, protect python3-dnf 2023-05-18 10:14:39 +02:00
Jan Kolarik 9e4f0eb158 automatic: Return an error when transaction fails (RhBug:2170093)
In case of no global error occurred within the transaction, we still need to check state of individual transaction items for any failure.

This is matching the logic in `BaseCli.do_transaction` method, where the error is emitted after printing the transaction summary.

= changelog =
msg: automatic: Return an error when transaction fails
type: bugfix
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2170093
2023-05-17 12:25:37 +02:00
Marek Blaha a798d23e33 automatic: Fix online detection with proxy (RhBz:2022440)
In case the proxy is configured (either for a repo of globally) it is
used also for detecting whether the system is online.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2022440
2023-04-20 07:49:57 +02:00
Jonathan Lebon de9c5c5b59 repoquery: Allow uppercased query tags
Before v4.15.0, query tags could be specified as both uppercased or
lowercased. As part of commit e50488b6 ("repoquery: Properly sanitize
queryformat strings"), this was (I believe) unintentionally changed to
only support the lowercase variant.

Although the documented supported tags are lowercase (as printed by
`dnf repoquery --querytags`), it's clear that the intention here is to
mirror rpm's query tags APIs. Confusingly, the canonical tag names for
the latter are uppercased (as printed by `rpm --querytags`), though the
lowercase variants are still supported.

Let's restore support for uppercased query tags to match rpm more
closely and unbreak anyone who assumed this was officially supported.
2023-04-17 06:53:11 +02:00
Jan Kolarik 5306910d06 Release 4.15.0 2023-04-06 09:22:42 +02:00
Rafal Luzynski 1daf3467e6 Mark strftime format specifiers for translation
Sometimes translators should be able to choose the correct date and time
format for their language.
2023-03-31 14:41:32 +02:00
zengwei2000 e00219c27f Update dnf.spec
Fix word error
2023-03-31 12:39:31 +02:00
zengwei2000 57402dbabb Update dnf.spec
Fix word error
2023-03-31 12:39:02 +02:00
z00511001 082c815e1e add test for dnf mark 2023-03-28 07:40:44 +02:00
Anatoli Babenia e386cd384d cli: Allow `=` in `setopt` values 2023-03-27 14:31:18 +00:00
zengwei2000 110c40194f Update dnf.spec
Fix word error
2023-03-20 14:59:25 +01:00
zengwei2000 421ad56ca7 Update dnf.spec
Fix words error
2023-03-20 08:42:46 +01:00
Evan Goode aab7defca4 smtplib: catch OSError, not SMTPException
Some, but not all, types of connection error are caught by smtplib and
reraised as an smtplib.SMTPException. Notably, TimeoutError,
socket.gaierror (name resolution failure), and ConnectionRefusedError
and are not caught.

The more generic OSError should be caught here instead.

Resolves #1905
2023-03-14 08:08:58 +01:00
Masatake YAMATO 53deb90a2c [doc] fix the capitalization
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2023-03-09 08:23:11 +01:00
chenhaixing123 b7e1358a57 fix AttributeError when IO busy and press ctrl c 2023-02-27 12:00:39 +01:00
zengwei2000 e627a6e190 Update list_obsoletes_plugin.py
fix typo
2023-02-20 08:17:12 +01:00
Petr Písař 276ade3823 Improve "dnf module provides" help text
"dnf module --help" documented "dnf module provides" as "list modular
packages". That was missing an idea that the command searches module
builds for a modular package.

<https://github.com/rpm-software-management/dnf/issues/1886>
2023-02-01 15:23:09 +01:00
ctodea 07dac5393d Change doublequotes to backquotes
--all gets displayed at –all otherwise
2023-01-30 08:37:57 +01:00
Evan Goode e839417dc3 DNF Automatic: error message for failed reboot command 2023-01-26 15:33:20 +01:00
Evan Goode 7a623b9d42 DNF Automatic reboot: 5-minute delay and wall by default 2023-01-26 15:33:20 +01:00
Evan Goode a435559e12 Add Evan Goode to AUTHORS 2023-01-26 15:33:20 +01:00
Evan Goode 908991f2bf Add reboot option to DNF Automatic (RhBug:2124793)
Add ability in DNF Automatic to automatically trigger a reboot after an
upgrade. The `reboot` option supports three settings: ``never`` does not
reboot the system (current behavior). ``when-changed`` triggers a reboot
after any upgrade. ``when-needed`` triggers a reboot only when rebooting
is necessary to apply changes, such as when systemd or the kernel is
upgraded. The `reboot_command` option allows customizing the command
used to reboot (default is `shutdown -r`).

= changelog =
msg: Add `reboot` option to DNF Automatic
type: enhancement
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2124793
2023-01-26 15:33:20 +01:00
Itotutona 92fd054c47 fix: remove myself from translators 2023-01-23 08:10:49 +01:00
Aleš Matěj c7e3a7b687 Run dnf4 CI againts dnf-4-stack branch
Since we have a separate branch for dnf4 in `ci-dnf-stack` use it to run integration tests.
2023-01-19 16:27:20 +01:00
lilinjie 64eb9e64da fix typo
Signed-off-by: lilinjie <lilinjie@uniontech.com>
2023-01-16 08:15:19 +01:00
Kyle Walker a3ececb7dd Omit src RPMs from check-update (RhBug: 2151910)
The current check-update operation relies on src RPMs not being included
in the available repos. When those repos are enabled, *.src RPMs can be
emitted as updates that are available. Those RPMs are not updated in the
traditional fashion and can cause confusion to end users.

This change unconditionally filters out src packages in the
_list_patterns() callpath.

= changelog =
type: bugfix
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2151910
2023-01-03 19:41:27 +01:00
Maxwell G 48246af164 repoquery: Add more attrs to ALLOWED_QUERY_TAGS 2023-01-03 12:46:59 +01:00
Miroslav Suchý 420a6b8c42 correct license tag according to PACKAGE-LICENSING 2022-11-30 10:11:51 +01:00
Miroslav Suchý 8ed251d988 use SPDX format for license
https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_1
2022-11-30 10:11:51 +01:00
Jan Kolarik e2fbdc660f Ignore processing variable files with unsupported encoding (RhBug:2141215)
This issue could be seen for example when there are some temporary files stored by text editors in the `/etc/dnf/vars` folder. These files could be in the binary format and causes `UnicodeDecodeError` exception to be thrown during processing of the var files.

= changelog =
type: bugfix
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2141215
2022-11-28 07:39:29 +01:00
Maxwell G 855af7c284 repoquery: Remove duplicate QUERY_TAGS definition 2022-11-22 08:32:53 +01:00
Maxwell G 654e38523c Improve repoquery --qf unit tests
- Use PackageWrapper() with rpm2py_format like the actual code does
- Add better testing for illegal/nonexistent attributes.
2022-11-22 08:32:53 +01:00
Maxwell G e50488b6b6 repoquery: Properly sanitize queryformat strings
Previously, dnf repoquery --qf allowed looking up arbitrary attributes
of the dnf.package.Package objects in the query and e.g. the current
Base via the .base attribute. This checks that %{FOO} is a valid query
string as per `dnf repoquery --querytags`. If it isn't, rpm2py_format
will leave a literal "%{FOO}".

Before:

``` console
$ dnf repoquery dnf --qf='%{base}' --latest=1 --arch=noarch -q
<dnf.cli.cli.BaseCli object at ...>
```

After:

``` console
$ dnf repoquery dnf --qf='%{base}' --latest=1 --arch=noarch -q
%{base}
```

= changelog =
msg: repoquery: Properly sanitize queryformat strings
type: bugfix
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2140884
2022-11-22 08:32:53 +01:00
Jan Kolarik 45a06f9fe6 Document changes to offline-upgrade command (RhBug:1939975)
A support for security filters was added to the offline-upgrade command. This commit adds the documentation into the man pages.

= changelog =
type: bugfix
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1939975
2022-11-02 14:45:57 +01:00
Jan Kolarik 969781d8e9 Revert "Block signals during RPM transaction processing (RhBug:2127943)"
The fix has unintended consequences.

The solution is not that simple, proper fix is postponed for now.

This reverts commit db833ff40e.
2022-10-19 13:53:30 +02:00
Jan Kolarik db833ff40e Block signals during RPM transaction processing (RhBug:2127943)
= changelog =
type: bugfix
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2127943
2022-10-10 09:52:35 +02:00
Jan Kolarik 61ca72bbec Allow passing CLI options when loading remote cfg (RhBug:2060127)
= changelog =
type: bugfix
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2060127
2022-10-03 08:56:37 +02:00
Jan Kolarik ef3b6c9c4f Move system-upgrade plugin to core (RhBug:2054235)
Just doc fix.

= changelog =
type: bugfix
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2054235
2022-09-30 16:06:59 +02:00
Jan Kolarik e027e02efe Add support for rollback of group upgrade rollback (RhBug:2016070)
= changelog =
type: bugfix
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2016070
2022-09-21 09:25:37 +02:00
Jan Kolarik 9ee057a4cc Fix plugins unit tests + unload plugins upon their deletion 2022-09-21 09:25:29 +02:00
Lukáš Hrázký d7bfd19412 Pass whole URL in relativeUrl to PackageTarget for RPM URL download
The PackageTarget supports baseUrl and relativeUrl on the API, but then
the relativeUrl is just a path fragment with no definition on whether it
should be encoded. It's being passed unencoded paths from other places,
and so there's a conditional encode (only if not full URL) in libdnf.

But full URLs are actually supported in relativeUrl (in that case
baseUrl should be empty) and in that case the URL is expected to be
encoded and is not encoded for the second time.

Hence, pass the full URL to relativeUrl instead of splitting it. We also
need to decode the file name we store, as on the filesystem the RPM file
name is also decoded.

= changelog =
msg: Don't double-encode RPM URLs passed on CLI
type: bugfix
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2103015
2022-09-12 09:54:05 +02:00
Jaroslav Rohel e50875b3f5 Release 4.14.0 2022-09-09 13:21:13 +02:00
Jan Kolarik d9a33bffb9 Add doc related to --destdir and --downloadonly options (RhBug:2100811)
= changelog =
type: bugfix
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2100811
2022-09-07 14:49:01 +02:00
Jan Kolarik 8f08a3cd56 Fix broken dependencies error reporting (RhBug:2088422)
= changelog =
type: bugfix
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2088422
2022-09-06 13:43:14 +02:00
Jan Kolarik b623eedb30 Add support for group upgrade rollback (RhBug:2016070)
= changelog =
type: bugfix
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2016070
2022-08-30 11:13:52 +02:00
Jan Kolarik 7ef317db99 Expose plugin unload method to API (RhBug:2047251)
= changelog =
type: bugfix
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2047251
2022-08-22 11:25:39 +02:00
Marek Blaha 1770a644f5 Translations update 2022-08-19 19:57:23 +02:00
Nicola Sella 7b52f20604 Fix upgrade from file to noarch pkg (RhBug:2006018)
= changelog =
msg: Fix upgrade pkg from file when installed pkg is noarch and upgrades
to a different arch
type: bugfix
resolves: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2006018
2022-08-15 08:56:46 +02:00