From 7f3eac6977760f4bc121b23ead578eca5be265fe Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Mon, 16 Mar 2015 12:46:15 +0100 Subject: reproducible: rename repo_stats to repository_comparison --- bin/reproducible_html_repo_stats.sh | 143 ------------------------- bin/reproducible_html_repository_comparison.sh | 143 +++++++++++++++++++++++++ 2 files changed, 143 insertions(+), 143 deletions(-) delete mode 100755 bin/reproducible_html_repo_stats.sh create mode 100755 bin/reproducible_html_repository_comparison.sh (limited to 'bin') diff --git a/bin/reproducible_html_repo_stats.sh b/bin/reproducible_html_repo_stats.sh deleted file mode 100755 index 0312079c..00000000 --- a/bin/reproducible_html_repo_stats.sh +++ /dev/null @@ -1,143 +0,0 @@ -#!/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 - -SUITE="unstable" # for links in page -ARCH="amd64" # same - -VIEW=repo_stats -PAGE=index_${VIEW}.html -TMPFILE=$(mktemp) -TMP2FILE=$(mktemp) - -echo "$(date) - starting to write $PAGE page." -write_page_header $VIEW "Comparison between the reproducible builds apt repository and regular Debian suites" -write_page "

These source packages are different from unstable 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 "

" - -curl http://reproducible.alioth.debian.org/debian/Sources > $TMPFILE -SOURCES=$(grep-dctrl -n -s Package -r -FPackage . $TMPFILE | sort -u) -for PKG in $SOURCES ; do - echo "Processing $PKG..." - if [ "${PKG:0:3}" = "lib" ] ; then - PREFIX=${PKG:0:4} - else - PREFIX=${PKG:0:1} - fi - VERSIONS=$(grep-dctrl -n -s version -S $PKG $TMPFILE|sort -u) - CRUFT="" - BET="" - OBSOLETE=false - # - # 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 unstable $PKG | cut -d "|" -f2|xargs echo) - for VERSION in ${VERSIONS} ; do - if [ "${VERSION}" != "$BET" ] ; then - CRUFT="$CRUFT ${VERSION}" - fi - done - TESTING=$(rmadison -s testing $PKG | cut -d "|" -f2|xargs echo) - EXPERIMENTAL=$(rmadison -s experimental $PKG | cut -d "|" -f2|xargs echo) - # - # format output - # - CSID="" - CTEST="" - CEXP="" - for i in $SID ; do - if dpkg --compare-versions "$i" gt "$BET" ; then - CSID="$CSID$i
" - if [ ! -z "$BET" ] ; then - CRUFT="$BET $CRUFT" - BET="" - OBSOLETE=true - fi - else - CSID="$CSID$i
" - fi - done - if [ ! -z "$TESTING" ] ; then - for i in $TESTING ; do - if dpkg --compare-versions "$i" gt "$BET" ; then - CTEST="$CTEST$i
" - else - CTEST="$CTEST$i
" - fi - done - fi - if [ ! -z "$EXPERIMENTAL" ] ; then - for i in $EXPERIMENTAL ; do - if dpkg --compare-versions "$i" gt "$BET" ; then - CEXP="$CEXP$i
" - else - CEXP="$CEXP$i
" - fi - done - fi - 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 " " - write_page " " - write_page " " - write_page "" -done -write_page "
source packageold versions in our repo
(needed for reproducing old builds)
version in our repoversion in 'testing'version in 'unstable'version in 'experimental'
" - URL="http://anonscm.debian.org/cgit/reproducible/$PKG.git/?h=pu/reproducible_builds" - curl $URL > $TMP2FILE - if [ "$(grep "'error'>No repositories found" $TMP2FILE 2>/dev/null)" ] ; then - write_page "$PKG
(no git repository)" - elif [ "$(grep "'error'>Invalid branch" $TMP2FILE 2>/dev/null)" ] ; then - URL="http://anonscm.debian.org/cgit/reproducible/$PKG.git/?h=merged/reproducible_builds" - curl $URL > $TMP2FILE - if [ "$(grep "'error'>Invalid branch" $TMP2FILE 2>/dev/null)" ] ; then - write_page "$PKG
non-standard branch" - if $OBSOLETE ; then - write_page " (probably ok)" - fi - else - write_page "$PKG" - write_page "
(merged and at least available in unstable)" - fi - else - write_page "$PKG" - if $OBSOLETE ; then - write_page "
(unused?)" - fi - fi - write_page "
$CRUFT$BET$CTEST$CSID$CEXP

