diff --git a/debian/changelog b/debian/changelog index 48491a83..f1a7e370 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ livecd-rootfs (2.588) UNRELEASED; urgency=medium * Drop ubuntu-desktop-next configs + * Drop ubuntu-desktop-next hooks -- Dimitri John Ledkov Thu, 30 May 2019 12:00:40 +0100 diff --git a/live-build/ubuntu-desktop-next/hooks/00-uid-gid-fix.chroot_early b/live-build/ubuntu-desktop-next/hooks/00-uid-gid-fix.chroot_early deleted file mode 100755 index 5615383b..00000000 --- a/live-build/ubuntu-desktop-next/hooks/00-uid-gid-fix.chroot_early +++ /dev/null @@ -1,295 +0,0 @@ -#!/bin/sh -eu - -ERRCNT="" - -# Known good post-debootstrap values -passwd_bootstrap="e6075a0d2a38e214ae5e9a5545f7eda3" -shadow_bootstrap="7fa48d7fb0e3a1ede9c98ff7b1b33622" -group_bootstrap="5fd842058cd526ddaf51c2a61870c12a" -gshadow_bootstrap="3145b72315c7306edb13bf546bb350b9" - -# 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-desktop-next/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 - -# Create some missing directories -mkdir -p /var/lib/lightdm -chown lightdm:lightdm /var/lib/lightdm -chmod 750 /var/lib/lightdm - -mkdir -p /var/lib/usermetrics -chown usermetrics:usermetrics /var/lib/usermetrics -chmod 750 /var/lib/usermetrics - -echo "adjusting ownership of /var/log" >&2 -chown root:syslog /var/log -ls -ln /var | grep log >&2 - -# 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-desktop-next/hooks/01-setup_user.chroot b/live-build/ubuntu-desktop-next/hooks/01-setup_user.chroot deleted file mode 100755 index 26564c3c..00000000 --- a/live-build/ubuntu-desktop-next/hooks/01-setup_user.chroot +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh -x - -set -e - -USER=ubuntu -UGID=1000 - -echo "I: creating default user $USER" -adduser --gecos $USER --disabled-login $USER --uid $UGID - -mkdir -p /home/$USER/Music -mkdir -p /home/$USER/Pictures -mkdir -p /home/$USER/Videos -mkdir -p /home/$USER/Downloads -mkdir -p /home/$USER/Documents -chown -R $UGID:$UGID /home/$USER - -# 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 - -# Move user from /etc to extrausers location -grep "^$USER" /etc/group >> /var/lib/extrausers/group -grep "^$USER" /etc/passwd >> /var/lib/extrausers/passwd -grep "^$USER" /etc/shadow >> /var/lib/extrausers/shadow -grep "^$USER" /etc/gshadow >> /var/lib/extrausers/gshadow -chmod 0644 /var/lib/extrausers/group -chmod 0644 /var/lib/extrausers/passwd -chmod 0640 /var/lib/extrausers/shadow -chmod 0640 /var/lib/extrausers/gshadow -chown root:shadow /var/lib/extrausers/shadow -chown root:shadow /var/lib/extrausers/gshadow -sed -i "/^$USER/d" /etc/group -sed -i "/^$USER/d" /etc/passwd -sed -i "/^$USER/d" /etc/shadow -sed -i "/^$USER/d" /etc/gshadow -touch /var/lib/extrausers/subuid -touch /var/lib/extrausers/subgid - -# needs to run *after* the user was moved out to /var/lib/extrausers -echo "I: set user $USER password to $USER" -echo "$USER:$USER" | chpasswd - diff --git a/live-build/ubuntu-desktop-next/hooks/02-add_user_to_groups.chroot b/live-build/ubuntu-desktop-next/hooks/02-add_user_to_groups.chroot deleted file mode 100755 index 232fab3e..00000000 --- a/live-build/ubuntu-desktop-next/hooks/02-add_user_to_groups.chroot +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -x - -USER=ubuntu - -DEFGROUPS="sudo,adm,dialout,cdrom,plugdev,audio,dip,video" - -echo "I: add $USER to ($DEFGROUPS) group(s)" -usermod -a -G ${DEFGROUPS} ${USER} diff --git a/live-build/ubuntu-desktop-next/hooks/03-boot_with_systemd.chroot b/live-build/ubuntu-desktop-next/hooks/03-boot_with_systemd.chroot deleted file mode 100755 index f19164f0..00000000 --- a/live-build/ubuntu-desktop-next/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-desktop-next/hooks/05-create_minimal_fstab.chroot b/live-build/ubuntu-desktop-next/hooks/05-create_minimal_fstab.chroot deleted file mode 100755 index 461c752f..00000000 --- a/live-build/ubuntu-desktop-next/hooks/05-create_minimal_fstab.chroot +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -x - -cat >>/etc/fstab</etc/default/locale</etc/motd<&2 -mkdir -p /lib/modules -mkdir -p /lib/firmware -mkdir -p /writable diff --git a/live-build/ubuntu-desktop-next/hooks/400-create-apt-get-warning.binary b/live-build/ubuntu-desktop-next/hooks/400-create-apt-get-warning.binary deleted file mode 100644 index 94e88a1f..00000000 --- a/live-build/ubuntu-desktop-next/hooks/400-create-apt-get-warning.binary +++ /dev/null @@ -1,19 +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 </\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t<\/policy>\n\t\t/g' /etc/dbus-1/system.d/org.freedesktop.NetworkManager.conf - -mkdir -p /etc/polkit-1/localauthority/50-local.d -cat > /etc/polkit-1/localauthority/50-local.d/org.freedesktop.NetworkManager.pkla << EOF -[indicator-network-service] -Identity=unix-group:sudo -Action=org.freedesktop.NetworkManager.* -ResultAny=yes -ResultInactive=no -ResultActive=yes -EOF diff --git a/live-build/ubuntu-desktop-next/hooks/500-move-kernel-to-device-tar.binary b/live-build/ubuntu-desktop-next/hooks/500-move-kernel-to-device-tar.binary deleted file mode 100644 index b32447de..00000000 --- a/live-build/ubuntu-desktop-next/hooks/500-move-kernel-to-device-tar.binary +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/sh -# -# move the kernel out into a new device tarfile with system/boot - -set -ex - -echo "I: Moving kernel into device tarball" - -HERE="$(pwd)" -TMPDIR="$(mktemp -d)" -mkdir -p $TMPDIR/system/ -mkdir -p $TMPDIR/assets/ - -# cp files, we can't simply use tar --transform as it changes the symlink target -( - cd binary/boot/filesystem.dir - - cp -ar --parent lib/modules/ $TMPDIR/system/ - cp -ar --parent lib/firmware/ $TMPDIR/system/ - - # 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-* $TMPDIR/assets/ - - dtbs=$(find lib/firmware -type d -name 'device-tree' -print0) - if [ -n "$dtbs" ]; then - mv "$dtbs" $TMPDIR/assets/dtbs - fi - - # create hardware.yaml - # this assumes armh == 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 -) - -# and tar it up -( - cd $TMPDIR - tar -c --sort=name -z -f $HERE/device.tar.gz system assets hardware.yaml -) - -rm -rf $TMPDIR - -# remove files from the root filesystem -(cd binary/boot/filesystem.dir - rm -f boot/vmlinu?-* - rm -f boot/initrd.img-* - rm -f boot/abi-* - rm -f boot/System.map-* - rm -f initrd.img - rm -f vmlinu? - rm -rf lib/modules - rm -rf lib/firmware -) diff --git a/live-build/ubuntu-desktop-next/hooks/99zz-check-uid-gid.chroot b/live-build/ubuntu-desktop-next/hooks/99zz-check-uid-gid.chroot deleted file mode 100755 index 4d7b807d..00000000 --- a/live-build/ubuntu-desktop-next/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-desktop-next/includes.chroot/etc/hosts b/live-build/ubuntu-desktop-next/includes.chroot/etc/hosts deleted file mode 100644 index 81684340..00000000 --- a/live-build/ubuntu-desktop-next/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 diff --git a/live-build/ubuntu-desktop-next/includes.chroot/usr/share/lightdm/lightdm.conf.d/90-desktop-next-autologin.conf b/live-build/ubuntu-desktop-next/includes.chroot/usr/share/lightdm/lightdm.conf.d/90-desktop-next-autologin.conf deleted file mode 100644 index 80387a35..00000000 --- a/live-build/ubuntu-desktop-next/includes.chroot/usr/share/lightdm/lightdm.conf.d/90-desktop-next-autologin.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Seat:*] -autologin-user=ubuntu