summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2020-10-28 22:05:36 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-30 13:22:48 +0000
commitd22a91051e9f1d11d118e7aeb822ea569a8f8127 (patch)
tree9d102a00807911716bbf52d6090af0a876c54e88 /meta/recipes-devtools/rpm
parent52a31bd5ba90713af82822047c3813afc31421f8 (diff)
downloadpoky-d22a91051e9f1d11d118e7aeb822ea569a8f8127.tar.gz
rpm: update 4.15.1 -> 4.16.0
Drop backports. Drop 0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch as enabling compression support in libmagic finally allows us to use parallel file classification. Add a backported patch that fixes musl builds. License-Update: formatting (From OE-Core rev: 36c014428b8088abb024287e9841f72e7368ce5b) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rpm')
-rw-r--r--meta/recipes-devtools/rpm/files/0001-Bump-up-the-limit-of-signature-header-to-64MB.patch62
-rw-r--r--meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch14
-rw-r--r--meta/recipes-devtools/rpm/files/0001-rpmdb.c-add-a-missing-include.patch25
-rw-r--r--meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch65
-rw-r--r--meta/recipes-devtools/rpm/files/0001-rpmplugins.c-call-dlerror-prior-to-dlsym.patch29
-rw-r--r--meta/recipes-devtools/rpm/rpm_4.16.0.bb (renamed from meta/recipes-devtools/rpm/rpm_4.15.1.bb)16
6 files changed, 42 insertions, 169 deletions
diff --git a/meta/recipes-devtools/rpm/files/0001-Bump-up-the-limit-of-signature-header-to-64MB.patch b/meta/recipes-devtools/rpm/files/0001-Bump-up-the-limit-of-signature-header-to-64MB.patch
deleted file mode 100644
index 0a19c12a7a..0000000000
--- a/meta/recipes-devtools/rpm/files/0001-Bump-up-the-limit-of-signature-header-to-64MB.patch
+++ /dev/null
@@ -1,62 +0,0 @@
1From e8bf0eba7143abb6e69db82ee747a0c6790dd00a Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Wed, 3 Jun 2020 10:25:24 +0800
4Subject: [PATCH] Bump up the limit of signature header to 64MB
5
6Since commits [Place file signatures into the signature header where they
7belong][1] applied, run `rpm -Kv **.rpm' failed if signature header
8is larger than 64KB. Here are steps:
9
101) A unsigned rpm package, the size is 227560 bytes
11$ ls -al xz-src-5.2.5-r0.corei7_64.rpm
12-rw-------. 1 mockbuild 1000 227560 Jun 3 09:59
13
142) Sign the rpm package
15$ rpmsign --addsign ... xz-src-5.2.5-r0.corei7_64.rpm
16
173) The size of signed rpm is 312208 bytes
18$ ls -al xz-src-5.2.5-r0.corei7_64.rpm
19-rw-------. 1 mockbuild 1000 312208 Jun 3 09:48
20
214) Run `rpm -Kv' failed with signature hdr data out of range
22$ rpm -Kv xz-src-5.2.5-r0.corei7_64.rpm
23xz-src-5.2.5-r0.corei7_64.rpm:
24error: xz-src-5.2.5-r0.corei7_64.rpm: signature hdr data: BAD, no. of
25bytes(88864) out of range
26
27From 1) and 3), the size of signed rpm package increased
28312208 - 227560 = 84648, so the check of dl_max (64KB,65536)
29is not enough.
30
31As [1] said:
32
33 This also means the signature header can be MUCH bigger than ever
34 before,so bump up the limit (to 64MB, arbitrary something for now)
35
36So [1] missed to multiply by 1024.
37
38[1] https://github.com/rpm-software-management/rpm/commit/f558e886050c4e98f6cdde391df679a411b3f62c
39
40Upstream-Status: Backport [https://github.com/rpm-software-management/rpm/commit/486579912381ede82172dc6d0ff3941a6d0536b5]
41
42Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
43---
44 lib/header.c | 2 +-
45 1 file changed, 1 insertion(+), 1 deletion(-)
46
47diff --git a/lib/header.c b/lib/header.c
48index 9ec7ed0..cbf6890 100644
49--- a/lib/header.c
50+++ b/lib/header.c
51@@ -1906,7 +1906,7 @@ rpmRC hdrblobRead(FD_t fd, int magic, int exact_size, rpmTagVal regionTag, hdrbl
52
53 if (regionTag == RPMTAG_HEADERSIGNATURES) {
54 il_max = 32;
55- dl_max = 64 * 1024;
56+ dl_max = 64 * 1024 * 1024;
57 }
58
59 memset(block, 0, sizeof(block));
60--
612.25.4
62
diff --git a/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
index 52440d6818..30975faeaf 100644
--- a/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
+++ b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
@@ -1,4 +1,4 @@
1From 2f3d1619b6510bc131c4375827caf912559f0fa2 Mon Sep 17 00:00:00 2001 1From 4fd37bc9d8d0777aa038777dd81a76b64f536efd Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Mon, 27 Feb 2017 09:43:30 +0200 3Date: Mon, 27 Feb 2017 09:43:30 +0200
4Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for 4Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for
@@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
14 3 files changed, 4 insertions(+), 4 deletions(-) 14 3 files changed, 4 insertions(+), 4 deletions(-)
15 15
16diff --git a/configure.ac b/configure.ac 16diff --git a/configure.ac b/configure.ac
17index d3aeab86e..1a1f3f91f 100644 17index 186e4aeec..5df252085 100644
18--- a/configure.ac 18--- a/configure.ac
19+++ b/configure.ac 19+++ b/configure.ac
20@@ -1086,7 +1086,7 @@ else 20@@ -944,7 +944,7 @@ else
21 usrprefix=$prefix 21 usrprefix=$prefix
22 fi 22 fi
23 23
@@ -27,10 +27,10 @@ index d3aeab86e..1a1f3f91f 100644
27 27
28 AC_SUBST(OBJDUMP) 28 AC_SUBST(OBJDUMP)
29diff --git a/macros.in b/macros.in 29diff --git a/macros.in b/macros.in
30index fe9803aad..d128675bf 100644 30index 35c8cf9df..9d8b2825c 100644
31--- a/macros.in 31--- a/macros.in
32+++ b/macros.in 32+++ b/macros.in
33@@ -985,7 +985,7 @@ package or when debugging this package.\ 33@@ -996,7 +996,7 @@ package or when debugging this package.\
34 %_sharedstatedir %{_prefix}/com 34 %_sharedstatedir %{_prefix}/com
35 %_localstatedir %{_prefix}/var 35 %_localstatedir %{_prefix}/var
36 %_lib lib 36 %_lib lib
@@ -40,7 +40,7 @@ index fe9803aad..d128675bf 100644
40 %_infodir %{_datadir}/info 40 %_infodir %{_datadir}/info
41 %_mandir %{_datadir}/man 41 %_mandir %{_datadir}/man
42diff --git a/rpm.am b/rpm.am 42diff --git a/rpm.am b/rpm.am
43index 40b4ec55f..3139ce8f6 100644 43index b46c6b7da..02d5c7a0a 100644
44--- a/rpm.am 44--- a/rpm.am
45+++ b/rpm.am 45+++ b/rpm.am
46@@ -1,10 +1,10 @@ 46@@ -1,10 +1,10 @@
@@ -55,4 +55,4 @@ index 40b4ec55f..3139ce8f6 100644
55+rpmconfigdir = $(libdir)/rpm 55+rpmconfigdir = $(libdir)/rpm
56 56
57 # Libtool version (current-revision-age) for all our libraries 57 # Libtool version (current-revision-age) for all our libraries
58 rpm_version_info = 9:1:0 58 rpm_version_info = 10:0:1
diff --git a/meta/recipes-devtools/rpm/files/0001-rpmdb.c-add-a-missing-include.patch b/meta/recipes-devtools/rpm/files/0001-rpmdb.c-add-a-missing-include.patch
new file mode 100644
index 0000000000..c7ae158f8d
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-rpmdb.c-add-a-missing-include.patch
@@ -0,0 +1,25 @@
1From 9de15c7e1f4ca23a10edb9a3b657f06b2b13e841 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Tue, 20 Oct 2020 22:16:39 +0200
4Subject: [PATCH] rpmdb.c: add a missing include
5
6This addressed build failures on non-glibc systems.
7
8Upstream-Status: Backport
9Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
10---
11 lib/rpmdb.c | 1 +
12 1 file changed, 1 insertion(+)
13
14diff --git a/lib/rpmdb.c b/lib/rpmdb.c
15index 4c101569f..73187630b 100644
16--- a/lib/rpmdb.c
17+++ b/lib/rpmdb.c
18@@ -8,6 +8,7 @@
19 #include <utime.h>
20 #include <errno.h>
21 #include <dirent.h>
22+#include <fcntl.h>
23
24 #ifndef DYING /* XXX already in "system.h" */
25 #include <fnmatch.h>
diff --git a/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch b/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
deleted file mode 100644
index d8d338792d..0000000000
--- a/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
+++ /dev/null
@@ -1,65 +0,0 @@
1From 93c3c7f043f62e96941274e957c4ad9432032af1 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Mon, 18 Nov 2019 16:22:56 +0100
4Subject: [PATCH] rpmfc.c: do not run file classification in parallel
5
6This is causing freezes with libmagic when the file in question is compressed:
7https://github.com/rpm-software-management/rpm/issues/756
8
9Upstream-Status: Inappropriate [upstream wants a proper fix]
10Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
11---
12 build/rpmfc.c | 8 --------
13 1 file changed, 8 deletions(-)
14
15diff --git a/build/rpmfc.c b/build/rpmfc.c
16index 3db7a9352..17afdd57a 100644
17--- a/build/rpmfc.c
18+++ b/build/rpmfc.c
19@@ -680,7 +680,6 @@ static void rpmfcAttributes(rpmfc fc, int ix, const char *ftype, const char *ful
20 /* Add attributes on libmagic type & path pattern matches */
21 if (matches(&(*attr)->incl, ftype, path, is_executable)) {
22 argvAddTokens(&fc->fattrs[ix], (*attr)->name);
23- #pragma omp critical(fahash)
24 fattrHashAddEntry(fc->fahash, attr-fc->atypes, ix);
25 }
26 }
27@@ -1105,7 +1104,6 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode)
28 /* Build (sorted) file class dictionary. */
29 fc->cdict = rpmstrPoolCreate();
30
31- #pragma omp parallel
32 {
33 /* libmagic is not thread-safe, each thread needs to a private handle */
34 magic_t ms = magic_open(msflags);
35@@ -1113,15 +1111,12 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode)
36 if (ms == NULL) {
37 rpmlog(RPMLOG_ERR, _("magic_open(0x%x) failed: %s\n"),
38 msflags, strerror(errno));
39- #pragma omp cancel parallel
40 }
41
42 if (magic_load(ms, NULL) == -1) {
43 rpmlog(RPMLOG_ERR, _("magic_load failed: %s\n"), magic_error(ms));
44- #pragma omp cancel parallel
45 }
46
47- #pragma omp for ordered reduction(+:nerrors)
48 for (int ix = 0; ix < fc->nfiles; ix++) {
49 rpmsid ftypeId;
50 const char * ftype;
51@@ -1185,14 +1180,11 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode)
52 fc->fcolor[ix] = fcolor;
53
54 /* Add to file class dictionary and index array */
55- #pragma omp ordered
56 if (fcolor != RPMFC_WHITE && (fcolor & RPMFC_INCLUDE)) {
57 ftypeId = rpmstrPoolId(fc->cdict, ftype, 1);
58- #pragma omp atomic
59 fc->fknown++;
60 } else {
61 ftypeId = rpmstrPoolId(fc->cdict, "", 1);
62- #pragma omp atomic
63 fc->fwhite++;
64 }
65 /* Pool id's start from 1, for headers we want it from 0 */
diff --git a/meta/recipes-devtools/rpm/files/0001-rpmplugins.c-call-dlerror-prior-to-dlsym.patch b/meta/recipes-devtools/rpm/files/0001-rpmplugins.c-call-dlerror-prior-to-dlsym.patch
deleted file mode 100644
index 8842e3ebd7..0000000000
--- a/meta/recipes-devtools/rpm/files/0001-rpmplugins.c-call-dlerror-prior-to-dlsym.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1From 6878a83f9bac015c64d83cee42530a20a264cc5a Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Tue, 7 Jan 2020 12:02:06 +0100
4Subject: [PATCH] rpmplugins.c: call dlerror() prior to dlsym()
5
6This is the recommended way in the manpage; if there is
7a lingering error from an unrelated dl*() call that was
8never obtained via dlerror(), it needs to be cleared
9prior to calling dlsym().
10
11Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/998]
12Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
13---
14 lib/rpmplugins.c | 2 ++
15 1 file changed, 2 insertions(+)
16
17diff --git a/lib/rpmplugins.c b/lib/rpmplugins.c
18index 65e684e84..b950f85cf 100644
19--- a/lib/rpmplugins.c
20+++ b/lib/rpmplugins.c
21@@ -68,6 +68,8 @@ static rpmPlugin rpmPluginNew(const char *name, const char *path,
22
23 /* make sure the plugin has the supported hooks flag */
24 hooks_name = rstrscat(NULL, name, "_hooks", NULL);
25+ /* clear out any old errors that weren't fetched */
26+ dlerror();
27 hooks = dlsym(handle, hooks_name);
28 if ((error = dlerror()) != NULL) {
29 rpmlog(RPMLOG_ERR, _("Failed to resolve symbol %s: %s\n"),
diff --git a/meta/recipes-devtools/rpm/rpm_4.15.1.bb b/meta/recipes-devtools/rpm/rpm_4.16.0.bb
index a1c5205554..f01874fe38 100644
--- a/meta/recipes-devtools/rpm/rpm_4.15.1.bb
+++ b/meta/recipes-devtools/rpm/rpm_4.16.0.bb
@@ -22,9 +22,9 @@ 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" 24LICENSE = "GPL-2.0"
25LIC_FILES_CHKSUM = "file://COPYING;md5=c0bf017c0fd1920e6158a333acabfd4a" 25LIC_FILES_CHKSUM = "file://COPYING;md5=c4eec0c20c6034b9407a09945b48a43f"
26 26
27SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.15.x \ 27SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.16.x \
28 file://environment.d-rpm.sh \ 28 file://environment.d-rpm.sh \
29 file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \ 29 file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \
30 file://0001-Do-not-read-config-files-from-HOME.patch \ 30 file://0001-Do-not-read-config-files-from-HOME.patch \
@@ -38,14 +38,12 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.15.x \
38 file://0001-perl-disable-auto-reqs.patch \ 38 file://0001-perl-disable-auto-reqs.patch \
39 file://0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch \ 39 file://0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch \
40 file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \ 40 file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \
41 file://0001-rpmplugins.c-call-dlerror-prior-to-dlsym.patch \
42 file://0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch \
43 file://0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch \ 41 file://0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch \
44 file://0001-Bump-up-the-limit-of-signature-header-to-64MB.patch \ 42 file://0001-rpmdb.c-add-a-missing-include.patch \
45 " 43 "
46 44
47PE = "1" 45PE = "1"
48SRCREV = "ab2179452c5be276a6b96c591afded485c7e58c3" 46SRCREV = "cd7f9303ef1070f027493cad7d00bc66935af2a0"
49 47
50S = "${WORKDIR}/git" 48S = "${WORKDIR}/git"
51 49
@@ -55,6 +53,8 @@ DEPENDS_append_class-native = " file-replacement-native bzip2-replacement-native
55inherit autotools gettext pkgconfig python3native 53inherit autotools gettext pkgconfig python3native
56export PYTHON_ABI 54export PYTHON_ABI
57 55
56AUTOTOOLS_AUXDIR = "${S}/build-aux"
57
58# OE-core patches autoreconf to additionally run gnu-configize, which fails with this recipe 58# OE-core patches autoreconf to additionally run gnu-configize, which fails with this recipe
59EXTRA_AUTORECONF_append = " --exclude=gnu-configize" 59EXTRA_AUTORECONF_append = " --exclude=gnu-configize"
60 60
@@ -97,6 +97,10 @@ WRAPPER_TOOLS = " \
97 ${libdir}/rpm/rpmdeps \ 97 ${libdir}/rpm/rpmdeps \
98" 98"
99 99
100do_configure_prepend() {
101 mkdir -p ${S}/build-aux
102}
103
100do_install_append_class-native() { 104do_install_append_class-native() {
101 for tool in ${WRAPPER_TOOLS}; do 105 for tool in ${WRAPPER_TOOLS}; do
102 test -x ${D}$tool && create_wrapper ${D}$tool \ 106 test -x ${D}$tool && create_wrapper ${D}$tool \