Commit 27ab8b8e authored by Holger Levsen's avatar Holger Levsen
Browse files

use 'date -u' always

parent 0bc5b695
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# released under the GPLv=2 # released under the GPLv=2
common_cleanup() { common_cleanup() {
echo "$(date) - $0 stopped running as $TTT, which will now be removed." echo "$(date -u) - $0 stopped running as $TTT, which will now be removed."
rm -f $TTT rm -f $TTT
} }
......
...@@ -152,7 +152,7 @@ cleanup_all() { ...@@ -152,7 +152,7 @@ cleanup_all() {
# #
# create video # create video
# #
echo "$(date) - Creating video now. This may take a while.'" echo "$(date -u) - Creating video now. This may take a while.'"
TMPFILE=$(mktemp) TMPFILE=$(mktemp)
avconv -r $FRAMERATE -i snapshot_%06d.png g-i-installation-$NAME.webm > $TMPFILE 2>&1 || cat $TMPFILE avconv -r $FRAMERATE -i snapshot_%06d.png g-i-installation-$NAME.webm > $TMPFILE 2>&1 || cat $TMPFILE
rm snapshot_??????.png $TMPFILE rm snapshot_??????.png $TMPFILE
...@@ -394,7 +394,7 @@ publish_screenshot() { ...@@ -394,7 +394,7 @@ publish_screenshot() {
} }
do_and_report() { do_and_report() {
echo "$(date) $PRINTF_NR / $TOKEN - sending '$@'" echo "$(date -u) $PRINTF_NR / $TOKEN - sending '$@'"
# Workaround #758881: vncdo type command sending "e" chars sometimes not # Workaround #758881: vncdo type command sending "e" chars sometimes not
# received, sometimes received as if "e" key was kept pressed. # received, sometimes received as if "e" key was kept pressed.
if [ "$1" = "type" ]; then if [ "$1" = "type" ]; then
...@@ -1037,7 +1037,7 @@ monitor_system() { ...@@ -1037,7 +1037,7 @@ monitor_system() {
convert $CONVERTOPTS snapshot_${PRINTF_NR}.jpg snapshot_${PRINTF_NR}.png convert $CONVERTOPTS snapshot_${PRINTF_NR}.jpg snapshot_${PRINTF_NR}.png
rm snapshot_${PRINTF_NR}.jpg rm snapshot_${PRINTF_NR}.jpg
else else
echo "$(date) $PRINTF_NR - could not take vncsnapshot from $DISPLAY - using a blank fake one instead" echo "$(date -u) $PRINTF_NR - could not take vncsnapshot from $DISPLAY - using a blank fake one instead"
convert -size $VIDEOSIZE xc:#000000 -depth 8 snapshot_${PRINTF_NR}.png convert -size $VIDEOSIZE xc:#000000 -depth 8 snapshot_${PRINTF_NR}.png
fi fi
# every 100 ticks take a screenshot and analyse it # every 100 ticks take a screenshot and analyse it
...@@ -1088,7 +1088,7 @@ monitor_system() { ...@@ -1088,7 +1088,7 @@ monitor_system() {
fi fi
elif [ $(($NR % 30)) -eq 0 ] ; then elif [ $(($NR % 30)) -eq 0 ] ; then
# give signal we are still running # give signal we are still running
echo "$(date) $PRINTF_NR / $TOKEN" echo "$(date -u) $PRINTF_NR / $TOKEN"
publish_screenshot publish_screenshot
fi fi
# in install mode, every 300 ticks preserve an screenshot as artefact # in install mode, every 300 ticks preserve an screenshot as artefact
......
...@@ -39,7 +39,7 @@ sudo lb build ...@@ -39,7 +39,7 @@ sudo lb build
mkdir -p /srv/live-build/results mkdir -p /srv/live-build/results
sudo cp -v live-image-amd64.hybrid.iso /srv/live-build/results/$1_$2_$3_live_amd64.iso sudo cp -v live-image-amd64.hybrid.iso /srv/live-build/results/$1_$2_$3_live_amd64.iso
echo echo
echo "$(date) - live image created:" echo "$(date -u) - live image created:"
ls -lh /srv/live-build/results/$1_$2_$3_live_amd64.iso ls -lh /srv/live-build/results/$1_$2_$3_live_amd64.iso
echo echo
......
...@@ -503,7 +503,7 @@ print_out_duration() { ...@@ -503,7 +503,7 @@ print_out_duration() {
local HOUR=$(echo "$DURATION/3600"|bc) local HOUR=$(echo "$DURATION/3600"|bc)
local MIN=$(echo "($DURATION-$HOUR*3600)/60"|bc) local MIN=$(echo "($DURATION-$HOUR*3600)/60"|bc)
local SEC=$(echo "$DURATION-$HOUR*3600-$MIN*60"|bc) local SEC=$(echo "$DURATION-$HOUR*3600-$MIN*60"|bc)
echo "$(date) - total duration: ${HOUR}h ${MIN}m ${SEC}s." | tee -a ${RBUILDLOG} echo "$(date -u) - total duration: ${HOUR}h ${MIN}m ${SEC}s." | tee -a ${RBUILDLOG}
} }
irc_message() { irc_message() {
......
...@@ -82,13 +82,13 @@ update_if_similar() { ...@@ -82,13 +82,13 @@ update_if_similar() {
update_target update_target
fi fi
else else
echo "$(date) - $TARGET not updated, $TMPFILE is empty." echo "$(date -u) - $TARGET not updated, $TMPFILE is empty."
fi fi
} }
get_installable_set() { get_installable_set() {
set +e set +e
echo "$(date) - Calculating the installable set for $1" echo "$(date -u) - Calculating the installable set for $1"
dose-deb-coinstall --deb-native-arch=$ARCH --bg=$PACKAGES --fg=${TMPFILE2} > $TMPFILE dose-deb-coinstall --deb-native-arch=$ARCH --bg=$PACKAGES --fg=${TMPFILE2} > $TMPFILE
RESULT=$? RESULT=$?
if [ $RESULT -ne 0 ] ; then if [ $RESULT -ne 0 ] ; then
......
...@@ -139,7 +139,7 @@ for FREEBSD_TARGET in ${FREEBSD_TARGETS} ;do ...@@ -139,7 +139,7 @@ for FREEBSD_TARGET in ${FREEBSD_TARGETS} ;do
# set time forward 398 days and some # set time forward 398 days and some
$RSSH "sudo service ntpd stop ; sudo date --set='+398 days +6 hours +23 minutes' ; date" $RSSH "sudo service ntpd stop ; sudo date --set='+398 days +6 hours +23 minutes' ; date"
echo "$(date) - system is running in the future now." echo "$(date -u) - system is running in the future now."
echo "=============================================================================" echo "============================================================================="
echo "$(date -u) - Building FreeBSD (branch $FREEBSD_TARGET at ${FREEBSD_VERSION[$FREEBSD_TARGET]}) - second build run." echo "$(date -u) - Building FreeBSD (branch $FREEBSD_TARGET at ${FREEBSD_VERSION[$FREEBSD_TARGET]}) - second build run."
...@@ -166,7 +166,7 @@ for FREEBSD_TARGET in ${FREEBSD_TARGETS} ;do ...@@ -166,7 +166,7 @@ for FREEBSD_TARGET in ${FREEBSD_TARGETS} ;do
# set time back to today # set time back to today
$RSSH "sudo ntpdate -b pool.ntp.org ; sudo service ntpd start ; sudo service ntpd status ; date" $RSSH "sudo ntpdate -b pool.ntp.org ; sudo service ntpd start ; sudo service ntpd status ; date"
echo "$(date) - system is running at the current date now." echo "$(date -u) - system is running at the current date now."
# reset environment to default values again # reset environment to default values again
export LANG="en_GB.UTF-8" export LANG="en_GB.UTF-8"
......
...@@ -361,7 +361,7 @@ create_suite_arch_stats_page() { ...@@ -361,7 +361,7 @@ create_suite_arch_stats_page() {
PAGE=index_${VIEW}.html PAGE=index_${VIEW}.html
MAINLABEL[0]="Reproducibility status for packages in '$SUITE' for '$ARCH'" MAINLABEL[0]="Reproducibility status for packages in '$SUITE' for '$ARCH'"
MAINLABEL[2]="Age in days of oldest reproducible build result in '$SUITE' for '$ARCH'" MAINLABEL[2]="Age in days of oldest reproducible build result in '$SUITE' for '$ARCH'"
echo "$(date) - starting to write $PAGE page." echo "$(date -u) - starting to write $PAGE page."
write_page_header $VIEW "Overview of reproducible builds for packages in $SUITE for $ARCH" write_page_header $VIEW "Overview of reproducible builds for packages in $SUITE for $ARCH"
if [ $(echo $PERCENT_TOTAL/1|bc) -lt 100 ] ; then if [ $(echo $PERCENT_TOTAL/1|bc) -lt 100 ] ; then
write_page "<p>$COUNT_TOTAL packages have been attempted to be build so far, that's $PERCENT_TOTAL% of $AMOUNT source packages in Debian $SUITE/$ARCH.</p>" write_page "<p>$COUNT_TOTAL packages have been attempted to be build so far, that's $PERCENT_TOTAL% of $AMOUNT source packages in Debian $SUITE/$ARCH.</p>"
...@@ -429,7 +429,7 @@ write_meta_pkg_graphs_links () { ...@@ -429,7 +429,7 @@ write_meta_pkg_graphs_links () {
create_dashboard_page() { create_dashboard_page() {
VIEW=dashboard VIEW=dashboard
PAGE=index_${VIEW}.html PAGE=index_${VIEW}.html
echo "$(date) - starting to write $PAGE page." echo "$(date -u) - starting to write $PAGE page."
write_page_header $VIEW "Overview of various statistics about reproducible builds" write_page_header $VIEW "Overview of various statistics about reproducible builds"
write_suite_table write_suite_table
# write suite graphs # write suite graphs
......
...@@ -113,7 +113,7 @@ create_pkg_sets_pages() { ...@@ -113,7 +113,7 @@ create_pkg_sets_pages() {
# #
VIEW=pkg_sets VIEW=pkg_sets
PAGE=index_${VIEW}.html PAGE=index_${VIEW}.html
echo "$(date) - starting to write $PAGE page." echo "$(date -u) - starting to write $PAGE page."
write_page_header $VIEW "Overview about reproducible builds of specific package sets in $SUITE/$ARCH" write_page_header $VIEW "Overview about reproducible builds of specific package sets in $SUITE/$ARCH"
create_pkg_sets_navigation create_pkg_sets_navigation
write_page_footer write_page_footer
...@@ -124,7 +124,7 @@ create_pkg_sets_pages() { ...@@ -124,7 +124,7 @@ create_pkg_sets_pages() {
local i local i
for i in $(seq 1 ${#META_PKGSET[@]}) ; do for i in $(seq 1 ${#META_PKGSET[@]}) ; do
PAGE="pkg_set_${META_PKGSET[$i]}.html" PAGE="pkg_set_${META_PKGSET[$i]}.html"
echo "$(date) - starting to write $PAGE page." echo "$(date -u) - starting to write $PAGE page."
write_page_header $VIEW "Overview about reproducible builds for the ${META_PKGSET[$i]} package set in $SUITE/$ARCH" write_page_header $VIEW "Overview about reproducible builds for the ${META_PKGSET[$i]} package set in $SUITE/$ARCH"
create_pkg_sets_navigation create_pkg_sets_navigation
write_page "<hr />" write_page "<hr />"
......
...@@ -38,7 +38,7 @@ custom_curl() { ...@@ -38,7 +38,7 @@ custom_curl() {
ARCH="amd64" ARCH="amd64"
SUITE="unstable" SUITE="unstable"
echo "$(date) - starting to write $PAGE page. Downloading Sources and Packages files from our repository." echo "$(date -u) - starting to write $PAGE page. Downloading Sources and Packages files from our repository."
write_page_header $VIEW "Comparison between the reproducible builds apt repository and regular Debian suites" write_page_header $VIEW "Comparison between the reproducible builds apt repository and regular Debian suites"
write_page "<p>These source packages (and their binaries packages) are different from unstable in our apt repository on alioth. They are available for <a href=\"https://wiki.debian.org/ReproducibleBuilds/ExperimentalToolchain#Usage_example\">testing using these sources.lists</a> entries:<pre>" write_page "<p>These source packages (and their binaries packages) are different from unstable in our apt repository on alioth. They are available for <a href=\"https://wiki.debian.org/ReproducibleBuilds/ExperimentalToolchain#Usage_example\">testing using these sources.lists</a> entries:<pre>"
write_page "deb http://reproducible.alioth.debian.org/debian/ ./" write_page "deb http://reproducible.alioth.debian.org/debian/ ./"
......
...@@ -85,7 +85,7 @@ setup_pbuilder() { ...@@ -85,7 +85,7 @@ setup_pbuilder() {
shift shift
PACKAGES="$@" # from our repo PACKAGES="$@" # from our repo
EXTRA_PACKAGES="locales-all fakeroot disorderfs" # from sid EXTRA_PACKAGES="locales-all fakeroot disorderfs" # from sid
echo "$(date) - creating /var/cache/pbuilder/${NAME}.tgz now..." echo "$(date -u) - creating /var/cache/pbuilder/${NAME}.tgz now..."
TMPFILE=$(mktemp --tmpdir=$TEMPDIR pbuilder-XXXXXXXXX) TMPFILE=$(mktemp --tmpdir=$TEMPDIR pbuilder-XXXXXXXXX)
LOG=$(mktemp --tmpdir=$TEMPDIR pbuilder-XXXXXXXX) LOG=$(mktemp --tmpdir=$TEMPDIR pbuilder-XXXXXXXX)
if [ "$SUITE" = "experimental" ] ; then if [ "$SUITE" = "experimental" ] ; then
......
...@@ -376,7 +376,7 @@ download_and_launch() { ...@@ -376,7 +376,7 @@ download_and_launch() {
echo "'$(date -u) - torbrowser tests end. $STATUS_MSG'" | tee | xargs schroot --run-session -c $SESSION --preserve-environment -- notify-send echo "'$(date -u) - torbrowser tests end. $STATUS_MSG'" | tee | xargs schroot --run-session -c $SESSION --preserve-environment -- notify-send
sleep 0.5 sleep 0.5
update_screenshot update_screenshot
echo "$(date) - telling awesome to quit." echo "$(date -u) - telling awesome to quit."
echo 'awesome.quit()' | schroot --run-session -c $SESSION --preserve-environment -- awesome-client echo 'awesome.quit()' | schroot --run-session -c $SESSION --preserve-environment -- awesome-client
sleep 0.5 sleep 0.5
schroot --run-session -c $SESSION --directory /tmp -u root -- service dbus stop schroot --run-session -c $SESSION --directory /tmp -u root -- service dbus stop
......
...@@ -13,7 +13,7 @@ udd_query() { ...@@ -13,7 +13,7 @@ udd_query() {
# #
# Actually query UDD and save result in $UDD file # Actually query UDD and save result in $UDD file
# #
echo "$(date) - querying UDD using ${SQL_QUERY}" echo "$(date -u) - querying UDD using ${SQL_QUERY}"
echo echo
PGPASSWORD=public-udd-mirror \ PGPASSWORD=public-udd-mirror \
psql -U public-udd-mirror \ psql -U public-udd-mirror \
......
...@@ -11,6 +11,6 @@ ...@@ -11,6 +11,6 @@
# #
# By default this script does nothing. # By default this script does nothing.
echo "$(date) - system was rebooted" | mail -s "$(hostname -f) rebooted" root echo "$(date -u) - system was rebooted" | mail -s "$(hostname -f) rebooted" root
exit 0 exit 0
...@@ -11,6 +11,6 @@ ...@@ -11,6 +11,6 @@
# #
# By default this script does nothing. # By default this script does nothing.
echo "$(date) - system was rebooted" | mail -s "$(hostname -f) rebooted" root echo "$(date -u) - system was rebooted" | mail -s "$(hostname -f) rebooted" root
exit 0 exit 0
...@@ -11,6 +11,6 @@ ...@@ -11,6 +11,6 @@
# #
# By default this script does nothing. # By default this script does nothing.
echo "$(date) - system was rebooted" | mail -s "$(hostname -f) rebooted" root echo "$(date -u) - system was rebooted" | mail -s "$(hostname -f) rebooted" root
exit 0 exit 0
...@@ -11,6 +11,6 @@ ...@@ -11,6 +11,6 @@
# #
# By default this script does nothing. # By default this script does nothing.
echo "$(date) - system was rebooted" | mail -s "$(hostname -f) rebooted" root echo "$(date -u) - system was rebooted" | mail -s "$(hostname -f) rebooted" root
exit 0 exit 0
...@@ -11,6 +11,6 @@ ...@@ -11,6 +11,6 @@
# #
# By default this script does nothing. # By default this script does nothing.
echo "$(date) - system was rebooted" | mail -s "$(hostname -f) rebooted" root echo "$(date -u) - system was rebooted" | mail -s "$(hostname -f) rebooted" root
exit 0 exit 0
...@@ -11,6 +11,6 @@ ...@@ -11,6 +11,6 @@
# #
# By default this script does nothing. # By default this script does nothing.
echo "$(date) - system was rebooted" | mail -s "$(hostname -f) rebooted" root echo "$(date -u) - system was rebooted" | mail -s "$(hostname -f) rebooted" root
exit 0 exit 0
...@@ -11,6 +11,6 @@ ...@@ -11,6 +11,6 @@
# #
# By default this script does nothing. # By default this script does nothing.
echo "$(date) - system was rebooted" | mail -s "$(hostname -f) rebooted" root echo "$(date -u) - system was rebooted" | mail -s "$(hostname -f) rebooted" root
exit 0 exit 0
...@@ -11,6 +11,6 @@ ...@@ -11,6 +11,6 @@
# #
# By default this script does nothing. # By default this script does nothing.
echo "$(date) - system was rebooted" | mail -s "$(hostname -f) rebooted" root echo "$(date -u) - system was rebooted" | mail -s "$(hostname -f) rebooted" root
exit 0 exit 0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment