Added patch for almalinux bugtracker
This commit is contained in:
commit
3e8003b26f
@ -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
|
||||||
|
|
@ -0,0 +1,39 @@
|
|||||||
|
From 46aeabda1980621ca0f87528e0a81b4f59d886f0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jan Kolarik <jkolarik@redhat.com>
|
||||||
|
Date: Thu, 20 Apr 2023 10:10:14 +0000
|
||||||
|
Subject: [PATCH] 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
|
||||||
|
---
|
||||||
|
dnf/automatic/main.py | 7 +++++++
|
||||||
|
1 file changed, 7 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/dnf/automatic/main.py b/dnf/automatic/main.py
|
||||||
|
index 93ce13cc..ccd9ab64 100644
|
||||||
|
--- a/dnf/automatic/main.py
|
||||||
|
+++ b/dnf/automatic/main.py
|
||||||
|
@@ -346,6 +346,13 @@ def main(args):
|
||||||
|
|
||||||
|
gpgsigcheck(base, trans.install_set)
|
||||||
|
base.do_transaction()
|
||||||
|
+
|
||||||
|
+ # In case of no global error occurred within the transaction,
|
||||||
|
+ # we need to check state of individual transaction items.
|
||||||
|
+ for tsi in trans:
|
||||||
|
+ if tsi.state == libdnf.transaction.TransactionItemState_ERROR:
|
||||||
|
+ raise dnf.exceptions.Error(_('Transaction failed'))
|
||||||
|
+
|
||||||
|
emitters.notify_applied()
|
||||||
|
emitters.commit()
|
||||||
|
except dnf.exceptions.Error as exc:
|
||||||
|
--
|
||||||
|
2.40.1
|
||||||
|
|
@ -0,0 +1,63 @@
|
|||||||
|
From a74209ff53c9a51293b45434196dff49002c5691 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Evan Goode <mail@evangoo.de>
|
||||||
|
Date: Tue, 30 May 2023 20:48:54 +0000
|
||||||
|
Subject: [PATCH] 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
|
||||||
|
---
|
||||||
|
doc/command_ref.rst | 18 ++++++++++++++++++
|
||||||
|
1 file changed, 18 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/doc/command_ref.rst b/doc/command_ref.rst
|
||||||
|
index 7279b3a4..f8149e86 100644
|
||||||
|
--- a/doc/command_ref.rst
|
||||||
|
+++ b/doc/command_ref.rst
|
||||||
|
@@ -701,6 +701,24 @@ transactions and act according to this information (assuming the
|
||||||
|
which specifies a transaction by a package which it manipulated. When no
|
||||||
|
transaction is specified, list all known transactions.
|
||||||
|
|
||||||
|
+ The "Action(s)" column lists each type of action taken in the transaction. The possible values are:
|
||||||
|
+
|
||||||
|
+ * Install (I): a new package was installed on the system
|
||||||
|
+ * Downgrade (D): an older version of a package replaced the previously-installed version
|
||||||
|
+ * Obsolete (O): an obsolete package was replaced by a new package
|
||||||
|
+ * Upgrade (U): a newer version of the package replaced the previously-installed version
|
||||||
|
+ * Remove (E): a package was removed from the system
|
||||||
|
+ * Reinstall (R): a package was reinstalled with the same version
|
||||||
|
+ * Reason change (C): a package was kept in the system but its reason for being installed changed
|
||||||
|
+
|
||||||
|
+ The "Altered" column lists the number of actions taken in each transaction, possibly followed by one or two the following symbols:
|
||||||
|
+
|
||||||
|
+ * ``>``: The RPM database was changed, outside DNF, after the transaction
|
||||||
|
+ * ``<``: The RPM database was changed, outside DNF, before the transaction
|
||||||
|
+ * ``*``: The transaction aborted before completion
|
||||||
|
+ * ``#``: The transaction completed, but with a non-zero status
|
||||||
|
+ * ``E``: The transaction completed successfully, but had warning/error output
|
||||||
|
+
|
||||||
|
``--reverse``
|
||||||
|
The order of ``history list`` output is printed in reverse order.
|
||||||
|
|
||||||
|
--
|
||||||
|
2.40.1
|
||||||
|
|
@ -0,0 +1,85 @@
|
|||||||
|
From 29f4df4bf7bf7cb9099dbc7c834441ce4e75b623 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Miro Hrončok <miro@hroncok.cz>
|
||||||
|
Date: Wed, 23 Feb 2022 13:25:12 +0100
|
||||||
|
Subject: [PATCH] RHEL-1245: Remove /usr/bin from sys.path to avoid accidentally importing garbage
|
||||||
|
|
||||||
|
See https://bugzilla.redhat.com/show_bug.cgi?id=2057340
|
||||||
|
and https://github.com/benjaminp/six/issues/359
|
||||||
|
|
||||||
|
dnf should never import Python modules from /usr/bin but users can
|
||||||
|
have files in there that look like Python modules and Python will
|
||||||
|
try to import them and fail.
|
||||||
|
|
||||||
|
Consider a tool that is *not* written in Python and is called "copy.pyc".
|
||||||
|
Naturally, it resides in /usr/bin/copy.pyc and dnf fails:
|
||||||
|
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/usr/bin/dnf", line 57, in <module>
|
||||||
|
from dnf.cli import main
|
||||||
|
File "/usr/lib/python3.10/site-packages/dnf/__init__.py", line 30, in <module>
|
||||||
|
import dnf.base
|
||||||
|
File "/usr/lib/python3.10/site-packages/dnf/base.py", line 31, in <module>
|
||||||
|
from copy import deepcopy
|
||||||
|
ImportError: bad magic number in 'copy': b'...'
|
||||||
|
|
||||||
|
Similarly, a tool actually written in Python, called "copy.py"
|
||||||
|
might as well own /usr/bin/copy.py and dnf fails as well:
|
||||||
|
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/usr/bin/dnf", line 57, in <module>
|
||||||
|
from dnf.cli import main
|
||||||
|
File "/usr/lib/python3.10/site-packages/dnf/__init__.py", line 30, in <module>
|
||||||
|
import dnf.base
|
||||||
|
File "/usr/lib/python3.10/site-packages/dnf/base.py", line 31, in <module>
|
||||||
|
from copy import deepcopy
|
||||||
|
ImportError: cannot import name 'deepcopy' from 'copy' (/usr/bin/copy.py)
|
||||||
|
|
||||||
|
Either problem can happen for a variety of names.
|
||||||
|
We better not let that happen.
|
||||||
|
|
||||||
|
A more general solution that would prevent Python doing this entirely
|
||||||
|
does not exists yet, see https://discuss.python.org/t/4235
|
||||||
|
|
||||||
|
Hence, proposing this to dnf, which is a critical piece of the system.
|
||||||
|
---
|
||||||
|
bin/dnf-automatic.in | 6 +++++-
|
||||||
|
bin/dnf.in | 6 +++++-
|
||||||
|
2 files changed, 10 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/bin/dnf-automatic.in b/bin/dnf-automatic.in
|
||||||
|
index 5b06aa2..17e35a0 100755
|
||||||
|
--- a/bin/dnf-automatic.in
|
||||||
|
+++ b/bin/dnf-automatic.in
|
||||||
|
@@ -23,7 +23,11 @@ import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
here = sys.path[0]
|
||||||
|
-if here != '/usr/bin':
|
||||||
|
+if here == '/usr/bin':
|
||||||
|
+ # we never import Python modules from /usr/bin
|
||||||
|
+ # removing this lowers the risk of accidental imports of weird files
|
||||||
|
+ del sys.path[0]
|
||||||
|
+else:
|
||||||
|
# git checkout
|
||||||
|
dnf_toplevel = os.path.dirname(here)
|
||||||
|
sys.path[0] = dnf_toplevel
|
||||||
|
diff --git a/bin/dnf.in b/bin/dnf.in
|
||||||
|
index 645d0f0..55ceb3f 100755
|
||||||
|
--- a/bin/dnf.in
|
||||||
|
+++ b/bin/dnf.in
|
||||||
|
@@ -48,7 +48,11 @@ if __name__ != "__main__":
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
here = sys.path[0]
|
||||||
|
-if here != '/usr/bin':
|
||||||
|
+if here == '/usr/bin':
|
||||||
|
+ # we never import Python modules from /usr/bin
|
||||||
|
+ # removing this lowers the risk of accidental imports of weird files
|
||||||
|
+ del sys.path[0]
|
||||||
|
+else:
|
||||||
|
# git checkout
|
||||||
|
import os
|
||||||
|
dnf_toplevel = os.path.dirname(here)
|
||||||
|
--
|
||||||
|
libgit2 1.6.4
|
||||||
|
|
1218
SOURCES/0046-RHEL-6393-Fix-japanese-translations.patch
Normal file
1218
SOURCES/0046-RHEL-6393-Fix-japanese-translations.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,53 @@
|
|||||||
|
From 8bc3b7a217de41c0a9bc52cd9cac50cde9e9ee65 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Anish Bhatt <anish.bhatt@salesforce.com>
|
||||||
|
Date: Mon, 10 Jul 2023 10:09:17 -0700
|
||||||
|
Subject: [PATCH] When parsing over a KVP list, do not return till the whole
|
||||||
|
list is parsed
|
||||||
|
|
||||||
|
---
|
||||||
|
dnf/repodict.py | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/dnf/repodict.py b/dnf/repodict.py
|
||||||
|
index ffa0f8ed..82c05ac0 100644
|
||||||
|
--- a/dnf/repodict.py
|
||||||
|
+++ b/dnf/repodict.py
|
||||||
|
@@ -79,8 +79,8 @@ class RepoDict(dict):
|
||||||
|
if isinstance(value, str):
|
||||||
|
substituted.append(
|
||||||
|
libdnf.conf.ConfigParser.substitute(value, conf.substitutions))
|
||||||
|
- if substituted:
|
||||||
|
- return substituted
|
||||||
|
+ if substituted:
|
||||||
|
+ return substituted
|
||||||
|
return values
|
||||||
|
|
||||||
|
repo = dnf.repo.Repo(repoid, conf)
|
||||||
|
--
|
||||||
|
2.41.0
|
||||||
|
|
||||||
|
|
||||||
|
From 89c6f3633f55acd31d44a487ce76dd89c12d795c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Anish Bhatt <anish.bhatt@salesforce.com>
|
||||||
|
Date: Mon, 10 Jul 2023 10:10:30 -0700
|
||||||
|
Subject: [PATCH] Add to authors
|
||||||
|
|
||||||
|
---
|
||||||
|
AUTHORS | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/AUTHORS b/AUTHORS
|
||||||
|
index 0077c7ea..eb1e0121 100644
|
||||||
|
--- a/AUTHORS
|
||||||
|
+++ b/AUTHORS
|
||||||
|
@@ -63,6 +63,7 @@ DNF CONTRIBUTORS
|
||||||
|
Adam Williamson <awilliam@redhat.com>
|
||||||
|
Albert Uchytil <auchytil@redhat.com>
|
||||||
|
Alberto Ruiz <aruiz@redhat.com>
|
||||||
|
+ Anish Bhatt <anish.bhatt@salesforce.com>
|
||||||
|
Baurzhan Muftakhidinov <baurthefirst@gmail.com>
|
||||||
|
Christopher Meng <cickumqt@gmail.com>
|
||||||
|
Daniel Mach <dmach@redhat.com>
|
||||||
|
--
|
||||||
|
2.41.0
|
||||||
|
|
36
SOURCES/0048-smtplib-catch-OSError-not-SMTPException.patch
Normal file
36
SOURCES/0048-smtplib-catch-OSError-not-SMTPException.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
From a1feaf8c26433325dd939a4bb0c47b50b44cfe2d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Evan Goode <mail@evangoo.de>
|
||||||
|
Date: Mon, 13 Mar 2023 14:50:41 -0400
|
||||||
|
Subject: [PATCH 48/49] smtplib: catch OSError, not SMTPException
|
||||||
|
|
||||||
|
Upstream commit: aab7defca4fd827ede02336e5a0cf95e8691fb74
|
||||||
|
|
||||||
|
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
|
||||||
|
Resolves: https://issues.redhat.com/browse/RHEL-46030
|
||||||
|
---
|
||||||
|
dnf/automatic/emitter.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/dnf/automatic/emitter.py b/dnf/automatic/emitter.py
|
||||||
|
index 4aea4b02..648f1a1d 100644
|
||||||
|
--- a/dnf/automatic/emitter.py
|
||||||
|
+++ b/dnf/automatic/emitter.py
|
||||||
|
@@ -106,7 +106,7 @@ class EmailEmitter(Emitter):
|
||||||
|
smtp = smtplib.SMTP(self._conf.email_host, timeout=300)
|
||||||
|
smtp.sendmail(email_from, email_to, message.as_string())
|
||||||
|
smtp.close()
|
||||||
|
- except smtplib.SMTPException as exc:
|
||||||
|
+ except OSError as exc:
|
||||||
|
msg = _("Failed to send an email via '%s': %s") % (
|
||||||
|
self._conf.email_host, exc)
|
||||||
|
logger.error(msg)
|
||||||
|
--
|
||||||
|
2.48.1
|
||||||
|
|
@ -0,0 +1,87 @@
|
|||||||
|
From 201675a56b89d6f3543ce5d734deebe6c4d9049f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Marek Blaha <mblaha@redhat.com>
|
||||||
|
Date: Thu, 17 Oct 2024 13:30:21 +0200
|
||||||
|
Subject: [PATCH 49/49] automatic: Check availability of config file
|
||||||
|
|
||||||
|
If a configuration file is explicitly specified on the command line,
|
||||||
|
ensure that it exists and is readable. If the file is not found, notify
|
||||||
|
the user immediately and terminate the process.
|
||||||
|
|
||||||
|
This resolves issues where users may run dnf-automatic with unrecognized
|
||||||
|
positional arguments, such as `dnf-automatic install`.
|
||||||
|
|
||||||
|
The most natural approach to handle a non-existing config file would be
|
||||||
|
by catching the exception thrown by the `read()` method of the
|
||||||
|
`libdnf.conf.ConfigParser` class. Unfortunately, the Python bindings
|
||||||
|
override the `read()` method at the SWIG level, causing it to suppress any
|
||||||
|
potentially raised IOError.
|
||||||
|
For details see this section of the commit
|
||||||
|
https://github.com/rpm-software-management/libdnf/commit/8f1fedf8551b72d6bc24018f5980714b3a103aeb
|
||||||
|
|
||||||
|
def ConfigParser__newRead(self, filenames):
|
||||||
|
parsedFNames = []
|
||||||
|
try:
|
||||||
|
if isinstance(filenames, str) or isinstance(filenames, unicode):
|
||||||
|
filenames = [filenames]
|
||||||
|
except NameError:
|
||||||
|
pass
|
||||||
|
for fname in filenames:
|
||||||
|
try:
|
||||||
|
self.readFileName(fname)
|
||||||
|
parsedFNames.append(fname)
|
||||||
|
except IOError:
|
||||||
|
pass
|
||||||
|
except Exception as e:
|
||||||
|
raise RuntimeError("Parsing file '%s' failed: %s" % (fname, str(e)))
|
||||||
|
return parsedFNames
|
||||||
|
ConfigParser.read = ConfigParser__newRead
|
||||||
|
|
||||||
|
Resolves: https://issues.redhat.com/browse/RHEL-46030
|
||||||
|
---
|
||||||
|
dnf/automatic/main.py | 16 ++++++++++++++--
|
||||||
|
1 file changed, 14 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/dnf/automatic/main.py b/dnf/automatic/main.py
|
||||||
|
index ccd9ab64..3d73ffce 100644
|
||||||
|
--- a/dnf/automatic/main.py
|
||||||
|
+++ b/dnf/automatic/main.py
|
||||||
|
@@ -73,7 +73,7 @@ def build_emitters(conf):
|
||||||
|
|
||||||
|
def parse_arguments(args):
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
- parser.add_argument('conf_path', nargs='?', default=dnf.const.CONF_AUTOMATIC_FILENAME)
|
||||||
|
+ parser.add_argument('conf_path', nargs='?')
|
||||||
|
parser.add_argument('--timer', action='store_true')
|
||||||
|
parser.add_argument('--installupdates', dest='installupdates', action='store_true')
|
||||||
|
parser.add_argument('--downloadupdates', dest='downloadupdates', action='store_true')
|
||||||
|
@@ -88,7 +88,17 @@ def parse_arguments(args):
|
||||||
|
class AutomaticConfig(object):
|
||||||
|
def __init__(self, filename=None, downloadupdates=None,
|
||||||
|
installupdates=None):
|
||||||
|
- if not filename:
|
||||||
|
+ if filename:
|
||||||
|
+ # Specific config file was explicitely requested. Check that it exists
|
||||||
|
+ # and is readable.
|
||||||
|
+ if os.access(filename, os.F_OK):
|
||||||
|
+ if not os.access(filename, os.R_OK):
|
||||||
|
+ raise dnf.exceptions.Error(
|
||||||
|
+ "Configuration file \"{}\" is not readable.".format(filename))
|
||||||
|
+ else:
|
||||||
|
+ raise dnf.exceptions.Error(
|
||||||
|
+ "Configuration file \"{}\" not found.".format(filename))
|
||||||
|
+ else:
|
||||||
|
filename = dnf.const.CONF_AUTOMATIC_FILENAME
|
||||||
|
self.commands = CommandsConfig()
|
||||||
|
self.email = EmailConfig()
|
||||||
|
@@ -295,6 +305,8 @@ def wait_for_network(repos, timeout):
|
||||||
|
|
||||||
|
def main(args):
|
||||||
|
(opts, parser) = parse_arguments(args)
|
||||||
|
+ conf = None
|
||||||
|
+ emitters = None
|
||||||
|
|
||||||
|
try:
|
||||||
|
conf = AutomaticConfig(opts.conf_path, opts.downloadupdates,
|
||||||
|
--
|
||||||
|
2.48.1
|
||||||
|
|
25
SOURCES/0050-Fix-missing-import-in-automatic.patch
Normal file
25
SOURCES/0050-Fix-missing-import-in-automatic.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From 75c59dcb38d5672ffcfea9bb4cc999ab30294fe9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Marek Blaha <mblaha@redhat.com>
|
||||||
|
Date: Wed, 29 Jan 2025 13:29:34 +0100
|
||||||
|
Subject: [PATCH] Fix missing import in automatic
|
||||||
|
|
||||||
|
Fixes omitted `import os` in previous commit.
|
||||||
|
---
|
||||||
|
dnf/automatic/main.py | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/dnf/automatic/main.py b/dnf/automatic/main.py
|
||||||
|
index 3d73ffce..9d680e9e 100644
|
||||||
|
--- a/dnf/automatic/main.py
|
||||||
|
+++ b/dnf/automatic/main.py
|
||||||
|
@@ -24,6 +24,7 @@ from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import logging
|
||||||
|
+import os
|
||||||
|
import random
|
||||||
|
import socket
|
||||||
|
import time
|
||||||
|
--
|
||||||
|
2.48.1
|
||||||
|
|
@ -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}.alma
|
Release: 21%{?dist}.alma.1
|
||||||
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,13 +116,21 @@ 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
|
||||||
|
Patch0043: 0043-automatic-Return-an-error-when-transaction-fails-RhB.patch
|
||||||
|
Patch0044: 0044-Document-symbols-in-dnf-history-list-output.patch
|
||||||
|
Patch0045: 0045-RHEL-1245-Remove-usrbin-from-syspath-noimpor-garbage.patch
|
||||||
|
Patch0046: 0046-RHEL-6393-Fix-japanese-translations.patch
|
||||||
|
Patch0047: 0047-RHEL-11786-Fix-substitution-in-kvp-in-add_new_repo.patch
|
||||||
|
Patch0048: 0048-smtplib-catch-OSError-not-SMTPException.patch
|
||||||
|
Patch0049: 0049-automatic-Check-availability-of-config-file.patch
|
||||||
|
Patch0050: 0050-Fix-missing-import-in-automatic.patch
|
||||||
|
|
||||||
|
# AlmaLinux Patch
|
||||||
|
Patch10000: almalinux_bugtracker.patch
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Almalinux patches
|
|
||||||
Patch10000: almalinux_bugtracker.patch
|
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: gettext
|
BuildRequires: gettext
|
||||||
@ -421,11 +429,31 @@ popd
|
|||||||
%{python3_sitelib}/%{name}/automatic/
|
%{python3_sitelib}/%{name}/automatic/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue May 16 2023 Eduard Abdullin <eabdullin@almalinux.org> - 4.7.0-16.alma
|
* Tue Mar 11 2025 Eduard Abdullin <eabdullin@almalinux.org> - 4.7.0-21.alma.1
|
||||||
- Added patch for almalinux bugtracker
|
- Added patch for almalinux bugtracker
|
||||||
|
|
||||||
|
* Wed Jan 29 2025 Marek Blaha <mblaha@redhat.com> - 4.7.0-21
|
||||||
|
- automatic: catch OSError, not SMTPException on smtp errors (RHEL-71545)
|
||||||
|
- automatic: Check availability of config file (RHEL-71545)
|
||||||
|
|
||||||
|
* Mon Oct 16 2023 Jaroslav Rohel <jrohel@redhat.com> - 4.7.0-20
|
||||||
|
- Remove /usr/bin from sys.path to avoid accidentally importing garbage (RHEL-1245)
|
||||||
|
- Fix japanese translations (RHEL-6393)
|
||||||
|
- Fix substitution in kay-value-pair list in add_new_repo (RHEL-11786)
|
||||||
|
|
||||||
|
* Wed Jun 28 2023 Jaroslav Rohel <jrohel@redhat.com> - 4.7.0-19
|
||||||
|
- Document symbols in `dnf history list` output (RhBug:2172067)
|
||||||
|
|
||||||
|
* Wed May 31 2023 Nicola Sella <nsella@redhat.com> - 4.7.0-18
|
||||||
|
- Return an error when transaction fails (RhBug:2170093)
|
||||||
|
|
||||||
|
* 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
|
||||||
|
|
||||||
* Thu Jan 05 2023 Nicola Sella <nsella@redhat.com> - 4.7.0-15
|
* Thu Jan 05 2023 Nicola Sella <nsella@redhat.com> - 4.7.0-15
|
||||||
- Ignore processing variable files with unsupported encoding (RhBug:2141215)
|
- Ignore processing variable files with unsupported encoding (RhBug:2141215)
|
||||||
- Better explain traceback of rpm.error with dnf
|
- Better explain traceback of rpm.error with dnf
|
||||||
|
Loading…
Reference in New Issue
Block a user