diff options
author | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:05:16 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 18:22:26 +0100 |
commit | c68c0a270832ca340429878ce6a0ab606d435b06 (patch) | |
tree | 8f9a4286b138ca2768a724594ad4219bf30f6167 /helpers | |
parent | f314791fa2fa3e6a557ca50ecb4a0cf7798fee79 (diff) | |
download | live-build-c68c0a270832ca340429878ce6a0ab606d435b06.zip live-build-c68c0a270832ca340429878ce6a0ab606d435b06.tar.gz |
Adding live-helper 1.0~a21-1.
Diffstat (limited to 'helpers')
-rwxr-xr-x | helpers/lh_binary_chroot | 3 | ||||
-rwxr-xr-x | helpers/lh_binary_usb-hdd | 57 | ||||
-rwxr-xr-x | helpers/lh_bootstrap_cdebootstrap | 2 | ||||
-rwxr-xr-x | helpers/lh_bootstrap_debootstrap | 2 | ||||
-rwxr-xr-x | helpers/lh_chroot_hacks | 3 | ||||
-rwxr-xr-x | helpers/lh_chroot_sources | 3 | ||||
-rwxr-xr-x | helpers/lh_source_debian | 15 |
7 files changed, 69 insertions, 16 deletions
diff --git a/helpers/lh_binary_chroot b/helpers/lh_binary_chroot index 6d13bad..8bf6125 100755 --- a/helpers/lh_binary_chroot +++ b/helpers/lh_binary_chroot @@ -33,7 +33,6 @@ Read_conffile config/source Set_defaults Echo_message "Begin copying chroot..." -Echo_message "This may take a while." # Requiring stage file Require_stagefile .stage/bootstrap @@ -63,6 +62,8 @@ then exit 0 fi +Echo_message "This may take a while." + # Removing old chroot ${LH_ROOT_COMMAND} rm -rf chroot/chroot ${LH_ROOT_COMMAND} rm -rf chroot.tmp diff --git a/helpers/lh_binary_usb-hdd b/helpers/lh_binary_usb-hdd index 7a5055b..af4048c 100755 --- a/helpers/lh_binary_usb-hdd +++ b/helpers/lh_binary_usb-hdd @@ -54,7 +54,7 @@ Create_lockfile .lock # Checking depends Check_package chroot/sbin/mkdosfs dosfstools -Check_package chroot/usr/sbin/mtools mtools +Check_package chroot/usr/share/doc/mtools mtools Check_package chroot/sbin/parted parted case "${LIVE_BOOTLOADER}" in @@ -94,21 +94,48 @@ fi echo "!!! The following error/warning messages can be ignored !!!" lh_losetup $FREELO chroot/binary.img 0 -Chroot "parted -s ${FREELO} mklabel msdos" || true -Chroot "parted -s ${FREELO} mkpartfs primary fat16 0.0 100%" || true -Chroot "parted -s ${FREELO} set 1 boot on" || true -Chroot "parted -s ${FREELO} set 1 lba off" || true -if [ "${LIVE_BOOTLOADER}" = "syslinux" ] -then - cat chroot/usr/lib/syslinux/mbr.bin > ${FREELO} -fi +case "${LIVE_CHROOT_BUILD}" in + enabled) + Chroot "parted -s ${FREELO} mklabel msdos" || true + Chroot "parted -s ${FREELO} mkpartfs primary fat16 0.0 100%" || true + Chroot "parted -s ${FREELO} set 1 boot on" || true + Chroot "parted -s ${FREELO} set 1 lba off" || true + + if [ "${LIVE_BOOTLOADER}" = "syslinux" ] + then + cat chroot/usr/lib/syslinux/mbr.bin > ${FREELO} + fi + ;; + + disabled) + parted -s ${FREELO} mklabel msdos || true + parted -s ${FREELO} mkpartfs primary fat16 0.0 100% || true + parted -s ${FREELO} set 1 boot on || true + parted -s ${FREELO} set 1 lba off || true + + if [ "${LIVE_BOOTLOADER}" = "syslinux" ] + then + cat /usr/lib/syslinux/mbr.bin > ${FREELO} + fi + ;; +esac ${LH_LOSETUP} -d ${FREELO} FREELO="`${LH_LOSETUP} -f`" lh_losetup $FREELO chroot/binary.img 1 -Chroot " mkfs.vfat -F 16 -n DEBIAN_LIVE ${FREELO}" + +case "${LIVE_CHROOT_BUILD}" in + enabled) + Chroot "mkfs.vfat -F 16 -n DEBIAN_LIVE ${FREELO}" + ;; + + disabled) + mkfs.vfat -F 16 -n DEBIAN_LIVE ${FREELO} + ;; +esac + mkdir -p chroot/binary.tmp ${LH_ROOT_COMMAND} mount ${FREELO} chroot/binary.tmp cp -rL binary/* chroot/binary.tmp @@ -149,7 +176,15 @@ rmdir chroot/binary.tmp if [ "${LIVE_BOOTLOADER}" = "syslinux" ] then - Chroot "syslinux ${FREELO}" + case "${LIVE_CHROOT_BUILD}" in + enabled) + Chroot "syslinux ${FREELO}" + ;; + + disabled) + syslinux ${FREELO} + ;; + esac fi ${LH_LOSETUP} -d ${FREELO} diff --git a/helpers/lh_bootstrap_cdebootstrap b/helpers/lh_bootstrap_cdebootstrap index 60ecade..31ffc77 100755 --- a/helpers/lh_bootstrap_cdebootstrap +++ b/helpers/lh_bootstrap_cdebootstrap @@ -39,6 +39,8 @@ fi Echo_message "Begin bootstrapping system..." +Check_package /usr/bin/cdebootstrap cdebootstrap + # Ensure that a system is built as root lh_testroot diff --git a/helpers/lh_bootstrap_debootstrap b/helpers/lh_bootstrap_debootstrap index b4307a1..4c0fd6e 100755 --- a/helpers/lh_bootstrap_debootstrap +++ b/helpers/lh_bootstrap_debootstrap @@ -39,6 +39,8 @@ fi Echo_message "Begin bootstrapping system..." +Check_package /usr/sbin/debootstrap debootstrap + # Ensure that a system is built as root lh_testroot diff --git a/helpers/lh_chroot_hacks b/helpers/lh_chroot_hacks index cba5441..cc9b431 100755 --- a/helpers/lh_chroot_hacks +++ b/helpers/lh_chroot_hacks @@ -86,9 +86,6 @@ Chroot "update-initramfs -k all -t -u" # Remove build systems clock drift echo "0.0 0 0.0" > chroot/etc/adjtime -# Remove generated xorg.conf based on build systems configuration -rm -f chroot/etc/X11/xorg.conf - # Remove cruft rm -f chroot/boot/initrd*bak* rm -f /etc/apt/trusted.gpg~ diff --git a/helpers/lh_chroot_sources b/helpers/lh_chroot_sources index f4b14f5..9d255f9 100755 --- a/helpers/lh_chroot_sources +++ b/helpers/lh_chroot_sources @@ -217,6 +217,9 @@ case "${1}" in if [ "${LIVE_MIRROR_BOOTSTRAP}" = "${LIVE_MIRROR_BINARY}" ] && \ [ "${LIVE_MIRROR_BOOTSTRAP_SECURITY}" = "${LIVE_MIRROR_BINARY_SECURITY}" ] then + # Removing stage file + rm -f .stage/chroot_sources + exit 0 fi diff --git a/helpers/lh_source_debian b/helpers/lh_source_debian index 4ec0a56..09ddd43 100755 --- a/helpers/lh_source_debian +++ b/helpers/lh_source_debian @@ -60,7 +60,20 @@ fi # Download sources Chroot "dpkg --get-selections" | awk '{ print $1 }' > chroot/root/dpkg-selection.txt echo "${LIVE_BOOTLOADER}" >> chroot/root/dpkg-selection.txt -#echo "live-helper" >> chroot/root/dpkg-selection.txt + +echo -e "live-helper\n${LH_INITRAMFS}" >> chroot/root/dpkg-selection.txt +echo -e "dosfstools\n${LH_GENISOIMAGE}\nparted\nsquashfs-tools\ngenext2fs" >> chroot/root/dpkg-selection.txt + +case "${LIVE_ARCHITECTURE}" in + amd64|i386) + echo -e "${LIVE_MEMTEST}\nmtools\nsyslinux\ngrub" >> chroot/root/dpkg-selection.txt + ;; + + powerpc) + echo -e "yaboot" >> chroot/root/dpkg-selection.txt + ;; +esac + Chroot "xargs --arg-file=/root/dpkg-selection.txt apt-get source --download-only" rm -f chroot/root/dpkg-selection.txt |