From 69180a5d3770132c213f583fc7aa934bbf310e0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Tue, 13 Aug 2024 13:39:39 +0200 Subject: [PATCH 1/4] spec: Move /var/cache/dnf from dnf to python3-dnf The cache directory is used by /usr/bin/dnf-3 program packaged in python3-dnf. dnf package requires python3-dnf. --- dnf.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dnf.spec b/dnf.spec index 73a81f2fe9..5d55764976 100644 --- a/dnf.spec +++ b/dnf.spec @@ -301,7 +301,6 @@ popd %{_mandir}/man5/dnf-transaction-json.5* %{_unitdir}/%{name}-makecache.service %{_unitdir}/%{name}-makecache.timer -%{_var}/cache/%{name}/ %files data %license COPYING PACKAGE-LICENSING @@ -394,6 +393,7 @@ popd %{python3_sitelib}/%{name}/ %dir %{py3pluginpath} %dir %{py3pluginpath}/__pycache__ +%{_var}/cache/%{name}/ %files automatic %{_bindir}/%{name}-automatic From f89f14ef8baa5e3ea404f3fdf17290b05e40a580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Tue, 13 Aug 2024 15:03:22 +0200 Subject: [PATCH 2/4] spec: Remove preview yum_compat_level CMake build script stopped creating yum4 executable when Python 2 support was removed with commit 92f03d1e13eec0c52ba1e3983c95fcc4b6101613 ([spec] Remove python 2). Therefore the preview level cannot be enabled anymore and this patch removes it to simplify the spec file. --- dnf.spec | 8 -------- 1 file changed, 8 deletions(-) diff --git a/dnf.spec b/dnf.spec index 5d55764976..63918e7ba6 100644 --- a/dnf.spec +++ b/dnf.spec @@ -34,7 +34,6 @@ # level=full -> deploy all compat symlinks (conflicts with yum < 4) # level=minimal -> deploy a subset of compat symlinks only # (no conflict with yum >= 3.4.3-505)* -# level=preview -> minimal level with altered paths (no conflict with yum < 4) # *release 505 renamed /usr/bin/yum to /usr/bin/yum-deprecated %global yum_compat_level full %global yum_subpackage_name yum @@ -48,7 +47,6 @@ %endif %endif %if 0%{?rhel} && 0%{?rhel} <= 7 - %global yum_compat_level preview %global yum_subpackage_name nextgen-yum4 %endif @@ -372,12 +370,6 @@ popd %{_mandir}/man8/yum.8* %endif -%if "%{yum_compat_level}" == "preview" -%{_bindir}/yum4 -%{_mandir}/man8/yum4.8* -%exclude %{_mandir}/man8/yum.8* -%endif - %files -n python3-%{name} %{_bindir}/%{name}-3 %{_bindir}/%{name}4 From 65a19c6f15c5bb08e0e0246dc62167743e5b8171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Tue, 13 Aug 2024 16:51:06 +0200 Subject: [PATCH 3/4] spec: Simplify %files dnf section for both yum_compat_levels Miminal level is a subset of full level. --- dnf.spec | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/dnf.spec b/dnf.spec index 63918e7ba6..51dfee67d8 100644 --- a/dnf.spec +++ b/dnf.spec @@ -334,13 +334,13 @@ popd %{_tmpfilesdir}/%{name}.conf %files -n %{yum_subpackage_name} -%if "%{yum_compat_level}" == "full" %{_bindir}/yum +%{_mandir}/man8/yum.8* +%if "%{yum_compat_level}" == "full" %{_sysconfdir}/yum.conf %{_sysconfdir}/yum/pluginconf.d %{_sysconfdir}/yum/protected.d %{_sysconfdir}/yum/vars -%{_mandir}/man8/yum.8* %{_mandir}/man5/yum.conf.5.* %{_mandir}/man8/yum-shell.8* %{_mandir}/man1/yum-aliases.1* @@ -365,11 +365,6 @@ popd %exclude %{_mandir}/man1/yum-aliases.1* %endif -%if "%{yum_compat_level}" == "minimal" -%{_bindir}/yum -%{_mandir}/man8/yum.8* -%endif - %files -n python3-%{name} %{_bindir}/%{name}-3 %{_bindir}/%{name}4 From e053f8529ea087384f3c5de886e4059cd097cd24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Tue, 13 Aug 2024 17:15:51 +0200 Subject: [PATCH 4/4] spec: Fix ownership of /etc/yum tree This patch fixes two mistakes: (1) In minimal yum_compat_levels (default one) rpmbuild complained: RPM build warnings: File not found: /home/test/rpmbuild/BUILDROOT/dnf-4.21.0-4.fc40.x86_64/etc/yum/pluginconf.d File not found: /home/test/rpmbuild/BUILDROOT/dnf-4.21.0-4.fc40.x86_64/etc/yum/protected.d File not found: /home/test/rpmbuild/BUILDROOT/dnf-4.21.0-4.fc40.x86_64/etc/yum/vars (2) In full yum_compat_levels /etc/yum directory was not owned by yum package --- dnf.spec | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/dnf.spec b/dnf.spec index 51dfee67d8..7504002d75 100644 --- a/dnf.spec +++ b/dnf.spec @@ -337,10 +337,8 @@ popd %{_bindir}/yum %{_mandir}/man8/yum.8* %if "%{yum_compat_level}" == "full" +%{_sysconfdir}/yum %{_sysconfdir}/yum.conf -%{_sysconfdir}/yum/pluginconf.d -%{_sysconfdir}/yum/protected.d -%{_sysconfdir}/yum/vars %{_mandir}/man5/yum.conf.5.* %{_mandir}/man8/yum-shell.8* %{_mandir}/man1/yum-aliases.1* @@ -356,9 +354,6 @@ popd %endif %else %exclude %{_sysconfdir}/yum.conf -%exclude %{_sysconfdir}/yum/pluginconf.d -%exclude %{_sysconfdir}/yum/protected.d -%exclude %{_sysconfdir}/yum/vars %exclude %{confdir}/protected.d/yum.conf %exclude %{_mandir}/man5/yum.conf.5.* %exclude %{_mandir}/man8/yum-shell.8*