@ -31,7 +31,7 @@ if [ -z "$MIRROR" ]; then
esac
esac
fi
fi
mkdir -p config/task-lists config/ package-lists
mkdir -p config/package-lists
add_task ()
add_task ()
{
{
@ -40,7 +40,7 @@ add_task ()
local task
local task
for task; do
for task; do
echo "$task" >> "config/task-lists/livecd-rootfs.chroot_$pass.list "
echo "!chroot chroot apt-cache dumpavail | grep-dctrl -nsPackage -wFTask $task" >> "config/package-lists/livecd-rootfs.list.chroot_$pass "
done
done
}
}
@ -51,7 +51,7 @@ add_package ()
local pkg
local pkg
for pkg; do
for pkg; do
echo "$pkg" >> "config/package-lists/livecd-rootfs.chroot_$pass.list "
echo "$pkg" >> "config/package-lists/livecd-rootfs.list. chroot_$pass"
done
done
}
}
@ -67,6 +67,19 @@ PREINSTALLED=false
PREINSTALL_POOL=
PREINSTALL_POOL=
PREINSTALL_POOL_SEEDS=
PREINSTALL_POOL_SEEDS=
CHROOT_HOOKS=
BINARY_HOOKS=
add_chroot_hook ()
{
CHROOT_HOOKS="${CHROOT_HOOKS:+$CHROOT_HOOKS }$1"
}
add_binary_hook ()
{
BINARY_HOOKS="${BINARY_HOOKS:+$BINARY_HOOKS }$1"
}
case $IMAGEFORMAT in
case $IMAGEFORMAT in
ext2|ext3|ext4)
ext2|ext3|ext4)
OPTS="${OPTS:+$OPTS }--initramfs none --chroot-filesystem $IMAGEFORMAT"
OPTS="${OPTS:+$OPTS }--initramfs none --chroot-filesystem $IMAGEFORMAT"
@ -135,12 +148,14 @@ case $PROJECT in
add_task install minimal standard kubuntu-desktop
add_task install minimal standard kubuntu-desktop
LIVE_TASK='kubuntu-live'
LIVE_TASK='kubuntu-live'
COMPONENTS='main restricted universe'
COMPONENTS='main restricted universe'
add_chroot_hook remove-gnome-icon-cache
;;
;;
kubuntu-active)
kubuntu-active)
add_task install minimal standard kubuntu-active
add_task install minimal standard kubuntu-active
LIVE_TASK='kubuntu-active-live'
LIVE_TASK='kubuntu-active-live'
COMPONENTS='main restricted universe'
COMPONENTS='main restricted universe'
add_chroot_hook remove-gnome-icon-cache
;;
;;
edubuntu|edubuntu-dvd)
edubuntu|edubuntu-dvd)
@ -260,6 +275,37 @@ case $ARCH in
;;
;;
esac
esac
add_chroot_hook update-apt-file-cache
add_chroot_hook update-apt-xapian-index
add_chroot_hook update-mlocate-database
add_chroot_hook remove-dbus-machine-id
add_chroot_hook remove-openssh-server-host-keys
add_chroot_hook remove-udev-persistent-rules
case $PROJECT in
ubuntu-server)
;;
*)
add_chroot_hook remove-python-py
;;
esac
case $PROJECT in
ubuntu-server)
cat > config/hooks/100-remove-fstab.chroot <<EOF
#! /bin/sh
rm -f /etc/fstab
EOF
;;
esac
case $SUBPROJECT in
wubi)
add_binary_hook build-wubildr
;;
esac
lb config noauto \
lb config noauto \
--mode ubuntu \
--mode ubuntu \
--distribution "$SUITE" \
--distribution "$SUITE" \
@ -270,13 +316,16 @@ lb config noauto \
--build-with-chroot false \
--build-with-chroot false \
${MIRROR:+--parent-mirror-bootstrap $MIRROR} \
${MIRROR:+--parent-mirror-bootstrap $MIRROR} \
${COMPONENTS:+--parent-archive-areas "$COMPONENTS"} \
${COMPONENTS:+--parent-archive-areas "$COMPONENTS"} \
--package-lists non e \
--apt-source-archives fals e \
${KERNEL_FLAVOURS:+--linux-flavours "$KERNEL_FLAVOURS"} \
${KERNEL_FLAVOURS:+--linux-flavours "$KERNEL_FLAVOURS"} \
--initsystem none \
--initsystem none \
--bootloader "$BOOTLOADER" \
--bootloader "$BOOTLOADER" \
--initramfs-compression lzma \
--initramfs-compression lzma \
$OPTS
$OPTS
echo "LB_CHROOT_HOOKS=\"$CHROOT_HOOKS\"" >> config/chroot
echo "LB_BINARY_HOOKS=\"$BINARY_HOOKS\"" >> config/binary
if $BINARY_REMOVE_LINUX; then
if $BINARY_REMOVE_LINUX; then
cat > config/binary_rootfs/excludes << EOF
cat > config/binary_rootfs/excludes << EOF
boot/vmlinu?-*
boot/vmlinu?-*
@ -284,50 +333,27 @@ boot/initrd.img-*
EOF
EOF
fi
fi
if [ "$PROJECT" != ubuntu-server ]; then
ln -s /usr/share/live/build/examples/hooks/all_chroot_pyc-purge.sh config/chroot_local-hooks/
fi
case $PROJECT in
kubuntu|kubuntu-active)
ln -s /usr/share/live/build/examples/hooks/kubuntu_chroot_icon-theme.sh config/chroot_local-hooks/
;;
ubuntu-server)
cat > config/chroot_local-hooks/ubuntu-server_chroot_remove-fstab.sh <<EOF
#! /bin/sh
rm -f /etc/fstab
EOF
;;
esac
case $SUBPROJECT in
wubi)
ln -s /usr/share/live/build/examples/hooks/ubuntu_binary_build-wubildr.sh config/binary_local-hooks/
;;
esac
if [ "$PROPOSED" ]; then
if [ "$PROPOSED" ]; then
. config/bootstrap
. config/bootstrap
cat > config/archives/proposed.chroot.lis t << EOF
cat > config/archives/proposed.list.chroot << EOF
deb $LB_PARENT_MIRROR_BINARY_VOLATILE $SUITE-proposed $LB_PARENT_ARCHIVE_AREAS
deb $LB_PARENT_MIRROR_BINARY_VOLATILE $SUITE-proposed $LB_PARENT_ARCHIVE_AREAS
EOF
EOF
cp -a config/archives/proposed.chroot.lis t \
cp -a config/archives/proposed.list.chroot \
config/archives/proposed.binary.list
config/archives/proposed.list.binary
fi
fi
case $PROJECT in
case $PROJECT in
*-dvd)
*-dvd)
. config/bootstrap
. config/bootstrap
cat > config/archives/dvd.binary.list << EOF
cat > config/archives/dvd.list.binary << EOF
deb $LB_PARENT_MIRROR_BINARY $SUITE universe multiverse
deb $LB_PARENT_MIRROR_BINARY $SUITE universe multiverse
deb $LB_PARENT_MIRROR_BINARY_SECURITY $SUITE-security universe multiverse
deb $LB_PARENT_MIRROR_BINARY_SECURITY $SUITE-security universe multiverse
deb $LB_PARENT_MIRROR_BINARY_VOLATILE $SUITE-updates universe multiverse
deb $LB_PARENT_MIRROR_BINARY_VOLATILE $SUITE-updates universe multiverse
EOF
EOF
if [ "$PROPOSED" ]; then
if [ "$PROPOSED" ]; then
cat >> config/archives/dvd.binary.list << EOF
cat >> config/archives/dvd.list.binary << EOF
deb $LB_PARENT_MIRROR_BINARY_VOLATILE $SUITE-proposed universe multiverse
deb $LB_PARENT_MIRROR_BINARY_VOLATILE $SUITE-proposed universe multiverse
EOF
EOF
fi
fi
@ -412,10 +438,11 @@ if [ "$PREINSTALLED" = "true" ]; then
wget $MIRROR/indices/override.$SUITE.extra.$component \
wget $MIRROR/indices/override.$SUITE.extra.$component \
)
)
done
done
PREINSTALL_POOL_HOOK=config/chroot_local-hooks/preinstall-pool.sh
cat > config/hooks/100-preinstall-pool.chroot <<EOF
echo "#! /bin/sh" > $PREINSTALL_POOL_HOOK
#! /bin/sh
echo "mkdir -p /var/lib/preinstalled-pool/pool/" >> $PREINSTALL_POOL_HOOK
mkdir -p /var/lib/preinstalled-pool/pool/
echo "cd /var/lib/preinstalled-pool/pool/" >> $PREINSTALL_POOL_HOOK
cd /var/lib/preinstalled-pool/pool/
echo "apt-get -y download $PREINSTALL_POOL" >> $PREINSTALL_POOL_HOOK
apt-get -y download $PREINSTALL_POOL
EOF
fi
fi
fi
fi