Bug#944890: ListenStream= references a path below legacy directory /var/run/, updating /var/run/libvirt/foo → /run/libvirt/foo; please update the unit file accordingly.

2020-01-15 Thread Michael Biebl
Am 15.01.20 um 16:35 schrieb Michael Biebl:
> I've updated the code to use runstatedir.
> What remains is to use --runstatedir=/run in debian/rules.

Small correction: Since debhelper compat 11 this is already the default
and since libvirt uses compat 12, you don't need to explicitly set it
anymore.

Michael



signature.asc
Description: OpenPGP digital signature


Bug#944890: ListenStream= references a path below legacy directory /var/run/, updating /var/run/libvirt/foo → /run/libvirt/foo; please update the unit file accordingly.

2020-01-15 Thread Michael Biebl
On Sun, 17 Nov 2019 12:28:38 +0100 Laurent Bigonville 
wrote:
> Package: libvirt-daemon-system
> Version: 5.6.0-2
> Severity: minor
> 
> Hello,
> 
> During boot, systemd complains that the .service and .socket files are
> pointing to /var/run instead of /run:
> 
> systemd[1]: /lib/systemd/system/virtlockd.socket:6: ListenStream= references 
> a path below legacy directory /var/run/, updating 
> /var/run/libvirt/virtlockd-sock → /run/libvirt/virtlockd-sock; please update 
> the unit file accordingly.
> systemd[1]: /lib/systemd/system/virtlockd-admin.socket:8: ListenStream= 
> references a path below legacy directory /var/run/, updating 
> /var/run/libvirt/virtlockd-admin-sock → /run/libvirt/virtlockd-admin-sock; 
> please update the unit file accordingly.
> systemd[1]: /lib/systemd/system/libvirtd-admin.socket:8: ListenStream= 
> references a path below legacy directory /var/run/, updating 
> /var/run/libvirt/libvirt-admin-sock → /run/libvirt/libvirt-admin-sock; please 
> update the unit file accordingly.
> systemd[1]: /lib/systemd/system/libvirtd-ro.socket:8: ListenStream= 
> references a path below legacy directory /var/run/, updating 
> /var/run/libvirt/libvirt-sock-ro → /run/libvirt/libvirt-sock-ro; please 
> update the unit file accordingly.
> systemd[1]: /lib/systemd/system/libvirtd.socket:6: ListenStream= references a 
> path below legacy directory /var/run/, updating /var/run/libvirt/libvirt-sock 
> → /run/libvirt/libvirt-sock; please update the unit file accordingly.
> systemd[1]: /lib/systemd/system/virtlogd.socket:6: ListenStream= references a 
> path below legacy directory /var/run/, updating 
> /var/run/libvirt/virtlogd-sock → /run/libvirt/virtlogd-sock; please update 
> the unit file accordingly.
> systemd[1]: /lib/systemd/system/virtlogd-admin.socket:8: ListenStream= 
> references a path below legacy directory /var/run/, updating 
> /var/run/libvirt/virtlogd-admin-sock → /run/libvirt/virtlogd-admin-sock; 
> please update the unit file accordingly.
> 
> 
> /run is supported in debian for quite some times, that can be used I
> guess.


I've updated the code to use runstatedir.
What remains is to use --runstatedir=/run in debian/rules.

I then noticed that upstream made similar changes as well. So once we
get a newer release of libvirt, this should be supported ootb.


But since I already did the work, I'm attaching the patches, just in
case you decide to keep 5.6 in unstable for a while longer.

Michael
From 80a821f040807e5cf4b1bd0d9c9905d960203de4 Mon Sep 17 00:00:00 2001
From: Michael Biebl 
Date: Wed, 15 Jan 2020 14:25:38 +0100
Subject: [PATCH 1/4] Search and replace to use runstatedir instead
 localstatedir

find . -type f | xargs sed -i 's#@localstatedir@/run#@runstatedir@#'
find . -type f | xargs sed -i 's#LOCALSTATEDIR "/run#RUNSTATEDIR "#'
find . -type f | xargs sed -i 's#LOCALSTATEDIR/run#RUNSTATEDIR#'
---
 src/bhyve/bhyve_utils.h   |  2 +-
 src/libvirt-admin.c   |  2 +-
 src/libvirtd.8.in | 16 
 src/libxl/libxl_conf.h|  2 +-
 src/locking/lock_daemon.c |  8 
 src/locking/lock_driver_lockd.c   |  2 +-
 src/locking/virtlockd-admin.socket.in |  2 +-
 src/locking/virtlockd.pod |  8 
 src/locking/virtlockd.socket.in   |  2 +-
 src/logging/log_daemon.c  |  8 
 src/logging/log_manager.c |  2 +-
 src/logging/virtlogd-admin.socket.in  |  2 +-
 src/logging/virtlogd.pod  |  8 
 src/logging/virtlogd.socket.in|  2 +-
 src/lxc/lxc_conf.h|  2 +-
 src/network/bridge_driver.c   |  4 ++--
 src/network/leaseshelper.c|  2 +-
 src/nwfilter/nwfilter_dhcpsnoop.c |  2 +-
 src/nwfilter/nwfilter_driver.c|  4 ++--
 src/remote/libvirtd-admin.socket.in   |  2 +-
 src/remote/libvirtd-ro.socket.in  |  2 +-
 src/remote/libvirtd.pod   | 10 +-
 src/remote/libvirtd.socket.in |  2 +-
 src/remote/remote_daemon.c|  8 
 src/remote/remote_driver.h|  4 ++--
 src/storage/storage_driver.c  |  2 +-
 src/util/virhostdev.c |  2 +-
 src/virtlockd.8.in| 12 ++--
 src/virtlogd.8.in | 12 ++--
 src/vz/vz_driver.c|  2 +-
 30 files changed, 69 insertions(+), 69 deletions(-)

