summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_build.sh12
-rwxr-xr-xbin/reproducible_common.sh46
-rwxr-xr-xbin/reproducible_coreboot.sh20
-rwxr-xr-xbin/reproducible_html_graphs.sh27
4 files changed, 54 insertions, 51 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 013bf2f2..55912ceb 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -109,11 +109,6 @@ cleanup_userContent() {
rm -f $BASE/buildinfo/${SUITE}/${ARCH}/${SRCPACKAGE}_*.buildinfo > /dev/null 2>&1
}
-calculate_build_duration() {
- END=$(date +'%s')
- DURATION=$(( $END - $START ))
-}
-
update_db_and_html() {
# everything passed at this function is saved as a status of this package in the db
STATUS="$@"
@@ -145,13 +140,6 @@ update_rbuildlog() {
RBUILDLOG=$BASE/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_${EVERSION}.rbuild.log
}
-print_out_duration() {
- local HOUR=$(echo "$DURATION/3600"|bc)
- local MIN=$(echo "($DURATION-$HOUR*3600)/60"|bc)
- local SEC=$(echo "$DURATION-$HOUR*3600-$MIN*60"|bc)
- echo "$(date) - total duration: ${HOUR}h ${MIN}m ${SEC}s." | tee -a ${RBUILDLOG}
-}
-
handle_404() {
echo "Warning: Download of ${SRCPACKAGE} sources from ${SUITE} failed." | tee -a ${RBUILDLOG}
ls -l ${SRCPACKAGE}* | tee -a ${RBUILDLOG}
diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh
index d6935c76..3eccd806 100755
--- a/bin/reproducible_common.sh
+++ b/bin/reproducible_common.sh
@@ -253,6 +253,40 @@ write_page_meta_sign() {
write_page "A <code><span class=\"bug\">&#35;</span></code> sign after the name of a package indicates that a bug is filed against it. Likewise, a <code><span class=\"bug-patch\">&#43;</span></code> sign indicates there is a patch available. <code><span class=\"bug-done\">&#35;</span></code> indicates a closed bug. In cases of several bugs, the symbol is repeated.</p>"
}
+write_explaination_table() {
+ write_page "<p style=\"clear:both;\">"
+ write_page "<table class=\"main\" id=\"variation\"><tr><th>variation</th><th>first build</th><th>second build</th></tr>"
+ if [ "$1" = "debian" ] ; then
+ write_page "<tr><td>hostname</td><td>$(hostname)</td><td>i-capture-the-hostname</td></tr>"
+ write_page "<tr><td>domainname</td><td>$(hostname -d)</td><td>i-capture-the-domainname</td></tr>"
+ fi
+ write_page "<tr><td>env TZ</td><td>TZ=\"/usr/share/zoneinfo/Etc/GMT+12\"</td><td>TZ=\"/usr/share/zoneinfo/Etc/GMT-14\"</td></tr>"
+ write_page "<tr><td>env LANG</td><td>LANG=\"en_GB.UTF-8\"</td><td>LANG=\"fr_CH.UTF-8\"</td></tr>"
+ write_page "<tr><td>env LC_ALL</td><td><em>unset</em></td><td>LC_ALL=\"fr_CH.UTF-8\"</td></tr>"
+ local NUM_CPU=$(cat /proc/cpuinfo |grep ^processor|wc -l)
+ if [ "$1" = "debian" ] ; then
+ write_page "<tr><td>env PATH</td><td>PATH=\"/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:\"</td><td>PATH=\"/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path\"</td></tr>"
+ write_page "<tr><td>env BUILDUSERID</td><td>BUILDUSERID=\"1111\"</td><td>BUILDUSERID=\"2222\"</td></tr>"
+ write_page "<tr><td>env BUILDUSERNAME</td><td>BUILDUSERNAME=\"pbuilder1\"</td><td>BUILDUSERNAME=\"pbuilder2\"</td></tr>"
+ write_page "<tr><td>env USER</td><td>USER=\"pbuilder1\"</td><td>USER=\"pbuilder2\"</td></tr>"
+ write_page "<tr><td>uid</td><td>uid=1111</td><td>uid=2222</td></tr>"
+ write_page "<tr><td>gid</td><td>gid=1111</td><td>gid=2222</td></tr>"
+ write_page "<tr><td>env DEB_BUILD_OPTIONS</td><td>DEB_BUILD_OPTIONS=\"parallel=$NUM_CPU\"</td><td>DEB_BUILD_OPTIONS=\"parallel=$(echo $NUM_CPU-1|bc)\"<br />(using a different number of cores is on the agenda)</td></tr>"
+ write_page "<tr><td>UTS namespace</td><td><em>shared with the host</em></td><td><em>modified using</em> /usr/bin/unshare --uts</td></tr>"
+ write_page "<tr><td>kernel version, modified using /usr/bin/linux64 --uname-2.6</td><td>$(uname -sr)</td><td>$(/usr/bin/linux64 --uname-2.6 uname -sr)</td></tr>"
+ write_page "<tr><td>umask</td><td>0022<td>0002</td><tr>"
+ fi
+ write_page "<tr><td>CPU type</td><td>$(cat /proc/cpuinfo|grep 'model name'|head -1|cut -d ":" -f2-)</td><td>same for both builds (currently, work in progress)</td></tr>"
+ write_page "<tr><td>year, month, date</td><td>today ($DATE)</td><td>same for both builds (currently, work in progress)</td></tr>"
+ write_page "<tr><td>hour, minute</td><td>hour is usually the same...</td><td>usually, the minute differs... (currently, work in progress)</td></tr>"
+ if [ "$1" = "debian" ] ; then
+ write_page "<tr><td><em>everything else...</em></td><td colspan=\"2\">is likely the same. So far, this is just about the <em>prospects</em> of <a href=\"https://wiki.debian.org/ReproducibleBuilds\">reproducible builds of Debian</a> - there will be more variations in the wild.</td></tr>"
+ else
+ write_page "<tr><td><em>everything else...</em></td><td colspan=\"2\">is likely the same. There will be more variations in the wild.</td></tr>"
+ fi
+ write_page "</table></p>"
+}
+
publish_page() {
if [ "$1" = "" ] ; then
if [ "$VIEW" = "$MAINVIEW" ] ; then
@@ -314,3 +348,15 @@ gen_packages_html() {
cd "$CWD"
}
+calculate_build_duration() {
+ END=$(date +'%s')
+ DURATION=$(( $END - $START ))
+}
+
+print_out_duration() {
+ local HOUR=$(echo "$DURATION/3600"|bc)
+ local MIN=$(echo "($DURATION-$HOUR*3600)/60"|bc)
+ local SEC=$(echo "$DURATION-$HOUR*3600-$MIN*60"|bc)
+ echo "$(date) - total duration: ${HOUR}h ${MIN}m ${SEC}s." | tee -a ${RBUILDLOG}
+}
+
diff --git a/bin/reproducible_coreboot.sh b/bin/reproducible_coreboot.sh
index 03c6f730..9d2da652 100755
--- a/bin/reproducible_coreboot.sh
+++ b/bin/reproducible_coreboot.sh
@@ -25,18 +25,6 @@ create_results_dirs() {
mkdir -p $BASE/coreboot/dbd
}
-calculate_build_duration() {
- END=$(date +'%s')
- DURATION=$(( $END - $START ))
-}
-
-print_out_duration() {
- local HOUR=$(echo "$DURATION/3600"|bc)
- local MIN=$(echo "($DURATION-$HOUR*3600)/60"|bc)
- local SEC=$(echo "$DURATION-$HOUR*3600-$MIN*60"|bc)
- echo "$(date -u) - total duration: ${HOUR}h ${MIN}m ${SEC}s."
-}
-
call_debbindiff() {
local TMPLOG=(mktemp --tmpdir=$TMPDIR)
echo
@@ -190,9 +178,11 @@ cat > $PAGE <<- EOF
<br />
</blockquote>
EOF
-write_page " <h1>Reproducible Coreboot</h2><p>This is work in progress - only TZ, LANG, LC_CTYPE variable and number of cores variations yet and no fancy html.</p><pre>"
-write_page $COREBOOT
-write_page " </pre><ul>"
+write_page " <h1>Reproducible Coreboot</h1>"
+write_page " <p>This is work in progress started on 2015-06-04.</p>"
+write_page " <pre>$COREBOOT<pre>"
+write_explaination_table coreboot
+write_page " <ul>"
ROMS=0
RROMS=0
create_results_dirs
diff --git a/bin/reproducible_html_graphs.sh b/bin/reproducible_html_graphs.sh
index c08b6336..424a9d04 100755
--- a/bin/reproducible_html_graphs.sh
+++ b/bin/reproducible_html_graphs.sh
@@ -601,32 +601,11 @@ create_main_stats_page() {
create_png_from_table $i ${TABLE[$i]}.png
fi
done
+ write_page "</p>"
# explain setup
- write_page "</p><p style=\"clear:both;\">"
- write_page "<table class=\"main\" id=\"variation\"><tr><th>variation</th><th>first build</th><th>second build</th></tr>"
- write_page "<tr><td>hostname</td><td>$(hostname)</td><td>i-capture-the-hostname</td></tr>"
- write_page "<tr><td>domainname</td><td>$(hostname -d)</td><td>i-capture-the-domainname</td></tr>"
- write_page "<tr><td>env TZ</td><td>TZ=\"/usr/share/zoneinfo/Etc/GMT+12\"</td><td>TZ=\"/usr/share/zoneinfo/Etc/GMT-14\"</td></tr>"
- write_page "<tr><td>env LANG</td><td>LANG=\"en_GB.UTF-8\"</td><td>LANG=\"fr_CH.UTF-8\"</td></tr>"
- write_page "<tr><td>env LC_ALL</td><td><em>unset</em></td><td>LC_ALL=\"fr_CH.UTF-8\"</td></tr>"
- write_page "<tr><td>env PATH</td><td>PATH=\"/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:\"</td><td>PATH=\"/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path\"</td></tr>"
- write_page "<tr><td>env BUILDUSERID</td><td>BUILDUSERID=\"1111\"</td><td>BUILDUSERID=\"2222\"</td></tr>"
- write_page "<tr><td>env BUILDUSERNAME</td><td>BUILDUSERNAME=\"pbuilder1\"</td><td>BUILDUSERNAME=\"pbuilder2\"</td></tr>"
- write_page "<tr><td>env USER</td><td>USER=\"pbuilder1\"</td><td>USER=\"pbuilder2\"</td></tr>"
- write_page "<tr><td>uid</td><td>uid=1111</td><td>uid=2222</td></tr>"
- write_page "<tr><td>gid</td><td>gid=1111</td><td>gid=2222</td></tr>"
- local NUM_CPU=$(cat /proc/cpuinfo |grep ^processor|wc -l)
- write_page "<tr><td>env DEB_BUILD_OPTIONS</td><td>DEB_BUILD_OPTIONS=\"parallel=$NUM_CPU\"</td><td>DEB_BUILD_OPTIONS=\"parallel=$(echo $NUM_CPU-1|bc)\"<br />(using a different number of cores is on the agenda)</td></tr>"
- write_page "<tr><td>UTS namespace</td><td><em>shared with the host</em></td><td><em>modified using</em> /usr/bin/unshare --uts</td></tr>"
- write_page "<tr><td>kernel version, modified using /usr/bin/linux64 --uname-2.6</td><td>$(uname -sr)</td><td>$(/usr/bin/linux64 --uname-2.6 uname -sr)</td></tr>"
- write_page "<tr><td>umask</td><td>0022<td>0002</td><tr>"
- write_page "<tr><td>CPU type</td><td>$(cat /proc/cpuinfo|grep 'model name'|head -1|cut -d ":" -f2-)</td><td>same for both builds (currently, work in progress)</td></tr>"
- write_page "<tr><td>year, month, date</td><td>today ($DATE)</td><td>same for both builds (currently, work in progress)</td></tr>"
- write_page "<tr><td>hour, minute</td><td>hour is usually the same...</td><td>usually, the minute differs... (currently, work in progress)</td></tr>"
- write_page "<tr><td><em>everything else...</em></td><td colspan=\"2\">is likely the same. So far, this is just about the <em>prospects</em> of <a href=\"https://wiki.debian.org/ReproducibleBuilds\">reproducible builds of Debian</a> - there will be more variations in the wild.</td></tr>"
- write_page "</table>"
+ write_explaination_table debian
# write build per day graph
- write_page "</p><p style=\"clear:both;\">"
+ write_page "<p style=\"clear:both;\">"
write_page " <a href=\"/userContent/${TABLE[1]}.png\"><img src=\"/userContent/${TABLE[1]}.png\" alt=\"${MAINLABEL[$i]}\"></a>"
# redo png once a day
if [ ! -f $BASE/${TABLE[1]}.png ] || [ ! -z $(find $BASE -maxdepth 1 -mtime +0 -name ${TABLE[1]}.png) ] ; then