start live-build configuration

ubuntu/precise
Colin Watson 14 years ago
parent 94401729d8
commit d903b8b9af

2
debian/control vendored

@ -8,7 +8,7 @@ Vcs-Bzr: http://bazaar.launchpad.net/~ubuntu-core-dev/livecd-rootfs/trunk
Package: livecd-rootfs Package: livecd-rootfs
Architecture: all Architecture: all
Depends: ${misc:Depends}, debootstrap, rsync, python-minimal | python, procps, squashfs-tools (>= 1:3.3-1), grep-dctrl, fdupes, lsb-release, lzma, e2fsprogs Depends: ${misc:Depends}, debootstrap, rsync, python-minimal | python, procps, squashfs-tools (>= 1:3.3-1), grep-dctrl, fdupes, lsb-release, lzma, e2fsprogs, live-build
Suggests: partimage Suggests: partimage
Description: construction script for the livecd rootfs Description: construction script for the livecd rootfs
livecd-rootfs provides the script used to create the root filesystem livecd-rootfs provides the script used to create the root filesystem

1
debian/install vendored

@ -1 +1,2 @@
livecd.sh e2fs-zero.py usr/sbin livecd.sh e2fs-zero.py usr/sbin
live-build usr/share/livecd-rootfs

@ -0,0 +1,29 @@
#! /bin/sh
set -e
export LC_ALL=C
(
lb bootstrap "$@"
lb chroot "$@"
echo "===== Checking size of /usr/share/doc ====="
echo BEGIN docdirs
(cd chroot && find usr/share/doc -maxdepth 1 -type d | xargs du -s | sort -nr)
echo END docdirs
if which fdupes >/dev/null 2>&1; then
echo "===== Checking for duplicate files ====="
echo "first line: <total size for dupes> <different dupes> <all dupes>"
echo "data lines: <size for dupes> <number of dupes> <file size> <filename> [<filename> ...]"
echo BEGIN fdupes
(cd chroot \
&& fdupes --recurse --noempty --sameline --size --quiet usr \
| awk '/bytes each/ {s=$1} /^usr/ { n+=1; n2+=NF-1; sum+=s*(NF-1); print s*(NF-1), NF-1, s, $0 } END {print sum, n, n2}' \
| sort -nr
)
echo END fdupes
fi
lb binary "$@"
) 2>&1 | tee binary.log

@ -0,0 +1,7 @@
#! /bin/sh
set -e
lb clean noauto "$@"
rm -rf config
rm -f binary.manifest binary.manifest-desktop binary.log

@ -0,0 +1,153 @@
#! /bin/sh
set -e
MIRROR=
case $(hostname --fqdn) in
bld-*.mmjgroup.com) ;;
# TODO suffix is either ubuntu or ubuntu-ports
*.mmjgroup.com)
case $ARCH in
i386|amd64) MIRROR=http://archive.mmjgroup.com/ubuntu/ ;;
*) MIRROR=http://archive.mmjgroup.com/ubuntu-ports/ ;;
esac
;;
*.0c3.net) MIRROR=http://ftp.iinet.net.au/linux/ubuntu/ ;;
*.ubuntu.com) MIRROR=http://ftpmaster.internal/ubuntu/ ;;
*.warthogs.hbd.com) MIRROR=http://ftpmaster.internal/ubuntu/ ;;
*.buildd) MIRROR=http://ftpmaster.internal/ubuntu/ ;;
*) ;;
esac
OPTS=
PACKAGES=
TASKS=
LIVE_TASKS=
COMPONENTS=
BINARY_REMOVE_LINUX=true
case $IMAGEFORMAT in
ext2|ext3)
OPTS="${OPTS:+$OPTS }--initramfs none"
PACKAGES="${PACKAGES:+$PACKAGES }jasper"
;;
*)
PACKAGES="${PACKAGES:+$PACKAGES }lupin-casper"
;;
esac
case $PROJECT in
ubuntu|ubuntu-dvd)
TASKS='minimal standard ubuntu-desktop'
LIVE_TASKS='ubuntu-live'
;;
kubuntu|kubuntu-dvd)
TASKS='minimal standard kubuntu-desktop'
LIVE_TASKS='kubuntu-live'
;;
kubuntu-mobile)
TASKS='minimal standard kubuntu-mobile'
LIVE_TASKS='kubuntu-mobile-live'
COMPONENTS='main restricted universe'
;;
edubuntu|edubuntu-dvd)
TASKS='minimal standard edubuntu-desktop-gnome'
LIVE_TASKS='edubuntu-live'
COMPONENTS='main restricted universe'
;;
xubuntu)
TASKS='minimal standard xubuntu-desktop'
PACKAGES="${PACKAGES:+$PACKAGES }xterm"
LIVE_TASKS='edubuntu-live'
COMPONENTS='main restricted universe multiverse'
;;
ubuntu-netbook)
TASKS='minimal standard ubuntu-netbook'
LIVE_TASKS='netbook-live'
;;
mythbuntu)
TASKS='minimal standard mythbuntu-desktop'
LIVE_TASKS='mythbuntu-live'
COMPONENTS='main restricted universe multiverse'
;;
base)
TASKS='minimal standard'
;;
ubuntu-headless)
TASKS='minimal standard'
;;
*)
echo "unknown project $PROJECT" >&2
exit 2
;;
esac
case $PROJECT in
*-dvd)
LIVE_TASKS="${LIVE_TASKS:+$LIVE_TASKS }$PROJECT-live"
;;
esac
case $ARCH in
armel)
# TODO export FLASH_KERNEL_SKIP=1
KERNEL_FLAVOURS="$SUBARCH"
case $SUBARCH in
dove)
BINARY_REMOVE_LINUX=false
;;
omap)
PACKAGES="${PACKAGES:+$PACKAGES }x-loader-omap3-beagle u-boot-linaro-omap3-beagle"
BINARY_REMOVE_LINUX=false
;;
omap4)
PACKAGES="${PACKAGES:+$PACKAGES }x-loader-omap4-panda u-boot-linaro-omap4-panda"
BINARY_REMOVE_LINUX=false
;;
esac
;;
esac
lb config noauto \
--mode ubuntu \
--distribution "$SUITE" \
--bootstrap-keyring ubuntu-keyring \
--binary-images tar \
--binary-remove-linux "$BINARY_REMOVE_LINUX" \
--source false \
--build-with-chroot false \
${MIRROR:+--parent-mirror-bootstrap $MIRROR} \
${COMPONENTS:+--parent-archive-areas "$COMPONENTS"} \
--initsystem none \
--bootloader none \
--initramfs-compression lzma \
${PACKAGES:+--packages "$PACKAGES"} \
${TASKS:+--tasks "$TASKS"} \
${LIVE_TASKS:+--live-tasks "$LIVE_TASKS"} \
$OPTS
case $PROJECT in
kubuntu|kubuntu-mobile)
ln -s /usr/share/live/build/examples/hooks/kubuntu_chroot_icon-theme.sh config/chroot_local-hooks/
;;
esac
case $PROJECT in
*-dvd)
. config/bootstrap
cat > config/chroot_sources/dvd.binary << EOF
deb $LB_PARENT_MIRROR_BINARY $SUITE universe multiverse
deb $LB_PARENT_MIRROR_BINARY_SECURITY $SUITE-security universe multiverse
deb $LB_PARENT_MIRROR_BINARY_VOLATILE $SUITE-updates universe multiverse
EOF
;;
esac
Loading…
Cancel
Save