|
|
|
@ -254,6 +254,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
|
|
|
|
@ -487,7 +549,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
|
|
|
|
@ -583,6 +646,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"
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
*)
|
|
|
|
@ -591,6 +655,32 @@ 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 in
|
|
|
|
|
ubuntu|kubuntu*|lubuntu*|xubuntu*|ubuntu-mate*|ubuntustudio*|ubuntukylin*|ubuntu-budgie*)
|
|
|
|
|
BASE_SEED='desktop'
|
|
|
|
|
;;
|
|
|
|
|
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
|
|
|
|
|
echo "${ALL_SNAPS}" > config/seeded-snaps
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
export APT_OPTIONS
|
|
|
|
|
|
|
|
|
|
if [ "$PREINSTALLED" != "true" ] && [ "$LIVE_TASK" ]; then
|
|
|
|
@ -696,7 +786,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 \
|
|
|
|
@ -924,51 +1014,8 @@ case ${SUBPROJECT:-} in
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
# 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"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if [ "$PREINSTALLED" = "true" ]; then
|
|
|
|
|
if [ -n "$PREINSTALL_POOL_SEEDS" ]; then
|
|
|
|
|
mkdir -p config/germinate-output
|
|
|
|
|
case $PROJECT in
|
|
|
|
|
kubuntu-active*)
|
|
|
|
|
SEED=kubuntu-active.$SUITE
|
|
|
|
|
;;
|
|
|
|
|
kubuntu*)
|
|
|
|
|
SEED=kubuntu.$SUITE
|
|
|
|
|
;;
|
|
|
|
|
xubuntu*)
|
|
|
|
|
SEED=xubuntu.$SUITE
|
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
SEED=ubuntu.$SUITE
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
(cd config/germinate-output && germinate --no-rdepends --no-installer \
|
|
|
|
|
-S $SEEDMIRROR -m $MIRROR -d $SUITE -s $SEED \
|
|
|
|
|
${COMPONENTS:+-c "$COMPONENTS"} -a $ARCH)
|
|
|
|
|
|
|
|
|
|
UNWANTED_SEEDS="${LIVE_TASK:+$LIVE_TASK }boot installer required"
|
|
|
|
|
for i in $UNWANTED_SEEDS; do
|
|
|
|
|
UNWANTED_SEEDS="${UNWANTED_SEEDS:+$UNWANTED_SEEDS }$(inheritance $i)"
|
|
|
|
|