Fix undefined symbols from plugins

This commit is contained in:
Florian Festi 2023-05-22 17:34:17 +02:00
parent 9c3f8c32e7
commit 0deb137246
2 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,28 @@
From acfe252822db37fc9f47c221c4e3ae79a5f0be27 Mon Sep 17 00:00:00 2001
From: Panu Matilainen <pmatilai@redhat.com>
Date: Mon, 22 May 2023 18:19:24 +0300
Subject: [PATCH] Fix undefined symbols from plugins in some circumstances
Another bit lost in the cmake transition: plugin linkage to librpm and
librpmio. In rpm itself this doesn't really matter because the running
process supplies the necessary symbols but it's a different story when eg
a Python process uses dlopen()'ed bindings.
---
plugins/CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt
index 6768378f9..1ca025868 100644
--- a/plugins/CMakeLists.txt
+++ b/plugins/CMakeLists.txt
@@ -40,6 +40,7 @@ set(plugindir ${CMAKE_INSTALL_FULL_LIBDIR}/rpm-plugins)
get_property(plugins DIRECTORY PROPERTY BUILDSYSTEM_TARGETS)
foreach(plugin ${plugins})
+ target_link_libraries(${plugin} PRIVATE librpmio librpm)
install(TARGETS ${plugin} DESTINATION ${plugindir})
endforeach()
--
2.40.1

View File

@ -32,7 +32,7 @@
%global rpmver 4.18.90
#global snapver rc1
%global baserelease 5
%global baserelease 6
%global sover 10
%global oldsover 9
@ -154,6 +154,7 @@ rpm-4.18.90-weak-user-group.patch
0001-Fix-bzip2-detection.patch
0001-Enable-large-file-support-on-32-bit-systems-again.patch
0001-Use-mkdir-p-for-creating-SPECPARTS-dir.patch
0001-Fix-undefined-symbols-from-plugins-in-some-circumsta.patch
# These are not yet upstream
rpm-4.7.1-geode-i686.patch
@ -649,6 +650,9 @@ fi
%doc %{_defaultdocdir}/rpm/API/
%changelog
* Mon May 22 2023 Florian Festi <ffesti@redhat.com> - 4.18.90-6
- Fix undefined symbols from plugins
* Wed May 17 2023 Florian Festi <ffesti@redhat.com> - 4.18.90-5
- Use mkdir -p for creating SPECPARTS dir