#!/bin/bash
# Copyright 2014-2015 Holger Levsen These pages are showing the prospects of reproducible builds of Debian packages. The results shown were obtained from several jobs running on jenkins.debian.net. Thanks to Profitbricks for donating the virtual machine this is running on!"
}
write_page_header() {
rm -f $PAGE
MAINVIEW="stats"
ALLSTATES="reproducible FTBR FTBFS 404 not_for_us blacklisted"
ALLVIEWS="issues notes no_notes scheduled last_24h last_48h all_abc dd-list pkg_sets suite_stats repo_stats stats"
GLOBALVIEWS="issues notes no_notes scheduled repo_stats stats"
SUITEVIEWS="dd-list suite_stats"
SPOKENTARGET["issues"]="issues"
SPOKENTARGET["notes"]="packages with notes"
SPOKENTARGET["no_notes"]="packages without notes"
SPOKENTARGET["scheduled"]="currently scheduled"
SPOKENTARGET["last_24h"]="packages tested in the last 24h"
SPOKENTARGET["last_48h"]="packages tested in the last 48h"
SPOKENTARGET["all_abc"]="all tested packages (sorted alphabetically)"
SPOKENTARGET["dd-list"]="maintainers of unreproducible packages"
SPOKENTARGET["pkg_sets"]="package sets stats"
SPOKENTARGET["suite_stats"]="suite: $SUITE"
SPOKENTARGET["repo_stats"]="repositories overview"
SPOKENTARGET["stats"]="reproducible stats"
write_page ""
write_page ""
write_page ""
write_page "
$2
"
if [ "$1" = "$MAINVIEW" ] ; then
write_page "#debian-reproducible
on OFTC or send us an email to get support for making sure your packages build reproducibly too!"
write_page "
There is more information about jenkins.debian.net and about reproducible builds of Debian available elsewhere. Last update: $(date +'%Y-%m-%d %H:%M %Z'). Copyright 2014-2015 Holger Levsen and others, GPL2 licensed. The weather icons are public domain and have been taken from the Tango Icon Library.
" write_page "" } write_page_meta_sign() { write_page "A package name displayed with a bold font is an indication that this package has a note. Visited packages are linked in green, those which have not been visited are linked in blue.
" } publish_page() { if [ "$1" = "" ] ; then if [ "$VIEW" = "$MAINVIEW" ] ; then cp $PAGE /var/lib/jenkins/userContent/reproducible.html fi TARGET=$PAGE else TARGET=$1/$PAGE fi cp $PAGE /var/lib/jenkins/userContent/$TARGET rm $PAGE echo "Enjoy $REPRODUCIBLE_URL/$TARGET" } set_package_class() { if [ -f ${NOTES_PATH}/${PKG}_note.html ] ; then CLASS="class=\"noted\"" else CLASS="class=\"package\"" fi } set_linktarget() { for PKG in $@ ; do if [ -f $RB_PATH/$SUITE/$ARCH/$PKG.html ] ; then set_package_class LINKTARGET[$PKG]="$PKG" else LINKTARGET[$PKG]="$PKG" fi done } link_packages() { for PKG in $@ ; do write_page " ${LINKTARGET[$PKG]}" done } gen_packages_html() { local suite="$1" shift CWD=$(pwd) cd /srv/jenkins/bin for (( i=1; i<$#+1; i=i+100 )) ; do string='[' delimiter='' for (( j=0; j<100; j++)) ; do item=$(( $j+$i )) if (( $item < $#+1 )) ; then string+="${delimiter}\"${!item}\"" delimiter=',' fi done string+=']' python3 -c "from reproducible_html_packages import gen_packages_html; gen_packages_html(${string}, suite=\"${suite}\", no_clean=True)" done python3 -c "from reproducible_html_packages import purge_old_pages; purge_old_pages()" cd "$CWD" }