Package: logrotate
Version: 3.14.0-4
Severity: normal
Tags: upstream
Dear Maintainer,
* What led up to the situation?
A piece of ancient software forces us to use copytruncate instead of
normal rotation, but we don't really need the log, thus we wanted it
just gone once a day to avoid it filling up disk space.
* What exactly did you do (or not do) that was effective (or
ineffective)?
We tried to combine both copytruncate with rotate 0, which in
theory should lead to the log being copied and this copy afterwards
deleted. Effectively an 'echo "" > $LOGFILE'.
* What was the outcome of this action?
The log is copied and emptied (so copytruncate does its job), but
the resulting copy remains until it's deleted by logrotate the day
after. In the end this is just what rotate 1 does.
* What outcome did you expect instead?
I expected rotate 0 to do its job even with copytruncate. I mean,
it's not breaking anything, just not expected from reading manpages
and somewhat inconsistent.
-- Package-specific info:
Contents of /etc/logrotate.d
total 56
-rw-r--r-- 1 root root 120 Apr 19 2019 alternatives
-rw-r--r-- 1 root root 173 Sep 13 2017 apt
-rw-r--r-- 1 root root 79 Apr 19 2017 aptitude
-rw-r--r-- 1 root root 130 Aug 29 2018 btmp
-rw-r--r-- 1 root root 181 Jul 10 2018 cups-daemon
-rw-r--r-- 1 root root 112 Apr 19 2019 dpkg
-rw-r--r-- 1 root root 146 Feb 10 2018 exim4-base
-rw-r--r-- 1 root root 126 Feb 10 2018 exim4-paniclog
-rw-r--r-- 1 root root 94 Dec 4 2015 ppp
-rw-r--r-- 1 root root 501 Feb 26 2019 rsyslog
-rw-r--r-- 1 root root 891 Jun 11 2019 samba
-rw-r--r-- 1 root root 677 Jan 1 2019 speech-dispatcher
-rw-r--r-- 1 root root 235 Dec 11 2016 unattended-upgrades
-rw-r--r-- 1 root root 145 Feb 19 2018 wtmp
-- System Information:
Debian Release: 10.4
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.19.0-9-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_WARN
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8),
LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages logrotate depends on:
ii anacron 2.3-28
ii cron [cron-daemon] 3.0pl1-134+deb10u1
ii libacl1 2.2.53-4
ii libc6 2.28-10
ii libpopt0 1.16-12
ii libselinux1 2.8-1+b1
ii systemd-sysv 241-7~deb10u4
Versions of packages logrotate recommends:
ii bsd-mailx [mailx] 8.1.2-0.20180807cvs-1
ii mailutils [mailx] 1:3.5-3
logrotate suggests no packages.
-- no debconf information