119c2d
From fabb2642be1ef180b221af36e5810f819622fc58 Mon Sep 17 00:00:00 2001
119c2d
Message-Id: <fabb2642be1ef180b221af36e5810f819622fc58@dist-git>
119c2d
From: Olaf Hering <olaf@aepfle.de>
119c2d
Date: Wed, 12 Jan 2022 11:45:08 +0100
119c2d
Subject: [PATCH] remove sysconfig files
119c2d
119c2d
sysconfig files are owned by the admin of the host. They have the
119c2d
liberty to put anything they want into these files. This makes it
119c2d
difficult to provide different built-in defaults.
119c2d
119c2d
Remove the sysconfig file and place the current desired default into
119c2d
the service file.
119c2d
119c2d
Local customizations can now go either into /etc/sysconfig/name
119c2d
or /etc/systemd/system/name.service.d/my-knobs.conf
119c2d
119c2d
Attempt to handle upgrades in libvirt.spec.
119c2d
Dirty files which are marked as %config will be renamed to file.rpmsave.
119c2d
To restore them automatically, move stale .rpmsave files away, and
119c2d
catch any new rpmsave files in %posttrans.
119c2d
119c2d
Signed-off-by: Olaf Hering <olaf@aepfle.de>
119c2d
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
119c2d
(cherry picked from commit 8eb4461645c5738674232ee26c15f5555230b7ff)
119c2d
119c2d
https://bugzilla.redhat.com/show_bug.cgi?id=2042529
119c2d
---
119c2d
 docs/daemons.rst                        | 21 ++++++++
119c2d
 docs/remote.html.in                     |  6 +--
119c2d
 libvirt.spec.in                         | 69 +++++++++++++++++++------
119c2d
 src/ch/meson.build                      |  5 --
119c2d
 src/ch/virtchd.service.in               |  1 +
119c2d
 src/ch/virtchd.sysconf                  |  3 --
119c2d
 src/interface/meson.build               |  5 --
119c2d
 src/interface/virtinterfaced.service.in |  1 +
119c2d
 src/interface/virtinterfaced.sysconf    |  3 --
119c2d
 src/libxl/meson.build                   |  5 --
119c2d
 src/libxl/virtxend.service.in           |  1 +
119c2d
 src/libxl/virtxend.sysconf              |  3 --
119c2d
 src/locking/meson.build                 |  5 --
119c2d
 src/locking/virtlockd.service.in        |  1 +
119c2d
 src/locking/virtlockd.sysconf           |  3 --
119c2d
 src/logging/meson.build                 |  5 --
119c2d
 src/logging/virtlogd.sysconf            |  3 --
119c2d
 src/lxc/meson.build                     |  5 --
119c2d
 src/lxc/virtlxcd.service.in             |  1 +
119c2d
 src/lxc/virtlxcd.sysconf                |  3 --
119c2d
 src/meson.build                         | 16 ------
119c2d
 src/network/meson.build                 |  5 --
119c2d
 src/network/virtnetworkd.service.in     |  1 +
119c2d
 src/network/virtnetworkd.sysconf        |  3 --
119c2d
 src/node_device/meson.build             |  5 --
119c2d
 src/node_device/virtnodedevd.service.in |  1 +
119c2d
 src/node_device/virtnodedevd.sysconf    |  3 --
119c2d
 src/nwfilter/meson.build                |  5 --
119c2d
 src/nwfilter/virtnwfilterd.service.in   |  1 +
119c2d
 src/nwfilter/virtnwfilterd.sysconf      |  3 --
119c2d
 src/qemu/meson.build                    |  5 --
119c2d
 src/qemu/virtqemud.service.in           |  1 +
119c2d
 src/qemu/virtqemud.sysconf              | 12 -----
119c2d
 src/remote/libvirtd.service.in          |  1 +
119c2d
 src/remote/libvirtd.sysconf             | 21 --------
119c2d
 src/remote/meson.build                  | 10 ----
119c2d
 src/remote/virtproxyd.service.in        |  1 +
119c2d
 src/remote/virtproxyd.sysconf           |  3 --
119c2d
 src/secret/meson.build                  |  5 --
119c2d
 src/secret/virtsecretd.service.in       |  1 +
119c2d
 src/secret/virtsecretd.sysconf          |  3 --
119c2d
 src/storage/meson.build                 |  5 --
119c2d
 src/storage/virtstoraged.service.in     |  1 +
119c2d
 src/storage/virtstoraged.sysconf        |  3 --
119c2d
 src/vbox/meson.build                    |  5 --
119c2d
 src/vbox/virtvboxd.service.in           |  1 +
119c2d
 src/vbox/virtvboxd.sysconf              |  3 --
119c2d
 src/vz/meson.build                      |  5 --
119c2d
 src/vz/virtvzd.service.in               |  1 +
119c2d
 src/vz/virtvzd.sysconf                  |  3 --
119c2d
 tools/libvirt-guests.sysconf            | 50 ------------------
119c2d
 tools/meson.build                       |  6 ---
119c2d
 52 files changed, 93 insertions(+), 245 deletions(-)
119c2d
 delete mode 100644 src/ch/virtchd.sysconf
119c2d
 delete mode 100644 src/interface/virtinterfaced.sysconf
119c2d
 delete mode 100644 src/libxl/virtxend.sysconf
119c2d
 delete mode 100644 src/locking/virtlockd.sysconf
119c2d
 delete mode 100644 src/logging/virtlogd.sysconf
119c2d
 delete mode 100644 src/lxc/virtlxcd.sysconf
119c2d
 delete mode 100644 src/network/virtnetworkd.sysconf
119c2d
 delete mode 100644 src/node_device/virtnodedevd.sysconf
119c2d
 delete mode 100644 src/nwfilter/virtnwfilterd.sysconf
119c2d
 delete mode 100644 src/qemu/virtqemud.sysconf
119c2d
 delete mode 100644 src/remote/libvirtd.sysconf
119c2d
 delete mode 100644 src/remote/virtproxyd.sysconf