diff --git a/src/bhyve/bhyve_utils.h b/src/bhyve/bhyve_utils.h
index 3d212e3..8dda606 100644
--- a/src/bhyve/bhyve_utils.h
+++ b/src/bhyve/bhyve_utils.h
@@ -31,7 +31,7 @@
 
 #define BHYVE_AUTOSTART_DIRSYSCONFDIR "/libvirt/bhyve/autostart"
 #define BHYVE_CONFIG_DIR   SYSCONFDIR "/libvirt/bhyve"
-#define BHYVE_STATE_DIRLOCALSTATEDIR "/run/libvirt/bhyve"
+#define BHYVE_STATE_DIRRUNSTATEDIR "/libvirt/bhyve"
 #define BHYVE_LOG_DIR  LOCALSTATEDIR "/log/libvirt/bhyve"
 
 typedef struct _virBhyveDriverConfig virBhyveDriverConfig;
diff --git a/src/l

Bug#944890: ListenStream= references a path below legacy directory /var/run/, updating /var/run/libvirt/foo → /run/libvirt/foo; please update the unit file accordingly.

2019-11-17 Thread Laurent Bigonville
Package: libvirt-daemon-system
Version: 5.6.0-2
Severity: minor

Hello,

During boot, systemd complains that the .service and .socket files are
pointing to /var/run instead of /run:

systemd[1]: /lib/systemd/system/virtlockd.socket:6: ListenStream= references a 
path below legacy directory /var/run/, updating /var/run/libvirt/virtlockd-sock 
→ /run/libvirt/virtlockd-sock; please update the unit file accordingly.
systemd[1]: /lib/systemd/system/virtlockd-admin.socket:8: ListenStream= 
references a path below legacy directory /var/run/, updating 
/var/run/libvirt/virtlockd-admin-sock → /run/libvirt/virtlockd-admin-sock; 
please update the unit file accordingly.
systemd[1]: /lib/systemd/system/libvirtd-admin.socket:8: ListenStream= 
references a path below legacy directory /var/run/, updating 
/var/run/libvirt/libvirt-admin-sock → /run/libvirt/libvirt-admin-sock; please 
update the unit file accordingly.
systemd[1]: /lib/systemd/system/libvirtd-ro.socket:8: ListenStream= references 
a path below legacy directory /var/run/, updating 
/var/run/libvirt/libvirt-sock-ro → /run/libvirt/libvirt-sock-ro; please update 
the unit file accordingly.
systemd[1]: /lib/systemd/system/libvirtd.socket:6: ListenStream= references a 
path below legacy directory /var/run/, updating /var/run/libvirt/libvirt-sock → 
/run/libvirt/libvirt-sock; please update the unit file accordingly.
systemd[1]: /lib/systemd/system/virtlogd.socket:6: ListenStream= references a 
path below legacy directory /var/run/, updating /var/run/libvirt/virtlogd-sock 
→ /run/libvirt/virtlogd-sock; please update the unit file accordingly.
systemd[1]: /lib/systemd/system/virtlogd-admin.socket:8: ListenStream= 
references a path below legacy directory /var/run/, updating 
/var/run/libvirt/virtlogd-admin-sock → /run/libvirt/virtlogd-admin-sock; please 
update the unit file accordingly.


/run is supported in debian for quite some times, that can be used I
guess.

Kind regards,

Laurent Bigonville

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 
'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.3.0-2-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND
Locale: LANG=fr_BE.UTF-8, LC_CTYPE=fr_BE.UTF-8 (charmap=UTF-8), 
LANGUAGE=fr_BE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: SELinux: enabled - Mode: Permissive - Policy name: refpolicy

Versions of packages libvirt-daemon-system depends on:
ii  adduser3.118
ii  debconf [debconf-2.0]  1.5.73
ii  firewalld  0.7.2-1
ii  gettext-base   0.19.8.1-9
ii  init-system-helpers1.57
ii  iptables   1.8.3-2
ii  libc6  2.29-3
ii  libvirt-clients5.6.0-2
ii  libvirt-daemon 5.6.0-2
ii  libvirt0   5.6.0-2
ii  libxml22.9.4+dfsg1-7+b4
ii  logrotate  3.15.1-1
ii  lsb-base   11.1.0
ii  policykit-10.116-2

Versions of packages libvirt-daemon-system recommends:
ii  dmidecode3.2-2
ii  dnsmasq-base [dnsmasq-base]  2.80-1+b1
ii  iproute2 5.3.0-1
ii  parted   3.3-1

Versions of packages libvirt-daemon-system suggests:
ii  apparmor2.13.3-7
ii  auditd  1:2.8.5-2
ii  nfs-common  1:1.3.4-2.5+b1
ii  open-iscsi  2.0.874-7.1
ii  pm-utils1.4.1-19
pn  radvd   
ii  systemd 243-7
pn  systemtap   
pn  zfsutils