]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
remove sysconfig files
authorOlaf Hering <olaf@aepfle.de>
Wed, 12 Jan 2022 10:45:08 +0000 (11:45 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 17 Jan 2022 17:20:59 +0000 (18:20 +0100)
sysconfig files are owned by the admin of the host. They have the
liberty to put anything they want into these files. This makes it
difficult to provide different built-in defaults.

Remove the sysconfig file and place the current desired default into
the service file.

Local customizations can now go either into /etc/sysconfig/name
or /etc/systemd/system/name.service.d/my-knobs.conf

Attempt to handle upgrades in libvirt.spec.
Dirty files which are marked as %config will be renamed to file.rpmsave.
To restore them automatically, move stale .rpmsave files away, and
catch any new rpmsave files in %posttrans.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
52 files changed:
docs/daemons.rst
docs/remote.html.in
libvirt.spec.in
src/ch/meson.build
src/ch/virtchd.service.in
src/ch/virtchd.sysconf [deleted file]
src/interface/meson.build
src/interface/virtinterfaced.service.in
src/interface/virtinterfaced.sysconf [deleted file]
src/libxl/meson.build
src/libxl/virtxend.service.in
src/libxl/virtxend.sysconf [deleted file]
src/locking/meson.build
src/locking/virtlockd.service.in
src/locking/virtlockd.sysconf [deleted file]
src/logging/meson.build
src/logging/virtlogd.sysconf [deleted file]
src/lxc/meson.build
src/lxc/virtlxcd.service.in
src/lxc/virtlxcd.sysconf [deleted file]
src/meson.build
src/network/meson.build
src/network/virtnetworkd.service.in
src/network/virtnetworkd.sysconf [deleted file]
src/node_device/meson.build
src/node_device/virtnodedevd.service.in
src/node_device/virtnodedevd.sysconf [deleted file]
src/nwfilter/meson.build
src/nwfilter/virtnwfilterd.service.in
src/nwfilter/virtnwfilterd.sysconf [deleted file]
src/qemu/meson.build
src/qemu/virtqemud.service.in
src/qemu/virtqemud.sysconf [deleted file]
src/remote/libvirtd.service.in
src/remote/libvirtd.sysconf [deleted file]
src/remote/meson.build
src/remote/virtproxyd.service.in
src/remote/virtproxyd.sysconf [deleted file]
src/secret/meson.build
src/secret/virtsecretd.service.in
src/secret/virtsecretd.sysconf [deleted file]
src/storage/meson.build
src/storage/virtstoraged.service.in
src/storage/virtstoraged.sysconf [deleted file]
src/vbox/meson.build
src/vbox/virtvboxd.service.in
src/vbox/virtvboxd.sysconf [deleted file]
src/vz/meson.build
src/vz/virtvzd.service.in
src/vz/virtvzd.sysconf [deleted file]
tools/libvirt-guests.sysconf [deleted file]
tools/meson.build

index c8ae3b0cef03d719d9ff44aa23cbbfb66e9b966e..1f9bc34260d60e4e644ae4a4a5bf2e335fdbe564 100644 (file)
@@ -686,3 +686,24 @@ socket unit names into the service. When using these old versions, the
 ``unix_sock_dir`` setting in ``virtlockd.conf`` must be changed in
 lock-step with the equivalent setting in the unit files to ensure that
 ``virtlockd`` can identify the sockets.
+
+Changing command line options for daemons
+=========================================
+
+Two ways exist to override the defaults in the provided service files:
+either a systemd "drop-in" configuration file, or a ``/etc/sysconfig/$daemon``
+file must be created.  For example, to change the command line option
+for a debug session of ``libvirtd``, create a file
+``/etc/systemd/system/libvirtd.service.d/debug.conf`` with the following content:
+
+   ::
+
+      [Unit]
+      Description=Virtualization daemon, with override from debug.conf
+
+      [Service]
+      Environment=G_DEBUG=fatal-warnings
+      Environment=LIBVIRTD_ARGS="--listen --verbose"
+
+After changes to systemd "drop-in" configuration files it is required to run
+``systemctl daemon-reload``.
index efdb2b32535d9567c9399cfdd339e0df2097ba74..47fb2d4df3e971c98e0d3b92e56defd5fb03cde6 100644 (file)
@@ -138,9 +138,9 @@ Blank lines and comments beginning with <code>#</code> are ignored.
         <td> 1 (on) </td>
         <td>
   Listen for secure TLS connections on the public TCP/IP port.
-  Note: it is also necessary to start the server in listening mode by
-  running it with --listen or editing /etc/sysconfig/libvirtd by uncommenting the LIBVIRTD_ARGS="--listen" line
-  to cause the server to come up in listening mode whenever it is started.
+  Note: it is also necessary to start the server in listening mode
+  by running it with --listen or adding a LIBVIRTD_ARGS="--listen"
+  line to /etc/sysconfig/libvirtd.
 </td>
       </tr>
       <tr>
index 2ffccc6e09542be9933e885dd77f58c50bec1c26..e52fd9d063e206379424bba3137284d742ca86ea 100644 (file)
 
 %define tls_priority "@LIBVIRT,SYSTEM"
 
+# libvirt 8.1.0 stops distributing any sysconfig files.
+# If the user has customized their sysconfig file,
+# the RPM upgrade path will rename it to .rpmsave
+# because the file is no longer managed by RPM.
+# To prevent a regression we rename it back after the
+# transaction to preserve the user's modifications
+%define libvirt_sysconfig_pre() \
+    for sc in %{?*} ; do \
+        test -f "%{_sysconfdir}/sysconfig/${sc}.rpmsave" || continue ; \
+        mv -v "%{_sysconfdir}/sysconfig/${sc}.rpmsave" "%{_sysconfdir}/sysconfig/${sc}.rpmsave.old" ; \
+    done \
+    %{nil}
+%define libvirt_sysconfig_posttrans() \
+    for sc in %{?*} ; do \
+        test -f "%{_sysconfdir}/sysconfig/${sc}.rpmsave" || continue ; \
+        mv -v "%{_sysconfdir}/sysconfig/${sc}.rpmsave" "%{_sysconfdir}/sysconfig/${sc}" ; \
+    done \
+    %{nil}
 
 Summary: Library providing a simple virtualization API
 Name: libvirt
@@ -1286,6 +1304,7 @@ fi \
 %define libvirt_daemon_systemd_preun_priv() %systemd_preun %1.service %1-admin.socket %1.socket
 
 %pre daemon
+%libvirt_sysconfig_pre libvirtd virtproxyd virtlogd virtlockd libvirt-guests
 # 'libvirt' group is just to allow password-less polkit access to
 # libvirtd. The uid number is irrelevant, so we use dynamic allocation
 # described at the above link.
@@ -1334,6 +1353,7 @@ if [ $1 -ge 1 ] ; then
 fi
 
 %posttrans daemon
+%libvirt_sysconfig_posttrans libvirtd virtproxyd virtlogd virtlockd libvirt-guests
 if test %libvirt_daemon_needs_restart libvirtd
 then
     # See if user has previously modified their install to
@@ -1374,6 +1394,9 @@ fi
 
 %libvirt_daemon_finish_restart libvirtd
 
+%pre daemon-driver-network
+%libvirt_sysconfig_pre virtnetworkd
+
 %post daemon-driver-network
 %if %{with_firewalld_zone}
     %firewalld_reload
@@ -1393,8 +1416,11 @@ fi
 %endif
 
 %posttrans daemon-driver-network
+%libvirt_sysconfig_posttrans virtnetworkd
 %libvirt_daemon_perform_restart virtnetworkd
 
+%pre daemon-driver-nwfilter
+%libvirt_sysconfig_pre virtnwfilterd
 
 %post daemon-driver-nwfilter
 %if %{with_modular_daemons}
@@ -1406,8 +1432,11 @@ fi
 %libvirt_daemon_systemd_preun virtnwfilterd
 
 %posttrans daemon-driver-nwfilter
+%libvirt_sysconfig_posttrans virtnwfilterd
 %libvirt_daemon_perform_restart virtnwfilterd
 
+%pre daemon-driver-nodedev
+%libvirt_sysconfig_pre virtnodedevd
 
 %post daemon-driver-nodedev
 %if %{with_modular_daemons}
@@ -1419,8 +1448,11 @@ fi
 %libvirt_daemon_systemd_preun virtnodedevd
 
 %posttrans daemon-driver-nodedev
+%libvirt_sysconfig_posttrans virtnodedevd
 %libvirt_daemon_perform_restart virtnodedevd
 
+%pre daemon-driver-interface
+%libvirt_sysconfig_pre virtinterfaced
 
 %post daemon-driver-interface
 %if %{with_modular_daemons}
@@ -1432,8 +1464,11 @@ fi
 %libvirt_daemon_systemd_preun virtinterfaced
 
 %posttrans daemon-driver-interface
+%libvirt_sysconfig_posttrans virtinterfaced
 %libvirt_daemon_perform_restart virtinterfaced
 
+%pre daemon-driver-secret
+%libvirt_sysconfig_pre virtsecretd
 
 %post daemon-driver-secret
 %if %{with_modular_daemons}
@@ -1445,9 +1480,13 @@ fi
 %libvirt_daemon_systemd_preun virtsecretd
 
 %posttrans daemon-driver-secret
+%libvirt_sysconfig_posttrans virtsecretd
 %libvirt_daemon_perform_restart virtsecretd
 
 
+%pre daemon-driver-storage
+%libvirt_sysconfig_pre virtstoraged
+
 %post daemon-driver-storage
 %if %{with_modular_daemons}
 %libvirt_daemon_systemd_post virtstoraged
@@ -1458,11 +1497,13 @@ fi
 %libvirt_daemon_systemd_preun virtstoraged
 
 %posttrans daemon-driver-storage
+%libvirt_sysconfig_posttrans virtstoraged
 %libvirt_daemon_perform_restart virtstoraged
 
 
 %if %{with_qemu}
 %pre daemon-driver-qemu
+%libvirt_sysconfig_pre virtqemud
 # We want soft static allocation of well-known ids, as disk images
 # are commonly shared across NFS mounts by id rather than name; see
 # https://fedoraproject.org/wiki/Packaging:UsersAndGroups
@@ -1487,11 +1528,15 @@ exit 0
 %libvirt_daemon_systemd_preun virtqemud
 
 %posttrans daemon-driver-qemu
+%libvirt_sysconfig_posttrans virtqemud
 %libvirt_daemon_perform_restart virtqemud
 %endif
 
 
 %if %{with_lxc}
+%pre daemon-driver-lxc
+%libvirt_sysconfig_pre virtlxcd
+
 %post daemon-driver-lxc
     %if %{with_modular_daemons}
 %libvirt_daemon_systemd_post virtlxcd
@@ -1502,6 +1547,7 @@ exit 0
 %libvirt_daemon_systemd_preun virtlxcd
 
 %posttrans daemon-driver-lxc
+%libvirt_sysconfig_posttrans virtlxcd
 %libvirt_daemon_perform_restart virtlxcd
 %endif
 
@@ -1513,10 +1559,14 @@ exit 0
     %endif
 %libvirt_daemon_schedule_restart virtvboxd
 
+%pre daemon-driver-vbox
+%libvirt_sysconfig_pre virtvboxd
+
 %preun daemon-driver-vbox
 %libvirt_daemon_systemd_preun virtvboxd
 
 %posttrans daemon-driver-vbox
+%libvirt_sysconfig_posttrans virtvboxd
 %libvirt_daemon_perform_restart virtvboxd
 %endif
 
@@ -1528,10 +1578,14 @@ exit 0
     %endif
 %libvirt_daemon_schedule_restart virtxend
 
+%pre daemon-driver-libxl
+%libvirt_sysconfig_pre virtxend
+
 %preun daemon-driver-libxl
 %libvirt_daemon_systemd_preun virtxend
 
 %posttrans daemon-driver-libxl
+%libvirt_sysconfig_posttrans virtxend
 %libvirt_daemon_perform_restart virtxend
 %endif
 
@@ -1634,16 +1688,11 @@ exit 0
 %{_unitdir}/virtlockd.socket
 %{_unitdir}/virtlockd-admin.socket
 %{_unitdir}/libvirt-guests.service
-%config(noreplace) %{_sysconfdir}/sysconfig/libvirtd
-%config(noreplace) %{_sysconfdir}/sysconfig/virtproxyd
-%config(noreplace) %{_sysconfdir}/sysconfig/virtlogd
-%config(noreplace) %{_sysconfdir}/sysconfig/virtlockd
 %config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
 %config(noreplace) %{_sysconfdir}/libvirt/virtproxyd.conf
 %config(noreplace) %{_sysconfdir}/libvirt/virtlogd.conf
 %config(noreplace) %{_sysconfdir}/libvirt/virtlockd.conf
 %config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
-%config(noreplace) %{_sysconfdir}/sysconfig/libvirt-guests
 %config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf
 
 %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd
@@ -1717,7 +1766,6 @@ exit 0
 %ghost %{_sysconfdir}/libvirt/nwfilter/*.xml
 
 %files daemon-driver-interface
-%config(noreplace) %{_sysconfdir}/sysconfig/virtinterfaced
 %config(noreplace) %{_sysconfdir}/libvirt/virtinterfaced.conf
 %{_datadir}/augeas/lenses/virtinterfaced.aug
 %{_datadir}/augeas/lenses/tests/test_virtinterfaced.aug
@@ -1730,7 +1778,6 @@ exit 0
 %{_mandir}/man8/virtinterfaced.8*
 
 %files daemon-driver-network
-%config(noreplace) %{_sysconfdir}/sysconfig/virtnetworkd
 %config(noreplace) %{_sysconfdir}/libvirt/virtnetworkd.conf
 %{_datadir}/augeas/lenses/virtnetworkd.aug
 %{_datadir}/augeas/lenses/tests/test_virtnetworkd.aug
@@ -1754,7 +1801,6 @@ exit 0
 %endif
 
 %files daemon-driver-nodedev
-%config(noreplace) %{_sysconfdir}/sysconfig/virtnodedevd
 %config(noreplace) %{_sysconfdir}/libvirt/virtnodedevd.conf
 %{_datadir}/augeas/lenses/virtnodedevd.aug
 %{_datadir}/augeas/lenses/tests/test_virtnodedevd.aug
@@ -1767,7 +1813,6 @@ exit 0
 %{_mandir}/man8/virtnodedevd.8*
 
 %files daemon-driver-nwfilter
-%config(noreplace) %{_sysconfdir}/sysconfig/virtnwfilterd
 %config(noreplace) %{_sysconfdir}/libvirt/virtnwfilterd.conf
 %{_datadir}/augeas/lenses/virtnwfilterd.aug
 %{_datadir}/augeas/lenses/tests/test_virtnwfilterd.aug
@@ -1782,7 +1827,6 @@ exit 0
 %{_mandir}/man8/virtnwfilterd.8*
 
 %files daemon-driver-secret
-%config(noreplace) %{_sysconfdir}/sysconfig/virtsecretd
 %config(noreplace) %{_sysconfdir}/libvirt/virtsecretd.conf
 %{_datadir}/augeas/lenses/virtsecretd.aug
 %{_datadir}/augeas/lenses/tests/test_virtsecretd.aug
@@ -1797,7 +1841,6 @@ exit 0
 %files daemon-driver-storage
 
 %files daemon-driver-storage-core
-%config(noreplace) %{_sysconfdir}/sysconfig/virtstoraged
 %config(noreplace) %{_sysconfdir}/libvirt/virtstoraged.conf
 %{_datadir}/augeas/lenses/virtstoraged.aug
 %{_datadir}/augeas/lenses/tests/test_virtstoraged.aug
@@ -1855,7 +1898,6 @@ exit 0
 
 %if %{with_qemu}
 %files daemon-driver-qemu
-%config(noreplace) %{_sysconfdir}/sysconfig/virtqemud
 %config(noreplace) %{_sysconfdir}/libvirt/virtqemud.conf
 %config(noreplace) %{_prefix}/lib/sysctl.d/60-qemu-postcopy-migration.conf
 %{_datadir}/augeas/lenses/virtqemud.aug
@@ -1885,7 +1927,6 @@ exit 0
 
 %if %{with_lxc}
 %files daemon-driver-lxc
-%config(noreplace) %{_sysconfdir}/sysconfig/virtlxcd
 %config(noreplace) %{_sysconfdir}/libvirt/virtlxcd.conf
 %{_datadir}/augeas/lenses/virtlxcd.aug
 %{_datadir}/augeas/lenses/tests/test_virtlxcd.aug
@@ -1908,7 +1949,6 @@ exit 0
 
 %if %{with_libxl}
 %files daemon-driver-libxl
-%config(noreplace) %{_sysconfdir}/sysconfig/virtxend
 %config(noreplace) %{_sysconfdir}/libvirt/virtxend.conf
 %{_datadir}/augeas/lenses/virtxend.aug
 %{_datadir}/augeas/lenses/tests/test_virtxend.aug
@@ -1931,7 +1971,6 @@ exit 0
 
 %if %{with_vbox}
 %files daemon-driver-vbox
-%config(noreplace) %{_sysconfdir}/sysconfig/virtvboxd
 %config(noreplace) %{_sysconfdir}/libvirt/virtvboxd.conf
 %{_datadir}/augeas/lenses/virtvboxd.aug
 %{_datadir}/augeas/lenses/tests/test_virtvboxd.aug
index e0afdb390a63e0e100f1fa76619d3fc0b8574f2e..a4bf0c664925af91a4fd1658b49a21bfbb3d86d4 100644 (file)
@@ -63,11 +63,6 @@ if conf.has('WITH_CH')
     'sockets': [ 'main', 'ro', 'admin' ],
   }
 
-  sysconf_files += {
-    'name': 'virtchd',
-    'file': files('virtchd.sysconf'),
-  }
-
   virt_install_dirs += [
     localstatedir / 'lib' / 'libvirt' / 'ch',
     runstatedir / 'libvirt' / 'ch',
index cc1e85d1df75c2cf4d744e63992a980620c1cda4..f08339f2113d451a08d73b04d8053642950d9ef4 100644 (file)
@@ -18,6 +18,7 @@ Documentation=https://libvirt.org
 
 [Service]
 Type=notify
+Environment=VIRTCHD_ARGS="--timeout 120"
 EnvironmentFile=-@sysconfdir@/sysconfig/virtchd
 ExecStart=@sbindir@/virtchd $VIRTCHD_ARGS
 ExecReload=/bin/kill -HUP $MAINPID
diff --git a/src/ch/virtchd.sysconf b/src/ch/virtchd.sysconf
deleted file mode 100644 (file)
index 5ee44be..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# Customizations for the virtchd.service systemd unit
-
-VIRTCHD_ARGS="--timeout 120"
index 2d4e30362c8d97a0ba5e4a96dc234249bc8ca0bf..f9f378aeb0d29343f277202f9001341ff78793bd 100644 (file)
@@ -54,9 +54,4 @@ if conf.has('WITH_INTERFACE')
     'name': 'virtinterfaced',
     'in_file': files('virtinterfaced.init.in')
   }
-
-  sysconf_files += {
-    'name': 'virtinterfaced',
-    'file': files('virtinterfaced.sysconf'),
-  }
 endif
index 73d409b81bd90b620a27b62e07b31f66b6490219..3d944e17a99589d7800fda6da5321ec9afbab119 100644 (file)
@@ -13,6 +13,7 @@ Documentation=https://libvirt.org
 
 [Service]
 Type=notify
+Environment=VIRTINTERFACED_ARGS="--timeout 120"
 EnvironmentFile=-@sysconfdir@/sysconfig/virtinterfaced
 ExecStart=@sbindir@/virtinterfaced $VIRTINTERFACED_ARGS
 ExecReload=/bin/kill -HUP $MAINPID
diff --git a/src/interface/virtinterfaced.sysconf b/src/interface/virtinterfaced.sysconf
deleted file mode 100644 (file)
index 0685da3..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# Customizations for the virtinterfaced.service systemd unit
-
-VIRTINTERFACED_ARGS="--timeout 120"
index 979389910615c49bada10f33a2e18557d0e66874..8347a3c96650b98e32e3007c313626bce150ab15 100644 (file)
@@ -78,11 +78,6 @@ if conf.has('WITH_LIBXL')
     'in_file': files('virtxend.init.in'),
   }
 
-  sysconf_files += {
-    'name': 'virtxend',
-    'file': files('virtxend.sysconf'),
-  }
-
   virt_install_dirs += [
     localstatedir / 'lib' / 'libvirt' / 'libxl',
     runstatedir / 'libvirt' / 'libxl',
index 19b19ce3e68221da6a32b7e5dc9f0f7727866387..2b5163e179f3da76d964b25815ddef018ad1e023 100644 (file)
@@ -18,6 +18,7 @@ ConditionPathExists=/proc/xen/capabilities
 
 [Service]
 Type=notify
+Environment=VIRTXEND_ARGS="--timeout 120"
 EnvironmentFile=-@sysconfdir@/sysconfig/virtxend
 ExecStart=@sbindir@/virtxend $VIRTXEND_ARGS
 ExecReload=/bin/kill -HUP $MAINPID
diff --git a/src/libxl/virtxend.sysconf b/src/libxl/virtxend.sysconf
deleted file mode 100644 (file)
index 301da47..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# Customizations for the virtxend.service systemd unit
-
-VIRTXEND_ARGS="--timeout 120"
index 184d3c3f56dcc5f5adacd13ff1e293e500a2014c..72f778043827fd5d9286e07a2a492bebbb589444 100644 (file)
@@ -156,11 +156,6 @@ if conf.has('WITH_LIBVIRTD')
     'in_file': files('virtlockd.init.in'),
   }
 
-  sysconf_files += {
-    'name': 'virtlockd',
-    'file': files('virtlockd.sysconf'),
-  }
-
   if conf.has('WITH_SANLOCK')
     virt_helpers += {
       'name': 'libvirt_sanlock_helper',
index 4a6fab05ab309a04a8565a5c73cbcfb47dae8d5d..19271d1e7d4b2389c15be4785c712d6eaf15c457 100644 (file)
@@ -7,6 +7,7 @@ Documentation=man:virtlockd(8)
 Documentation=https://libvirt.org
 
 [Service]
+Environment=VIRTLOCKD_ARGS=
 EnvironmentFile=-@sysconfdir@/sysconfig/virtlockd
 ExecStart=@sbindir@/virtlockd $VIRTLOCKD_ARGS
 ExecReload=/bin/kill -USR1 $MAINPID
diff --git a/src/locking/virtlockd.sysconf b/src/locking/virtlockd.sysconf
deleted file mode 100644 (file)
index 03aea9e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# Customizations for the virtlockd.service systemd unit
-
-VIRTLOCKD_ARGS=""
index 89e06a0d5a13c3047795719719f484a08ed1197a..7066f16fadf0a154297ae7a47fdb5f3a81605a0d 100644 (file)
@@ -101,11 +101,6 @@ if conf.has('WITH_LIBVIRTD')
     'name': 'virtlogd',
     'in_file': files('virtlogd.init.in'),
   }
-
-  sysconf_files += {
-    'name': 'virtlogd',
-    'file': files('virtlogd.sysconf'),
-  }
 endif
 
 log_inc_dir = include_directories('.')
diff --git a/src/logging/virtlogd.sysconf b/src/logging/virtlogd.sysconf
deleted file mode 100644 (file)
index 67993e8..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# Customizations for the virtlogd.service systemd unit
-
-VIRTLOGD_ARGS=""
index ad5c659dba098e900aaa9ac448f1e410c1c63c7b..c1f71b43e1071259eecb1eab149914f0170c93a7 100644 (file)
@@ -175,11 +175,6 @@ if conf.has('WITH_LXC')
     'in_file': files('virtlxcd.init.in'),
   }
 
-  sysconf_files += {
-    'name': 'virtlxcd',
-    'file': files('virtlxcd.sysconf'),
-  }
-
   virt_install_dirs += [
     localstatedir / 'lib' / 'libvirt' / 'lxc',
     runstatedir / 'libvirt' / 'lxc',
index 3af7c1a52d81bd418fd9aa04a68eee73c83f5718..d58bde9f5d5f528e67fa9bf964ea23de2b7d8f00 100644 (file)
@@ -18,6 +18,7 @@ Documentation=https://libvirt.org
 
 [Service]
 Type=notify
+Environment=VIRTLXCD_ARGS="--timeout 120"
 EnvironmentFile=-@sysconfdir@/sysconfig/virtlxcd
 ExecStart=@sbindir@/virtlxcd $VIRTLXCD_ARGS
 ExecReload=/bin/kill -HUP $MAINPID
diff --git a/src/lxc/virtlxcd.sysconf b/src/lxc/virtlxcd.sysconf
deleted file mode 100644 (file)
index 119a4a2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# Customizations for the virtlxcd.service systemd unit
-
-VIRTLXCD_ARGS="--timeout 120"
index 2408344ef75e0af9fb8252f6bdddea99a54ead8a..fc6c77f5d17b838d4c4395eb63ee9646b8f4a9bb 100644 (file)
@@ -208,12 +208,6 @@ virt_daemon_units = []
 #   * in_file - source init file (required)
 openrc_init_files = []
 
-# sysconf_files
-#   install libvirt daemon sysconf files
-#   * name - daemon name (required)
-#   * file - source sysconf file (required)
-sysconf_files = []
-
 # virt_install_dirs:
 #   list of directories to create during installation
 virt_install_dirs = []
@@ -868,16 +862,6 @@ if conf.has('WITH_LIBVIRTD')
   endif
 endif
 
-if init_script != 'none'
-  foreach sysconf : sysconf_files
-    install_data(
-      sysconf['file'],
-      install_dir: sysconfdir / 'sysconfig',
-      rename: [ sysconf['name'] ],
-    )
-  endforeach
-endif
-
 if conf.has('WITH_DTRACE_PROBES')
   custom_target(
     'libvirt_functions.stp',
index d6fb624bb7825b56b6de7ecb78f0278057079758..e7c43bc4c48a6e2ee1ac9a9d7c46196414396bd6 100644 (file)
@@ -72,11 +72,6 @@ if conf.has('WITH_NETWORK')
     'in_file': files('virtnetworkd.init.in'),
   }
 
-  sysconf_files += {
-    'name': 'virtnetworkd',
-    'file': files('virtnetworkd.sysconf'),
-  }
-
   virt_install_dirs += [
     localstatedir / 'lib' / 'libvirt' / 'network',
     localstatedir / 'lib' / 'libvirt' / 'dnsmasq',
index 4c39d2a5d79b7ff0a05eaeaa2f8520e4b970faaf..3decfbbf1d420c095859e5d520aa027926f1e2a8 100644 (file)
@@ -16,6 +16,7 @@ Documentation=https://libvirt.org
 
 [Service]
 Type=notify
+Environment=VIRTNETWORKD_ARGS="--timeout 120"
 EnvironmentFile=-@sysconfdir@/sysconfig/virtnetworkd
 ExecStart=@sbindir@/virtnetworkd $VIRTNETWORKD_ARGS
 ExecReload=/bin/kill -HUP $MAINPID
diff --git a/src/network/virtnetworkd.sysconf b/src/network/virtnetworkd.sysconf
deleted file mode 100644 (file)
index 93f3a7a..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# Customizations for the virtnetworkd.service systemd unit
-
-VIRTNETWORKD_ARGS="--timeout 120"
index 15f9c3ad29dd367e26daae975220f9c1a50f018e..5013d825b3f47d0d13d410f0d9630b5adf30615c 100644 (file)
@@ -62,9 +62,4 @@ if conf.has('WITH_NODE_DEVICES')
     'name': 'virtnodedevd',
     'in_file': files('virtnodedevd.init.in'),
   }
-
-  sysconf_files += {
-    'name': 'virtnodedevd',
-    'file': files('virtnodedevd.sysconf'),
-  }
 endif
index d2453dd620e3cecc5989fa17a89f9f7b82f514c1..688cf89822113f61cebfcffd1eca599bfa9da30d 100644 (file)
@@ -13,6 +13,7 @@ Documentation=https://libvirt.org
 
 [Service]
 Type=notify
+Environment=VIRTNODEDEVD_ARGS="--timeout 120"
 EnvironmentFile=-@sysconfdir@/sysconfig/virtnodedevd
 ExecStart=@sbindir@/virtnodedevd $VIRTNODEDEVD_ARGS
 ExecReload=/bin/kill -HUP $MAINPID
diff --git a/src/node_device/virtnodedevd.sysconf b/src/node_device/virtnodedevd.sysconf
deleted file mode 100644 (file)
index fa7faa3..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# Customizations for the virtnodedevd.service systemd unit
-
-VIRTNODEDEVD_ARGS="--timeout 120"
index a21e57592571ea418fc11e85d8f04f2cbe724c08..ebbe7129064c722b188d784a6e003eb14646d2d4 100644 (file)
@@ -61,10 +61,5 @@ if conf.has('WITH_NWFILTER')
     'in_file': files('virtnwfilterd.init.in'),
   }
 
-  sysconf_files += {
-    'name': 'virtnwfilterd',
-    'file': files('virtnwfilterd.sysconf'),
-  }
-
   subdir('xml')
 endif
index dda7c01a3db50a70c9cd86c8177c50053895418e..36d00b58f0e19526c4a386bbb0840c2618d241bc 100644 (file)
@@ -13,6 +13,7 @@ Documentation=https://libvirt.org
 
 [Service]
 Type=notify
+Environment=VIRTNWFILTERD_ARGS="--timeout 120"
 EnvironmentFile=-@sysconfdir@/sysconfig/virtnwfilterd
 ExecStart=@sbindir@/virtnwfilterd $VIRTNWFILTERD_ARGS
 ExecReload=/bin/kill -HUP $MAINPID
diff --git a/src/nwfilter/virtnwfilterd.sysconf b/src/nwfilter/virtnwfilterd.sysconf
deleted file mode 100644 (file)
index 80cc645..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# Customizations for the virtnwfilterd.service systemd unit
-
-VIRTNWFILTERD_ARGS="--timeout 120"
index 66ef594006435c94190662c10ef9585dc5ad62fe..5f82f687c143026858a80bfe1cbcb75f0d9e2c53 100644 (file)
@@ -165,11 +165,6 @@ if conf.has('WITH_QEMU')
     'in_file': files('virtqemud.init.in'),
   }
 
-  sysconf_files += {
-    'name': 'virtqemud',
-    'file': files('virtqemud.sysconf'),
-  }
-
   if conf.has('WITH_SYSCTL')
     install_data(
       'postcopy-migration.sysctl',
index 20e1b43a6e3395e9c072e4b1b35af272a887d8fc..551eb4d40589d8564fd6171b812e4accf9c35e21 100644 (file)
@@ -20,6 +20,7 @@ Documentation=https://libvirt.org
 
 [Service]
 Type=notify
+Environment=VIRTQEMUD_ARGS="--timeout 120"
 EnvironmentFile=-@sysconfdir@/sysconfig/virtqemud
 ExecStart=@sbindir@/virtqemud $VIRTQEMUD_ARGS
 ExecReload=/bin/kill -HUP $MAINPID
diff --git a/src/qemu/virtqemud.sysconf b/src/qemu/virtqemud.sysconf
deleted file mode 100644 (file)
index 87b626e..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-# Customizations for the virtqemud.service systemd unit
-
-VIRTQEMUD_ARGS="--timeout 120"
-
-# Override the QEMU/SDL default audio driver probing when
-# starting virtual machines using SDL graphics
-#
-# NB these have no effect for VMs using VNC, unless vnc_allow_host_audio
-# is enabled in /etc/libvirt/qemu.conf
-#QEMU_AUDIO_DRV=sdl
-#
-#SDL_AUDIODRIVER=pulse
index cc0d4e3693683259824a6e9e30f0f7612d37782a..5d4d412fccb8ac9161760bbcd0d3eb0efa3a07eb 100644 (file)
@@ -28,6 +28,7 @@ Documentation=https://libvirt.org
 
 [Service]
 Type=notify
+Environment=LIBVIRTD_ARGS="--timeout 120"
 EnvironmentFile=-@sysconfdir@/sysconfig/libvirtd
 ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
 ExecReload=/bin/kill -HUP $MAINPID
diff --git a/src/remote/libvirtd.sysconf b/src/remote/libvirtd.sysconf
deleted file mode 100644 (file)
index 18aec1b..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-# Customizations for the libvirtd.service systemd unit
-
-# Default behaviour is for libvirtd.service to start on boot
-# so that VM autostart can be performed. We then want it to
-# shutdown again if nothing was started and rely on systemd
-# socket activation to start it again when some client app
-# connects.
-LIBVIRTD_ARGS="--timeout 120"
-
-# If systemd socket activation is disabled, then the following
-# can be used to listen on TCP/TLS sockets
-#LIBVIRTD_ARGS="--listen"
-
-# Override the QEMU/SDL default audio driver probing when
-# starting virtual machines using SDL graphics
-#
-# NB these have no effect for VMs using VNC, unless vnc_allow_host_audio
-# is enabled in /etc/libvirt/qemu.conf
-#QEMU_AUDIO_DRV=sdl
-#
-#SDL_AUDIODRIVER=pulse
index 0a188268b58b7af41645799aac3ef3f156fd48ad..fc98d0e5be69ce69fe467790ca1cc58bf1096e0f 100644 (file)
@@ -204,11 +204,6 @@ if conf.has('WITH_REMOTE')
       'confd': files('libvirtd.confd'),
     }
 
-    sysconf_files += {
-      'name': 'libvirtd',
-      'file': files('libvirtd.sysconf'),
-    }
-
     virt_daemons += {
       'name': 'virtproxyd',
       'c_args': [
@@ -239,11 +234,6 @@ if conf.has('WITH_REMOTE')
       'confd': files('virtproxyd.confd'),
     }
 
-    sysconf_files += {
-      'name': 'virtproxyd',
-      'file': files('virtproxyd.sysconf'),
-    }
-
     virt_install_dirs += [
       localstatedir / 'log' / 'libvirt',
     ]
index f43ce9ee6e41e37ef6c2fc2ac3503dcfdcbe1f51..10e8cf72639cc14de79f55453777089548221b39 100644 (file)
@@ -13,6 +13,7 @@ Documentation=https://libvirt.org
 
 [Service]
 Type=notify
+Environment=VIRTPROXYD_ARGS="--timeout 120"
 EnvironmentFile=-@sysconfdir@/sysconfig/virtproxyd
 ExecStart=@sbindir@/virtproxyd $VIRTPROXYD_ARGS
 ExecReload=/bin/kill -HUP $MAINPID
diff --git a/src/remote/virtproxyd.sysconf b/src/remote/virtproxyd.sysconf
deleted file mode 100644 (file)
index 0fc5c61..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# Customizations for the virtproxyd.service systemd unit
-
-VIRTPROXYD_ARGS="--timeout 120"
index a487055cde524aff9cd369254454781e446905ae..efc0ebb1e6d511169bc95e5ecfdd52dbbd5b44e9 100644 (file)
@@ -43,9 +43,4 @@ if conf.has('WITH_SECRETS')
     'name': 'virtsecretd',
     'in_file': files('virtsecretd.init.in'),
   }
-
-  sysconf_files += {
-    'name': 'virtsecretd',
-    'file': files('virtsecretd.sysconf'),
-  }
 endif
index 8444142a3a9f8410a57ea2fa54d1838b8d5d4780..cbd63fe0b2c72a0c05ea1930d242183048db370c 100644 (file)
@@ -13,6 +13,7 @@ Documentation=https://libvirt.org
 
 [Service]
 Type=notify
+Environment=VIRTSECRETD_ARGS="--timeout 120"
 EnvironmentFile=-@sysconfdir@/sysconfig/virtsecretd
 ExecStart=@sbindir@/virtsecretd $VIRTSECRETD_ARGS
 ExecReload=/bin/kill -HUP $MAINPID
diff --git a/src/secret/virtsecretd.sysconf b/src/secret/virtsecretd.sysconf
deleted file mode 100644 (file)
index 2247d05..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# Customizations for the virtsecretd.service systemd unit
-
-VIRTSECRETD_ARGS="--timeout 120"
index d1aa66b1470171510f476ee96791467ee9c9fd03..c43707461d44bc4ca7ace98d88904c84a9ad8bc7 100644 (file)
@@ -125,11 +125,6 @@ if conf.has('WITH_STORAGE')
     'name': 'virtstoraged',
     'in_file': files('virtstoraged.init.in'),
   }
-
-  sysconf_files += {
-    'name': 'virtstoraged',
-    'file': files('virtstoraged.sysconf'),
-  }
 endif
 
 if conf.has('WITH_STORAGE_DISK')
index fc3e9a1b69ad3419ba34444d6bb2119503640279..f72f8426fdef20e72aabcfe7c2844134dd3f069d 100644 (file)
@@ -15,6 +15,7 @@ Documentation=https://libvirt.org
 
 [Service]
 Type=notify
+Environment=VIRTSTORAGED_ARGS="--timeout 120"
 EnvironmentFile=-@sysconfdir@/sysconfig/virtstoraged
 ExecStart=@sbindir@/virtstoraged $VIRTSTORAGED_ARGS
 ExecReload=/bin/kill -HUP $MAINPID
diff --git a/src/storage/virtstoraged.sysconf b/src/storage/virtstoraged.sysconf
deleted file mode 100644 (file)
index 122373e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# Customizations for the virtstoraged.service systemd unit
-
-VIRTSTORAGED_ARGS="--timeout 120"
index df0cfb40e804bb5838e011c370861e0104a0f960..240f2389a9534ec130a406e5730e17a1e427f237 100644 (file)
@@ -68,9 +68,4 @@ if conf.has('WITH_VBOX')
     'name': 'virtvboxd',
     'in_file': files('virtvboxd.init.in'),
   }
-
-  sysconf_files += {
-    'name': 'virtvboxd',
-    'file': files('virtvboxd.sysconf'),
-  }
 endif
index ebb31dde07351f74b6a928276ad23d878edb4f0a..cfdafc39d2e9fd4c4e80682310214fdeda4c85b8 100644 (file)
@@ -14,6 +14,7 @@ Documentation=https://libvirt.org
 
 [Service]
 Type=notify
+Environment=VIRTVBOXD_ARGS="--timeout 120"
 EnvironmentFile=-@sysconfdir@/sysconfig/virtvboxd
 ExecStart=@sbindir@/virtvboxd $VIRTVBOXD_ARGS
 ExecReload=/bin/kill -HUP $MAINPID
diff --git a/src/vbox/virtvboxd.sysconf b/src/vbox/virtvboxd.sysconf
deleted file mode 100644 (file)
index 37ad353..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# Customizations for the virtvboxd.service systemd unit
-
-VIRTVBOXD_ARGS="--timeout 120"
index 14f7280f662be9266b671f33923b4b2498504a4d..d102696943b444be4fa1c2e3c24dc609c4ef29d4 100644 (file)
@@ -58,9 +58,4 @@ if conf.has('WITH_VZ')
     'name': 'virtvzd',
     'in_file': files('virtvzd.init.in'),
   }
-
-  sysconf_files += {
-    'name': 'virtvzd',
-    'file': files('virtvzd.sysconf'),
-  }
 endif
index f551cb8fbf03441deb6c2444156bb55711911f75..7636bf2b9e0b83f9b26fb6a3880d01d28f8b780d 100644 (file)
@@ -14,6 +14,7 @@ Documentation=https://libvirt.org
 
 [Service]
 Type=notify
+Environment=VIRTVZD_ARGS="--timeout 120"
 EnvironmentFile=-@sysconfdir@/sysconfig/virtvzd
 ExecStart=@sbindir@/virtvzd $VIRTVZD_ARGS
 ExecReload=/bin/kill -HUP $MAINPID
diff --git a/src/vz/virtvzd.sysconf b/src/vz/virtvzd.sysconf
deleted file mode 100644 (file)
index a86b9df..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# Customizations for the virtvzd.service systemd unit
-
-VIRTVZD_ARGS="--timeout 120"
diff --git a/tools/libvirt-guests.sysconf b/tools/libvirt-guests.sysconf
deleted file mode 100644 (file)
index 4f83eda..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-# Customizations for the libvirt-guests.service systemd unit
-
-# URIs to check for running guests
-# example: URIS='default xen:///system vbox+tcp://host/system lxc:///system'
-#URIS=default
-
-# action taken on host boot
-# - start   all guests which were running on shutdown are started on boot
-#           regardless on their autostart settings
-# - ignore  libvirt-guests init script won't start any guest on boot, however,
-#           guests marked as autostart will still be automatically started by
-#           libvirtd
-#ON_BOOT=start
-
-# Number of seconds to wait between each guest start. Set to 0 to allow
-# parallel startup.
-#START_DELAY=0
-
-# action taken on host shutdown
-# - suspend   all running guests are suspended using virsh managedsave
-# - shutdown  all running guests are asked to shutdown. Please be careful with
-#             this settings since there is no way to distinguish between a
-#             guest which is stuck or ignores shutdown requests and a guest
-#             which just needs a long time to shutdown. When setting
-#             ON_SHUTDOWN=shutdown, you must also set SHUTDOWN_TIMEOUT to a
-#             value suitable for your guests.
-#ON_SHUTDOWN=suspend
-
-# Number of guests will be shutdown concurrently, taking effect when
-# "ON_SHUTDOWN" is set to "shutdown". If Set to 0, guests will be shutdown one
-# after another. Number of guests on shutdown at any time will not exceed number
-# set in this variable.
-#PARALLEL_SHUTDOWN=0
-
-# Number of seconds we're willing to wait for a guest to shut down. If parallel
-# shutdown is enabled, this timeout applies as a timeout for shutting down all
-# guests on a single URI defined in the variable URIS. If this is 0, then there
-# is no time out (use with caution, as guests might not respond to a shutdown
-# request). The default value is 300 seconds (5 minutes).
-#SHUTDOWN_TIMEOUT=300
-
-# If non-zero, try to bypass the file system cache when saving and
-# restoring guests, even though this may give slower operation for
-# some file systems.
-#BYPASS_CACHE=0
-
-# If non-zero, try to sync guest time on domain resume. Be aware, that
-# this requires guest agent with support for time synchronization
-# running in the guest. By default, this functionality is turned off.
-#SYNC_TIME=1
index 2d0aecb90b6646c65070fab859445d36bc4196e7..f4b4a16c29c947df2a9b1433118f235e6afe69a4 100644 (file)
@@ -308,12 +308,6 @@ if conf.has('WITH_LIBVIRTD')
   )
 
   if init_script == 'systemd'
-    install_data(
-      'libvirt-guests.sysconf',
-      install_dir: sysconfdir / 'sysconfig',
-      rename: 'libvirt-guests',
-    )
-
     configure_file(
       input: 'libvirt-guests.service.in',
       output: '@BASENAME@',