diff options
Diffstat (limited to 'meta/recipes-devtools/dnf/dnf')
8 files changed, 83 insertions, 37 deletions
diff --git a/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch b/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch index 6692b41a16..fd942228b9 100644 --- a/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch +++ b/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch @@ -1,11 +1,10 @@ -From 05e059cd4e9910c00b32d377f4f98e3c8dde6bc6 Mon Sep 17 00:00:00 2001 +From f70eb308c837f2c944e23bb680a501a605004d65 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Thu, 26 Jan 2017 16:36:20 +0200 -Subject: [PATCH 4/5] Corretly install tmpfiles.d configuration +Subject: [PATCH] Corretly install tmpfiles.d configuration Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - --- etc/tmpfiles.d/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) @@ -17,6 +16,3 @@ index f69c773e..3eb6d0e8 100644 @@ -1 +1 @@ -INSTALL (FILES dnf.conf DESTINATION /usr/lib/tmpfiles.d/) +INSTALL (FILES dnf.conf DESTINATION ${SYSCONFDIR}/tmpfiles.d/) --- -2.14.2 - diff --git a/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch b/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch index cb09f17a56..37359a5765 100644 --- a/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch +++ b/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch @@ -1,17 +1,16 @@ -From ffb7942cc73c3d2c6aa7c689cdaf9bc0bcbc144b Mon Sep 17 00:00:00 2001 +From 3ca6d14fbc6419ff6239b4ba16f77da20fb31d03 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Thu, 26 Jan 2017 16:25:47 +0200 Subject: [PATCH] Do not hardcode /etc and systemd unit directories Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 73552967..38cf4fbf 100644 +index 4aee99fb..9e2e9e9e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,8 +3,8 @@ CMAKE_MINIMUM_REQUIRED (VERSION 2.4) diff --git a/meta/recipes-devtools/dnf/dnf/0001-dnf-write-the-log-lock-to-root.patch b/meta/recipes-devtools/dnf/dnf/0001-dnf-write-the-log-lock-to-root.patch index 21b50dee01..18f9a30949 100644 --- a/meta/recipes-devtools/dnf/dnf/0001-dnf-write-the-log-lock-to-root.patch +++ b/meta/recipes-devtools/dnf/dnf/0001-dnf-write-the-log-lock-to-root.patch @@ -1,4 +1,4 @@ -From 5e07c16a506b19cbb107d5e99fca41d679b23b9a Mon Sep 17 00:00:00 2001 +From 049e2832284ab883e185d9020c881518a68e6c38 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Tue, 28 Apr 2020 15:55:00 +0200 Subject: [PATCH] dnf: write the log lock to root @@ -15,10 +15,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dnf/logging.py b/dnf/logging.py -index bd660470..a9d808b1 100644 +index ef0b25f3..94610af6 100644 --- a/dnf/logging.py +++ b/dnf/logging.py -@@ -94,7 +94,7 @@ class MultiprocessRotatingFileHandler(logging.handlers.RotatingFileHandler): +@@ -118,7 +118,7 @@ class MultiprocessRotatingFileHandler(logging.handlers.RotatingFileHandler): def __init__(self, filename, mode='a', maxBytes=0, backupCount=0, encoding=None, delay=False): super(MultiprocessRotatingFileHandler, self).__init__( filename, mode, maxBytes, backupCount, encoding, delay) diff --git a/meta/recipes-devtools/dnf/dnf/0001-lock.py-fix-Exception-handling.patch b/meta/recipes-devtools/dnf/dnf/0001-lock.py-fix-Exception-handling.patch new file mode 100644 index 0000000000..6bffe9af0a --- /dev/null +++ b/meta/recipes-devtools/dnf/dnf/0001-lock.py-fix-Exception-handling.patch @@ -0,0 +1,62 @@ +From 3881757eabfde2ff54400ab127b106ab085d83f0 Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Wed, 13 Mar 2024 11:22:05 +0800 +Subject: [PATCH] lock.py: fix Exception handling + +Before, when logdir is not writable, _try_lock will raise an Exception +like "Permission denied: '/var/log/log_lock.pid'", and in this case, +_unlock_thread will not be called and the variable count will not be +handled, it maybe cause log_lock.pid not be deleted in case like [1]. + +For [1], it is an cross compile case, when dnf install some packages to +rootfs, seems like some threads don't do chroot like work, some threads +do chroot like work. so for the threads don't do chroot, "Permission denied" +Exception happend, for the threads that do chroot, log_lock.pid will be +created under installroot/var/log/log_lock.pid, since variable count not +handled correct before, log_lock.pid may not be deleted correctly. + +So fixed like this, if _try_lock raise Exception, _unlock_thread first, +then raise the Exception. + +[1] https://github.com/rpm-software-management/dnf/issues/1963 + +Upstream-Status: Submitted [ https://github.com/rpm-software-management/dnf/pull/2065 ] + +Signed-off-by: Changqing Li <changqing.li@windriver.com> +--- + dnf/lock.py | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/dnf/lock.py b/dnf/lock.py +index 6817aac9..5718062a 100644 +--- a/dnf/lock.py ++++ b/dnf/lock.py +@@ -128,7 +128,11 @@ class ProcessLock(object): + self._lock_thread() + prev_pid = -1 + my_pid = os.getpid() +- pid = self._try_lock(my_pid) ++ try: ++ pid = self._try_lock(my_pid) ++ except Exception: ++ self._unlock_thread() ++ raise + while pid != my_pid: + if pid != -1: + if not self.blocking: +@@ -140,7 +144,11 @@ class ProcessLock(object): + logger.info(msg) + prev_pid = pid + time.sleep(1) +- pid = self._try_lock(my_pid) ++ try: ++ pid = self._try_lock(my_pid) ++ except Exception: ++ self._unlock_thread() ++ raise + + def __exit__(self, *exc_args): + if self.count == 1: +-- +2.25.1 + diff --git a/meta/recipes-devtools/dnf/dnf/0001-set-python-path-for-completion_helper.patch b/meta/recipes-devtools/dnf/dnf/0001-set-python-path-for-completion_helper.patch index 448f6408bc..fcd970a7ae 100644 --- a/meta/recipes-devtools/dnf/dnf/0001-set-python-path-for-completion_helper.patch +++ b/meta/recipes-devtools/dnf/dnf/0001-set-python-path-for-completion_helper.patch @@ -1,4 +1,4 @@ -From 7e79b3b67fd5cecd7380e7e365fd88eca63b5bfa Mon Sep 17 00:00:00 2001 +From fa32c7dcabaa3c00d3620a3266e49629365c0cbe Mon Sep 17 00:00:00 2001 From: Jeremy Puhlman <jpuhlman@mvista.com> Date: Wed, 11 Mar 2020 22:10:02 +0000 Subject: [PATCH] set python path for completion_helper @@ -10,7 +10,7 @@ Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dnf/cli/completion_helper.py.in b/dnf/cli/completion_helper.py.in -index 351226759..2835cd3b6 100644 +index 0da0f2a2..9330d15b 100644 --- a/dnf/cli/completion_helper.py.in +++ b/dnf/cli/completion_helper.py.in @@ -1,4 +1,4 @@ @@ -19,6 +19,3 @@ index 351226759..2835cd3b6 100644 # # This file is part of dnf. # --- -2.23.0 - diff --git a/meta/recipes-devtools/dnf/dnf/0005-Do-not-prepend-installroot-to-logdir.patch b/meta/recipes-devtools/dnf/dnf/0005-Do-not-prepend-installroot-to-logdir.patch index aa20009cef..cfbda11f77 100644 --- a/meta/recipes-devtools/dnf/dnf/0005-Do-not-prepend-installroot-to-logdir.patch +++ b/meta/recipes-devtools/dnf/dnf/0005-Do-not-prepend-installroot-to-logdir.patch @@ -1,7 +1,7 @@ -From 6365389074a1b86962f3d8b22a2ead2202026a98 Mon Sep 17 00:00:00 2001 +From c6d03b51e2098fc681e6811790bd5dc6597091eb Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Wed, 11 Jan 2017 15:10:13 +0200 -Subject: [PATCH 5/5] Do not prepend installroot to logdir. +Subject: [PATCH] Do not prepend installroot to logdir. This would otherwise write the logs into rootfs/var/log (whereas we want them in $T), @@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dnf/cli/cli.py b/dnf/cli/cli.py -index d2d9c082..82270ecf 100644 +index 1824bd00..4dcb1c1c 100644 --- a/dnf/cli/cli.py +++ b/dnf/cli/cli.py -@@ -920,7 +920,7 @@ class Cli(object): +@@ -944,7 +944,7 @@ class Cli(object): logger.warning(_("Unable to detect release version (use '--releasever' to specify " "release version)")) @@ -26,6 +26,3 @@ index d2d9c082..82270ecf 100644 conf.prepend_installroot(opt) self.base._logging._setup_from_dnf_conf(conf) --- -2.14.2 - diff --git a/meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch b/meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch index 0ed9afc58d..64ea7874d3 100644 --- a/meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch +++ b/meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch @@ -1,25 +1,24 @@ -From 6be13143a54c79085d400d5bd4c7a6e1cb6ffaf5 Mon Sep 17 00:00:00 2001 +From d5b154ea69afdcd862299a0b7f255f6ece3686c6 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Fri, 30 Dec 2016 18:29:07 +0200 Subject: [PATCH] Do not set PYTHON_INSTALL_DIR by running python Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 38cf4fbf..6c5debd8 100644 +index 9e2e9e9e..2056089d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ ELSE () MESSAGE (FATAL_ERROR "Invalid PYTHON_DESIRED value: " ${PYTHON_DESIRED}) ENDIF() --EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib())" OUTPUT_VARIABLE PYTHON_INSTALL_DIR) -+#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib())" OUTPUT_VARIABLE PYTHON_INSTALL_DIR) +-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from sysconfig import get_path; stdout.write(get_path('purelib'))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR) ++#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from sysconfig import get_path; stdout.write(get_path('purelib'))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR) MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}") ADD_SUBDIRECTORY (dnf) diff --git a/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch b/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch index eedbb5723f..eb46113f3a 100644 --- a/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch +++ b/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch @@ -1,20 +1,19 @@ -From 8d97b72a1d77149e2f9048d1ca6cef66da1a8aa5 Mon Sep 17 00:00:00 2001 +From d3556767b84f3687743fdad0a88af0739d736ea9 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Fri, 30 Dec 2016 18:29:37 +0200 -Subject: [PATCH 2/5] Run python scripts using env +Subject: [PATCH] Run python scripts using env Otherwise the build tools hardcode the python path into them. Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - --- bin/dnf-automatic.in | 2 +- bin/dnf.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/dnf-automatic.in b/bin/dnf-automatic.in -index 5b06aa26..891b4c24 100755 +index 17e35a05..28827e38 100755 --- a/bin/dnf-automatic.in +++ b/bin/dnf-automatic.in @@ -1,4 +1,4 @@ @@ -24,7 +23,7 @@ index 5b06aa26..891b4c24 100755 # # Copyright (C) 2014-2016 Red Hat, Inc. diff --git a/bin/dnf.in b/bin/dnf.in -index 645d0f06..bdf7b3c4 100755 +index 55ceb3f2..e38973c7 100755 --- a/bin/dnf.in +++ b/bin/dnf.in @@ -1,4 +1,4 @@ @@ -33,6 +32,3 @@ index 645d0f06..bdf7b3c4 100755 # The dnf executable script. # # Copyright (C) 2012-2016 Red Hat, Inc. --- -2.14.2 - |