summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'helpers')
-rwxr-xr-xhelpers/lh_binary_chroot3
-rwxr-xr-xhelpers/lh_binary_usb-hdd57
-rwxr-xr-xhelpers/lh_bootstrap_cdebootstrap2
-rwxr-xr-xhelpers/lh_bootstrap_debootstrap2
-rwxr-xr-xhelpers/lh_chroot_hacks3
-rwxr-xr-xhelpers/lh_chroot_sources3
-rwxr-xr-xhelpers/lh_source_debian15
7 files changed, 69 insertions, 16 deletions
diff --git a/helpers/lh_binary_chroot b/helpers/lh_binary_chroot
index 6d13bad62..8bf612509 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 7a5055be2..af4048c9a 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 60ecade2b..31ffc7764 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 b4307a1ad..4c0fd6efc 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 cba544127..cc9b4319f 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 f4b14f597..9d255f9d1 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 4ec0a56bc..09ddd43d4 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