From 08d368d36bad50af0f5dacf77befe664f451d60b Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Wed, 17 Dec 2014 17:00:03 +0100 Subject: reproducible: use host-relative urls when possible, and reproducible.debian.net when it makes sense --- bin/reproducible_common.sh | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'bin/reproducible_common.sh') diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh index 37fc6943..5e3f6465 100755 --- a/bin/reproducible_common.sh +++ b/bin/reproducible_common.sh @@ -101,6 +101,7 @@ EOF fi # common variables +REPRODUCIBLE_URL=https://reproducible.debian.net DBDCHROOT_READLOCK=/var/lib/jenkins/reproducible-dbdchroot.readlock DBDCHROOT_WRITELOCK=/var/lib/jenkins/reproducible-dbdchroot.writelock @@ -179,7 +180,7 @@ set_icon() { write_icon() { # ICON and STATE_TARGET_NAME are set by set_icon() - write_page "\"${STATE_TARGET_NAME}" + write_page "\"${STATE_TARGET_NAME}" } write_page_header() { @@ -187,7 +188,7 @@ write_page_header() { BUILDINFO_ON_PAGE=false write_page "" write_page "" - write_page "" + write_page "" write_page "$2" write_page "

$2

" if [ "$1" = "$MAINVIEW" ] ; then @@ -217,7 +218,7 @@ write_page_header() { else SPOKEN_TARGET=${SPOKENTARGET[$TARGET]} fi - write_page "
  • ${SPOKEN_TARGET}
  • " + write_page "
  • ${SPOKEN_TARGET}
  • " done write_page "" write_page "
    " @@ -243,7 +244,7 @@ publish_page() { cp $PAGE /var/lib/jenkins/userContent/reproducible.html fi rm $PAGE - echo "Enjoy $JENKINS_URL/userContent/$PAGE" + echo "Enjoy $REPRODUCIBLE_URL/userContent/$PAGE" } set_package_star() { @@ -266,7 +267,7 @@ force_package_targets() { for PKG in $@ ; do if [ -f /var/lib/jenkins/userContent/rb-pkg/$PKG.html ] ; then set_package_class - LINKTARGET[$PKG]="$PKG" + LINKTARGET[$PKG]="$PKG" else LINKTARGET[$PKG]="$PKG" fi @@ -293,7 +294,7 @@ init_pkg_page() { echo "$1 - reproducible builds results" >> ${PKG_FILE} echo "
    $1 $2" >> ${PKG_FILE} set_icon "$3" $5 # this sets $STATE_TARGET_NAME and $ICON - echo "\"${STATE_TARGET_NAME}" >> ${PKG_FILE} + echo "\"${STATE_TARGET_NAME}" >> ${PKG_FILE} echo "at $4: " >> ${PKG_FILE} } @@ -302,7 +303,7 @@ append2pkg_page() { } finish_pkg_page() { - echo "reproducible builds
    " >> ${PKG_FILE} + echo "reproducible builds" >> ${PKG_FILE} echo "" >> ${PKG_FILE} @@ -325,7 +326,7 @@ process_packages() { MAINLINK="" NOTES_LINK="" if [ -f ${NOTES_PATH}/${PKG}_note.html ] ; then - NOTES_LINK=" notes " + NOTES_LINK=" notes " fi set_package_star if [ -f "/var/lib/jenkins/userContent/buildinfo/${PKG}_${EVERSION}_amd64.buildinfo" ] ; then @@ -335,19 +336,19 @@ process_packages() { init_pkg_page "$PKG" "$VERSION" "$STATUS" "$BUILD_DATE" "$STAR" append2pkg_page "${NOTES_LINK}" if [ -f "/var/lib/jenkins/userContent/buildinfo/${PKG}_${EVERSION}_amd64.buildinfo" ] ; then - append2pkg_page " buildinfo " - MAINLINK="$JENKINS_URL/userContent/buildinfo/${PKG}_${EVERSION}_amd64.buildinfo" + append2pkg_page " buildinfo " + MAINLINK="/userContent/buildinfo/${PKG}_${EVERSION}_amd64.buildinfo" fi if [ -f "/var/lib/jenkins/userContent/dbd/${PKG}_${EVERSION}.debbindiff.html" ] ; then - append2pkg_page " debbindiff " - MAINLINK="$JENKINS_URL/userContent/dbd/${PKG}_${EVERSION}.debbindiff.html" + append2pkg_page " debbindiff " + MAINLINK="/userContent/dbd/${PKG}_${EVERSION}.debbindiff.html" fi RBUILD_LOG="rbuild/${PKG}_${EVERSION}.rbuild.log" if [ -f "/var/lib/jenkins/userContent/${RBUILD_LOG}" ] ; then SIZE=$(du -sh "/var/lib/jenkins/userContent/${RBUILD_LOG}" |cut -f1) - append2pkg_page " rbuild ($SIZE) " + append2pkg_page " rbuild ($SIZE) " if [ "$MAINLINK" = "" ] ; then - MAINLINK="$JENKINS_URL/userContent/${RBUILD_LOG}" + MAINLINK="/userContent/${RBUILD_LOG}" fi fi append2pkg_page " PTS " @@ -356,7 +357,7 @@ process_packages() { append2pkg_page " debian/rules " if [ ! -z "${NOTES_LINK}" ] ; then - MAINLINK="$JENKINS_URL/userContent/notes/${PKG}_note.html" + MAINLINK="/userContent/notes/${PKG}_note.html" fi finish_pkg_page "$MAINLINK" fi -- cgit v1.2.3-70-g09d2