From 82fe7a1d0e204e0f27332566f29789b89616c450 Mon Sep 17 00:00:00 2001 From: Adam Conrad Date: Fri, 15 Jul 2011 11:27:05 -0600 Subject: [PATCH] ubuntu-core, plain FS support, and minor fixes --- BuildLiveCD | 5 +++-- debian/changelog | 11 +++++++++++ live-build/auto/build | 20 ++++++++++++++++---- live-build/auto/config | 11 +++++++++++ 4 files changed, 41 insertions(+), 6 deletions(-) diff --git a/BuildLiveCD b/BuildLiveCD index 3d8b68e4..08cac9bd 100755 --- a/BuildLiveCD +++ b/BuildLiveCD @@ -1,6 +1,7 @@ #!/bin/bash BUILD_LOG=~/public_html/BuildLive.out ALWAYS_SEND_LOG=yes +LANG=C finish() { [ $? != "0" ] && STATUS="Failed" || STATUS="Successful" @@ -27,7 +28,7 @@ fi ARCH=$(dpkg --print-architecture) SUBARCH="" SUBARCHARG="" -NEWSUITE="natty" +NEWSUITE="oneiric" SUITES="" PROPOSED="" IMAGEFORMAT="" @@ -85,7 +86,7 @@ esac for arg in "$@"; do case "$arg" in - *ubuntu|*ubuntu-dvd|kubuntu-mobile|kubuntu-netbook|ubuntu-lpia|ubuntu-mid|ubuntu-umpc|ubuntu-mobile|ubuntu-netbook|ubuntu-moblin-remix|mythbuntu|base|tocd|ubuntu-headless|ubuntu-server) ;; + *ubuntu|*ubuntu-dvd|kubuntu-mobile|kubuntu-netbook|ubuntu-lpia|ubuntu-mid|ubuntu-umpc|ubuntu-mobile|ubuntu-netbook|ubuntu-moblin-remix|mythbuntu|base|tocd|ubuntu-headless|ubuntu-server|ubuntu-core) ;; *) echo "bad project: $arg" >&2 exit 2 diff --git a/debian/changelog b/debian/changelog index a14b084e..e118104e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +livecd-rootfs (2.16) oneiric; urgency=low + + * Add support for building new "ubuntu-core" rootfs tarballs: + - add project support to BuildLiveCD and auto/config + - make auto/config and auto/build deal with plain FS types + - add some logic to auto/build to not choke with no kernels + * Minor cleanups to BuildLiveCD (LANG=C, bump current suite) + * Fix one spot where I missed future-proofing ext4 support + + -- Adam Conrad Fri, 15 Jul 2011 11:19:49 -0600 + livecd-rootfs (2.15) oneiric; urgency=low * Support generating different binary image types using diff --git a/live-build/auto/build b/live-build/auto/build index 26b812ec..2d918568 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -53,23 +53,35 @@ case $LB_INITRAMFS in ;; esac -for OUTPUT in ext2 ext3 manifest manifest-remove size squashfs; do +for OUTPUT in ext2 ext3 ext4 manifest manifest-remove size squashfs; do [ -e "binary/$INITFS/filesystem.$OUTPUT" ] || continue ln "binary/$INITFS/filesystem.$OUTPUT" "$PREFIX.$OUTPUT" chmod 644 "$PREFIX.$OUTPUT" done +if [ -e "binary/$INITFS/filesystem.dir" ]; then + (cd "binary/$INITFS/filesystem.dir/" && tar -c *) | \ + gzip -9 --rsyncable > "$PREFIX.rootfs.tar.gz" + chmod 644 "$PREFIX.rootfs.tar.gz" +fi + # '--initramfs none' produces different manifest names. if [ -e "binary/$INITFS/filesystem.packages" ]; then ln "binary/$INITFS/filesystem.packages" "$PREFIX.manifest" chmod 644 "$PREFIX.manifest" fi if [ -e "binary/$INITFS/filesystem.packages-remove" ]; then - ln "binary/$INITFS/filesystem.packages-remove" "$PREFIX.manifest-remove" - chmod 644 "$PREFIX.manifest-remove" + # Not a typo, empty manifest-remove has a single LF in it. :/ + if [ $(cat binary/boot/filesystem.packages-remove | wc -c) -gt 1 ]; then + ln "binary/$INITFS/filesystem.packages-remove" "$PREFIX.manifest-remove" + chmod 644 "$PREFIX.manifest-remove" + fi fi for FLAVOUR in $LB_LINUX_FLAVOURS; do + if [ -z "$LB_LINUX_FLAVOURS" ] || [ "$LB_LINUX_FLAVOURS" = "none" ]; then + continue + fi KVERS="$( (cd "binary/$INITFS"; ls vmlinu?-*) | sed -n "s/^vmlinu.-\\([^-]*-[^-]*-$FLAVOUR\\)$/\\1/p" )" if [ -z "$KVERS" ]; then echo "No kernel output for $FLAVOUR!" >&2 @@ -89,7 +101,7 @@ for FLAVOUR in $LB_LINUX_FLAVOURS; do done NUMFLAVOURS="$(set -- $LB_LINUX_FLAVOURS; echo $#)" -if [ "$NUMFLAVOURS" = 1 ]; then +if [ "$NUMFLAVOURS" = 1 ] && [ "$LB_LINUX_FLAVOURS" != "none" ]; then # only one kernel flavour ln -sf "$PREFIX.kernel-$LB_LINUX_FLAVOURS" "$PREFIX.kernel" ln -sf "$PREFIX.initrd-$LB_LINUX_FLAVOURS" "$PREFIX.initrd" diff --git a/live-build/auto/config b/live-build/auto/config index 7da28618..b41fbc81 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -70,6 +70,10 @@ case $IMAGEFORMAT in esac ;; + plain) + OPTS="${OPTS:+$OPTS }--initramfs none --chroot-filesystem $IMAGEFORMAT" + ;; + *) add_package live lupin-casper ;; @@ -138,6 +142,13 @@ case $PROJECT in add_task install minimal standard ;; + ubuntu-core) + OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal" + OPTS="${OPTS:+$OPTS }--linux-packages=none" + KERNEL_FLAVOURS=none + BINARY_REMOVE_LINUX=false + ;; + *) echo "unknown project $PROJECT" >&2 exit 2