From 408bccdd5c89a80083261da8c017d1d8487287c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 16 Sep 2020 16:14:02 +0200 Subject: [PATCH] rpm: do not build qubes-core-agent-sysvinit package Since no currently supported distribution needs it, skip the build by default. If necessary, can be enabled by adjusting %with_sysvinit macro in the spec. --- Makefile | 4 ++-- rpm_spec/core-agent.spec.in | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 06651a0..5b06b56 100644 --- a/Makefile +++ b/Makefile @@ -125,7 +125,7 @@ install-sysvinit: install-init install -D vm-init.d/qubes-core.modules $(DESTDIR)/etc/sysconfig/modules/qubes-core.modules install network/qubes-iptables $(DESTDIR)/etc/init.d/ -install-rh: install-systemd install-systemd-dropins install-sysvinit +install-rh: install-systemd install-systemd-dropins install-doc: $(MAKE) -C doc install @@ -202,7 +202,7 @@ install-deb: install-common install-systemd install-systemd-dropins install-syst mkdir -p $(DESTDIR)/etc/systemd/system/ install -m 0644 vm-systemd/haveged.service $(DESTDIR)/etc/systemd/system/ -install-corevm: install-rh install-common install-systemd install-sysvinit install-systemd-dropins install-networking +install-corevm: install-rh install-common install-systemd install-systemd-dropins install-networking install-netvm: install-systemd-networking-dropins install-networkmanager diff --git a/rpm_spec/core-agent.spec.in b/rpm_spec/core-agent.spec.in index 90125da..698764f 100644 --- a/rpm_spec/core-agent.spec.in +++ b/rpm_spec/core-agent.spec.in @@ -20,6 +20,8 @@ # # +%global with_sysvinit 0 + %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 @@ -306,6 +308,10 @@ make -C qubes-rpc/kde DESTDIR=$RPM_BUILD_ROOT install make -C qubes-rpc/nautilus DESTDIR=$RPM_BUILD_ROOT install make -C qubes-rpc/thunar DESTDIR=$RPM_BUILD_ROOT install +%if %with_sysvinit +install DESTDIR=$RPM_BUILD_ROOT install-sysvinit +%endif + make -C package-managers DESTDIR=$RPM_BUILD_ROOT install install-dnf %if 0%{?rhel} == 7 make -C package-managers DESTDIR=$RPM_BUILD_ROOT install-yum @@ -779,6 +785,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 @@ -845,6 +852,8 @@ if [ "$1" = 0 ] ; then done fi +%endif + %package systemd Summary: Qubes unit files for SystemD init style License: GPL v2 only