Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • xypron/libvirt
  • carlespina/po-debconf-manager-libvirt
  • lgarrett/libvirt
  • kibi/libvirt
  • lts-team/packages/libvirt
  • michalmaloszewski99/libvirt
  • nickbroon/libvirt
  • pino/libvirt
  • smitsohu/libvirt
  • biebl/libvirt
  • mpitt/libvirt
  • cheetah-guest/libvirt
  • vasudev/libvirt
  • bigon/libvirt
  • libvirt-team/libvirt
  • gaudenz/libvirt
  • paelzer-guest/libvirt
  • abologna/libvirt
  • intrigeri/libvirt
  • agx/libvirt
  • nthykier/libvirt
  • jfalk-guest/libvirt
  • carnil/libvirt
  • kevko/libvirt
24 results
Show changes
Commits on Source (3)
  • Andrea Bolognani's avatar
    libvirt-clients: Remove versioned Breaks on libvirt-login-shell · ce1a1cff
    Andrea Bolognani authored
    According to
    
      https://wiki.debian.org/PackageTransition
    
    this is needed when both packages you're moving files between
    already existed, but that is not the case here.
    
    Gbp-Dch: Ignore
    ce1a1cff
  • Andrea Bolognani's avatar
    libvirt-clients: Add Recommends for libvirt-login-shell · f90e9d44
    Andrea Bolognani authored
    If this is not present, then apt will not know that the package
    needs to be installed, and virt-login-shell will disappear from
    the user's system during upgrade, which is something that we
    don't want.
    
    We will probably want to weaken this to a Suggests for bookworm,
    as most people don't need virt-login-shell to be installed on
    their machines, but not breaking existing setups is more
    important and Recommends still makes it possible to remove the
    package after upgrade, so it's a good compromise.
    
    Gbp-Dch: Ignore
    f90e9d44
  • Andrea Bolognani's avatar
    libvirt-login-shell: Transfer conffile from libvirt-clients correctly · 291fc670
    Andrea Bolognani authored
    If we simply remove the conffile from libvirt-clients and add it
    to libvirt-login-shell, at the end of the update any local
    modification that was made in the past will only be present in
    the .dpkg-bak file, with the actual conffile being reverted back
    to its default state.
    
    Since dpkg-maintscript-helper doesn't currently have support for
    tranferring conffiles between packages, we have to implement the
    logic ourselves.
    
    Gbp-Dch: Ignore
    291fc670
