summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2020-01-14 14:59:49 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-16 22:33:09 +0000
commit0e70fac8fe9dab4381e921f110bac301c10a470c (patch)
tree009ae44a1dc675a061f1f208d83d94cd874930f8 /meta
parent8f2f1af3630264f34f454dab71861e64c820f6db (diff)
downloadpoky-0e70fac8fe9dab4381e921f110bac301c10a470c.tar.gz
rpm: fix with musl and latest elfutils.
(From OE-Core rev: 3ce81a8cfafb0fc04c61872a5d861c55560cd0bf) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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.14.2.1.bb1
2 files changed, 30 insertions, 0 deletions
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
new file mode 100644
index 0000000000..8842e3ebd7
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-rpmplugins.c-call-dlerror-prior-to-dlsym.patch
@@ -0,0 +1,29 @@
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.14.2.1.bb b/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
index 339bd7b834..17255dc87a 100644
--- a/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
+++ b/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
@@ -43,6 +43,7 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
43 file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \ 43 file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \
44 file://0001-mono-find-provides-requires-do-not-use-monodis-from-.patch \ 44 file://0001-mono-find-provides-requires-do-not-use-monodis-from-.patch \
45 file://0001-Rip-out-partial-support-for-unused-MD2-and-RIPEMD160.patch \ 45 file://0001-Rip-out-partial-support-for-unused-MD2-and-RIPEMD160.patch \
46 file://0001-rpmplugins.c-call-dlerror-prior-to-dlsym.patch \
46 " 47 "
47 48
48PE = "1" 49PE = "1"