From c7b751e401aadf86333adcd43e5051a6d12f33d3 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Tue, 11 May 2021 17:12:20 -0700 Subject: [PATCH] Drop code for the 'ubuntu-core' project when not using image_format: ubuntu-image, as this is obsolete and not used to build core* snaps in recent series. --- debian/changelog | 8 + live-build/auto/build | 276 ------------------ live-build/auto/config | 58 +--- .../hooks/00-uid-gid-fix.chroot_early | 249 ---------------- .../hooks/01-divert-grub-install.chroot_early | 19 -- .../ubuntu-core/hooks/01-setup_user.chroot | 24 -- .../hooks/03-boot_with_systemd.chroot | 11 - .../hooks/05-create_minimal_fstab.chroot | 6 - .../07-configure-system-image-client.chroot | 7 - .../ubuntu-core/hooks/08-etc-writable.chroot | 26 -- .../09-disable-cloud-init-net-breaking.chroot | 8 - .../hooks/10-remove-documentation.binary | 22 -- .../hooks/11-remove-extra-packages.chroot | 7 - .../hooks/12-add-foreign-libc6.chroot | 21 -- .../ubuntu-core/hooks/13-set-locale.chroot | 7 - .../ubuntu-core/hooks/14-set-motd.chroot | 12 - .../hooks/15-remove-grub-common.chroot | 4 - .../ubuntu-core/hooks/16-ensure-uboot.chroot | 16 - .../ubuntu-core/hooks/20-extra-files.chroot | 10 - .../21-snappy-security-policy-stamp.chroot | 18 -- .../hooks/25-create-generic-initrd.chroot | 21 -- .../hooks/400-create-apt-get-warning.binary | 18 -- .../hooks/500-create-xdg-wrapper.binary | 40 --- .../ubuntu-core/hooks/600-no-debian.binary | 30 -- .../ubuntu-core/hooks/700-classic-dir.binary | 13 - .../hooks/99-undivert-grub-install.chroot | 10 - .../hooks/99zz-check-uid-gid.chroot | 52 ---- .../ubuntu-core/includes.chroot/etc/hosts | 9 - 28 files changed, 10 insertions(+), 992 deletions(-) delete mode 100755 live-build/ubuntu-core/hooks/00-uid-gid-fix.chroot_early delete mode 100755 live-build/ubuntu-core/hooks/01-divert-grub-install.chroot_early delete mode 100755 live-build/ubuntu-core/hooks/01-setup_user.chroot delete mode 100755 live-build/ubuntu-core/hooks/03-boot_with_systemd.chroot delete mode 100755 live-build/ubuntu-core/hooks/05-create_minimal_fstab.chroot delete mode 100755 live-build/ubuntu-core/hooks/07-configure-system-image-client.chroot delete mode 100644 live-build/ubuntu-core/hooks/08-etc-writable.chroot delete mode 100755 live-build/ubuntu-core/hooks/09-disable-cloud-init-net-breaking.chroot delete mode 100644 live-build/ubuntu-core/hooks/10-remove-documentation.binary delete mode 100644 live-build/ubuntu-core/hooks/11-remove-extra-packages.chroot delete mode 100644 live-build/ubuntu-core/hooks/12-add-foreign-libc6.chroot delete mode 100644 live-build/ubuntu-core/hooks/13-set-locale.chroot delete mode 100644 live-build/ubuntu-core/hooks/14-set-motd.chroot delete mode 100644 live-build/ubuntu-core/hooks/15-remove-grub-common.chroot delete mode 100644 live-build/ubuntu-core/hooks/16-ensure-uboot.chroot delete mode 100755 live-build/ubuntu-core/hooks/20-extra-files.chroot delete mode 100644 live-build/ubuntu-core/hooks/21-snappy-security-policy-stamp.chroot delete mode 100755 live-build/ubuntu-core/hooks/25-create-generic-initrd.chroot delete mode 100644 live-build/ubuntu-core/hooks/400-create-apt-get-warning.binary delete mode 100755 live-build/ubuntu-core/hooks/500-create-xdg-wrapper.binary delete mode 100755 live-build/ubuntu-core/hooks/600-no-debian.binary delete mode 100755 live-build/ubuntu-core/hooks/700-classic-dir.binary delete mode 100755 live-build/ubuntu-core/hooks/99-undivert-grub-install.chroot delete mode 100755 live-build/ubuntu-core/hooks/99zz-check-uid-gid.chroot delete mode 100644 live-build/ubuntu-core/includes.chroot/etc/hosts diff --git a/debian/changelog b/debian/changelog index f45c10ff..4a4c601f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +livecd-rootfs (2.723) UNRELEASED; urgency=medium + + * Drop code for the 'ubuntu-core' project when not using + image_format: ubuntu-image, as this is obsolete and not used to build + core* snaps in recent series. + + -- Steve Langasek Tue, 11 May 2021 17:08:24 -0700 + livecd-rootfs (2.722) impish; urgency=medium * Simplify how getty services are customized / overriden in the live server diff --git a/live-build/auto/build b/live-build/auto/build index a20f26d2..e1a00f88 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -542,35 +542,6 @@ elif [ -e binary-tar.tar.gz ]; then cp -a binary-tar.tar.gz "$PREFIX.rootfs.tar.gz" fi -if [ "$PROJECT:${SUBPROJECT:-}" = "ubuntu-core:system-image" ]; then - if [ -e "binary/$INITFS/filesystem.dir" ]; then - rootfs="binary/$INITFS/filesystem.dir" - - for dir in lib/modules lib/firmware writable meta; do - mkdir -p $rootfs/$dir - done - - # get a proper version from the chroot - . $rootfs/etc/os-release - VERSION="$(echo $PRETTY_NAME | sed 's/[^0-9.]*//g')" - - CORENAME="ubuntu-core" - cat > $rootfs/meta/snap.yaml < chroot/dpkg.list - - # clean up - lb chroot_devpts remove "$@" - lb chroot_sysfs remove "$@" - lb chroot_proc remove "$@" - - # now build the actual device tarball - TMPDIR="$(mktemp -d)" - mkdir -p $TMPDIR/system/ - mkdir -p $TMPDIR/assets/ - - cd chroot - cp -ar lib/modules/ $TMPDIR/system/ - cp -ar lib/firmware/ $TMPDIR/system/ - # FIXME: compat with the old kernel spec/old initramfs that - # expects lib/{modules,firmware} - # - # FIXME2: update the initramfs-tools-ubuntu-core scripts/ubuntu-core - # to look at the new location - mkdir $TMPDIR/system/lib - ln -s $TMPDIR/system/modules $TMPDIR/system/lib - ln -s $TMPDIR/system/firmware $TMPDIR/system/lib - - # new assets handling - if [ -f boot/vmlinu?-*.signed ]; then - kernel=boot/vmlinu?-*.signed - else - kernel=boot/vmlinu?-* - fi - - initrd=boot/initrd.img-* - - cp -ar $initrd $TMPDIR/assets/ - cp -ar $kernel $TMPDIR/assets/ - cp -ar boot/abi-* boot/System.map-* boot/config-* $TMPDIR/assets/ - - dtbs=$(find lib/firmware -type d -name 'device-tree' -print0) - if [ -n "$dtbs" ]; then - mv "$dtbs" $TMPDIR/assets/dtbs - case $devarch in - raspi2) - # ubuntu-device-flash does not like subdirs here, we need to tar it up - if [ -e $TMPDIR/assets/dtbs/overlays ]; then - tar --sort=name -C $TMPDIR/assets/dtbs -f $TMPDIR/assets/dtbs/overlays.tgz -czv overlays - rm -rf $TMPDIR/assets/dtbs/overlays - fi - ;; - dragonboard) - cp $TMPDIR/assets/dtbs/qcom/apq8016-sbc-snappy.dtb $TMPDIR/assets/dtbs/apq8016-sbc.dtb - # add special link needed by the dragonboard wifi driver - mkdir -p $TMPDIR/system/lib/firmware/wlan/ - ln -s /run/macaddr0 $TMPDIR/system/lib/firmware/wlan/ - ;; - esac - fi - - # copy dpkg manifest - cp -ar dpkg.list $TMPDIR/assets - - # create hardware.yaml - # this assumes armhf == u-boot - # and all others grub - # common bits - cat > $TMPDIR/hardware.yaml << EOF -kernel: assets/$(basename $kernel) -initrd: assets/$(basename $initrd) -partition-layout: system-AB -EOF - # arch specific ones - if [ "$ARCH" = "armhf" ]; then - cat >> $TMPDIR/hardware.yaml << EOF -dtbs: assets/dtbs -bootloader: u-boot -EOF - else - cat >> $TMPDIR/hardware.yaml << EOF -bootloader: grub -EOF - fi - - # compress everything - cd $TMPDIR - tarname="device.tar.gz" - manifestname="device.manifest" - if [ "$devarch" = "raspi2" ];then - tarname="raspi2.$tarname" - manifestname="$devarch.$manifestname" - elif [ "$devarch" = "dragonboard" ];then - tarname="$devarch.$tarname" - manifestname="$devarch.$manifestname" - fi - # create tarfile - tar -c --sort=name -z -f $HERE/$PREFIX.$tarname system assets hardware.yaml - - # create device specific manifest to track kernel dpkg version - cp assets/dpkg.list $HERE/$PREFIX.$manifestname - - # show size of initrd and kernel in the log - ls -lh assets/ - - # dump the content list into the log - echo "I: device tarball contents for $PREFIX.$tarname:" - find . -type f - - # azure wants its own device tarball - if [ "$ARCH" = "amd64" ]; then - cp $HERE/$PREFIX.$tarname $HERE/$PREFIX.azure.$tarname - fi - - # create snap - snapname="kernel.snap" - metaname=canonical-pc-linux - - if [ "$devarch" = "raspi2" ];then - metaname=canonical-pi2-linux - snapname="$devarch.kernel.snap" - elif [ "$devarch" = "generic" ] && [ "$ARCH" = "armhf" ];then - metaname=canonical-bbb-linux - elif [ "$devarch" = "dragonboard" ] && [ "$ARCH" = "arm64" ];then - metaname=canonical-snapdragon-linux - snapname="$devarch.kernel.snap" - fi - - rm -rf $HERE/snap || true - mkdir -p $HERE/snap/meta - cp -a $TMPDIR/assets/* $HERE/snap - cp -a $TMPDIR/system/* $HERE/snap - - cd $HERE/snap - kernel="$(ls vmlinuz-*)" - initrd="$(ls initrd.img-*)" - # old kernel spec - ln -s $kernel vmlinuz - ln -s $initrd initrd.img - # new kernel spec - ln -s $kernel kernel.img - kvers="$(ls vmlinuz-*|sed 's/^.*vmlinuz-//;s/-[a-z.]*$//')" - - VERSION=$kvers - - cat > meta/kernel.yaml < meta/snap.yaml <> meta/snap.yaml - fi - cd $HERE - - apt-get -y install snapcraft - snapcraft snap snap - - snapfile="$(ls $metaname*.snap)" - cp -a $snapfile $PREFIX.$snapname - ) - done - fi - - LB_LINUX_FLAVOURS=none - ;; -esac - for FLAVOUR in $LB_LINUX_FLAVOURS; do if [ -z "$LB_LINUX_FLAVOURS" ] || [ "$LB_LINUX_FLAVOURS" = "none" ]; then continue diff --git a/live-build/auto/config b/live-build/auto/config index 0017e799..a11c0816 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -525,7 +525,7 @@ if [ "$PREINSTALLED" = "true" ]; then ubuntu-server) add_package live oem-config-debconf ubiquity-frontend-debconf ;; - ubuntu-core|ubuntu-base|ubuntu-oci|base|ubuntu-cpc) + ubuntu-base|ubuntu-oci|base|ubuntu-cpc) ;; ubuntu) add_package live oem-config-gtk ubiquity-frontend-gtk @@ -749,60 +749,6 @@ case $PROJECT in PREINSTALL_POOL_SEEDS='server-ship' ;; - ubuntu-core) - OPTS="${OPTS:+$OPTS }--apt-recommends false" - - # some workarounds because the seeds are not quite - # corrent at the moment - add_package install dbus - add_package install isc-dhcp-client - add_package install libpam-systemd - add_package install ppp - add_package install watchdog - # no Task: header yet - add_package install snapd - add_package install ubuntu-core-snapd-units - add_package install nplan - # we want all arches to have u-boot-tools - add_package install u-boot-tools - - # no minimal as we want to be really minimal - #add_task install minimal - add_task install ubuntu-core - - # more packages are pulled in via the seed. - # (important to remember when comparing to the - # livecd-rootfs from ppa:snappy-dev/image) - - case $ARCH in - i386) - # efi support can go once the task - # header is available for grub-efi-ia32-bin - add_package install grub-efi-ia32-bin - ;; - esac - - # generic kernel etc - KERNEL_FLAVOURS=none - case $ARCH in - i386) - add_package install grub-pc - ;; - amd64) - add_package install grub-pc - add_package install shim-signed - ;; - esac - OPTS="${OPTS:+$OPTS }--linux-packages=none --initramfs=none" - - # contains the framework definition - add_package install ubuntu-core-libs - - # universe needed for 'system-image-cli' and multiverse for firmware - COMPONENTS='main restricted universe multiverse' - OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal" - ;; - ubuntu-base) OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal" ;; @@ -1213,7 +1159,7 @@ EOF fi ;; - ubuntu-core:system-image|ubuntu-cpc:*|ubuntu-server:live|ubuntu:desktop-preinstalled) + ubuntu-cpc:*|ubuntu-server:live|ubuntu:desktop-preinstalled) # Ensure that most things e.g. includes.chroot are copied as is for entry in /usr/share/livecd-rootfs/live-build/${PROJECT}/*; do case $entry in diff --git a/live-build/ubuntu-core/hooks/00-uid-gid-fix.chroot_early b/live-build/ubuntu-core/hooks/00-uid-gid-fix.chroot_early deleted file mode 100755 index a03b3b53..00000000 --- a/live-build/ubuntu-core/hooks/00-uid-gid-fix.chroot_early +++ /dev/null @@ -1,249 +0,0 @@ -#!/bin/sh -eu - -ERRCNT="" - -# Known good post-debootstrap values -passwd_bootstrap="7d89b96d37aab3fd22e4570862e3a8eb" -shadow_bootstrap="4627fdc1f1f2712bc52544d5501bcf81" -group_bootstrap="ffbe05611b49480cb289f343a67d7e7b" -gshadow_bootstrap="46121fc1a7d95f37e7a3fb21db8061e8" - -# Current post-debootstrap values -passwd_hash=$(set -- $(md5sum /etc/passwd) && echo $1) -shadow_hash=$(set -- $(cat /etc/shadow | sed "s/:.*:0:99999:/:0:99999:/g" | md5sum) && echo $1) -group_hash=$(set -- $(md5sum /etc/group) && echo $1) -gshadow_hash=$(set -- $(md5sum /etc/gshadow) && echo $1) - -# /etc/passwd -if [ "$passwd_bootstrap" = "$passwd_hash" ]; then - cat > /etc/passwd <&2 - echo "The output below might help to resolve the issue" >&2 - cat /etc/passwd - echo "passwd md5sum: $passwd_hash" >&2 - ERRCNT=1 -fi - -# /etc/shadow -if [ "$shadow_bootstrap" = "$shadow_hash" ]; then - cat > /etc/shadow <&2 - echo "The output below might help to resolve the issue" >&2 - cat /etc/shadow - echo "shadow md5sum: $shadow_hash" >&2 - ERRCNT=1 -fi - -# /etc/group -if [ "$group_bootstrap" = "$group_hash" ]; then - cat > /etc/group <&2 - echo "The output below might help to resolve the issue" >&2 - cat /etc/group - echo "group md5sum: $group_hash" >&2 - ERRCNT=1 -fi - -# /etc/gshadow -if [ "$gshadow_bootstrap" = "$gshadow_hash" ]; then - cat > /etc/gshadow <&2 - echo "The output below might help to resolve the issue" >&2 - cat /etc/gshadow - echo "gshadow md5sum: $gshadow_hash" >&2 - ERRCNT=1 -fi - -if [ -n "$ERRCNT" ]; then - echo "There were changes to the password database," >&2 - echo "please adjust the values in the livecd-rootfs source in the file:" >&2 - echo "live-build/ubuntu-core/hooks/00-uid-gid-fix.chroot_early" >&2 - echo >&2 - echo "Please check also if a maintainer script of the package" >&2 - echo "that added these entries perhaps created a home directory and," >&2 - echo "if needed, add code for creation of it to the above hook" >&2 - exit 1 -fi - - -# Record the current state for later comparison -for file in /etc/passwd /etc/shadow /etc/group /etc/gshadow; do - rm -f ${file}- - cp ${file} ${file}.orig -done diff --git a/live-build/ubuntu-core/hooks/01-divert-grub-install.chroot_early b/live-build/ubuntu-core/hooks/01-divert-grub-install.chroot_early deleted file mode 100755 index d6fbd500..00000000 --- a/live-build/ubuntu-core/hooks/01-divert-grub-install.chroot_early +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -ex - -ARCH=$(dpkg --print-architecture) - -case $ARCH in - i386|amd64) - dpkg-divert --quiet --add \ - --divert /usr/sbin/grub-install.REAL --rename \ - /usr/sbin/grub-install - - cat > /usr/sbin/grub-install <<'EOF' -#! /bin/sh -echo "grub-install: diverted by livecd-rootfs (will be called later)" >&2 -exit 0 -EOF - - chmod +x /usr/sbin/grub-install - ;; -esac diff --git a/live-build/ubuntu-core/hooks/01-setup_user.chroot b/live-build/ubuntu-core/hooks/01-setup_user.chroot deleted file mode 100755 index fe856e6b..00000000 --- a/live-build/ubuntu-core/hooks/01-setup_user.chroot +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -x - -set -e - -# There is no default user anymore, console-conf is responsible -# for creating one - -# setup the required files for extrausers -for name in group gshadow passwd shadow subuid subgid; do - touch /var/lib/extrausers/$name -done - -for name in gshadow shadow; do - chmod 640 /var/lib/extrausers/$name - chown root:shadow /var/lib/extrausers/$name -done - -# Enable libnss-extrusers -sed -i 's/^group:.*compat/\0 extrausers/' /etc/nsswitch.conf -sed -i 's/^passwd:.*compat/\0 extrausers/' /etc/nsswitch.conf -sed -i 's/^shadow:.*compat/\0 extrausers/' /etc/nsswitch.conf - - - diff --git a/live-build/ubuntu-core/hooks/03-boot_with_systemd.chroot b/live-build/ubuntu-core/hooks/03-boot_with_systemd.chroot deleted file mode 100755 index f19164f0..00000000 --- a/live-build/ubuntu-core/hooks/03-boot_with_systemd.chroot +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -x - -# Boot using systemd and disable quiet boot -# to see what is happening. -systemd=/lib/systemd/systemd -if [ -f /etc/default/grub ]; then - sed -i \ - -e "s,^\\([ ]*GRUB_CMDLINE_LINUX\\)=\"\"$,\\1=\"init=$systemd\",g" \ - -e 's,^\([ ]*GRUB_CMDLINE_LINUX_DEFAULT\)="quiet splash",\1="",g' \ - /etc/default/grub -fi diff --git a/live-build/ubuntu-core/hooks/05-create_minimal_fstab.chroot b/live-build/ubuntu-core/hooks/05-create_minimal_fstab.chroot deleted file mode 100755 index 17c2e931..00000000 --- a/live-build/ubuntu-core/hooks/05-create_minimal_fstab.chroot +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -x - -cat >>/etc/fstab<> /etc/cloud/cloud.cfg.d/99-snappy-disable-network-config.cfg </etc/default/locale</etc/motd< /etc/fw_env.config <&2 -ln -sf ../proc/self/mounts /etc/mtab -mkdir -p /lib/modules -mkdir -p /lib/firmware -mkdir -p /writable -mkdir -p /var/lib/systemd/rfkill diff --git a/live-build/ubuntu-core/hooks/21-snappy-security-policy-stamp.chroot b/live-build/ubuntu-core/hooks/21-snappy-security-policy-stamp.chroot deleted file mode 100644 index 4a2f11b4..00000000 --- a/live-build/ubuntu-core/hooks/21-snappy-security-policy-stamp.chroot +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -# -# Create the security policy version file. Its important that the file -# content changes every time an of the "apparmor" or "seccomp" policies -# (or its generators) get updated. -# -# snappy will use this file for its "snappy policygen --regenerate-all" -# systemd unit. It will store the security-policy-version file on each -# --regenerate-all call. On each boot it will compare the stored version -# with the version on the image and if they are different regenerate the -# policies - -set -e - - -echo "create security policy version" >&2 -mkdir -p /usr/share/snappy/ -apt list --installed apparmor ubuntu-core-security-* > /usr/share/snappy/security-policy-version diff --git a/live-build/ubuntu-core/hooks/25-create-generic-initrd.chroot b/live-build/ubuntu-core/hooks/25-create-generic-initrd.chroot deleted file mode 100755 index c9d95c0a..00000000 --- a/live-build/ubuntu-core/hooks/25-create-generic-initrd.chroot +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh - -set -ex - -IVER="$(dpkg -s initramfs-tools-ubuntu-core | \ - sed -n '/^Version:/{s/^[^: ]*: \([^: ]*\).*/\1/;p;}')" - -# fail the build if we did not find the snappy initrd package -[ -n "$IVER" ] || exit 1 - -update-initramfs.REAL -c -kcore-$IVER -v - -cd /boot -ln -s initrd.img-core-$IVER initrd.img-core -cd - - -sha1sum /boot/initrd.img-core >/var/lib/initramfs-tools/core - -# for snapcraft backwards compatibility -mkdir -p /usr/lib/ubuntu-core-generic-initrd -cp -a /boot/initrd.img-core* /usr/lib/ubuntu-core-generic-initrd/ diff --git a/live-build/ubuntu-core/hooks/400-create-apt-get-warning.binary b/live-build/ubuntu-core/hooks/400-create-apt-get-warning.binary deleted file mode 100644 index 3f1e17cd..00000000 --- a/live-build/ubuntu-core/hooks/400-create-apt-get-warning.binary +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -set -ex - -echo "I: Creating warning to use snappy when apt-get is used" - -PREFIX=binary/boot/filesystem.dir - -mkdir -p $PREFIX/usr/local/bin -cat >$PREFIX/usr/local/bin/no-apt <$PREFIX/usr/local/bin/xdg-open <$PREFIX/usr/local/share/applications/xdg-open.desktop <$PREFIX/usr/local/share/applications/mimeapps.list < usr/share/snappy/dpkg.list -) - -# dpkg-deb and dpkg purposefully left behind -(cd $PREFIX - chroot . dpkg --purge apt - rm -r \ - var/lib/dpkg \ - var/log/apt - rm \ - usr/bin/dpkg-query \ - usr/bin/dpkg-split \ - usr/bin/dpkg-divert \ - usr/bin/dpkg-trigger \ - usr/bin/dpkg-statoverride \ - usr/bin/dpkg-maintscript-helper -) diff --git a/live-build/ubuntu-core/hooks/700-classic-dir.binary b/live-build/ubuntu-core/hooks/700-classic-dir.binary deleted file mode 100755 index 334def66..00000000 --- a/live-build/ubuntu-core/hooks/700-classic-dir.binary +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# -# create hostfs entry - -set -ex - -echo "I: Adding var/lib/snapd/hostfs" - -PREFIX=binary/boot/filesystem.dir - -(cd $PREFIX - install -m755 -d var/lib/snapd/hostfs -) diff --git a/live-build/ubuntu-core/hooks/99-undivert-grub-install.chroot b/live-build/ubuntu-core/hooks/99-undivert-grub-install.chroot deleted file mode 100755 index 0a88ef39..00000000 --- a/live-build/ubuntu-core/hooks/99-undivert-grub-install.chroot +++ /dev/null @@ -1,10 +0,0 @@ -#! /bin/sh -ex - -ARCH=$(dpkg --print-architecture) - -case $ARCH in - i386|amd64) - rm -f /usr/sbin/grub-install - dpkg-divert --quiet --remove --rename /usr/sbin/grub-install - ;; -esac diff --git a/live-build/ubuntu-core/hooks/99zz-check-uid-gid.chroot b/live-build/ubuntu-core/hooks/99zz-check-uid-gid.chroot deleted file mode 100755 index 4d7b807d..00000000 --- a/live-build/ubuntu-core/hooks/99zz-check-uid-gid.chroot +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -eu - -ERRCNT="" - -passwd_hash=$(set -- $(md5sum /etc/passwd) && echo $1) -shadow_hash=$(set -- $(cat /etc/shadow | sed "s/:.*:0:99999:/:0:99999:/g" | md5sum) && echo $1) -group_length=$(cat /etc/group | wc -l) -gshadow_length=$(cat /etc/gshadow | wc -l) - -passwd_orig_hash=$(set -- $(md5sum /etc/passwd.orig) && echo $1) -shadow_orig_hash=$(set -- $(cat /etc/shadow.orig | sed "s/:.*:0:99999:/:0:99999:/g" | md5sum) && echo $1) -group_orig_length=$(cat /etc/group.orig | wc -l) -gshadow_orig_length=$(cat /etc/gshadow.orig | wc -l) - -if [ "$passwd_hash" != "$passwd_orig_hash" ]; then - echo "/etc/passwd has changed during setup." >&2 - echo "The new /etc/passwd md5sum is: $passwd_hash" >&2 - diff -Nrup /etc/passwd.orig /etc/passwd >&2 || true - ERRCNT=1 -fi - -if [ "$shadow_hash" != "$shadow_orig_hash" ]; then - echo "/etc/shadow has changed during setup." >&2 - echo "The new /etc/shadow md5sum is: $shadow_hash" >&2 - diff -Nrup /etc/shadow.orig /etc/shadow >&2 || true - ERRCNT=1 -fi - -if [ "$group_length" != "$group_orig_length" ]; then - echo "/etc/group has changed during setup." >&2 - diff -Nrup /etc/group.orig /etc/group >&2 || true - ERRCNT=1 -fi - -if [ "$gshadow_length" != "$gshadow_orig_length" ]; then - echo "/etc/gshadow has changed during setup." >&2 - diff -Nrup /etc/gshadow.orig /etc/gshadow >&2 || true - ERRCNT=1 -fi - -if [ -n "$ERRCNT" ]; then - echo "There were changes to the password database," >&2 - echo "please adjust the values in the livecd-rootfs source in the file:" >&2 - echo "live-build/ubuntu-core/hooks/00-uid-gid-fix.chroot_early" >&2 - echo >&2 - echo "Please check also if a maintainer script of the package" >&2 - echo "that added these entries perhaps created a home directory and," >&2 - echo "if needed, add code for creation of it to the above hook" >&2 - exit 1 -fi - -rm /etc/passwd.orig /etc/shadow.orig /etc/group.orig /etc/gshadow.orig diff --git a/live-build/ubuntu-core/includes.chroot/etc/hosts b/live-build/ubuntu-core/includes.chroot/etc/hosts deleted file mode 100644 index 81684340..00000000 --- a/live-build/ubuntu-core/includes.chroot/etc/hosts +++ /dev/null @@ -1,9 +0,0 @@ -127.0.0.1 localhost.localdomain localhost -::1 localhost6.localdomain6 localhost6 - -# The following lines are desirable for IPv6 capable hosts -::1 localhost ip6-localhost ip6-loopback -fe00::0 ip6-localnet -ff02::1 ip6-allnodes -ff02::2 ip6-allrouters -ff02::3 ip6-allhosts