rpm/0001-Fix-undefined-symbols-...

29 lines
1015 B
Diff

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