summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/dnf
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/dnf')
-rw-r--r--meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch8
-rw-r--r--meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch5
-rw-r--r--meta/recipes-devtools/dnf/dnf/0001-dnf-write-the-log-lock-to-root.patch6
-rw-r--r--meta/recipes-devtools/dnf/dnf/0001-lock.py-fix-Exception-handling.patch62
-rw-r--r--meta/recipes-devtools/dnf/dnf/0001-set-python-path-for-completion_helper.patch7
-rw-r--r--meta/recipes-devtools/dnf/dnf/0005-Do-not-prepend-installroot-to-logdir.patch11
-rw-r--r--meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch9
-rw-r--r--meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch12
-rw-r--r--meta/recipes-devtools/dnf/dnf_4.19.2.bb (renamed from meta/recipes-devtools/dnf/dnf_4.5.2.bb)40
9 files changed, 106 insertions, 54 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 @@
1From 05e059cd4e9910c00b32d377f4f98e3c8dde6bc6 Mon Sep 17 00:00:00 2001 1From f70eb308c837f2c944e23bb680a501a605004d65 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 26 Jan 2017 16:36:20 +0200 3Date: Thu, 26 Jan 2017 16:36:20 +0200
4Subject: [PATCH 4/5] Corretly install tmpfiles.d configuration 4Subject: [PATCH] Corretly install tmpfiles.d configuration
5 5
6Upstream-Status: Inappropriate [oe-core specific] 6Upstream-Status: Inappropriate [oe-core specific]
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8
9--- 8---
10 etc/tmpfiles.d/CMakeLists.txt | 2 +- 9 etc/tmpfiles.d/CMakeLists.txt | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-) 10 1 file changed, 1 insertion(+), 1 deletion(-)
@@ -17,6 +16,3 @@ index f69c773e..3eb6d0e8 100644
17@@ -1 +1 @@ 16@@ -1 +1 @@
18-INSTALL (FILES dnf.conf DESTINATION /usr/lib/tmpfiles.d/) 17-INSTALL (FILES dnf.conf DESTINATION /usr/lib/tmpfiles.d/)
19+INSTALL (FILES dnf.conf DESTINATION ${SYSCONFDIR}/tmpfiles.d/) 18+INSTALL (FILES dnf.conf DESTINATION ${SYSCONFDIR}/tmpfiles.d/)
20--
212.14.2
22
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 @@
1From ffb7942cc73c3d2c6aa7c689cdaf9bc0bcbc144b Mon Sep 17 00:00:00 2001 1From 3ca6d14fbc6419ff6239b4ba16f77da20fb31d03 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 26 Jan 2017 16:25:47 +0200 3Date: Thu, 26 Jan 2017 16:25:47 +0200
4Subject: [PATCH] Do not hardcode /etc and systemd unit directories 4Subject: [PATCH] Do not hardcode /etc and systemd unit directories
5 5
6Upstream-Status: Inappropriate [oe-core specific] 6Upstream-Status: Inappropriate [oe-core specific]
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8
9--- 8---
10 CMakeLists.txt | 4 ++-- 9 CMakeLists.txt | 4 ++--
11 1 file changed, 2 insertions(+), 2 deletions(-) 10 1 file changed, 2 insertions(+), 2 deletions(-)
12 11
13diff --git a/CMakeLists.txt b/CMakeLists.txt 12diff --git a/CMakeLists.txt b/CMakeLists.txt
14index 73552967..38cf4fbf 100644 13index 4aee99fb..9e2e9e9e 100644
15--- a/CMakeLists.txt 14--- a/CMakeLists.txt
16+++ b/CMakeLists.txt 15+++ b/CMakeLists.txt
17@@ -3,8 +3,8 @@ CMAKE_MINIMUM_REQUIRED (VERSION 2.4) 16@@ -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 @@
1From 5e07c16a506b19cbb107d5e99fca41d679b23b9a Mon Sep 17 00:00:00 2001 1From 049e2832284ab883e185d9020c881518a68e6c38 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Tue, 28 Apr 2020 15:55:00 +0200 3Date: Tue, 28 Apr 2020 15:55:00 +0200
4Subject: [PATCH] dnf: write the log lock to root 4Subject: [PATCH] dnf: write the log lock to root
@@ -15,10 +15,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
15 1 file changed, 1 insertion(+), 1 deletion(-) 15 1 file changed, 1 insertion(+), 1 deletion(-)
16 16
17diff --git a/dnf/logging.py b/dnf/logging.py 17diff --git a/dnf/logging.py b/dnf/logging.py
18index bd660470..a9d808b1 100644 18index ef0b25f3..94610af6 100644
19--- a/dnf/logging.py 19--- a/dnf/logging.py
20+++ b/dnf/logging.py 20+++ b/dnf/logging.py
21@@ -94,7 +94,7 @@ class MultiprocessRotatingFileHandler(logging.handlers.RotatingFileHandler): 21@@ -118,7 +118,7 @@ class MultiprocessRotatingFileHandler(logging.handlers.RotatingFileHandler):
22 def __init__(self, filename, mode='a', maxBytes=0, backupCount=0, encoding=None, delay=False): 22 def __init__(self, filename, mode='a', maxBytes=0, backupCount=0, encoding=None, delay=False):
23 super(MultiprocessRotatingFileHandler, self).__init__( 23 super(MultiprocessRotatingFileHandler, self).__init__(
24 filename, mode, maxBytes, backupCount, encoding, delay) 24 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 @@
1From 3881757eabfde2ff54400ab127b106ab085d83f0 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Wed, 13 Mar 2024 11:22:05 +0800
4Subject: [PATCH] lock.py: fix Exception handling
5
6Before, when logdir is not writable, _try_lock will raise an Exception
7like "Permission denied: '/var/log/log_lock.pid'", and in this case,
8_unlock_thread will not be called and the variable count will not be
9handled, it maybe cause log_lock.pid not be deleted in case like [1].
10
11For [1], it is an cross compile case, when dnf install some packages to
12rootfs, seems like some threads don't do chroot like work, some threads
13do chroot like work. so for the threads don't do chroot, "Permission denied"
14Exception happend, for the threads that do chroot, log_lock.pid will be
15created under installroot/var/log/log_lock.pid, since variable count not
16handled correct before, log_lock.pid may not be deleted correctly.
17
18So fixed like this, if _try_lock raise Exception, _unlock_thread first,
19then raise the Exception.
20
21[1] https://github.com/rpm-software-management/dnf/issues/1963
22
23Upstream-Status: Submitted [ https://github.com/rpm-software-management/dnf/pull/2065 ]
24
25Signed-off-by: Changqing Li <changqing.li@windriver.com>
26---
27 dnf/lock.py | 12 ++++++++++--
28 1 file changed, 10 insertions(+), 2 deletions(-)
29
30diff --git a/dnf/lock.py b/dnf/lock.py
31index 6817aac9..5718062a 100644
32--- a/dnf/lock.py
33+++ b/dnf/lock.py
34@@ -128,7 +128,11 @@ class ProcessLock(object):
35 self._lock_thread()
36 prev_pid = -1
37 my_pid = os.getpid()
38- pid = self._try_lock(my_pid)
39+ try:
40+ pid = self._try_lock(my_pid)
41+ except Exception:
42+ self._unlock_thread()
43+ raise
44 while pid != my_pid:
45 if pid != -1:
46 if not self.blocking:
47@@ -140,7 +144,11 @@ class ProcessLock(object):
48 logger.info(msg)
49 prev_pid = pid
50 time.sleep(1)
51- pid = self._try_lock(my_pid)
52+ try:
53+ pid = self._try_lock(my_pid)
54+ except Exception:
55+ self._unlock_thread()
56+ raise
57
58 def __exit__(self, *exc_args):
59 if self.count == 1:
60--
612.25.1
62
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 @@
1From 7e79b3b67fd5cecd7380e7e365fd88eca63b5bfa Mon Sep 17 00:00:00 2001 1From fa32c7dcabaa3c00d3620a3266e49629365c0cbe Mon Sep 17 00:00:00 2001
2From: Jeremy Puhlman <jpuhlman@mvista.com> 2From: Jeremy Puhlman <jpuhlman@mvista.com>
3Date: Wed, 11 Mar 2020 22:10:02 +0000 3Date: Wed, 11 Mar 2020 22:10:02 +0000
4Subject: [PATCH] set python path for completion_helper 4Subject: [PATCH] set python path for completion_helper
@@ -10,7 +10,7 @@ Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
10 1 file changed, 1 insertion(+), 1 deletion(-) 10 1 file changed, 1 insertion(+), 1 deletion(-)
11 11
12diff --git a/dnf/cli/completion_helper.py.in b/dnf/cli/completion_helper.py.in 12diff --git a/dnf/cli/completion_helper.py.in b/dnf/cli/completion_helper.py.in
13index 351226759..2835cd3b6 100644 13index 0da0f2a2..9330d15b 100644
14--- a/dnf/cli/completion_helper.py.in 14--- a/dnf/cli/completion_helper.py.in
15+++ b/dnf/cli/completion_helper.py.in 15+++ b/dnf/cli/completion_helper.py.in
16@@ -1,4 +1,4 @@ 16@@ -1,4 +1,4 @@
@@ -19,6 +19,3 @@ index 351226759..2835cd3b6 100644
19 # 19 #
20 # This file is part of dnf. 20 # This file is part of dnf.
21 # 21 #
22--
232.23.0
24
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 @@
1From 6365389074a1b86962f3d8b22a2ead2202026a98 Mon Sep 17 00:00:00 2001 1From c6d03b51e2098fc681e6811790bd5dc6597091eb Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 11 Jan 2017 15:10:13 +0200 3Date: Wed, 11 Jan 2017 15:10:13 +0200
4Subject: [PATCH 5/5] Do not prepend installroot to logdir. 4Subject: [PATCH] Do not prepend installroot to logdir.
5 5
6This would otherwise write the logs into rootfs/var/log 6This would otherwise write the logs into rootfs/var/log
7(whereas we want them in $T), 7(whereas we want them in $T),
@@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
14 1 file changed, 1 insertion(+), 1 deletion(-) 14 1 file changed, 1 insertion(+), 1 deletion(-)
15 15
16diff --git a/dnf/cli/cli.py b/dnf/cli/cli.py 16diff --git a/dnf/cli/cli.py b/dnf/cli/cli.py
17index d2d9c082..82270ecf 100644 17index 1824bd00..4dcb1c1c 100644
18--- a/dnf/cli/cli.py 18--- a/dnf/cli/cli.py
19+++ b/dnf/cli/cli.py 19+++ b/dnf/cli/cli.py
20@@ -920,7 +920,7 @@ class Cli(object): 20@@ -944,7 +944,7 @@ class Cli(object):
21 logger.warning(_("Unable to detect release version (use '--releasever' to specify " 21 logger.warning(_("Unable to detect release version (use '--releasever' to specify "
22 "release version)")) 22 "release version)"))
23 23
@@ -26,6 +26,3 @@ index d2d9c082..82270ecf 100644
26 conf.prepend_installroot(opt) 26 conf.prepend_installroot(opt)
27 27
28 self.base._logging._setup_from_dnf_conf(conf) 28 self.base._logging._setup_from_dnf_conf(conf)
29--
302.14.2
31
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 @@
1From 6be13143a54c79085d400d5bd4c7a6e1cb6ffaf5 Mon Sep 17 00:00:00 2001 1From d5b154ea69afdcd862299a0b7f255f6ece3686c6 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 30 Dec 2016 18:29:07 +0200 3Date: Fri, 30 Dec 2016 18:29:07 +0200
4Subject: [PATCH] Do not set PYTHON_INSTALL_DIR by running python 4Subject: [PATCH] Do not set PYTHON_INSTALL_DIR by running python
5 5
6Upstream-Status: Inappropriate [oe-core specific] 6Upstream-Status: Inappropriate [oe-core specific]
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8
9--- 8---
10 CMakeLists.txt | 2 +- 9 CMakeLists.txt | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-) 10 1 file changed, 1 insertion(+), 1 deletion(-)
12 11
13diff --git a/CMakeLists.txt b/CMakeLists.txt 12diff --git a/CMakeLists.txt b/CMakeLists.txt
14index 38cf4fbf..6c5debd8 100644 13index 9e2e9e9e..2056089d 100644
15--- a/CMakeLists.txt 14--- a/CMakeLists.txt
16+++ b/CMakeLists.txt 15+++ b/CMakeLists.txt
17@@ -19,7 +19,7 @@ ELSE () 16@@ -19,7 +19,7 @@ ELSE ()
18 MESSAGE (FATAL_ERROR "Invalid PYTHON_DESIRED value: " ${PYTHON_DESIRED}) 17 MESSAGE (FATAL_ERROR "Invalid PYTHON_DESIRED value: " ${PYTHON_DESIRED})
19 ENDIF() 18 ENDIF()
20 19
21-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) 20-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)
22+#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) 21+#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)
23 MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}") 22 MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}")
24 23
25 ADD_SUBDIRECTORY (dnf) 24 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 @@
1From 8d97b72a1d77149e2f9048d1ca6cef66da1a8aa5 Mon Sep 17 00:00:00 2001 1From d3556767b84f3687743fdad0a88af0739d736ea9 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 30 Dec 2016 18:29:37 +0200 3Date: Fri, 30 Dec 2016 18:29:37 +0200
4Subject: [PATCH 2/5] Run python scripts using env 4Subject: [PATCH] Run python scripts using env
5 5
6Otherwise the build tools hardcode the python path into them. 6Otherwise the build tools hardcode the python path into them.
7 7
8Upstream-Status: Inappropriate [oe-core specific] 8Upstream-Status: Inappropriate [oe-core specific]
9Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 9Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
10
11--- 10---
12 bin/dnf-automatic.in | 2 +- 11 bin/dnf-automatic.in | 2 +-
13 bin/dnf.in | 2 +- 12 bin/dnf.in | 2 +-
14 2 files changed, 2 insertions(+), 2 deletions(-) 13 2 files changed, 2 insertions(+), 2 deletions(-)
15 14
16diff --git a/bin/dnf-automatic.in b/bin/dnf-automatic.in 15diff --git a/bin/dnf-automatic.in b/bin/dnf-automatic.in
17index 5b06aa26..891b4c24 100755 16index 17e35a05..28827e38 100755
18--- a/bin/dnf-automatic.in 17--- a/bin/dnf-automatic.in
19+++ b/bin/dnf-automatic.in 18+++ b/bin/dnf-automatic.in
20@@ -1,4 +1,4 @@ 19@@ -1,4 +1,4 @@
@@ -24,7 +23,7 @@ index 5b06aa26..891b4c24 100755
24 # 23 #
25 # Copyright (C) 2014-2016 Red Hat, Inc. 24 # Copyright (C) 2014-2016 Red Hat, Inc.
26diff --git a/bin/dnf.in b/bin/dnf.in 25diff --git a/bin/dnf.in b/bin/dnf.in
27index 645d0f06..bdf7b3c4 100755 26index 55ceb3f2..e38973c7 100755
28--- a/bin/dnf.in 27--- a/bin/dnf.in
29+++ b/bin/dnf.in 28+++ b/bin/dnf.in
30@@ -1,4 +1,4 @@ 29@@ -1,4 +1,4 @@
@@ -33,6 +32,3 @@ index 645d0f06..bdf7b3c4 100755
33 # The dnf executable script. 32 # The dnf executable script.
34 # 33 #
35 # Copyright (C) 2012-2016 Red Hat, Inc. 34 # Copyright (C) 2012-2016 Red Hat, Inc.
36--
372.14.2
38
diff --git a/meta/recipes-devtools/dnf/dnf_4.5.2.bb b/meta/recipes-devtools/dnf/dnf_4.19.2.bb
index c746dc30db..cc91dbe400 100644
--- a/meta/recipes-devtools/dnf/dnf_4.5.2.bb
+++ b/meta/recipes-devtools/dnf/dnf_4.19.2.bb
@@ -3,27 +3,29 @@ DESCRIPTION = "Software package manager that installs, updates, and removes \
3packages on RPM-based Linux distributions. It automatically computes \ 3packages on RPM-based Linux distributions. It automatically computes \
4dependencies and determines the actions required to install packages." 4dependencies and determines the actions required to install packages."
5HOMEPAGE = "https://github.com/rpm-software-management/dnf" 5HOMEPAGE = "https://github.com/rpm-software-management/dnf"
6LICENSE = "GPLv2" 6LICENSE = "GPL-2.0-only"
7LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ 7LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
8 file://PACKAGE-LICENSING;md5=4a0548e303dbc77f067335b4d688e745 \ 8 file://PACKAGE-LICENSING;md5=4a0548e303dbc77f067335b4d688e745 \
9 " 9 "
10 10
11SRC_URI = "git://github.com/rpm-software-management/dnf.git \ 11SRC_URI = "git://github.com/rpm-software-management/dnf.git;branch=master;protocol=https \
12 file://0001-Corretly-install-tmpfiles.d-configuration.patch \ 12 file://0001-Corretly-install-tmpfiles.d-configuration.patch \
13 file://0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch \ 13 file://0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch \
14 file://0005-Do-not-prepend-installroot-to-logdir.patch \ 14 file://0005-Do-not-prepend-installroot-to-logdir.patch \
15 file://0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \ 15 file://0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
16 file://0030-Run-python-scripts-using-env.patch \ 16 file://0030-Run-python-scripts-using-env.patch \
17 file://0001-set-python-path-for-completion_helper.patch \ 17 file://0001-set-python-path-for-completion_helper.patch \
18 file://0001-dnf-write-the-log-lock-to-root.patch \ 18 file://0001-lock.py-fix-Exception-handling.patch \
19 " 19 "
20 20
21SRCREV = "36a3ffaee4db76a7efe7d40f4e42ce679b6a6920" 21SRC_URI:append:class-native = "file://0001-dnf-write-the-log-lock-to-root.patch"
22
23SRCREV = "9b2b2e8ddab99caba4bc8059cab4263163172e81"
22UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)" 24UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
23 25
24S = "${WORKDIR}/git" 26S = "${WORKDIR}/git"
25 27
26inherit cmake gettext bash-completion distutils3-base systemd 28inherit cmake gettext bash-completion setuptools3-base systemd
27 29
28DEPENDS += "libdnf librepo libcomps python3-iniparse" 30DEPENDS += "libdnf librepo libcomps python3-iniparse"
29 31
@@ -32,13 +34,12 @@ EXTRA_OECMAKE = " -DWITH_MAN=0 -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -
32 34
33BBCLASSEXTEND = "native nativesdk" 35BBCLASSEXTEND = "native nativesdk"
34 36
35RDEPENDS_${PN} += " \ 37RDEPENDS:${PN} += " \
36 python3-core \ 38 python3-core \
37 python3-codecs \ 39 python3-codecs \
38 python3-netclient \ 40 python3-netclient \
39 python3-email \ 41 python3-email \
40 python3-threading \ 42 python3-threading \
41 python3-distutils \
42 python3-logging \ 43 python3-logging \
43 python3-fcntl \ 44 python3-fcntl \
44 librepo \ 45 librepo \
@@ -52,35 +53,34 @@ RDEPENDS_${PN} += " \
52 python3-json \ 53 python3-json \
53 python3-curses \ 54 python3-curses \
54 python3-misc \ 55 python3-misc \
55 python3-gpg \
56 " 56 "
57 57
58RDEPENDS_${PN}_class-native = "" 58RDEPENDS:${PN}:class-native = ""
59 59
60RRECOMMENDS_${PN}_class-target += "gnupg" 60RRECOMMENDS:${PN}:class-target += "gnupg"
61 61
62# Create a symlink called 'dnf' as 'make install' does not do it, but 62# Create a symlink called 'dnf' as 'make install' does not do it, but
63# .spec file in dnf source tree does (and then Fedora and dnf documentation 63# .spec file in dnf source tree does (and then Fedora and dnf documentation
64# says that dnf binary is plain 'dnf'). 64# says that dnf binary is plain 'dnf').
65do_install_append() { 65do_install:append() {
66 lnr ${D}/${bindir}/dnf-3 ${D}/${bindir}/dnf 66 ln -rs ${D}/${bindir}/dnf-3 ${D}/${bindir}/dnf
67 lnr ${D}/${bindir}/dnf-automatic-3 ${D}/${bindir}/dnf-automatic 67 ln -rs ${D}/${bindir}/dnf-automatic-3 ${D}/${bindir}/dnf-automatic
68} 68}
69 69
70# Direct dnf-native to read rpm configuration from our sysroot, not the one it was compiled in 70# Direct dnf-native to read rpm configuration from our sysroot, not the one it was compiled in
71do_install_append_class-native() { 71do_install:append:class-native() {
72 create_wrapper ${D}/${bindir}/dnf \ 72 create_wrapper ${D}/${bindir}/dnf \
73 RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \ 73 RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
74 RPM_NO_CHROOT_FOR_SCRIPTS=1 74 RPM_NO_CHROOT_FOR_SCRIPTS=1
75} 75}
76 76
77do_install_append_class-nativesdk() { 77do_install:append:class-nativesdk() {
78 create_wrapper ${D}/${bindir}/dnf \ 78 create_wrapper ${D}/${bindir}/dnf \
79 RPM_CONFIGDIR=${SDKPATHNATIVE}${libdir_nativesdk}/rpm \ 79 RPM_CONFIGDIR=${SDKPATHNATIVE}${libdir_nativesdk}/rpm \
80 RPM_NO_CHROOT_FOR_SCRIPTS=1 80 RPM_NO_CHROOT_FOR_SCRIPTS=1
81} 81}
82 82
83SYSTEMD_SERVICE_${PN} = "dnf-makecache.service dnf-makecache.timer \ 83SYSTEMD_SERVICE:${PN} = "dnf-makecache.service dnf-makecache.timer \
84 dnf-automatic.service dnf-automatic.timer \ 84 dnf-automatic.service dnf-automatic.timer \
85 dnf-automatic-download.service dnf-automatic-download.timer \ 85 dnf-automatic-download.service dnf-automatic-download.timer \
86 dnf-automatic-install.service dnf-automatic-install.timer \ 86 dnf-automatic-install.service dnf-automatic-install.timer \
@@ -88,4 +88,10 @@ SYSTEMD_SERVICE_${PN} = "dnf-makecache.service dnf-makecache.timer \
88" 88"
89SYSTEMD_AUTO_ENABLE ?= "disable" 89SYSTEMD_AUTO_ENABLE ?= "disable"
90 90
91PNBLACKLIST[dnf] ?= "${@bb.utils.contains('PACKAGE_CLASSES', 'package_rpm', '', 'does not build without package_rpm in PACKAGE_CLASSES due disabled rpm support in libsolv', d)}" 91SKIP_RECIPE[dnf] ?= "${@bb.utils.contains('PACKAGE_CLASSES', 'package_rpm', '', 'does not build without package_rpm in PACKAGE_CLASSES due disabled rpm support in libsolv', d)}"
92
93# Packages for testing purposes
94PACKAGES += "${PN}-test-main ${PN}-test-dep"
95ALLOW_EMPTY:${PN}-test-main = "1"
96ALLOW_EMPTY:${PN}-test-dep = "1"
97RRECOMMENDS:${PN}-test-main = "${PN}-test-dep"