Skip to content

Commit

Permalink
Base: Add support for repository configuration in /usr
Browse files Browse the repository at this point in the history
This enables shipping packaged repositories and variables in /usr,
freeing up /etc for exclusively user-added repository configuration.
  • Loading branch information
Conan-Kudo committed Sep 12, 2023
1 parent 1bd9736 commit 47e36c7
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions dnf5.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion dnf5/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
Empty file.
Empty file.
5 changes: 3 additions & 2 deletions include/libdnf5/conf/const.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string> REPOSITORY_CONF_DIRS{"/etc/yum.repos.d", "/etc/distro.repos.d"};
const std::vector<std::string> 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<std::string> VARS_DIRS{"/etc/dnf/vars"};
const std::vector<std::string> VARS_DIRS{"/usr/share/dnf5/vars.d", "/etc/dnf/vars"};

const std::vector<std::string> GROUP_PACKAGE_TYPES{"mandatory", "default", "conditional"};
const std::vector<std::string> INSTALLONLYPKGS{
Expand Down

0 comments on commit 47e36c7

Please sign in to comment.