119c2d
 delete mode 100644 src/secret/virtsecretd.sysconf
119c2d
 delete mode 100644 src/storage/virtstoraged.sysconf
119c2d
 delete mode 100644 src/vbox/virtvboxd.sysconf
119c2d
 delete mode 100644 src/vz/virtvzd.sysconf
119c2d
 delete mode 100644 tools/libvirt-guests.sysconf
119c2d
119c2d
diff --git a/docs/daemons.rst b/docs/daemons.rst
119c2d
index c8ae3b0cef..1f9bc34260 100644
119c2d
--- a/docs/daemons.rst
119c2d
+++ b/docs/daemons.rst
119c2d
@@ -686,3 +686,24 @@ socket unit names into the service. When using these old versions, the
119c2d
 ``unix_sock_dir`` setting in ``virtlockd.conf`` must be changed in
119c2d
 lock-step with the equivalent setting in the unit files to ensure that
119c2d
 ``virtlockd`` can identify the sockets.
119c2d
+
119c2d
+Changing command line options for daemons
119c2d
+=========================================
119c2d
+
119c2d
+Two ways exist to override the defaults in the provided service files:
119c2d
+either a systemd "drop-in" configuration file, or a ``/etc/sysconfig/$daemon``
119c2d
+file must be created.  For example, to change the command line option
119c2d
+for a debug session of ``libvirtd``, create a file
119c2d
+``/etc/systemd/system/libvirtd.service.d/debug.conf`` with the following content:
119c2d
+
119c2d
+   ::
119c2d
+
119c2d
+      [Unit]
119c2d
+      Description=Virtualization daemon, with override from debug.conf
119c2d
+
119c2d
+      [Service]
119c2d
+      Environment=G_DEBUG=fatal-warnings
119c2d
+      Environment=LIBVIRTD_ARGS="--listen --verbose"
119c2d
+
119c2d
+After changes to systemd "drop-in" configuration files it is required to run
119c2d
+``systemctl daemon-reload``.
119c2d
diff --git a/docs/remote.html.in b/docs/remote.html.in
119c2d
index efdb2b3253..47fb2d4df3 100644
119c2d
--- a/docs/remote.html.in
119c2d
+++ b/docs/remote.html.in
119c2d
@@ -138,9 +138,9 @@ Blank lines and comments beginning with # are ignored.
119c2d
          1 (on) 
119c2d
         
119c2d
   Listen for secure TLS connections on the public TCP/IP port.
119c2d
-  Note: it is also necessary to start the server in listening mode by
119c2d
-  running it with --listen or editing /etc/sysconfig/libvirtd by uncommenting the LIBVIRTD_ARGS="--listen" line
119c2d
-  to cause the server to come up in listening mode whenever it is started.
119c2d
+  Note: it is also necessary to start the server in listening mode
119c2d
+  by running it with --listen or adding a LIBVIRTD_ARGS="--listen"
119c2d
+  line to /etc/sysconfig/libvirtd.
119c2d
 
119c2d
       
119c2d
       
119c2d
diff --git a/src/ch/meson.build b/src/ch/meson.build
119c2d
index e0afdb390a..a4bf0c6649 100644
119c2d
--- a/src/ch/meson.build
119c2d
+++ b/src/ch/meson.build
119c2d
@@ -63,11 +63,6 @@ if conf.has('WITH_CH')
119c2d
     'sockets': [ 'main', 'ro', 'admin' ],
119c2d
   }
119c2d
 
119c2d
-  sysconf_files += {
119c2d
-    'name': 'virtchd',
119c2d
-    'file': files('virtchd.sysconf'),
119c2d
-  }
119c2d
-
119c2d
   virt_install_dirs += [
119c2d
     localstatedir / 'lib' / 'libvirt' / 'ch',
119c2d
     runstatedir / 'libvirt' / 'ch',
119c2d
diff --git a/src/ch/virtchd.service.in b/src/ch/virtchd.service.in
119c2d
index cc1e85d1df..f08339f211 100644
119c2d
--- a/src/ch/virtchd.service.in
119c2d
+++ b/src/ch/virtchd.service.in
119c2d
@@ -18,6 +18,7 @@ Documentation=https://libvirt.org
119c2d
 
119c2d
 [Service]
119c2d
 Type=notify
119c2d
+Environment=VIRTCHD_ARGS="--timeout 120"
119c2d
 EnvironmentFile=-@sysconfdir@/sysconfig/virtchd
119c2d
 ExecStart=@sbindir@/virtchd $VIRTCHD_ARGS
119c2d
 ExecReload=/bin/kill -HUP $MAINPID
119c2d
diff --git a/src/ch/virtchd.sysconf b/src/ch/virtchd.sysconf
119c2d
deleted file mode 100644
119c2d
index 5ee44be5cf..0000000000
119c2d
--- a/src/ch/virtchd.sysconf
119c2d
+++ /dev/null
119c2d
@@ -1,3 +0,0 @@
119c2d
-# Customizations for the virtchd.service systemd unit
119c2d
-
119c2d
-VIRTCHD_ARGS="--timeout 120"
119c2d
diff --git a/src/interface/meson.build b/src/interface/meson.build
119c2d
index 2d4e30362c..f9f378aeb0 100644
119c2d
--- a/src/interface/meson.build
119c2d
+++ b/src/interface/meson.build
119c2d
@@ -54,9 +54,4 @@ if conf.has('WITH_INTERFACE')
119c2d
     'name': 'virtinterfaced',
119c2d
     'in_file': files('virtinterfaced.init.in')
119c2d
   }
119c2d
-
119c2d
-  sysconf_files += {
119c2d
-    'name': 'virtinterfaced',
119c2d
-    'file': files('virtinterfaced.sysconf'),
119c2d
-  }
119c2d
 endif
119c2d
diff --git a/src/interface/virtinterfaced.service.in b/src/interface/virtinterfaced.service.in
119c2d
index 73d409b81b..3d944e17a9 100644
119c2d
--- a/src/interface/virtinterfaced.service.in
119c2d
+++ b/src/interface/virtinterfaced.service.in
119c2d
@@ -13,6 +13,7 @@ Documentation=https://libvirt.org
119c2d
 
