From 1f3dfce9e9d5fbe2667977609b5e741e45f8c5ca Mon Sep 17 00:00:00 2001 From: Sebastien Bacher Date: Tue, 9 Jun 2015 17:56:13 +0200 Subject: [PATCH] Symlink some desktop-next hooks to ubuntu-core to avoid duplication --- debian/changelog | 8 +- .../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, 15 insertions(+), 203 deletions(-) mode change 100755 => 120000 live-build/ubuntu-desktop-next/hooks/03-boot_with_systemd.chroot mode change 100755 => 120000 live-build/ubuntu-desktop-next/hooks/04-configure_network.chroot mode change 100755 => 120000 live-build/ubuntu-desktop-next/hooks/05-create_minimal_fstab.chroot mode change 100755 => 120000 live-build/ubuntu-desktop-next/hooks/07-configure-system-image-client.chroot mode change 100644 => 120000 live-build/ubuntu-desktop-next/hooks/08-etc-writable.chroot mode change 100644 => 120000 live-build/ubuntu-desktop-next/hooks/10-remove-documentation.binary mode change 100644 => 120000 live-build/ubuntu-desktop-next/hooks/15-remove-grub-common.chroot mode change 100644 => 120000 live-build/ubuntu-desktop-next/hooks/400-create-apt-get-warning.binary mode change 100644 => 120000 live-build/ubuntu-desktop-next/hooks/500-move-kernel-to-device-tar.binary diff --git a/debian/changelog b/debian/changelog index c1112adc..1f0f8613 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,13 @@ -livecd-rootfs (2.311) UNRELEASED; urgency=low +livecd-rootfs (2.312) UNRELEASED; urgency=low + [ Michael Vogt ] * live-build/ubuntu-core/hooks/500-move-kernel-to-device-tar.binary: - ignore /vmlinu?, /initrd.img symlinks when building the boot assets - -- Michael Vogt Tue, 09 Jun 2015 09:46:41 +0200 + [ Sebastien Bacher ] + * Symlink some desktop-next hooks to ubuntu-core to avoid duplication + + -- Sebastien Bacher Tue, 09 Jun 2015 17:50:11 +0200 livecd-rootfs (2.311) wily; urgency=medium 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/03-boot_with_systemd.chroot b/live-build/ubuntu-desktop-next/hooks/03-boot_with_systemd.chroot new file mode 120000 index 00000000..53266115 --- /dev/null +++ b/live-build/ubuntu-desktop-next/hooks/03-boot_with_systemd.chroot @@ -0,0 +1 @@ +../../ubuntu-core/hooks/03-boot_with_systemd.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 deleted file mode 100755 index d96d9aa8..00000000 --- a/live-build/ubuntu-desktop-next/hooks/04-configure_network.chroot +++ /dev/null @@ -1,9 +0,0 @@ -#!/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 -partiton-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 -) 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 new file mode 120000 index 00000000..90bd9328 --- /dev/null +++ b/live-build/ubuntu-desktop-next/hooks/500-move-kernel-to-device-tar.binary @@ -0,0 +1 @@ +../../ubuntu-core/hooks/500-move-kernel-to-device-tar.binary \ No newline at end of file