" -rm $TMPFILE $TMP2FILE -write_page_footer -publish_page - diff --git a/bin/reproducible_html_repository_comparison.sh b/bin/reproducible_html_repository_comparison.sh new file mode 100755 index 00000000..0312079c --- /dev/null +++ b/bin/reproducible_html_repository_comparison.sh @@ -0,0 +1,143 @@ +#!/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 + +SUITE="unstable" # for links in page +ARCH="amd64" # same + +VIEW=repo_stats +PAGE=index_${VIEW}.html +TMPFILE=$(mktemp) +TMP2FILE=$(mktemp) + +echo "$(date) - starting to write $PAGE page." +write_page_header $VIEW "Comparison between the reproducible builds apt repository and regular Debian suites" +write_page "

These source packages are different from unstable 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 "

" + +curl http://reproducible.alioth.debian.org/debian/Sources > $TMPFILE +SOURCES=$(grep-dctrl -n -s Package -r -FPackage . $TMPFILE | sort -u) +for PKG in $SOURCES ; do + echo "Processing $PKG..." + if [ "${PKG:0:3}" = "lib" ] ; then + PREFIX=${PKG:0:4} + else + PREFIX=${PKG:0:1} + fi + VERSIONS=$(grep-dctrl -n -s version -S $PKG $TMPFILE|sort -u) + CRUFT="" + BET="" + OBSOLETE=false + # + # 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 unstable $PKG | cut -d "|" -f2|xargs echo) + for VERSION in ${VERSIONS} ; do + if [ "${VERSION}" != "$BET" ] ; then + CRUFT="$CRUFT ${VERSION}" + fi + done + TESTING=$(rmadison -s testing $PKG | cut -d "|" -f2|xargs echo) + EXPERIMENTAL=$(rmadison -s experimental $PKG | cut -d "|" -f2|xargs echo) + # + # format output + # + CSID="" + CTEST="" + CEXP="" + for i in $SID ; do + if dpkg --compare-versions "$i" gt "$BET" ; then + CSID="$CSID$i
" + if [ ! -z "$BET" ] ; then + CRUFT="$BET $CRUFT" + BET="" + OBSOLETE=true + fi + else + CSID="$CSID$i
" + fi + done + if [ ! -z "$TESTING" ] ; then + for i in $TESTING ; do + if dpkg --compare-versions "$i" gt "$BET" ; then + CTEST="$CTEST$i
" + else + CTEST="$CTEST$i
" + fi + done + fi + if [ ! -z "$EXPERIMENTAL" ] ; then + for i in $EXPERIMENTAL ; do + if dpkg --compare-versions "$i" gt "$BET" ; then + CEXP="$CEXP$i
" + else + CEXP="$CEXP$i
" + fi + done + fi + 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 " " + write_page " " + write_page " " + write_page "" +done +write_page "
source packageold versions in our repo
(needed for reproducing old builds)
version in our repoversion in 'testing'version in 'unstable'version in 'experimental'
" + URL="http://anonscm.debian.org/cgit/reproducible/$PKG.git/?h=pu/reproducible_builds" + curl $URL > $TMP2FILE + if [ "$(grep "'error'>No repositories found" $TMP2FILE 2>/dev/null)" ] ; then + write_page "$PKG
(no git repository)" + elif [ "$(grep "'error'>Invalid branch" $TMP2FILE 2>/dev/null)" ] ; then + URL="http://anonscm.debian.org/cgit/reproducible/$PKG.git/?h=merged/reproducible_builds" + curl $URL > $TMP2FILE + if [ "$(grep "'error'>Invalid branch" $TMP2FILE 2>/dev/null)" ] ; then + write_page "$PKG
non-standard branch" + if $OBSOLETE ; then + write_page " (probably ok)" + fi + else + write_page "$PKG" + write_page "
(merged and at least available in unstable)" + fi + else + write_page "$PKG" + if $OBSOLETE ; then + write_page "
(unused?)" + fi + fi + write_page "
$CRUFT$BET$CTEST$CSID$CEXP

" +rm $TMPFILE $TMP2FILE +write_page_footer +publish_page + -- cgit v1.2.3-70-g09d2