Fixes of conditions in spec file

This commit is contained in:
Jan Kolarik 2023-08-16 15:59:05 +02:00
parent bd77820052
commit 3fd889b17b

View File

@ -12,7 +12,7 @@
%global conflicts_dnf_plugins_extras_version 4.0.4 %global conflicts_dnf_plugins_extras_version 4.0.4
%global conflicts_dnfdaemon_version 0.3.19 %global conflicts_dnfdaemon_version 0.3.19
%bcond obsolete_dnf %[0%{?fedora} > 40 || 0%{?rhel} > 10] %bcond dnf5_obsoletes_dnf %[0%{?fedora} > 40 || 0%{?rhel} > 10]
# override dependencies for rhel 7 # override dependencies for rhel 7
%if 0%{?rhel} == 7 %if 0%{?rhel} == 7
@ -68,7 +68,7 @@ It supports RPMs, modules and comps groups & environments.
Name: dnf Name: dnf
Version: 4.16.2 Version: 4.16.2
Release: 3%{?dist} Release: 4%{?dist}
Summary: %{pkg_summary} Summary: %{pkg_summary}
# For a breakdown of the licensing, see PACKAGE-LICENSING # For a breakdown of the licensing, see PACKAGE-LICENSING
License: GPL-2.0-or-later AND GPL-1.0-only License: GPL-2.0-or-later AND GPL-1.0-only
@ -97,7 +97,7 @@ Conflicts: python3-dnf-plugins-extras-common < %{conflicts_dnf_plugins_extr
%package data %package data
Summary: Common data and configuration files for DNF Summary: Common data and configuration files for DNF
Requires: libreport-filesystem Requires: libreport-filesystem
%if %{without obsolete_dnf} %if %{with dnf5_obsoletes_dnf}
Requires: /etc/dnf/dnf.conf Requires: /etc/dnf/dnf.conf
%endif %endif
Obsoletes: %{name}-conf <= %{version}-%{release} Obsoletes: %{name}-conf <= %{version}-%{release}
@ -237,7 +237,7 @@ ln -sr %{buildroot}%{confdir}/protected.d %{buildroot}%{_sysconfdir}/yum/protec
ln -sr %{buildroot}%{confdir}/vars %{buildroot}%{_sysconfdir}/yum/vars ln -sr %{buildroot}%{confdir}/vars %{buildroot}%{_sysconfdir}/yum/vars
%endif %endif
%if %{without obsolete_dnf} %if %{with dnf5_obsoletes_dnf}
rm %{buildroot}%{confdir}/%{name}.conf rm %{buildroot}%{confdir}/%{name}.conf
%endif %endif
@ -292,13 +292,13 @@ popd
%dir %{confdir}/modules.d %dir %{confdir}/modules.d
%dir %{confdir}/modules.defaults.d %dir %{confdir}/modules.defaults.d
%dir %{pluginconfpath} %dir %{pluginconfpath}
%if %{with obsolete_dnf} %if %{without dnf5_obsoletes_dnf}
%dir %{confdir}/protected.d %dir %{confdir}/protected.d
%dir %{confdir}/vars %dir %{confdir}/vars
%endif %endif
%dir %{confdir}/aliases.d %dir %{confdir}/aliases.d
%exclude %{confdir}/aliases.d/zypper.conf %exclude %{confdir}/aliases.d/zypper.conf
%if %{with obsolete_dnf} %if %{without dnf5_obsoletes_dnf}
%config(noreplace) %{confdir}/%{name}.conf %config(noreplace) %{confdir}/%{name}.conf
%endif %endif
@ -382,6 +382,9 @@ popd
%{python3_sitelib}/%{name}/automatic/ %{python3_sitelib}/%{name}/automatic/
%changelog %changelog
* Wed Aug 16 2023 Jan Kolarik <jkolarik@redhat.com> - 4.16.2-4
- Fixes of conditions in spec file
* Wed Aug 16 2023 Jan Kolarik <jkolarik@redhat.com> - 4.16.2-3 * Wed Aug 16 2023 Jan Kolarik <jkolarik@redhat.com> - 4.16.2-3
- Configure copr repo dnf5-testing - Configure copr repo dnf5-testing