diff options
Diffstat (limited to 'helpers')
-rwxr-xr-x | helpers/lh_binary_debian-installer | 108 | ||||
-rwxr-xr-x | helpers/lh_binary_disk | 88 | ||||
-rwxr-xr-x | helpers/lh_bootstrap_cache | 73 | ||||
-rwxr-xr-x | helpers/lh_chroot_cache | 75 | ||||
-rwxr-xr-x | helpers/lh_clean | 15 | ||||
-rwxr-xr-x | helpers/lh_config | 12 |
6 files changed, 205 insertions, 166 deletions
diff --git a/helpers/lh_binary_debian-installer b/helpers/lh_binary_debian-installer index b407878..7d5cace 100755 --- a/helpers/lh_binary_debian-installer +++ b/helpers/lh_binary_debian-installer @@ -35,22 +35,22 @@ Set_defaults # Setting remote d-i directories case "${LH_DEBIAN_INSTALLER}" in - enabled|cdrom|live) + cdrom|netinst|businesscard) DI="cdrom" DI_GTK="${DI}/gtk" DI_KERNEL="vmlinuz" ;; - disabled) - exit 0 - ;; - netboot) - DI="netboot/debian-installer/i386" - DI_GTK="netboot/gtk/debian-installer/i386" + DI="netboot/debian-installer/${LH_ARCHITECTURE}" + DI_GTK="netboot/gtk/debian-installer/${LH_ARCHITECTURE}" DI_KERNEL="linux" ;; + disabled) + exit 0 + ;; + *) Echo_error "debian-installer flavor ${LH_DEBIAN_INSTALLER} not supported." exit 1 @@ -121,61 +121,66 @@ then fi fi -# Debian Installer daily builds -case "${LH_ARCHITECTURE}" in - alpha) - URL="http://people.debian.org/~vorlon/d-i/alpha/daily/" - ;; +if [ "${LH_DEBIAN_INSTALLER_DAILY}" = "enabled" ] +then + # Debian Installer daily builds + case "${LH_ARCHITECTURE}" in + alpha) + URL="http://people.debian.org/~vorlon/d-i/alpha/daily/" + ;; - amd64) - URL="http://people.debian.org/~aba/d-i/images/daily/" - ;; + amd64) + URL="http://people.debian.org/~aba/d-i/images/daily/" + ;; - arm) - URL="http://people.debian.org/~kmuto/d-i/images/daily/" - ;; + arm) + URL="http://people.debian.org/~kmuto/d-i/images/daily/" + ;; - hppa) - URL="http://people.debian.org/~kyle/d-i/hppa/daily/" - ;; + hppa) + URL="http://people.debian.org/~kyle/d-i/hppa/daily/" + ;; - i386) - URL="http://people.debian.org/~joeyh/d-i/images/daily/" - ;; + i386) + URL="http://people.debian.org/~joeyh/d-i/images/daily/" + ;; - ia64) - URL="http://people.debian.org/~dannf/d-i/images/daily/" - ;; + ia64) + URL="http://people.debian.org/~dannf/d-i/images/daily/" + ;; - m68k) - URL="http://people.debian.org/~smarenka/d-i/images-m68k/daily/" - ;; + m68k) + URL="http://people.debian.org/~smarenka/d-i/images-m68k/daily/" + ;; - mips) - URL="http://people.debian.org/~ths/d-i/mips/images/daily/" - ;; + mips) + URL="http://people.debian.org/~ths/d-i/mips/images/daily/" + ;; - mipsel) - URL="http://people.debian.org/~ths/d-i/mipsel/images/daily/" - ;; + mipsel) + URL="http://people.debian.org/~ths/d-i/mipsel/images/daily/" + ;; - powerpc) - URL="http://people.debian.org/~wouter/d-i/powerpc/daily/" - ;; + powerpc) + URL="http://people.debian.org/~wouter/d-i/powerpc/daily/" + ;; - s390) - URL="http://lophos.multibuild.org/d-i/images/daily/" - ;; + s390) + URL="http://lophos.multibuild.org/d-i/images/daily/" + ;; - sparc) - URL="http://people.debian.org/~stappers/d-i/images/daily/" - ;; + sparc) + URL="http://people.debian.org/~stappers/d-i/images/daily/" + ;; - *) - Echo_error "No daily-builds found for your architecture." - exit 1 - ;; -esac + *) + Echo_error "No daily-builds found for your architecture." + exit 1 + ;; + esac +else + URL="${LH_MIRROR_BOOTSTRAP}/dists/${LH_DISTRIBUTION}/main/installer-${LH_ARCHITECTURE}/current/images/" +fi # Downloading debian-installer mkdir -p "${DESTDIR_DI}" @@ -259,6 +264,9 @@ then # Move files cp "${FILE}" binary/pool/main/"${LETTER}"/"${SOURCE}" done +else + Echo_error "E: Could not find cache/packages_bootstrap" + exit 1 fi # Including local debs diff --git a/helpers/lh_binary_disk b/helpers/lh_binary_disk index 65470be..65c671c 100755 --- a/helpers/lh_binary_disk +++ b/helpers/lh_binary_disk @@ -61,38 +61,54 @@ eval VERSION="$`echo VERSION_${LH_DISTRIBUTION}`" case "${LH_MODE}" in debian) - if [ -d binary/pool/main/b/base-installer ] - then - if [ -d binary/pool/main/l/live-installer ] - then - TYPE="LIVE/INSTALL" - fi - - TYPE="LIVE/NETINST" - else - TYPE="LIVE" - fi - - echo "Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} ${TYPE} Binary `date +%Y%m%d-%H:%M`" > binary/.disk/info - ;; + case "${LH_DEBIAN_INSTALLER}" in + cdrom) + echo "main" > binary/.disk/base_components - ubuntu) - echo "Ubuntu Linux ${VERSION} \"${DISTRIBUTION}\" - Unofficial ${ARCHITECTURE} LIVE/NETINST Binary `date +%Y%m%d-%H:%M`" > binary/.disk/info - # Ubuntu 7.04 "Feisty Fawn" - Release i386 (20070418) - ;; -esac + touch binary/.disk/base_installable -if [ "${LH_DEBIAN_INSTALLER}" != "disabled" ] -then - echo "main" > binary/.disk/base_components + echo "full_cd" > binary/.disk/cd_type + + echo "Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} CD Binary `date +%Y%m%d-%H:%M`" > binary/.disk/info + +cat > binary/.disk/udeb_include << EOF +netcfg +ethdetect +pcmcia-cs-udeb +pcmciautils-udeb +wireless-tools-udeb +EOF + + ;; + + netinst) + echo "main" > binary/.disk/base_components + + touch binary/.disk/base_installable + + echo "not_complete" > binary/.disk/cd_type - touch binary/.disk/base_installable + echo "Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} NETINST Binary `date +%Y%m%d-%H:%M`" > binary/.disk/info - echo "not_complete" > binary/.disk/cd_type +cat > binary/.disk/udeb_include << EOF +netcfg +ethdetect +pcmcia-cs-udeb +pcmciautils-udeb +wireless-tools-udeb +EOF + + ;; + + businesscard) + echo "main" > binary/.disk/base_components + + echo "not_complete" > binary/.disk/cd_type - #touch binary/.disk/mkisofs + echo "Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} BC Binary `date +%Y%m%d-%H:%M`" > binary/.disk/info cat > binary/.disk/udeb_include << EOF +choose-mirror netcfg ethdetect pcmcia-cs-udeb @@ -100,10 +116,24 @@ pcmciautils-udeb wireless-tools-udeb EOF - if [ -d binary/pool/main/l/live-installer ] - then - echo "live-installer" >> binary/.disk/udeb_include - fi + ;; + + disabled) + echo "Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} LIVE Binary `date +%Y%m%d-%H:%M`" > binary/.disk/info + ;; + esac + ;; + + ubuntu) + # FIXME + echo "Ubuntu Linux ${VERSION} \"${DISTRIBUTION}\" - Unofficial ${ARCHITECTURE} LIVE/NETINST Binary `date +%Y%m%d-%H:%M`" > binary/.disk/info + # Ubuntu 7.04 "Feisty Fawn" - Release i386 (20070418) + ;; +esac + +if [ -d binary/pool/main/l/live-installer ] +then + echo "live-installer" >> binary/.disk/udeb_include fi # Creating stage file diff --git a/helpers/lh_bootstrap_cache b/helpers/lh_bootstrap_cache index 8d811a9..b253b5d 100755 --- a/helpers/lh_bootstrap_cache +++ b/helpers/lh_bootstrap_cache @@ -37,49 +37,50 @@ Echo_message "Begin caching bootstrap stage..." for STAGE in ${LH_CACHE_STAGES} do - case "${1}" in - restore) - # Checking stage file - Check_stagefile .stage/bootstrap_cache.restore + if [ "${STAGE}" = "bootstrap" ] + then + case "${1}" in + restore) + # Checking stage file + Check_stagefile .stage/bootstrap_cache.restore + + if [ -d cache/stages_bootstrap ] + then + # Checking lock file + Check_lockfile .lock - # Checking lock file - Check_lockfile .lock + # Creating lock file + Create_lockfile .lock - # Creating lock file - Create_lockfile .lock + # Removing old chroot + rm -rf chroot - if [ "${STAGE}" = "bootstrap" ] && [ -d cache/stages_bootstrap ] - then - # Removing old chroot - rm -rf chroot + # Restoring old cache + ${LH_ROOT_COMMAND} cp -a cache/stages_bootstrap chroot - # Restoring old cache - ${LH_ROOT_COMMAND} cp -a cache/stages_bootstrap chroot + if [ -n "${LH_ROOT_COMMAND}" ] + then + ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` chroot + fi - if [ -n "${LH_ROOT_COMMAND}" ] - then - ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` chroot - fi + # Creating stage file + Create_stagefile .stage/bootstrap_cache.restore + Create_stagefile .stage/bootstrap - # Creating stage file - Create_stagefile .stage/bootstrap_cache.restore - - exit 0 - fi - ;; + exit 0 + fi + ;; - save) - # Checking stage file - Check_stagefile .stage/bootstrap_cache.save + save) + # Checking stage file + Check_stagefile .stage/bootstrap_cache.save - # Checking lock file - Check_lockfile .lock + # Checking lock file + Check_lockfile .lock - # Creating lock file - Create_lockfile .lock + # Creating lock file + Create_lockfile .lock - if [ "${STAGE}" = "bootstrap" ] - then rm -rf cache/stages_bootstrap mkdir -p cache @@ -93,7 +94,7 @@ do # Creating stage file Create_stagefile .stage/bootstrap_cache.save - fi - ;; - esac + ;; + esac + fi done diff --git a/helpers/lh_chroot_cache b/helpers/lh_chroot_cache index 157a48e..4ec2d13 100755 --- a/helpers/lh_chroot_cache +++ b/helpers/lh_chroot_cache @@ -37,49 +37,49 @@ Echo_message "Begin caching chroot stage..." for STAGE in ${LH_CACHE_STAGES} do - case "${1}" in - restore) - # Checking stage file - Check_stagefile .stage/chroot_cache.restore + if [ "${STAGE}" = "chroot" ] + then + case "${1}" in + restore) + # Checking stage file + Check_stagefile .stage/chroot_cache.restore + + if [ -d cache/stages_chroot ] + then + # Checking lock file + Check_lockfile .lock - # Checking lock file - Check_lockfile .lock + # Creating lock file + Create_lockfile .lock - # Creating lock file - Create_lockfile .lock + # Removing old chroot + rm -rf chroot - if [ "${STAGE}" = "chroot" ] && [ -d cache/stages_chroot ] - then - # Removing old chroot - rm -rf chroot + # Restoring old cache + ${LH_ROOT_COMMAND} cp -a cache/stages_chroot chroot - # Restoring old cache - ${LH_ROOT_COMMAND} cp -a cache/stages_chroot chroot + if [ -n "${LH_ROOT_COMMAND}" ] + then + ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` chroot + fi - if [ -n "${LH_ROOT_COMMAND}" ] - then - ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` chroot - fi + # Creating stage file + Create_stagefile .stage/chroot_cache.restore - # Creating stage file - Create_stagefile .stage/chroot_cache.restore - - exit 0 - fi - ;; + exit 0 + fi + ;; - save) - # Checking stage file - Check_stagefile .stage/chroot_cache.save + save) + # Checking stage file + Check_stagefile .stage/chroot_cache.save - # Checking lock file - Check_lockfile .lock + # Checking lock file + Check_lockfile .lock - # Creating lock file - Create_lockfile .lock + # Creating lock file + Create_lockfile .lock - if [ "${STAGE}" = "chroot" ] - then rm -rf cache/stages_chroot mkdir -p cache @@ -90,7 +90,10 @@ do then ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` cache/stages_chroot fi - fi - ;; - esac + + # Creating stage file + Create_stagefile .stage/chroot_cache.save + ;; + esac + fi done diff --git a/helpers/lh_clean b/helpers/lh_clean index 021100f..0858a27 100755 --- a/helpers/lh_clean +++ b/helpers/lh_clean @@ -43,12 +43,6 @@ do "${0}" binary "${0}" stage "${0}" source - - if [ -d chroot ] - then - mkdir -p .stage - touch .stage/bootstrap - fi ;; cache) @@ -67,13 +61,6 @@ do ${LH_ROOT_COMMAND} rm -rf chroot chroot.tmp - if [ "${PURGE}" != "true" ] && [ -d cache/stages_bootstrap ] - then - ${LH_ROOT_COMMAND} cp -a cache/stages_bootstrap chroot - mkdir -p .stage - touch .stage/bootstrap - fi - rm -f .stage/chroot* ;; @@ -92,7 +79,7 @@ do ;; purge) - PURGE="true" "${0}" all + "${0}" all "${0}" cache ;; diff --git a/helpers/lh_config b/helpers/lh_config index 43633a0..5144c1f 100755 --- a/helpers/lh_config +++ b/helpers/lh_config @@ -48,6 +48,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\ \t [--debconf-nowarnings enabled|disabled]\n\ \t [--debconf-priority low|medium|high|critical]\n\ \t [--debian-installer enabled|disabled]\n\ +\t [--debian-installer-daily enabled|disabled]\n\ \t [--debug]\n\ \t [-d|--distribution CODENAME]\n\ \t [-e|--encryption aes128|aes192|aes256]\n\ @@ -99,7 +100,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\ Local_arguments () { - ARGUMENTS="`getopt --longoptions apt:,apt-ftp-proxy:,apt-http-proxy:,apt-pdiffs:,apt-pipeline:,apt-recommends:,apt-secure:,bootstrap:,cache:,cache-indices:,cache-packages:,cache-stages:,debconf-frontend:,debconf-nowarnings:,debconf-priority:,genisoimage:,initramfs:,losetup:,mode:,root-command:,tasksel:,includes:,templates:,architecture:,bootstrap-config:,bootstrap-flavour:,bootstrap-keyring:,distribution:,mirror-bootstrap:,mirror-bootstrap-security:,mirror-binary:,mirror-binary-security:,sections:,chroot-filesystem:,union-filesystem:,hooks:,interactive:,keyring-packages:,language:,linux-flavours:,linux-packages:,packages:,packages-lists:,tasks:,security:,symlinks:,sysvinit:,binary-images:,binary-indices:,bootappend:,bootloader:,chroot-build:,debian-installer:,encryption:,grub-splash:,hostname:,iso-application:,iso-preparer:,iso-publisher:,iso-volume:,iso-memtest:,net-filesystem:,net-mountoptions:,net-path:,net-server:,syslinux-splash:,syslinux-timeout:,username:,source:,source-images:,breakpoints,conffile:,debug,force,help,quiet,usage,verbose,version --name=${PROGRAM} --options a:f:d:m:l:k:p:b:e:s:c:huv --shell sh -- "${@}"`" + ARGUMENTS="`getopt --longoptions apt:,apt-ftp-proxy:,apt-http-proxy:,apt-pdiffs:,apt-pipeline:,apt-recommends:,apt-secure:,bootstrap:,cache:,cache-indices:,cache-packages:,cache-stages:,debconf-frontend:,debconf-nowarnings:,debconf-priority:,genisoimage:,initramfs:,losetup:,mode:,root-command:,tasksel:,includes:,templates:,architecture:,bootstrap-config:,bootstrap-flavour:,bootstrap-keyring:,distribution:,mirror-bootstrap:,mirror-bootstrap-security:,mirror-binary:,mirror-binary-security:,sections:,chroot-filesystem:,union-filesystem:,hooks:,interactive:,keyring-packages:,language:,linux-flavours:,linux-packages:,packages:,packages-lists:,tasks:,security:,symlinks:,sysvinit:,binary-images:,binary-indices:,bootappend:,bootloader:,chroot-build:,debian-installer:,debian-installer-daily:,encryption:,grub-splash:,hostname:,iso-application:,iso-preparer:,iso-publisher:,iso-volume:,iso-memtest:,net-filesystem:,net-mountoptions:,net-path:,net-server:,syslinux-splash:,syslinux-timeout:,username:,source:,source-images:,breakpoints,conffile:,debug,force,help,quiet,usage,verbose,version --name=${PROGRAM} --options a:f:d:m:l:k:p:b:e:s:c:huv --shell sh -- "${@}"`" if [ "${?}" != "0" ] then @@ -411,6 +412,11 @@ Local_arguments () shift 2 ;; + --debian-installer-daily) + LH_DEBIAN_INSTALLER_DAILY="${2}" + shift 2 + ;; + -e|--encryption) LH_ENCRYPTION="${2}" shift 2 @@ -847,6 +853,10 @@ LH_CHROOT_BUILD="${LH_CHROOT_BUILD}" # (Default: ${LH_DEBIAN_INSTALLER}) LH_DEBIAN_INSTALLER="${LH_DEBIAN_INSTALLER}" +# \$LH_DEBIAN_INSTALLER_DAILY: set daily images +# (Default: ${LH_DEBIAN_INSTALLER_DAILY}) +LH_DEBIAN_INSTALLER_DAILY="${LH_DEBIAN_INSTALLER_DAILY}" + # \$LH_ENCRYPTION: set encrytion # (Default: empty) LH_ENCRYPTION="${LH_ENCRYPTION}" |