......@@ -81,12 +81,13 @@ Depends:
sensible-utils,
${misc:Depends},
${shlibs:Depends},
Recommends:
libvirt-login-shell,
Suggests:
libvirt-daemon,
Breaks:
libvirt-daemon (<< 6.9.0-2~),
libvirt-daemon-driver-qemu (<< 6.9.0-2~),
libvirt-login-shell (<< 6.9.0-2~),
Replaces:
libvirt-daemon (<< 6.9.0-2~),
Description: Programs for the libvirt library
......@@ -101,6 +102,7 @@ Package: libvirt-login-shell
Section: admin
Architecture: alpha amd64 arm64 armel armhf hppa i386 m68k mips64el mipsel powerpc ppc64 ppc64el riscv64 s390x sh4 sparc64 x32
Depends:
libvirt-clients (= ${binary:Version}),
libvirt-daemon-driver-lxc,
libvirt0 (= ${binary:Version}),
${misc:Depends},
......
# Moved to libvirt-login-shell
rm_conffile /etc/libvirt/libvirt-login-shell.conf 6.9.0-2~ libvirt-clients
#!/bin/sh
set -e
# summary of how this script can be called:
# * <postrm> `remove'
# * <postrm> `purge'
# * <old-postrm> `upgrade' <new-version>
# * <new-postrm> `failed-upgrade' <old-version>
# * <new-postrm> `abort-install'
# * <new-postrm> `abort-install' <old-version>
# * <new-postrm> `abort-upgrade' <old-version>
# * <disappearer's-postrm> `disappear' <overwriter>
# <overwriter-version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package
abort_conffile_transfer() {
local conffile="$1"
local lastver="$2"
local pkgfrom="$3"
local pkgto="$4"
if [ "$5" != "--" ]; then
echo "abort_conffile_transfer called with the wrong number of arguments" >&2
return 1
fi
for _ in $(seq 1 5); do
shift
done
# If we were installing from scratch or upgrading from a new enough version
# when the error occurred, then no transfer was in progress and we don't
# need to rollback any changes
if [ -z "$2" ] || dpkg --compare-versions -- "$2" gt "$lastver"; then
return 0
fi
# If the conffile was being transferred, return it to its original location
if [ -e "$conffile.dpkg-transfer" ]; then
mv -f "$conffile.dpkg-transfer" "$conffile"
fi
# Clean up additional state
rm -f "$conffile.dpkg-disappear"
}
case "$1" in
abort-install|abort-upgrade)
abort_conffile_transfer \
"/etc/libvirt/virt-login-shell.conf" \
"6.9.0-2~" \
"libvirt-clients" \
"libvirt-login-shell" \
-- \
"$@"
;;
remove|purge|upgrade|failed-upgrade|disappear)
;;
*)
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-preinst> `upgrade' <old-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() {
local conffile="$1"
local lastver="$2"
local pkgfrom="$3"
local pkgto="$4"
if [ "$5" != "--" ]; then
echo "prepare_conffile_transfer called with the wrong number of arguments" >&2
return 1
fi
for _ in $(seq 1 5); do
shift
done
# If we're installing from scratch or upgrading from a new enough version
# of the package, then no transfer needs to happen and we can stop here
if [ -z "$2" ] || dpkg --compare-versions -- "$2" gt "$lastver"; then
return 0
fi
# Depending on the current state of the conffile, we need to perform different
# steps to transfer it. Moving the conffile to a different location depending
# on its current state achieves two goals: dpkg will see the conffile is no
# longer present on disk after $pkgfrom has been upgraded, and so it will no
# longer associate it with that package (not even as an obsolete conffile);
# more importanly, $pkgto's postinst, where the transfer process is completed,
# will be able to figure out the original state of the conffile and make sure
# it is restored
if [ -e "$conffile" ]; then
echo "Preparing transfer of config file $conffile (from $pkgfrom to $pkgto) ..."
mv -f "$conffile" "$conffile.dpkg-transfer"
else
# If the conffile is no longer present on the disk, it means the admin
# has deleted it, and we should preserve this local modification
touch "$conffile.dpkg-disappear"
fi
}
case "$1" in
install|upgrade)
prepare_conffile_transfer \
"/etc/libvirt/virt-login-shell.conf" \
"6.9.0-2~" \
"libvirt-clients" \
"libvirt-login-shell" \
-- \
"$@"
;;
abort-upgrade)
;;
*)
echo "preinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0
#!/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() {
local conffile="$1"
local lastver="$2"
local pkgfrom="$3"
local pkgto="$4"
if [ "$5" != "--" ]; then
echo "finish_conffile_transfer called with the wrong number of arguments" >&2
return 1
fi
for _ in $(seq 1 5); do
shift
done
# If we're upgrading rather than installing from scratch, we can assume
# the transfer must have happened at some point in the past and stop here
if [ -n "$2" ]; then
return 0
fi
if [ -e "$conffile.dpkg-transfer" ]; then
# Complete the process started in $pkgfrom's preinst by restoring the
# version of the conffile containing local modifications
echo "Finishing transfer of config file $conffile (from $pkgfrom to $pkgto) ..."
mv -f "$conffile.dpkg-transfer" "$conffile"
return 0
fi
if [ -e "$conffile.dpkg-disappear" ]; then
# The conffile had been deleted by the admin, so let's return to
# that state
rm -f "$conffile" "$conffile.dpkg-disappear"
return 0
fi
}
case "$1" in
configure)
finish_conffile_transfer \
"/etc/libvirt/virt-login-shell.conf" \
"6.9.0-2~" \
"libvirt-clients" \
"libvirt-login-shell" \
-- \
"$@"
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0