File dnf5.spec.patch of Package dnf5
diff --git dnf5.spec dnf5.spec.new
index 4162ce2..c082cac 100644
--- dnf5.spec
+++ dnf5.spec.new
@@ -20,7 +20,7 @@
# ========== build options ==========
%bcond_with as_microdnf
-%bcond_with as_dnf
+%bcond_without as_dnf
%bcond_with as_yum
%bcond_without dnf5daemon_client
@@ -40,8 +40,7 @@
%bcond_with html
%bcond_without man
-# openSUSE requires this
-%bcond_without static_libsolv
+%bcond_with static_libsolv
# TODO Go bindings fail to build, disable for now
%bcond_with go
@@ -99,7 +98,7 @@ Patch1003: dnf5-disable-Werror.patch
Requires: %{libcliname}%{?_isa} = %{version}-%{release}
Requires: %{libname}%{?_isa} = %{version}-%{release}
-Requires: dnf-data
+Requires: system-release
Recommends: bash-completion
%if %{with plugin_expired_pgp_keys}
@@ -295,6 +294,7 @@ It supports RPM packages, modulemd modules, and comps groups & environments.
%if %{with as_dnf}
%{_bindir}/dnf
%{_mandir}/man?/dnf-*
+%{_mandir}/man?/dnf.*
%{_unitdir}/dnf-makecache.service
%{_unitdir}/dnf-makecache.timer
%endif
@@ -323,8 +323,6 @@ It supports RPM packages, modulemd modules, and comps groups & environments.
%if %{with as_dnf}
%{_datadir}/bash-completion/completions/dnf
%endif
-%dir %{_prefix}/lib/sysimage/dnf
-%verify(not md5 size mtime) %ghost %{_prefix}/lib/sysimage/dnf/*
%license COPYING.md
%license gpl-2.0.txt
%{_mandir}/man8/dnf5.8.*
@@ -396,6 +394,7 @@ Package management library.
%{_libdir}/libdnf5.so.%{libsoversion}
%license lgpl-2.1.txt
%ghost %attr(0755, root, root) %dir %{_var}/cache/libdnf5
+%config(noreplace) %{_sysconfdir}/dnf/dnf.conf
%dir %{_prefix}/lib/sysimage/libdnf5
%attr(0755, root, root) %ghost %dir %{_prefix}/lib/sysimage/libdnf5/comps_groups
%verify(not md5 size mtime) %attr(0644, root, root) %ghost %{_prefix}/lib/sysimage/libdnf5/environments.toml
@@ -417,6 +416,7 @@ Package management library.
%dir %{_libdir}/libdnf5/plugins
%dir %{_datadir}/dnf5/repos.d
%dir %{_datadir}/dnf5/vars.d
+%dir %{_sysconfdir}/dnf/protected.d
# ========== libdnf5-cli ==========
@@ -702,7 +702,6 @@ License: GPL-2.0-or-later
Requires: %{libcliname}%{?_isa} = %{version}-%{release}
Requires: %{libname}%{?_isa} = %{version}-%{release}
Requires: dbus-1-common
-Requires: dnf-data
Requires: polkit
%description -n dnf5daemon-server
@@ -827,7 +826,7 @@ automatically and regularly from systemd timers, cron jobs or similar.
-DWITH_DNF5DAEMON_SERVER=%{?with_dnf5daemon_server:ON}%{!?with_dnf5daemon_server:OFF} \
-DWITH_LIBDNF5_CLI=%{?with_libdnf_cli:ON}%{!?with_libdnf_cli:OFF} \
-DWITH_DNF5=%{?with_dnf5:ON}%{!?with_dnf5:OFF} \
- -DWITH_DNF5_OBSOLETES_DNF=OFF \
+ -DWITH_DNF5_OBSOLETES_DNF=ON \
-DWITH_PLUGIN_ACTIONS=%{?with_plugin_actions:ON}%{!?with_plugin_actions:OFF} \
-DWITH_PLUGIN_APPSTREAM=%{?with_plugin_appstream:ON}%{!?with_plugin_appstream:OFF} \
-DWITH_PLUGIN_EXPIRED_PGP_KEYS=%{?with_plugin_expired_pgp_keys:ON}%{!?with_plugin_expired_pgp_keys:OFF} \
@@ -864,16 +863,8 @@ automatically and regularly from systemd timers, cron jobs or similar.
%install
%cmake_install
-# own dirs and files that dnf5 creates on runtime
-mkdir -p %{buildroot}%{_prefix}/lib/sysimage/dnf
-for files in \
- groups.toml modules.toml nevras.toml packages.toml \
- system.toml transaction_history.sqlite \
- transaction_history.sqlite-shm \
- transaction_history.sqlite-wal userinstalled.toml
-do
- touch %{buildroot}%{_prefix}/lib/sysimage/dnf/$files
-done
+# protected
+mkdir -p %{buildroot}%{_sysconfdir}/dnf/protected.d
# own the offline transaction target
mkdir -p %{buildroot}%{_unitdir}/system-update.target.wants/
@@ -897,9 +888,6 @@ popd
%find_lang libdnf5-plugin-actions
%find_lang libdnf5-plugin-expired-pgp-keys
-# Let's not replace what dnf-data offers just yet..
-rm %{buildroot}%{_sysconfdir}/dnf/dnf.conf
-
%if %{with as_microdnf}
ln -sr %{buildroot}%{_bindir}/dnf5 %{buildroot}%{_bindir}/microdnf
%endif