mirror of
https://git.launchpad.net/livecd-rootfs
synced 2026-02-18 07:53:29 +00:00
Imported using git-ubuntu import.
Changelog parent: d59199fe59fa2649ca5dccd2bc03df6de64d7274
New changelog entries:
* Now that grub-related diversions have been factored out in 2.466
instead of having bogus root=stuff arg generated in grub.cfg, it is
actually empty. Therefore update the sed command to make the arg in
the root= token optional. This should resolve non-booting livecd cpc
images.
[ Nishanth Aravamudan ]
* live-build/ubuntu-cpc/hooks/061-open-iscsi.chroot: generate iSCSI
Initiator Name at first iscsid run for cloud images to ensure it is
unique (LP: #1444992).
[ Steve Langasek ]
* Improve teardown_mountpoint to recursively find all submounts and
unmount them, instead of working from a hard-coded list. This makes
the code resilient against other submounts being added later, including
downstream. LP: #1721279.
* Also nuke the sleep / udevadm settle calls in the process, which should
never be required and slow down the builds.
* Fix a reference to an undefined variable in a script that's set -u.
* Use /bin/sh, not /bin/bash, for autopkgtest.
* debian/tests/default-bootstraps: minor adjustments to shell syntax,
syncing with artful where this originated.
[ Steve Langasek, Balint Reczey ]
* Introduce a new project-independent 'minimized' subproject
(LP: #1721261):
- omit ubuntu-minimal in favor of using only the minbase package set.
- boot directly by partuuid, avoiding the use of an initramfs.
- Bump needed live-build version which can build images without initrd
- drop man pages and most of the documentation from minimized images
(/usr/share/doc/*/copyright and changelog.Debian.gz files are still
kept)
- Add unminimize script for reverting minimization on a running system
- Mention unminimize script in motd
- Run autopkgtest for SUBPROJECT=minimized
- If we're using SUBPROJECT=minimized, and tzdata is not installed,
remove files that have been left behind. This is a workaround for a
bug that should be fixed in tzdata.
* Factor out grub-related diversions and use them consistently, so we
don't end up with wrong os-probe output in our grub.cfg.
[ Balint Reczey ]
* Mount using --make-rslave to ensure safe unmounts for rbind mounts
* When SUBPROJECT environment variable is not set assume it to be ""
97 lines
2.4 KiB
Bash
Executable File
97 lines
2.4 KiB
Bash
Executable File
#!/bin/sh
|
|
# autopkgtest check: Build default rootfs for all supported project:subproject pairs
|
|
# (C) 2017 Canonical Ltd.
|
|
# Author: Balint Reczey <balint.reczey@canonical.com>
|
|
|
|
set -e
|
|
|
|
if [ -z "$SUITE" ]; then
|
|
SUITE=$(lsb_release -c -s)
|
|
fi
|
|
|
|
# Known project:subproject:template combinations.
|
|
# Listed subprojects can be combined with other projects as well,
|
|
# but this list gives reasonable coverage.
|
|
ALL_TRIPLETS="
|
|
base::
|
|
edubuntu::
|
|
edubuntu-dvd::
|
|
kubuntu::
|
|
kubuntu-active::
|
|
kubuntu-dvd::
|
|
kubuntu-plasma5::
|
|
lubuntu::
|
|
lubuntu-next::
|
|
mythbuntu::
|
|
ubuntu::
|
|
ubuntu-base::
|
|
ubuntu-budgie::
|
|
ubuntu-budgie-desktop::
|
|
ubuntu-budgie-live::
|
|
ubuntu-core:system-image:ubuntu-core
|
|
ubuntu-cpc::ubuntu-cpc
|
|
ubuntu-cpc:minimized:ubuntu-cpc
|
|
ubuntu-desktop-next:system-image:ubuntu-desktop-next
|
|
ubuntu-desktop-next::ubuntu-desktop-next
|
|
ubuntu-dvd::
|
|
ubuntu-gnome::
|
|
ubuntukylin::
|
|
ubuntu-mate::
|
|
ubuntu-mate-core::
|
|
ubuntu-mate-desktop::
|
|
ubuntu-mate-live::
|
|
ubuntu-netbook::
|
|
ubuntu-server::
|
|
ubuntu-server:ubuntu-rtm:
|
|
ubuntu-server:ubuntu-rtm/foo:
|
|
ubuntu-server:wubi:
|
|
ubuntu-touch-custom::ubuntu-touch-custom
|
|
ubuntu-touch::ubuntu-touch
|
|
xubuntu::"
|
|
|
|
if [ -z "$SELECTED_TRIPLETS" ]; then
|
|
SELECTED_TRIPLETS="
|
|
ubuntu-base::
|
|
ubuntu-cpc::ubuntu-cpc
|
|
"
|
|
fi
|
|
|
|
live_build_rootfs() {
|
|
PROJECT=${1%%:*}
|
|
local SUBPROJECT_TMP=${1%:*}
|
|
SUBPROJECT=${SUBPROJECT_TMP#*:}
|
|
TEMPLATE=${1##*:}
|
|
ARCH=$(dpkg --print-architecture)
|
|
echo "Building rootfs for project: '$PROJECT' subproject: '$SUBPROJECT' template: '$TEMPLATE' in $PWD"
|
|
cp -a /usr/share/livecd-rootfs/live-build/auto .
|
|
if [ -n "$TEMPLATE" ]; then
|
|
cp -a /usr/share/livecd-rootfs/live-build/$TEMPLATE .
|
|
fi
|
|
env PROJECT=$PROJECT \
|
|
SUBPROJECT=$SUBPROJECT \
|
|
SUITE=$SUITE \
|
|
ARCH=$ARCH \
|
|
lb config
|
|
mkdir chroot
|
|
# this part needs root rights, but right now the whole script ran as root by autopkgtest
|
|
env PROJECT=$PROJECT \
|
|
SUBPROJECT=$SUBPROJECT \
|
|
ARCH=$ARCH \
|
|
lb build
|
|
echo "Build results for project: '$PROJECT' subproject: '$SUBPROJECT' template: '$TEMPLATE' in $PWD"
|
|
du -sh *
|
|
echo ""
|
|
}
|
|
|
|
WORKDIR=$(mktemp -d)
|
|
trap "RET=\$?; rm -rf $WORKDIR; exit \$RET" 0 INT QUIT ABRT PIPE TERM
|
|
cd $WORKDIR
|
|
|
|
for i in $SELECTED_TRIPLETS; do
|
|
mkdir $i
|
|
(cd $i && live_build_rootfs $i)
|
|
# clean up after build to avoid filling the disk, needs root rights
|
|
rm -rf $i
|
|
done
|
|
|