#!/bin/bash # Copyright 2015 Holger Levsen # released under the GPLv=2 DEBUG=false . /srv/jenkins/bin/common-functions.sh common_init "$@" # common code defining db access . /srv/jenkins/bin/reproducible_common.sh set +x init_html VIEW=repo_stats PAGE=index_${VIEW}.html echo "$(date) - starting to write $PAGE page." write_page_header $VIEW "Overview of ${SPOKENTARGET[$VIEW]}" TMPFILE=$(mktemp) curl http://reproducible.alioth.debian.org/debian/Packages > $TMPFILE write_page "

These source packages are different from sid in our apt repository on alioth. They are available for testing using these sources.lists entries:

"
write_page "deb http://reproducible.alioth.debian.org/debian/ ./"
write_page "deb-src http://reproducible.alioth.debian.org/debian/ ./"
write_page "

" write_page "

" SOURCES=$(grep-dctrl -n -s source -FArchitecture amd64 -o -FArchitecture all $TMPFILE | sort -u) for PKG in $SOURCES ; do write_page "" VERSIONS=$(grep-dctrl -n -s version -S $PKG $TMPFILE|sort -u) CRUFT="" WARN=false BET="" # # gather versions of a package # for VERSION in ${VERSIONS} ; do if [ "$BET" = "" ] ; then BET=${VERSION} continue elif dpkg --compare-versions "$BET" lt "${VERSION}" ; then BET=${VERSION} fi done SID=$(rmadison -s sid $PKG | cut -d "|" -f2|xargs echo) for VERSION in ${VERSIONS} ; do if [ "${VERSION}" != "$BET" ] ; then WARN=true CRUFT="$CRUFT ${VERSION}" fi done # # format output # CSID="" for i in $SID ; do if dpkg --compare-versions "$i" gt "$BET" ; then CSID="$CSID$i
" BET="" if [ ! -z "$BET" ] ; then CRUFT="$BET $CRUFT" fi else CSID="$CSID$i
" fi done if [ ! -z "$BET" ] ; then BET="$BET" else BET=" " fi if [ ! -z "$CRUFT" ] ; then CRUFT="$(echo $CRUFT|sed 's# #
#g')" fi # # write output # write_page "" write_page "" write_page "" write_page "" done write_page "
source packageversion in our repoversion in sidold versions our repo
(needed for reproducing old builds)
$PKG$BET$CSID$CRUFT

" rm $TMPFILE write_page_footer publish_page