119c2d
 [Service]
119c2d
 Type=notify
119c2d
+Environment=VIRTINTERFACED_ARGS="--timeout 120"
119c2d
 EnvironmentFile=-@sysconfdir@/sysconfig/virtinterfaced
119c2d
 ExecStart=@sbindir@/virtinterfaced $VIRTINTERFACED_ARGS
119c2d
 ExecReload=/bin/kill -HUP $MAINPID
119c2d
diff --git a/src/interface/virtinterfaced.sysconf b/src/interface/virtinterfaced.sysconf
119c2d
deleted file mode 100644
119c2d
index 0685da31b8..0000000000
119c2d
--- a/src/interface/virtinterfaced.sysconf
119c2d
+++ /dev/null
119c2d
@@ -1,3 +0,0 @@
119c2d
-# Customizations for the virtinterfaced.service systemd unit
119c2d
-
119c2d
-VIRTINTERFACED_ARGS="--timeout 120"
119c2d
diff --git a/src/libxl/meson.build b/src/libxl/meson.build
119c2d
index 9793899106..8347a3c966 100644
119c2d
--- a/src/libxl/meson.build
119c2d
+++ b/src/libxl/meson.build
119c2d
@@ -78,11 +78,6 @@ if conf.has('WITH_LIBXL')
119c2d
     'in_file': files('virtxend.init.in'),
119c2d
   }
119c2d
 
119c2d
-  sysconf_files += {
119c2d
-    'name': 'virtxend',
119c2d
-    'file': files('virtxend.sysconf'),
119c2d
-  }
119c2d
-
119c2d
   virt_install_dirs += [
119c2d
     localstatedir / 'lib' / 'libvirt' / 'libxl',
119c2d
     runstatedir / 'libvirt' / 'libxl',
119c2d
diff --git a/src/libxl/virtxend.service.in b/src/libxl/virtxend.service.in
119c2d
index 19b19ce3e6..2b5163e179 100644
119c2d
--- a/src/libxl/virtxend.service.in
119c2d
+++ b/src/libxl/virtxend.service.in
119c2d
@@ -18,6 +18,7 @@ ConditionPathExists=/proc/xen/capabilities
119c2d
 
119c2d
 [Service]
119c2d
 Type=notify
119c2d
+Environment=VIRTXEND_ARGS="--timeout 120"
119c2d
 EnvironmentFile=-@sysconfdir@/sysconfig/virtxend
119c2d
 ExecStart=@sbindir@/virtxend $VIRTXEND_ARGS
119c2d
 ExecReload=/bin/kill -HUP $MAINPID
119c2d
diff --git a/src/libxl/virtxend.sysconf b/src/libxl/virtxend.sysconf
119c2d
deleted file mode 100644
119c2d
index 301da47e8d..0000000000
119c2d
--- a/src/libxl/virtxend.sysconf
119c2d
+++ /dev/null
119c2d
@@ -1,3 +0,0 @@
119c2d
-# Customizations for the virtxend.service systemd unit
119c2d
-
119c2d
-VIRTXEND_ARGS="--timeout 120"
119c2d
diff --git a/src/locking/meson.build b/src/locking/meson.build
119c2d
index 184d3c3f56..72f7780438 100644
119c2d
--- a/src/locking/meson.build
119c2d
+++ b/src/locking/meson.build
119c2d
@@ -156,11 +156,6 @@ if conf.has('WITH_LIBVIRTD')
119c2d
     'in_file': files('virtlockd.init.in'),
119c2d
   }
119c2d
 
119c2d
-  sysconf_files += {
119c2d
-    'name': 'virtlockd',
119c2d
-    'file': files('virtlockd.sysconf'),
119c2d
-  }
119c2d
-
119c2d
   if conf.has('WITH_SANLOCK')
119c2d
     virt_helpers += {
119c2d
       'name': 'libvirt_sanlock_helper',
119c2d
diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.service.in
119c2d
index 4a6fab05ab..19271d1e7d 100644
119c2d
--- a/src/locking/virtlockd.service.in
119c2d
+++ b/src/locking/virtlockd.service.in
119c2d
@@ -7,6 +7,7 @@ Documentation=man:virtlockd(8)
119c2d
 Documentation=https://libvirt.org
119c2d
 
119c2d
 [Service]
119c2d
+Environment=VIRTLOCKD_ARGS=
119c2d
 EnvironmentFile=-@sysconfdir@/sysconfig/virtlockd
119c2d
 ExecStart=@sbindir@/virtlockd $VIRTLOCKD_ARGS
119c2d
 ExecReload=/bin/kill -USR1 $MAINPID
119c2d
diff --git a/src/locking/virtlockd.sysconf b/src/locking/virtlockd.sysconf
119c2d
deleted file mode 100644
119c2d
index 03aea9e1bc..0000000000
119c2d
--- a/src/locking/virtlockd.sysconf
119c2d
+++ /dev/null
119c2d
@@ -1,3 +0,0 @@
119c2d
-# Customizations for the virtlockd.service systemd unit
119c2d
-
119c2d
-VIRTLOCKD_ARGS=""
119c2d
diff --git a/src/logging/meson.build b/src/logging/meson.build
119c2d
index 89e06a0d5a..7066f16fad 100644
119c2d
--- a/src/logging/meson.build
119c2d
+++ b/src/logging/meson.build
119c2d
@@ -101,11 +101,6 @@ if conf.has('WITH_LIBVIRTD')
119c2d
     'name': 'virtlogd',
119c2d
     'in_file': files('virtlogd.init.in'),
119c2d
   }
119c2d
-
119c2d
-  sysconf_files += {
119c2d
-    'name': 'virtlogd',
119c2d
-    'file': files('virtlogd.sysconf'),
119c2d
-  }
119c2d
 endif
119c2d
 
119c2d
 log_inc_dir = include_directories('.')
