Merge remote-tracking branch 'origin/pr/244'

* origin/pr/244:
  spec: don't build sysvinit for Fedora and CentOS
This commit is contained in:
Marek Marczykowski-Górecki 2020-09-17 02:48:28 +02:00
commit 5bb125fa67
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -23,6 +23,13 @@
%define qubes_services qubes-core qubes-core-netvm qubes-core-early qubes-firewall qubes-iptables qubes-updates-proxy qubes-updates-proxy-forwarder
%define qubes_preset_file 75-qubes-vm.preset
# systemd is used in Fedora and CentOS
%if 0%{?fedora} || 0%{?rhel}
%define with_sysvinit 0
%else
%define with_sysvinit 1
%endif
%define scriptletfuns is_static() { \
[ -f "%{_unitdir}/$1" ] && ! grep -q '^[[].nstall]' "%{_unitdir}/$1" \
} \
@ -321,6 +328,10 @@ sed -i \
install -D -m 0644 boot/dracut-qubes.conf $RPM_BUILD_ROOT/usr/lib/dracut/dracut.conf.d/30-qubes.conf
install -D -m 0644 boot/grub.qubes $RPM_BUILD_ROOT/etc/default/grub.qubes
%if ! %with_sysvinit
rm -rf $RPM_BUILD_ROOT/etc/init.d/qubes-* $RPM_BUILD_ROOT/etc/sysconfig/modules/qubes-core.modules
%endif
%triggerin -- initscripts
if [ -e /etc/init/serial.conf ]; then
cp /usr/share/qubes/serial.conf /etc/init/serial.conf
@ -779,6 +790,7 @@ rm -f %{name}-%{version}
%config(noreplace) /etc/sudoers.d/qubes
%config(noreplace) /etc/pam.d/su.qubes
%if %with_sysvinit
%package sysvinit
Summary: Qubes unit files for SysV init style or upstart
License: GPL v2 only
@ -844,6 +856,7 @@ if [ "$1" = 0 ] ; then
chkconfig --del $svc
done
fi
%endif
%package systemd
Summary: Qubes unit files for SystemD init style