[Piuparts-devel] [Git][debian/piuparts][develop] master-bin/rotate_master_logs: compress htdocs/logs older than a week.
Holger Levsen
gitlab at salsa.debian.org
Thu Nov 29 13:04:47 GMT 2018
Holger Levsen pushed to branch develop at Debian / piuparts
Commits:
64d19db9 by Holger Levsen at 2018-11-29T13:04:07Z
master-bin/rotate_master_logs: compress htdocs/logs older than a week.
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
2 changed files:
- debian/changelog
- master-bin/rotate_master_logs.in
Changes:
=====================================
debian/changelog
=====================================
@@ -16,6 +16,7 @@ piuparts (0.95) UNRELEASED; urgency=medium
report_untestable_packages: redirect logs to htdocs/logs.
- conf/crontab-master.in: run detect_well_known_errors, piuparts-report
and piuparts-analyze through the new master_shell_runner script.
+ - master-bin/rotate_master_logs: compress htdocs/logs older than a week.
- piuparts-report.py: add navigation link to https://piuparts.d.o/logs/
- htdocs/news.tpl: explain the result of these changes.
* d/control: use canonical URL for Vcs-Git, thanks lintian.
=====================================
master-bin/rotate_master_logs.in
=====================================
@@ -51,6 +51,14 @@ for SECTION in $SECTIONS ; do
done
done
+LOGDATEDIR="$HTDOCS/logs/$(date -u '+%Y/%m/%d' -d '7 days ago')"
+if [ -d $LOGDATEDIR ] && [ -n "$(find $LOGDATEDIR -type f ! -name '*.xz')" ] ; then
+ echo >> $OUTPUT
+ echo "Compressing old piuparts.d.o logfiles." >> $OUTPUT
+ echo >> $OUTPUT
+ find $LOGDATEDIR -type f ! -name '*.xz' -exec xz -v9 {} \; >> $OUTPUT
+fi
+
if [ -s $OUTPUT ] ; then
LOG_OUTPUT=$(mktemp)
echo "$(date -u)" > $LOG_OUTPUT
View it on GitLab: https://salsa.debian.org/debian/piuparts/commit/64d19db953fb4703ebccd17364a083c0162166d4
--
View it on GitLab: https://salsa.debian.org/debian/piuparts/commit/64d19db953fb4703ebccd17364a083c0162166d4
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/piuparts-devel/attachments/20181129/a3239737/attachment-0001.html>
More information about the Piuparts-devel
mailing list