diff --git a/debian/changelog b/debian/changelog index 3b959a69..169870c5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,129 @@ -livecd-rootfs (2.488) UNRELEASED; urgency=medium +livecd-rootfs (2.505) UNRELEASED; urgency=medium * Move casper from filesystem.squashfs to installer.squashfs. + -- Michael Hudson-Doyle Thu, 22 Feb 2018 13:57:35 +1300 + +livecd-rootfs (2.504) bionic; urgency=medium + + * Override JobRunningTimeoutSec to 0s on the .device unit that + subiquity_config.mount depends on to avoid a 5s delay on switching to a + new VT when there is no device there (LP: #1750117) + + -- Michael Hudson-Doyle Wed, 21 Feb 2018 10:39:58 +1300 + +livecd-rootfs (2.503) bionic; urgency=medium + + * Install linux-signed-generic in the live-server image. (LP: #1749065) + + -- Michael Hudson-Doyle Thu, 15 Feb 2018 09:54:14 +1300 + +livecd-rootfs (2.502) bionic; urgency=medium + + * Shuffle subiquity service definition to a mix of a snapd-generated service + file (from the subiquity snap) and an overlay (in this package). + + -- Michael Hudson-Doyle Wed, 14 Feb 2018 12:46:06 +1300 + +livecd-rootfs (2.501) bionic; urgency=medium + + * Stop building ova, vmdk, vagrant images on i386. + + -- Dimitri John Ledkov Mon, 12 Feb 2018 11:24:49 +0000 + +livecd-rootfs (2.500) bionic; urgency=medium + + * Disable the snapd.refresh.timer in the live server session. + + -- Michael Hudson-Doyle Thu, 08 Feb 2018 13:43:12 +1300 + +livecd-rootfs (2.499) bionic; urgency=medium + + * live-build/auto/config: Take into account SUBPROJECT when setting seeded + snaps, and also make sure we can work with snaps seeded in project hooks. + + -- Mathieu Trudel-Lapierre Tue, 06 Feb 2018 23:37:32 -0500 + +livecd-rootfs (2.498) bionic; urgency=medium + + * Don't write config/seeded-snaps if no snaps have been seeded. + + -- Iain Lane Thu, 01 Feb 2018 11:52:56 +0000 + +livecd-rootfs (2.497) bionic; urgency=medium + + * live-build/auto/config: Clean out unused hostname matches and fix indenting. + * live-build/auto/config: Reinstate hostname filtering for "*.buildd", which + is the correct match for non-lxd builders, and add "lp-*" for the lxd ones. + * live-build/auto/config: Fix incorrect quoting causing a skipped if statement + in non-live ubuntu-server builds since sometime in mid-October of last year. + + -- Adam Conrad Wed, 31 Jan 2018 20:54:54 -0700 + +livecd-rootfs (2.496) bionic; urgency=medium + + * Update hostname matches for launchpad buildds to match current practice, + fixing build failures due to LP being unable to reach + people.canonical.com. + + -- Steve Langasek Wed, 31 Jan 2018 16:41:23 -0800 + +livecd-rootfs (2.495) bionic; urgency=medium + + * Set ports/archive as appropriate for default mirror - should fix + autopkgtests. + + -- Iain Lane Wed, 31 Jan 2018 09:38:07 +0000 + +livecd-rootfs (2.494) bionic; urgency=medium + + * Run subiquity on any serial consoles that the user told systemd + about. + + -- Michael Hudson-Doyle Wed, 31 Jan 2018 21:58:33 +1300 + +livecd-rootfs (2.493) bionic; urgency=medium + + * Set a default archive mirror - needed for germinate. + + -- Iain Lane Tue, 30 Jan 2018 15:08:23 +0000 + +livecd-rootfs (2.492) bionic; urgency=medium + + * Oops. I shouldn't reference my private stuff. + + -- Iain Lane Tue, 30 Jan 2018 11:51:19 +0000 + +livecd-rootfs (2.491) bionic; urgency=medium + + * Support seeding of snaps, as emitted by germinate >= 2.27. + + -- Iain Lane Tue, 30 Jan 2018 11:20:28 +0000 + +livecd-rootfs (2.490) bionic; urgency=medium + + * ubuntu-cpc: Initramfs compression should match default for + update-initramfs (LP: #1744114) + + -- Robert C Jennings Mon, 29 Jan 2018 12:15:17 -0500 + +livecd-rootfs (2.489) bionic; urgency=medium + + [ Balint Reczey ] + * Revert to building minimized and not minimimized images with the same + ~2.2 GiB size + * Stop suggesting partimage which is not used anymore + * Drop Nexus 7 support + + [ Steve Langasek ] + * Add support for passing snap channel to ubuntu-core image builds. + + -- Steve Langasek Fri, 12 Jan 2018 15:04:42 -0800 + +livecd-rootfs (2.488) bionic; urgency=medium + + * Enable systemd-networkd by default for live-server installs. + -- Michael Hudson-Doyle Tue, 12 Dec 2017 10:55:10 +1300 livecd-rootfs (2.487) bionic; urgency=medium diff --git a/debian/control b/debian/control index 65dd4cf7..c66d3901 100644 --- a/debian/control +++ b/debian/control @@ -35,7 +35,6 @@ Depends: ${misc:Depends}, vmdk-stream-converter [amd64 i386], xz-utils, zerofree -Suggests: partimage Breaks: ubuntu-defaults-builder (<< 0.32) Description: construction script for the livecd rootfs livecd-rootfs provides the script used to create the root filesystem diff --git a/live-build/auto/build b/live-build/auto/build index 89e67875..41c887cd 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -21,8 +21,9 @@ PREFIX="livecd.$PROJECT${SUBARCH:+-$SUBARCH}" if [ "${IMAGEFORMAT:-}" = "ubuntu-image" ]; then # Use ubuntu-image instead of live-build + CHANNEL="${CHANNEL:-edge}" env SNAPPY_STORE_NO_CDN=1 \ - ubuntu-image -c edge $UBUNTU_IMAGE_ARGS \ + ubuntu-image -c "$CHANNEL" $UBUNTU_IMAGE_ARGS \ -o "$PREFIX".img "$PREFIX".model-assertion xz -0 -T4 "$PREFIX".img mv seed.manifest "$PREFIX".manifest @@ -42,7 +43,7 @@ preinstall_snaps() { chroot chroot sh -c " set -x; cd /var/lib/snapd/seed; - SNAPPY_STORE_NO_CDN=1 snap download \"$snap\"" + SNAPPY_STORE_NO_CDN=1 snap download \"${snap%/*}\"" done lb chroot_resolv remove @@ -55,12 +56,14 @@ snaps: file: ${CORE_SNAP} EOF for snap in "$@"; do + snap_name=${snap%/*} cat <> chroot/var/lib/snapd/seed/seed.yaml - - name: $snap + - name: ${snap_name} channel: stable EOF + case ${snap} in */classic) echo " classic: true" >> chroot/var/lib/snapd/seed/seed.yaml;; esac echo -n " file: " >> chroot/var/lib/snapd/seed/seed.yaml - (cd chroot/var/lib/snapd/seed; ls -1 ${snap}_*.snap) \ + (cd chroot/var/lib/snapd/seed; ls -1 ${snap_name}_*.snap) \ >> chroot/var/lib/snapd/seed/seed.yaml done @@ -367,40 +370,33 @@ deb file:/var/lib/preinstalled-pool/ $LB_DISTRIBUTION $LB_PARENT_ARCHIVE_AREAS rm chroot/etc/apt/sources.list.preinstall chroot/etc/apt/sources.list.orig fi case $PROJECT:$SUBPROJECT in - ubuntu-server:live|ubuntu-mate:*) - assertions_dir="chroot/var/lib/snapd/seed/assertions" - model_assertion="$assertions_dir/generic-classic.model" - account_key_assertion="$assertions_dir/generic.account-key" - account_assertion="$assertions_dir/generic.account" - - mkdir -p "$assertions_dir" - snap known --remote model series=16 \ - model=generic-classic brand-id=generic \ - > "$model_assertion" - account_key=$(sed -n -e's/sign-key-sha3-384: //p' \ - < "$model_assertion") - - snap known --remote account-key \ - public-key-sha3-384="$account_key" \ - > "$account_key_assertion" - account=$(sed -n -e's/account-id: //p' \ - < "$account_key_assertion") - - snap known --remote account account-id=generic \ - > "$account_assertion" - ;; - esac - - # FIXME: this should not be a hard-coded list in this script; this - # is an interim solution for 17.10. - case $PROJECT:$SUBPROJECT in - ubuntu-mate:*) - SNAP_LIST=pulsemixer + *) + if [ -e "config/seeded-snaps" ]; then + assertions_dir="chroot/var/lib/snapd/seed/assertions" + model_assertion="$assertions_dir/generic-classic.model" + account_key_assertion="$assertions_dir/generic.account-key" + account_assertion="$assertions_dir/generic.account" + + mkdir -p "$assertions_dir" + snap known --remote model series=16 \ + model=generic-classic brand-id=generic \ + > "$model_assertion" + account_key=$(sed -n -e's/sign-key-sha3-384: //p' \ + < "$model_assertion") + + snap known --remote account-key \ + public-key-sha3-384="$account_key" \ + > "$account_key_assertion" + account=$(sed -n -e's/account-id: //p' \ + < "$account_key_assertion") + + snap known --remote account account-id=generic \ + > "$account_assertion" + snap_list=$(cat config/seeded-snaps) + preinstall_snaps $snap_list + fi ;; esac - if [ -n "$SNAP_LIST" ]; then - preinstall_snaps $SNAP_LIST - fi if [ "$PROJECT" = "ubuntu-touch" ] || [ "$PROJECT" = "ubuntu-touch-custom" ]; then if [ "$ARCH" = "armhf" ]; then @@ -835,7 +831,7 @@ if [ "$NUMFLAVOURS" = 1 ] && [ "$LB_LINUX_FLAVOURS" != "none" ]; then fi fi -if [ "$SUBARCH" = "ac100" ] || [ "$SUBARCH" = "nexus7" ]; then +if [ "$SUBARCH" = "ac100" ]; then # create the md5sum and size files for which we are actually doing all this md5sum $PREFIX.rootfs.tar.gz >chroot/installer.md5 wc -c $PREFIX.rootfs.tar.gz >chroot/installer.size @@ -856,16 +852,6 @@ if [ "$SUBARCH" = "ac100" ] || [ "$SUBARCH" = "nexus7" ]; then # create boot.img Chroot chroot "abootimg --create /boot/installer-${KVERS}.img -f /boot/bootimg.cfg-$SUBARCH -r /boot/initrd.img-${KVERS} -k /boot/vmlinuz-${KVERS}" - if [ "$SUBARCH" = "nexus7" ]; then - # roll the android rootfs images - mkdir -p userdata - mv $PREFIX.rootfs.tar.gz userdata/rootfs.tar.gz - apt-get -y install android-tools-fsutils - make_ext4fs -l 6G -s $PREFIX.ext4-$FLAVOUR userdata/ - mv userdata/rootfs.tar.gz $PREFIX.rootfs.tar.gz - ln -sf "$PREFIX.ext4-$FLAVOUR" "$PREFIX.ext4" - fi - # clean up lb chroot_devpts remove "$@" lb chroot_sysfs remove "$@" diff --git a/live-build/auto/config b/live-build/auto/config index 2b542ace..1c762def 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -8,13 +8,6 @@ echo "Building on $(hostname --fqdn)" SEEDMIRROR=http://people.canonical.com/~ubuntu-archive/seeds/ if [ -z "$MIRROR" ]; then case $(hostname --fqdn) in - bld-*.mmjgroup.com) ;; - *.mmjgroup.com) - case $ARCH in - i386|amd64) MIRROR=http://archive.mmjgroup.com/ubuntu/ ;; - *) MIRROR=http://archive.mmjgroup.com/ubuntu-ports/ ;; - esac - ;; *.0c3.net) case $ARCH in i386|amd64) MIRROR=http://mirrors.0c3.net/ubuntu/ ;; @@ -24,12 +17,17 @@ if [ -z "$MIRROR" ]; then *.ubuntu.com) MIRROR=http://ftpmaster.internal/ubuntu/ SEEDMIRROR=http://archive-team.internal/seeds/ ;; - *.warthogs.hbd.com) MIRROR=http://ftpmaster.internal/ubuntu/ + *.buildd|lp-*) MIRROR=http://ftpmaster.internal/ubuntu/ SEEDMIRROR=http://archive-team.internal/seeds/ ;; - *.buildd) MIRROR=http://ftpmaster.internal/ubuntu/ + *.ppa|*.scalingstack) MIRROR=http://ftpmaster.internal/ubuntu/ SEEDMIRROR=http://archive-team.internal/seeds/ ;; + *) case $ARCH in + i386|amd64) MIRROR=http://archive.ubuntu.com/ubuntu/ ;; + *) MIRROR=http://ports.ubuntu.com/ubuntu-ports/ ;; + esac + ;; esac fi @@ -258,6 +256,68 @@ if [ "${SUBPROJECT:-}" = minimized ]; then OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal --linux-packages=linux-image" fi +# cribbed from cdimage, perhaps this should be a small helper script in germinate? +add_inheritance () { + case " $inherit " in + *" $1 "*) + ;; + *) + inherit="${inherit:+$inherit }$1" + ;; + esac +} + +expand_inheritance () { + for seed in $(grep "^$1:" config/germinate-output/structure | cut -d: -f2); do + expand_inheritance "$seed" + done + add_inheritance "$1" +} + +inheritance () { + inherit= + expand_inheritance "$1" + echo "$inherit" +} + +mkdir -p config/germinate-output +case $PROJECT in + kubuntu-active*) + SEED=kubuntu-active.$SUITE + ;; + kubuntu*) + SEED=kubuntu.$SUITE + ;; + xubuntu*) + SEED=xubuntu.$SUITE + ;; + ubuntu-mate*) + SEED=ubuntu-mate.$SUITE + ;; + lubuntu*) + SEED=lubuntu.$SUITE + ;; + ubuntu-budgie*) + SEED=ubuntu-budgie.$SUITE + ;; + ubuntukylin*) + SEED=ubuntukylin.$SUITE + ;; + ubuntustudio*) + SEED=ubuntustudio.$SUITE + ;; + *) + SEED=ubuntu.$SUITE + ;; +esac + +if ! [ -e config/germinate-output/structure ]; then + echo "Running germinate..." + (cd config/germinate-output && germinate --no-rdepends --no-installer \ + -S $SEEDMIRROR -m $MIRROR -d $SUITE -s $SEED \ + ${COMPONENTS:+-c "$COMPONENTS"} -a $ARCH) +fi + case $PROJECT in ubuntu|ubuntu-dvd) add_task install minimal standard ubuntu-desktop @@ -440,6 +500,9 @@ case $PROJECT in add_task install standard add_task install server LIVE_TASK='cloud-image' + case $ARCH in + amd64) add_package live linux-signed-generic ;; + esac ;; esac COMPONENTS='main' @@ -491,7 +554,8 @@ case $PROJECT in add_package install shim-signed ;; esac - OPTS="${OPTS:+$OPTS }--linux-packages=none --initramfs=none --initramfs-compression=none" + OPTS="${OPTS:+$OPTS }--linux-packages=none --initramfs=none" + INITRAMFS_COMPRESSION="none" # contains the framework definition add_package install ubuntu-core-libs @@ -587,6 +651,7 @@ case $PROJECT in OPTS="${OPTS:+$OPTS }--hdd-label=cloudimg-rootfs" OPTS="${OPTS:+$OPTS }--ext-resize-blocks=536870912 --ext-block-size=4096" OPTS="${OPTS:+$OPTS }--ext-fudge-factor=15" + INITRAMFS_COMPRESSION="gzip" ;; *) @@ -595,6 +660,40 @@ case $PROJECT in ;; esac +# we'll expand the base seed given here according to the STRUCTURE file, and +# then look in all of the seeds found to see which snaps are seeded +case $PROJECT:${SUBPROJECT:-} in + ubuntu:*|kubuntu*:*|lubuntu*:*|xubuntu*:*|ubuntu-mate*:*|ubuntustudio*:*|ubuntukylin*:*|ubuntu-budgie*:*) + BASE_SEED='desktop' + ;; + ubuntu-server:live) + BASE_SEED='server' + # subiquity is seeded but in a separate squashfs via hooks; set HOOK_SNAPS and ALL_SNAPS. + HOOK_SNAPS='subiquity' + ALL_SNAPS='' + ;; +esac + +if [ -n "${BASE_SEED}" ]; then + SEEDS_EXPANDED=$(inheritance ${BASE_SEED}) + for seed in ${SEEDS_EXPANDED}; do + echo "snap: considering ${seed}" + file=config/germinate-output/${seed}.snaps + [ -e "${file}" ] || continue + # extract the first column (snap package name) from germinate's output + # translate the human-readable "foo (classic)" into a + # more machine readable "foo/classic" + seed_snaps=$(sed -rn '1,/-----/d;/-----/,$d; s/(.*) \|.*/\1/; s, \(classic\),/classic,; p' "${file}") + for snap in ${seed_snaps}; do + echo "snap: found ${snap}" + ALL_SNAPS="${ALL_SNAPS:+${ALL_SNAPS} }${snap}" + done + done + if [ -n "${ALL_SNAPS}" ] || [ -n "${HOOK_SNAPS}" ]; then + echo "${ALL_SNAPS}" > config/seeded-snaps + fi +fi + export APT_OPTIONS if [ "$PREINSTALLED" != "true" ] && [ "$LIVE_TASK" ]; then @@ -646,16 +745,6 @@ case $ARCH in add_package live ac100-tarball-installer BINARY_REMOVE_LINUX=false ;; - nexus7) - COMPONENTS='main restricted universe multiverse' - add_package install zram-config abootimg - add_package install nvidia-tegra3 ubuntu-defaults-nexus7 - add_package live ac100-tarball-installer - BINARY_REMOVE_LINUX=false - mkdir -p config/preseed - echo "linux-firmware-nexus7 shared/nexus7_notice_accepted boolean true" >config/preseed/linux-firmware-nexus7.preseed.chroot - echo "d-i passwd/auto-login boolean true" >config/preseed/autologin.preseed.chroot - ;; raspi2) COMPONENTS='main restricted universe multiverse' add_package install linux-firmware-raspi2 u-boot-rpi flash-kernel u-boot-tools @@ -710,7 +799,7 @@ lb config noauto \ ${KERNEL_FLAVOURS:+--linux-flavours "$KERNEL_FLAVOURS"} \ --initsystem none \ --bootloader "$BOOTLOADER" \ - --initramfs-compression lzma \ + --initramfs-compression "${INITRAMFS_COMPRESSION:-lzma}" \ --cache false \ ${BOOTAPPEND_LIVE:+--bootappend-live "$BOOTAPPEND_LIVE"} \ $OPTS \ @@ -721,11 +810,6 @@ echo "SUBPROJECT=\"${SUBPROJECT:-}\"" >> config/chroot echo "LB_BINARY_HOOKS=\"$BINARY_HOOKS\"" >> config/binary echo "BUILDSTAMP=\"$NOW\"" >> config/binary echo "SUBPROJECT=\"${SUBPROJECT:-}\"" >> config/binary -if [ "${SUBPROJECT:-}" = minimized ]; then - # try building minimized images in a 1GiB image but still allow overriding - # IMAGE_SIZE in lb build - echo 'IMAGE_SIZE=${IMAGE_SIZE:-'$((1024*1024*1024))'}' >> config/binary -fi case $ARCH+$SUBARCH in armhf+raspi2) @@ -802,7 +886,7 @@ EOF ;; esac -if [ $PROJECT = ubuntu-server ] && [ ${SUBPROJECT:-} != live ]; then +if [ $PROJECT = ubuntu-server ] && [ "${SUBPROJECT:-}" != live ]; then cat > config/hooks/100-remove-fstab.chroot < "$SQUASH_ROOT/etc/systemd/system/$DEVICE_UNIT_NAME.d/override.conf" <