summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-10-10 18:44:32 +0200
committerHolger Levsen <holger@layer-acht.org>2014-10-10 20:25:05 +0200
commitc898e12ceaebb421269c135788516f52699aa01a (patch)
tree1b173ed7367308173387f0b0e1e0f05351055474
parent0a9ba5f959b96e7c07f1603ad060e4e2978a1978 (diff)
downloadjenkins.debian.net-c898e12ceaebb421269c135788516f52699aa01a.tar.xz
reproducible: use iframes
-rw-r--r--TODO1
-rwxr-xr-xbin/reproducible_stats.sh76
-rw-r--r--userContent/static/style.css3
3 files changed, 33 insertions, 47 deletions
diff --git a/TODO b/TODO
index 9d73f58f..f5569221 100644
--- a/TODO
+++ b/TODO
@@ -116,7 +116,6 @@ See link:https://jenkins.debian.net/userContent/about.html["about jenkins.debian
** add note about notes on every page which has them...
* CSS/HTML
-** use iframes
** use icons within index pages (refactor to get rid of that case statement, use array instead)
* watch: zephyr (debbindiff timeout?)
diff --git a/bin/reproducible_stats.sh b/bin/reproducible_stats.sh
index 8c448cb3..8f656f84 100755
--- a/bin/reproducible_stats.sh
+++ b/bin/reproducible_stats.sh
@@ -256,25 +256,6 @@ write_summary() {
echo "$1" >> $SUMMARY
}
-write_pkg_frameset() {
- FRAMESET="/var/lib/jenkins/userContent/rb-pkg/$1.html"
- cat > $FRAMESET <<-EOF
-<!DOCTYPE html>
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title>
- $1 - reproducible builds results
- </title>
-</head>
- <frameset rows="42,*">
- <frame name="top" src="$1_navigation.html" target="top">
- <frame name="main" src="$2" target="main">
- </frameset>
-</html>
-EOF
-}
-
set_icon() {
# icons taken from tango-icon-theme (0.8.90-5)
# licenced under http://creativecommons.org/licenses/publicdomain/
@@ -303,22 +284,26 @@ set_icon() {
esac
}
-init_navi_frame() {
- echo "<!DOCTYPE html><html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />" > $NAVI
- echo "<link href=\"../static/style.css\" type=\"text/css\" rel=\"stylesheet\" />" >> $NAVI
- echo "<title>Navigation for $1</title></head>" >> $NAVI
- echo "<body><table><tr><td><span style=\"font-size:1.2em;\">$1</span> $2" >> $NAVI
+init_pkg_page() {
+ echo "<!DOCTYPE html><html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />" > ${PKG_FILE}
+ echo "<link href=\"../static/style.css\" type=\"text/css\" rel=\"stylesheet\" />" >> ${PKG_FILE}
+ echo "<title>$1 - reproducible builds results</title></head>" >> ${PKG_FILE}
+ echo "<body><table><tr><td><span style=\"font-size:1.2em;\">$1</span> $2" >> ${PKG_FILE}
set_icon "$3" $5
- echo "<a href=\"$JENKINS_URL/userContent/index_${STATE_TARGET_NAME}.html\" target=\"_parent\"><img src=\"../static/$ICON\" alt=\"${STATE_TARGET_NAME} icon\" /></a>" >> $NAVI
- echo "<span style=\"font-size:0.9em;\">at $4:</span> " >> $NAVI
+ echo "<a href=\"$JENKINS_URL/userContent/index_${STATE_TARGET_NAME}.html\" target=\"_parent\"><img src=\"../static/$ICON\" alt=\"${STATE_TARGET_NAME} icon\" /></a>" >> ${PKG_FILE}
+ echo "<span style=\"font-size:0.9em;\">at $4:</span> " >> ${PKG_FILE}
}
-append2navi_frame() {
- echo "$1" >> $NAVI
+append2pkg_page() {
+ echo "$1" >> ${PKG_FILE}
}
-finish_navi_frame() {
- echo "</td><td style=\"text-align:right; font-size:0.9em;\"><a href=\"$JENKINS_URL/userContent/reproducible.html\" target=\"_parent\">reproducible builds</a></td></tr></table></body></html>" >> $NAVI
+finish_pkg_page() {
+ echo "</td><td style=\"text-align:right; font-size:0.9em;\"><a href=\"$JENKINS_URL/userContent/reproducible.html\" target=\"_parent\">reproducible builds</a></td></tr></table>" >> ${PKG_FILE}
+ echo "<iframe name=\"main\" src=\"$1\" width=\"100%\" height=\"98%\" frameborder=\"0\">" >> ${PKG_FILE}
+ echo "<p>Your browser does not support iframes. Use a different one or follow the links above.</p>" >> ${PKG_FILE}
+ echo "</iframe>" >> ${PKG_FILE}
+ echo "</body></html>" >> ${PKG_FILE}
}
set_package_class() {
@@ -339,41 +324,40 @@ process_packages() {
STAR[$PKG]="<span class=\"beta\">&beta;</span>" # used to be a star...
fi
# only build $PKG pages if they don't exist or are older than $BUILD_DATE
- NAVI="/var/lib/jenkins/userContent/rb-pkg/${PKG}_navigation.html"
- FILE=$(find $(dirname $NAVI) -name $(basename $NAVI) ! -newermt "$BUILD_DATE" 2>/dev/null || true)
- # if no navigation exists, or is older than last build_date or if a note exist...
- if [ ! -f $NAVI ] || [ "$FILE" != "" ] || [ "${NOTES_PACKAGE[${PKG}]}" != "" ] ; then
+ PKG_FILE="/var/lib/jenkins/userContent/rb-pkg/${PKG}.html"
+ OLD_FILE=$(find $(dirname ${PKG_FILE}) -name $(basename ${PKG_FILE}) ! -newermt "$BUILD_DATE" 2>/dev/null || true)
+ # if no package file exists, or is older than last build_date or if a note exist...
+ if [ ! -f ${PKG_FILE} ] || [ "$OLD_FILE" != "" ] || [ "${NOTES_PACKAGE[${PKG}]}" != "" ] ; then
VERSION=$(echo $RESULT | cut -d "|" -f2)
STATUS=$(echo $RESULT | cut -d "|" -f3)
MAINLINK=""
- init_navi_frame "$PKG" "$VERSION" "$STATUS" "$BUILD_DATE" "${STAR[$PKG]}"
- append2navi_frame "${NOTES_PACKAGE[${PKG}]}"
+ init_pkg_page "$PKG" "$VERSION" "$STATUS" "$BUILD_DATE" "${STAR[$PKG]}"
+ append2pkg_page "${NOTES_PACKAGE[${PKG}]}"
if [ -f "/var/lib/jenkins/userContent/buildinfo/${PKG}_${EVERSION}_amd64.buildinfo" ] ; then
- append2navi_frame " <a href=\"$JENKINS_URL/userContent/buildinfo/${PKG}_${EVERSION}_amd64.buildinfo\" target=\"main\">buildinfo</a> "
+ append2pkg_page " <a href=\"$JENKINS_URL/userContent/buildinfo/${PKG}_${EVERSION}_amd64.buildinfo\" target=\"main\">buildinfo</a> "
MAINLINK="$JENKINS_URL/userContent/buildinfo/${PKG}_${EVERSION}_amd64.buildinfo"
fi
if [ -f "/var/lib/jenkins/userContent/dbd/${PKG}_${EVERSION}.debbindiff.html" ] ; then
- append2navi_frame " <a href=\"$JENKINS_URL/userContent/dbd/${PKG}_${EVERSION}.debbindiff.html\" target=\"main\">debbindiff</a> "
+ append2pkg_page " <a href=\"$JENKINS_URL/userContent/dbd/${PKG}_${EVERSION}.debbindiff.html\" target=\"main\">debbindiff</a> "
MAINLINK="$JENKINS_URL/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)
- append2navi_frame " <a href=\"$JENKINS_URL/userContent/${RBUILD_LOG}\" target=\"main\">rbuild ($SIZE)</a> "
+ append2pkg_page " <a href=\"$JENKINS_URL/userContent/${RBUILD_LOG}\" target=\"main\">rbuild ($SIZE)</a> "
if [ "$MAINLINK" = "" ] ; then
MAINLINK="$JENKINS_URL/userContent/${RBUILD_LOG}"
fi
fi
- append2navi_frame " <a href=\"https://packages.qa.debian.org/${PKG}\" target=\"main\">PTS</a> "
- append2navi_frame " <a href=\"https://bugs.debian.org/src:${PKG}\" target=\"main\">BTS</a> "
- append2navi_frame " <a href=\"https://sources.debian.net/src/${PKG}/\" target=\"main\">sources</a> "
- append2navi_frame " <a href=\"https://sources.debian.net/src/${PKG}/${VERSION}/debian/rules\" target=\"main\">debian/rules</a> "
+ append2pkg_page " <a href=\"https://packages.qa.debian.org/${PKG}\" target=\"main\">PTS</a> "
+ append2pkg_page " <a href=\"https://bugs.debian.org/src:${PKG}\" target=\"main\">BTS</a> "
+ append2pkg_page " <a href=\"https://sources.debian.net/src/${PKG}/\" target=\"main\">sources</a> "
+ append2pkg_page " <a href=\"https://sources.debian.net/src/${PKG}/${VERSION}/debian/rules\" target=\"main\">debian/rules</a> "
if [ "${NOTES_PACKAGE[${PKG}]}" != "" ] ; then
MAINLINK="$JENKINS_URL/userContent/notes/${PKG}_note.html"
fi
- finish_navi_frame
- write_pkg_frameset "$PKG" "$MAINLINK"
+ finish_pkg_page "$MAINLINK"
fi
if [ -f "/var/lib/jenkins/userContent/rbuild/${PKG}_${EVERSION}.rbuild.log" ] ; then
set_package_class
@@ -405,7 +389,7 @@ write_summary_header() {
write_summary "<title>$2</title></head>"
write_summary "<body><header><h2>$2</h2>"
if [ "$1" = "$MAINVIEW" ] ; then
- write_summary "<p>These pages are updated every six hours. Results are obtained from <a href=\"$JENKINS_URL/view/reproducible\">several build jobs running on jenkins.debian.net</a>. Thanks to <a href=\"https://www.profitbricks.com\">Profitbricks</a> for donating the virtual machine it's running on!</p>"
+ write_summary "<p>These pages are updated every six hours. Results are obtained from <a href=\"$JENKINS_URL/view/reproducible\">several jobs running on jenkins.debian.net</a>. Thanks to <a href=\"https://www.profitbricks.com\">Profitbricks</a> for donating the virtual machine it's running on!</p>"
fi
write_summary "<p>$COUNT_TOTAL packages have been attempted to be build so far, that's $PERCENT_TOTAL% of $AMOUNT source packages in Debian $SUITE currently. Out of these, $PERCENT_GOOD% were successful, so quite wildly guessing this roughy means about $GUESS_GOOD <a href=\"https://wiki.debian.org/ReproducibleBuilds\">packages should be reproducibly buildable!</a>"
if [ "${1:0:3}" = "all" ] || [ "$1" = "dd-list" ] ; then
diff --git a/userContent/static/style.css b/userContent/static/style.css
index e493f55c..4d5faf97 100644
--- a/userContent/static/style.css
+++ b/userContent/static/style.css
@@ -2,6 +2,7 @@ html {
font-size: 100%;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust:100%;
+ height:100%;
}
body {
@@ -12,6 +13,8 @@ body {
color: #333333;
padding: 0.25em 0.25em 0em 0.25em;
margin: 0.25em 0.25em 0em 0.25em;
+ height: 100%;
+ overflow: hidden;
}
pre {