import dnf-plugins-core-4.0.21-17.el8

This commit is contained in:
CentOS Sources 2022-12-13 06:11:25 +00:00 committed by Stepan Oksanichenko
parent 0d78ccbe2c
commit 15d5a4d96b
3 changed files with 148 additions and 4 deletions

View File

@ -0,0 +1,78 @@
From e52655aa9c7c9ad334639990d612da574b57736b Mon Sep 17 00:00:00 2001
From: Jan Kolarik <jkolarik@redhat.com>
Date: Fri, 30 Sep 2022 11:36:26 +0000
Subject: [PATCH 1/3] Add a warning when using `system-upgrade` on RHEL
---
dnf-plugins-core.spec | 3 +--
doc/system-upgrade.rst | 6 ++++--
plugins/system_upgrade.py | 4 ++++
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/dnf-plugins-core.spec b/dnf-plugins-core.spec
index 0e1c9e3..a5ec165 100644
--- a/dnf-plugins-core.spec
+++ b/dnf-plugins-core.spec
@@ -148,14 +148,13 @@ Summary: Core Plugins for DNF
%{?python_provide:%python_provide python3-%{name}}
BuildRequires: python3-dbus
BuildRequires: python3-devel
+BuildRequires: python3-distro
BuildRequires: python3-dnf >= %{dnf_lowest_compatible}
BuildRequires: python3-systemd
BuildRequires: pkgconfig(systemd)
BuildRequires: systemd
%{?systemd_ordering}
-%if 0%{?fedora}
Requires: python3-distro
-%endif
Requires: python3-dbus
Requires: python3-dnf >= %{dnf_lowest_compatible}
Requires: python3-hawkey >= %{hawkey_version}
diff --git a/doc/system-upgrade.rst b/doc/system-upgrade.rst
index 3110460..87b7319 100644
--- a/doc/system-upgrade.rst
+++ b/doc/system-upgrade.rst
@@ -27,13 +27,15 @@ DNF system-upgrades plugin provides three commands: ``system-upgrade``, ``offlin
``offline-distrosync``. Only ``system-upgrade`` command requires increase of distribution major
version (``--releasever``) compared to installed version.
-``dnf system-upgrade`` can be used to upgrade a Fedora system to a new major
-release. It replaces fedup (the old Fedora Upgrade tool). Before you proceed ensure that your system
+``dnf system-upgrade`` is a recommended way to upgrade a system to a new major release.
+It replaces fedup (the old Fedora Upgrade tool). Before you proceed ensure that your system
is fully upgraded (``dnf --refresh upgrade``).
The ``system-upgrade`` command also performes additional actions necessary for the upgrade of the
system, for example an upgrade of groups and environments.
+.. WARNING:: The ``system-upgrade`` command is not supported on the RHEL distribution.
+
--------
Synopsis
--------
diff --git a/plugins/system_upgrade.py b/plugins/system_upgrade.py
index fee6762..0baf978 100644
--- a/plugins/system_upgrade.py
+++ b/plugins/system_upgrade.py
@@ -20,6 +20,7 @@
"""system_upgrade.py - DNF plugin to handle major-version system upgrades."""
from subprocess import call, Popen, check_output, CalledProcessError
+import distro
import json
import os
import os.path
@@ -451,6 +452,9 @@ class SystemUpgradeCommand(dnf.cli.Command):
def configure_download(self):
if 'system-upgrade' == self.opts.command or 'fedup' == self.opts.command:
+ if distro.id() == 'rhel':
+ logger.warning(_('WARNING: this operation is not supported on the RHEL distribution. '
+ 'Proceed at your own risk.'))
help_url = get_url_from_os_release()
if help_url:
msg = _('Additional information for System Upgrade: {}')
--
2.38.1

View File

