Skip to content

Commit d748a42

Browse files
committed
spec: Remove support for RHEL <= 7
In the mean time the spec file started to use %bcond and %elif macros and build-require cmake >= 3.5.0. None of that exists in RHEL 7.
1 parent ab1a0d5 commit d748a42

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

dnf.spec

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,6 @@
1111

1212
%bcond dnf5_obsoletes_dnf %[0%{?fedora} > 40 || 0%{?rhel} > 10]
1313

14-
# override dependencies for rhel 7
15-
%if 0%{?rhel} == 7
16-
%global rpm_version 4.11.3-32
17-
%endif
18-
19-
%if 0%{?rhel} == 7 && 0%{?centos}
20-
%global rpm_version 4.11.3-25.el7.centos.1
21-
%endif
22-
2314
# override dependencies for fedora 26
2415
%if 0%{?fedora} == 26
2516
%global rpm_version 4.13.0.1-7
@@ -43,9 +34,6 @@
4334
%global yum_subpackage_name %{name}-yum
4435
%endif
4536
%endif
46-
%if 0%{?rhel} && 0%{?rhel} <= 7
47-
%global yum_subpackage_name nextgen-yum4
48-
%endif
4937

5038
# paths
5139
%global confdir %{_sysconfdir}/%{name}
@@ -82,10 +70,7 @@ BuildRequires: bash-completion
8270
Requires: coreutils
8371
BuildRequires: %{_bindir}/sphinx-build-3
8472
Requires: python3-%{name} = %{version}-%{release}
85-
%if 0%{?rhel} && 0%{?rhel} <= 7
86-
Requires: python-dbus
87-
Requires: %{_bindir}/sqlite3
88-
%elif 0%{?fedora}
73+
%if 0%{?fedora}
8974
Recommends: (%{_bindir}/sqlite3 if (bash-completion and python3-dnf-plugins-core))
9075
%else
9176
Recommends: (python3-dbus if NetworkManager)
@@ -145,11 +130,7 @@ Requires: python3-libcomps >= %{libcomps_version}
145130
Requires: python3-libdnf
146131
BuildRequires: python3-rpm >= %{rpm_version}
147132
Requires: python3-rpm >= %{rpm_version}
148-
%if 0%{?rhel} && 0%{?rhel} <= 7
149-
Requires: rpm-plugin-systemd-inhibit
150-
%else
151133
Recommends: (rpm-plugin-systemd-inhibit if systemd)
152-
%endif
153134
Provides: dnf4 = %{version}-%{release}
154135
Provides: dnf-command(alias)
155136
Provides: dnf-command(autoremove)
@@ -313,11 +294,7 @@ fi
313294
%if %{without dnf5_obsoletes_dnf}
314295
%files -f %{name}.lang
315296
%{_bindir}/%{name}
316-
%if 0%{?rhel} && 0%{?rhel} <= 7
317-
%{_sysconfdir}/bash_completion.d/%{name}
318-
%else
319297
%{_datadir}/bash-completion/completions/%{name}
320-
%endif
321298
%{_mandir}/man8/%{name}.8*
322299
%{_mandir}/man8/yum2dnf.8*
323300
%{_mandir}/man7/dnf.modularity.7*

0 commit comments

Comments
 (0)