[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 2 commits: reproducible Debian: improve script descriptive header

Holger Levsen gitlab at salsa.debian.org
Tue Mar 31 23:21:47 BST 2020



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
0da71838 by Holger Levsen at 2020-04-01T00:16:29+02:00
reproducible Debian: improve script descriptive header

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
5eb378dc by Holger Levsen at 2020-04-01T00:21:39+02:00
reproducible Debian: add some basic comments explaining the code

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


1 changed file:

- bin/reproducible_pool_buildinfos.sh


Changes:

=====================================
bin/reproducible_pool_buildinfos.sh
=====================================
@@ -7,25 +7,30 @@
 ###################################################################
 ###								###
 ### /srv/ftp-master.debian.org/buildinfo/ on coccia.debian.org	###
-### is not a pool structure, but rather by year/month/day	###
-### this scripts creates links turning this into an alternate	###
-### pool structure.						###
-### Both are accessable via https://buildinfos.debian.net	###
+### provides .buildinfo files in a year/month/day structure,	###
+### but there is no pool structure - and it's not public.       ###
+### this scripts uses links to provide an alternative pool	###
+### structure and makes them both accessible on			###
+### https://buildinfos.debian.net				###
 ###								###
 ###################################################################
 
+# basic assumptions
 set -e
 BASEPATH=~jenkins/userContent/reproducible/debian
 FTPPATH=$BASEPATH/ftp-master.debian.org/buildinfo
 POOLPATH=$BASEPATH/buildinfo-pool
+mkdir -p $POOLPATH
 
+# just in case
 PROBLEMS=$(mktemp -t poolize.XXXXXXXX)
-mkdir -p $POOLPATH
 
+# defined for today (in UTC), might be overridden later
 YEAR="$(date -u +%Y)"
 MONTH="$(date -u +%m)"
 DAY="$(date -u +%d)"
 
+# process all .buildinfo files for a given day
 do_day(){
 	COUNTER=0
 	MONTHPATH=$FTPPATH/$YEAR/$MONTH
@@ -122,6 +127,7 @@ do_day(){
 	cd ..
 }
 
+# this takes a long time and is not run by the jenkins job but manually
 loop_through_all(){
 	for YEAR in $(seq 2016 2019) ; do
 		for MONTH in $(seq -w 01 12) ; do
@@ -132,14 +138,18 @@ loop_through_all(){
 	done
 }
 
+# main
 if [ -n "$1" ] && [ -z "$2" ] ; then
+	# only run manually: do all days
 	loop_through_all
 elif [ -n "$1" ] && [ -n "$2" ] && [ -n "$3" ] ; then
+	# only run manually: do a specific day only
 	YEAR=$1
 	MONTH=$2
 	DAY=$3
 	do_day
 else
+	# normal operation: do today and do yesterday
 	do_day
 	YEAR="$(date -u -d '1 day ago' +%Y)"
 	MONTH="$(date -u -d '1 day ago' +%m)"
@@ -154,6 +164,7 @@ find . -type l |sort > $LIST
 chmod 644 $LIST
 mv $LIST ../buildinfo-pool.list
 
+# output problems from main structure above
 if [ -s $PROBLEMS ] ; then
 	echo "Problems found, please investigate:"
 	echo



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/2500126cde5acc6ce45616dfda21c09c0c199186...5eb378dcc91f5f9ed6091b942c1e2d0ad4bb34fc

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/2500126cde5acc6ce45616dfda21c09c0c199186...5eb378dcc91f5f9ed6091b942c1e2d0ad4bb34fc
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20200331/d291cd4e/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list