From 383766a86672e64ab15315d94f4aca7ed62a7826 Mon Sep 17 00:00:00 2001 From: grossmj Date: Thu, 11 Jul 2024 12:29:41 +0200 Subject: [PATCH] Fix issue when upgrading with held packages. Ref https://github.com/GNS3/gns3-server/issues/2398 --- config/install.sh | 15 ++++++--------- scripts/cleaner.sh | 4 ++++ scripts/qemu.sh | 1 - 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/config/install.sh b/config/install.sh index 6f4b78c..4c112a9 100644 --- a/config/install.sh +++ b/config/install.sh @@ -29,6 +29,10 @@ export DEBIAN_FRONTEND="noninteractive" dpkg-reconfigure libc6 sudo -E apt-get -q --option Dpkg::Options::=-"-force-confold" --allow-change-held-packages --assume-yes install libssl1.1 +# Unhold previously held packages (see https://github.com/GNS3/gns3-server/issues/2398) +sudo apt-mark unhold libvirt-daemon-system +sudo apt-mark unhold tigervnc-standalone-server + if [[ "$(dpkg --print-architecture)" == "arm64" ]] then @@ -124,12 +128,8 @@ then sudo chown -R gns3:gns3 /home/gns3/.venv fi - # For the NAT node -apt-get install -y --allow-change-held-packages libvirt-daemon-system - -# Prevent libvirt-daemon-system to be uninstalled by cleaner.sh -apt-mark hold libvirt-daemon-system +apt-get install -y libvirt-daemon-system # Install Qemu apt-get install -y qemu-system-x86 cpulimit @@ -166,10 +166,7 @@ chown root:root /etc/docker/daemon.json chmod 644 /etc/docker/daemon.json # Install VNC support for Docker -apt-get install -y --allow-change-held-packages tigervnc-standalone-server - -# Prevent tigervnc to be uninstalled by cleaner.sh -apt-mark hold tigervnc-standalone-server +apt-get install -y tigervnc-standalone-server # Install net-tools for ifconfig etc. apt-get install -y net-tools diff --git a/scripts/cleaner.sh b/scripts/cleaner.sh index e6a9b12..153f05f 100644 --- a/scripts/cleaner.sh +++ b/scripts/cleaner.sh @@ -1,5 +1,9 @@ #!/bin/bash +# Prevent these packages to be uninstalled by cleaner.sh +apt-mark hold libvirt-daemon-system +apt-mark hold tigervnc-standalone-server + sudo apt-get purge -y --yes vim-common sudo apt-get purge -y --yes usbutils sudo apt-get purge -y --yes man-db diff --git a/scripts/qemu.sh b/scripts/qemu.sh index b538351..64e4c05 100644 --- a/scripts/qemu.sh +++ b/scripts/qemu.sh @@ -42,7 +42,6 @@ else sudo add-apt-repository -y --remove ppa:canonical-server/server-backports fi -sudo apt-mark unhold libvirt-daemon-system sudo apt-get purge -y "qemu*" sudo apt-get update sudo apt-get install -y qemu-system-x86