diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2013-05-06 14:48:46 +0200 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2013-05-06 14:48:46 +0200 |
commit | d1047e809a90daa0e88329efc0db21931be0b919 (patch) | |
tree | 5dc92aaaeb4d15dcad4796935b90a9675be93ad5 /scripts | |
parent | 160d6bade79bf58a1c0d1842dc9b55ec178ec303 (diff) | |
download | vyos-live-build-d1047e809a90daa0e88329efc0db21931be0b919.tar.gz vyos-live-build-d1047e809a90daa0e88329efc0db21931be0b919.zip |
Adding debian version 4.0~a1-1.debian/4.0_a1-1
Diffstat (limited to 'scripts')
68 files changed, 659 insertions, 971 deletions
diff --git a/scripts/build.sh b/scripts/build.sh index 78d3d1a68..21ff520d8 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,45 +1,16 @@ #!/bin/sh -## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> -## -## This program is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program. If not, see <http://www.gnu.org/licenses/>. -## -## The complete text of the GNU General Public License -## can be found in /usr/share/common-licenses/GPL-3 file. - - -set -e - if [ -e local/live-build ] then LIVE_BUILD="${LIVE_BUILD:-${PWD}/local/live-build}" export LIVE_BUILD fi -for _DIRECTORY in "${LIVE_BUILD}/functions" /usr/share/live/build/functions +# Source global functions +for FUNCTION in "${LIVE_BUILD}"/functions/*.sh /usr/share/live/build/functions/*.sh do - if [ -e "${_DIRECTORY}" ] + if [ -e "${FUNCTION}" ] then - for _FILE in "${_DIRECTORY}"/*.sh - do - if [ -e "${_FILE}" ] - then - . "${_FILE}" - fi - done - - break + . "${FUNCTION}" fi done diff --git a/scripts/build/binary b/scripts/build/binary index 8b218c45d..5098e429d 100755 --- a/scripts/build/binary +++ b/scripts/build/binary @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/binary_checksums b/scripts/build/binary_checksums index a19f16230..244ee1439 100755 --- a/scripts/build/binary_checksums +++ b/scripts/build/binary_checksums @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -43,15 +43,7 @@ Create_lockfile .lock for CHECKSUM in ${LB_CHECKSUMS} do - case "${LB_MODE}" in - progress-linux) - CHECKSUMS="$(echo ${CHECKSUM} | tr [a-z] [A-Z])SUMS" - ;; - - *) - CHECKSUMS="${CHECKSUM}sum.txt" - ;; - esac + CHECKSUMS="$(echo ${CHECKSUM} | tr [a-z] [A-Z])SUMS" Echo_message "Begin creating binary ${CHECKSUMS}..." @@ -68,11 +60,10 @@ do \! -path './boot/boot.bin' \ \! -path './boot/grub/stage2_eltorito' \ \! -path './*SUMS' \ - \! -path './*sum.txt' \ -print0 | sort -z | xargs -0 ${CHECKSUM}sum > ../${CHECKSUMS} cat > ${CHECKSUMS} << EOF -## This file contains the list of ${CHECKSUM} checksums of all files on this +## This file contains the list of ${CHECKSUM} checksums of all fileson this ## medium. ## ## You can verify them automatically with the 'verify-checksums' boot parameter, diff --git a/scripts/build/binary_chroot b/scripts/build/binary_chroot index 87986c0a7..598fff5fc 100755 --- a/scripts/build/binary_chroot +++ b/scripts/build/binary_chroot @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -85,7 +85,7 @@ ${LB_ROOT_COMMAND} rm -rf chroot/chroot ${LB_ROOT_COMMAND} rm -rf chroot.tmp # Copying new chroot -if [ -d cache/bootstrap ] && [ "${LB_CHROOT_FILESYSTEM}" != "none" ] && [ "${LB_CHROOT_FILESYSTEM}" != "plain" ] +if [ -d cache/bootstrap ] && [ "${LB_CHROOT_FILESYSTEM}" != "none" ] then ${LB_ROOT_COMMAND} mv chroot chroot.tmp ${LB_ROOT_COMMAND} cp -a cache/bootstrap chroot diff --git a/scripts/build/binary_debian-installer b/scripts/build/binary_debian-installer index 463d70f43..43d4ad762 100755 --- a/scripts/build/binary_debian-installer +++ b/scripts/build/binary_debian-installer @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -339,16 +339,10 @@ then case "${LB_ARCHITECTURES}" in amd64) - DI_REQ_PACKAGES="lilo grub-pc" - - case "${LB_DISTRIBUTION}" in - squeeze) - DI_REQ_PACAKGES="${DI_REQ_PACKAGES} grub" - ;; - esac + DI_REQ_PACKAGES="lilo grub grub-pc" case "${LB_MODE}" in - ubuntu) + ubuntu|kubuntu) DI_PACKAGES="${DI_REQ_PACKAGES} linux-generic" ;; @@ -359,21 +353,14 @@ then ;; i386) - DI_REQ_PACKAGES="elilo lilo grub-pc" - - case "${LB_DISTRIBUTION}" in - squeeze) - DI_REQ_PACAKGES="${DI_REQ_PACKAGES} grub" - ;; - esac + DI_REQ_PACKAGES="elilo lilo grub grub-pc" case "${LB_MODE}" in - ubuntu) + ubuntu|kubuntu) case "${LB_DISTRIBUTION}" in precise) DI_PACKAGES="${DI_REQ_PACKAGES} linux-generic-pae" ;; - *) DI_PACKAGES="${DI_REQ_PACKAGES} linux-generic" ;; @@ -389,7 +376,7 @@ then sparc) DI_REQ_PACKAGES="silo" case "${LB_MODE}" in - ubuntu) + ubuntu|kubuntu) DI_PACKAGES="${DI_REQ_PACKAGES} linux-sparc64" ;; @@ -402,8 +389,8 @@ then powerpc) DI_REQ_PACKAGES="yaboot" case "${LB_MODE}" in - ubuntu) - DI_PACKAGES="${DI_REQ_PACKAGES} linux-image-powerpc-smp linux-image-powerpc64-smp linux-image-powerpc-e500 linux-image-powerpc-e500mc" + ubuntu|kubuntu) + DI_PACKAGES="${DI_REQ_PACKAGES} linux-image-powerpc-smp linux-image-powerpc64-smp" ;; *) @@ -431,7 +418,7 @@ then FIRMWARE_PACKAGES="" - if [ "${LB_PARENT_DISTRIBUTION}" = "squeeze" ] + if [ "${LB_MODE}" = "ubuntu" ] || [ "${LB_MODE}" = "kubuntu" ] then _CONTENTS="${LB_PARENT_MIRROR_CHROOT}/dists/${LB_PARENT_DISTRIBUTION}/Contents-${LB_ARCHITECTURES}.gz" else @@ -458,7 +445,7 @@ then then # FIXME: account for the fact that PARENT_DISTRIBUTION and DISTRIBUTION might be the same (to not have overlapping cache files for contents). - if [ "${_PARENT_DISTRIBUTION}" = "squeeze" ] + if [ "${LB_MODE}" = "ubuntu" ] || [ "${LB_MODE}" = "kubuntu" ] then _CONTENTS="${LB_MIRROR_CHROOT}/dists/${LB_DISTRIBUTION}/Contents-${LB_ARCHITECTURES}.gz" else @@ -475,35 +462,6 @@ then done fi - if [ "${LB_PARENT_DISTRIBUTION}" = "squeeze" ] - then - # Filter out contrib packages if contrib is not enabled - if ! echo ${LB_ARCHIVE_AREAS} | grep -qs contrib - then - _FIRMWARE_PACKAGES="" - - for _PACKAGE in ${FIRMWARE_PACKAGES} - do - _FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES} $(echo ${_PACKAGE} | sed -e 's|^contrib/.*$||')" - done - - FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES}" - fi - - # Filter out non-free packages if non-free is not enabled - if ! echo ${LB_ARCHIVE_AREAS} | grep -qs non-free - then - _FIRMWARE_PACKAGES="" - - for _PACKAGE in ${FIRMWARE_PACKAGES} - do - _FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES} $(echo ${_PACKAGE} | sed -e 's|^non-free/.*$||')" - done - - FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES}" - fi - fi - # Drop section and keep package names only for _PACKAGE in ${FIRMWARE_PACKAGES} do @@ -523,24 +481,33 @@ then # d-i does not support (for example) re-installing grub from target/ - the grub # .debs must actually exist. - # Download .debs of the required packages - Chroot chroot ${_LB_APT_COMMAND} install ${DI_PACKAGES} ${DI_FIRMWARE_PACKAGES} ${DI_REQ_PACKAGES} - - # Drop the packages already installed that d-i doesn't explicitely need - _REMAINING_PACKAGES="$(echo ${DI_FIRMWARE_PACKAGES} ${DI_REQ_PACKAGES} | sed -e 's# #|#g')" - _REMAINING_PACKAGES="$(sed -n -e 's|Package: ||p' chroot/var/lib/dpkg/status.tmp | grep -E -v \"^${_REMAINING_PACKAGES}$\")" - - for _PACKAGE in ${_REMAINING_PACKAGES} + # Modify dpkg status to show the required packages are not installed. + cp chroot/var/lib/dpkg/status.tmp chroot/var/lib/dpkg/status + for PACKAGE in ${DI_REQ_PACKAGES} do - rm -f "chroot/binary.deb/archives/${_PACKAGE}_*.deb" + awk -v f=0 ' + f == 1 { print "Status: purge ok not-installed"; f=0; next } + /Package: '"${PACKAGE}"'/ { f=1; } + { print } + ' chroot/var/lib/dpkg/status > chroot/var/lib/dpkg/status.awk + mv chroot/var/lib/dpkg/status.awk chroot/var/lib/dpkg/status done + + # Download .deb's that we just marked as "purged" which caused broken dependencies + Chroot chroot ${_LB_APT_COMMAND} -f dist-upgrade + + # Revert dpkg status file + mv chroot/var/lib/dpkg/status.tmp chroot/var/lib/dpkg/status + + # Download .debs of the required packages + Chroot chroot ${_LB_APT_COMMAND} install ${DI_PACKAGES} ${DI_FIRMWARE_PACKAGES} ${DI_REQ_PACKAGES} else # Download .debs of the required packages Chroot chroot ${_LB_APT_COMMAND} install ${DI_PACKAGES} ${DI_FIRMWARE_PACKAGES} - fi - # Revert dpkg status file - mv chroot/var/lib/dpkg/status.tmp chroot/var/lib/dpkg/status + # Revert dpkg status file + mv chroot/var/lib/dpkg/status.tmp chroot/var/lib/dpkg/status + fi mv chroot/binary.deb ./ @@ -623,7 +590,7 @@ then do for _FILE in $(find ../pool -name "${_PACKAGE}_*.deb") do - ln -sf ${_FILE} ./ + ln -s ${_FILE} ./ done done @@ -804,16 +771,7 @@ EOF rm -f chroot/binary.sh mv chroot/root/binary ./ - case "${LB_PARENT_DISTRIBUTION}" in - wheezy) - DISTRIBUTIONS="stable" - ;; - - *) - - DISTRIBUTIONS="stable testing unstable" - ;; - esac + DISTRIBUTIONS="stable testing unstable" if [ "${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}" != "${LB_PARENT_DISTRIBUTION}" ] then @@ -908,22 +866,6 @@ then fi fi -case "${LB_MODE}" in - progress-linux) - mv binary/install binary/installer - - rm -f binary/debian - - for _DIRECTORY in dists pool project firmware - do - if [ -e "${_DIRECTORY}" ] - then - mv binary/"${_DIRECTORY}" binary/installer - fi - done - ;; -esac - # Saving cache Save_cache cache/packages.binary diff --git a/scripts/build/binary_disk b/scripts/build/binary_disk index 105f35915..c71338a90 100755 --- a/scripts/build/binary_disk +++ b/scripts/build/binary_disk @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -66,6 +66,12 @@ case "${LB_MODE}" in TRACE="" ;; + kubuntu) + TITLE="Kubuntu" + STRING="Build ${ARCHITECTURE}" + TRACE="" + ;; + progress-linux) TITLE="Progress Linux" STRING="${VERSION} (${DISTRIBUTION}) - ${ARCHITECTURE}" diff --git a/scripts/build/binary_grub b/scripts/build/binary_grub index 96e31759d..cef3da768 100755 --- a/scripts/build/binary_grub +++ b/scripts/build/binary_grub @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/binary_grub2 b/scripts/build/binary_grub2 index 85e3c830e..1b77523d1 100755 --- a/scripts/build/binary_grub2 +++ b/scripts/build/binary_grub2 @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/binary_hdd b/scripts/build/binary_hdd index e7b5e1d76..efa0d9909 100755 --- a/scripts/build/binary_hdd +++ b/scripts/build/binary_hdd @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -50,15 +50,7 @@ case "${LB_BINARY_FILESYSTEM}" in ;; ntfs) - case "${LB_PARENT_DISTRIBUTION}" in - squeeze) - Check_package chroot/sbin/mkfs.ntfs ntfsprogs - ;; - - *) - Check_package chroot/sbin/mkfs.nfts ntfs-3g - ;; - esac + Check_package chroot/sbin/mkfs.nfts ntfs-3g ;; esac @@ -175,7 +167,7 @@ esac case "${LB_BUILD_WITH_CHROOT}" in true) Chroot chroot "parted -s ${FREELO} mklabel ${PARTITION_TABLE_TYPE}" || true - Chroot chroot "parted -s ${FREELO} mkpart primary ${PARTITION_TYPE} 0% 100%" || true + Chroot chroot "parted -s ${FREELO} mkpart primary ${PARTITION_TYPE} 0.0 100%" || true Chroot chroot "parted -s ${FREELO} set 1 boot on" || true Chroot chroot "parted -s ${FREELO} set 1 lba off" || true @@ -187,7 +179,7 @@ case "${LB_BUILD_WITH_CHROOT}" in false) parted -s ${FREELO} mklabel ${PARTITION_TABLE_TYPE} || true - parted -s ${FREELO} mkpart primary ${PARTITION_TYPE} 0% 100% || true + parted -s ${FREELO} mkpart primary ${PARTITION_TYPE} 0.0 100% || true parted -s "${FREELO}" set 1 boot on || true parted -s "${FREELO}" set 1 lba off || true diff --git a/scripts/build/binary_hooks b/scripts/build/binary_hooks index c3ff6bafb..8015e7b3d 100755 --- a/scripts/build/binary_hooks +++ b/scripts/build/binary_hooks @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/binary_includes b/scripts/build/binary_includes index 405b59f69..f1f345a95 100755 --- a/scripts/build/binary_includes +++ b/scripts/build/binary_includes @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/binary_iso b/scripts/build/binary_iso index d804d7222..d9a277379 100755 --- a/scripts/build/binary_iso +++ b/scripts/build/binary_iso @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -53,25 +53,12 @@ Check_lockfile .lock Create_lockfile .lock # Checking depends -case "${LB_PARENT_DISTRIBUTION}" in - squeeze) - Check_package chroot/usr/bin/genisoimage genisoimage - - if [ "${LB_BINARY_IMAGES}" = "iso-hybrid" ] - then - Check_package chroot/usr/bin/isohybrid syslinux - fi - ;; - - *) - Check_package chroot/usr/bin/xorriso xorriso +Check_package chroot/usr/bin/genisoimage genisoimage - if [ "${LB_BINARY_IMAGES}" = "iso-hybrid" ] - then - Check_package chroot/usr/lib/syslinux/isohdpfx.bin syslinux-common - fi - ;; -esac +if [ "${LB_BINARY_IMAGES}" = "iso-hybrid" ] +then + Check_package chroot/usr/bin/isohybrid syslinux +fi # Restoring cache Restore_cache cache/packages.binary @@ -85,92 +72,79 @@ then rm -f ${IMAGE} fi -# Handle xorriso generic options -XORRISO_OPTIONS="-r -J -joliet-long -l -cache-inodes" - -# Handle xorriso live-build specific options -case "${LB_PARENT_DISTRIBUTION}" in - squeeze) - ;; - - *) - if [ "${LB_BINARY_IMAGES}" = "iso-hybrid" ] - then - XORRISO_OPTIONS="${XORRISO_OPTIONS} -isohybrid-mbr /usr/lib/syslinux/isohdpfx.bin -partition_offset 16" - fi - ;; -esac +# Handle genisoimage generic options +GENISOIMAGE_OPTIONS="-J -l -cache-inodes -allow-multidot" +# Handle genisoimage live-build specific options if [ "${_QUIET}" = "true" ] then - XORRISO_OPTIONS="${XORRISO_OPTIONS} -quiet" + GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -quiet" fi if [ "${_VERBOSE}" = "true" ] then - XORRISO_OPTIONS="${XORRISO_OPTIONS} -v" + GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -v" fi if [ -n "${LB_ISO_APPLICATION}" ] && [ "${LB_ISO_APPLICATION}" != "none" ] then - XORRISO_OPTIONS="${XORRISO_OPTIONS} -A \"${LB_ISO_APPLICATION}\"" + GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -A \"${LB_ISO_APPLICATION}\"" fi if [ -n "${LB_ISO_PREPARER}" ] && [ "${LB_ISO_PREPARER}" != "none" ] then - XORRISO_OPTIONS="${XORRISO_OPTIONS} -p \"${LB_ISO_PREPARER}\"" + GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -p \"${LB_ISO_PREPARER}\"" fi if [ -n "${LB_ISO_PUBLISHER}" ] && [ "${LB_ISO_PUBLISHER}" != "none" ] then - XORRISO_OPTIONS="${XORRISO_OPTIONS} -publisher \"${LB_ISO_PUBLISHER}\"" + GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -publisher \"${LB_ISO_PUBLISHER}\"" fi if [ -n "${LB_ISO_VOLUME}" ] && [ "${LB_ISO_VOLUME}" != "none" ] then - XORRISO_OPTIONS="${XORRISO_OPTIONS} -V \"${LB_ISO_VOLUME}\"" + GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -V \"${LB_ISO_VOLUME}\"" fi -# Handle xorriso architecture specific options +# Handle genisoimage architecture specific options case "${LB_BOOTLOADER}" in grub) - XORRISO_OPTIONS="${XORRISO_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table" - XORRISO_OPTIONS="${XORRISO_OPTIONS} -b boot/grub/stage2_eltorito" - XORRISO_EXCLUDE="boot/grub/stage2_eltorito" + GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table" + GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -r -b boot/grub/stage2_eltorito" + GENISOIMAGE_EXCLUDE="boot/grub/stage2_eltorito" ;; grub2) - XORRISO_OPTIONS="${XORRISO_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table" - XORRISO_OPTIONS="${XORRISO_OPTIONS} -b boot/grub/grub_eltorito -J" - XORRISO_EXCLUDE="boot/grub/grub_eltorito" + GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table" + GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -r -b boot/grub/grub_eltorito -J" + GENISOIMAGE_EXCLUDE="boot/grub/grub_eltorito" ;; silo) - XORRISO_OPTIONS="${XORRISO_OPTIONS} -G boot/isofs.b -B ..." - XORRISO_EXCLUDE="boot/isofs.b" + GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -r -G boot/isofs.b -B ..." + GENISOIMAGE_EXCLUDE="boot/isofs.b" ;; syslinux) + GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table" case "${LB_MODE}" in progress-linux) - XORRISO_OPTIONS="${XORRISO_OPTIONS} -b boot/boot.bin -c boot/boot.cat" - XORRISO_EXCLUDE="boot/boot.bin" + GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -r -b boot/boot.bin -c boot/boot.cat" + GENISOIMAGE_EXCLUDE="boot/boot.bin" ;; *) - XORRISO_OPTIONS="${XORRISO_OPTIONS} -b isolinux/isolinux.bin -c isolinux/boot.cat" - XORRISO_EXCLUDE="isolinux/isolinux.bin" + GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -r -b isolinux/isolinux.bin -c isolinux/boot.cat" + GENISOIMAGE_EXCLUDE="isolinux/isolinux.bin" ;; esac - - XORRISO_OPTIONS="${XORRISO_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table" ;; yaboot) - XORRISO_OPTIONS="${XORRISO_OPTIONS} --iso-level 2 --netatalk -hfs -probe -map" - XORRISO_OPTIONS="${XORRISO_OPTIONS} binary/yaboot/hfs.map --chrp-boot -part -no-desktop" - XORRISO_OPTIONS="${XORRISO_OPTIONS} -hfs-bless binary/yaboot -hfs-volid Debian/Live_powerpc" - XORRISO_EXCLUDE="yaboot/hfs.map" + GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -r --iso-level 2 --netatalk -hfs -probe -map" + GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} binary/yaboot/hfs.map --chrp-boot -part -no-desktop" + GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -hfs-bless binary/yaboot -hfs-volid Debian/Live_powerpc" + GENISOIMAGE_EXCLUDE="yaboot/hfs.map" ;; *) @@ -182,7 +156,7 @@ esac #if [ "${LB_DEBIAN_INSTALLER}" != "live" ] #then -# XORRISO_OPTIONS="${XORRISO_OPTIONS} -m ${XORRISO_EXCLUDE}" +# GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -m ${GENISOIMAGE_EXCLUDE}" #fi if [ "${LB_BOOTLOADER}" = "grub2" ] @@ -217,33 +191,20 @@ else echo "#!/bin/sh" > binary.sh fi -case "${LB_PARENT_DISTRIBUTION}" in - squeeze) - cat >> binary.sh << EOF -genisoimage ${XORRISO_OPTIONS} -o ${IMAGE} binary -EOF - - if [ "${LB_BINARY_IMAGES}" = "iso-hybrid" ] - then -cat >> binary.sh << EOF - -isohybrid ${IMAGE} +genisoimage ${GENISOIMAGE_OPTIONS} -o ${IMAGE} binary EOF - fi - ;; - - *) +if [ "${LB_BINARY_IMAGES}" = "iso-hybrid" ] +then cat >> binary.sh << EOF -xorriso -as mkisofs ${XORRISO_OPTIONS} -o ${IMAGE} binary +isohybrid ${ISOHYBRID_OPTIONS} ${IMAGE} EOF - ;; -esac +fi case "${LB_BUILD_WITH_CHROOT}" in true) diff --git a/scripts/build/binary_linux-image b/scripts/build/binary_linux-image index d1e6ba0ea..f01ed8516 100755 --- a/scripts/build/binary_linux-image +++ b/scripts/build/binary_linux-image @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -73,8 +73,11 @@ Check_multiarchitectures mkdir -p "${DESTDIR}" # Installing linux-image -cp chroot/boot/"${LINUX}"-* "${DESTDIR}" -cp chroot/boot/initrd.img-* "${DESTDIR}" +if [ "${LB_LINUX_PACKAGES}" != "none" ] +then + cp chroot/boot/"${LINUX}"-* "${DESTDIR}" + cp chroot/boot/initrd.img-* "${DESTDIR}" +fi case "${LB_INITRAMFS}" in live-boot) diff --git a/scripts/build/binary_loadlin b/scripts/build/binary_loadlin index 29f926d22..1e6a10e0c 100755 --- a/scripts/build/binary_loadlin +++ b/scripts/build/binary_loadlin @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -24,7 +24,7 @@ Arguments "${@}" Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source Set_defaults -if [ "${LB_LOADLIN}" != "true" ] || [ "${LB_BINARY_IMAGES}" = "netboot" ] +if [ "${LB_LOADLIN}" != "true" ] then exit 0 fi @@ -45,58 +45,39 @@ Create_lockfile .lock case "${LB_ARCHITECTURES}" in amd64|i386) - case "${LB_BUILD_WITH_CHROOT}" in - true) - # Checking depends - Check_package chroot/usr/lib/loadlin/loadlin.exe.gz loadlin - - # Restoring cache - Restore_cache cache/packages.binary - - # Installing depends - Install_package - - _PREFIX="chroot" - ;; - - false) - _PREFIX="" - ;; - esac - - # Copying loadlin - mkdir -p binary/tools - gunzip -c "${_PREFIX}/usr/lib/loadlin/loadlin.exe.gz" > binary/tools/loadlin.exe - gunzip -c "${_PREFIX}/usr/share/doc/loadlin/manual.txt.gz" > binary/tools/loadlin.txt - - case "${LB_BUILD_WITH_CHROOT}" in - true) - # Saving cache - Save_cache cache/packages.binary - - # Removing depends - Remove_package - ;; - esac - -cat > binary/install/install.bat << EOF -\tools\loadlin.exe vmlinuz initrd=initrd.gz -EOF - - if [ -e binary/install/gtk ] + if [ "${LB_BUILD_WITH_CHROOT}" = "true" ] then - -cat > binary/install/gtk/install.bat << EOF -\tools\loadlin.exe \install\vmlinuz initrd=initrd.gz vga=788 -EOF - + # Checking depends + Check_package chroot/usr/lib/loadlin/loadlin.exe.gz loadlin + + # Restoring cache + Restore_cache cache/packages.binary + + # Installing depends + Install_package + + # Copying loadlin + mkdir -p binary/tools + gunzip -c chroot/usr/lib/loadlin/loadlin.exe.gz > binary/tools/loadlin.exe + gunzip -c chroot/usr/share/doc/loadlin/manual.txt.gz > binary/tools/loadlin.txt + + # Saving cache + Save_cache cache/packages.binary + + # Removing depends + Remove_package + else + # Copying loadlin + mkdir -p binary/tools + gunzip -c /usr/lib/loadlin/loadlin.exe.gz > binary/tools/loadlin.exe + gunzip -c /usr/share/doc/loadlin/manual.txt.gz > binary/tools/loadlin.txt fi - - # Creating stage file - Create_stagefile .build/binary_loadlin ;; *) Echo_warning "loadlin inclusion is set to true but not compatible with your architecture, ignoring." ;; esac + +# Creating stage file +Create_stagefile .build/binary_loadlin diff --git a/scripts/build/binary_manifest b/scripts/build/binary_manifest index dfe3ab815..420d6b427 100755 --- a/scripts/build/binary_manifest +++ b/scripts/build/binary_manifest @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -24,11 +24,6 @@ Arguments "${@}" Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source Set_defaults -if [ "${LB_CHROOT_FILESYSTEM}" = "none" ] -then - exit 0 -fi - Echo_message "Begin creating manifest..." # Requiring stage file diff --git a/scripts/build/binary_memtest b/scripts/build/binary_memtest index 1ab2266a1..826a12e60 100755 --- a/scripts/build/binary_memtest +++ b/scripts/build/binary_memtest @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -24,7 +24,7 @@ Arguments "${@}" Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source Set_defaults -if [ "${LB_MEMTEST}" = "false" ] || [ "${LB_MEMTEST}" = "none" ] || [ "${LB_CHROOT_FILESYSTEM}" = "none" ] +if [ "${LB_MEMTEST}" = "false" ] || [ "${LB_MEMTEST}" = "none" ] then exit 0 fi diff --git a/scripts/build/binary_netboot b/scripts/build/binary_netboot index 23d287515..08cc9d308 100755 --- a/scripts/build/binary_netboot +++ b/scripts/build/binary_netboot @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/binary_package-lists b/scripts/build/binary_package-lists index 31b1e73f8..ce459ab3a 100755 --- a/scripts/build/binary_package-lists +++ b/scripts/build/binary_package-lists @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/binary_rootfs b/scripts/build/binary_rootfs index fa1dae959..48c652878 100755 --- a/scripts/build/binary_rootfs +++ b/scripts/build/binary_rootfs @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -147,7 +147,7 @@ case "${LB_CHROOT_FILESYSTEM}" in mv chroot/filesystem.${LB_CHROOT_FILESYSTEM} binary/${INITFS} case "${LB_MODE}" in - ubuntu) + ubuntu|kubuntu) du -B 1 -s chroot/chroot | cut -f1 > binary/${INITFS}/filesystem.size ;; esac @@ -357,7 +357,7 @@ case "${LB_CHROOT_FILESYSTEM}" in esac fi - if [ "${LB_PARENT_DISTRIBUTION}" != "squeeze" ] && [ "${LB_MODE}" != "ubuntu" ] + if [ "${LB_MODE}" != "ubuntu" ] && [ "${LB_MODE}" != "kubuntu" ] then MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -comp xz" fi @@ -377,7 +377,7 @@ case "${LB_CHROOT_FILESYSTEM}" in rm -f chroot/chroot/excludes case "${LB_MODE}" in - ubuntu) + ubuntu|kubuntu) du -B 1 -s chroot/chroot | cut -f1 > binary/${INITFS}/filesystem.size ;; esac @@ -442,7 +442,7 @@ case "${LB_CHROOT_FILESYSTEM}" in mksquashfs chroot binary/${INITFS}/filesystem.squashfs ${MKSQUASHFS_OPTIONS} case "${LB_MODE}" in - ubuntu) + ubuntu|kubuntu) du -B 1 -s chroot | cut -f1 > binary/${INITFS}/filesystem.size ;; esac diff --git a/scripts/build/binary_silo b/scripts/build/binary_silo index 85e78d58b..8e833d1cc 100755 --- a/scripts/build/binary_silo +++ b/scripts/build/binary_silo @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/binary_syslinux b/scripts/build/binary_syslinux index 8caa6534f..7f1bf86f7 100755 --- a/scripts/build/binary_syslinux +++ b/scripts/build/binary_syslinux @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -83,30 +83,27 @@ case "${LB_BINARY_IMAGES}" in ;; esac -if [ -e "config/bootloaders/${_BOOTLOADER}" ] -then - # Internal local copy - _SOURCE="config/bootloaders/${_BOOTLOADER}" -else - # Internal system copy - if [ -n "${LIVE_BUILD}" ] - then - _SOURCE="${LIVE_BUILD}/share/bootloaders/${_BOOTLOADER}" - else - _SOURCE="/usr/share/live/build/bootloaders/${_BOOTLOADER}" - fi -fi - # Checking depends case "${LB_BUILD_WITH_CHROOT}" in true) Check_package chroot/usr/bin/syslinux syslinux Check_package chroot/usr/lib/syslinux syslinux-common - if ls "${_SOURCE}"/*.svg* > /dev/null 2>&1 - then - Check_package chroot/usr/bin/rsvg librsvg2-bin - fi + case "${LB_SYSLINUX_THEME}" in + live-build) + Check_package chroot/usr/bin/rsvg librsvg2-bin + ;; + + *) + Check_package chroot/usr/share/syslinux/themes/${LB_SYSLINUX_THEME} syslinux-themes-${LB_SYSLINUX_THEME} + + case "${LB_MODE}" in + ubuntu) + Check_package chroot/usr/share/gfxboot-theme-ubuntu/bootlogo.tar.gz gfxboot-theme-ubuntu + ;; + esac + ;; + esac ;; false) @@ -124,15 +121,25 @@ case "${LB_BUILD_WITH_CHROOT}" in exit 1 fi - if ls "${_SOURCE}"/*.svg* > /dev/null 2>&1 - then - if [ ! -e /usr/bin/rsvg ] - then - # librsvg2-bin - Echo_error "/usr/bin/rsvg - no such file" - exit 1 - fi - fi + case "${LB_SYSLINUX_THEME}" in + live-build) + if [ ! -e /usr/bin/rsvg ] + then + # librsvg2-bin + Echo_error "/usr/bin/rsvg - no such file" + exit 1 + fi + ;; + + *) + if [ ! -e /usr/share/syslinux/themes/${LB_SYSLINUX_THEME} ] + then + # syslinux-theme + Echo_error "/usr/share/syslinux/themes/${LB_SYSLINUX_THEME} - no such directory." + exit 1 + fi + ;; + esac ;; esac @@ -142,22 +149,61 @@ Restore_cache cache/packages.binary # Installing depends Install_package +# FIXME: cleanup, unify, and extend themes for ${_BOOTLOADER}-live and ${_BOOTLOADER}-installer +if [ "${LB_SYSLINUX_THEME}" = "live-build" ] +then + if [ -e "config/bootloaders/${_BOOTLOADER}" ] + then + # Internal local copy + _SOURCE="config/bootloaders/${_BOOTLOADER}" + else + # Internal system copy + if [ -n "${LIVE_BUILD}" ] + then + _SOURCE="${LIVE_BUILD}/share/bootloaders/${_BOOTLOADER}" + else + _SOURCE="/usr/share/live/build/bootloaders/${_BOOTLOADER}" + fi + fi +else + # External copy from chroot or system + _SOURCE="/usr/share/syslinux/themes/${LB_SYSLINUX_THEME}/${_BOOTLOADER}-live" +fi + # Copying files case "${LB_BUILD_WITH_CHROOT}" in true) mkdir -p $(dirname ${_TARGET}) # Copy in two steps since the theme can have absolute symlinks and would therefore not be dereferenced correctly - cp -a ${_SOURCE} chroot/root - Chroot chroot cp -aL /root/$(basename ${_SOURCE}) /root/$(basename ${_SOURCE}).tmp || true - rm -rf chroot/root/$(basename ${_SOURCE}) + if [ "${LB_SYSLINUX_THEME}" = "live-build" ] + then + cp -a ${_SOURCE} chroot/root + Chroot chroot cp -aL /root/$(basename ${_SOURCE}) /root/$(basename ${_SOURCE}).tmp + rm -rf chroot/$(basename ${_SOURCE}) + else + Chroot chroot cp -aL ${_SOURCE} /root/$(basename ${_SOURCE}).tmp + fi + + case "${LB_MODE}" in + ubuntu) + Chroot chroot "tar xfz /usr/share/gfxboot-theme-ubuntu/bootlogo.tar.gz -C /root/$(basename ${_SOURCE}).tmp" + ;; + esac + mv chroot/root/$(basename ${_SOURCE}).tmp ${_TARGET} ;; false) mkdir -p ${_TARGET} - cp -aL ${_SOURCE}/* ${_TARGET} || true + cp -aL ${_SOURCE}/* ${_TARGET} + + case "${LB_MODE}" in + ubuntu) + tar xfz /usr/share/gfxboot-theme-ubuntu/bootlogo.tar.gz -C ${_TARGET} + ;; + esac ;; esac @@ -220,7 +266,7 @@ fi if [ -e ${_TARGET}/install.cfg ] then - sed -i -e "s#@APPEND_INSTALL@#${LB_BOOTAPPEND_INSTALL}#g" \ + sed -i -e "s#@LB_BOOTAPPEND_INSTALL@#${LB_BOOTAPPEND_INSTALL}#g" \ ${_TARGET}/install.cfg fi @@ -286,10 +332,7 @@ then -e "s|@LIVE_CONFIG_VERSION@|${_LIVE_CONFIG_VERSION}|g" \ -e "s|@LIVE_TOOLS_VERSION@|${_LIVE_TOOLS_VERSION}|g" \ "${_TARGET}/splash.svg.in" > "${_TARGET}/splash.svg" -fi -if [ -e "${_TARGET}/splash.svg" ] -then case "${LB_BUILD_WITH_CHROOT}" in true) cp "${_TARGET}/splash.svg" chroot @@ -302,9 +345,9 @@ then rsvg --format png --height 480 --width 640 "${_TARGET}/splash.svg" "${_TARGET}/splash.png" ;; esac -fi -rm -f "${_TARGET}/splash.svg.in" "${_TARGET}/splash.svg" + rm -f "${_TARGET}/splash.svg.in" "${_TARGET}/splash.svg" +fi case "${LB_MODE}" in progress-linux) diff --git a/scripts/build/binary_tar b/scripts/build/binary_tar index 5d2a3a65a..9b9b3dec0 100755 --- a/scripts/build/binary_tar +++ b/scripts/build/binary_tar @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/binary_win32-loader b/scripts/build/binary_win32-loader index a46e06213..4789398a1 100755 --- a/scripts/build/binary_win32-loader +++ b/scripts/build/binary_win32-loader @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -63,43 +63,28 @@ case "${LB_ARCHITECTURES}" in fi mv binary/win32-loader.exe binary/setup.exe - mv binary/win32-loader/g2ldr* binary - rmdir binary/win32-loader > /dev/null 2>&1 || true if [ -e binary/win32-loader-standalone.exe ] then - # squeeze mv binary/win32-loader-standalone.exe binary/setup-standalone.exe fi -cat >> binary/autorun.inf << EOF -[autorun] -open=setup.exe -EOF + if ls binary/win32-loader/g2ldr* > /dev/null 2>&1 + then + mv binary/win32-loader/g2ldr* binary + rmdir binary/win32-loader > /dev/null 2>&1 || true + fi if [ "${LB_DEBIAN_INSTALLER}" != "false" ] then cat > binary/win32-loader.ini << EOF [installer] -kernel=linux arch=${LB_ARCHITECTURES} -default_desktop=gnome -${LB_ARCHITECTURES}/linux=install/vmlinuz -${LB_ARCHITECTURES}/initrd=install/initrd.gz -EOF - - if [ -e binary/install/gtk ] - then - -cat >> binary/win32-loader.ini << EOF -${LB_ARCHITECTURES}/gtk/linux=install/vmlinuz -${LB_ARCHITECTURES}/gtk/initrd=install/gtk/initrd.gz -EOF - - fi - -cat >> binary/win32-loader.ini << EOF +i386/linux=install/vmlinuz +i386/initrd=install/initrd.gz +i386/gtk/linux=install/vmlinuz +i386/gtk/initrd=install/gtk/initrd.gz [grub] g2ldr=g2ldr diff --git a/scripts/build/binary_yaboot b/scripts/build/binary_yaboot index 5e916a9ea..8fc5a64dd 100755 --- a/scripts/build/binary_yaboot +++ b/scripts/build/binary_yaboot @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/binary_zsync b/scripts/build/binary_zsync index 2e6b1cf4e..f43fe8a43 100755 --- a/scripts/build/binary_zsync +++ b/scripts/build/binary_zsync @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/bootstrap b/scripts/build/bootstrap index 337e5cfd3..13822c840 100755 --- a/scripts/build/bootstrap +++ b/scripts/build/bootstrap @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -38,12 +38,4 @@ Setup_cleanup lb bootstrap_cache restore ${@} lb bootstrap_cdebootstrap ${@} lb bootstrap_debootstrap ${@} -lb bootstrap_archive-keys ${@} lb bootstrap_cache save ${@} - -# Temporary hack for base-files wrt/ plymouth -case "${LB_DISTRIBUTION}" in - artax*) - echo '0.0.0' > chroot/etc/progress-linux_version - ;; -esac diff --git a/scripts/build/bootstrap_archive-keys b/scripts/build/bootstrap_archive-keys deleted file mode 100755 index a02f5776f..000000000 --- a/scripts/build/bootstrap_archive-keys +++ /dev/null @@ -1,115 +0,0 @@ -#!/bin/sh - -## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> -## -## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. -## This is free software, and you are welcome to redistribute it -## under certain conditions; see COPYING for details. - - -set -e - -# Including common functions -[ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh - -# Setting static variables -DESCRIPTION="$(Echo 'bootstrap non-Debian archive-signing-keys')" -HELP="" -USAGE="${PROGRAM} [--force]" - -Arguments "${@}" - -# Reading configuration files -Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source -Set_defaults - -# TODO: allow verification against user-specified keyring -# For now, we'll only validate against debian-keyring - -# TODO2: use chrooted validation rather than host system based one - -case "${LB_MODE}" in - progress-linux) - case "${LB_DISTRIBUTION}" in - artax) - _KEYS="1.0-artax" - ;; - - artax-backports) - _KEYS="1.0-artax 1.9-artax-backports" - ;; - - baureo) - _KEYS="2.0-baureo" - ;; - - baureo-backports) - _KEYS="2.0-baureo 2.9-baureo-backports" - ;; - - chairon) - _KEYS="3.0-chairon" - ;; - - chairon-backports) - _KEYS="3.0-chairon 3.9-chairon-backports" - ;; - esac - - _URL="${LB_MIRROR_CHROOT}/project/keys" - ;; -esac - -for _KEY in ${_KEYS} -do - Echo_message "Fetching archive-key ${_KEY}..." - - wget -q "${_URL}/archive-key-${_KEY}.asc" -O chroot/key.asc - wget -q "${_URL}/archive-key-${_KEY}.asc.sig" -O chroot/key.asc.sig - - if [ -e /usr/bin/gpgv ] - then - if [ -e /usr/share/keyrings/debian-keyring.gpg ] || [ -e /usr/share/keyrings/debian-maintainers.gpg ] - then - _KEY_VALID="" - - for _KEYRING in /usr/share/keyrings/debian-keyring.gpg /usr/share/keyrings/debian-maintainers.gpg - do - if [ -e "${_KEYRING}" ] - then - Echo_message "Verifying archive-key ${_KEY} against $(basename ${_KEYRING} .gpg | sed -e 's|-keyring||') keyring..." - - set +e - /usr/bin/gpgv --quiet --keyring ${_KEYRING} chroot/key.asc.sig chroot/key.asc > /dev/null 2>&1 && _KEY_VALID="true" && break - set -e - fi - done - - case "${_KEY_VALID}" in - true) - Echo_message "Verifying ${_KEY} signature successful." - ;; - - *) - Echo_error "Verifying ${_KEY} signature failed." - return 1 - ;; - esac - else - Echo_warning "Skipping archive-key ${_KEY} verification, debian-keyring not available..." - fi - else - Echo_warning "Skipping archive-key ${_KEY} verification, gpgv not available..." - fi - - Echo_message "Importing archive-key ${_KEY}..." - - Chroot chroot "apt-key add key.asc" - rm -f chroot/key.asc chroot/key.asc.sig -done - -Chroot chroot "apt-get update" - -# Creating stage file -Create_stagefile .build/bootstrap_archive-keys diff --git a/scripts/build/bootstrap_cache b/scripts/build/bootstrap_cache index 7eae975fe..6b0f582ea 100755 --- a/scripts/build/bootstrap_cache +++ b/scripts/build/bootstrap_cache @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/bootstrap_cdebootstrap b/scripts/build/bootstrap_cdebootstrap index 6ed538e0b..1c778e379 100755 --- a/scripts/build/bootstrap_cdebootstrap +++ b/scripts/build/bootstrap_cdebootstrap @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -32,8 +32,8 @@ fi if [ ! -x "$(which cdebootstrap 2>/dev/null)" ] then echo "E: cdebootstrap - command not found" - echo "I: cdebootstrap can be obtained from http://ftp.debian.org/debian/pool/main/d/cdebootstrap/" - echo "I: On Debian based systems, cdebootstrap can be installed with 'apt-get install cdebootstrap'." + echo "I: cdebootstrap can be optained from http://ftp.debian.org/debian/pool/main/d/cdebootstrap/" + echo "I: On Debian based systems, cdebootstrap can be installed with 'apt-get install debootstrap'." exit 1 fi diff --git a/scripts/build/bootstrap_debootstrap b/scripts/build/bootstrap_debootstrap index 32b7c76bc..7be24378d 100755 --- a/scripts/build/bootstrap_debootstrap +++ b/scripts/build/bootstrap_debootstrap @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -32,7 +32,7 @@ fi if [ ! -x "$(which debootstrap 2>/dev/null)" ] then echo "E: debootstrap - command not found" - echo "I: debootstrap can be obtained from http://ftp.debian.org/debian/pool/main/d/debootstrap/" + echo "I: debootstrap can be optained from http://ftp.debian.org/debian/pool/main/d/debootstrap/" echo "I: On Debian based systems, debootstrap can be installed with 'apt-get install debootstrap'." exit 1 fi diff --git a/scripts/build/build b/scripts/build/build index bc86b62e0..d7b989dec 100755 --- a/scripts/build/build +++ b/scripts/build/build @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/chroot b/scripts/build/chroot index 64c3d90c4..1c6348293 100755 --- a/scripts/build/chroot +++ b/scripts/build/chroot @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/chroot_apt b/scripts/build/chroot_apt index 01e460e7b..18e7c66d2 100755 --- a/scripts/build/chroot_apt +++ b/scripts/build/chroot_apt @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -204,19 +204,6 @@ cat >> chroot/etc/apt/preferences.d/progress-linux.pref << EOF EOF done - - # Add temporary hack to avoid squashfs version mismatch - case "${LB_DISTRIBUTION}" in - artax-backports) - -cat >> chroot/etc/apt/preferences.d/progress-linux.tmp.pref << EOF -Package: squashfs-tools -Pin: release n=squeeze -Pin-Priority: 1001 -EOF - - ;; - esac fi ;; esac @@ -322,9 +309,6 @@ EOF fi - # Remove temporary hack to avoid squashfs version mismatch for artax-backports - rm -f chroot/etc/apt/preferences.d/progress-linux.tmp.pref - # Removing stage file rm -f .build/chroot_apt ;; diff --git a/scripts/build/chroot_archives b/scripts/build/chroot_archives index 6e464ec4d..3785b65ba 100755 --- a/scripts/build/chroot_archives +++ b/scripts/build/chroot_archives @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -131,7 +131,7 @@ EOF fi ;; - ubuntu) + ubuntu|kubuntu) echo "deb ${LB_PARENT_MIRROR_CHROOT_SECURITY} ${LB_PARENT_DISTRIBUTION}-security ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ] @@ -196,7 +196,7 @@ EOF do # ubuntu workaround to allow using live.debian.net case "${LB_MODE}" in - ubuntu) + ubuntu|kubuntu) if [ "${REPOSITORY}" = "live.debian.net" ] then _DISTRIBUTION="sid" @@ -217,86 +217,83 @@ EOF continue fi - # Adding apt sources (chroot) - for _FILE in "${_BASE}/archives/${REPOSITORY}" "${_BASE}/archives/${REPOSITORY}.chroot" - do - if [ -e "${_FILE}" ] - then - sed -e "s|@DISTRIBUTION@|${_DISTRIBUTION}|g" \ - -e "s|@PARENT_DISTRIBUTION@|${LB_PARENT_DISTRIBUTION}|g" \ - -e "s|@ARCHIVE_AREAS@|${LB_PARENT_ARCHIVE_AREAS}|g" \ - "${_FILE}" > "chroot/etc/apt/sources.list.d/${REPOSITORY}.list" - fi - done + # Adding sources.list entries (chroot) + if [ -e "${_BASE}/archives/${REPOSITORY}.chroot" ] + then + sed -e "s|@DISTRIBUTION@|${_DISTRIBUTION}|g" \ + -e "s|@PARENT_DISTRIBUTION@|${LB_PARENT_DISTRIBUTION}|g" \ + -e "s|@ARCHIVE_AREAS@|${LB_PARENT_ARCHIVE_AREAS}|g" \ + "${_BASE}/archives/${REPOSITORY}.chroot" > \ + "chroot/etc/apt/sources.list.d/${REPOSITORY}.list" + elif [ -e "${_BASE}/archives/${REPOSITORY}" ] + then + sed -e "s|@DISTRIBUTION@|${_DISTRIBUTION}|g" \ + -e "s|@PARENT_DISTRIBUTION@|${LB_PARENT_DISTRIBUTION}|g" \ + -e "s|@ARCHIVE_AREAS@|${LB_PARENT_ARCHIVE_AREAS}|g" \ + "${_BASE}/archives/${REPOSITORY}" > \ + "chroot/etc/apt/sources.list.d/${REPOSITORY}.list" + fi - # Adding apt configuration (chroot) - for _FILE in "${_BASE}/archives/${REPOSITORY}.conf" "${_BASE}/archives/${REPOSITORY}.conf.chroot" - do - if [ -e "${_FILE}" ] - then - cp "${_FILE}" "chroot/etc/apt/conf.d/${REPOSITORY}.conf" - fi - done + # Adding pinning preferences (chroot) + if [ -e "${_BASE}/archives/${REPOSITORY}.pref" ] + then + cp "${_BASE}/archives/${REPOSITORY}.pref" chroot/etc/apt/sources.list.d + elif [ -e "${_BASE}/archives/${REPOSITORY}.pref.chroot" ] + then + cp "${_BASE}/archives/${REPOSITORY}.pref.chroot" "chroot/etc/apt/sources.list.d/${REPOSITORY}.pref" + fi - # Adding apt preferences (chroot) - for _FILE in "${_BASE}/archives/${REPOSITORY}.pref" "${_BASE}/archives/${REPOSITORY}.pref.chroot" - do - if [ -e "${_FILE}" ] + if [ "${LB_APT_SECURE}" != false ] + then + # Adding archive signing keys (chroot) + if [ -e "${_BASE}/archives/${REPOSITORY}.key.chroot" ] + then + cat "${_BASE}/archives/${REPOSITORY}.key.chroot" | Chroot chroot "apt-key add -" + elif [ -e "${_BASE}/archives/${REPOSITORY}.key" ] then - cp "${_FILE}" "chroot/etc/apt/preferences.d/${REPOSITORY}.pref" + cat "${_BASE}/archives/${REPOSITORY}.key" | Chroot chroot "apt-key add -" fi - done + fi + done + fi - # Adding apt keys (chroot) - if [ "${LB_APT_SECURE}" != false ] + # Check local sources.list + if Find_files config/archives/*.list || \ + Find_files config/archives/*.list.chroot + then + for FILE in config/archives/*.list \ + config/archives/*.list.chroot + do + if [ -e "${FILE}" ] then - for _FILE in "${_BASE}/archives/${REPOSITORY}.key" "${_BASE}/archives/${REPOSITORY}.key.chroot" - do - if [ -e "${_FILE}" ] - then - cat "${_FILE}" | Chroot chroot "apt-key add -" - fi - done + sed -e "s|@DISTRIBUTION@|${LB_DISTRIBUTION}|g" \ + -e "s|@PARENT_DISTRIBUTION@|${LB_PARENT_DISTRIBUTION}|g" \ + -e "s|@ARCHIVE_AREAS@|${LB_ARCHIVE_AREAS}|g" \ + -e "s|@PARENT_ARCHIVE_AREAS@|${LB_PARENT_ARCHIVE_AREAS}|g" \ + "${FILE}" > "chroot/etc/apt/sources.list.d/$(basename ${FILE} .chroot)" + + if [ "${_PASS}" != "source" ] && [ "${LB_APT_SOURCE_ARCHIVES}" = "false" ] + then + # Strip out source archives + sed "/^deb-src /d" "chroot/etc/apt/sources.list.d/$(basename ${FILE} .chroot)" + fi fi done fi - # Adding local apt sources (chroot) - for FILE in config/archives/*.list config/archives/*.list.chroot - do - if [ -e "${FILE}" ] - then - sed -e "s|@DISTRIBUTION@|${LB_DISTRIBUTION}|g" \ - -e "s|@PARENT_DISTRIBUTION@|${LB_PARENT_DISTRIBUTION}|g" \ - -e "s|@ARCHIVE_AREAS@|${LB_ARCHIVE_AREAS}|g" \ - -e "s|@PARENT_ARCHIVE_AREAS@|${LB_PARENT_ARCHIVE_AREAS}|g" \ - "${FILE}" > "chroot/etc/apt/sources.list.d/$(basename ${FILE} .chroot)" - - if [ "${_PASS}" != "source" ] && [ "${LB_APT_SOURCE_ARCHIVES}" = "false" ] + # Check local pinning preferences + if Find_files config/archives/*.pref || \ + Find_files config/archives/*.pref.chroot + then + for FILE in config/archives/*.pref \ + config/archives/*.pref.chroot + do + if [ -e "${FILE}" ] then - # Strip out source archives - sed "/^deb-src /d" "chroot/etc/apt/sources.list.d/$(basename ${FILE} .chroot)" + cp ${FILE} chroot/etc/apt/preferences.d/$(basename ${FILE} .chroot) fi - fi - done - - # Adding local apt configuration (chroot) - for FILE in config/archives/*.conf config/archives/*.conf.chroot - do - if [ -e "${FILE}" ] - then - cp ${FILE} chroot/etc/apt/conf.d/$(basename ${FILE} .chroot) - fi - done - - # Adding local apt preferences (chroot) - for FILE in config/archives/*.pref config/archives/*.pref.chroot - do - if [ -e "${FILE}" ] - then - cp ${FILE} chroot/etc/apt/preferences.d/$(basename ${FILE} .chroot) - fi - done + done + fi # Configure local package repository if Find_files config/packages.chroot/*.deb || Find_files config/packages/*.deb @@ -366,12 +363,13 @@ EOF if [ "${LB_APT_SECURE}" = "true" ] then - if [ -e chroot/root/.gnupg ] + _LB_DOTGNUPG_EXISTED=0 + if [ -d chroot/root/.gnupg ] then - mv chroot/root/.gnupg chroot/root/.gnupg.orig + _LB_DOTGNUPG_EXISTED=1 fi - # Ensure ~/.gnupg exists + # Ensure ~/.gnupg exists (required for gnupg >= ~1.4.9) mkdir -p chroot/root/.gnupg # Temporarily replace /dev/random with /dev/urandom so as not @@ -435,11 +433,10 @@ EOF mv chroot/dev/random.orig chroot/dev/random fi - rm -rf chroot/root/.gnupg - - if [ -e chroot/root/.gnupg.orig ] + # Remove /root/.gnupg if we created it during the signing process + if [ "${_LB_DOTGNUPG_EXISTED}" -eq 0 ] then - mv chroot/root/.gnupg.orig chroot/root/.gnupg + rm -rf chroot/root/.gnupg fi fi @@ -554,7 +551,13 @@ EOF # Installing keyring packages if [ -n "${LB_KEYRING_PACKAGES}" ] then - Apt chroot "install ${LB_KEYRING_PACKAGES}" + if [ "${LB_DERIVATIVE}" = "true" ] + then + # Temporary hack (FIXME) + Chroot chroot "apt-get ${APT_OPTIONS} --force-yes install ${LB_KEYRING_PACKAGES}" + else + Apt chroot "install ${LB_KEYRING_PACKAGES}" + fi fi rm -rf chroot/var/cache/apt/*.bin @@ -695,7 +698,7 @@ EOF fi ;; - ubuntu) + ubuntu|kubuntu) echo "deb ${LB_PARENT_MIRROR_BINARY_SECURITY} ${LB_PARENT_DISTRIBUTION}-security ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ] @@ -754,7 +757,6 @@ EOF fi # probably too bold, needs refinment (FIXME) - rm -f chroot/etc/apt/conf.d/* rm -f chroot/etc/apt/preferences.d/* # Configure third-party archives @@ -772,97 +774,99 @@ EOF continue fi - # Adding apt sources (binary) - for _FILE in "${_BASE}/archives/${REPOSITORY}" "${_BASE}/archives/${REPOSITORY}.binary" - do - if [ -e "${_FILE}" ] - then - sed -e "s|@DISTRIBUTION@|${LB_PARENT_DISTRIBUTION}|g" \ - -e "s|@PARENT_DISTRIBUTION@|${LB_PARENT_DISTRIBUTION}|g" \ - -e "s|@ARCHIVE_AREAS@|${LB_PARENT_ARCHIVE_AREAS}|g" \ - "${_FILE}" > "chroot/etc/apt/sources.list.d/${REPOSITORY}.list" - fi - done + # Adding sources.list entries (binary) + if [ -e "${_BASE}/archives/${REPOSITORY}.binary" ] + then + sed -e "s|@DISTRIBUTION@|${LB_PARENT_DISTRIBUTION}|g" \ + -e "s|@PARENT_DISTRIBUTION@|${LB_PARENT_DISTRIBUTION}|g" \ + -e "s|@ARCHIVE_AREAS@|${LB_PARENT_ARCHIVE_AREAS}|g" \ + "${_BASE}/archives/${REPOSITORY}.binary" > \ + "chroot/etc/apt/sources.list.d/${REPOSITORY}.list" + elif [ -e "${_BASE}/archives/${REPOSITORY}" ] + then + sed -e "s|@DISTRIBUTION@|${LB_PARENT_DISTRIBUTION}|g" \ + -e "s|@PARENT_DISTRIBUTION@|${LB_PARENT_DISTRIBUTION}|g" \ + -e "s|@ARCHIVE_AREAS@|${LB_PARENT_ARCHIVE_AREAS}|g" \ + "${_BASE}/archives/${REPOSITORY}" > \ + "chroot/etc/apt/sources.list.d/${REPOSITORY}.list" + fi - # Adding apt configuration (binary) - for _FILE in "${_BASE}/archives/${REPOSITORY}.conf" "${_BASE}/archives/${REPOSITORY}.conf.binary" - do - if [ -e "${_FILE}" ] + # Adding pinning preferences (binary) + if [ -e "${_BASE}/archives/${REPOSITORY}.pref" ] + then + cp "${_BASE}/archives/${REPOSITORY}.pref" chroot/etc/apt/sources.list.d + elif [ -e "${_BASE}/archives/${REPOSITORY}.pref.binary" ] + then + cp "${_BASE}/archives/${REPOSITORY}.pref.binary" "chroot/etc/apt/sources.list.d/${REPOSITORY}.pref" + fi + + if [ "${LB_APT_SECURE}" != false ] + then + # Adding archive signing keys (binary) + if [ -e "${_BASE}/archives/${REPOSITORY}.key.binary" ] then - cp "${_FILE}" "chroot/etc/apt/conf.d/${REPOSITORY}.conf" + cat "${_BASE}/archives/${REPOSITORY}.key.binary" | Chroot chroot "apt-key add -" + elif [ -e "${_BASE}/archives/${REPOSITORY}.key" ] + then + cat "${_BASE}/archives/${REPOSITORY}.key" | Chroot chroot "apt-key add -" fi - done + fi + done + fi - # Adding apt preferences (binary) - for _FILE in "${_BASE}/archives/${REPOSITORY}.pref" "${_BASE}/archives/${REPOSITORY}.pref.binary" - do - if [ -e "${_FILE}" ] + # Check local sources.list + if Find_files config/archives/*.list || \ + Find_files config/archives/*.list.binary + then + for FILE in config/archives/*.list \ + config/archives/*.list.binary + do + if [ -e "${FILE}" ] + then + sed -e "s|@DISTRIBUTION@|${LB_DISTRIBUTION}|g" \ + -e "s|@PARENT_DISTRIBUTION@|${LB_PARENT_DISTRIBUTION}|g" \ + -e "s|@ARCHIVE_AREAS@|${LB_ARCHIVE_AREAS}|g" \ + -e "s|@PARENT_ARCHIVE_AREAS@|${LB_PARENT_ARCHIVE_AREAS}|g" \ + "${FILE}" > "chroot/etc/apt/sources.list.d/$(basename ${FILE} .binary)" + + if [ "${_PASS}" != "source" ] && [ "${LB_APT_SOURCE_ARCHIVES}" = "false" ] then - cp "${_FILE}" "chroot/etc/apt/preferences.d/${REPOSITORY}.pref" + # Strip out source archives + sed "/^deb-src /d" "chroot/etc/apt/sources.list.d/$(basename ${FILE} .binary)" fi - done + fi + done + fi - # Adding apt keys (binary) - if [ "${LB_APT_SECURE}" != false ] + # Check local pinning preferences + if Find_files config/archives/*.pref || \ + Find_files config/archives/*.pref.binary + then + for FILE in config/archives/*.pref \ + config/archives/*.pref.binary + do + if [ -e "${FILE}" ] then - for _FILE in "${_BASE}/archives/${REPOSITORY}.key" "${_BASE}/archives/${REPOSITORY}.key.binary" - do - if [ -e "${_FILE}" ] - then - cat "${_FILE}" | Chroot chroot "apt-key add -" - fi - done + cp ${FILE} chroot/etc/apt/preferences.d/$(basename ${FILE} .binary) fi done fi - # Adding local apt sources (binary) - for FILE in config/archives/*.list config/archives/*.list.binary - do - if [ -e "${FILE}" ] - then - sed -e "s|@DISTRIBUTION@|${LB_DISTRIBUTION}|g" \ - -e "s|@PARENT_DISTRIBUTION@|${LB_PARENT_DISTRIBUTION}|g" \ - -e "s|@ARCHIVE_AREAS@|${LB_ARCHIVE_AREAS}|g" \ - -e "s|@PARENT_ARCHIVE_AREAS@|${LB_PARENT_ARCHIVE_AREAS}|g" \ - "${FILE}" > "chroot/etc/apt/sources.list.d/$(basename ${FILE} .binary)" - - if [ "${_PASS}" != "source" ] && [ "${LB_APT_SOURCE_ARCHIVES}" = "false" ] + # Check local archive keys + if Find_files config/archives/*.key || \ + Find_files config/archives/*.key.binary + then + for FILE in config/archives/*.key \ + config/archives/*.key.binary + do + if [ -e "${FILE}" ] then - # Strip out source archives - sed "/^deb-src /d" "chroot/etc/apt/sources.list.d/$(basename ${FILE} .binary)" + cp ${FILE} chroot/root + Chroot chroot "apt-key add /root/$(basename ${FILE})" + rm -f chroot/root/$(basename ${FILE}) fi - fi - done - - # Adding local apt configuration (binary) - for FILE in config/archives/*.conf config/archives/*.conf.binary - do - if [ -e "${FILE}" ] - then - cp ${FILE} chroot/etc/apt/conf.d/$(basename ${FILE} .binary) - fi - done - - # Adding local apt preferences (binary) - for FILE in config/archives/*.pref config/archives/*.pref.binary - do - if [ -e "${FILE}" ] - then - cp ${FILE} chroot/etc/apt/preferences.d/$(basename ${FILE} .binary) - fi - done - - # Adding local apt keys (binary) - for FILE in config/archives/*.key config/archives/*.key.binary - do - if [ -e "${FILE}" ] - then - cp ${FILE} chroot/root - Chroot chroot "apt-key add /root/$(basename ${FILE})" - rm -f chroot/root/$(basename ${FILE}) - fi - done + done + fi # Updating indices Apt chroot update @@ -883,9 +887,9 @@ EOF rm -rf chroot/root/packages # Remove local packages key if it exists - if Chroot chroot apt-key list | grep -q ${_LB_LOCAL_KEY_EMAIL} + if apt-key list | grep -q ${_LB_LOCAL_KEY_EMAIL} then - Chroot chroot apt-key del ${_LB_LOCAL_KEY_EMAIL} + apt-key del ${_LB_LOCAL_KEY_EMAIL} fi # Removing stage file diff --git a/scripts/build/chroot_cache b/scripts/build/chroot_cache index 16ff49260..4c4b055bf 100755 --- a/scripts/build/chroot_cache +++ b/scripts/build/chroot_cache @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/chroot_debianchroot b/scripts/build/chroot_debianchroot index d2a6599e9..7e07b3655 100755 --- a/scripts/build/chroot_debianchroot +++ b/scripts/build/chroot_debianchroot @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/chroot_devpts b/scripts/build/chroot_devpts index 2f8aa4b63..428927f06 100755 --- a/scripts/build/chroot_devpts +++ b/scripts/build/chroot_devpts @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/chroot_dpkg b/scripts/build/chroot_dpkg index b1051ef47..9698f7923 100755 --- a/scripts/build/chroot_dpkg +++ b/scripts/build/chroot_dpkg @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -40,8 +40,10 @@ case "${1}" in # Creating lock file Create_lockfile .lock - # Create custom start-stop-daemon program - Chroot chroot dpkg-divert --rename --quiet --add /sbin/start-stop-daemon + # Save start-stop-daemon program + mv chroot/sbin/start-stop-daemon chroot/sbin/start-stop-daemon.orig + + # Create start-stop-daemon program cat > chroot/sbin/start-stop-daemon << EOF #!/bin/sh @@ -59,16 +61,13 @@ EOF # Manual hacks for special packages - # Generic live-build handle for other live packages to act upon - touch chroot/.live-build - # samhain if [ -e /var/state/samhain/samhain_file ] then - ${LB_ROOT_COMMAND} mv /var/state/samhain/samhain_file /var/state/samhain/samhain_file.orig + mv /var/state/samhain/samhain_file /var/state/samhain/samhain_file.orig else - ${LB_ROOT_COMMAND} mkdir -p /var/state/samhain - ${LB_ROOT_COMMAND} touch /var/state/samhain/samhain_file + mkdir -p /var/state/samhain + touch /var/state/samhain/samhain_file fi # flash-kernel @@ -90,9 +89,6 @@ EOF # Manual hacks for special packages - # Generic live-build handle - rm -f chroot/.live-build - # flash-kernel rm -f chroot/usr/sbin/flash-kernel Chroot chroot dpkg-divert --rename --quiet --remove /usr/sbin/flash-kernel @@ -100,16 +96,18 @@ EOF # samhain if [ -e /var/state/samhain/samhain_file.orig ] then - ${LB_ROOT_COMMAND} mv /var/state/samhain/samhain_file.orig /var/state/samhain/samhain_file + mv /var/state/samhain/samhain_file.orig /var/state/samhain/samhain_file elif [ -d /var/state/samhain ] then - ${LB_ROOT_COMMAND} rm -f /var/state/samhain/samhain_file - ${LB_ROOT_COMMAND} rmdir --ignore-fail-on-non-empty /var/state/samhain || true + rm -f /var/state/samhain/samhain_file + rmdir --ignore-fail-on-non-empty /var/state/samhain || true fi - # Remove custom start-stop-daemon program - rm -f chroot/sbin/start-stop-daemon - Chroot chroot dpkg-divert --rename --quiet --remove /sbin/start-stop-daemon + # Restore start-stop-daemon program + if [ -e chroot/sbin/start-stop-daemon.orig ] + then + mv chroot/sbin/start-stop-daemon.orig chroot/sbin/start-stop-daemon + fi # Remove dpkg sync configuration rm -f chroot/etc/dpkg/dpkg.cfg.d/live-build diff --git a/scripts/build/chroot_hacks b/scripts/build/chroot_hacks index 7196bce7f..f7d48ead1 100755 --- a/scripts/build/chroot_hacks +++ b/scripts/build/chroot_hacks @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -38,6 +38,92 @@ Check_lockfile .lock # Creating lock file Create_lockfile .lock +# Handling default desktop configuration +case "${LB_MODE}" in + debian*) + # disable kexec-tools + if [ -e chroot/sbin/kexec ] + then + echo "kexec-tools kexec-tools/load_kexec boolean false" > chroot/root/preseed + Chroot chroot "debconf-set-selections /root/preseed" + rm -f chroot/root/preseed + Chroot chroot "dpkg-reconfigure kexec-tools" + fi + ;; +esac + +for TASK in ${LB_TASKS} +do + case "${TASK}" in + gnome-desktop) + # gnome is the only desktop environment in this image + if [ -z "$(echo ${LB_TASKS} | sed -e 's|gnome-desktop||' -e 's| desktop ||' | grep desktop)" ] + then + # set display manager + echo "gdm shared/default-x-display-manager select gdm" > chroot/root/preseed + Chroot chroot "debconf-set-selections /root/preseed" + rm -f chroot/root/preseed + Chroot chroot "dpkg-reconfigure gdm" + echo "/usr/bin/gdm" > chroot/etc/X11/default-display-manager + + # set session manager + Chroot chroot "update-alternatives --set x-session-manager /usr/bin/gnome-session" + fi + ;; + + kde-desktop) + # kde is the only desktop-environment in this image + if [ -z "$(echo ${LB_TASKS} | sed -e 's|kde-desktop||' -e 's| desktop ||' | grep desktop)" ] + then + # set display manager + echo "kdm shared/default-x-display-manager select kdm" > chroot/root/preseed + Chroot chroot "debconf-set-selections /root/preseed" + rm -f chroot/root/preseed + Chroot chroot "dpkg-reconfigure kdm" + echo "/usr/bin/kdm" > chroot/etc/X11/default-display-manager + + # set session manager + Chroot chroot "update-alternatives --set x-session-manager /usr/bin/startkde" + + # get rid of resolvconf + Chroot chroot "dpkg -P resolvconf" + fi + ;; + + lxde-desktop) + # lxde is the only desktop environment in this image + if [ -z "$(echo ${LB_TASKS} | sed -e 's|lxde-desktop||' -e 's| desktop ||' | grep desktop)" ] + then + # set display manager + echo "gdm shared/default-x-display-manager select gdm" > chroot/root/preseed + Chroot chroot "debconf-set-selections /root/preseed" + rm -f chroot/root/preseed + Chroot chroot "dpkg-reconfigure gdm" + echo "/usr/bin/gdm" > chroot/etc/X11/default-display-manager + + # set session manager + Chroot chroot "update-alternatives --set x-session-manager /usr/bin/startlxde" + fi + ;; + + xfce-desktop) + # xfce is the only desktop environment in this image + if [ -z "$(echo ${LB_TASKS} | sed -e 's|xfce-desktop||' -e 's| desktop ||' | grep desktop)" ] + then + # set display manager + echo "gdm shared/default-x-display-manager select gdm" > chroot/root/preseed + Chroot chroot "debconf-set-selections /root/preseed" + rm -f chroot/root/preseed + Chroot chroot "dpkg-reconfigure gdm" + echo "/usr/bin/gdm" > chroot/etc/X11/default-display-manager + + # set session manager + Chroot chroot "update-alternatives --set x-session-manager /usr/bin/xfce4-session" + fi + ;; + esac +done + case "${LB_BINARY_IMAGES}" in netboot) if [ ! -f chroot/sbin/mount.cifs ] @@ -104,15 +190,31 @@ case "${LB_INITRAMFS_COMPRESSION}" in ;; esac -case "${LB_PARENT_DISTRIBUTION}" in - squeeze) - # Ensure readable permissions on initramfs. loop-aes-utils sets umask to - # protect GPG keys, which live-build does not support. - # Note: Use find rather than chmod on the wildcard, one never knows what - # people might do in local hooks, and there might be no initrds at all. - find chroot/boot -name 'initrd*' -print0 | xargs -r -0 chmod go+r - ;; -esac +# Ensure readable permissions on initramfs. loop-aes-utils sets umask to +# protect GPG keys, which live-build does not support. +# Note: Use find rather than chmod on the wildcard, one never knows what +# people might do in local hooks, and there might be no initrds at all. +find chroot/boot -name 'initrd*' -print0 | xargs -r -0 chmod go+r + +# Remove build systems clock drift +echo "0.0 0 0.0" > chroot/etc/adjtime + +# Remove cruft +rm -f chroot/boot/initrd*bak* +rm -f chroot/etc/apt/trusted.gpg~ +rm -f chroot/etc/group- chroot/etc/passwd- +rm -f chroot/etc/gshadow- chroot/etc/shadow- +rm -f chroot/var/cache/debconf/*-old +rm -f chroot/var/lib/dpkg/*-old +rm -f chroot/var/log/apt/term.log + +# Delete and re-create temporary directories +TEMP_DIRS="/tmp /var/tmp" +for DIR in ${TEMP_DIRS} +do + rm -rf "chroot/${DIR}" + install -d -m 1777 "chroot/${DIR}" +done if [ -n "${LB_ROOT_COMMAND}" ] then diff --git a/scripts/build/chroot_hooks b/scripts/build/chroot_hooks index dc9c18c69..7f11c9682 100755 --- a/scripts/build/chroot_hooks +++ b/scripts/build/chroot_hooks @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/chroot_hostname b/scripts/build/chroot_hostname index e013afaec..9f56901e4 100755 --- a/scripts/build/chroot_hostname +++ b/scripts/build/chroot_hostname @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -29,6 +29,8 @@ Require_stagefile .build/config .build/bootstrap case "${1}" in install) + Echo_message "Configuring file /etc/hostname" + # Checking stage file Check_stagefile .build/chroot_hostname @@ -38,15 +40,15 @@ case "${1}" in # Creating lock file Create_lockfile .lock - # Create hostname file - Echo_message "Configuring file /etc/hostname" + # Save hostname + mv chroot/bin/hostname chroot/bin/hostname.orig + # Create hostname file echo "localhost.localdomain" > chroot/etc/hostname - # Create custom hostname Echo_message "Configuring file /bin/hostname" - Chroot chroot dpkg-divert --rename --quiet --add /bin/hostname + # Create hostname program cat > chroot/bin/hostname << EOF #!/bin/sh @@ -77,9 +79,11 @@ EOF Echo_message "Deconfiguring file /bin/hostname" - # Remove custom hostname - rm -f chroot/bin/hostname - Chroot chroot dpkg-divert --rename --quiet --remove /bin/hostname + # Restore hostname file + if [ -e chroot/bin/hostname.orig ] + then + mv chroot/bin/hostname.orig chroot/bin/hostname + fi # Removing stage file rm -f .build/chroot_hostname diff --git a/scripts/build/chroot_hosts b/scripts/build/chroot_hosts index 6e44cf8f2..3adaebfe4 100755 --- a/scripts/build/chroot_hosts +++ b/scripts/build/chroot_hosts @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/chroot_includes b/scripts/build/chroot_includes index ccd12b36c..8d3c75eee 100755 --- a/scripts/build/chroot_includes +++ b/scripts/build/chroot_includes @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/chroot_install-packages b/scripts/build/chroot_install-packages index 2e02706c7..d7d916496 100755 --- a/scripts/build/chroot_install-packages +++ b/scripts/build/chroot_install-packages @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/chroot_interactive b/scripts/build/chroot_interactive index 422ac50cd..31a34fc8a 100755 --- a/scripts/build/chroot_interactive +++ b/scripts/build/chroot_interactive @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/chroot_linux-image b/scripts/build/chroot_linux-image index 58c15fd12..8ab9e6e30 100755 --- a/scripts/build/chroot_linux-image +++ b/scripts/build/chroot_linux-image @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -63,7 +63,7 @@ then FIRMWARE_PACKAGES="" - if [ "${LB_PARENT_DISTRIBUTION}" = "squeeze" ] + if [ "${LB_MODE}" = "ubuntu" ] || [ "${LB_MODE}" = "kubuntu" ] then _CONTENTS="${LB_PARENT_MIRROR_CHROOT}/dists/${LB_PARENT_DISTRIBUTION}/Contents-${LB_ARCHITECTURES}.gz" else @@ -90,7 +90,7 @@ then then # FIXME: account for the fact that PARENT_DISTRIBUTION and DISTRIBUTION might be the same (to not have overlapping cache files for contents). - if [ "${_PARENT_DISTRIBUTION}" = "squeeze" ] + if [ "${LB_MODE}" = "ubuntu" ] || [ "${LB_MODE}" = "kubuntu" ] then _CONTENTS="${LB_MIRROR_CHROOT}/dists/${LB_DISTRIBUTION}/Contents-${LB_ARCHITECTURES}.gz" else @@ -107,35 +107,6 @@ then done fi - if [ "${LB_PARENT_DISTRIBUTION}" = "squeeze" ] - then - # Filter out contrib packages if contrib is not enabled - if ! echo ${LB_ARCHIVE_AREAS} | grep -qs contrib - then - _FIRMWARE_PACKAGES="" - - for _PACKAGE in ${FIRMWARE_PACKAGES} - do - _FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES} $(echo ${_PACKAGE} | sed -e 's|^contrib/.*$||')" - done - - FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES}" - fi - - # Filter out non-free packages if non-free is not enabled - if ! echo ${LB_ARCHIVE_AREAS} | grep -qs non-free - then - _FIRMWARE_PACKAGES="" - - for _PACKAGE in ${FIRMWARE_PACKAGES} - do - _FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES} $(echo ${_PACKAGE} | sed -e 's|^non-free/.*$||')" - done - - FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES}" - fi - fi - # Drop section and keep package names only for _PACKAGE in ${FIRMWARE_PACKAGES} do diff --git a/scripts/build/chroot_live-packages b/scripts/build/chroot_live-packages index dff811673..5ef36cb8b 100755 --- a/scripts/build/chroot_live-packages +++ b/scripts/build/chroot_live-packages @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/chroot_package-lists b/scripts/build/chroot_package-lists index 207dd8d37..8a7f2e779 100755 --- a/scripts/build/chroot_package-lists +++ b/scripts/build/chroot_package-lists @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -82,7 +82,7 @@ then then # Generating package list Expand_packagelist "$(basename ${LIST})" "config/package-lists" \ - | grep -v '^#' >> chroot/root/packages.chroot + >> chroot/root/packages.chroot fi done diff --git a/scripts/build/chroot_preseed b/scripts/build/chroot_preseed index 77e94c9c2..1a70340d8 100755 --- a/scripts/build/chroot_preseed +++ b/scripts/build/chroot_preseed @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -38,8 +38,8 @@ Check_lockfile .lock # Creating lock file Create_lockfile .lock -if ls config/preseed/*.cfg > /dev/null 2>&1 || \ - ls config/preseed/*.cfg.chroot > /dev/null 2>&1 || \ +if ls config/preseed/*.preseed > /dev/null 2>&1 || \ + ls config/preseed/*.preseed.chroot > /dev/null 2>&1 || \ ls chroot/root/packages.chroot.cfg > /dev/null 2>&1 then # Check dependency @@ -48,7 +48,7 @@ then # Install dependency Install_package - for PRESEED in config/preseed/*.cfg config/preseed/*.cfg.chroot chroot/root/packages.chroot.cfg + for PRESEED in config/preseed/*.preseed config/preseed/*.preseed.chroot chroot/root/packages.chroot.cfg do if [ -e "${PRESEED}" ] then diff --git a/scripts/build/chroot_proc b/scripts/build/chroot_proc index 96437e563..2c13fceb1 100755 --- a/scripts/build/chroot_proc +++ b/scripts/build/chroot_proc @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/chroot_resolv b/scripts/build/chroot_resolv index 5d4f78005..42ba07161 100755 --- a/scripts/build/chroot_resolv +++ b/scripts/build/chroot_resolv @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/chroot_selinuxfs b/scripts/build/chroot_selinuxfs index 223d1accf..20e30fb35 100755 --- a/scripts/build/chroot_selinuxfs +++ b/scripts/build/chroot_selinuxfs @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/chroot_sysfs b/scripts/build/chroot_sysfs index 9ae890942..409728429 100755 --- a/scripts/build/chroot_sysfs +++ b/scripts/build/chroot_sysfs @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/chroot_sysv-rc b/scripts/build/chroot_sysv-rc index 685775989..4e1fc160e 100755 --- a/scripts/build/chroot_sysv-rc +++ b/scripts/build/chroot_sysv-rc @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -40,10 +40,10 @@ case "${1}" in # Creating lock file Create_lockfile .lock - if [ -e chroot/usr/sbin/policy-rc.d ] + if [ -f chroot/usr/sbin/policy-rc.d ] then # Save policy-rc.d file - Chroot chroot dpkg-divert --rename --quiet --add /usr/sbin/policy-rc.d + mv chroot/usr/sbin/policy-rc.d chroot/usr/sbin/policy-rc.d.orig fi # Create policy-rc.d file @@ -68,13 +68,13 @@ EOF # Creating lock file Create_lockfile .lock - # Remove custom policy-rc.d file - rm -f chroot/usr/sbin/policy-rc.d - - if [ -e chroot/usr/sbin/policy-rc.d.distrib ] + if [ -f chroot/usr/sbin/policy-rc.d.orig ] then # Restore policy-rc.d file - Chroot chroot dpkg-divert --rename --quiet --remove /usr/sbin/policy-rc.d + mv chroot/usr/sbin/policy-rc.d.orig chroot/usr/sbin/policy-rc.d + else + # Remove policy-rc.d file + rm -f chroot/usr/sbin/policy-rc.d fi # Removing stage file diff --git a/scripts/build/chroot_tmpfs b/scripts/build/chroot_tmpfs index 009f8c9fb..80311f531 100755 --- a/scripts/build/chroot_tmpfs +++ b/scripts/build/chroot_tmpfs @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/chroot_upstart b/scripts/build/chroot_upstart index 377a239a8..fd7c72f75 100755 --- a/scripts/build/chroot_upstart +++ b/scripts/build/chroot_upstart @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -27,12 +27,6 @@ Set_defaults # Requiring stage file Require_stagefile .build/config .build/bootstrap -# Check if system uses upstart -if [ ! -e chroot/sbin/initctl ] -then - exit 0 -fi - case "${1}" in install) Echo_message "Configuring file /sbin/initctl" @@ -46,9 +40,13 @@ case "${1}" in # Creating lock file Create_lockfile .lock - # Create custom initctl file - Chroot chroot dpkg-divert --rename --quiet --add /sbin/initctl + if [ -f chroot/sbin/initctl ] + then + # Save initctl file + mv chroot/sbin/initctl chroot/sbin/initctl.orig + fi + # Create initctl file cat > chroot/sbin/initctl << EOF #!/bin/sh echo "All runlevel operations denied by policy" >&2 @@ -70,9 +68,14 @@ EOF # Creating lock file Create_lockfile .lock - # Remove custom initctl file - rm -f chroot/sbin/initctl - Chroot chroot dpkg-divert --rename --quiet --remove /sbin/initctl + if [ -f chroot/sbin/initctl.orig ] + then + # Restore initctl file + mv chroot/sbin/initctl.orig chroot/sbin/initctl + else + # Remove initctl file + rm -f chroot/sbin/initctl + fi # Removing stage file rm -f .build/chroot_upstart diff --git a/scripts/build/clean b/scripts/build/clean index b5213adf8..2d1ad40ed 100755 --- a/scripts/build/clean +++ b/scripts/build/clean @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -63,8 +63,6 @@ do "${0}" noauto --source rmdir --ignore-fail-on-non-empty auto > /dev/null 2>&1 || true - rmdir --ignore-fail-on-non-empty local/bin > /dev/null 2>&1 || true - rmdir --ignore-fail-on-non-empty local > /dev/null 2>&1 || true ;; --cache) @@ -102,9 +100,7 @@ do rm -f binary*.tar.gz rm -f binary*.zsync* rm -f binary.sh - rm -f binary*.contents binary*.packages - rm -f MD5SUMS SHA1SUMS SHA256SUMS SHA512SUMS - rm -f md5sum.txt sha1sum.txt sha256sum.txt sha512sum.txt + rm -f binary.contents binary.packages md5sum.txt rm -rf binary rm -rf tftpboot diff --git a/scripts/build/config b/scripts/build/config index d1d820a6b..1aa266db9 100755 --- a/scripts/build/config +++ b/scripts/build/config @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -19,7 +19,7 @@ DESCRIPTION="$(Echo 'create configuration for live-build(7)')" USAGE="${PROGRAM} [--apt apt|aptitude]\n\ \t [--apt-ftp-proxy URL]\n\ \t [--apt-http-proxy URL]\n\ -\t [--apt-indices true|false\n\ +\t [--apt-indices true|false|none]\n\ \t [--apt-options OPTION|\"OPTIONS\"]\n\ \t [--aptitude-options OPTION|\"OPTIONS\"]\n\ \t [--apt-pipeline DEPTH]\n\ @@ -38,7 +38,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\ \t [--cache-indices true|false]\n\ \t [--cache-packages true|false]\n\ \t [--cache-stages STAGE|\"STAGES\"]\n\ -\t [--checksums md5|sha1|sha256|sha512|none]\n\ +\t [--checksums md5|sha1|sha256|none]\n\ \t [--compression bzip2|gzip|lzip|xz|none]\n\ \t [--config GIT_URL::GIT_BRANCH]\n\ \t [--zsync true|false]\n\ @@ -100,7 +100,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\ \t [--mirror-binary-updates URL]\n\ \t [--mirror-binary-backports URL]\n\ \t [--mirror-debian-installer URL]\n\ -\t [--mode debian|emdebian|ubuntu]\n\ +\t [--mode debian|emdebian|ubuntu|kubuntu]\n\ \t [--system live|normal]\n\ \t [--net-root-filesystem nfs|cfs]\n\ \t [--net-root-mountoptions OPTIONS]\n\ @@ -124,6 +124,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\ \t [--firmware-chroot true|false]\n\ \t [--swap-file-path PATH]\n\ \t [--swap-file-size MB]\n\ +\t [--syslinux-theme THEME_SUFFIX]\n\ \t [--tasksel apt|aptitude|tasksel]\n\ \t [--templates PATH]\n\ \t [--updates true|false]\n\ @@ -156,7 +157,7 @@ Local_arguments () grub-splash:,isohybrid-options:,hdd-label:,hdd-size:,iso-application:,iso-preparer:,iso-publisher:, iso-volume:,jffs2-eraseblock:,memtest:,net-root-filesystem:,net-root-mountoptions:, net-root-path:,net-root-server:,net-cow-filesystem:,net-cow-mountoptions:,net-cow-path:, - net-cow-server:,net-tarball:,firmware-binary:,firmware-chroot:,swap-file-path:,swap-file-size:, + net-cow-server:,net-tarball:,firmware-binary:,firmware-chroot:,swap-file-path:,swap-file-size:,syslinux-theme:, loadlin:,win32-loader:,source:,source-images:,breakpoints,conffile:,debug,force, help,ignore-system-defaults,quiet,usage,verbose,version,bootstrap-qemu-static:,bootstrap-qemu-arch:, bootstrap-qemu-exclude:" @@ -750,6 +751,11 @@ Local_arguments () shift 2 ;; + --syslinux-theme) + LB_SYSLINUX_THEME="${2}" + shift 2 + ;; + --loadlin) LB_LOADLIN="${2}" shift 2 @@ -866,40 +872,19 @@ then _CONFIG="" fi -if [ -e .build/config ] && [ -n "${_CONFIG}" ] +if [ -n "${_CONFIG}" ] then - if [ "${1}" != "noauto" ] - then - Echo_message "Ignoring --config ${_CONFIG}: ${PWD} is already a live-build configuration tree" - fi + _GIT_REPOSITORY="$(echo ${_CONFIG} | sed -e 's|::.*$||')" - _CONFIG="" -fi + Echo_message "Cloning ${_GIT_REPOSITORY}" + git clone ${_GIT_REPOSITORY} ./ -if [ -n "${_CONFIG}" ] -then - if [ -e "${_CONFIG}" ] || [ -e "/usr/share/live/images/${_CONFIG}" ] + if [ "${_GIT_REPOSITORY}" != "${_CONFIG}" ] then - if [ ! -e "${_CONFIG}" ] && [ -e "/usr/share/live/images/${_CONFIG}" ] - then - _CONFIG="/usr/share/live/images/${_CONFIG}" - fi - - Echo_message "Copying ${_CONFIG}" - tar -C "${_CONFIG}" -c . | tar -C ./ -x - else - _GIT_REPOSITORY="$(echo ${_CONFIG} | sed -e 's|::.*$||')" - - Echo_message "Cloning ${_GIT_REPOSITORY}" - git clone ${_GIT_REPOSITORY} ./ - - if [ "${_GIT_REPOSITORY}" != "${_CONFIG}" ] - then - _GIT_BRANCH="$(echo ${_CONFIG} | awk -F\:\: '{ print $NF }')" - - Echo_message "Checking out ${_GIT_BRANCH}" - git checkout ${_GIT_BRANCH} - fi + _GIT_BRANCH="$(echo ${_CONFIG} | awk -F\:\: '{ print $NF }')" + + Echo_message "Checking out ${_GIT_BRANCH}" + git checkout ${_GIT_BRANCH} fi if [ -e auto/config ] @@ -925,16 +910,11 @@ then fi # Reading system configuration -if ls /etc/live/build.conf > /dev/null 2>&1 || ls /etc/live/build/* > /dev/null 2>&1 +if ! In_list "--ignore-system-defaults" "${@}" then - if In_list "--ignore-system-defaults" "${@}" - then - Echo_message "Ignoring defaults in %s" "/etc/live/build.conf" - else - Echo_message "Using defaults in %s" "/etc/live/build.conf" + Echo_message "Considering defaults defined in %s" "/etc/live/build.conf" - Read_conffiles /etc/live/build.conf /etc/live/build/* - fi + Read_conffiles /etc/live/build.conf /etc/live/build/* fi # Reading existing configuration @@ -955,14 +935,15 @@ Check_defaults if [ ! -e config ] then - Echo_message "Creating config tree for a ${LB_MODE}/${LB_DISTRIBUTION}/${LB_ARCHITECTURES} system" + Echo_message "Creating config tree for a ${LB_MODE}/${LB_ARCHITECTURES} system" else - Echo_message "Updating config tree for a ${LB_MODE}/${LB_DISTRIBUTION}/${LB_ARCHITECTURES} system" + Echo_message "Updating config tree for a ${LB_MODE}/${LB_ARCHITECTURES} system" fi # Creating bootstrap configuration mkdir -p config mkdir -p config/includes +mkdir -p config/templates # Creating live-build configuration cat > config/common << EOF @@ -1456,6 +1437,10 @@ LB_SWAP_FILE_PATH="${LB_SWAP_FILE_PATH}" # \$LB_SWAP_FILE_SIZE: set swap file size # (Default: ${LB_SWAP_FILE_SIZE}) LB_SWAP_FILE_SIZE="${LB_SWAP_FILE_SIZE}" + +# \$LB_SYSLINUX_THEME: set syslinux theme package +# (Default: ${LB_SYSLINUX_THEME}) +LB_SYSLINUX_THEME="${LB_SYSLINUX_THEME}" EOF # Creating lb_source_* configuration diff --git a/scripts/build/source b/scripts/build/source index 4296c2750..b200deb24 100755 --- a/scripts/build/source +++ b/scripts/build/source @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -51,7 +51,6 @@ lb chroot_archives source install ${@} lb source_debian-live ${@} lb source_debian ${@} lb source_disk ${@} -lb source_hooks ${@} lb source_checksums ${@} # Building images diff --git a/scripts/build/source_checksums b/scripts/build/source_checksums index 2923a6eb8..dac79762f 100755 --- a/scripts/build/source_checksums +++ b/scripts/build/source_checksums @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -50,15 +50,7 @@ do for CHECKSUM in ${LB_CHECKSUMS} do - case "${LB_MODE}" in - progress-linux) - CHECKSUMS="$(echo ${CHECKSUM} | tr [a-z] [A-Z])SUMS" - ;; - - *) - CHECKSUMS="${CHECKSUM}sum.txt" - ;; - esac + CHECKSUMS="$(echo ${CHECKSUM} | tr [a-z] [A-Z])SUMS" Echo_message "Begin creating source ${CHECKSUMS}..." @@ -72,7 +64,6 @@ do cd ${DIRECTORY} find . -type f \ \! -path './*SUMS' \ - \! -path './*sum.txt' \ -print0 | sort -z | xargs -0 ${CHECKSUM}sum > ../${CHECKSUMS} cat > ${CHECKSUMS} << EOF diff --git a/scripts/build/source_debian b/scripts/build/source_debian index 433a7befc..61603f7f5 100755 --- a/scripts/build/source_debian +++ b/scripts/build/source_debian @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -55,39 +55,19 @@ Chroot chroot "dpkg --get-selections" | awk '{ print $1 }' > source-selection.tx cat >> source-selection.txt << EOF ${LB_BOOTLOADER} live-build +genisoimage +parted +squashfs-tools +mtd-tools EOF -case "${LB_BINARY_IMAGES}" in - iso*) - echo "xorriso" >> source-selection.txt - ;; - - hdd*) - echo "parted" >> source-selection.txt - ;; -esac - -case "${LB_CHROOT_FILESYSTEM}" in - squashfs) - echo "squashfs-tools" >> source-selection.txt - ;; -esac - case "${LB_BINARY_FILESYSTEM}" in fat*) echo "dosfstools" >> source-selection.txt ;; ntfs) - case "${LB_PARENT_DISTRIBUTION}" in - squeeze) - echo "ntfsprogs" >> source-selection.txt - ;; - - *) - echo "ntfs-3g" >> source-selection.txt - ;; - esac + echo "ntfs-3g" >> source-selection.txt ;; esac diff --git a/scripts/build/source_debian-live b/scripts/build/source_debian-live index d71b69f04..868d9d972 100755 --- a/scripts/build/source_debian-live +++ b/scripts/build/source_debian-live @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/source_disk b/scripts/build/source_disk index 2cd868e4a..380fdd599 100755 --- a/scripts/build/source_disk +++ b/scripts/build/source_disk @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -66,6 +66,12 @@ case "${LB_MODE}" in TRACE="" ;; + kubuntu) + TITLE="Kubuntu" + STRING="Build ${ARCHITECTURE}" + TRACE="" + ;; + progress-linux) TITLE="Progress Linux" STRING="${VERSION} (${DISTRIBUTION}) - ${ARCHITECTURE}" diff --git a/scripts/build/source_hdd b/scripts/build/source_hdd index 59c66b44b..0d764079c 100755 --- a/scripts/build/source_hdd +++ b/scripts/build/source_hdd @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/source_hooks b/scripts/build/source_hooks deleted file mode 100755 index f3316bd97..000000000 --- a/scripts/build/source_hooks +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/sh - -## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> -## -## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. -## This is free software, and you are welcome to redistribute it -## under certain conditions; see COPYING for details. - - -set -e - -# Including common functions -[ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh - -# Setting static variables -DESCRIPTION="$(Echo 'execute hooks in source')" -HELP="" -USAGE="${PROGRAM} [--force]" - -Arguments "${@}" - -# Reading configuration files -Read_conffiles config/all config/common config/bootstrap config/chroot config/source config/source -Set_defaults - -Echo_message "Begin executing hooks..." - -# Requiring stage file -Require_stagefile .build/config .build/bootstrap - -# Checking stage file -Check_stagefile .build/source_hooks - -# Checking lock file -Check_lockfile .lock - -# Creating lock file -Create_lockfile .lock - -## Processing distribution hooks - -# Running hooks -for _HOOK in ${LB_BINARY_HOOKS} -do - for LOCATION in "${LIVE_BUILD}/hooks" /usr/share/live/build/hooks - do - for FILE in "${LOCATION}"/????-"${_HOOK}".source - do - if [ -e "${FILE}" ] - then - cd source - "${FILE}" || { Echo_error "${_HOOK} failed (exit non-zero). You should check for errors."; exit 1 ;} - cd "${OLDPWD}" - fi - done - done -done - -## Processing local hooks - -if Find_files config/hooks/*.source -then - for HOOK in config/hooks/*.source - do - # Making hook executable - if [ ! -x "${HOOK}" ] - then - chmod +x "${HOOK}" - fi - - # Executing hook - ./"${HOOK}" || { Echo_error "${HOOK} failed (exit non-zero). You should check for errors."; exit 1 ;} - done - - # Creating stage file - Create_stagefile .build/source_hooks -fi diff --git a/scripts/build/source_iso b/scripts/build/source_iso index e4981eaf5..a9f0c281f 100755 --- a/scripts/build/source_iso +++ b/scripts/build/source_iso @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -53,7 +53,7 @@ Check_lockfile .lock Create_lockfile .lock # Checking depends -Check_package chroot/usr/bin/xorriso xorriso +Check_package chroot/usr/bin/genisoimage genisoimage # Installing depends Install_package @@ -64,45 +64,41 @@ then rm -f source.iso fi -# Handle xorriso generic options -XORRISO_OPTIONS="-as mkisofs -r -J -joliet-long -l -cache-inodes" - -# Handle xorriso live-build specific options if [ "${_QUIET}" = "true" ] then - XORRISO_OPTIONS="${XORRISO_OPTIONS} -quiet" + GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -quiet" fi if [ "${_VERBOSE}" = "true" ] then - XORRISO_OPTIONS="${XORRISO_OPTIONS} -v" + GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -v" fi if [ -n "${LB_ISO_APPLICATION}" ] && [ "${LB_ISO_APPLICATION}" != "none" ] then - XORRISO_OPTIONS="${XORRISO_OPTIONS} -A \"${LB_ISO_APPLICATION}\"" + GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -A \"${LB_ISO_APPLICATION}\"" fi if [ -n "${LB_ISO_PREPARER}" ] && [ "${LB_ISO_PREPARER}" != "none" ] then - XORRISO_OPTIONS="${XORRISO_OPTIONS} -p \"${LB_ISO_PREPARER}\"" + GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -p \"${LB_ISO_PREPARER}\"" fi if [ -n "${LB_ISO_PUBLISHER}" ] && [ "${LB_ISO_PUBLISHER}" != "none" ] then - XORRISO_OPTIONS="${XORRISO_OPTIONS} -publisher \"${LB_ISO_PUBLISHER}\"" + GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -publisher \"${LB_ISO_PUBLISHER}\"" fi if [ -n "${LB_ISO_VOLUME}" ] && [ "${LB_ISO_VOLUME}" != "none" ] then - XORRISO_OPTIONS="${XORRISO_OPTIONS} -V \"${LB_ISO_VOLUME}\"" + GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -V \"${LB_ISO_VOLUME}\"" fi # Moving image mv source chroot cat >> chroot/source.sh << EOF -xorriso ${XORRISO_OPTIONS} -o source.iso source +genisoimage ${GENISOIMAGE_OPTIONS} -o source.iso -r -J -l -cache-inodes source EOF Chroot chroot "sh source.sh" diff --git a/scripts/build/source_tar b/scripts/build/source_tar index 5073c0f07..0ef302e44 100755 --- a/scripts/build/source_tar +++ b/scripts/build/source_tar @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/scripts/build/testroot b/scripts/build/testroot index 9c63b79b4..9ded104c9 100755 --- a/scripts/build/testroot +++ b/scripts/build/testroot @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it |