diff --git a/releases/weekly/specs/ppc/ppc32/stage1.spec b/releases/weekly/specs/ppc/ppc32/stage1.spec index fe1d0c49..15f533fc 100644 --- a/releases/weekly/specs/ppc/ppc32/stage1.spec +++ b/releases/weekly/specs/ppc/ppc32/stage1.spec @@ -4,5 +4,5 @@ version_stamp: 2008.0 rel_type: default profile: default/linux/powerpc/ppc32/13.0 snapshot: 2008.0 -source_subpath: default/stage3-ppc-2008.0 +source_subpath: default/stage3-ppc-latest update_seed: yes diff --git a/releases/weekly/specs/ppc/ppc64/stage1-32ul.spec b/releases/weekly/specs/ppc/ppc64/stage1-32ul.spec index 7b0d6c02..afea2dc4 100644 --- a/releases/weekly/specs/ppc/ppc64/stage1-32ul.spec +++ b/releases/weekly/specs/ppc/ppc64/stage1-32ul.spec @@ -4,5 +4,5 @@ version_stamp: 32ul-2008.0 rel_type: default profile: default/linux/powerpc/ppc64/13.0/32bit-userland snapshot: 2008.0 -source_subpath: default/stage3-ppc64-32ul-2008.0 +source_subpath: default/stage3-ppc64-32ul-latest chost: powerpc-unknown-linux-gnu diff --git a/releases/weekly/specs/ppc/ppc64/stage1-64ul.spec b/releases/weekly/specs/ppc/ppc64/stage1-64ul.spec index 4b22e7ec..c4dbdbc6 100644 --- a/releases/weekly/specs/ppc/ppc64/stage1-64ul.spec +++ b/releases/weekly/specs/ppc/ppc64/stage1-64ul.spec @@ -4,4 +4,4 @@ version_stamp: 64ul-2008.0 rel_type: default profile: default/linux/powerpc/ppc64/13.0/64bit-userland snapshot: 2008.0 -source_subpath: default/stage3-ppc64-64ul-2008.0 +source_subpath: default/stage3-ppc64-64ul-latest diff --git a/tools/catalyst-auto-ppc.conf b/tools/catalyst-auto-ppc.conf index 52f99fb3..8ee9c356 100644 --- a/tools/catalyst-auto-ppc.conf +++ b/tools/catalyst-auto-ppc.conf @@ -19,12 +19,36 @@ EMAIL_FROM=catalyst@timberdoodle.ppc64.dev.gentoo.org EMAIL_SUBJECT_PREPEND="[ppc-auto]" CATALYST_CONFIG=/etc/catalyst/catalyst.conf - + +BUILD_SRCDIR_BASE=`grep storedir= $CATALYST_CONFIG | cut -d '=' -f2 | sed -e 's/"//g'` + +give_latest_from_dates() { + sed 's,-20,~20,g' | \ + sort -k +1 -n -t '~' |\ + awk -F\~ \ + 'BEGIN{i=$1; o=$0}; + { if($1 != i && i != "") { print o; }; i=$1; o=$0; } + END { print o; };' | \ + tr '~' '-' +} + pre_build() { cd ${GITDIR} git pull + + # Symlink the latest stages3 to build from + for d in ${BUILD_SRCDIR_BASE}/builds/default ; do + pushd $d + for f in $(ls stage3-ppc-*bz2 | give_latest_from_dates ) ; do + of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff + of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for $ + ln -sf $f $of + done + done + popd + done } post_build() { - rsync -e 'ssh -i /home/armin76/buildsync.key' /var/tmp/catalyst/builds/default/stage3-*${DATESTAMP}*.bz2* ppc@skimmer.gentoo.org: + rsync -e 'ssh -i /home/armin76/buildsync.key' ${BUILD_SRCDIR_BASE}/builds/default/stage3-*${DATESTAMP}*.bz2* ppc@skimmer.gentoo.org: } diff --git a/tools/catalyst-auto-ppc64.conf b/tools/catalyst-auto-ppc64.conf index e6ab4749..73cdf6e8 100644 --- a/tools/catalyst-auto-ppc64.conf +++ b/tools/catalyst-auto-ppc64.conf @@ -21,11 +21,37 @@ EMAIL_SUBJECT_PREPEND="[ppc64-auto]" CATALYST_CONFIG=/etc/catalyst/catalyst.conf +BUILD_SRCDIR_BASE=`grep storedir= $CATALYST_CONFIG | cut -d '=' -f2 | sed -e 's/"//g'` + +give_latest_from_dates() { + sed 's,-20,~20,g' | \ + sort -k +1 -n -t '~' |\ + awk -F\~ \ + 'BEGIN{i=$1; o=$0}; + { if($1 != i && i != "") { print o; }; i=$1; o=$0; } + END { print o; };' | \ + tr '~' '-' +} + + pre_build() { cd ${GITDIR} git pull + + # Symlink the latest stages3 to build from + for d in ${BUILD_SRCDIR_BASE}/builds/default ; do + pushd $d + for t in ppc64-64ul ppc64-32ul; do + for f in $(ls stage3-${t}-*bz2 | give_latest_from_dates ) ; do + of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff + of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for $ + ln -sf $f $of + done + done + popd + done } post_build() { - rsync -e 'ssh -i /home/armin76/buildsync.key' /var/tmp/catalyst/builds/default/stage3-*${DATESTAMP}*.bz2* /var/tmp/catalyst/builds/default/*${DATESTAMP}*.iso* ppc@skimmer.gentoo.org: + rsync -e 'ssh -i /home/armin76/buildsync.key' ${BUILD_SRCDIR_BASE}/builds/default/stage3-*${DATESTAMP}*.bz2* ${BUILD_SRCDIR_BASE}/builds/default/*${DATESTAMP}*.iso* ppc@skimmer.gentoo.org: }