summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2025-06-08 03:43:10 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-06-09 17:43:41 +0100
commitbcf6af00f4f3fb31eca11b2439c57a540c6fc986 (patch)
tree2f8e94172f3f20d21a7855086d7b08ab414718b1
parent140fde4c343963235556c3793e56b51b50f4acb4 (diff)
downloadpoky-bcf6af00f4f3fb31eca11b2439c57a540c6fc986.tar.gz
rpm: 4.20.0 -> 4.20.1
* Rebased: 0001-When-cross-installing-execute-package-scriptlets-wit.patch 0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch * Removed the one which already merged: 0001-Set-RPM_PLUGINDIR-in-top-level-CMakeLists.txt.patch * Added a patch to fix rpm-native build error: gcc: error: unrecognized command-line option -fhardened 0001-CMakeLists.txt-Fix-checking-for-CFLAGS.patch * License-Update: Minor formatting changes as the commit messages said in 41143b27b6f7320f280aea6014e8f532eb0239d6 (From OE-Core rev: 5d25e1ba4d8850e2c281fc7f24493239bf2f9866) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-Fix-checking-for-CFLAGS.patch58
-rw-r--r--meta/recipes-devtools/rpm/files/0001-Set-RPM_PLUGINDIR-in-top-level-CMakeLists.txt.patch57
-rw-r--r--meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch24
-rw-r--r--meta/recipes-devtools/rpm/files/0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch27
-rw-r--r--meta/recipes-devtools/rpm/rpm_4.20.1.bb (renamed from meta/recipes-devtools/rpm/rpm_4.20.0.bb)6
5 files changed, 89 insertions, 83 deletions
diff --git a/meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-Fix-checking-for-CFLAGS.patch b/meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-Fix-checking-for-CFLAGS.patch
new file mode 100644
index 0000000000..ed270a5704
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-Fix-checking-for-CFLAGS.patch
@@ -0,0 +1,58 @@
1From 19f7ef341f19ac5594c7d0113f9eb8224934464a Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Sun, 8 Jun 2025 00:19:06 -0700
4Subject: [PATCH] CMakeLists.txt: Fix checking for CFLAGS
5
6The previous code doesn't work because the check_c_compiler_flag() only ran
7once because 'found' is in CACHE, here is log:
8-- Performing Test found
9-- Performing Test found - Success
10
11That would result in:
12* All the flags are added when the first one works
13* None of the flags is added when the first one doesn't work
14
15We can use "unset(found CACHE)" to fix that, but the log is still not clear:
16-- Performing Test found
17-- Performing Test found - Success
18-- Performing Test found
19-- Performing Test found - Success
20-- Performing Test found
21-- Performing Test found - Failed
22
23Use a new var SUPPORTS_${flag} will make it more clear:
24-- Performing Test SUPPORTS_-fno-strict-overflow
25-- Performing Test SUPPORTS_-fno-strict-overflow - Success
26-- Performing Test SUPPORTS_-fno-delete-null-pointer-checks
27-- Performing Test SUPPORTS_-fno-delete-null-pointer-checks - Success
28-- Performing Test SUPPORTS_-fhardened
29-- Performing Test SUPPORTS_-fhardened - Failed
30
31Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/3796]
32
33Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
34---
35 CMakeLists.txt | 5 ++---
36 1 file changed, 2 insertions(+), 3 deletions(-)
37
38diff --git a/CMakeLists.txt b/CMakeLists.txt
39index 08e3e5274..a7566ab5a 100644
40--- a/CMakeLists.txt
41+++ b/CMakeLists.txt
42@@ -416,11 +416,10 @@ endif()
43
44 # try to ensure some compiler sanity and hardening options where supported
45 foreach (flag -fno-strict-overflow -fno-delete-null-pointer-checks -fhardened)
46- check_c_compiler_flag(${flag} found)
47- if (found)
48+ check_c_compiler_flag(${flag} SUPPORTS_${flag})
49+ if (SUPPORTS_${flag})
50 add_compile_options(${flag})
51 endif()
52- unset(found)
53 endforeach()
54
55 # generated sources
56--
572.49.0
58
diff --git a/meta/recipes-devtools/rpm/files/0001-Set-RPM_PLUGINDIR-in-top-level-CMakeLists.txt.patch b/meta/recipes-devtools/rpm/files/0001-Set-RPM_PLUGINDIR-in-top-level-CMakeLists.txt.patch
deleted file mode 100644
index 5db69340ad..0000000000
--- a/meta/recipes-devtools/rpm/files/0001-Set-RPM_PLUGINDIR-in-top-level-CMakeLists.txt.patch
+++ /dev/null
@@ -1,57 +0,0 @@
1From 2d6beb620896a59cfd685b51a19057e5c5c4ab41 Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Thu, 19 Dec 2024 11:54:54 +0800
4Subject: [PATCH] Set RPM_PLUGINDIR in top level CMakeLists.txt
5
6We have in macros.in:
7 %__plugindir @RPM_PLUGINDIR@
8
9This means, if RPM_PLUGINDIR is not set, %__plugindir will be empty.
10This in turn results in error message when running 'dnf'.
11
12e.g.,
13dnf --help >/dev/null
14error: /usr/lib64/rpm/macros: line 1183: Macro %__plugindir has empty body
15error: /usr/lib64/rpm/macros: line 1183: Macro %__plugindir has empty body
16
17So we should move this directory setting into the top level CMakeLists.txt.
18
19Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/3496]
20
21Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
22---
23 CMakeLists.txt | 3 +++
24 plugins/CMakeLists.txt | 3 ---
25 2 files changed, 3 insertions(+), 3 deletions(-)
26
27diff --git a/CMakeLists.txt b/CMakeLists.txt
28index 758ba73f4..e694b9650 100644
29--- a/CMakeLists.txt
30+++ b/CMakeLists.txt
31@@ -453,6 +453,9 @@ if (ENABLE_PYTHON)
32 add_subdirectory(python)
33 endif()
34
35+set(RPM_PLUGINDIR ${CMAKE_INSTALL_FULL_LIBDIR}/rpm-plugins
36+ CACHE PATH "rpm plugin directory")
37+
38 if (ENABLE_PLUGINS)
39 add_subdirectory(plugins)
40 endif()
41diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt
42index a44056fe3..6e61a7c20 100644
43--- a/plugins/CMakeLists.txt
44+++ b/plugins/CMakeLists.txt
45@@ -42,9 +42,6 @@ if (HAVE_UNSHARE)
46 add_library(unshare MODULE unshare.c)
47 endif()
48
49-set(RPM_PLUGINDIR ${CMAKE_INSTALL_FULL_LIBDIR}/rpm-plugins
50- CACHE PATH "rpm plugin directory")
51-
52 get_property(plugins DIRECTORY PROPERTY BUILDSYSTEM_TARGETS)
53 foreach(plugin ${plugins})
54 target_link_libraries(${plugin} PRIVATE librpmio librpm ${Intl_LIBRARIES})
55--
562.25.1
57
diff --git a/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch b/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch
index fc6d7e0d29..b71156fe12 100644
--- a/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch
+++ b/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch
@@ -24,15 +24,18 @@ Amended 2018-07-03 by Olof Johansson <olofjn@axis.com>:
24 24
25Upstream-Status: Inappropriate [oe-core specific] 25Upstream-Status: Inappropriate [oe-core specific]
26Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 26Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
27
28Rebased to 4.20.1
29Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
27--- 30---
28 lib/rpmscript.c | 11 ++++++++--- 31 lib/rpmscript.c | 9 +++++++--
29 1 file changed, 8 insertions(+), 3 deletions(-) 32 1 file changed, 7 insertions(+), 2 deletions(-)
30 33
31diff --git a/lib/rpmscript.c b/lib/rpmscript.c 34diff --git a/lib/rpmscript.c b/lib/rpmscript.c
32index 097c9055a..060fd8124 100644 35index eb14870b3..1785e8f30 100644
33--- a/lib/rpmscript.c 36--- a/lib/rpmscript.c
34+++ b/lib/rpmscript.c 37+++ b/lib/rpmscript.c
35@@ -447,8 +447,7 @@ exit: 38@@ -456,8 +456,7 @@ exit:
36 Fclose(out); /* XXX dup'd STDOUT_FILENO */ 39 Fclose(out); /* XXX dup'd STDOUT_FILENO */
37 40
38 if (fn) { 41 if (fn) {
@@ -42,18 +45,17 @@ index 097c9055a..060fd8124 100644
42 free(fn); 45 free(fn);
43 } 46 }
44 free(mline); 47 free(mline);
45@@ -482,7 +481,13 @@ rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, FD_t scriptFd, 48@@ -491,7 +490,13 @@ rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, FD_t scriptFd,
46 49
47 if (rc != RPMRC_FAIL) { 50 if (rc != RPMRC_FAIL) {
48 if (script_type & RPMSCRIPTLET_EXEC) { 51 if (script_type & RPMSCRIPTLET_EXEC) {
49- rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, script->nextFileFunc);
50+ if (getenv("RPM_NO_CHROOT_FOR_SCRIPTS") != NULL) { 52+ if (getenv("RPM_NO_CHROOT_FOR_SCRIPTS") != NULL) {
51+ rpmChrootOut(); 53+ rpmChrootOut();
52+ rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, script->nextFileFunc); 54 rc = runExtScript(plugins, prefixes, script, lvl, scriptFd, &args, arg1, arg2);
53+ rpmChrootIn(); 55+ rpmChrootIn();
54+ } else { 56+ } else {
55+ rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, script->nextFileFunc); 57+ rc = runExtScript(plugins, prefixes, script, lvl, scriptFd, &args, arg1, arg2);
56+ } 58+ }
57 } else { 59 } else {
58 rc = runLuaScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, script->nextFileFunc); 60 rc = runLuaScript(plugins, prefixes, script, lvl, scriptFd, &args, arg1, arg2);
59 } 61 }
diff --git a/meta/recipes-devtools/rpm/files/0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch b/meta/recipes-devtools/rpm/files/0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch
index 278fa38bad..bac2d6331c 100644
--- a/meta/recipes-devtools/rpm/files/0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch
+++ b/meta/recipes-devtools/rpm/files/0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch
@@ -9,15 +9,18 @@ irrelevant noise to rootfs logs.
9 9
10Upstream-Status: Inappropriate [oe-core specific] 10Upstream-Status: Inappropriate [oe-core specific]
11Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 11Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
12
13Rebased to 4.20.1
14Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
12--- 15---
13 lib/rpmscript.c | 8 ++++---- 16 lib/rpmscript.c | 8 ++++----
14 1 file changed, 4 insertions(+), 4 deletions(-) 17 1 file changed, 4 insertions(+), 4 deletions(-)
15 18
16diff --git a/lib/rpmscript.c b/lib/rpmscript.c 19diff --git a/lib/rpmscript.c b/lib/rpmscript.c
17index 4dc6466a8..6d3c19d01 100644 20index e9f288ae0..f0c628708 100644
18--- a/lib/rpmscript.c 21--- a/lib/rpmscript.c
19+++ b/lib/rpmscript.c 22+++ b/lib/rpmscript.c
20@@ -290,7 +290,7 @@ static char * writeScript(const char *cmd, const char *script) 23@@ -299,7 +299,7 @@ static char * writeScript(const char *cmd, const char *script)
21 if (Ferror(fd)) 24 if (Ferror(fd))
22 goto exit; 25 goto exit;
23 26
@@ -26,30 +29,30 @@ index 4dc6466a8..6d3c19d01 100644
26 static const char set_x[] = "set -x\n"; 29 static const char set_x[] = "set -x\n";
27 /* Assume failures will be caught by the write below */ 30 /* Assume failures will be caught by the write below */
28 Fwrite(set_x, sizeof(set_x[0]), sizeof(set_x)-1, fd); 31 Fwrite(set_x, sizeof(set_x[0]), sizeof(set_x)-1, fd);
29@@ -322,7 +322,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes, 32@@ -330,7 +330,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes,
30 char *mline = NULL; 33 char *mline = NULL;
31 rpmRC rc = RPMRC_FAIL; 34 rpmRC rc = RPMRC_FAIL;
32 35
33- rpmlog(RPMLOG_DEBUG, "%s: scriptlet start\n", sname); 36- rpmlog(RPMLOG_DEBUG, "%s: scriptlet start\n", script->descr);
34+ rpmlog(RPMLOG_INFO, "%s: scriptlet start\n", sname); 37+ rpmlog(RPMLOG_INFO, "%s: scriptlet start\n", script->descr);
35 38
36 if (script) { 39 if (script->body) {
37 fn = writeScript(*argvp[0], script); 40 fn = writeScript(*argvp[0], script->body);
38@@ -374,7 +374,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes, 41@@ -382,7 +382,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes,
39 sname, strerror(errno)); 42 script->descr, strerror(errno));
40 goto exit; 43 goto exit;
41 } else if (pid == 0) {/* Child */ 44 } else if (pid == 0) {/* Child */
42- rpmlog(RPMLOG_DEBUG, "%s: execv(%s) pid %d\n", 45- rpmlog(RPMLOG_DEBUG, "%s: execv(%s) pid %d\n",
43+ rpmlog(RPMLOG_INFO, "%s: execv(%s) pid %d\n", 46+ rpmlog(RPMLOG_INFO, "%s: execv(%s) pid %d\n",
44 sname, *argvp[0], (unsigned)getpid()); 47 script->descr, *argvp[0], (unsigned)getpid());
45 48
46 fclose(in); 49 fclose(in);
47@@ -417,7 +417,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes, 50@@ -426,7 +426,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes,
48 reaped = waitpid(pid, &status, 0); 51 reaped = waitpid(pid, &status, 0);
49 } while (reaped == -1 && errno == EINTR); 52 } while (reaped == -1 && errno == EINTR);
50 53
51- rpmlog(RPMLOG_DEBUG, "%s: waitpid(%d) rc %d status %x\n", 54- rpmlog(RPMLOG_DEBUG, "%s: waitpid(%d) rc %d status %x\n",
52+ rpmlog(RPMLOG_INFO, "%s: waitpid(%d) rc %d status %x\n", 55+ rpmlog(RPMLOG_INFO, "%s: waitpid(%d) rc %d status %x\n",
53 sname, (unsigned)pid, (unsigned)reaped, status); 56 script->descr, (unsigned)pid, (unsigned)reaped, status);
54 57
55 if (reaped < 0) { 58 if (reaped < 0) {
diff --git a/meta/recipes-devtools/rpm/rpm_4.20.0.bb b/meta/recipes-devtools/rpm/rpm_4.20.1.bb
index 33966b97b4..7bb6993811 100644
--- a/meta/recipes-devtools/rpm/rpm_4.20.0.bb
+++ b/meta/recipes-devtools/rpm/rpm_4.20.1.bb
@@ -22,7 +22,7 @@ HOMEPAGE = "http://www.rpm.org"
22 22
23# libraries are also LGPL - how to express this? 23# libraries are also LGPL - how to express this?
24LICENSE = "GPL-2.0-only" 24LICENSE = "GPL-2.0-only"
25LIC_FILES_CHKSUM = "file://COPYING;md5=c4eec0c20c6034b9407a09945b48a43f" 25LIC_FILES_CHKSUM = "file://COPYING;md5=066ecde17828e5c8911ec9eae8be78f4"
26 26
27SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.20.x;protocol=https \ 27SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.20.x;protocol=https \
28 file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \ 28 file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \
@@ -38,11 +38,11 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.20.x;protoc
38 file://0001-CMakeLists.txt-look-for-lua-with-pkg-config-rather-t.patch \ 38 file://0001-CMakeLists.txt-look-for-lua-with-pkg-config-rather-t.patch \
39 file://0002-rpmio-rpmglob.c-avoid-using-GLOB_BRACE-if-undefined-.patch \ 39 file://0002-rpmio-rpmglob.c-avoid-using-GLOB_BRACE-if-undefined-.patch \
40 file://0001-CMakeLists.txt-set-libdir-to-CMAKE_INSTALL_FULL_LIBD.patch \ 40 file://0001-CMakeLists.txt-set-libdir-to-CMAKE_INSTALL_FULL_LIBD.patch \
41 file://0001-Set-RPM_PLUGINDIR-in-top-level-CMakeLists.txt.patch \ 41 file://0001-CMakeLists.txt-Fix-checking-for-CFLAGS.patch \
42 " 42 "
43 43
44PE = "1" 44PE = "1"
45SRCREV = "b3323786668cf99bc9aed7e60ccdab0bc25e19da" 45SRCREV = "c8dc5ea575a2e9c1488036d12f4b75f6a5a49120"
46 46
47S = "${WORKDIR}/git" 47S = "${WORKDIR}/git"
48 48