From c50bcc7160f7c481049ce77417f753d17891d7a5 Mon Sep 17 00:00:00 2001 From: Sebastien Bacher Date: Wed, 10 Jun 2015 11:25:53 +0200 Subject: [PATCH] Revert symlink changes, that creates build issues, copy updated hook to the desktop-next directory instead --- debian/changelog | 7 ++ .../hooks/03-boot_with_systemd.chroot | 12 +- .../hooks/04-configure_network.chroot | 10 +- .../hooks/05-create_minimal_fstab.chroot | 7 +- .../07-configure-system-image-client.chroot | 8 +- .../hooks/08-etc-writable.chroot | 16 ++- .../hooks/10-remove-documentation.binary | 23 +++- .../hooks/15-remove-grub-common.chroot | 5 +- .../hooks/400-create-apt-get-warning.binary | 20 +++- .../500-move-kernel-to-device-tar.binary | 109 +++++++++++++++++- 10 files changed, 208 insertions(+), 9 deletions(-) mode change 120000 => 100755 live-build/ubuntu-desktop-next/hooks/03-boot_with_systemd.chroot mode change 120000 => 100755 live-build/ubuntu-desktop-next/hooks/04-configure_network.chroot mode change 120000 => 100755 live-build/ubuntu-desktop-next/hooks/05-create_minimal_fstab.chroot mode change 120000 => 100755 live-build/ubuntu-desktop-next/hooks/07-configure-system-image-client.chroot mode change 120000 => 100644 live-build/ubuntu-desktop-next/hooks/08-etc-writable.chroot mode change 120000 => 100644 live-build/ubuntu-desktop-next/hooks/10-remove-documentation.binary mode change 120000 => 100644 live-build/ubuntu-desktop-next/hooks/15-remove-grub-common.chroot mode change 120000 => 100644 live-build/ubuntu-desktop-next/hooks/400-create-apt-get-warning.binary mode change 120000 => 100644 live-build/ubuntu-desktop-next/hooks/500-move-kernel-to-device-tar.binary diff --git a/debian/changelog b/debian/changelog index fa1712b1..6a9f0c64 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +livecd-rootfs (2.313) UNRELEASED; urgency=medium + + * Revert symlink changes, that creates build issues, copy updated hook + to the desktop-next directory instead + + -- Sebastien Bacher Wed, 10 Jun 2015 11:25:19 +0200 + livecd-rootfs (2.312) wily; urgency=low [ Michael Vogt ] 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 120000 index 53266115..00000000 --- a/live-build/ubuntu-desktop-next/hooks/03-boot_with_systemd.chroot +++ /dev/null @@ -1 +0,0 @@ -../../ubuntu-core/hooks/03-boot_with_systemd.chroot \ No newline at end of file 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 new file mode 100755 index 00000000..f19164f0 --- /dev/null +++ b/live-build/ubuntu-desktop-next/hooks/03-boot_with_systemd.chroot @@ -0,0 +1,11 @@ +#!/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/04-configure_network.chroot b/live-build/ubuntu-desktop-next/hooks/04-configure_network.chroot deleted file mode 120000 index 52f3b7b3..00000000 --- a/live-build/ubuntu-desktop-next/hooks/04-configure_network.chroot +++ /dev/null @@ -1 +0,0 @@ -../../ubuntu-core/hooks/04-configure_network.chroot \ No newline at end of file diff --git a/live-build/ubuntu-desktop-next/hooks/04-configure_network.chroot b/live-build/ubuntu-desktop-next/hooks/04-configure_network.chroot new file mode 100755 index 00000000..d96d9aa8 --- /dev/null +++ b/live-build/ubuntu-desktop-next/hooks/04-configure_network.chroot @@ -0,0 +1,9 @@ +#!/bin/sh -x + +if=eth0 + +# Manually configure the first ethernet device +cat >/etc/network/interfaces.d/"$if"<>/etc/fstab<$PREFIX/usr/local/bin/no-apt < $TMPDIR/hardware.yaml << EOF +kernel: assets/vmlinuz +initrd: assets/initrd.img +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 -z -f $HERE/device.tar.gz system assets hardware.yaml +) + +# now build the azure device tarball by adding walinuxagent +if [ -e binary/boot/filesystem.dir/var/lib/dpkg/info/walinuxagent.list ]; +then +( + cd binary/boot/filesystem.dir + while read line; do + line=$(echo $line |cut -d/ -f2-) + if [ -e "$line" ] && [ ! -d "$line" ]; then + cp -ar --parent $line $TMPDIR/system + fi + done < var/lib/dpkg/info/walinuxagent.list + # created by walinuxagent postinst/dh-systemd + cp -ar --parent var/lib/systemd/deb-systemd-helper-enabled/walinuxagent* $TMPDIR/system + cp -ar --parent etc/systemd/system/multi-user.target.wants/walinuxagent* $TMPDIR/system + mkdir -p $TMPDIR/system/var/lib/waagent +) +# and tar it up +( + cd $TMPDIR + tar -c -z -f $HERE/device-azure.tar.gz system assets hardware.yaml +) +fi +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 + # remove walinuxagent + if [ -e var/lib/dpkg/info/walinuxagent.list ]; then + chroot . dpkg --purge walinuxagent || true + fi +)