119c2d
diff --git a/src/logging/virtlogd.sysconf b/src/logging/virtlogd.sysconf
119c2d
deleted file mode 100644
119c2d
index 67993e83ce..0000000000
119c2d
--- a/src/logging/virtlogd.sysconf
119c2d
+++ /dev/null
119c2d
@@ -1,3 +0,0 @@
119c2d
-# Customizations for the virtlogd.service systemd unit
119c2d
-
119c2d
-VIRTLOGD_ARGS=""
119c2d
diff --git a/src/lxc/meson.build b/src/lxc/meson.build
119c2d
index ad5c659dba..c1f71b43e1 100644
119c2d
--- a/src/lxc/meson.build
119c2d
+++ b/src/lxc/meson.build
119c2d
@@ -175,11 +175,6 @@ if conf.has('WITH_LXC')
119c2d
     'in_file': files('virtlxcd.init.in'),
119c2d
   }
119c2d
 
119c2d
-  sysconf_files += {
119c2d
-    'name': 'virtlxcd',
119c2d
-    'file': files('virtlxcd.sysconf'),
119c2d
-  }
119c2d
-
119c2d
   virt_install_dirs += [
119c2d
     localstatedir / 'lib' / 'libvirt' / 'lxc',
119c2d
     runstatedir / 'libvirt' / 'lxc',
119c2d
diff --git a/src/lxc/virtlxcd.service.in b/src/lxc/virtlxcd.service.in
119c2d
index 3af7c1a52d..d58bde9f5d 100644
119c2d
--- a/src/lxc/virtlxcd.service.in
119c2d
+++ b/src/lxc/virtlxcd.service.in
119c2d
@@ -18,6 +18,7 @@ Documentation=https://libvirt.org
119c2d
 
119c2d
 [Service]
119c2d
 Type=notify
119c2d
+Environment=VIRTLXCD_ARGS="--timeout 120"
119c2d
 EnvironmentFile=-@sysconfdir@/sysconfig/virtlxcd
119c2d
 ExecStart=@sbindir@/virtlxcd $VIRTLXCD_ARGS
119c2d
 ExecReload=/bin/kill -HUP $MAINPID
119c2d
diff --git a/src/lxc/virtlxcd.sysconf b/src/lxc/virtlxcd.sysconf
119c2d
deleted file mode 100644
119c2d
index 119a4a23f3..0000000000
119c2d
--- a/src/lxc/virtlxcd.sysconf
119c2d
+++ /dev/null
119c2d
@@ -1,3 +0,0 @@
119c2d
-# Customizations for the virtlxcd.service systemd unit
119c2d
-
119c2d
-VIRTLXCD_ARGS="--timeout 120"
119c2d
diff --git a/src/meson.build b/src/meson.build
119c2d
index 2408344ef7..fc6c77f5d1 100644
119c2d
--- a/src/meson.build
119c2d
+++ b/src/meson.build
119c2d
@@ -208,12 +208,6 @@ virt_daemon_units = []
119c2d
 #   * in_file - source init file (required)
119c2d
 openrc_init_files = []
119c2d
 
119c2d
-# sysconf_files
119c2d
-#   install libvirt daemon sysconf files
119c2d
-#   * name - daemon name (required)
119c2d
-#   * file - source sysconf file (required)
119c2d
-sysconf_files = []
119c2d
-
119c2d
 # virt_install_dirs:
119c2d
 #   list of directories to create during installation
119c2d
 virt_install_dirs = []
119c2d
@@ -868,16 +862,6 @@ if conf.has('WITH_LIBVIRTD')
119c2d
   endif
119c2d
 endif
119c2d
 
119c2d
-if init_script != 'none'
119c2d
-  foreach sysconf : sysconf_files
119c2d
-    install_data(
119c2d
-      sysconf['file'],
119c2d
-      install_dir: sysconfdir / 'sysconfig',
119c2d
-      rename: [ sysconf['name'] ],
119c2d
-    )
119c2d
-  endforeach
119c2d
-endif
119c2d
-
119c2d
 if conf.has('WITH_DTRACE_PROBES')
119c2d
   custom_target(
119c2d
     'libvirt_functions.stp',
119c2d
diff --git a/src/network/meson.build b/src/network/meson.build
119c2d
index d6fb624bb7..e7c43bc4c4 100644
119c2d
--- a/src/network/meson.build
119c2d
+++ b/src/network/meson.build
119c2d
@@ -72,11 +72,6 @@ if conf.has('WITH_NETWORK')
119c2d
     'in_file': files('virtnetworkd.init.in'),
119c2d
   }
119c2d
 
119c2d
-  sysconf_files += {
119c2d
-    'name': 'virtnetworkd',
119c2d
-    'file': files('virtnetworkd.sysconf'),
119c2d
-  }
119c2d
-
119c2d
   virt_install_dirs += [
119c2d
     localstatedir / 'lib' / 'libvirt' / 'network',
119c2d
     localstatedir / 'lib' / 'libvirt' / 'dnsmasq',
119c2d
diff --git a/src/network/virtnetworkd.service.in b/src/network/virtnetworkd.service.in
119c2d
index 4c39d2a5d7..3decfbbf1d 100644
119c2d
--- a/src/network/virtnetworkd.service.in
119c2d
+++ b/src/network/virtnetworkd.service.in
119c2d
@@ -16,6 +16,7 @@ Documentation=https://libvirt.org
119c2d
 
119c2d
 [Service]
119c2d
 Type=notify
119c2d
+Environment=VIRTNETWORKD_ARGS="--timeout 120"
119c2d
 EnvironmentFile=-@sysconfdir@/sysconfig/virtnetworkd
119c2d
 ExecStart=@sbindir@/virtnetworkd $VIRTNETWORKD_ARGS
119c2d
 ExecReload=/bin/kill -HUP $MAINPID
119c2d
diff --git a/src/network/virtnetworkd.sysconf b/src/network/virtnetworkd.sysconf
119c2d
deleted file mode 100644
119c2d
index 93f3a7a327..0000000000
119c2d
--- a/src/network/virtnetworkd.sysconf
119c2d
+++ /dev/null
119c2d
@@ -1,3 +0,0 @@
119c2d
-# Customizations for the virtnetworkd.service systemd unit
119c2d
-
119c2d
-VIRTNETWORKD_ARGS="--timeout 120"
119c2d
diff --git a/src/node_device/meson.build b/src/node_device/meson.build
119c2d
index 15f9c3ad29..5013d825b3 100644
119c2d
--- a/src/node_device/meson.build
119c2d
+++ b/src/node_device/meson.build
119c2d
@@ -62,9 +62,4 @@ if conf.has('WITH_NODE_DEVICES')
119c2d
     'name': 'virtnodedevd',
119c2d
     'in_file': files('virtnodedevd.init.in'),
119c2d
   }
119c2d
-
119c2d
-  sysconf_files += {
119c2d
-    'name': 'virtnodedevd',
119c2d
-    'file': files('virtnodedevd.sysconf'),
119c2d
-  }
119c2d
 endif
119c2d
diff --git a/src/node_device/virtnodedevd.service.in b/src/node_device/virtnodedevd.service.in
119c2d
index d2453dd620..688cf89822 100644
119c2d
--- a/src/node_device/virtnodedevd.service.in
119c2d
+++ b/src/node_device/virtnodedevd.service.in
119c2d
@@ -13,6 +13,7 @@ Documentation=https://libvirt.org
119c2d
 
119c2d
 [Service]
119c2d
 Type=notify
119c2d
+Environment=VIRTNODEDEVD_ARGS="--timeout 120"
119c2d
 EnvironmentFile=-@sysconfdir@/sysconfig/virtnodedevd
119c2d
 ExecStart=@sbindir@/virtnodedevd $VIRTNODEDEVD_ARGS
119c2d
 ExecReload=/bin/kill -HUP $MAINPID
119c2d
diff --git a/src/node_device/virtnodedevd.sysconf b/src/node_device/virtnodedevd.sysconf
119c2d
deleted file mode 100644
119c2d
index fa7faa3a79..0000000000
119c2d
--- a/src/node_device/virtnodedevd.sysconf
119c2d
+++ /dev/null
119c2d
@@ -1,3 +0,0 @@
119c2d
-# Customizations for the virtnodedevd.service systemd unit
119c2d
-
119c2d
-VIRTNODEDEVD_ARGS="--timeout 120"
119c2d
diff --git a/src/nwfilter/meson.build b/src/nwfilter/meson.build
119c2d
index a21e575925..ebbe712906 100644
119c2d
--- a/src/nwfilter/meson.build
119c2d
+++ b/src/nwfilter/meson.build
119c2d
@@ -61,10 +61,5 @@ if conf.has('WITH_NWFILTER')
119c2d
     'in_file': files('virtnwfilterd.init.in'),
119c2d
   }
