SHA256
1
0
forked from pool/dnf5
Files
dnf5/dnf5-with-static-libsolvext.patch
Neal Gompa 2852332c80 - Update to 5.2.3.0
+ Update translations from weblate
  + const: Shared constant defining RPM transaction lock file
  + main: Implement checking of privileges before executing commands
  + exception: Add new exception for user insufficient privileges
  + locker: Move to public API
  + distro-sync: Add downloadonly option
  + commands: Fix using store option
  + Enhance warning about RPMs that were not validate by RPM
  + Vars::substitute: fix use-out-of-scope leaks
  + docs: correct the default for pluginconfpath
  + cli: Add skipped packages to the transaction table
  + i18n: Improve formatting an error message for multiple streams
  + Add/fix documentation for rpm::PackageQuery methods
  + i18n: Unwind "No {} to remove for argument: {}"
  + `history list`: count also groups and envs in total `Altered`
  + Fix typo in translatable string
  + [libdnf5] Actions plugin: Add hooks `repos_configured`, `repos_loaded`, `pre/post_add_cmdline_packages`
  + Option `--providers-of` doesn't require available repos
  + Improve docs regarding the keepcache option and download command
  + needs_restarting: Fix invalid reference usage
  + download: add `--source` alias for `--srpm`
  + automatic: Fix documentation and ship config file
  + fix: quote `dnf5-command({})' in command suggestion when plugin not found
  + i18n: Unwind "Cannot {} package \"{}\"" message
  + base: Add repository to solver problem messages
  + conf: New classes for append options
  + docs: Document changes to repoinfo and repolist
  + dnf5daemon: The buildtime attribute has been added to the package_attrs option
  + bindings: Tests for using struct attributes in Python
  + bindings: Add Python attributes for structs
  + docs: Fix diff link on the dnf 5.2.0.0 changes page
  + docs: Add diff with API changes in dnf5-5.2.0.0
  + docs: Add a page about public API changes in dnf 5.2.0.0
  + system-upgrade: fix missing \n before transaction test
  + system-upgrade: comment to clarify progress bar logic
  + system-upgrade: drop [[maybe_unused]] from reboot() arg
  + system-upgrade: fix progress bars, set transaction description
  + system-upgrade: adapt to new transaction serialization format
  + system-upgrade: clean up releasever logic
  + system-upgrade: fix poweroff_after
  + copr: the dnf5 copr enable sets CoprRepoPart.enabled = true
  + Add file search result for repoquery --whatprovides
  + doc: Add enviroment variables and clarify options for loading the plugins
  + dnfdaemon: Fix Rpm interface introspection file
- Refresh patches
  + dnf5-with-static-libsolvext.patch
  + dnf5-Use-usr-lib-sysimage-for-the-persistent-state-dir.patch
  + dnf5-Switch-default-reposdir-to-etc-dnf-repos.d.patch
  + dnf5-disable-Werror.patch

OBS-URL: https://build.opensuse.org/package/show/system:packagemanager:dnf/dnf5?expand=0&rev=20
2024-06-08 13:34:10 +00:00

68 lines
2.7 KiB
Diff

From ead23935896021491771553e73a43f8adc844520 Mon Sep 17 00:00:00 2001
From: Neal Gompa <ngompa@opensuse.org>
Date: Thu, 21 Sep 2023 05:50:40 -0400
Subject: [PATCH] Add build option to link libsolvext dynamic library
dependencies
libsolv, when built only build with static link libraries, does not
make a fully usable configuration for static libsolvext to be used
because the CMake and pkgconfig files do not declare the appropriate
libraries to successfully link a static libsolvext that has dynamic library
dependencies.
This patch works around it by doing the declarations here rather than
in libsolv, since it's not easy to fix there, given upstream constraints.
---
CMakeLists.txt | 3 +++
libdnf5/CMakeLists.txt | 20 +++++++++++++++++++-
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5bc551a7..3014b3e0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -56,6 +56,9 @@ option(WITH_PERL5 "Build Perl 5 bindings" ON)
option(WITH_PYTHON3 "Build Python 3 bindings" ON)
option(WITH_RUBY "Build Ruby bindings" ON)
+# build options - other
+option(WITH_STATIC_LIBSOLV "Link with dependencies of static libsolvext library" OFF)
+
if(WITH_PERFORMANCE_TESTS AND WITH_SANITIZERS)
message(FATAL_ERROR "Cannot perform performance tests with sanitizers enabled because they influence the results. Disable sanitizers to continue.")
diff --git a/libdnf5/CMakeLists.txt b/libdnf5/CMakeLists.txt
index 237ac9e4..7151c63a 100644
--- a/libdnf5/CMakeLists.txt
+++ b/libdnf5/CMakeLists.txt
@@ -63,7 +63,25 @@ pkg_check_modules(RPM REQUIRED rpm>=4.17.0)
list(APPEND LIBDNF5_PC_REQUIRES "${RPM_MODULE_NAME}")
target_link_libraries(libdnf5 PRIVATE ${RPM_LIBRARIES})
-if(WITH_COMPS)
+if(WITH_STATIC_LIBSOLV)
+ pkg_check_modules(BZIP2 REQUIRED bzip2)
+ list(APPEND LIBDNF5_PC_REQUIRES_PRIVATE "${BZIP2_MODULE_NAME}")
+ target_link_libraries(libdnf5 PRIVATE ${BZIP2_LIBRARIES})
+
+ pkg_check_modules(LZMA REQUIRED liblzma)
+ list(APPEND LIBDNF5_PC_REQUIRES_PRIVATE "${LZMA_MODULE_NAME}")
+ target_link_libraries(libdnf5 PRIVATE ${LZMA_LIBRARIES})
+
+ pkg_check_modules(ZLIB REQUIRED zlib)
+ list(APPEND LIBDNF5_PC_REQUIRES_PRIVATE "${ZLIB_MODULE_NAME}")
+ target_link_libraries(libdnf5 PRIVATE ${ZLIB_LIBRARIES})
+
+ pkg_check_modules(ZSTD REQUIRED libzstd)
+ list(APPEND LIBDNF5_PC_REQUIRES_PRIVATE "${ZSTD_MODULE_NAME}")
+ target_link_libraries(libdnf5 PRIVATE ${ZSTD_LIBRARIES})
+endif()
+
+if(WITH_COMPS OR WITH_STATIC_LIBSOLV)
pkg_check_modules(LIBXML2 REQUIRED libxml-2.0)
list(APPEND LIBDNF5_PC_REQUIRES_PRIVATE "${LIBXML2_MODULE_NAME}")
include_directories(${LIBXML2_INCLUDE_DIRS})
--
2.45.1