From 5cc72c6c490c82604d83fc8d8ec262d854617d2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Thu, 19 Sep 2024 11:13:13 +0200 Subject: [PATCH] Do not install /var/cache/libdnf5 directory Bootc systems tend to prune /var directory . That breaks verifying integrity with "rpm --verify libdnf5". This patch stops installing /var/cache/libdnf5 directory, but keeps tracking it by libdn5 RPM package. The directory is created by libdnf5 whenever it is needed. Related: https://bugzilla.redhat.com/show_bug.cgi?id=2313032 --- dnf5.spec | 2 +- libdnf5/CMakeLists.txt | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/dnf5.spec b/dnf5.spec index 281afbe1a..dbc550bd5 100644 --- a/dnf5.spec +++ b/dnf5.spec @@ -381,7 +381,7 @@ Package management library. %dir %{_libdir}/libdnf5 %{_libdir}/libdnf5.so.2* %license lgpl-2.1.txt -%{_var}/cache/libdnf5/ +%ghost %attr(0755, root, root) %dir %{_var}/cache/libdnf5 # ========== libdnf5-cli ========== diff --git a/libdnf5/CMakeLists.txt b/libdnf5/CMakeLists.txt index c5c4c4805..d360901ee 100644 --- a/libdnf5/CMakeLists.txt +++ b/libdnf5/CMakeLists.txt @@ -142,9 +142,6 @@ list(JOIN LIBDNF5_PC_REQUIRES_PRIVATE ", " LIBDNF5_PC_REQUIRES_PRIVATE_STRING) configure_file("libdnf5.pc.in" ${CMAKE_CURRENT_BINARY_DIR}/libdnf5.pc @ONLY) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libdnf5.pc DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig) -# Makes an empty directory for libdnf5 cache -install(DIRECTORY DESTINATION "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/cache/libdnf5") - # Makes an empty directory for libdnf5 distribution drop-in configuration files install(DIRECTORY DESTINATION "${CMAKE_INSTALL_PREFIX}/share/dnf5/libdnf.conf.d")