119c2d
 
119c2d
-  sysconf_files += {
119c2d
-    'name': 'virtnwfilterd',
119c2d
-    'file': files('virtnwfilterd.sysconf'),
119c2d
-  }
119c2d
-
119c2d
   subdir('xml')
119c2d
 endif
119c2d
diff --git a/src/nwfilter/virtnwfilterd.service.in b/src/nwfilter/virtnwfilterd.service.in
119c2d
index dda7c01a3d..36d00b58f0 100644
119c2d
--- a/src/nwfilter/virtnwfilterd.service.in
119c2d
+++ b/src/nwfilter/virtnwfilterd.service.in
119c2d
@@ -13,6 +13,7 @@ Documentation=https://libvirt.org
119c2d
 
119c2d
 [Service]
119c2d
 Type=notify
119c2d
+Environment=VIRTNWFILTERD_ARGS="--timeout 120"
119c2d
 EnvironmentFile=-@sysconfdir@/sysconfig/virtnwfilterd
119c2d
 ExecStart=@sbindir@/virtnwfilterd $VIRTNWFILTERD_ARGS
119c2d
 ExecReload=/bin/kill -HUP $MAINPID
119c2d
diff --git a/src/nwfilter/virtnwfilterd.sysconf b/src/nwfilter/virtnwfilterd.sysconf
119c2d
deleted file mode 100644
119c2d
index 80cc645ba5..0000000000
119c2d
--- a/src/nwfilter/virtnwfilterd.sysconf
119c2d
+++ /dev/null
119c2d
@@ -1,3 +0,0 @@
119c2d
-# Customizations for the virtnwfilterd.service systemd unit
119c2d
-
119c2d
-VIRTNWFILTERD_ARGS="--timeout 120"
119c2d
diff --git a/src/qemu/meson.build b/src/qemu/meson.build
119c2d
index 66ef594006..5f82f687c1 100644
119c2d
--- a/src/qemu/meson.build
119c2d
+++ b/src/qemu/meson.build
119c2d
@@ -165,11 +165,6 @@ if conf.has('WITH_QEMU')
119c2d
     'in_file': files('virtqemud.init.in'),
119c2d
   }
119c2d
 
119c2d
-  sysconf_files += {
119c2d
-    'name': 'virtqemud',
119c2d
-    'file': files('virtqemud.sysconf'),
119c2d
-  }
119c2d
-
119c2d
   if conf.has('WITH_SYSCTL')
