From ac4e669fb3e393bd98c73905375693ef19969d5a Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Fri, 11 Dec 2015 14:10:18 +0100 Subject: reproducible archlinux: build all packages from 'extra' repository too --- bin/reproducible_build_archlinux_pkg.sh | 45 ++++++++++++++++++--------------- bin/reproducible_html_archlinux.sh | 2 +- 2 files changed, 26 insertions(+), 21 deletions(-) (limited to 'bin') diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh index 17cddcd9..f1d7a503 100755 --- a/bin/reproducible_build_archlinux_pkg.sh +++ b/bin/reproducible_build_archlinux_pkg.sh @@ -43,28 +43,33 @@ choose_package() { echo "$(date -u ) - about to choose a package to be build" # every 2 days we check for new archlinux packages touch -d "$(date -d '2 days ago' '+%Y-%m-%d') 00:00 UTC" $DUMMY - if [ ! -f $ARCHLINUX_PKGS ] || [ $DUMMY -nt $ARCHLINUX_PKGS ] ; then - REPOSITORY="core" - echo "$(date -u ) - updating list of available packages in repository '$REPOSITORY'." - local SESSION="archlinux-scheduler-$RANDOM" - schroot --begin-session --session-name=$SESSION -c jenkins-reproducible-archlinux - schroot --run-session -c $SESSION --directory /var/abs/$REPOSITORY -- ls -1|sort -R|xargs echo > $ARCHLINUX_PKGS - schroot --end-session -c $SESSION - fi - rm $DUMMY > /dev/null - echo "$(date -u ) - these packages in repository '$REPOSITORY' are known to us:" - cat $ARCHLINUX_PKGS - for PKG in $(cat $ARCHLINUX_PKGS) ; do - # build package if it has never build or at least a week ago - if [ ! -d $BASE/archlinux/$REPOSITORY/$PKG ] || [ ! -z $(find $BASE/archlinux/$REPOSITORY/ -name $PKG -mtime +6) ] ; then - SRCPACKAGE=$PKG - echo "$(date -u ) - building package $PKG from '$REPOSITORY' now..." - # very simple locking… - mkdir -p $BASE/archlinux/$REPOSITORY/$PKG - touch $BASE/archlinux/$REPOSITORY/$PKG - break + schroot --begin-session --session-name=$SESSION -c jenkins-reproducible-archlinux + for REPOSITORY in core extra ; do + if [ ! -f ${ARCHLINUX_PKGS}_$REPOSITORY ] || [ $DUMMY -nt ${ARCHLINUX_PKGS}_$REPOSITORY ] ; then + echo "$(date -u ) - updating list of available packages in repository '$REPOSITORY'." + local SESSION="archlinux-scheduler-$RANDOM" + schroot --run-session -c $SESSION --directory /var/abs/$REPOSITORY -- ls -1|sort -R|xargs echo > ${ARCHLINUX_PKGS}_$REPOSITORY + echo "$(date -u ) - these packages in repository '$REPOSITORY' are known to us:" + cat ${ARCHLINUX_PKGS}_$REPOSITORY fi done + schroot --end-session -c $SESSION + rm $DUMMY > /dev/null + for REPOSITORY in core extra ; do + for PKG in $(cat ${ARCHLINUX_PKGS}_$REPOSITORY) ; do + # build package if it has never build or at least a week ago + if [ ! -d $BASE/archlinux/$REPOSITORY/$PKG ] || [ ! -z $(find $BASE/archlinux/$REPOSITORY/ -name $PKG -mtime +6) ] ; then + SRCPACKAGE=$PKG + echo "$(date -u ) - building package $PKG from '$REPOSITORY' now..." + # very simple locking… + mkdir -p $BASE/archlinux/$REPOSITORY/$PKG + touch $BASE/archlinux/$REPOSITORY/$PKG + # break out of the loop and then out of this function too, + # to build this package… + break + fi + done + done if [ -z $SRCPACKAGE ] ; then echo "$(date -u ) - no package found to be build, sleeping 6h." for i in $(seq 1 12) ; do diff --git a/bin/reproducible_html_archlinux.sh b/bin/reproducible_html_archlinux.sh index 0e92e0e9..04847ecc 100755 --- a/bin/reproducible_html_archlinux.sh +++ b/bin/reproducible_html_archlinux.sh @@ -38,7 +38,7 @@ EOF write_page_intro 'Arch Linux' write_explaination_table 'Arch Linux' write_page " " -for REPOSITORY in "core" ; do +for REPOSITORY in core extra ; do for PKG in $(find $ARCHBASE/$REPOSITORY/* -maxdepth 1 -type d -exec basename {} \;) ; do write_page " " write_page " " -- cgit v1.2.3-70-g09d2
repositorysource packagetest resulttest date1st build log2nd build log
$REPOSITORY