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

use 'date -u' always

parent 0bc5b695
......@@ -4,7 +4,7 @@
# released under the GPLv=2
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
}
......
......@@ -152,7 +152,7 @@ cleanup_all() {
#
# 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)
avconv -r $FRAMERATE -i snapshot_%06d.png g-i-installation-$NAME.webm > $TMPFILE 2>&1 || cat $TMPFILE
rm snapshot_??????.png $TMPFILE
......@@ -394,7 +394,7 @@ publish_screenshot() {
}
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
# received, sometimes received as if "e" key was kept pressed.
if [ "$1" = "type" ]; then
......@@ -1037,7 +1037,7 @@ monitor_system() {
convert $CONVERTOPTS snapshot_${PRINTF_NR}.jpg snapshot_${PRINTF_NR}.png
rm snapshot_${PRINTF_NR}.jpg
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
fi
# every 100 ticks take a screenshot and analyse it
......@@ -1088,7 +1088,7 @@ monitor_system() {
fi
elif [ $(($NR % 30)) -eq 0 ] ; then
# give signal we are still running
echo "$(date) $PRINTF_NR / $TOKEN"
echo "$(date -u) $PRINTF_NR / $TOKEN"
publish_screenshot
fi
# in install mode, every 300 ticks preserve an screenshot as artefact
......
......@@ -39,7 +39,7 @@ sudo lb build
mkdir -p /srv/live-build/results
sudo cp -v live-image-amd64.hybrid.iso /srv/live-build/results/$1_$2_$3_live_amd64.iso
echo
echo "$(date) - live image created:"
echo "$(date -u) - live image created:"
ls -lh /srv/live-build/results/$1_$2_$3_live_amd64.iso
echo
......
......@@ -503,7 +503,7 @@ 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}
echo "$(date -u) - total duration: ${HOUR}h ${MIN}m ${SEC}s." | tee -a ${RBUILDLOG}
}
irc_message() {
......
......@@ -82,13 +82,13 @@ update_if_similar() {
update_target
fi
else
echo "$(date) - $TARGET not updated, $TMPFILE is empty."
echo "$(date -u) - $TARGET not updated, $TMPFILE is empty."
fi
}
get_installable_set() {
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
RESULT=$?
if [ $RESULT -ne 0 ] ; then
......
......@@ -139,7 +139,7 @@ for FREEBSD_TARGET in ${FREEBSD_TARGETS} ;do
# set time forward 398 days and some
$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 "$(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
# set time back to today
$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
export LANG="en_GB.UTF-8"
......
......@@ -361,7 +361,7 @@ create_suite_arch_stats_page() {
PAGE=index_${VIEW}.html
MAINLABEL[0]="Reproducibility status for packages 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"
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>"
......@@ -429,7 +429,7 @@ write_meta_pkg_graphs_links () {
create_dashboard_page() {
VIEW=dashboard
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_suite_table
# write suite graphs
......
......@@ -113,7 +113,7 @@ create_pkg_sets_pages() {
#
VIEW=pkg_sets
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"
create_pkg_sets_navigation
write_page_footer
......@@ -124,7 +124,7 @@ create_pkg_sets_pages() {
local i
for i in $(seq 1 ${#META_PKGSET[@]}) ; do
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"
create_pkg_sets_navigation
write_page "<hr />"
......
......@@ -38,7 +38,7 @@ custom_curl() {
ARCH="amd64"
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 "<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/ ./"
......
......@@ -85,7 +85,7 @@ setup_pbuilder() {
shift
PACKAGES="$@" # from our repo
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)
LOG=$(mktemp --tmpdir=$TEMPDIR pbuilder-XXXXXXXX)
if [ "$SUITE" = "experimental" ] ; then
......
......@@ -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
sleep 0.5
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
sleep 0.5
schroot --run-session -c $SESSION --directory /tmp -u root -- service dbus stop
......
......@@ -13,7 +13,7 @@ udd_query() {
#
# 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
PGPASSWORD=public-udd-mirror \
psql -U public-udd-mirror \
......
......@@ -11,6 +11,6 @@
#
# 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
......@@ -11,6 +11,6 @@
#
# 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
......@@ -11,6 +11,6 @@
#
# 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
......@@ -11,6 +11,6 @@
#
# 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
......@@ -11,6 +11,6 @@
#
# 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
......@@ -11,6 +11,6 @@
#
# 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
......@@ -11,6 +11,6 @@
#
# 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
......@@ -11,6 +11,6 @@
#
# 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
......@@ -11,6 +11,6 @@
#
# 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
......@@ -11,6 +11,6 @@
#
# 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
......@@ -11,7 +11,7 @@
#
# 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
# disable systemd date services (and don't fail if systemd ain't running)
systemctl disable systemd-timesyncd
......@@ -26,6 +26,6 @@ date --set="+398 days +6 hours + 23 minutes"
# packages from security.d.o will appear outdated always…
ln -sf /bin/true /usr/local/bin/dsa-check-packages
# finally report success
echo "$(date) - system is running in the future now" | mail -s "$(hostname -f) in the future" root
echo "$(date -u) - system is running in the future now" | mail -s "$(hostname -f) in the future" root
exit 0
......@@ -11,7 +11,7 @@
#
# 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
# disable systemd date services (and don't fail if systemd ain't running)
systemctl disable systemd-timesyncd
......@@ -26,6 +26,6 @@ date --set="+398 days +6 hours + 23 minutes"
# packages from security.d.o will appear outdated always…
ln -sf /bin/true /usr/local/bin/dsa-check-packages
# finally report success
echo "$(date) - system is running in the future now" | mail -s "$(hostname -f) in the future" root
echo "$(date -u) - system is running in the future now" | mail -s "$(hostname -f) in the future" root
exit 0
......@@ -11,6 +11,6 @@
#
# 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
......@@ -11,6 +11,6 @@
#
# 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
......@@ -11,6 +11,6 @@
#
# 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
Markdown is supported
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