@ -0,0 +1,61 @@
From 3a18b7241708a3c5fd1b4b92a2f9908a826e815d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tarc=C3=ADsio=20Ladeia=20de=20Oliveira?=
<wyrquill@gmail.com>
Date: Thu, 20 Oct 2022 22:16:59 -0300
Subject: [PATCH 1/2] [offline-upgrade] Add security filters (RhBug:1939975)
Add support for security filter options that are available in the main
`dnf` commands, that is, `--advisory`, `--bugfix`, `--security`, and
`--enhancement`.
= changelog =
msg: [offline-upgrade] Add support for security filters
type: bugfix
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1939975
---
plugins/system_upgrade.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/plugins/system_upgrade.py b/plugins/system_upgrade.py
index 0baf978..ef1de73 100644
--- a/plugins/system_upgrade.py
+++ b/plugins/system_upgrade.py
@@ -467,6 +467,9 @@ class SystemUpgradeCommand(dnf.cli.Command):
logger.error(_("Operation aborted."))
sys.exit(1)
check_release_ver(self.base.conf, target=self.opts.releasever)
+ elif 'offline-upgrade' == self.opts.command:
+ self.cli._populate_update_security_filter(self.opts)
+
self.cli.demands.root_user = True
self.cli.demands.resolving = True
self.cli.demands.available_repos = True
--
2.38.1
From dad20a478e100bd0ac3a8d7d51dad75baca90c7f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tarc=C3=ADsio=20Ladeia=20de=20Oliveira?=
<wyrquill@gmail.com>
Date: Thu, 20 Oct 2022 22:27:22 -0300
Subject: [PATCH 2/2] Add myself as contributor in AUTHORS
---
AUTHORS | 1 +
1 file changed, 1 insertion(+)
diff --git a/AUTHORS b/AUTHORS
index 33512fd..cd4b5be 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -32,6 +32,7 @@ DNF-PLUGINS-CORE CONTRIBUTORS
Neal Gompa <ngompa13@gmail.com>
Paul Howarth <paul@city-fan.org>
Rickard Dybeck <r.dybeck@gmail.com>
+ Tarcísio Ladeia de Oliveira <wyrquill@gmail.com>
Tomas Babej <tomasbabej@gmail.com>
Vladan Kudlac <vladankudlac@gmail.com>
Wieland Hoffmann <themineo@gmail.com>
--
2.38.1

View File

@ -34,7 +34,7 @@
Name: dnf-plugins-core
Version: 4.0.21
Release: 16%{?dist}
Release: 17%{?dist}
Summary: Core Plugins for DNF
License: GPLv2+
URL: https://github.com/rpm-software-management/dnf-plugins-core
@ -64,6 +64,8 @@ Patch22: 0022-copr-allow-specifying-protocol-as-part-of-hub.patch
Patch23: 0023-copr-Guess-EPEL-chroots-for-CentOS-Stream-RhBug-2058.patch
Patch24: 0024-builddep-Warning-when-using-macros-with-source-rpms-.patch
Patch25: 0025-Move-system-upgrade-plugin-to-core-RhBug-2054235.patch
Patch26: 0026-Add-a-warning-when-using-system-upgrade-on-RHEL.patch
Patch27: 0027-offline-upgrade-Add-security-filters.patch
BuildArch: noarch
@ -120,7 +122,7 @@ Conflicts: dnf-plugins-extras-common-data < %{dnf_plugins_extra}
%description
Core Plugins for DNF. This package enhances DNF with builddep, config-manager,
copr, debug, debuginfo-install, download, groups-manager, needs-restarting, repoclosure,
copr, debug, debuginfo-install, download, needs-restarting, groups-manager, repoclosure,
repograph, repomanage, reposync, changelog and repodiff commands. Additionally
provides generate_completion_cache passive plugin.
@ -175,14 +177,13 @@ Summary: Core Plugins for DNF
%{?python_provide:%python_provide python3-%{name}}
BuildRequires: python3-dbus
BuildRequires: python3-devel
BuildRequires: python3-distro
BuildRequires: python3-dnf >= %{dnf_lowest_compatible}
BuildRequires: python3-systemd
BuildRequires: pkgconfig(systemd)
BuildRequires: systemd
%{?systemd_ordering}
%if 0%{?fedora}
Requires: python3-distro
%endif
Requires: python3-dbus
Requires: python3-dnf >= %{dnf_lowest_compatible}
Requires: python3-hawkey >= %{hawkey_version}
@ -840,6 +841,10 @@ ln -sf %{_mandir}/man1/%{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/
%endif
%changelog
* Wed Nov 30 2022 Nicola Sella <nsella@redhat.com> - 4.0.21-17
- offline-upgrade: add support for security filters (RhBug:1939975,2139324)
- Move system-upgrade plugin to core (RhBug:2054235)
* Wed Oct 26 2022 Nicola Sella <nsella@redhat.com> - 4.0.21-16
- Move system-upgrade plugin to core (RhBug:2054235)