Your message dated Tue, 30 Sep 2008 23:47:03 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#499502: fixed in logrotate 3.7.1-4
has caused the Debian Bug report #499502,
regarding logrotate: Logrotate still compresses logs in debug mode
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)
--
499502: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=499502
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Package: logrotate
Version: 3.7.1-3
Severity: grave
Tags: patch
Justification: causes non-serious data loss
Logrotate overwrites logfiles by starting the compress program in
debug mode. In order to investigate why logrotate didn't compress
a logfile, I touched the file /var/log/my.own.log.1 without realising
that /var/log/my.own.log.1.gz already existed. After running
logrotate -d, the file /var/log/my.own.log.1.gz was overwritten by
the compressed contents of the empty file I just created and I lost
the original log file. This is in violation with the manual page,
which states:
-d Turns on debug mode and implies -v. In debug mode, no changes
will be made to the logs or to the logrotate state file.
Right now it will touch log files (opens my.log.1, creates my.log.1.gz).
Here is a patch to fix that:
--- logrotate.c-old 2008-09-19 10:39:56.000000000 +0200
+++ logrotate.c 2008-09-19 10:45:45.000000000 +0200
@@ -140,6 +140,11 @@
strlen(log->compress_ext) + 2);
sprintf(compressedName, "%s%s", name, log->compress_ext);
+ message(MESS_DEBUG, "compressing log with: %s\n", fullCommand[0]);
+
+ if (debug)
+ return 0;
+
if ((inFile = open(name, O_RDONLY)) < 0) {
message(MESS_ERROR, "unable to open %s for compression\n", name);
return 1;
@@ -173,8 +178,6 @@
return 1;
}
- message(MESS_DEBUG, "compressing log with: %s\n", fullCommand[0]);
-
if (!fork()) {
dup2(inFile, 0);
close(inFile);
Please consider applying this patch.
Regards,
Erik
-- Package-specific info:
Contents of /etc/logrotate.d
total 60
-rw-r--r-- 1 root root 137 2006-01-15 22:24 acpid
-rw-r--r-- 1 root root 366 2004-09-09 07:40 apache
-rw-r--r-- 1 root root 79 2003-06-09 22:05 aptitude
-rw-r--r-- 1 root root 384 2005-05-15 21:00 base-config
-rw-r--r-- 1 root root 113 2004-08-20 23:44 cron-apt
-rw-r--r-- 1 root root 245 2006-06-22 09:05 cupsys
-rw-r--r-- 1 root root 111 2007-01-02 00:02 dpkg
-rw-r--r-- 1 root root 273 2007-11-03 09:29 exim4-base
-rw-r--r-- 1 root root 151 2002-11-11 17:54 iptraf
-rw-r--r-- 1 root root 837 2008-06-26 22:38 mysql-server
-rw-r--r-- 1 root root 1116 2005-09-15 19:54 mysql-server.dpkg-old
-rw-r--r-- 1 root root 94 2003-10-30 22:44 ppp
-rw-r--r-- 1 root root 68 2002-07-25 18:10 scrollkeeper
-rw-r--r-- 1 root root 80 2006-07-19 07:13 wpa_action
-rw-r--r-- 1 root root 314 2006-12-11 14:26 wu-ftpd
-- System Information:
Debian Release: 4.0
APT prefers proposed-updates
APT policy: (500, 'proposed-updates'), (500, 'stable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.26
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Versions of packages logrotate depends on:
ii base-passwd 3.5.11 Debian base system master password
ii cron 3.0pl1-100 management of regular background p
ii libc6 2.3.6.ds1-13etch7 GNU C Library: Shared libraries
ii libpopt0 1.10-3 lib for parsing cmdline parameters
ii libselinux1 1.32-3 SELinux shared libraries
Versions of packages logrotate recommends:
ii mailx 1:8.1.2-0.20050715cvs-1 A simple mail user agent
-- no debconf information
--- End Message ---
--- Begin Message ---
Source: logrotate
Source-Version: 3.7.1-4
We believe that the bug you reported is fixed in the latest version of
logrotate, which is due to be installed in the Debian FTP archive:
logrotate_3.7.1-4.diff.gz
to pool/main/l/logrotate/logrotate_3.7.1-4.diff.gz
logrotate_3.7.1-4.dsc
to pool/main/l/logrotate/logrotate_3.7.1-4.dsc
logrotate_3.7.1-4_i386.deb
to pool/main/l/logrotate/logrotate_3.7.1-4_i386.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Paul Martin <[EMAIL PROTECTED]> (supplier of updated logrotate package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Wed, 01 Oct 2008 00:39:12 +0100
Source: logrotate
Binary: logrotate
Architecture: source i386
Version: 3.7.1-4
Distribution: unstable
Urgency: high
Maintainer: Paul Martin <[EMAIL PROTECTED]>
Changed-By: Paul Martin <[EMAIL PROTECTED]>
Description:
logrotate - Log rotation utility
Closes: 370050 499502
Changes:
logrotate (3.7.1-4) unstable; urgency=high
.
* Change default logrotate.conf to use permission 660 for
/var/log/btmp. (Closes: #370050)
* compress-499502.patch: Don't clobber existing files if in debug mode
and compressing. (Closes: #499502)
* Lintian cleanups:
+ debian-rules-ignores-make-clean-error
+ maintainer-script-ignores-errors preinst postrm
+ Update Standards-Version to 3.8.0. (No changes)
Checksums-Sha1:
26227bc7273fdf0b7d550ddb9a0abc97e0169714 1024 logrotate_3.7.1-4.dsc
71041c6e9f66998d71065dcf98bc6aef9ce483ed 23638 logrotate_3.7.1-4.diff.gz
07997ad9c31aede17f37c3b854e34eb494f5b828 36452 logrotate_3.7.1-4_i386.deb
Checksums-Sha256:
144598d83d423a198ead5ef90b13e4e809025cb968cfb3f1d76e1f0d93619ae4 1024
logrotate_3.7.1-4.dsc
1c7f195ec3934e189f15ccb13bc64d9f182a86da0c118750367f9ce2f2d1509f 23638
logrotate_3.7.1-4.diff.gz
c5e980755f645022a89778a38d287d364ece6988dbaa8dae5f29157e2cdb9d97 36452
logrotate_3.7.1-4_i386.deb
Files:
309f077a06947c6b109c623908485834 1024 admin important logrotate_3.7.1-4.dsc
f6144deff4e73cd96092c79ace4cef08 23638 admin important
logrotate_3.7.1-4.diff.gz
08d8958155be1fdc2b381b9feac2a1a9 36452 admin important
logrotate_3.7.1-4_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iD8DBQFI4rjX+gi+rt7UWRIRAj2uAKCQy+LlepreOIlAgZvhscxkEQJfBQCgk9zB
hRJwQB1CpH3/apTWj2l+W0A=
=dsom
-----END PGP SIGNATURE-----
--- End Message ---