119c2d
     install_data(
119c2d
       'postcopy-migration.sysctl',
119c2d
diff --git a/src/qemu/virtqemud.service.in b/src/qemu/virtqemud.service.in
119c2d
index 20e1b43a6e..551eb4d405 100644
119c2d
--- a/src/qemu/virtqemud.service.in
119c2d
+++ b/src/qemu/virtqemud.service.in
119c2d
@@ -20,6 +20,7 @@ Documentation=https://libvirt.org
119c2d
 
119c2d
 [Service]
119c2d
 Type=notify
119c2d
+Environment=VIRTQEMUD_ARGS="--timeout 120"
119c2d
 EnvironmentFile=-@sysconfdir@/sysconfig/virtqemud
119c2d
 ExecStart=@sbindir@/virtqemud $VIRTQEMUD_ARGS
119c2d
 ExecReload=/bin/kill -HUP $MAINPID
119c2d
diff --git a/src/qemu/virtqemud.sysconf b/src/qemu/virtqemud.sysconf
119c2d
deleted file mode 100644
119c2d
index 87b626e3ed..0000000000
119c2d
--- a/src/qemu/virtqemud.sysconf
119c2d
+++ /dev/null
119c2d
@@ -1,12 +0,0 @@
119c2d
-# Customizations for the virtqemud.service systemd unit
119c2d
-
119c2d
-VIRTQEMUD_ARGS="--timeout 120"
119c2d
-
119c2d
-# Override the QEMU/SDL default audio driver probing when
119c2d
-# starting virtual machines using SDL graphics
119c2d
-#
119c2d
-# NB these have no effect for VMs using VNC, unless vnc_allow_host_audio
119c2d
-# is enabled in /etc/libvirt/qemu.conf
119c2d
-#QEMU_AUDIO_DRV=sdl
119c2d
-#
119c2d
-#SDL_AUDIODRIVER=pulse
119c2d
diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in
119c2d
index cc0d4e3693..5d4d412fcc 100644
119c2d
--- a/src/remote/libvirtd.service.in
119c2d
+++ b/src/remote/libvirtd.service.in
119c2d
@@ -28,6 +28,7 @@ Documentation=https://libvirt.org
119c2d
 
119c2d
 [Service]
119c2d
 Type=notify
119c2d
+Environment=LIBVIRTD_ARGS="--timeout 120"
119c2d
 EnvironmentFile=-@sysconfdir@/sysconfig/libvirtd
119c2d
 ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
119c2d
 ExecReload=/bin/kill -HUP $MAINPID
119c2d
diff --git a/src/remote/libvirtd.sysconf b/src/remote/libvirtd.sysconf
119c2d
deleted file mode 100644
119c2d
index 18aec1ba67..0000000000
119c2d
--- a/src/remote/libvirtd.sysconf
119c2d
+++ /dev/null
119c2d
@@ -1,21 +0,0 @@
119c2d
-# Customizations for the libvirtd.service systemd unit
119c2d
-
119c2d
-# Default behaviour is for libvirtd.service to start on boot
119c2d
-# so that VM autostart can be performed. We then want it to
119c2d
-# shutdown again if nothing was started and rely on systemd
119c2d
-# socket activation to start it again when some client app
119c2d
-# connects.
119c2d
-LIBVIRTD_ARGS="--timeout 120"
119c2d
-
119c2d
-# If systemd socket activation is disabled, then the following
119c2d
-# can be used to listen on TCP/TLS sockets
119c2d
-#LIBVIRTD_ARGS="--listen"
119c2d
-
119c2d
-# Override the QEMU/SDL default audio driver probing when
119c2d
-# starting virtual machines using SDL graphics
119c2d
-#
119c2d
-# NB these have no effect for VMs using VNC, unless vnc_allow_host_audio
119c2d
-# is enabled in /etc/libvirt/qemu.conf
119c2d
-#QEMU_AUDIO_DRV=sdl
119c2d
-#
119c2d
-#SDL_AUDIODRIVER=pulse
119c2d
diff --git a/src/remote/meson.build b/src/remote/meson.build
119c2d
index 0a188268b5..fc98d0e5be 100644
119c2d
--- a/src/remote/meson.build
119c2d
+++ b/src/remote/meson.build
119c2d
@@ -204,11 +204,6 @@ if conf.has('WITH_REMOTE')
119c2d
       'confd': files('libvirtd.confd'),
119c2d
     }
119c2d
 
119c2d
-    sysconf_files += {
119c2d
-      'name': 'libvirtd',
119c2d
-      'file': files('libvirtd.sysconf'),
119c2d
-    }
119c2d
-
119c2d
     virt_daemons += {
119c2d
       'name': 'virtproxyd',
119c2d
       'c_args': [
119c2d
@@ -239,11 +234,6 @@ if conf.has('WITH_REMOTE')
119c2d
       'confd': files('virtproxyd.confd'),
119c2d
     }
119c2d
 
119c2d
-    sysconf_files += {
119c2d
-      'name': 'virtproxyd',
119c2d
-      'file': files('virtproxyd.sysconf'),
119c2d
-    }
119c2d
-
119c2d
     virt_install_dirs += [
119c2d
       localstatedir / 'log' / 'libvirt',
119c2d
     ]
119c2d
diff --git a/src/remote/virtproxyd.service.in b/src/remote/virtproxyd.service.in
119c2d
index f43ce9ee6e..10e8cf7263 100644
119c2d
--- a/src/remote/virtproxyd.service.in
119c2d
+++ b/src/remote/virtproxyd.service.in
119c2d
@@ -13,6 +13,7 @@ Documentation=https://libvirt.org
119c2d
 
119c2d
 [Service]
119c2d
 Type=notify
119c2d
+Environment=VIRTPROXYD_ARGS="--timeout 120"
119c2d
 EnvironmentFile=-@sysconfdir@/sysconfig/virtproxyd
119c2d
 ExecStart=@sbindir@/virtproxyd $VIRTPROXYD_ARGS
119c2d
 ExecReload=/bin/kill -HUP $MAINPID
119c2d
diff --git a/src/remote/virtproxyd.sysconf b/src/remote/virtproxyd.sysconf
119c2d
deleted file mode 100644
119c2d
index 0fc5c61096..0000000000
119c2d
--- a/src/remote/virtproxyd.sysconf
119c2d
+++ /dev/null
119c2d
@@ -1,3 +0,0 @@
119c2d
-# Customizations for the virtproxyd.service systemd unit
119c2d
-
119c2d
-VIRTPROXYD_ARGS="--timeout 120"
119c2d
diff --git a/src/secret/meson.build b/src/secret/meson.build
119c2d
index a487055cde..efc0ebb1e6 100644
119c2d
--- a/src/secret/meson.build
119c2d
+++ b/src/secret/meson.build
119c2d
@@ -43,9 +43,4 @@ if conf.has('WITH_SECRETS')
119c2d
     'name': 'virtsecretd',
119c2d
     'in_file': files('virtsecretd.init.in'),
119c2d
   }
