2010-02-20 12:18:57 -01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
2008-04-17 10:13:49 +00:00
|
|
|
|
2008-04-22 16:19:19 +00:00
|
|
|
# Static variables
|
2009-11-16 10:40:43 -01:00
|
|
|
DISTRIBUTIONS="${DISTRIBUTIONS:-lenny squeeze sid}"
|
2008-11-30 09:37:06 -01:00
|
|
|
FLAVOURS="${FLAVOURS:-standard rescue gnome-desktop kde-desktop lxde-desktop xfce-desktop}"
|
2009-12-13 19:17:45 -01:00
|
|
|
SOURCE="${SOURCE:-true}"
|
2008-04-17 10:13:49 +00:00
|
|
|
|
2010-01-31 15:33:15 -01:00
|
|
|
MIRROR="${MIRROR:-http://cdn.debian.net/debian/}"
|
|
|
|
MIRROR_SECURITY="${MIRROR_SECURITY:-http://security.debian.org/}"
|
2008-04-22 16:23:34 +00:00
|
|
|
|
2008-04-22 16:19:19 +00:00
|
|
|
# Dynamic variables
|
2008-04-21 21:22:46 +00:00
|
|
|
ARCHITECTURE="$(dpkg --print-architecture)"
|
2008-04-17 10:13:49 +00:00
|
|
|
DATE="$(date +%Y%m%d)"
|
|
|
|
|
2010-02-20 12:18:57 -01:00
|
|
|
Set_defaults ()
|
|
|
|
{
|
|
|
|
# Distribution defaults
|
|
|
|
APT_RECOMMENDS="true"
|
|
|
|
BINARY_INDICES="true"
|
|
|
|
DEBIAN_INSTALLER="live"
|
|
|
|
DEBIAN_INSTALLER_GUI="true"
|
|
|
|
PACKAGES="--packages live-installer-launcher"
|
|
|
|
TASKSEL="tasksel"
|
|
|
|
|
|
|
|
# Distribution specific options (ugly!)
|
|
|
|
case "${DISTRIBUTION}" in
|
|
|
|
lenny)
|
|
|
|
APT_RECOMMENDS="false"
|
|
|
|
BINARY_INDICES="true"
|
|
|
|
DEBIAN_INSTALLER="false"
|
|
|
|
PACKAGES=""
|
|
|
|
TASKSEL="aptitude"
|
|
|
|
|
|
|
|
case "${ARCHITECTURE}" in
|
|
|
|
amd64)
|
|
|
|
case "${FLAVOUR}" in
|
|
|
|
gnome-desktop)
|
|
|
|
BINARY_INDICES="false"
|
|
|
|
|
|
|
|
mkdir -p config/chroot_local-hooks
|
|
|
|
cd config/chroot_local-hooks
|
|
|
|
echo "apt-get remove --yes --purge openoffice.org-help-en-us" > package-removals
|
|
|
|
echo "apt-get remove --yes --purge epiphany-browser epiphany-browser-data epiphany-extensions epiphany-gecko" >> package-removals
|
|
|
|
echo "apt-get remove --yes --purge gnome-user-guide" >> package-removals
|
|
|
|
cd -
|
|
|
|
;;
|
|
|
|
|
|
|
|
kde-desktop)
|
|
|
|
BINARY_INDICES="false"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
|
|
|
|
i386)
|
|
|
|
case "${FLAVOUR}" in
|
|
|
|
gnome-desktop|kde-desktop)
|
|
|
|
BINARY_INDICES="false"
|
|
|
|
KERNEL="-k 686"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
|
|
|
|
squeeze)
|
|
|
|
DEBIAN_INSTALLER_GUI="false"
|
|
|
|
|
|
|
|
LIVE_INSTALLER="16"
|
|
|
|
LIVE_INITRAMFS="1.173.3-1"
|
|
|
|
|
|
|
|
mkdir -p config/binary_local-udebs
|
|
|
|
cd config/binary_local-udebs
|
|
|
|
wget -c http://live.debian.net/archive/packages/live-installer/${LIVE_INSTALLER}/live-installer_${LIVE_INSTALLER}.dsc
|
|
|
|
wget -c http://live.debian.net/archive/packages/live-installer/${LIVE_INSTALLER}/live-installer_${LIVE_INSTALLER}.tar.gz
|
|
|
|
wget -c http://live.debian.net/archive/packages/live-installer/${LIVE_INSTALLER}/live-installer_${LIVE_INSTALLER}_i386.udeb
|
|
|
|
cd -
|
|
|
|
|
|
|
|
mkdir -p config/chroot_local-packages
|
|
|
|
cd config/chroot_local-packages
|
|
|
|
wget -c http://live.debian.net/archive/packages/live-installer/${LIVE_INSTALLER}/live-installer_${LIVE_INSTALLER}.dsc
|
|
|
|
wget -c http://live.debian.net/archive/packages/live-installer/${LIVE_INSTALLER}/live-installer_${LIVE_INSTALLER}.tar.gz
|
|
|
|
wget -c http://live.debian.net/archive/packages/live-installer/${LIVE_INSTALLER}/live-installer-launcher_${LIVE_INSTALLER}_all.deb
|
|
|
|
wget -c http://live.debian.net/archive/packages/live-initramfs/${LIVE_INITRAMFS}/live-initramfs_${LIVE_INITRAMFS}.diff.gz
|
|
|
|
wget -c http://live.debian.net/archive/packages/live-initramfs/${LIVE_INITRAMFS}/live-initramfs_${LIVE_INITRAMFS}.dsc
|
|
|
|
wget -c http://live.debian.net/archive/packages/live-initramfs/${LIVE_INITRAMFS}/live-initramfs_${LIVE_INITRAMFS}_all.deb
|
|
|
|
wget -c http://live.debian.net/archive/packages/live-initramfs/${LIVE_INITRAMFS}/live-initramfs_$(echo ${LIVE_INITRAMFS} | awk -F- '{ print $1 }').orig.tar.gz
|
|
|
|
cd -
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
# Build images
|
2008-04-22 16:19:19 +00:00
|
|
|
for DISTRIBUTION in ${DISTRIBUTIONS}
|
2008-04-17 10:13:49 +00:00
|
|
|
do
|
|
|
|
rm -rf cache/stages*
|
|
|
|
|
2008-04-22 16:19:19 +00:00
|
|
|
for FLAVOUR in ${FLAVOURS}
|
2008-04-17 10:13:49 +00:00
|
|
|
do
|
|
|
|
if [ -e .stage ]
|
|
|
|
then
|
|
|
|
lh clean
|
|
|
|
fi
|
|
|
|
|
2010-02-20 12:18:57 -01:00
|
|
|
if [ -e config ]
|
2008-04-22 15:57:28 +00:00
|
|
|
then
|
2010-02-20 12:18:57 -01:00
|
|
|
rm -f config/* || true
|
|
|
|
rmdir --ignore-fail-on-non-empty config/* || true
|
2008-04-22 15:57:28 +00:00
|
|
|
fi
|
2008-04-17 10:13:49 +00:00
|
|
|
|
2010-02-20 12:18:57 -01:00
|
|
|
rm -rf cache/packages*
|
|
|
|
rm -rf cache/stages_rootfs
|
2008-04-17 10:13:49 +00:00
|
|
|
|
2010-02-20 12:18:57 -01:00
|
|
|
Set_defaults
|
|
|
|
|
|
|
|
lh config \
|
|
|
|
--apt-recommends ${APT_RECOMMENDS} \
|
|
|
|
--binary-indices ${BINARY_INDICES} \
|
|
|
|
--cache-stages "bootstrap rootfs" \
|
|
|
|
--debian-installer ${DEBIAN_INSTALLER} \
|
|
|
|
--debian-installer-gui ${DEBIAN_INSTALLER_GUI} \
|
|
|
|
--distribution ${DISTRIBUTION} \
|
|
|
|
--mirror-bootstrap ${MIRROR} \
|
|
|
|
--mirror-chroot ${MIRROR} \
|
|
|
|
--mirror-chroot-security ${MIRROR_SECURITY} \
|
|
|
|
${PACKAGES} \
|
|
|
|
--packages-lists ${FLAVOUR} \
|
|
|
|
--source ${SOURCE} \
|
|
|
|
--tasksel ${TASKSEL} ${KERNEL}
|
|
|
|
|
|
|
|
# TEMPORARY HACK until memtest86+ maintainers fixes his package
|
|
|
|
if [ ${FLAVOUR} = rescue ]
|
|
|
|
then
|
|
|
|
lh config --memtest none
|
2008-04-17 10:13:49 +00:00
|
|
|
fi
|
|
|
|
|
2009-02-14 16:01:55 -01:00
|
|
|
lh build 2>&1 | tee debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.iso.log
|
2008-04-17 10:13:49 +00:00
|
|
|
|
2010-02-20 12:18:57 -01:00
|
|
|
mv binary*.iso debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.iso
|
2008-04-21 21:22:46 +00:00
|
|
|
mv binary.list debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.iso.list
|
|
|
|
mv binary.packages debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.iso.packages
|
2008-04-22 15:57:28 +00:00
|
|
|
|
2009-12-13 19:17:45 -01:00
|
|
|
if [ "${SOURCE}" = "true" ]
|
2008-04-22 15:57:28 +00:00
|
|
|
then
|
2008-12-20 15:12:41 -01:00
|
|
|
mv source.tar.gz debian-live-${DISTRIBUTION}-source-${FLAVOUR}.tar.gz
|
|
|
|
mv source.list debian-live-${DISTRIBUTION}-source-${FLAVOUR}.tar.gz.list
|
2008-04-22 15:57:28 +00:00
|
|
|
fi
|
2008-04-17 10:13:49 +00:00
|
|
|
|
2010-02-20 12:18:57 -01:00
|
|
|
if [ "${DISTRIBUTION}" = "lenny" ]
|
|
|
|
then
|
|
|
|
lh clean --binary
|
|
|
|
lh config -binary-images usb-hdd
|
|
|
|
lh binary 2>&1 | tee debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.img.log
|
|
|
|
|
|
|
|
mv binary.img debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.img
|
|
|
|
mv binary.list debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.img.list
|
|
|
|
mv binary.packages debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.img.packages
|
|
|
|
fi
|
2008-04-17 10:13:49 +00:00
|
|
|
|
2010-02-20 12:18:57 -01:00
|
|
|
lh clean
|
|
|
|
rm -rf cache/stages_rootfs
|
|
|
|
lh config --binary-images net
|
2008-04-28 15:36:06 +00:00
|
|
|
|
2010-02-20 12:18:57 -01:00
|
|
|
lh build 2>&1 | tee debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}-net.tar.gz.log
|
2008-04-28 15:36:06 +00:00
|
|
|
|
2010-02-20 12:18:57 -01:00
|
|
|
mv binary-net.tar.gz debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}-net.tar.gz
|
|
|
|
mv binary.list debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}-net.tar.gz.list
|
|
|
|
mv binary.packages debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}-net.tar.gz.packages
|
2008-04-28 15:36:06 +00:00
|
|
|
|
2010-02-20 12:18:57 -01:00
|
|
|
mv binary/*/filesystem.squashfs debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.squashfs
|
2008-04-17 10:13:49 +00:00
|
|
|
done
|
|
|
|
done
|