diff --git a/dnf5.spec b/dnf5.spec index 20bf358de..de8622430 100644 --- a/dnf5.spec +++ b/dnf5.spec @@ -305,6 +305,8 @@ Package management library. %dir %{_datadir}/dnf5/repos.override.d %dir %{_sysconfdir}/dnf/repos.override.d %dir %{_sysconfdir}/dnf/libdnf5-plugins +%dir %{_datadir}/dnf5/repos.d +%dir %{_datadir}/dnf5/vars.d %dir %{_libdir}/libdnf5 %{_libdir}/libdnf5.so.1* %license lgpl-2.1.txt diff --git a/dnf5/CMakeLists.txt b/dnf5/CMakeLists.txt index 4792f85b4..9b68e5407 100644 --- a/dnf5/CMakeLists.txt +++ b/dnf5/CMakeLists.txt @@ -42,7 +42,7 @@ endif() install(FILES bash-completion/dnf5 DESTINATION ${BASH_COMPLETION_COMPLETIONSDIR}) install(FILES "README.plugins" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/dnf5/plugins" RENAME "README") -install(DIRECTORY "config/usr/" DESTINATION "${CMAKE_INSTALL_PREFIX}") +install(DIRECTORY "config/usr/" DESTINATION "${CMAKE_INSTALL_PREFIX}" PATTERN ".gitkeep" EXCLUDE) install(DIRECTORY "config/etc/" DESTINATION "${CMAKE_INSTALL_FULL_SYSCONFDIR}" PATTERN ".gitkeep" EXCLUDE) diff --git a/dnf5/config/usr/share/dnf5/repos.d/.gitkeep b/dnf5/config/usr/share/dnf5/repos.d/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dnf5/config/usr/share/dnf5/vars.d/.gitkeep b/dnf5/config/usr/share/dnf5/vars.d/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/include/libdnf5/conf/const.hpp b/include/libdnf5/conf/const.hpp index 74e1813e3..6f64a6789 100644 --- a/include/libdnf5/conf/const.hpp +++ b/include/libdnf5/conf/const.hpp @@ -36,11 +36,12 @@ constexpr const char * CONF_DIRECTORY = "/etc/dnf/libdnf5.conf.d"; constexpr const char * PLUGINS_CONF_DIR = "/etc/dnf/libdnf5-plugins"; -const std::vector REPOSITORY_CONF_DIRS{"/etc/yum.repos.d", "/etc/distro.repos.d"}; +const std::vector REPOSITORY_CONF_DIRS{ + "/etc/yum.repos.d", "/etc/distro.repos.d", "/usr/share/dnf5/repos.d"}; constexpr const char * REPOS_OVERRIDE_DIR = "/etc/dnf/repos.override.d"; // More important varsdirs must be on the end of vector -const std::vector VARS_DIRS{"/etc/dnf/vars"}; +const std::vector VARS_DIRS{"/usr/share/dnf5/vars.d", "/etc/dnf/vars"}; const std::vector GROUP_PACKAGE_TYPES{"mandatory", "default", "conditional"}; const std::vector INSTALLONLYPKGS{