Skip to content
Snippets Groups Projects
Commit 93339500 authored by Andrea Bolognani's avatar Andrea Bolognani
Browse files

control: Introduce daemon-common package

As of today, Debian only ships the libvirtd monolithic daemon.

Modular daemons were introduced several years ago as a more
secure and flexible alternative, and they're currently the
recommended deployment option both upstream and in other distros
such as Fedora.

Our long-term goal is to make a modular deployment possible in
Debian too, but a significant amount of work is still necessary
for that to happen. As a preparatory step, move some files that
are needed both for monolithic and modular deployments into a
separate package.

Appropriate package relationship are declared to ensure that
things will behave as expected at upgrade time. The usual dance
is performed to correctly transfer conffiles between packages.

It's worth noting that a couple of commands (virt-admin,
virt-host-validate) are moved into this new package from the
libvirt-clients package. While this might look surprising, it's
actually the right thing to do: both tools are only useful
when run directly on the virtualization host, so they don't
belong in the libvirt-clients package, which can be installed
a client machine to manage a remote hypervisor.

This commit moves files and conffiles, but a few additional
items need to be handled too. That will happen in the next
couple of commits.
parent 042a8cc6
No related branches found
No related tags found
1 merge request!229Prepare for modular daemons, make granular installations possible, implement usr-merge
Showing with 236 additions and 16 deletions
......@@ -70,6 +70,7 @@ Section: admin
Architecture: any
Depends:
libvirt-common (= ${binary:Version}),
libvirt-daemon-common (= ${binary:Version}) [linux-any],
libvirt0 (= ${binary:Version}),
sensible-utils,
${misc:Depends},
......@@ -140,6 +141,7 @@ Section: admin
Architecture: linux-any
Depends:
libvirt-common (= ${binary:Version}),
libvirt-daemon-common (= ${binary:Version}),
libvirt-daemon-driver-qemu (= ${binary:Version}) [${ARCHES_QEMU}],
libvirt0 (= ${binary:Version}),
${misc:Depends},
......@@ -179,6 +181,32 @@ Description: Virtualization daemon
.
This package contains the daemon libvirtd to manage the hypervisors.
Package: libvirt-daemon-common
Section: admin
Architecture: linux-any
Depends:
libvirt-common (= ${binary:Version}),
libvirt0 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Breaks:
libvirt-clients (<< 10.6.0-2~),
libvirt-daemon (<< 10.6.0-2~),
libvirt-daemon-system (<< 10.6.0-2~),
libvirt-daemon-system-sysv (<< 10.6.0-2~),
Replaces:
libvirt-clients (<< 10.6.0-2~),
libvirt-daemon (<< 10.6.0-2~),
libvirt-daemon-system (<< 10.6.0-2~),
libvirt-daemon-system-sysv (<< 10.6.0-2~),
Description: Virtualization daemon common files
Libvirt is a C toolkit to interact with the virtualization capabilities
of recent versions of Linux (and other OSes). The library aims at providing
a long term stable C API for different virtualization mechanisms. It currently
supports QEMU, KVM, XEN, OpenVZ, LXC, and VirtualBox.
.
This package contains files needed by the various libvirt daemons.
Package: libvirt-daemon-driver-qemu
Section: admin
Architecture: ${ARCHES_QEMU}
......@@ -347,6 +375,7 @@ Depends:
libvirt-clients (= ${binary:Version}),
libvirt-common (= ${binary:Version}),
libvirt-daemon (= ${binary:Version}),
libvirt-daemon-common (= ${binary:Version}),
libvirt-daemon-config-network (= ${source:Version}),
libvirt-daemon-config-nwfilter (= ${source:Version}),
libvirt-daemon-system-systemd (= ${source:Version}) | libvirt-daemon-system-sysv (= ${source:Version}),
......@@ -406,6 +435,8 @@ Architecture: all
Depends:
libvirt-common (<< ${source:Version}.1~),
libvirt-common (>= ${source:Version}),
libvirt-daemon-common (<< ${source:Version}.1~),
libvirt-daemon-common (>= ${source:Version}),
libvirt0 (<< ${source:Version}.1~),
libvirt0 (>= ${source:Version}),
${misc:Depends},
......
usr/bin/virsh
usr/bin/virt-admin
[linux-any] usr/bin/virt-host-validate
usr/bin/virt-pki-query-dn
usr/bin/virt-pki-validate
usr/bin/virt-xml-validate
usr/share/bash-completion/completions/virsh
usr/share/bash-completion/completions/virt-admin
usr/share/man/man1/virsh.1
usr/share/man/man1/virt-admin.1
[linux-any] usr/share/man/man1/virt-host-validate.1
usr/share/man/man1/virt-pki-query-dn.1
usr/share/man/man1/virt-pki-validate.1
usr/share/man/man1/virt-xml-validate.1
......
etc/sasl2/libvirt.conf
lib/systemd/system/libvirt-guests.service
lib/systemd/system/virt-guest-shutdown.target
usr/bin/virt-admin
usr/bin/virt-host-validate
usr/bin/virt-ssh-helper
usr/lib/libvirt/libvirt-guests.sh
usr/lib/libvirt/libvirt_iohelper
usr/share/bash-completion/completions/virt-admin
usr/share/man/man1/virt-admin.1
usr/share/man/man1/virt-host-validate.1
usr/share/man/man8/libvirt-guests.8
usr/share/man/man8/virt-ssh-helper.8
usr/share/polkit-1/actions/org.libvirt.api.policy
usr/share/polkit-1/actions/org.libvirt.unix.policy
usr/share/polkit-1/rules.d/60-libvirt.rules
usr/share/doc/libvirt-common usr/share/doc/libvirt-daemon-common
#!/bin/sh
set -e
# summary of how this script can be called:
#
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new-version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package> <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour' <failed-install-package>
# <version> `removing' <conflicting-package> <version>
#
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package
#FINISH_CONFFILE_TRANSFER#
DAEMON_SYSTEM_TO_DAEMON_COMMON="
/etc/default/libvirt-guests
/etc/sasl2/libvirt.conf
"
DAEMON_SYSTEM_SYSV_TO_DAEMON_COMMON="
/etc/init.d/libvirt-guests
"
case "$1" in
configure)
for conf in $DAEMON_SYSTEM_TO_DAEMON_COMMON; do
finish_conffile_transfer \
"$conf" \
"6.0.0-0~" \
"10.6.0-2~" \
"libvirt-daemon-system" \
"libvirt-daemon-common" \
-- \
"$@"
done
for conf in $DAEMON_SYSTEM_SYSV_TO_DAEMON_COMMON; do
finish_conffile_transfer \
"$conf" \
"6.0.0-0~" \
"10.6.0-2~" \
"libvirt-daemon-system-sysv" \
"libvirt-daemon-common" \
-- \
"$@"
done
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0
#!/bin/sh
set -e
# summary of how this script can be called:
#
# * <postrm> `remove'
# * <postrm> `purge'
# * <old-postrm> `upgrade' <new-version>
# * <disappearer's-postrm> `disappear' <overwriter> <overwriter-version>
# * <new-postrm> `failed-upgrade' <old-version> <new-version>
# * <new-postrm> `abort-install'
# * <new-postrm> `abort-install' <old-version> <new-version>
# * <new-postrm> `abort-upgrade' <old-version> <new-version>
#
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package
#ABORT_CONFFILE_TRANSFER#
DAEMON_SYSTEM_SYSV_TO_DAEMON_COMMON="
/etc/init.d/libvirt-guests
"
case "$1" in
abort-install|abort-upgrade)
for conf in $DAEMON_SYSTEM_SYSV_TO_DAEMON_COMMON; do
abort_conffile_transfer \
"$conf" \
"6.0.0-0~" \
"10.6.0-2~" \
"libvirt-daemon-system-sysv" \
"libvirt-daemon-common" \
-- \
"$@"
done
;;
remove|purge|upgrade|disappear|failed-upgrade)
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0
#!/bin/sh
set -e
# summary of how this script can be called:
#
# * <new-preinst> `install'
# * <new-preinst> `install' <old-version> <new-version>
# * <new-preinst> `upgrade' <old-version> <new-version>
# * <old-preinst> `abort-upgrade' <new-version>
#
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package
#PREPARE_CONFFILE_TRANSFER#
DAEMON_SYSTEM_SYSV_TO_DAEMON_COMMON="
/etc/init.d/libvirt-guests
"
case "$1" in
install|upgrade)
for conf in $DAEMON_SYSTEM_SYSV_TO_DAEMON_COMMON; do
prepare_conffile_transfer \
"$conf" \
"6.0.0-0~" \
"10.6.0-2~" \
"libvirt-daemon-system-sysv" \
"libvirt-daemon-common" \
-- \
"$@"
done
;;
abort-upgrade)
;;
*)
echo "preinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0
......@@ -19,15 +19,12 @@ etc/logrotate.d/libvirtd
etc/logrotate.d/libvirtd.libxl
etc/logrotate.d/libvirtd.lxc
etc/logrotate.d/libvirtd.qemu
etc/sasl2/libvirt.conf
lib/systemd/system/libvirt-guests.service
lib/systemd/system/libvirtd-admin.socket
lib/systemd/system/libvirtd-ro.socket
lib/systemd/system/libvirtd-tcp.socket
lib/systemd/system/libvirtd-tls.socket
lib/systemd/system/libvirtd.service
lib/systemd/system/libvirtd.socket
lib/systemd/system/virt-guest-shutdown.target
lib/systemd/system/virtlockd-admin.socket
lib/systemd/system/virtlockd.service
lib/systemd/system/virtlockd.socket
......@@ -39,6 +36,3 @@ usr/lib/firewalld/policies/libvirt-routed-out.xml
usr/lib/firewalld/policies/libvirt-to-host.xml
usr/lib/firewalld/zones/libvirt-routed.xml
usr/lib/firewalld/zones/libvirt.xml
usr/share/polkit-1/actions/org.libvirt.api.policy
usr/share/polkit-1/actions/org.libvirt.unix.policy
usr/share/polkit-1/rules.d/60-libvirt.rules
......@@ -39,6 +39,11 @@ NWFILTERS="
qemu-announce-self-rarp
"
DAEMON_SYSTEM_TO_DAEMON_COMMON="
/etc/default/libvirt-guests
/etc/sasl2/libvirt.conf
"
case "$1" in
purge)
if getent group libvirt >/dev/null; then
......@@ -117,6 +122,16 @@ case "$1" in
-- \
"$@"
done
for conf in $DAEMON_SYSTEM_TO_DAEMON_COMMON; do
abort_conffile_transfer \
"$conf" \
"6.0.0-0~" \
"10.6.0-2~" \
"libvirt-daemon-system" \
"libvirt-daemon-common" \
-- \
"$@"
done
;;
remove|upgrade|disappear|failed-upgrade)
......
......@@ -35,6 +35,11 @@ NWFILTERS="
qemu-announce-self-rarp
"
DAEMON_SYSTEM_TO_DAEMON_COMMON="
/etc/default/libvirt-guests
/etc/sasl2/libvirt.conf
"
case "$1" in
install|upgrade)
prepare_conffile_transfer \
......@@ -55,6 +60,16 @@ case "$1" in
-- \
"$@"
done
for conf in $DAEMON_SYSTEM_TO_DAEMON_COMMON; do
prepare_conffile_transfer \
"$conf" \
"6.0.0-0~" \
"10.6.0-2~" \
"libvirt-daemon-system" \
"libvirt-daemon-common" \
-- \
"$@"
done
;;
abort-upgrade)
......
usr/bin/virt-ssh-helper
usr/lib/${DEB_HOST_MULTIARCH}/libvirt/connection-driver/libvirt_driver_interface.so
usr/lib/${DEB_HOST_MULTIARCH}/libvirt/connection-driver/libvirt_driver_network.so
usr/lib/${DEB_HOST_MULTIARCH}/libvirt/connection-driver/libvirt_driver_nodedev.so
......@@ -13,8 +12,6 @@ usr/lib/${DEB_HOST_MULTIARCH}/libvirt/storage-backend/libvirt_storage_backend_lo
usr/lib/${DEB_HOST_MULTIARCH}/libvirt/storage-backend/libvirt_storage_backend_mpath.so
usr/lib/${DEB_HOST_MULTIARCH}/libvirt/storage-backend/libvirt_storage_backend_scsi.so
usr/lib/${DEB_HOST_MULTIARCH}/libvirt/storage-file/libvirt_storage_file_fs.so
usr/lib/libvirt/libvirt-guests.sh
usr/lib/libvirt/libvirt_iohelper
usr/lib/libvirt/libvirt_leaseshelper
usr/lib/libvirt/libvirt_parthelper
usr/lib/libvirt/virt-aa-helper
......@@ -33,8 +30,6 @@ usr/share/augeas/lenses/tests/test_virtlockd.aug
usr/share/augeas/lenses/tests/test_virtlogd.aug
usr/share/augeas/lenses/virtlockd.aug
usr/share/augeas/lenses/virtlogd.aug
usr/share/man/man8/libvirt-guests.8
usr/share/man/man8/libvirtd.8
usr/share/man/man8/virt-ssh-helper.8
usr/share/man/man8/virtlockd.8
usr/share/man/man8/virtlogd.8
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment