From 1d9ee67e4e5df2e54525f68327114f412299e309 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 29 Oct 2014 11:04:17 +0100 Subject: [PATCH] merge fixes from the ubuntu-system-image PPA --- live-build/auto/config | 17 +++++++++++++---- .../ubuntu-core/hooks/08-etc-writable.chroot | 15 +++++++++++++++ .../hooks/56-handle_resolvconf.chroot.binary | 7 ------- .../ubuntu-core/includes.chroot/etc/resolv.conf | 1 + 4 files changed, 29 insertions(+), 11 deletions(-) create mode 100644 live-build/ubuntu-core/hooks/08-etc-writable.chroot delete mode 100755 live-build/ubuntu-core/hooks/56-handle_resolvconf.chroot.binary create mode 120000 live-build/ubuntu-core/includes.chroot/etc/resolv.conf diff --git a/live-build/auto/config b/live-build/auto/config index 4d191e0e..f64c4fcf 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -343,10 +343,19 @@ case $PROJECT in if [ "$SUBPROJECT" = "system-image" ]; then OPTS="${OPTS:+$OPTS }--apt-recommends false" add_task install ubuntu-core - # Only in - # ppa:ubuntu-foundations-team/ubuntu/ubuntu-core-system-image - # at the moment, and PPAs don't have tasks. - add_package install click-systemd + + # some workarounds because the seeds are not quite + # corrent at the moment + add_package install dbus + add_package install libpam-systemd + case $ARCH in + i386|amd64) + add_package install grub-pc ;; + esac + + # contains the framework definition + add_package install ubuntu-core-libs + # universe needed for 'system-image-cli' COMPONENTS='main restricted universe' fi diff --git a/live-build/ubuntu-core/hooks/08-etc-writable.chroot b/live-build/ubuntu-core/hooks/08-etc-writable.chroot new file mode 100644 index 00000000..0ca61c6c --- /dev/null +++ b/live-build/ubuntu-core/hooks/08-etc-writable.chroot @@ -0,0 +1,15 @@ +#!/bin/sh +set -e + +mkdir -p /etc/writable + +# cloud-init needs to be able to modify hostname and has the ability to +# set the other two. +for f in timezone localtime hostname; do + if [ -e /etc/$f ]; then + echo "I: Moving /etc/$f to /etc/writable/" + mv /etc/$f /etc/writable/$f + fi + echo "I: Linking /etc/$f to /etc/writable/" + ln -s writable/$f /etc/$f +done diff --git a/live-build/ubuntu-core/hooks/56-handle_resolvconf.chroot.binary b/live-build/ubuntu-core/hooks/56-handle_resolvconf.chroot.binary deleted file mode 100755 index d92dfd43..00000000 --- a/live-build/ubuntu-core/hooks/56-handle_resolvconf.chroot.binary +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -x -#--------------------------------------------------------------------- -# this must be run as a binary hook (outside the chroot) since lb -# massages resolv.conf on finishing the chroot operations. -#--------------------------------------------------------------------- - -ln -fs /run/resolvconf/resolv.conf chroot/etc/resolv.conf diff --git a/live-build/ubuntu-core/includes.chroot/etc/resolv.conf b/live-build/ubuntu-core/includes.chroot/etc/resolv.conf new file mode 120000 index 00000000..1a407ee1 --- /dev/null +++ b/live-build/ubuntu-core/includes.chroot/etc/resolv.conf @@ -0,0 +1 @@ +/run/resolvconf/resolv.conf \ No newline at end of file