[gnome-build-meta/valentindavid/disable-libvirtd-system] core-deps/libvirt.bst: Disable system units
- From: Valentin David <valentindavid src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-build-meta/valentindavid/disable-libvirtd-system] core-deps/libvirt.bst: Disable system units
- Date: Sat, 29 Aug 2020 20:40:00 +0000 (UTC)
commit 2fe170b487ab9271ccbf44c88be6e0e27e9dc2c3
Author: Valentin David <valentin david codethink co uk>
Date: Sat Aug 29 22:35:13 2020 +0200
core-deps/libvirt.bst: Disable system units
libvirtd has 2 modes, system and session. While it can be useful
to be able to using the system virtual machines, Boxes does not use
that and uses session virtual machines only. So it is better
not to start those.
User can re-enable system services with:
```
sudo ln -s /dev/null /etc/systemd/system-preset/80-libvirt.preset
systemctl preset-all
```
elements/core-deps/libvirt.bst | 5 +++++
files/libvirt/80-libvirt.preset | 7 +++++++
2 files changed, 12 insertions(+)
---
diff --git a/elements/core-deps/libvirt.bst b/elements/core-deps/libvirt.bst
index 85d3d275..2ab6feb1 100644
--- a/elements/core-deps/libvirt.bst
+++ b/elements/core-deps/libvirt.bst
@@ -2,6 +2,8 @@ kind: autotools
sources:
- kind: tar
url: https://libvirt.org/sources/libvirt-6.5.0.tar.xz
+- kind: local
+ path: files/libvirt/80-libvirt.preset
build-depends:
- core-deps/rpcsvc-proto.bst
- freedesktop-sdk.bst:components/libxslt.bst
@@ -41,6 +43,9 @@ config:
cd build
%{make-install}
- mv %{install-root}/var/run %{install-root}
+ - |
+ presetdir="$(pkg-config --variable=systemdsystempresetdir systemd)"
+ install -Dm644 -t "%{install-root}${presetdir}" 80-libvirt.preset
variables:
conf-cmd: ../configure
# --disable-Werror does not work
diff --git a/files/libvirt/80-libvirt.preset b/files/libvirt/80-libvirt.preset
new file mode 100644
index 00000000..3d655a23
--- /dev/null
+++ b/files/libvirt/80-libvirt.preset
@@ -0,0 +1,7 @@
+disable libvirt-guests.service
+disable libvirtd.service
+disable libvirtd.socket
+disable libvirtd-*.socket
+disable virt*d.service
+disable virt*d.socket
+disable virt*d-*.socket
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]