=== modified file 'bin/fsb' --- bin/fsb 2013-05-14 16:35:20 +0000 +++ bin/fsb 2013-05-14 07:29:07 +0000 @@ -13,10 +13,7 @@ : ${FSB_FUNCTIONS_DIR:=$FSB_BASE_DIR/functions} : ${FSB_DOWNLOADS_DIR:=$FSB_BASE_DIR/downloads} : ${FSB_SCRIPTS_DIR:=$FSB_BASE_DIR/scripts} -: ${FSB_TEMPLATE_DIR:=$FSB_BASE_DIR/template} -: ${FSB_GENTOO_MIRROR:=ftp://ftp.fi.muni.cz/pub/linux/gentoo/} -: ${FSB_OVERLAY_SRC:=/home/ccx/bzr/prosys} -: ${FSB_PORTAGE_SNAPSHOTS:=/mnt/data/snapshots/portage} +: ${GENTOO_MIRROR:=ftp://ftp.fi.muni.cz/pub/linux/gentoo/} # basic initialisation @@ -95,7 +92,7 @@ # build functions typeset -ga build_dir_stack -typeset -g build_dir build_dir_done +typeset -g build_dir build_dir_check() { # check whether there's stage ready inside a directory @@ -116,14 +113,14 @@ [[ -n $build_dir ]] && build_dir_stack+=$build_dir build_dir=$1 [[ -d $1:h ]] || mkdir -p $1:h || die "could not mkdir $1:h for stage $1:t" - # [[ -d $1 ]] || fsb_stage_init $1 || die "failed to create stage directory: $1" + [[ -d $1 ]] || fsb_stage_init $1 || die "failed to create stage directory: $1" } build_target() { (($+fsb_targets[${1}])) || die "no such target: $1" $fsb_targets[${1}] || die "build of target $1 failed" [[ -d $build_dir ]] || die "'$build_dir' is not valid stage directory, target $1 failed" - grep -qFe $1 $build_dir/.fsb_done || print -r - $1 >> $build_dir/.fsb_done + print -r - $1 >> $build_dir/.fsb_done if (( $#build_dir_stack )); then fsb_stage_clone $build_dir $build_dir_stack[-1] # pop from stack === removed file 'functions/fsb_infer_gentoo_settings' --- functions/fsb_infer_gentoo_settings 2013-05-14 16:35:20 +0000 +++ functions/fsb_infer_gentoo_settings 1970-01-01 00:00:00 +0000 @@ -1,33 +0,0 @@ -[[ -n $STAGE_GENTOO_NAME ]] || die 'STAGE_GENTOO_NAME needs to be set' -if [[ -z $STAGE_GENTOO_ARCH ]]; then - typeset -g STAGE_GENTOO_ARCH - case $STAGE_GENTOO_NAME in - (latest-stage3-i[456]86*) - STAGE_GENTOO_ARCH=x86;; - (latest-stage3-amd64*) - STAGE_GENTOO_ARCH=amd64;; - (*) - die 'STAGE_GENTOO_ARCH needs to be set for' $STAGE_GENTOO_NAME - esac -fi - -if [[ -z $STAGE_GENTOO_MACHINE ]]; then - typeset -g STAGE_GENTOO_MACHINE - case $STAGE_GENTOO_NAME in - (latest-stage3-i486*) - STAGE_GENTOO_MACHINE=i486;; - (latest-stage3-i586*) - STAGE_GENTOO_MACHINE=i586;; - (latest-stage3-i686*) - STAGE_GENTOO_MACHINE=i686;; - (latest-stage3-amd64*) - STAGE_GENTOO_MACHINE=amd64;; - (*) - die 'STAGE_GENTOO_MACHINE needs to be set for' $STAGE_GENTOO_NAME - esac -fi - -: ${STAGE_GENTOO_BRANCH:=stable} -: ${STAGE_PORTAGE_TS:=${$(> $dir/chroot.conf || die;; - (amd64) echo 'SETARCH=x86_64' >> $dir/chroot.conf || die;; -esac - -cat >>$dir/chroot.conf <>$dir/etc/portage/make.conf <$dir/etc/portage/make.profile/parent || die -echo ccx-autobuild:arch/$STAGE_GENTOO_MACHINE >>$dir/etc/portage/make.profile/parent || die === removed directory 'template' === removed file 'template/chroot.sh' --- template/chroot.sh 2013-05-14 16:35:20 +0000 +++ template/chroot.sh 1970-01-01 00:00:00 +0000 @@ -1,74 +0,0 @@ -#!/bin/zsh -DIR=$0:a:h -PS4='+\t \s> ' - -cd "$DIR" - -declare -A NEW_ENV -NEW_ENV[HOST]=$DIR:t -NEW_ENV[HOME]=/root/ -NEW_ENV[PATH]="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin" -# NEW_ENV[TERM]="${TERM%-256color}" - -do_chroot() { - local -a call - call=( env -i - ) - for key val in ${(kv)NEW_ENV}; do - call+="$key=$val" - done - (($+SETARCH)) && call+=( setarch $SETARCH ) - $call chroot . "$@" - RET=$? - echo "command $* returned $RET" -} - -umount=( ) - -trymount() { - local DST=${*[-1]} - if mount | grep -q "$DIR/$DST" - then - echo "$DST already mounted" - else - echo "mounting $DST" - mount "$@" - umount=( $DST $umount ) - fi -} - -[[ -f ./chroot.conf ]] && source ./chroot.conf - -: ${PORTDIR:=/usr/portage} -: ${DISTDIR:=/var/portage/distfiles} -: ${TMPFS_SIZE:=100M} - -mkdir -v -p dev/{pts,shm} -trymount -t devpts devpts dev/pts -trymount -t tmpfs -o size=$TMPFS_SIZE tmpfs dev/shm - -trymount -t proc none proc - -[[ -d usr/portage ]] && \ - trymount --bind $PORTDIR usr/portage -[[ -d var/portage/distfiles ]] && \ - trymount --bind $DISTDIR var/portage/distfiles - -cp -v /etc/resolv.conf etc/ - -if [[ -f etc/mtab ]]; then - rm etc/mtab - ln -s /proc/mounts etc/mtab -fi - -if (($#)); then - do_chroot "$@" -else - do_chroot $SHELL -fi - -for M in $umount -do - echo "unmouting $M" - umount "$M" -done -exit $RET