[neon/neon/livecd-rootfs/Neon/unstable] /: merge changes from 24.04.77

Carlos De Maine null at kde.org
Mon Aug 26 02:51:22 BST 2024


Git commit 4ed7a07cca27354e31347574c00bd23c18b40a81 by Carlos De Maine.
Committed on 26/08/2024 at 01:51.
Pushed by carlosdem into branch 'Neon/unstable'.

merge changes from 24.04.77

M  +7    -0    debian/changelog
M  +0    -110  live-build/auto/build
M  +1    -1    live-build/ubuntu-server/hooks/01-unminimize.chroot_early

https://invent.kde.org/neon/neon/livecd-rootfs/-/commit/4ed7a07cca27354e31347574c00bd23c18b40a81

diff --git a/debian/changelog b/debian/changelog
index 9b51b416..002fd54f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+livecd-rootfs (24.04.77) noble; urgency=medium
+
+  * Drop unminimize spit out by livecd-rootfs. (LP: #2077695)
+  * Use packaged unminimize in the ubuntu-server images.
+
+ -- Utkarsh Gupta <utkarsh at ubuntu.com>  Wed, 21 Aug 2024 12:08:44 +0530
+
 livecd-rootfs (24.04.76) noble; urgency=medium
 
   * Force latest/stable/ubuntu-24.10 subiquity onto the ubuntu-core-installer
diff --git a/live-build/auto/build b/live-build/auto/build
index 79f561c1..ce2f6d4e 100755
--- a/live-build/auto/build
+++ b/live-build/auto/build
@@ -187,116 +187,6 @@ EOF
 		# Remove docs installed by bootstrap
 		Chroot chroot dpkg-query -f '${binary:Package}\n' -W | Chroot chroot xargs -L1 apt-get install --reinstall
 
-                # Add unminimizer script which restores default image behavior
-                mkdir -p chroot/usr/local/sbin
-                cat > chroot/usr/local/sbin/unminimize <<'EOF'
-#!/bin/sh
-
-set -e
-
-echo "This system has been minimized by removing packages and content that are"
-echo "not required on a system that users do not log into."
-echo ""
-echo "This script restores content and packages that are found on a default"
-echo "Ubuntu server system in order to make this system more suitable for"
-echo "interactive use."
-echo ""
-echo "Reinstallation of packages may fail due to changes to the system"
-echo "configuration, the presence of third-party packages, or for other"
-echo "reasons."
-echo ""
-echo "This operation may take some time."
-echo ""
-read -p "Would you like to continue? [y/N] " REPLY
-echo    # (optional) move to a new line
-if [ "$REPLY" != "y" ] && [ "$REPLY" != "Y" ]
-then
-    exit 1
-fi
-
-if [ -f /etc/dpkg/dpkg.cfg.d/excludes ] || [ -f /etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp ]; then
-    echo "Re-enabling installation of all documentation in dpkg..."
-    if [ -f /etc/dpkg/dpkg.cfg.d/excludes ]; then
-        mv /etc/dpkg/dpkg.cfg.d/excludes /etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp
-    fi
-    echo "Updating package list and upgrading packages..."
-    apt-get update
-    # apt-get upgrade asks for confirmation before upgrading packages to let the user stop here
-    apt-get upgrade
-    echo "Restoring system documentation..."
-    echo "Reinstalling packages with files in /usr/share/man/ ..."
-    # Reinstallation takes place in two steps because a single dpkg --verified
-    # command generates very long parameter list for "xargs dpkg -S" and may go
-    # over ARG_MAX. Since many packages have man pages the second download
-    # handles a much smaller amount of packages.
-    dpkg -S /usr/share/man/ |sed 's|, |\n|g;s|: [^:]*$||' | DEBIAN_FRONTEND=noninteractive xargs apt-get install --reinstall -y
-    echo "Reinstalling packages with system documentation in /usr/share/doc/ .."
-    # This step processes the packages which still have missing documentation
-    dpkg --verify --verify-format rpm | awk '$2 ~ /\/usr\/share\/doc/ {print $2}' | sed 's|/[^/]*$||' | sort | uniq \
-         | xargs dpkg -S | sed 's|, |\n|g;s|: [^:]*$||' | uniq | DEBIAN_FRONTEND=noninteractive xargs apt-get install --reinstall -y
-    echo "Restoring system translations..."
-    # This step processes the packages which still have missing translations
-    dpkg --verify --verify-format rpm | awk '$2 ~ /\/usr\/share\/locale/ {print $2}' | sed 's|/[^/]*$||' | sort | uniq \
-         | xargs dpkg -S | sed 's|, |\n|g;s|: [^:]*$||' | uniq | DEBIAN_FRONTEND=noninteractive xargs apt-get install --reinstall -y
-    if dpkg --verify --verify-format rpm | awk '$2 ~ /\/usr\/share\/doc/ {exit 1}'; then
-        echo "Documentation has been restored successfully."
-        rm /etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp
-    else
-        echo "There are still files missing from /usr/share/doc/:"
-        dpkg --verify --verify-format rpm | awk '$2 ~ /\/usr\/share\/doc/ {print " " $2}'
-        echo "You may want to try running this script again or you can remove"
-        echo "/etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp and restore the files manually."
-    fi
-fi
-
-if  [ "$(dpkg-divert --truename /usr/bin/man)" = "/usr/bin/man.REAL" ]; then
-    # Remove diverted man binary
-    rm -f /usr/bin/man
-    dpkg-divert --quiet --remove --rename /usr/bin/man
-fi
-EOF
-
-                if [ "$PROJECT" != "ubuntu-base" ] && [ "$PROJECT" != "ubuntu-oci" ]; then
-                    	# ubuntu-minimal is too much for a docker container (it contains
-                    	# systemd and other things)
-	                cat >> chroot/usr/local/sbin/unminimize <<'EOF'
-
-if ! dpkg-query --show --showformat='${db:Status-Status}\n' ubuntu-minimal 2> /dev/null | grep -q '^installed$'; then
-    echo "Installing ubuntu-minimal package to provide the familiar Ubuntu minimal system..."
-    DEBIAN_FRONTEND=noninteractive apt-get install -y ubuntu-minimal ubuntu-standard
-fi
-
-if dpkg-query --show --showformat='${db:Status-Status}\n' ubuntu-server 2> /dev/null | grep -q '^installed$' \
-   && ! dpkg-query --show --showformat='${db:Status-Status}\n' landscape-common 2> /dev/null | grep -q '^installed$'; then
-    echo "Installing ubuntu-server recommends..."
-    DEBIAN_FRONTEND=noninteractive apt-get install -y landscape-common
-fi
-EOF
-                fi
-
-                if [ "$PROJECT" = "ubuntu-cpc" ]; then
-                  # we'd like to transform a minimized image to a base image
-                  # when unminimize is run.
-                  cat >> chroot/usr/local/sbin/unminimize <<'EOF'
-
-# even if ubuntu-server is installed, we should re-install it with --fix-policy --install-recommends
-# to ensure all the Recommends of dependencies of ubuntu-server are installed, which aids in transforming
-# this minimized image to an equivalent base image.
-DEBIAN_FRONTEND=noninteractive apt-get --reinstall --fix-policy --install-recommends install -y ubuntu-server
-
-if dpkg-query --show --showformat='${db:Status-Status}\n' linux-image-virtual 2> /dev/null | grep -q '^installed$'; then
-    echo "Installing linux-virtual for installing the headers which were stripped in a minimized image"
-    DEBIAN_FRONTEND=noninteractive apt-get install -y linux-virtual
-fi
-EOF
-
-fi
-		cat >> chroot/usr/local/sbin/unminimize <<'EOF'
-
-# unminimization succeeded, there is no need to mention it in motd
-rm -f /etc/update-motd.d/60-unminimize
-EOF
-                chmod +x chroot/usr/local/sbin/unminimize
 
 		# inform users about the unminimize script
 		cat > "chroot/etc/update-motd.d/60-unminimize" << EOF
diff --git a/live-build/ubuntu-server/hooks/01-unminimize.chroot_early b/live-build/ubuntu-server/hooks/01-unminimize.chroot_early
index 1474c6f1..7d02ed63 100755
--- a/live-build/ubuntu-server/hooks/01-unminimize.chroot_early
+++ b/live-build/ubuntu-server/hooks/01-unminimize.chroot_early
@@ -12,7 +12,7 @@ esac
 
 # Run the unminimize script to re-install packages with all dpkg filters removed and install packages
 # removed as part of minimization
-yes | /usr/local/sbin/unminimize
+yes | /usr/bin/unminimize
 
 # Fix up missing recommends.  Other non-layered flavors handle this in
 # live-build/auto/build, but we need to do it here.  Also, there are


More information about the Neon-commits mailing list