Backport patches
Resolves: rhbz#2151910 Resolves: rhbz#2022440
This commit is contained in:
parent
549cda080c
commit
3b79d5edcb
45
0041-Omit-src-RPMs-from-check-update-RhBug-2151910.patch
Normal file
45
0041-Omit-src-RPMs-from-check-update-RhBug-2151910.patch
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
From 33c354ed52be8f8fa2d43aff8ba1fe1540e1744c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kyle Walker <kwalker@redhat.com>
|
||||||
|
Date: Tue, 20 Dec 2022 08:42:03 -0500
|
||||||
|
Subject: [PATCH] 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
|
||||||
|
---
|
||||||
|
dnf/base.py | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/dnf/base.py b/dnf/base.py
|
||||||
|
index aba411e..8c19276 100644
|
||||||
|
--- a/dnf/base.py
|
||||||
|
+++ b/dnf/base.py
|
||||||
|
@@ -1519,6 +1519,8 @@ class Base(object):
|
||||||
|
updates = query_for_repo(q).filterm(upgrades_by_priority=True)
|
||||||
|
# reduce a query to security upgrades if they are specified
|
||||||
|
updates = self._merge_update_filters(updates, upgrade=True)
|
||||||
|
+ # reduce a query to remove src RPMs
|
||||||
|
+ updates.filterm(arch__neq=['src', 'nosrc'])
|
||||||
|
# reduce a query to latest packages
|
||||||
|
updates = updates.latest().run()
|
||||||
|
|
||||||
|
@@ -1571,6 +1573,8 @@ class Base(object):
|
||||||
|
self.sack.query()).filter(obsoletes_by_priority=inst)
|
||||||
|
# reduce a query to security upgrades if they are specified
|
||||||
|
obsoletes = self._merge_update_filters(obsoletes, warning=False, upgrade=True)
|
||||||
|
+ # reduce a query to remove src RPMs
|
||||||
|
+ obsoletes.filterm(arch__neq=['src', 'nosrc'])
|
||||||
|
obsoletesTuples = []
|
||||||
|
for new in obsoletes:
|
||||||
|
obsoleted_reldeps = new.obsoletes
|
||||||
|
--
|
||||||
|
libgit2 1.3.2
|
||||||
|
|
@ -0,0 +1,56 @@
|
|||||||
|
From 2658062d4c176201d0decf03929a89b44761c072 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Marek Blaha <mblaha@redhat.com>
|
||||||
|
Date: Mon, 3 Apr 2023 12:19:40 +0200
|
||||||
|
Subject: [PATCH] Backport: 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
|
||||||
|
---
|
||||||
|
dnf/automatic/main.py | 20 ++++++++++++++------
|
||||||
|
1 file changed, 14 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/dnf/automatic/main.py b/dnf/automatic/main.py
|
||||||
|
index b53d9c0..93ce13c 100644
|
||||||
|
--- a/dnf/automatic/main.py
|
||||||
|
+++ b/dnf/automatic/main.py
|
||||||
|
@@ -251,21 +251,29 @@ def wait_for_network(repos, timeout):
|
||||||
|
'http': 80,
|
||||||
|
'https': 443,
|
||||||
|
'ftp': 21,
|
||||||
|
+ 'socks': 1080,
|
||||||
|
+ 'socks5': 1080,
|
||||||
|
}
|
||||||
|
|
||||||
|
def remote_address(url_list):
|
||||||
|
for url in url_list:
|
||||||
|
parsed_url = dnf.pycomp.urlparse.urlparse(url)
|
||||||
|
- if parsed_url.hostname and parsed_url.scheme in remote_schemes:
|
||||||
|
- yield (parsed_url.hostname,
|
||||||
|
- parsed_url.port or remote_schemes[parsed_url.scheme])
|
||||||
|
+ if (not parsed_url.hostname) \
|
||||||
|
+ or (not parsed_url.port and parsed_url.scheme not in remote_schemes):
|
||||||
|
+ # skip urls without hostname or without recognized port
|
||||||
|
+ continue
|
||||||
|
+ yield (parsed_url.hostname,
|
||||||
|
+ parsed_url.port or remote_schemes[parsed_url.scheme])
|
||||||
|
|
||||||
|
# collect possible remote repositories urls
|
||||||
|
addresses = set()
|
||||||
|
for repo in repos.iter_enabled():
|
||||||
|
- addresses.update(remote_address(repo.baseurl))
|
||||||
|
- addresses.update(remote_address([repo.mirrorlist]))
|
||||||
|
- addresses.update(remote_address([repo.metalink]))
|
||||||
|
+ if repo.proxy:
|
||||||
|
+ addresses.update(remote_address([repo.proxy]))
|
||||||
|
+ else:
|
||||||
|
+ addresses.update(remote_address(repo.baseurl))
|
||||||
|
+ addresses.update(remote_address([repo.mirrorlist]))
|
||||||
|
+ addresses.update(remote_address([repo.metalink]))
|
||||||
|
|
||||||
|
if not addresses:
|
||||||
|
# there is no remote repository enabled so network connection should not be needed
|
||||||
|
--
|
||||||
|
libgit2 1.3.2
|
||||||
|
|
9
dnf.spec
9
dnf.spec
@ -66,7 +66,7 @@ It supports RPMs, modules and comps groups & environments.
|
|||||||
|
|
||||||
Name: dnf
|
Name: dnf
|
||||||
Version: 4.7.0
|
Version: 4.7.0
|
||||||
Release: 16%{?dist}
|
Release: 17%{?dist}
|
||||||
Summary: %{pkg_summary}
|
Summary: %{pkg_summary}
|
||||||
# For a breakdown of the licensing, see PACKAGE-LICENSING
|
# For a breakdown of the licensing, see PACKAGE-LICENSING
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
@ -116,7 +116,8 @@ Patch0037: 0037-Document-changes-to-offline-upgrade-command.patch
|
|||||||
Patch0038: 0038-Better-explain-traceback-of-rpm.error-with-dnf.patch
|
Patch0038: 0038-Better-explain-traceback-of-rpm.error-with-dnf.patch
|
||||||
Patch0039: 0039-Ignore-processing-variable-files-with-unsupported-en.patch
|
Patch0039: 0039-Ignore-processing-variable-files-with-unsupported-en.patch
|
||||||
Patch0040: 0040-Update-translations.patch
|
Patch0040: 0040-Update-translations.patch
|
||||||
|
Patch0041: 0041-Omit-src-RPMs-from-check-update-RhBug-2151910.patch
|
||||||
|
Patch0042: 0042-Backport-automatic-Fix-onl-detect-proxy-RhBz2022440.patch
|
||||||
|
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@ -417,6 +418,10 @@ popd
|
|||||||
%{python3_sitelib}/%{name}/automatic/
|
%{python3_sitelib}/%{name}/automatic/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed May 17 2023 Jaroslav Rohel <jrohel@redhat.com> - 4.7.0-17
|
||||||
|
- Omit src RPMs from check-update (RhBug:2151910,2203069)
|
||||||
|
- automatic: Fix online detection with proxy (RhBug:2022440,2189851)
|
||||||
|
|
||||||
* Wed Mar 08 2023 Marek Blaha <mblaha@redhat.com> - 4.7.0-16
|
* Wed Mar 08 2023 Marek Blaha <mblaha@redhat.com> - 4.7.0-16
|
||||||
- Update translations
|
- Update translations
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user