Browse Source

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.
Marek Marczykowski-Górecki 4 năm trước cách đây
mục cha
commit
408bccdd5c
2 tập tin đã thay đổi với 11 bổ sung2 xóa
  1. 2 2
      Makefile
  2. 9 0
      rpm_spec/core-agent.spec.in

+ 2 - 2
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
 

+ 9 - 0
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