On Sun, Mar 02, 2025 at 01:00:52PM -0500, Kevin Otte wrote: > On 2/22/25 15:20, Andrea Bolognani wrote: > > I was hoping that recreating your setup as closely as possible would > > allow me to reproduce the issue locally, but I have been completely > > unsuccessful despite several attempts. > > I do seem to excel at stumbling onto edge cases :)
That can be a very valuable skill :) Anyway, I've created https://salsa.debian.org/libvirt-team/libvirt/-/merge_requests/256 earlier today. It should take care of the issues reported here. I've performed pretty extensive testing and I'm convinced that all situations are handled reasonably well - better in fact that they were before. Here's some information about that, both for reference and so that any interested parties can try reproducing them locally. Since the order in which packages are unpacked is very relevant to the process, I have temporarily added the following hack to the package (snipped, see the attached 0001-control.patch for the full version): +++ b/debian/control @@ -68,6 +68,8 @@ Rules-Requires-Root: no Package: libvirt-clients Section: admin Architecture: any +Pre-Depends: + libvirt-common (= ${binary:Version}), Depends: libvirt-common (= ${binary:Version}), libvirt0 (= ${binary:Version}), This forces libvirt-common to be configured (and thus unpacked) before libvirt-clients. The other two packages I've been monitoring are libvirt-daemon-system and libvirt-daemon-driver-qemu, and for those I've always seen the former being unpacked before the latter. Furthermore, to ensure that we have full coverage of all possible scenarios, I have added the following as well (again snipped, see 0002-test.patch for the full version): # debian/patches/test.patch diff --git a/src/libvirt.conf b/src/libvirt.conf index da4dfbe..91cd9e5 100644 --- a/src/libvirt.conf +++ b/src/libvirt.conf @@ -16,3 +16,5 @@ # (@uri_default also prevents probing of the hypervisor driver). # #uri_default = "qemu:///system" + +# dist change diff --git a/src/qemu/qemu.conf.in b/src/qemu/qemu.conf.in index 3117230..65ad243 100644 --- a/src/qemu/qemu.conf.in +++ b/src/qemu/qemu.conf.in @@ -1026,3 +1026,5 @@ # "/path/to/nvram", # "/path/to/swtpm" #] + +# dist change This ensures that conffiles /etc/libvirt/libvirt.conf and /etc/libvirt/qemu.conf are different in the latest version of the package compared to the one we're upgrading from. Now with this hacked package, starting with a fully up to date Debian 12 installation we can try different combinations and obtain the following results: scr before dst .......... [daemon-system before daemon-driver-qemu] * changed in dist ................................. [qemu.conf] - local changes - no local changes => prompt => no prompt new version installed * not changed in dist ....................... [qemu-lockd.conf] - local changes - no local changes => no prompt => no prompt local changes preserved dst before src ............................. [common before client] * changed in dist .............................. [libvirt.conf] - local changes - no local changes => prompt => no prompt new version installed * not changed in dist .................... [libvirt-admin.conf] - local changes - no local changes => no prompt => no prompt local changes preserved I hope that the above is somewhat readable, I wasn't able to find a really good way to summarize the results. The tl;dr version is that things work pretty much how one would expect: the user is prompted if there is no obvious way forward (the conffile has been modified both locally and in the package), otherwise appropriate actions is quietly taken and local changes are preserved if they exist. In other words, same as if the conffile wasn't being moved between packages at all. -- Andrea Bolognani <e...@kiyuko.org> Resistance is futile, you will be garbage collected.
From 8a8287422db3ebfbddbb00719f72022c67fa0a27 Mon Sep 17 00:00:00 2001 From: Andrea Bolognani <e...@kiyuko.org> Date: Sat, 15 Mar 2025 18:31:05 +0100 Subject: [PATCH 1/2] control --- debian/control | 2 ++ debian/control.in | 2 ++ 2 files changed, 4 insertions(+) diff --git a/debian/control b/debian/control index b2fb5a9a16..34d7daabac 100644 --- a/debian/control +++ b/debian/control @@ -68,6 +68,8 @@ Rules-Requires-Root: no Package: libvirt-clients Section: admin Architecture: any +Pre-Depends: + libvirt-common (= ${binary:Version}), Depends: libvirt-common (= ${binary:Version}), libvirt0 (= ${binary:Version}), diff --git a/debian/control.in b/debian/control.in index 141498d8d4..2a9946fbde 100644 --- a/debian/control.in +++ b/debian/control.in @@ -68,6 +68,8 @@ Rules-Requires-Root: no Package: libvirt-clients Section: admin Architecture: any +Pre-Depends: + libvirt-common (= ${binary:Version}), Depends: libvirt-common (= ${binary:Version}), libvirt0 (= ${binary:Version}), -- 2.47.2
From d6531104701a5617f8e870420c3fdb02984aeebf Mon Sep 17 00:00:00 2001 From: Andrea Bolognani <e...@kiyuko.org> Date: Sun, 16 Mar 2025 14:14:32 +0100 Subject: [PATCH 2/2] test --- debian/patches/series | 1 + debian/patches/test.patch | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 debian/patches/test.patch diff --git a/debian/patches/series b/debian/patches/series index 874daa782e..49127c832f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ debian/Debianize-libvirt-guests.patch debian/apparmor_profiles_local_include.patch debian/Use-sensible-editor-by-default.patch +test.patch diff --git a/debian/patches/test.patch b/debian/patches/test.patch new file mode 100644 index 0000000000..0bc05bc27c --- /dev/null +++ b/debian/patches/test.patch @@ -0,0 +1,29 @@ +From: Andrea Bolognani <e...@kiyuko.org> +Date: Sun, 16 Mar 2025 14:14:16 +0100 +Subject: test + +--- + src/libvirt.conf | 2 ++ + src/qemu/qemu.conf.in | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/src/libvirt.conf b/src/libvirt.conf +index da4dfbe..91cd9e5 100644 +--- a/src/libvirt.conf ++++ b/src/libvirt.conf +@@ -16,3 +16,5 @@ + # (@uri_default also prevents probing of the hypervisor driver). + # + #uri_default = "qemu:///system" ++ ++# dist change +diff --git a/src/qemu/qemu.conf.in b/src/qemu/qemu.conf.in +index 3117230..65ad243 100644 +--- a/src/qemu/qemu.conf.in ++++ b/src/qemu/qemu.conf.in +@@ -1026,3 +1026,5 @@ + # "/path/to/nvram", + # "/path/to/swtpm" + #] ++ ++# dist change -- 2.47.2
signature.asc
Description: PGP signature