tools: Remove obsolete firewalld service special cases

All master-supported Fedora/RHEL 8 releases have firewalld >= 0.6.0 now,
clean up the older version special cases in the spec.

Now we only need our own for Debian 9 and Ubuntu 18.04 backports. Drop
Debian 8 and Ubuntu 16.04 special cases as master does not support them
any more.
This commit is contained in:
Martin Pitt 2019-06-26 07:53:50 +02:00 committed by Martin Pitt
parent 1a6c38d52e
commit d7c33be0cd
2 changed files with 2 additions and 20 deletions

View File

@ -41,13 +41,6 @@
# build optional extensions like cockpit-docker
%define build_optional 1
# cockpit's firewall service definition moved to firewalld
%if 0%{?fedora} || 0%{?rhel} >= 8
%define firewalld_service 0
%else
%define firewalld_service 1
%endif
%define __lib lib
# on RHEL 7.x we build subscriptions; superseded later by
@ -162,9 +155,8 @@ make install-tests DESTDIR=%{buildroot}
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d
install -p -m 644 tools/cockpit.pam $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/cockpit
rm -f %{buildroot}/%{_libdir}/cockpit/*.so
%if 0%{?firewalld_service} == 0
# shipped in firewalld since 0.6, everywhere in Fedora/RHEL 8
rm -f %{buildroot}/%{_prefix}/%{__lib}/firewalld/services/cockpit.xml
%endif
install -p -m 644 AUTHORS COPYING README.md %{buildroot}%{_docdir}/cockpit/
# Build the package lists for resource packages
@ -440,14 +432,7 @@ Summary: Cockpit Web Service
Requires: glib-networking
Requires: openssl
Requires: glib2 >= 2.37.4
# RHEL/CentOS 7 has firewalld 0.6.x, but does not ship cockpit service
%if 0%{?rhel} != 7
%if 0%{?firewalld_service}
Conflicts: firewalld >= 0.6.0-1
%else
Conflicts: firewalld < 0.6.0-1
%endif
%endif
%if 0%{?fedora} || 0%{?rhel} >= 8
Recommends: sscg >= 2.3
Recommends: system-logos
@ -474,9 +459,6 @@ The Cockpit Web Service listens on the network, and authenticates users.
%{_unitdir}/cockpit.service
%{_unitdir}/cockpit-motd.service
%{_unitdir}/cockpit.socket
%if 0%{?firewalld_service}
%{_prefix}/%{__lib}/firewalld/services/cockpit.xml
%endif
%{_prefix}/%{__lib}/tmpfiles.d/cockpit-tempfiles.conf
%{_sbindir}/remotectl
%{_libdir}/security/pam_ssh_add.so

View File

@ -9,7 +9,7 @@ ifneq ($(shell dpkg -s libpcp3-dev >/dev/null 2>&1 && echo yes),yes)
endif
# newer firewalld ships cockpit.xml, but keep it for backports
FIREWALLD_SERVICE = $(findstring $(shell . /etc/os-release; echo $$VERSION_ID),8 9 16.04 18.04)
FIREWALLD_SERVICE = $(findstring $(shell . /etc/os-release; echo $$VERSION_ID),9 18.04)
ifeq ($(FIREWALLD_SERVICE),)
WS_CONFLICTS = firewalld (<< 0.6.0)
endif