diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-12-11 14:10:18 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-12-11 14:10:18 +0100 |
commit | ac4e669fb3e393bd98c73905375693ef19969d5a (patch) | |
tree | a4b9a15468d85198aa76ae77ba5e00404dd381a6 | |
parent | 8a0a4485edff9d21fffb02f763c65afd14c97769 (diff) | |
download | jenkins.debian.net-ac4e669fb3e393bd98c73905375693ef19969d5a.tar.xz |
reproducible archlinux: build all packages from 'extra' repository too
-rwxr-xr-x | bin/reproducible_build_archlinux_pkg.sh | 45 | ||||
-rwxr-xr-x | bin/reproducible_html_archlinux.sh | 2 |
2 files changed, 26 insertions, 21 deletions
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 " <table><tr><th>repository</th><th>source package</th><th>test result</th><th>test date</th><th>1st build log</th><th>2nd build log</th></tr>" -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 " <tr>" write_page " <td>$REPOSITORY</td>" |