Your message dated Thu, 28 Jul 2005 02:47:13 -0700
with message-id <[EMAIL PROTECTED]>
and subject line Bug#188198: fixed in logrotate 3.7.1-1
has caused the attached Bug report 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 I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--------------------------------------
Received: (at submit) by bugs.debian.org; 4 Jan 2004 05:13:05 +0000
>From [EMAIL PROTECTED] Sat Jan 03 23:13:04 2004
Return-path: <[EMAIL PROTECTED]>
Received: from kirche-wolfsburg.de (mail.kaenguruh-edv.de) [217.160.111.152]
by master.debian.org with smtp (Exim 3.35 1 (Debian))
id 1AcyTJ-0002vr-00; Sat, 03 Jan 2004 20:58:34 -0600
Received: (qmail 9052 invoked from network); 4 Jan 2004 02:58:32 -0000
Received: from p5089aadb.dip.t-dialin.net (HELO roland-illig.de) ([EMAIL
PROTECTED])
by kirche-wolfsburg.de with SMTP; 4 Jan 2004 02:58:32 -0000
Received: by roland-illig.de (Postfix, from userid 1001)
id CAD352C52; Sun, 4 Jan 2004 03:58:31 +0100 (CET)
Content-Type: multipart/mixed; boundary="===============1343523212=="
MIME-Version: 1.0
From: Roland Illig <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: logrotate: append the current date to the backup filename
X-Mailer: reportbug 2.37
Date: Sun, 04 Jan 2004 03:58:31 +0100
Message-Id: <[EMAIL PROTECTED]>
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin
2.60-master.debian.org_2003_11_25-bugs.debian.org_2004_1_3
(1.212-2003-09-23-exp) on master.debian.org
X-Spam-Status: No, hits=-5.0 required=4.0 tests=HAS_PACKAGE autolearn=no
version=2.60-master.debian.org_2003_11_25-bugs.debian.org_2004_1_3
X-Spam-Level:
This is a multi-part MIME message sent by reportbug.
--===============1343523212==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Package: logrotate
Version: 3.6.5-2
Severity: wishlist
Tags: patch
This patch adds the [--date | -D] option to logrotate, which appends to
each rotated file the date it was rotated. The patch does not change the
behaviour unless the date option is given on the command line.
-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux wwid 2.4.22-1-k7 #5 Sat Oct 4 14:11:12 EST 2003 i686
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (ignored: LC_ALL set to [EMAIL
PROTECTED])
Versions of packages logrotate depends on:
ii anacron 2.3-7 a cron-like program that doesn't g
ii base-passwd 3.5.5 Debian base system master password
ii cron 3.0pl1-81 management of regular background p
ii libc6 2.3.2.ds1-10 GNU C Library: Shared libraries an
ii libpopt0 1.7-4 lib for parsing cmdline parameters
-- no debconf information
--===============1343523212==
Content-Type: text/x-c; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="logrotate-3.6.5-date.patch"
--- logrotate-3.6.5.old/logrotate.c 2002-04-24 01:29:19.000000000 +0200
+++ logrotate-3.6.5/logrotate.c 2004-01-04 03:43:49.000000000 +0100
@@ -27,8 +27,10 @@
#define NO_GID ((gid_t) -1)
int debug = 0;
+int use_date_flag = 0;
char * mailCommand = DEFAULT_MAIL_COMMAND;
time_t nowSecs = 0;
+char today_str[40];
static logState * findState(const char * fn, logState ** statesPtr,
int * numStatesPtr) {
@@ -318,11 +320,11 @@
baseName = strdup(ourBaseName(log->files[logNum]));
oldName = alloca(strlen(dirName) + strlen(baseName) +
- strlen(log->files[logNum]) + 10);
+ strlen(log->files[logNum]) + 40);
newName = alloca(strlen(dirName) + strlen(baseName) +
- strlen(log->files[logNum]) + 10);
+ strlen(log->files[logNum]) + 40);
disposeName = alloca(strlen(dirName) + strlen(baseName) +
- strlen(log->files[logNum]) + 10);
+ strlen(log->files[logNum]) + 40);
if (log->extension &&
strncmp(&baseName[strlen(baseName)-strlen(log->extension)],
@@ -342,7 +344,13 @@
log->flags & LOG_FLAG_DELAYCOMPRESS) {
struct stat sbprev;
- sprintf(oldName, "%s/%s.%d%s", dirName, baseName, logStart, fileext);
+ if (use_date_flag) {
+ sprintf(oldName, "%s/%s-%s.%d%s", dirName, baseName, today_str,
+ logStart, fileext);
+ } else {
+ sprintf(oldName, "%s/%s.%d%s", dirName, baseName, logStart,
+ fileext);
+ }
if (stat(oldName, &sbprev)) {
message(MESS_DEBUG, "previous log %s does not exist\n",
oldName);
@@ -364,23 +372,38 @@
}
}
- sprintf(oldName, "%s/%s.%d%s%s", dirName, baseName,
- logStart + rotateCount, fileext, compext);
+ if (use_date_flag) {
+ sprintf(oldName, "%s/%s-%s.%d%s%s", dirName, baseName, today_str,
+ logStart + rotateCount, fileext, compext);
+ } else {
+ sprintf(oldName, "%s/%s.%d%s%s", dirName, baseName,
+ logStart + rotateCount, fileext, compext);
+ }
strcpy(newName, oldName);
strcpy(disposeName, oldName);
firstRotated = alloca(strlen(dirName) + strlen(baseName) +
strlen(fileext) + strlen(compext) + 30);
- sprintf(firstRotated, "%s/%s.%d%s%s", dirName, baseName,
- logStart, fileext, compext);
+ if (use_date_flag) {
+ sprintf(oldName, "%s/%s-%s.%d%s%s", dirName, baseName, today_str,
+ logStart, fileext, compext);
+ } else {
+ sprintf(firstRotated, "%s/%s.%d%s%s", dirName, baseName,
+ logStart, fileext, compext);
+ }
for (i = rotateCount + logStart; (i >= 0) && !hasErrors; i--) {
tmp = newName;
newName = oldName;
oldName = tmp;
- sprintf(oldName, "%s/%s.%d%s%s", dirName, baseName, i,
- fileext, compext);
+ if (use_date_flag) {
+ sprintf(oldName, "%s/%s-%s.%d%s%s", dirName, baseName,
+ today_str, i, fileext, compext);
+ } else {
+ sprintf(oldName, "%s/%s.%d%s%s", dirName, baseName, i,
+ fileext, compext);
+ }
message(MESS_DEBUG, "renaming %s to %s (rotatecount %d, logstart %d, i
%d), \n", oldName, newName,
rotateCount, logStart, i);
@@ -400,7 +423,12 @@
finalName = oldName;
/* note: the gzip extension is *not* used here! */
- sprintf(finalName, "%s/%s.%d%s", dirName, baseName, logStart, fileext);
+ if (use_date_flag) {
+ sprintf(finalName, "%s/%s-%s.%d%s", dirName, baseName, today_str,
+ logStart, fileext);
+ } else {
+ sprintf(finalName, "%s/%s.%d%s", dirName, baseName, logStart, fileext);
+ }
/* if the last rotation doesn't exist, that's okay */
if (!debug && access(disposeName, F_OK)) {
@@ -536,8 +564,8 @@
strlen(log->uncompress_prog));
if ((log->flags & LOG_FLAG_COMPRESS) &&
- !(log->flags & LOG_FLAG_DELAYCOMPRESS) &&
- (log->flags & LOG_FLAG_MAILFIRST))
+ !((log->flags & LOG_FLAG_DELAYCOMPRESS) &&
+ (log->flags & LOG_FLAG_MAILFIRST)))
sprintf(command, "%s < %s | %s '%s' %s",
log->uncompress_prog, mailFilename, mailCommand,
log->files[logNum],
@@ -848,6 +876,8 @@
const char ** files, ** file;
poptContext optCon;
struct poptOption options[] = {
+ { "date", 'D', 0, 0, 'D',
+ "Append the current date to the backups" },
{ "debug", 'd', 0, 0, 'd',
"Don't do anything, just test (implies -v)" },
{ "force", 'f', 0 , &force, 0, "Force file rotation" },
@@ -875,6 +905,9 @@
case 'v':
logSetLevel(MESS_DEBUG);
break;
+ case 'D':
+ use_date_flag = 1;
+ break;
}
}
@@ -902,6 +935,16 @@
}
nowSecs = time(NULL);
+
+ {
+ struct tm *today_ptr = localtime(&nowSecs);
+ if (today_ptr == NULL) {
+ perror("logrotate: localtime");
+ exit(EXIT_FAILURE);
+ }
+ sprintf(today_str, "%04d-%02d-%02d", today_ptr->tm_year + 1900,
+ today_ptr->tm_mon + 1, today_ptr->tm_mday);
+ }
if (readState(stateFile, &states, &numStates)) {
exit(1);
--===============1343523212==--
---------------------------------------
Received: (at 188198-close) by bugs.debian.org; 28 Jul 2005 09:56:12 +0000
>From [EMAIL PROTECTED] Thu Jul 28 02:56:12 2005
Return-path: <[EMAIL PROTECTED]>
Received: from katie by spohr.debian.org with local (Exim 3.36 1 (Debian))
id 1Dy4yv-0002rC-00; Thu, 28 Jul 2005 02:47:13 -0700
From: Paul Martin <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
X-Katie: $Revision: 1.56 $
Subject: Bug#188198: fixed in logrotate 3.7.1-1
Message-Id: <[EMAIL PROTECTED]>
Sender: Archive Administrator <[EMAIL PROTECTED]>
Date: Thu, 28 Jul 2005 02:47:13 -0700
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level:
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER
autolearn=no version=2.60-bugs.debian.org_2005_01_02
Source: logrotate
Source-Version: 3.7.1-1
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-1.diff.gz
to pool/main/l/logrotate/logrotate_3.7.1-1.diff.gz
logrotate_3.7.1-1.dsc
to pool/main/l/logrotate/logrotate_3.7.1-1.dsc
logrotate_3.7.1-1_i386.deb
to pool/main/l/logrotate/logrotate_3.7.1-1_i386.deb
logrotate_3.7.1.orig.tar.gz
to pool/main/l/logrotate/logrotate_3.7.1.orig.tar.gz
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.7
Date: Mon, 25 Jul 2005 22:15:18 +0100
Source: logrotate
Binary: logrotate
Architecture: source i386
Version: 3.7.1-1
Distribution: unstable
Urgency: low
Maintainer: Paul Martin <[EMAIL PROTECTED]>
Changed-By: Paul Martin <[EMAIL PROTECTED]>
Description:
logrotate - Log rotation utility
Closes: 178526 188198 193601 226061 257685 306304 315514
Changes:
logrotate (3.7.1-1) unstable; urgency=low
.
* New upstream release (based on upstream 3.7.1-11)
.
* This upload enables selinux code. (Closes: #193601, #315514)
.
* Updated dpatches:
+ 30-config-h: upstream has changed to using "/bin/mail" instead of
"/bin/mail -s"
+ No need for 41-execlp-fix or 42-execlp-bin-sh.
+ Upstream fix obsoletes 60-compressowner.
.
* Upstream uses a patch system, too. Patches from upstream:
+ 01-rh-dateext (logrotate-3.7.1-dateext.patch)
+ 01-rh-maxage (logrotate-3.7.1-maxage.patch)
dateext and maxage (Closes: #178526, #188198, #226061, #257685,
#306304)
+ 01-rh-noTMPDIR (logrotate-3.7.1-noTMPDIR.patch)
This has the effect of never requiring a tempdir for scripts.
There's the possibility of large scripts running into stack
limits.
+ 01-rh-selinux (logrotate-3.7.1-selinux.patch)
Updates to selinux code.
+ 52-man-rh-1 (based on logrotate-3-man.patch)
Explains a bit more about postrotate scripts and updates the
sharedscripts entry.
.
* Update Standards-Version (no changes needed).
* Update copyright file with current upstream location.
Files:
fa079e0e74a05e6757788575dc8dc23b 610 admin important logrotate_3.7.1-1.dsc
552639142e163745f6bcd4f1f3816d8a 36176 admin important
logrotate_3.7.1.orig.tar.gz
ec9d308cb97cf96a58a812e93cf9a761 20262 admin important
logrotate_3.7.1-1.diff.gz
bea3744aef42316d6d3b581ff7554f03 34132 admin important
logrotate_3.7.1-1_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFC5Vaq+gi+rt7UWRIRAp5TAJ4ml0q69WN2reQ+faP3LPEQarv1bQCfSJb8
L0p6LbETsYqqYRH1PzP5J9U=
=ky0i
-----END PGP SIGNATURE-----
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]