119c2d
-
119c2d
-  sysconf_files += {
119c2d
-    'name': 'virtsecretd',
119c2d
-    'file': files('virtsecretd.sysconf'),
119c2d
-  }
119c2d
 endif
119c2d
diff --git a/src/secret/virtsecretd.service.in b/src/secret/virtsecretd.service.in
119c2d
index 8444142a3a..cbd63fe0b2 100644
119c2d
--- a/src/secret/virtsecretd.service.in
119c2d
+++ b/src/secret/virtsecretd.service.in
119c2d
@@ -13,6 +13,7 @@ Documentation=https://libvirt.org
119c2d
 
119c2d
 [Service]
119c2d
 Type=notify
119c2d
+Environment=VIRTSECRETD_ARGS="--timeout 120"
119c2d
 EnvironmentFile=-@sysconfdir@/sysconfig/virtsecretd
119c2d
 ExecStart=@sbindir@/virtsecretd $VIRTSECRETD_ARGS
119c2d
 ExecReload=/bin/kill -HUP $MAINPID
119c2d
diff --git a/src/secret/virtsecretd.sysconf b/src/secret/virtsecretd.sysconf
119c2d
deleted file mode 100644
119c2d
index 2247d05964..0000000000
119c2d
--- a/src/secret/virtsecretd.sysconf
119c2d
+++ /dev/null
119c2d
@@ -1,3 +0,0 @@
119c2d
-# Customizations for the virtsecretd.service systemd unit
119c2d
-
119c2d
-VIRTSECRETD_ARGS="--timeout 120"
119c2d
diff --git a/src/storage/meson.build b/src/storage/meson.build
119c2d
index d1aa66b147..c43707461d 100644
119c2d
--- a/src/storage/meson.build
119c2d
+++ b/src/storage/meson.build
119c2d
@@ -125,11 +125,6 @@ if conf.has('WITH_STORAGE')
119c2d
     'name': 'virtstoraged',
119c2d
     'in_file': files('virtstoraged.init.in'),
119c2d
   }
119c2d
-
119c2d
-  sysconf_files += {
119c2d
-    'name': 'virtstoraged',
119c2d
-    'file': files('virtstoraged.sysconf'),
119c2d
-  }
119c2d
 endif
119c2d
 
119c2d
 if conf.has('WITH_STORAGE_DISK')
119c2d
diff --git a/src/storage/virtstoraged.service.in b/src/storage/virtstoraged.service.in
119c2d
index fc3e9a1b69..f72f8426fd 100644
119c2d
--- a/src/storage/virtstoraged.service.in
119c2d
+++ b/src/storage/virtstoraged.service.in
119c2d
@@ -15,6 +15,7 @@ Documentation=https://libvirt.org
119c2d
 
119c2d
 [Service]
119c2d
 Type=notify
119c2d
+Environment=VIRTSTORAGED_ARGS="--timeout 120"
119c2d
 EnvironmentFile=-@sysconfdir@/sysconfig/virtstoraged
119c2d
 ExecStart=@sbindir@/virtstoraged $VIRTSTORAGED_ARGS
119c2d
 ExecReload=/bin/kill -HUP $MAINPID
119c2d
diff --git a/src/storage/virtstoraged.sysconf b/src/storage/virtstoraged.sysconf
119c2d
deleted file mode 100644
119c2d
index 122373eb7c..0000000000
119c2d
--- a/src/storage/virtstoraged.sysconf
119c2d
+++ /dev/null
119c2d
@@ -1,3 +0,0 @@
119c2d
-# Customizations for the virtstoraged.service systemd unit
119c2d
-
119c2d
-VIRTSTORAGED_ARGS="--timeout 120"
119c2d
diff --git a/src/vbox/meson.build b/src/vbox/meson.build
119c2d
index df0cfb40e8..240f2389a9 100644
119c2d
--- a/src/vbox/meson.build
119c2d
+++ b/src/vbox/meson.build
119c2d
@@ -68,9 +68,4 @@ if conf.has('WITH_VBOX')
119c2d
     'name': 'virtvboxd',
119c2d
     'in_file': files('virtvboxd.init.in'),
119c2d
   }
119c2d
-
119c2d
-  sysconf_files += {
119c2d
-    'name': 'virtvboxd',
119c2d
-    'file': files('virtvboxd.sysconf'),
119c2d
-  }
119c2d
 endif
119c2d
diff --git a/src/vbox/virtvboxd.service.in b/src/vbox/virtvboxd.service.in
119c2d
index ebb31dde07..cfdafc39d2 100644
119c2d
--- a/src/vbox/virtvboxd.service.in
119c2d
+++ b/src/vbox/virtvboxd.service.in
119c2d
@@ -14,6 +14,7 @@ Documentation=https://libvirt.org
119c2d
 
119c2d
 [Service]
119c2d
 Type=notify
119c2d
+Environment=VIRTVBOXD_ARGS="--timeout 120"
119c2d
 EnvironmentFile=-@sysconfdir@/sysconfig/virtvboxd
119c2d
 ExecStart=@sbindir@/virtvboxd $VIRTVBOXD_ARGS
119c2d
 ExecReload=/bin/kill -HUP $MAINPID
119c2d
diff --git a/src/vbox/virtvboxd.sysconf b/src/vbox/virtvboxd.sysconf
119c2d
deleted file mode 100644
119c2d
index 37ad353d54..0000000000
119c2d
--- a/src/vbox/virtvboxd.sysconf
119c2d
+++ /dev/null
119c2d
@@ -1,3 +0,0 @@
119c2d
-# Customizations for the virtvboxd.service systemd unit
119c2d
-
119c2d
-VIRTVBOXD_ARGS="--timeout 120"
119c2d
diff --git a/src/vz/meson.build b/src/vz/meson.build
119c2d
index 14f7280f66..d102696943 100644
119c2d
--- a/src/vz/meson.build
119c2d
+++ b/src/vz/meson.build
119c2d
@@ -58,9 +58,4 @@ if conf.has('WITH_VZ')
119c2d
     'name': 'virtvzd',
