Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify dnf and microdnf obsoletes for RHEL #780

Merged
merged 2 commits into from
Aug 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions dnf5.spec
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ Source0: %{url}/archive/%{version}/dnf5-%{version}.tar.gz

Requires: libdnf5%{?_isa} = %{version}-%{release}
Requires: libdnf5-cli%{?_isa} = %{version}-%{release}
%if ! (0%{?fedora} > 38 || 0%{?rhel} > 9)
%if ! (0%{?fedora} > 40 || 0%{?rhel} > 10)
Requires: dnf-data
%endif
Recommends: bash-completion

# Remove if condition when Fedora 37 is EOL
%if 0%{?fedora} > 37 || 0%{?rhel} > 9
%if 0%{?fedora} > 37 || 0%{?rhel} > 10
Provides: microdnf = %{version}-%{release}
Obsoletes: microdnf < 4
%endif

%if 0%{?fedora} > 38 || 0%{?rhel} > 9
%if 0%{?fedora} > 40 || 0%{?rhel} > 10
Provides: dnf = %{version}-%{release}
Obsoletes: dnf < 5

Expand Down Expand Up @@ -217,13 +217,13 @@ It supports RPM packages, modulemd modules, and comps groups & environments.

%files
%{_bindir}/dnf5
%if 0%{?fedora} > 38 || 0%{?rhel} > 9
%if 0%{?fedora} > 40 || 0%{?rhel} > 10
%{_bindir}/dnf
%{_bindir}/yum
%endif

# Remove if condition when Fedora 37 is EOL
%if 0%{?fedora} > 37 || 0%{?rhel} > 9
%if 0%{?fedora} > 37 || 0%{?rhel} > 10
%{_bindir}/microdnf
%endif

Expand Down Expand Up @@ -283,15 +283,15 @@ License: LGPL-2.1-or-later
Requires: libsolv%{?_isa} >= %{libsolv_version}
Requires: librepo%{?_isa} >= %{librepo_version}
Requires: sqlite-libs%{?_isa} >= %{sqlite_version}
%if 0%{?fedora} > 38 || 0%{?rhel} > 9
%if 0%{?fedora} > 40 || 0%{?rhel} > 10
Conflicts: dnf-data < 4.16.0
%endif

%description -n libdnf5
Package management library.

%files -n libdnf5
%if 0%{?fedora} > 38 || 0%{?rhel} > 9
%if 0%{?fedora} > 40 || 0%{?rhel} > 10
%config(noreplace) %{_sysconfdir}/dnf/dnf.conf
%dir %{_sysconfdir}/dnf/vars
%dir %{_sysconfdir}/dnf/protected.d
Expand Down Expand Up @@ -566,7 +566,7 @@ Requires: libdnf5%{?_isa} = %{version}-%{release}
Requires: libdnf5-cli%{?_isa} = %{version}-%{release}
Requires: dbus
Requires: polkit
%if ! (0%{?fedora} > 38 || 0%{?rhel} > 9)
%if ! (0%{?fedora} > 40 || 0%{?rhel} > 10)
Requires: dnf-data
%endif

Expand Down Expand Up @@ -672,7 +672,7 @@ Core DNF5 plugins that enhance dnf5 with builddep, changelog, copr, and repoclos
%install
%cmake_install

%if 0%{?fedora} > 38 || 0%{?rhel} > 9
%if 0%{?fedora} > 40 || 0%{?rhel} > 10
ln -sr %{buildroot}%{_bindir}/dnf5 %{buildroot}%{_bindir}/dnf
ln -sr %{buildroot}%{_bindir}/dnf5 %{buildroot}%{_bindir}/yum
%endif
Expand All @@ -691,7 +691,7 @@ done
#find_lang {name}

# Remove if condition when Fedora 37 is EOL
%if 0%{?fedora} > 37 || 0%{?rhel} > 9
%if 0%{?fedora} > 37 || 0%{?rhel} > 10
ln -sr %{buildroot}%{_bindir}/dnf5 %{buildroot}%{_bindir}/microdnf
%endif

Expand Down
Loading