File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ endif
146146
147147# Systemd service files
148148SYSTEMD_ALL_SERVICES := $(wildcard vm-systemd/qubes-* .service) vm-systemd/dev-xvdc1-swap.service
149- SYSTEMD_NETWORK_SERVICES := vm-systemd/qubes-firewall.service vm-systemd/qubes-iptables.service vm-systemd/qubes-updates-proxy.service vm-systemd/qubes-antispoof.service vm-systemd/qubes-sysctl-minimal-sys-net.service
149+ SYSTEMD_NETWORK_SERVICES := vm-systemd/qubes-firewall.service vm-systemd/qubes-iptables.service vm-systemd/qubes-updates-proxy.service vm-systemd/qubes-antispoof.service
150150SYSTEMD_SELINUX_SERVICES := vm-systemd/qubes-relabel-root.service vm-systemd/qubes-relabel-rw.service
151151SYSTEMD_CORE_SERVICES := $(filter-out $(SYSTEMD_NETWORK_SERVICES ) $(SYSTEMD_SELINUX_SERVICES ) , $(SYSTEMD_ALL_SERVICES ) )
152152
@@ -169,6 +169,7 @@ install-systemd: install-init
169169 install -m 0644 vm-systemd/home.mount $(DESTDIR )$(SYSLIBDIR ) /systemd/system/
170170 install -m 0755 vm-systemd/user-environment-generators/30-qubes.sh $(DESTDIR )$(SYSLIBDIR ) /systemd/user-environment-generators/30-qubes.sh
171171 install -m 0644 vm-systemd/usr-local.mount $(DESTDIR )$(SYSLIBDIR ) /systemd/system/
172+ install -m 0755 vm-systemd/setup-minimal-vm $(DESTDIR )$(LIBDIR ) /qubes/setup-minimal-vm
172173
173174.PHONY : install-sysvinit
174175install-sysvinit : install-init
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ lib/systemd/system/qubes-antispoof.service
1818lib/systemd/system/qubes-network.service
1919lib/systemd/system/qubes-network-uplink.service
2020lib/systemd/system/qubes-network-uplink@.service
21- lib/systemd/system/qubes-sysctl-minimal-sys-net.service
2221lib/systemd/system/qubes-updates-proxy.service
2322lib/systemd/network/80-qubes-vif.link
2423usr/lib/qubes/init/network-proxy-setup.sh
Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ lib/systemd/system/qubes-early-vm-config.service
9999lib/systemd/system/qubes-misc-post.service
100100lib/systemd/system/qubes-mount-dirs.service
101101lib/systemd/system/qubes-rootfs-resize.service
102+ lib/systemd/system/qubes-setup-minimal-vm.service
102103lib/systemd/system/qubes-sysinit.service
103104lib/systemd/system/qubes-update-check.service
104105lib/systemd/system/qubes-update-check.timer
@@ -189,6 +190,7 @@ usr/lib/qubes/qvm-move-to-vm.gnome
189190usr/lib/qubes/qvm-move-to-vm.kde
190191usr/lib/qubes/qvm-service-wrapper
191192usr/lib/qubes/resize-rootfs
193+ usr/lib/qubes/setup-minimal-vm
192194usr/lib/qubes/tar2qfile
193195usr/lib/qubes/update-proxy-configs
194196usr/lib/qubes/upgrades-installed-check
Original file line number Diff line number Diff line change @@ -1145,7 +1145,6 @@ rm -f %{name}-%{version}
11451145%_unitdir/qubes-network.service
11461146%_unitdir/qubes-network-uplink.service
11471147%_unitdir/qubes-network-uplink@.service
1148- %_unitdir/qubes-sysctl-minimal-sys-net.service
11491148%_unitdir/qubes-updates-proxy.service
11501149/usr/lib/systemd/network/80-qubes-vif.link
11511150/usr/lib/qubes/init/network-proxy-setup.sh
@@ -1251,6 +1250,7 @@ The Qubes core startup configuration for SystemD init.
12511250%_unitdir/systemd-nsresourced.service.d/30_qubes.conf
12521251%dir %_unitdir/systemd-nsresourced.socket.d
12531252%_unitdir/systemd-nsresourced.socket.d/30_qubes.conf
1253+ %_unitdir/qubes-setup-minimal-vm.service
12541254%dir %_userunitdir/*.service.d
12551255%_userunitdir/tracker-extract-3.service.d/30_qubes.conf
12561256%_userunitdir/tracker-miner-fs-3.service.d/30_qubes.conf
@@ -1267,6 +1267,7 @@ The Qubes core startup configuration for SystemD init.
12671267%_userunitdir/pipewire.service.d/40_minimal.conf
12681268%_userunitdir/wireplumber.service.d/30_qubes.conf
12691269/usr/lib/systemd/user-environment-generators/30-qubes.sh
1270+ /usr/lib/qubes/setup-minimal-vm
12701271
12711272%post systemd
12721273
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ enable qubes-psu-client@.service default sys-usb
118118enable dev-xvdc1-swap.service
119119enable NetworkManager.service
120120enable NetworkManager-dispatcher.service
121- enable qubes-sysctl -minimal-sys-net .service
121+ enable qubes-setup -minimal-vm .service
122122
123123# Disable useless Xen services in Qubes VM
124124disable xenstored.service
Original file line number Diff line number Diff line change 1+ [Unit]
2+ Description =Apply minimal vm runtime configuration
3+ DefaultDependencies =no
4+ Conflicts =shutdown.target
5+ After =systemd-modules-load.service qubes-sysinit.service
6+ Before =sysinit.target shutdown.target
7+ ConditionPathExists =|/var/run/qubes-service/minimal-netvm
8+ ConditionPathExists =|/var/run/qubes-service/minimal-usbvm
9+
10+ [Service]
11+ Type =oneshot
12+ ExecStart =/usr/lib/qubes/setup-minimal-vm
13+
14+ [Install]
15+ WantedBy =sysinit.target
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ # License: GPL-2+
4+ #
5+ # This program is free software; you can redistribute it and/or
6+ # modify it under the terms of the GNU General Public License
7+ # as published by the Free Software Foundation; either version 2
8+ # of the License, or (at your option) any later version.
9+ #
10+ # This program is distributed in the hope that it will be useful,
11+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+ # GNU General Public License for more details.
14+ #
15+ # You should have received a copy of the GNU General Public License
16+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
18+
19+
20+ is_minimal_netvm () {
21+ test -f /run/qubes-service/minimal-netvm
22+ }
23+
24+ is_minimal_usbvm () {
25+ test -f /run/qubes-service/minimal-usbvm
26+ }
27+
28+
29+ setup_minimal_netvm () {
30+ if [ " $( id -u) " = " 0" ]; then
31+ systemd-sysctl /etc/sysctl.d/82-qubes-minimal-sys-net.conf.optional
32+ systemctl --global --runtime mask gvfs-daemon.service
33+ fi
34+ }
35+
36+ if is_minimal_netvm; then
37+ setup_minimal_netvm
38+ fi
39+
You can’t perform that action at this time.
0 commit comments