119c2d
     'in_file': files('virtvzd.init.in'),
119c2d
   }
119c2d
-
119c2d
-  sysconf_files += {
119c2d
-    'name': 'virtvzd',
119c2d
-    'file': files('virtvzd.sysconf'),
119c2d
-  }
119c2d
 endif
119c2d
diff --git a/src/vz/virtvzd.service.in b/src/vz/virtvzd.service.in
119c2d
index f551cb8fbf..7636bf2b9e 100644
119c2d
--- a/src/vz/virtvzd.service.in
119c2d
+++ b/src/vz/virtvzd.service.in
119c2d
@@ -14,6 +14,7 @@ Documentation=https://libvirt.org
119c2d
 
119c2d
 [Service]
119c2d
 Type=notify
119c2d
+Environment=VIRTVZD_ARGS="--timeout 120"
119c2d
 EnvironmentFile=-@sysconfdir@/sysconfig/virtvzd
119c2d
 ExecStart=@sbindir@/virtvzd $VIRTVZD_ARGS
119c2d
 ExecReload=/bin/kill -HUP $MAINPID
119c2d
diff --git a/src/vz/virtvzd.sysconf b/src/vz/virtvzd.sysconf
119c2d
deleted file mode 100644
119c2d
index a86b9dfb6c..0000000000
119c2d
--- a/src/vz/virtvzd.sysconf
119c2d
+++ /dev/null
119c2d
@@ -1,3 +0,0 @@
119c2d
-# Customizations for the virtvzd.service systemd unit
119c2d
-
119c2d
-VIRTVZD_ARGS="--timeout 120"
119c2d
diff --git a/tools/libvirt-guests.sysconf b/tools/libvirt-guests.sysconf
119c2d
deleted file mode 100644
119c2d
index 4f83edab90..0000000000
119c2d
--- a/tools/libvirt-guests.sysconf
119c2d
+++ /dev/null
119c2d
@@ -1,50 +0,0 @@
119c2d
-# Customizations for the libvirt-guests.service systemd unit
119c2d
-
119c2d
-# URIs to check for running guests
119c2d
-# example: URIS='default xen:///system vbox+tcp://host/system lxc:///system'
119c2d
-#URIS=default
119c2d
-
119c2d
-# action taken on host boot
119c2d
-# - start   all guests which were running on shutdown are started on boot
119c2d
-#           regardless on their autostart settings
119c2d
-# - ignore  libvirt-guests init script won't start any guest on boot, however,
119c2d
-#           guests marked as autostart will still be automatically started by
119c2d
-#           libvirtd
119c2d
-#ON_BOOT=start
119c2d
-
119c2d
-# Number of seconds to wait between each guest start. Set to 0 to allow
119c2d
-# parallel startup.
119c2d
-#START_DELAY=0
119c2d
-
119c2d
-# action taken on host shutdown
119c2d
-# - suspend   all running guests are suspended using virsh managedsave
119c2d
-# - shutdown  all running guests are asked to shutdown. Please be careful with
119c2d
-#             this settings since there is no way to distinguish between a
119c2d
-#             guest which is stuck or ignores shutdown requests and a guest
119c2d
-#             which just needs a long time to shutdown. When setting
119c2d
-#             ON_SHUTDOWN=shutdown, you must also set SHUTDOWN_TIMEOUT to a
119c2d
-#             value suitable for your guests.
119c2d
-#ON_SHUTDOWN=suspend
119c2d
-
119c2d
-# Number of guests will be shutdown concurrently, taking effect when
119c2d
-# "ON_SHUTDOWN" is set to "shutdown". If Set to 0, guests will be shutdown one
119c2d
-# after another. Number of guests on shutdown at any time will not exceed number
119c2d
-# set in this variable.
119c2d
-#PARALLEL_SHUTDOWN=0
119c2d
-
119c2d
-# Number of seconds we're willing to wait for a guest to shut down. If parallel
119c2d
-# shutdown is enabled, this timeout applies as a timeout for shutting down all
119c2d
-# guests on a single URI defined in the variable URIS. If this is 0, then there
119c2d
-# is no time out (use with caution, as guests might not respond to a shutdown
119c2d
-# request). The default value is 300 seconds (5 minutes).
119c2d
-#SHUTDOWN_TIMEOUT=300
119c2d
-
119c2d
-# If non-zero, try to bypass the file system cache when saving and
119c2d
-# restoring guests, even though this may give slower operation for
119c2d
-# some file systems.
119c2d
-#BYPASS_CACHE=0
119c2d
-
119c2d
-# If non-zero, try to sync guest time on domain resume. Be aware, that
119c2d
-# this requires guest agent with support for time synchronization
119c2d
-# running in the guest. By default, this functionality is turned off.
119c2d
-#SYNC_TIME=1
119c2d
diff --git a/tools/meson.build b/tools/meson.build
119c2d
index 2d0aecb90b..f4b4a16c29 100644
119c2d
--- a/tools/meson.build
119c2d
+++ b/tools/meson.build
119c2d
@@ -308,12 +308,6 @@ if conf.has('WITH_LIBVIRTD')
119c2d
   )
119c2d
 
119c2d
   if init_script == 'systemd'
119c2d
-    install_data(
119c2d
-      'libvirt-guests.sysconf',
119c2d
-      install_dir: sysconfdir / 'sysconfig',
119c2d
-      rename: 'libvirt-guests',
119c2d
-    )
119c2d
-
119c2d
     configure_file(
119c2d
       input: 'libvirt-guests.service.in',
119c2d
       output: '@BASENAME@',
119c2d
-- 
119c2d
2.35.0
119c2d