=== modified file 'bin/fsb' --- bin/fsb 2013-05-14 21:30:51 +0000 +++ bin/fsb 2013-05-14 16:35:20 +0000 @@ -1,43 +1,10 @@ #!/bin/zsh PS4='+%B%* %F{cyan}%N%f:%F{yellow}%i%f>%b ' - -zparseopts -D \ - h=ARGS_H -help=ARGS_H \ - x=ARGS_X -trace=ARGS_X \ - c:=ARGS_C -config:=ARGS_C \ - b:=ARGS_B -basedir:=ARGS_B \ - -if (($#ARGS_H)); then cat < source a configuration file - -b --basedir set this directory as basedir - -description: - Flexible Stage Builder -END - exit 0 -fi - -(($#ARGS_X)) && set -x - -for option_flag option_value in $ARGS_B; do - FSB_BASE_DIR:=$option_value -done - -FSB_CONFIG=${FSB_BASE_DIR:-${0:a:h:h}}/fsbrc +FSB_CONFIG=${0:a:h:h}/fsbrc + [[ -a $FSB_CONFIG ]] && source $FSB_CONFIG -for option_flag option_value in $ARGS_C; do - source $option_value || exit 1 -done - -(($#@)) && FSB_TARGET=$1 - # parameter defaults : ${FSB_SNAPSHOTS:=btrfs} @@ -167,7 +134,7 @@ # run! load_functions -if [[ -z $FSB_TARGET ]]; then +if ! (($# == 1)); then fsb_info "usage: $0:h "$'\ntargets:\n'${(kF)fsb_targets/#/ - } exit fi === removed file 'cfg_amd64_vserver' --- cfg_amd64_vserver 2013-05-14 21:30:51 +0000 +++ cfg_amd64_vserver 1970-01-01 00:00:00 +0000 @@ -1,6 +0,0 @@ -STAGE_GENTOO_NAME=latest-stage3-amd64-hardened+nomultilib -STAGE_GENTOO_BRANCH=testing -STAGE_GENTOO_DEV=static-dev -STAGE_GENTOO_PORTAGE22=1 -STAGE_GENTOO_NOPY3K=1 -STAGE_GENTOO_MIXINS="nokit nodbus" === removed file 'fsb_gentoo_unmerge_udev' --- fsb_gentoo_unmerge_udev 2013-05-14 21:30:51 +0000 +++ fsb_gentoo_unmerge_udev 1970-01-01 00:00:00 +0000 @@ -1,2 +0,0 @@ -fsb_chroot_bash emerge --unmerge udev -rm $build_dir/etc/{init.d,runlevels/*}/*udev*(N) === modified file 'functions/fsb_infer_gentoo_settings' --- functions/fsb_infer_gentoo_settings 2013-05-14 21:30:51 +0000 +++ functions/fsb_infer_gentoo_settings 2013-05-14 18:51:14 +0000 @@ -1,14 +1,6 @@ -# globals -typeset -g \ - STAGE_GENTOO_ARCH \ - STAGE_GENTOO_NAME \ - STAGE_GENTOO_BRANCH \ - STAGE_PORTAGE_TS \ - STAGE_OVERLAY_REVNO \ - STAGE_GENTOO_MIXINS - [[ -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;; @@ -40,8 +32,14 @@ : ${STAGE_OVERLAY_REVNO:=$(bzr revno $FSB_OVERLAY_SRC)} || \ die "could not determine the revision of $FSB_OVERLAY_SRC" -: ${STAGE_GENTOO_MIXINS:=nokit} -: ${STAGE_GENTOO_DEV:=udev} +case $STAGE_GENTOO_BRANCH in + (stable) + accept_keywords=$STAGE_GENTOO_ARCH;; + (testing) + accept_keywords="~$STAGE_GENTOO_ARCH";; + (*) + die "STAGE_GENTOO_BRANCH can be either stable or testing, not $STAGE_GENTOO_ARCH";; +esac STAGE_GENTOO_DIR_BASE=$FSB_BUILD_DIR/gentoo STAGE_GENTOO_DIR_BASE+=-$STAGE_GENTOO_ARCH @@ -49,14 +47,3 @@ STAGE_GENTOO_DIR_BASE+=-$STAGE_GENTOO_BRANCH STAGE_GENTOO_DIR_BASE+=-p$STAGE_PORTAGE_TS STAGE_GENTOO_DIR_BASE+=-o$STAGE_OVERLAY_REVNO -STAGE_GENTOO_DIR_BASE+=-${STAGE_GENTOO_DEV//-} -(($+STAGE_GENTOO_PORTAGE22)) && \ - STAGE_GENTOO_DIR_BASE+=-port22 -(($+STAGE_GENTOO_NOPY3K)) && \ - STAGE_GENTOO_DIR_BASE+=-nopy3k -if [[ -n $STAGE_GENTOO_MIXINS ]]; then - local m - for m in $=STAGE_GENTOO_MIXINS; do - STAGE_GENTOO_DIR_BASE+=-$m - done -fi === modified file 'functions/fsb_target_gentoo_base' --- functions/fsb_target_gentoo_base 2013-05-14 21:30:51 +0000 +++ functions/fsb_target_gentoo_base 2013-05-14 19:53:51 +0000 @@ -11,8 +11,6 @@ build_dir_push $dir build_target gentoo_init -fsb_gentoo_profile_add $^=STAGE_GENTOO_MIXINS -if (($+STAGE_GENTOO_PORTAGE22)); then - echo '>$dir/etc/portage/package.keywords - fsb_chroot_bash emerge -1 '>=sys-apps/portage-2.2.0_alpha1' || die -fi +fsb_gentoo_profile_add mix-ins/nokit +echo '>$dir/etc/portage/package.keywords +fsb_chroot_bash emerge -1 '>=sys-apps/portage-2.2.0_alpha1' || die === removed file 'functions/fsb_target_gentoo_dev' --- functions/fsb_target_gentoo_dev 2013-05-14 21:30:51 +0000 +++ functions/fsb_target_gentoo_dev 1970-01-01 00:00:00 +0000 @@ -1,28 +0,0 @@ -local dir - -fsb_infer_gentoo_settings - -dir=$STAGE_GENTOO_DIR_BASE -dir+=-$STAGE_GENTOO_DEV - -build_dir_check $dir $0 && return 0 -[[ $? -eq 100 ]] || die "build_dir_check failed" - -build_dir_push $dir -build_target gentoo_base - - - -case $STAGE_GENTOO_DEV in - (static-dev) - fsb_gentoo_profile_add mix-ins/static-dev - fsb_gentoo_unmerge_udev - ;; - (mdev) - fsb_gentoo_profile_add mix-ins/static-dev - fsb_gentoo_unmerge_udev - ln -s /etc/init.d/mdev $dir/etc/runlevels/sysinit/mdev - ;; - (udev) ;; - (*) die "/dev manager '$STAGE_GENTOO_DEV' is not supported at the moment" -esac === modified file 'functions/fsb_target_gentoo_init' --- functions/fsb_target_gentoo_init 2013-05-14 21:30:51 +0000 +++ functions/fsb_target_gentoo_init 2013-05-14 18:51:14 +0000 @@ -2,15 +2,6 @@ fsb_infer_gentoo_settings -case $STAGE_GENTOO_BRANCH in - (stable) - accept_keywords=$STAGE_GENTOO_ARCH;; - (testing) - accept_keywords="~$STAGE_GENTOO_ARCH";; - (*) - die "STAGE_GENTOO_BRANCH can be either stable or testing, not $STAGE_GENTOO_ARCH";; -esac - dir=$STAGE_GENTOO_DIR_BASE dir+=-conf === modified file 'functions/fsb_target_gentoo_system' --- functions/fsb_target_gentoo_system 2013-05-14 21:30:51 +0000 +++ functions/fsb_target_gentoo_system 2013-05-14 19:21:38 +0000 @@ -3,21 +3,13 @@ fsb_infer_gentoo_settings dir=$STAGE_GENTOO_DIR_BASE -if (($+STAGE_GENTOO_EMPTYTREE)); then - dir+=-emptytree -else - dir+=-system -fi +dir+=-system build_dir_check $dir $0 && return 0 [[ $? -eq 100 ]] || die "build_dir_check failed" build_dir_push $dir -if (($+STAGE_GENTOO_NOPY3K)); then - build_target gentoo_py2 -else - build_target gentoo_base -fi +build_target gentoo_py2 fsb_chroot_bash emerge -uDN @world fsb_chroot_bash emerge --depclean