mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Alexander Dahl <post@lespocky.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] logrotate: upgrade to 3.8.7
Date: Mon, 27 Jan 2014 08:07:24 +0100	[thread overview]
Message-ID: <1390806445-24741-1-git-send-email-post@lespocky.de> (raw)
In-Reply-To: <20140124170335.GF7704@pengutronix.de>

This is a major upgrade from an almost ten years old release to the
current release. I reviewed the patch series against current Debian
(sid) patches and upstream changes. Everything not in the current Debian
patches went upstream. All patches gone upstream were discarded. Due to
the major changes, Git won't recognize each rename of the remaining
ones.

There was one old patch ptx-timeext.patch which seemed to be ptxdist
specifix, but it does not apply anymore. It was removed. If anyone needs
the features from it, maybe she could extract it from the previous state
and port it by herself.

Signed-off-by: Alexander Dahl <post@lespocky.de>
---
 patches/logrotate-3.7.1/compressutime.patch        |   40 --
 patches/logrotate-3.7.1/configparse.patch          |   29 --
 patches/logrotate-3.7.1/datehack.patch             |   20 -
 patches/logrotate-3.7.1/deb-config-h.patch         |   28 --
 patches/logrotate-3.7.1/deb-taboos.patch           |   21 -
 patches/logrotate-3.7.1/dst.patch                  |   36 --
 patches/logrotate-3.7.1/man-189243.patch           |   28 --
 patches/logrotate-3.7.1/man-333996.patch           |   62 ---
 patches/logrotate-3.7.1/man-lastaction.patch       |   20 -
 patches/logrotate-3.7.1/man-mailtypo.patch         |   20 -
 patches/logrotate-3.7.1/man-overriden.patch        |   20 -
 patches/logrotate-3.7.1/man-rh-1.patch             |   30 --
 patches/logrotate-3.7.1/man-sizetypo.patch         |   19 -
 patches/logrotate-3.7.1/man-startcount.patch       |   20 -
 patches/logrotate-3.7.1/manpage.patch              |  403 --------------------
 patches/logrotate-3.7.1/ptx-timeext.patch          |  161 --------
 patches/logrotate-3.7.1/rh-dateext.patch           |  326 ----------------
 patches/logrotate-3.7.1/rh-maxage.patch            |  115 ------
 patches/logrotate-3.7.1/rh-noTMPDIR.patch          |   62 ---
 patches/logrotate-3.7.1/rh-selinux.patch           |  177 ---------
 patches/logrotate-3.7.1/script-argument.patch      |   22 --
 patches/logrotate-3.7.1/scripterrors.patch         |   32 --
 patches/logrotate-3.7.1/series                     |   25 --
 patches/logrotate-3.7.1/taboo-to-debug.patch       |   19 -
 .../logrotate-3.7.1/uncompressChild-warning.patch  |   17 -
 patches/logrotate-3.8.7/0001-datehack.patch        |   23 ++
 .../0002-cpp-crossbuild.patch}                     |   23 +-
 patches/logrotate-3.8.7/0003-chown-484762.patch    |   28 ++
 patches/logrotate-3.8.7/0004-mktime-718332.patch   |   28 ++
 patches/logrotate-3.8.7/series                     |    7 +
 rules/logrotate.make                               |    7 +-
 31 files changed, 102 insertions(+), 1766 deletions(-)
 delete mode 100644 patches/logrotate-3.7.1/compressutime.patch
 delete mode 100644 patches/logrotate-3.7.1/configparse.patch
 delete mode 100644 patches/logrotate-3.7.1/datehack.patch
 delete mode 100644 patches/logrotate-3.7.1/deb-config-h.patch
 delete mode 100644 patches/logrotate-3.7.1/deb-taboos.patch
 delete mode 100644 patches/logrotate-3.7.1/dst.patch
 delete mode 100644 patches/logrotate-3.7.1/man-189243.patch
 delete mode 100644 patches/logrotate-3.7.1/man-333996.patch
 delete mode 100644 patches/logrotate-3.7.1/man-lastaction.patch
 delete mode 100644 patches/logrotate-3.7.1/man-mailtypo.patch
 delete mode 100644 patches/logrotate-3.7.1/man-overriden.patch
 delete mode 100644 patches/logrotate-3.7.1/man-rh-1.patch
 delete mode 100644 patches/logrotate-3.7.1/man-sizetypo.patch
 delete mode 100644 patches/logrotate-3.7.1/man-startcount.patch
 delete mode 100644 patches/logrotate-3.7.1/manpage.patch
 delete mode 100644 patches/logrotate-3.7.1/ptx-timeext.patch
 delete mode 100644 patches/logrotate-3.7.1/rh-dateext.patch
 delete mode 100644 patches/logrotate-3.7.1/rh-maxage.patch
 delete mode 100644 patches/logrotate-3.7.1/rh-noTMPDIR.patch
 delete mode 100644 patches/logrotate-3.7.1/rh-selinux.patch
 delete mode 100644 patches/logrotate-3.7.1/script-argument.patch
 delete mode 100644 patches/logrotate-3.7.1/scripterrors.patch
 delete mode 100644 patches/logrotate-3.7.1/series
 delete mode 100644 patches/logrotate-3.7.1/taboo-to-debug.patch
 delete mode 100644 patches/logrotate-3.7.1/uncompressChild-warning.patch
 create mode 100644 patches/logrotate-3.8.7/0001-datehack.patch
 rename patches/{logrotate-3.7.1/cpp-crossbuild.patch => logrotate-3.8.7/0002-cpp-crossbuild.patch} (50%)
 create mode 100644 patches/logrotate-3.8.7/0003-chown-484762.patch
 create mode 100644 patches/logrotate-3.8.7/0004-mktime-718332.patch
 create mode 100644 patches/logrotate-3.8.7/series

diff --git a/patches/logrotate-3.7.1/compressutime.patch b/patches/logrotate-3.7.1/compressutime.patch
deleted file mode 100644
index 4fbc904..0000000
--- a/patches/logrotate-3.7.1/compressutime.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Preserve mtime/atime on compression. (Closes: #286957)
-
----
- logrotate.c |    9 +++++++++
- 1 file changed, 9 insertions(+)
-
-Index: logrotate-3.7.1/logrotate.c
-===================================================================
---- logrotate-3.7.1.orig/logrotate.c
-+++ logrotate-3.7.1/logrotate.c
-@@ -12,6 +12,8 @@
- #include <time.h>
- #include <unistd.h>
- #include <glob.h>
-+#include <sys/types.h>
-+#include <utime.h>
- 
- #ifdef WITH_SELINUX
- #include <selinux/selinux.h>
-@@ -120,6 +122,7 @@ static int removeLogFile(char * name) {
- static int compressLogFile(char * name, logInfo * log, struct stat *sb) {
-     char * compressedName;
-     const char ** fullCommand;
-+    struct utimbuf utim;
-     int inFile;
-     int outFile;
-     int i;
-@@ -190,6 +193,12 @@ static int compressLogFile(char * name, 
- 	message(MESS_ERROR, "failed to compress log %s\n", name);
- 	return 1;
-     }
-+   
-+    utim.actime = sb->st_atime;
-+    utim.modtime = sb->st_mtime;
-+    utime(compressedName,&utim);
-+    /* If we can't change atime/mtime, it's not a disaster.
-+       It might possibly fail under SELinux. */
- 
-     unlink(name);
- 
diff --git a/patches/logrotate-3.7.1/configparse.patch b/patches/logrotate-3.7.1/configparse.patch
deleted file mode 100644
index 471f025..0000000
--- a/patches/logrotate-3.7.1/configparse.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-# Loosens the config syntax checking to allow more flexibility.
-#  (Closes: #95617,#95630)
-
----
- config.c |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-Index: logrotate-3.7.1/config.c
-===================================================================
---- logrotate-3.7.1.orig/config.c
-+++ logrotate-3.7.1/config.c
-@@ -768,7 +768,7 @@ static int readConfigFile(const char * c
- 
- 		    while (*start) {
- 			chptr = start;
--			while (!isspace(*chptr) && *chptr != ',' && *chptr)
-+			while (!isspace(*chptr) && /* *chptr != ',' && */ *chptr)
- 			    chptr++;
- 
- 			tabooExts = realloc(tabooExts, sizeof(*tabooExts) * 
-@@ -780,7 +780,7 @@ static int readConfigFile(const char * c
- 			tabooCount++;
- 
- 			start = chptr;
--			if (*start == ',') start++;
-+			/* if (*start == ',') start++; */
- 			while (isspace(*start) && *start) start++;
- 		    }
- 
diff --git a/patches/logrotate-3.7.1/datehack.patch b/patches/logrotate-3.7.1/datehack.patch
deleted file mode 100644
index c36a7a6..0000000
--- a/patches/logrotate-3.7.1/datehack.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-No longer consider state file dates before 1996 as fatal errors.
-(Closes: #65534)
-
----
- logrotate.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: logrotate-3.7.1/logrotate.c
-===================================================================
---- logrotate-3.7.1.orig/logrotate.c
-+++ logrotate-3.7.1/logrotate.c
-@@ -1145,7 +1145,7 @@ static int readState(char * stateFilenam
- 	}
- 	
- 	/* Hack to hide earlier bug */
--	if ((year != 1900) && (year < 1996 || year > 2100)) {
-+	if ((year != 1900) && (year < 1970 || year > 2100)) {
- 	    message(MESS_ERROR, "bad year %d for file %s in state file %s\n",
- 		    year, argv[0], stateFilename);
- 	    fclose(f);
diff --git a/patches/logrotate-3.7.1/deb-config-h.patch b/patches/logrotate-3.7.1/deb-config-h.patch
deleted file mode 100644
index 0958d89..0000000
--- a/patches/logrotate-3.7.1/deb-config-h.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Fix locations of STATEFILE and DEFAULT_MAIL_COMMAND for Debian.
-
-
----
- config.h |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-Index: logrotate-3.7.1/config.h
-===================================================================
---- logrotate-3.7.1.orig/config.h
-+++ logrotate-3.7.1/config.h
-@@ -20,7 +20,7 @@
-  * Default settings for Linux - leave these last.
-  */
- #ifndef DEFAULT_MAIL_COMMAND
--    #define DEFAULT_MAIL_COMMAND "/bin/mail"
-+    #define DEFAULT_MAIL_COMMAND "/usr/bin/mail"
- #endif
- 
- #ifndef COMPRESS_COMMAND
-@@ -36,6 +36,6 @@
- #endif
- 
- #ifndef STATEFILE
--    #define STATEFILE "/var/lib/logrotate.status"
-+    #define STATEFILE "/var/lib/logrotate/status"
- #endif
- 
diff --git a/patches/logrotate-3.7.1/deb-taboos.patch b/patches/logrotate-3.7.1/deb-taboos.patch
deleted file mode 100644
index 39fc315..0000000
--- a/patches/logrotate-3.7.1/deb-taboos.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Fix the taboo list to avoid .dpkg-old, etc.
-
-
-
----
- config.c |    2 ++
- 1 file changed, 2 insertions(+)
-
-Index: logrotate-3.7.1/config.c
-===================================================================
---- logrotate-3.7.1.orig/config.c
-+++ logrotate-3.7.1/config.c
-@@ -30,6 +30,8 @@
- #endif
- 
- static char * defTabooExts[] = { ".rpmsave", ".rpmorig", "~", ",v",
-+				 ".disabled", ".dpkg-old", ".dpkg-dist",
-+				 ".dpkg-new",
- 				 ".rpmnew", ".swp" };
- static int defTabooCount = sizeof(defTabooExts) / sizeof(char *);
- 
diff --git a/patches/logrotate-3.7.1/dst.patch b/patches/logrotate-3.7.1/dst.patch
deleted file mode 100644
index ae408e3..0000000
--- a/patches/logrotate-3.7.1/dst.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Closes: #278591
-Patch from: Holger Weiss <holger@ZEDAT.FU-Berlin.DE>
-
-If you call logrotate once a week between 00:00 and 01:00 AM and
-daylight saving time is in effect, "weekly" rotations will be done only
-once in two weeks.  E.g., the following crontab won't work as expected:
-
-12 0 * * 1 /usr/sbin/logrotate
-
-logrotate uses the tm struct "lastRotated" in order to find out whether
-a logfile needs rotating.  "lastRotated" is filled by first setting
-everything to zero, then setting the mday, month and year of the last
-rotation and then calling mktime(3) in order to normalize the rest of
-the struct.  The problem is that if daylight saving time is in effect,
-mktime() will increment "lastRotated.tm_isdst" from 0 to 1 and push
-"lastRotated" by one hour.  Hence, the current time will be compared
-with the day of the last rotation, 01:00 AM.  This can be solved by
-setting lastRotated.tm_isdst correctly prior to the mktime() call.
-
-
----
- logrotate.c |    1 +
- 1 file changed, 1 insertion(+)
-
-Index: logrotate-3.7.1/logrotate.c
-===================================================================
---- logrotate-3.7.1.orig/logrotate.c
-+++ logrotate-3.7.1/logrotate.c
-@@ -78,6 +78,7 @@ static logState * findState(const char *
- 	states[i].lastRotated.tm_mon = now.tm_mon;
- 	states[i].lastRotated.tm_mday = now.tm_mday;
- 	states[i].lastRotated.tm_year = now.tm_year;
-+	states[i].lastRotated.tm_isdst = now.tm_isdst;
- 
- 	/* fill in the rest of the st->lastRotated fields */
- 	lr_time = mktime(&states[i].lastRotated);
diff --git a/patches/logrotate-3.7.1/man-189243.patch b/patches/logrotate-3.7.1/man-189243.patch
deleted file mode 100644
index 2f454cf..0000000
--- a/patches/logrotate-3.7.1/man-189243.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Fix location of killall in the examples. (Closes: #189243)
-
----
- logrotate.8 |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-Index: logrotate-3.7.1/logrotate.8
-===================================================================
---- logrotate-3.7.1.orig/logrotate.8
-+++ logrotate-3.7.1/logrotate.8
-@@ -83,7 +83,7 @@ compress
-     rotate 5
-     weekly
-     postrotate
--        /sbin/killall -HUP syslogd
-+        /usr/bin/killall -HUP syslogd
-     endscript
- }
- 
-@@ -93,7 +93,7 @@ compress
-     size=100k
-     sharedscripts
-     postrotate
--        /sbin/killall -HUP httpd
-+        /usr/bin/killall -HUP httpd
-     endscript
- }
- 
diff --git a/patches/logrotate-3.7.1/man-333996.patch b/patches/logrotate-3.7.1/man-333996.patch
deleted file mode 100644
index b815da2..0000000
--- a/patches/logrotate-3.7.1/man-333996.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Closes: #333996
-Patch from: Adrian Knoth <adi@drcomp.erfurt.thur.de>
-
-The manpage contains several sentences with the same mistake:
-the use of "then" instead of "than".
-
-
----
- logrotate.8 |   12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-Index: logrotate-3.7.1/logrotate.8
-===================================================================
---- logrotate-3.7.1.orig/logrotate.8
-+++ logrotate-3.7.1/logrotate.8
-@@ -125,7 +125,7 @@ The next section defines the parameters 
- \fI/var/log/httpd/access.log\fR and \fI/var/log/httpd/error.log\fR.
- Each is rotated whenever it grows over 100k in size, and the old log
- files are mailed (uncompressed) to www@my.org after going through 5
--rotations, rather then being removed. The \fBsharedscripts\fR means that
-+rotations, rather than being removed. The \fBsharedscripts\fR means that
- the \fBpostrotate\fR script will only be run once (after the old logs 
- have been compressed), not once for each
- log which is rotated. Note that log file names may be enclosed in
-@@ -135,7 +135,7 @@ characters supported.
- 
- The last section defines the parameters for all of the files in
- \fI/var/log/news\fR. Each file is rotated on a monthly basis.  This is
--considered a single rotation directive and if errors occur for more then
-+considered a single rotation directive and if errors occur for more than
- one file, the log files are not compressed.
- 
- Please use wildcards with caution.  If you specify *, \fBlogrotate\fR will
-@@ -366,7 +366,7 @@ appear inside a log file definition. See
- \fBrotate \fIcount\fR
- Log files are rotated \fIcount\fR times before being removed or mailed to the
- address specified in a \fBmail\fR directive. If \fIcount\fR is 0, old versions
--are removed rather then rotated.
-+are removed rather than rotated.
- 
- .TP
- \fBsharedscripts\fR
-@@ -381,7 +381,7 @@ option and implies \fBcreate\fR option.
- 
- .TP
- \fBsize \fIsize\fR[\fBG\fR|\fBM\fR|\fBk\fR]
--Log files are rotated when they grow bigger then \fIsize\fR bytes. If
-+Log files are rotated when they grow bigger than \fIsize\fR bytes. If
- \fIsize\fR is followed by \fIM\fR, the size if assumed to be in megabytes.
- If the \fIG\fR suffix is used, the size is in gigabytes.
- If the \fIk\fR suffix is used, the size is in kilobytes. So \fBsize 100\fR,
-@@ -408,8 +408,8 @@ not commas.
- 
- .TP
- \fBweekly\fR
--Log files are rotated if the current weekday is less then the weekday
--of the last rotation or if more then a week has passed since the last
-+Log files are rotated if the current weekday is less than the weekday
-+of the last rotation or if more than a week has passed since the last
- rotation. This is normally the same as rotating logs on the first day
- of the week, but if \fBlogrotate\fR is not being run every night a log 
- rotation will happen at the first valid opportunity.
diff --git a/patches/logrotate-3.7.1/man-lastaction.patch b/patches/logrotate-3.7.1/man-lastaction.patch
deleted file mode 100644
index 4180415..0000000
--- a/patches/logrotate-3.7.1/man-lastaction.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Fix typo in the lastaction section of the manpage. It refers to itself 
-rather than to firstaction.
-
----
- logrotate.8 |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: logrotate-3.7.1/logrotate.8
-===================================================================
---- logrotate-3.7.1.orig/logrotate.8
-+++ logrotate-3.7.1/logrotate.8
-@@ -359,7 +359,7 @@ The lines between \fBlastaction\fR and \
- must appear on lines by themselves) are executed once after all log
- files that match the wildcarded pattern are rotated, after postrotate script
- is run and only if at least one log is rotated. These directives may only
--appear inside a log file definition. See also \fBlastaction\fR.
-+appear inside a log file definition. See also \fBfirstaction\fR.
- 
- .TP
- \fBrotate \fIcount\fR
diff --git a/patches/logrotate-3.7.1/man-mailtypo.patch b/patches/logrotate-3.7.1/man-mailtypo.patch
deleted file mode 100644
index c563813..0000000
--- a/patches/logrotate-3.7.1/man-mailtypo.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Fix the markup on the "mail" part of the manpage (Closes: #300644)
-
-
----
- logrotate.8 |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: logrotate-3.7.1/logrotate.8
-===================================================================
---- logrotate-3.7.1.orig/logrotate.8
-+++ logrotate-3.7.1/logrotate.8
-@@ -45,7 +45,7 @@ by hand, as the new files will be create
- correctly.
- 
- .TP
--\fB-m\R, \B-\-mail <command>\fR
-+\fB-m\fR, \fB-\-mail <command>\fR
- Tells \fBlogrotate\fR which command to use when mailing logs. This
- command should accept two arguments: 1) the subject of the message, and
- 2) the recipient. The command must then read a message on standard input
diff --git a/patches/logrotate-3.7.1/man-overriden.patch b/patches/logrotate-3.7.1/man-overriden.patch
deleted file mode 100644
index fae01ac..0000000
--- a/patches/logrotate-3.7.1/man-overriden.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Fix manpage typo (Closes: #310337)
-
-
----
- logrotate.8 |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: logrotate-3.7.1/logrotate.8
-===================================================================
---- logrotate-3.7.1.orig/logrotate.8
-+++ logrotate-3.7.1/logrotate.8
-@@ -329,7 +329,7 @@ must be on the same physical device as t
- and is assumed to be relative to the directory holding the log file
- unless an absolute path name is specified. When this option is used all
- old versions of the log end up in \fIdirectory\fR.  This option may be
--overriden by the \fBnoolddir\fR option.
-+overridden by the \fBnoolddir\fR option.
- 
- .TP
- \fBpostrotate\fR/\fBendscript\fR
diff --git a/patches/logrotate-3.7.1/man-rh-1.patch b/patches/logrotate-3.7.1/man-rh-1.patch
deleted file mode 100644
index bb53583..0000000
--- a/patches/logrotate-3.7.1/man-rh-1.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Fixes from upstream 3.7.1-4:
- * Typo and missing information in man page (#139346)
-
----
- logrotate.8 |    5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-Index: logrotate-3.7.1/logrotate.8
-===================================================================
---- logrotate-3.7.1.orig/logrotate.8
-+++ logrotate-3.7.1/logrotate.8
-@@ -126,7 +126,8 @@ The next section defines the parameters 
- Each is rotated whenever it grows over 100k in size, and the old log
- files are mailed (uncompressed) to www@my.org after going through 5
- rotations, rather then being removed. The \fBsharedscripts\fR means that
--the \fBpostrotate\fR script will only be run once, not once for each
-+the \fBpostrotate\fR script will only be run once (after the old logs 
-+have been compressed), not once for each
- log which is rotated. Note that log file names may be enclosed in
- quotes (and that quotes are required if the name contains spaces).
- Normal shell quoting rules apply, with \fB'\fR, \fB"\fR, and \fB\\\fR
-@@ -376,7 +377,7 @@ times for log file entries which match m
- are only run once, no matter how many logs match the wildcarded pattern.
- However, if none of the logs in the pattern require rotating, the scripts
- will not be run at all. This option overrides the \fBnosharedscripts\fR
--option.
-+option and implies \fBcreate\fR option.
- 
- .TP
- \fBsize \fIsize\fR[\fBG\fR|\fBM\fR|\fBk\fR]
diff --git a/patches/logrotate-3.7.1/man-sizetypo.patch b/patches/logrotate-3.7.1/man-sizetypo.patch
deleted file mode 100644
index 5cdb3f8..0000000
--- a/patches/logrotate-3.7.1/man-sizetypo.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Fix manpage typo in the size example.
-
----
- logrotate.8 |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: logrotate-3.7.1/logrotate.8
-===================================================================
---- logrotate-3.7.1.orig/logrotate.8
-+++ logrotate-3.7.1/logrotate.8
-@@ -90,7 +90,7 @@ compress
- "/var/log/httpd/access.log" /var/log/httpd/error.log {
-     rotate 5
-     mail www@my.org
--    size=100k
-+    size 100k
-     sharedscripts
-     postrotate
-         /usr/bin/killall -HUP httpd
diff --git a/patches/logrotate-3.7.1/man-startcount.patch b/patches/logrotate-3.7.1/man-startcount.patch
deleted file mode 100644
index c940114..0000000
--- a/patches/logrotate-3.7.1/man-startcount.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Inconsistency in manpage logrotate(8), start directive
-(Closes: #290628)
-
----
- logrotate.8 |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: logrotate-3.7.1/logrotate.8
-===================================================================
---- logrotate-3.7.1.orig/logrotate.8
-+++ logrotate-3.7.1/logrotate.8
-@@ -392,7 +392,7 @@ This is the number to use as the base fo
- you specify 0, the logs will be created with a .0 extension as they are
- rotated from the original log files.  If you specify 9, log files will
- be created with a .9, skipping 0-8.  Files will still be rotated the
--number of times specified with the \fBcount\fR directive.
-+number of times specified with the \fBrotate\fR directive.
- 
- .TP
- \fBtabooext\fR [+] \fIlist\fR
diff --git a/patches/logrotate-3.7.1/manpage.patch b/patches/logrotate-3.7.1/manpage.patch
deleted file mode 100644
index af469c3..0000000
--- a/patches/logrotate-3.7.1/manpage.patch
+++ /dev/null
@@ -1,403 +0,0 @@
-Closes: #101272, #335060
-Patches from: J S Bygott <jsb_no_spm@jsbygott.fsnet.co.uk>
-
-General fixes to manpages.
-
-
----
- logrotate.8 |  151 +++++++++++++++++++++++++++++++++---------------------------
- 1 file changed, 84 insertions(+), 67 deletions(-)
-
-Index: logrotate-3.7.1/logrotate.8
-===================================================================
---- logrotate-3.7.1.orig/logrotate.8
-+++ logrotate-3.7.1/logrotate.8
-@@ -3,7 +3,8 @@
- .SH NAME
- logrotate \- rotates, compresses, and mails system logs
- .SH SYNOPSIS
--\fBlogrotate\fR [-dv] [-f|--force] [-s|--state \fIfile\fR] \fIconfig_file\fR+
-+\fBlogrotate\fR [\fB\-dv\fR] [\fB\-f\fR|\fB\-\-force\fR]
-+[\fB\-s\fR|\fB-\-state\ \fIstatefile\fR] \fIconfig_file\fR ..
- .SH DESCRIPTION
- \fBlogrotate\fR is designed to ease administration of systems that generate
- large numbers of log files.  It allows automatic rotation, compression, 
-@@ -11,16 +12,16 @@ removal, and mailing of log files.  Each
- weekly, monthly, or when it grows too large.
- .P
- Normally, \fBlogrotate\fR is run as a daily cron job.  It will not modify
--a log multiple times in one day unless the criterium for that log is
--based on the log's size and \fBlogrotate\fR is being run multiple times
--each day, or unless the \fB-f\fR or \fB-force\fR option is used. 
-+a log more than once in one day unless the criterion for that log is
-+based on the log's size and \fBlogrotate\fR is being run more than once
-+each day, or unless the \fB-f\fR or \fB-\-force\fR option is used. 
- .P
- Any number of config files may be given on the command line. Later config
- files may override the options given in earlier files, so the order
--in which the \fBlogrotate\fR config files are listed in is important.
-+in which the \fBlogrotate\fR config files are listed is important.
- Normally, a single config file which includes any other config files
- which are needed should be used.  See below for more information on how
--to use the \fIinclude\fR directive to accomplish this.  If a directory
-+to use the \fBinclude\fR directive to accomplish this.  If a directory
- is given on the command line, every file in that directory is used as
- a config file.
- .P
-@@ -36,37 +37,42 @@ Turns on debug mode and implies \fB-v\fR
- be made to the logs or to the \fBlogrotate\fR state file.
- 
- .TP
--\fB-f, -\-force\fR
-+\fB-f\fR, \fB-\-force\fR
- Tells \fBlogrotate\fR to force the rotation, even if it doesn't think
- this is necessary.  Sometimes this is useful after adding new entries to
--\fBlogrotate\fR, or if old log files have been removed by hand, as the
--new files will be created, and logging will continue correctly.
-+a \fBlogrotate\fR config file, or if old log files have been removed
-+by hand, as the new files will be created, and logging will continue
-+correctly.
- 
- .TP
--\fB-m, -\-mail <command>\fR
-+\fB-m\R, \B-\-mail <command>\fR
- Tells \fBlogrotate\fR which command to use when mailing logs. This
- command should accept two arguments: 1) the subject of the message, and
- 2) the recipient. The command must then read a message on standard input
--and mail it to the recipient. The default mail command is \fB/bin/mail
-+and mail it to the recipient. The default mail command is \fB/usr/bin/mail
- -s\fR.
- 
- .TP
--\fB-s, -\-state <statefile>\fR
-+\fB-s\fR, \fB-\-state <statefile>\fR
- Tells \fBlogrotate\fR to use an alternate state file.  This is useful
--if logrotate is being run as a different user for various sets of
-+if \fBlogrotate\fR is being run as a different user for various sets of
- log files.  The default state file is \fI/var/lib/logrotate/status\fR.
- 
- .TP
- \fB-\-usage\fR
- Prints a short usage message.
- 
-+.TP
-+\fB-v\fR, \fB--verbose\fR
-+Display messages during rotation.
-+
- .SH CONFIGURATION FILE
- 
- \fBlogrotate\fR reads everything about the log files it should be handling
- from the series of configuration files specified on the command line.  Each
- configuration file can set global options (local definitions override
- global ones, and later definitions override earlier ones) and specify
--a logfile to rotate. A simple configuration file looks like this:
-+some logfiles to rotate. A simple configuration file looks like this:
- 
- .nf
- .ta +3i
-@@ -77,7 +83,7 @@ compress
-     rotate 5
-     weekly
-     postrotate
--	/sbin/killall -HUP syslogd
-+        /sbin/killall -HUP syslogd
-     endscript
- }
- 
-@@ -87,7 +93,7 @@ compress
-     size=100k
-     sharedscripts
-     postrotate
--	/sbin/killall -HUP httpd
-+        /sbin/killall -HUP httpd
-     endscript
- }
- 
-@@ -97,7 +103,7 @@ compress
-     olddir /var/log/news/old
-     missingok
-     postrotate
--	kill -HUP `cat /var/run/inn.pid`
-+        kill -HUP `cat /var/run/inn.pid`
-     endscript
-     nocompress
- }
-@@ -107,9 +113,9 @@ compress
- The first few lines set global options; in the example, logs are
- compressed after they are rotated.  Note that comments may appear
- anywhere in the config file as long as the first non-whitespace
--character on the line is a #.
-+character on the line is a \fB#\fR.
- 
--The next section of the config files defined how to handle the log file
-+The next section of the config file defines how to handle the log file
- \fI/var/log/messages\fR. The log will go through five weekly rotations before
- being removed. After the log file has been rotated (but before the old
- version of the log has been compressed), the command 
-@@ -117,13 +123,13 @@ version of the log has been compressed),
- 
- The next section defines the parameters for both
- \fI/var/log/httpd/access.log\fR and \fI/var/log/httpd/error.log\fR.
--They are rotated whenever is grows over 100k is size, and the old logs
-+Each is rotated whenever it grows over 100k in size, and the old log
- files are mailed (uncompressed) to www@my.org after going through 5
- rotations, rather then being removed. The \fBsharedscripts\fR means that
- the \fBpostrotate\fR script will only be run once, not once for each
--log which is rotated. Note that the double quotes around the first filename
--at the beginning of this section allows logrotate to rotate logs with
--spaces in the name. Normal shell quoting rules apply, with ', ", and \\
-+log which is rotated. Note that log file names may be enclosed in
-+quotes (and that quotes are required if the name contains spaces).
-+Normal shell quoting rules apply, with \fB'\fR, \fB"\fR, and \fB\\\fR
- characters supported.
- 
- The last section defines the parameters for all of the files in
-@@ -135,29 +141,33 @@ Please use wildcards with caution.  If y
- rotate all files, including previously rotated ones.  A way around this
- is to use the \fBolddir\fR directive or a more exact wildcard (such as *.log).
- 
-+If the directory \fI/var/log/news\fR does not exist, this will cause 
-+\fBlogrotate\fR to report an error. This error cannot be stopped with
-+the \fBmissingok\fR directive.
-+
- Here is more information on the directives which may be included in
- a \fBlogrotate\fR configuration file:
- 
- .TP
- \fBcompress\fR
--Old versions of log files are compressed with \fBgzip\fR by default. See also
--\fBnocompress\fR. 
-+Old versions of log files are compressed with \fBgzip\fR(1) by default.
-+See also \fBnocompress\fR. 
- 
- .TP
- \fBcompresscmd\fR
- Specifies which command to use to compress log files.  The default is
--\fBgzip\fR.  See also \fBcompress\fR.
-+\fBgzip\fR(1).  See also \fBcompress\fR.
- 
- .TP
- \fBuncompresscmd\fR
- Specifies which command to use to uncompress log files.  The default is
--\fBgunzip\fR.
-+\fBgunzip\fR(1).
- 
- .TP
- \fBcompressext\fR
- Specifies which extension to use on compressed logfiles, if compression
--is enabled.  The default follows that of the configured compression
--command.
-+is enabled.  The default follows that of the default compression
-+command (.gz).
- 
- .TP
- \fBcompressoptions\fR
-@@ -174,9 +184,9 @@ as the old log file stays in place.
- 
- .TP
- \fBcopytruncate\fR
--Truncate the original log file in place after creating a copy,
--instead of moving the old log file and optionally creating a new one,
--It can be used when some program can not be told to close its logfile
-+Truncate the original log file to zero size in place after creating a copy,
-+instead of moving the old log file and optionally creating a new one.
-+It can be used when some program cannot be told to close its logfile
- and thus might continue writing (appending) to the previous log file forever.
- Note that there is a very small time slice between copying the file and
- truncating it, so some logging data might be lost.
-@@ -188,7 +198,7 @@ as the old log file stays in place.
- Immediately after rotation (before the \fBpostrotate\fR script is run)
- the log file is created (with the same name as the log file just rotated).
- \fImode\fR specifies the mode for the log file in octal (the same
--as \fBchmod(2)\fR), \fIowner\fR specifies the user name who will own the
-+as \fBchmod\fR(2)), \fIowner\fR specifies the user name who will own the
- log file, and \fIgroup\fR specifies the group the log file will belong
- to. Any of the log file attributes may be omitted, in which case those
- attributes for the new file will use the same values as the original log
-@@ -207,20 +217,20 @@ instead of simply adding a number.
- .TP
- \fBdelaycompress\fR
- Postpone compression of the previous log file to the next rotation cycle.
--This has only effect when used in combination with \fBcompress\fR.
--It can be used when some program can not be told to close its logfile
-+This only has effect when used in combination with \fBcompress\fR.
-+It can be used when some program cannot be told to close its logfile
- and thus might continue writing to the previous log file for some time.
- 
- .TP
- \fBextension \fIext\fR
- Log files are given the final extension \fIext\fR after rotation. If 
--compression is used, the compression extension (normally \fB.gz\fR)
-+compression is used, the compression extension (normally \fI.gz\fR)
- appears after \fIext\fR.
- 
- .TP
- \fBifempty\fR
--Rotate the log file even if it is empty, overiding the \fBnotifempty\fR
--option (ifempty is the default).
-+Rotate the log file even if it is empty, overriding the \fBnotifempty\fR
-+option (\fBifempty\fR is the default).
- 
- .TP
- \fBinclude \fIfile_or_directory\fR
-@@ -231,12 +241,12 @@ before processing of the including file 
- which are ignored are files which are not regular files (such as
- directories and named pipes) and files whose names end with one of
- the taboo extensions, as specified by the \fBtabooext\fR directive.
--The \fBinclude\fR directive may not appear inside of a log file
-+The \fBinclude\fR directive may not appear inside a log file
- definition.
- 
- .TP
- \fBmail \fIaddress\fR
--When a log is rotated out-of-existence, it is mailed to \fIaddress\fR. If
-+When a log is rotated out of existence, it is mailed to \fIaddress\fR. If
- no mail should be generated by a particular log, the \fBnomail\fR directive
- may be used.
- 
-@@ -268,8 +278,7 @@ Log files are rotated the first time \fB
- 
- .TP
- \fBnocompress\fR
--Old versions of log files are not compressed with \fBgzip\fR. See also
--\fBcompress\fR. 
-+Old versions of log files are not compressed. See also \fBcompress\fR. 
- 
- .TP
- \fBnocopy\fR
-@@ -292,7 +301,7 @@ Do not postpone compression of the previ
- 
- .TP
- \fBnomail\fR
--Don't mail old log files to any address.
-+Do not mail old log files to any address.
- 
- .TP
- \fBnomissingok\fR
-@@ -300,12 +309,12 @@ If a log file does not exist, issue an e
- 
- .TP
- \fBnoolddir\fR
--Logs are rotated in the same directory the log normally resides in (this 
-+Logs are rotated in the directory they normally reside in (this 
- overrides the \fBolddir\fR option).
- 
- .TP
- \fBnosharedscripts\fR
--Run \fBprerotate\fR and \fBpostrotate\fR scripts for every script which
-+Run \fBprerotate\fR and \fBpostrotate\fR scripts for every log which
- is rotated (this is the default, and overrides the \fBsharedscripts\fR
- option).
- 
-@@ -326,16 +335,15 @@ overriden by the \fBnoolddir\fR option.
- \fBpostrotate\fR/\fBendscript\fR
- The lines between \fBpostrotate\fR and \fBendscript\fR (both of which
- must appear on lines by themselves) are executed after the log file is
--rotated. These directives may only appear inside of a log file definition.
--See \fBprerotate\fR as well.
-+rotated. These directives may only appear inside a log file definition.
-+See also \fBprerotate\fR.
- 
- .TP
- \fBprerotate\fR/\fBendscript\fR
- The lines between \fBprerotate\fR and \fBendscript\fR (both of which
- must appear on lines by themselves) are executed before the log file is
- rotated and only if the log will actually be rotated. These directives
--may only appear inside of a log file definition.  See \fBpostrotate\fR
--as well.
-+may only appear inside a log file definition.  See also \fBpostrotate\fR.
- 
- .TP
- \fBfirstaction\fR/\fBendscript\fR
-@@ -351,33 +359,34 @@ The lines between \fBlastaction\fR and \
- must appear on lines by themselves) are executed once after all log
- files that match the wildcarded pattern are rotated, after postrotate script
- is run and only if at least one log is rotated. These directives may only
--appear inside of a log file definition. See \fBlastaction\fR as well.
-+appear inside a log file definition. See also \fBlastaction\fR.
- 
- .TP
- \fBrotate \fIcount\fR
--Log files are rotated <count> times before being removed or mailed to the
-+Log files are rotated \fIcount\fR times before being removed or mailed to the
- address specified in a \fBmail\fR directive. If \fIcount\fR is 0, old versions
- are removed rather then rotated.
- 
- .TP
--\fBsize \fIsize\fR
--Log files are rotated when they grow bigger then \fIsize\fR bytes. If
--\fIsize\fR is followed by \fIM\fR, the size if assumed to be in megabytes.
--If the \fIk\fR is used, the size is in kilobytes. So \fBsize 100\fR,
--\fIsize 100k\fR, and \fIsize 100M\fR are all valid.
--
--.TP
- \fBsharedscripts\fR
--Normally, \fBprescript\fR and \fBpostscript\fR scripts are run for each
-+Normally, \fBprerotate\fR and \fBpostrotate\fR scripts are run for each
- log which is rotated, meaning that a single script may be run multiple
- times for log file entries which match multiple files (such as the 
--/var/log/news/* example). If \fBsharedscript\fR is specified, the scripts
-+\fI/var/log/news/*\fR example). If \fBsharedscripts\fR is specified, the scripts
- are only run once, no matter how many logs match the wildcarded pattern.
- However, if none of the logs in the pattern require rotating, the scripts
--will not be run at all. This option overrides the \fbnosharedscripts\fR
-+will not be run at all. This option overrides the \fBnosharedscripts\fR
- option.
- 
- .TP
-+\fBsize \fIsize\fR[\fBG\fR|\fBM\fR|\fBk\fR]
-+Log files are rotated when they grow bigger then \fIsize\fR bytes. If
-+\fIsize\fR is followed by \fIM\fR, the size if assumed to be in megabytes.
-+If the \fIG\fR suffix is used, the size is in gigabytes.
-+If the \fIk\fR suffix is used, the size is in kilobytes. So \fBsize 100\fR,
-+\fIsize 100k\fR, \fIsize 100M\fR and \fIsize 1G\fR are all valid.
-+
-+.TP
- \fBstart \fIcount\fR
- This is the number to use as the base for rotation. For example, if
- you specify 0, the logs will be created with a .0 extension as they are
-@@ -388,18 +397,21 @@ number of times specified with the \fBco
- .TP
- \fBtabooext\fR [+] \fIlist\fR
- The current taboo extension list is changed (see the \fBinclude\fR directive
--for information on the taboo extensions). If a + precedes the list of
--extensions, the current taboo extension list is augmented, otherwise it
-+for information on the taboo extensions). If a \fB+\fR precedes \fIlist\fR,
-+the current taboo extension list is augmented by \fIlist\fR, otherwise it
- is replaced. At startup, the taboo extension list 
--contains .rpmorig, .rpmsave, ,v, .swp, .rpmnew, and ~.
-+contains .rpmorig, .rpmsave, .dpkg-dist, .dpkg-old, .dpkg-new, .disabled,
-+,v, .swp, .rpmnew, and ~. The members of the list are separated by spaces,
-+not commas.
-+
- 
- .TP
- \fBweekly\fR
- Log files are rotated if the current weekday is less then the weekday
- of the last rotation or if more then a week has passed since the last
- rotation. This is normally the same as rotating logs on the first day
--of the week, but it works better if \fIlogrotate\fR is not run every
--night.
-+of the week, but if \fBlogrotate\fR is not being run every night a log 
-+rotation will happen at the first valid opportunity.
- 
- .SH FILES
- .PD 0
-@@ -411,11 +423,16 @@ Default state file.
- Configuration options.
- 
- .SH SEE ALSO
--.IR gzip (1)
-+.BR gzip (1)
-+
-+.SH NOTES
-+The \fBkillall\fR(1) program in Debian is found in the \fIpsmisc\fR package.
- 
- .SH AUTHORS
- .nf
- Erik Troan <ewt@redhat.com>
- .nf
- Preston Brown <pbrown@redhat.com>
-+.nf
-+Corrections and changes for Debian by Paul Martin <pm@debian.org>
- .fi
diff --git a/patches/logrotate-3.7.1/ptx-timeext.patch b/patches/logrotate-3.7.1/ptx-timeext.patch
deleted file mode 100644
index 1c043b3..0000000
--- a/patches/logrotate-3.7.1/ptx-timeext.patch
+++ /dev/null
@@ -1,161 +0,0 @@
----
- config.c    |    8 ++++++++
- logrotate.8 |    8 ++++++++
- logrotate.c |   49 +++++++++++++++++++++++++++++++++++++------------
- logrotate.h |    1 +
- 4 files changed, 54 insertions(+), 12 deletions(-)
-
-Index: logrotate-3.7.1/logrotate.h
-===================================================================
---- logrotate-3.7.1.orig/logrotate.h
-+++ logrotate-3.7.1/logrotate.h
-@@ -16,6 +16,7 @@
- #define LOG_FLAG_SHAREDSCRIPTS	(1 << 7)
- #define LOG_FLAG_COPY		(1 << 8)
- #define LOG_FLAG_DATEEXT	(1 << 9)
-+#define LOG_FLAG_TIMEEXT	(1 << 10)
- 
- #define NO_FORCE_ROTATE 0
- #define FORCE_ROTATE    1
-Index: logrotate-3.7.1/config.c
-===================================================================
---- logrotate-3.7.1.orig/config.c
-+++ logrotate-3.7.1/config.c
-@@ -521,6 +521,14 @@ static int readConfigFile(const char * c
- 		newlog->flags &= ~LOG_FLAG_DATEEXT;
- 
- 		*endtag = oldchar, start = endtag;
-+	    } else if (!strcmp(start, "timeext")) {
-+		newlog->flags |= (LOG_FLAG_TIMEEXT);
-+
-+		*endtag = oldchar, start = endtag;
-+	    } else if (!strcmp(start, "notimeext")) {
-+		newlog->flags &= ~LOG_FLAG_TIMEEXT;
-+
-+		*endtag = oldchar, start = endtag;
- 	    } else if (!strcmp(start, "noolddir")) {
- 		newlog->oldDir = NULL;
- 
-Index: logrotate-3.7.1/logrotate.8
-===================================================================
---- logrotate-3.7.1.orig/logrotate.8
-+++ logrotate-3.7.1/logrotate.8
-@@ -216,6 +216,14 @@ Archive old versions of log files adding
- instead of simply adding a number.
- 
- .TP
-+\fBtimeext\fR
-+Archive old versions of log files adding a timestamp extension like
-+YYYYMMDDThhmmssZ instead of simply adding a number.
-+The timestamp conforms to International Standard ISO 8601.
-+20060307T114252Z -> 2006/03/07 11:42:52 Zulu (UTC)
-+
-+
-+.TP
- \fBdelaycompress\fR
- Postpone compression of the previous log file to the next rotation cycle.
- This only has effect when used in combination with \fBcompress\fR.
-Index: logrotate-3.7.1/logrotate.c
-===================================================================
---- logrotate-3.7.1.orig/logrotate.c
-+++ logrotate-3.7.1/logrotate.c
-@@ -542,7 +542,7 @@ int rotateSingleLog(logInfo * log, int l
- 
-     alloc_size = strlen(dirName) + strlen(baseName) + 
-                  strlen(log->files[logNum]) + strlen(fileext) +
--                 strlen(compext) + 18;
-+                 strlen(compext) + 18 + 8;
-     
-     oldName = alloca(alloc_size);
-     newName = alloca(alloc_size);
-@@ -564,13 +564,17 @@ int rotateSingleLog(logInfo * log, int l
-     /* First compress the previous log when necessary */
-     if (log->flags & LOG_FLAG_COMPRESS &&
-         log->flags & LOG_FLAG_DELAYCOMPRESS) {
--	if (log->flags & LOG_FLAG_DATEEXT) {
-+	if (log->flags & LOG_FLAG_DATEEXT ||
-+	    log->flags & LOG_FLAG_TIMEEXT) {
- 	               /* glob for uncompressed files with our pattern */
- 	    glob_pattern = malloc(strlen(dirName) + strlen(baseName)
--				  + strlen(fileext) + 44 );
-+				  + strlen(fileext) + 44 + 32);
- 	    sprintf(glob_pattern,
--		    "%s/%s-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]%s",
--		    dirName, baseName, fileext);
-+		    "%s/%s%s%s",
-+		    dirName, baseName, log->flags & LOG_FLAG_TIMEEXT ?
-+		    "-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]T[0-9][0-9][0-9][0-9][0-9][0-9]Z" :
-+		    "-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]",
-+		    fileext);
- 	    rc = glob(glob_pattern, 0, globerr, &globResult);
- 	    if (!rc && globResult.gl_pathc > 0) {
- 		for (i = 0; i < globResult.gl_pathc && !hasErrors; i++) {
-@@ -605,16 +609,20 @@ int rotateSingleLog(logInfo * log, int l
-     }
-     
-     firstRotated = alloca(strlen(dirName) + strlen(baseName) +
--			  strlen(fileext) + strlen(compext) + 30);
-+			  strlen(fileext) + strlen(compext) + 30 + 8);
- 
--    if(log->flags & LOG_FLAG_DATEEXT) {
-+    if(log->flags & LOG_FLAG_DATEEXT ||
-+       log->flags & LOG_FLAG_TIMEEXT) {
- 	/* glob for compressed files with our pattern
- 	 * and compress ext */
- 	glob_pattern = malloc(strlen(dirName)+strlen(baseName)
--			      +strlen(fileext)+strlen(compext)+44);
-+			      +strlen(fileext)+strlen(compext)+44+32);
- 	sprintf(glob_pattern,
--		"%s/%s-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]%s%s",
--		dirName, baseName, fileext, compext);
-+		"%s/%s%s%s%s",
-+		dirName, baseName, log->flags & LOG_FLAG_TIMEEXT ?
-+		"-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]T[0-9][0-9][0-9][0-9][0-9][0-9]Z" :
-+		"-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]",
-+		fileext, compext);
- 	rc = glob(glob_pattern, 0, globerr, &globResult);
- 	if (!rc) {
- 	    /* search for files to drop, if we find one remember it,
-@@ -654,9 +662,17 @@ int rotateSingleLog(logInfo * log, int l
- 	    disposeName = NULL;
- 	}
- 	/* firstRotated is most recently created/compressed rotated log */
-+	if(log->flags & LOG_FLAG_TIMEEXT)
-+	    sprintf(firstRotated, "%s/%s-%04d%02d%02dT%02d%02d%02dZ%s%s",
-+		    dirName, baseName, now.tm_year+1900,
-+		    now.tm_mon+1, now.tm_mday,
-+		    now.tm_hour, now.tm_min, now.tm_sec,
-+		    fileext, compext);
-+	else
- 	sprintf(firstRotated, "%s/%s-%04d%02d%02d%s%s",
- 		dirName, baseName, now.tm_year+1900,
- 		now.tm_mon+1, now.tm_mday, fileext, compext);
-+
- 	globfree(&globResult);
- 	free(glob_pattern);
-     } else {
-@@ -743,13 +759,22 @@ int rotateSingleLog(logInfo * log, int l
-  
-     finalName = oldName;
-     
--    if(log->flags & LOG_FLAG_DATEEXT) {
-+    if(log->flags & LOG_FLAG_DATEEXT ||
-+       log->flags & LOG_FLAG_TIMEEXT) {
- 	char * destFile = alloca(strlen(dirName) + strlen(baseName) +
--				 strlen(fileext) + strlen(compext) + 30);
-+				 strlen(fileext) + strlen(compext) + 30 + 8);
- 	struct stat fst_buf;
-+	if(log->flags & LOG_FLAG_TIMEEXT)
-+		sprintf(finalName, "%s/%s-%04d%02d%02dT%02d%02d%02dZ%s",
-+			dirName, baseName, now.tm_year+1900,
-+			now.tm_mon+1, now.tm_mday,
-+			now.tm_hour, now.tm_min, now.tm_sec,
-+			fileext);
-+	else
- 	sprintf(finalName, "%s/%s-%04d%02d%02d%s",
- 		dirName, baseName, now.tm_year+1900,
- 		now.tm_mon+1, now.tm_mday, fileext);
-+
- 	sprintf(destFile, "%s%s", finalName, compext);
- 	if(!stat(destFile,&fst_buf)) {
- 	    message (MESS_DEBUG, "destination %s already exists, skipping rotation\n", firstRotated);
diff --git a/patches/logrotate-3.7.1/rh-dateext.patch b/patches/logrotate-3.7.1/rh-dateext.patch
deleted file mode 100644
index b1ccecd..0000000
--- a/patches/logrotate-3.7.1/rh-dateext.patch
+++ /dev/null
@@ -1,326 +0,0 @@
-Enhance logrotate with "dateext".
-From RedHat patches
-
----
- config.c    |    8 ++
- logrotate.8 |    5 +
- logrotate.c |  177 +++++++++++++++++++++++++++++++++++++++++++++++++++++-------
- logrotate.h |    1 
- 4 files changed, 173 insertions(+), 18 deletions(-)
-
-Index: logrotate-3.7.1/logrotate.h
-===================================================================
---- logrotate-3.7.1.orig/logrotate.h
-+++ logrotate-3.7.1/logrotate.h
-@@ -15,6 +15,7 @@
- #define LOG_FLAG_MAILFIRST	(1 << 6)
- #define LOG_FLAG_SHAREDSCRIPTS	(1 << 7)
- #define LOG_FLAG_COPY		(1 << 8)
-+#define LOG_FLAG_DATEEXT	(1 << 9)
- 
- #define NO_FORCE_ROTATE 0
- #define FORCE_ROTATE    1
-Index: logrotate-3.7.1/logrotate.c
-===================================================================
---- logrotate-3.7.1.orig/logrotate.c
-+++ logrotate-3.7.1/logrotate.c
-@@ -11,6 +11,7 @@
- #include <sys/wait.h>
- #include <time.h>
- #include <unistd.h>
-+#include <glob.h>
- 
- #ifdef WITH_SELINUX
- #include <selinux/selinux.h>
-@@ -22,6 +23,10 @@ int selinux_enabled=0;
- #include "log.h"
- #include "logrotate.h"
- 
-+#if !defined(GLOB_ABORTED) && defined(GLOB_ABEND)
-+#define GLOB_ABORTED GLOB_ABEND
-+#endif
-+
- typedef struct {
-     char * fn;
-     struct tm lastRotated;	/* only tm.mon, tm_mday, tm_year are good! */
-@@ -42,6 +47,14 @@ int debug = 0;
- char * mailCommand = DEFAULT_MAIL_COMMAND;
- time_t nowSecs = 0;
- 
-+static int globerr(const char * pathname, int theerr) {
-+    message(MESS_ERROR, "error accessing %s: %s\n", pathname,
-+	strerror(theerr));
-+
-+    /* We want the glob operation to continue, so return 0 */
-+    return 1;
-+}
-+
- static logState * findState(const char * fn, struct stateSet * sip) {
-     int i;
-     logState * states = sip->states;
-@@ -121,6 +134,17 @@ static int runScript(char * logfn, char 
-     return rc;
- }
- 
-+static int removeLogFile(char * name) {
-+    message(MESS_DEBUG, "removing old log %s\n", name);
-+
-+    if (!debug && unlink(name)) {
-+       message(MESS_ERROR, "Failed to remove old log %s: %s\n",
-+           name, strerror(errno));
-+       return 1;
-+    }
-+    return 0;
-+}
-+
- static int compressLogFile(char * name, logInfo * log, struct stat *sb) {
-     char * compressedName;
-     const char ** fullCommand;
-@@ -265,6 +289,25 @@ static int mailLog(char * logFile, char 
-     return rc;
- }
- 
-+static int mailLogWrapper (char * mailFilename, char * mailCommand, int logNum, logInfo * log) {
-+    /* if the log is compressed (and we're not mailing a
-+     * file whose compression has been delayed), we need
-+     * to uncompress it */
-+    if ((log->flags & LOG_FLAG_COMPRESS) &&
-+       !((log->flags & LOG_FLAG_DELAYCOMPRESS) &&
-+           (log->flags & LOG_FLAG_MAILFIRST))) {
-+       if (mailLog(mailFilename, mailCommand,
-+                   log->uncompress_prog, log->logAddress,
-+                   log->files[logNum]))
-+           return 1;
-+    } else {
-+       if (mailLog(mailFilename, mailCommand, NULL,
-+                   log->logAddress, mailFilename))
-+           return 1;
-+    }
-+    return 0;
-+}
-+
- static int copyTruncate(char * currLog, char * saveLog, struct stat * sb, int flags) {
-     char buf[BUFSIZ];
-     int fdcurr = -1, fdsave = -1;
-@@ -479,6 +522,9 @@ int rotateSingleLog(logInfo * log, int l
-     char * baseName;
-     char * dirName;
-     char * firstRotated;
-+    char * glob_pattern;
-+    glob_t globResult;
-+    int rc;
-     size_t alloc_size;
-     int rotateCount = log->rotateCount ? log->rotateCount : 1;
-     int logStart = (log->logStart == -1) ? 1 : log->logStart;
-@@ -509,7 +555,7 @@ int rotateSingleLog(logInfo * log, int l
- 
-     alloc_size = strlen(dirName) + strlen(baseName) + 
-                  strlen(log->files[logNum]) + strlen(fileext) +
--                 strlen(compext) + 10;
-+                 strlen(compext) + 18;
-     
-     oldName = alloca(alloc_size);
-     newName = alloca(alloc_size);
-@@ -531,25 +577,106 @@ int rotateSingleLog(logInfo * log, int l
-     /* First compress the previous log when necessary */
-     if (log->flags & LOG_FLAG_COMPRESS &&
-         log->flags & LOG_FLAG_DELAYCOMPRESS) {
--        struct stat sbprev;
--	
--        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);
--        } else {
--	    hasErrors = compressLogFile(oldName, log, &sbprev);
-+	if (log->flags & LOG_FLAG_DATEEXT) {
-+	               /* glob for uncompressed files with our pattern */
-+	    glob_pattern = malloc(strlen(dirName) + strlen(baseName)
-+				  + strlen(fileext) + 44 );
-+	    sprintf(glob_pattern,
-+		    "%s/%s-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]%s",
-+		    dirName, baseName, fileext);
-+	    rc = glob(glob_pattern, 0, globerr, &globResult);
-+	    if (!rc && globResult.gl_pathc > 0) {
-+		for (i = 0; i < globResult.gl_pathc && !hasErrors; i++) {
-+	    	    struct stat sbprev;
-+		    
-+		    sprintf(oldName,"%s",(globResult.gl_pathv)[i]);
-+		    if (stat(oldName, &sbprev)) {
-+			message(MESS_DEBUG, "previous log %s does not exist\n",
-+			oldName);
-+		    } else {
-+			hasErrors = compressLogFile(oldName, log, &sbprev);
-+		    }
-+		}
-+	    } else {
-+		message (MESS_DEBUG, "glob finding logs to compress failed\n");
-+		/* fallback to old behaviour */
-+		sprintf(oldName, "%s/%s.%d%s", dirName, baseName, logStart, fileext);
-+	    }
-+	    globfree(&globResult);
-+	    free(glob_pattern);
-+	} else {
-+	    struct stat sbprev;
-+
-+	    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);
-+	    } else {
-+		hasErrors = compressLogFile(oldName, log, &sbprev);
-+	    }
- 	}
-     }
-     
-+    firstRotated = alloca(strlen(dirName) + strlen(baseName) +
-+			  strlen(fileext) + strlen(compext) + 30);
-+
-+    if(log->flags & LOG_FLAG_DATEEXT) {
-+	/* glob for compressed files with our pattern
-+	 * and compress ext */
-+	glob_pattern = malloc(strlen(dirName)+strlen(baseName)
-+			      +strlen(fileext)+strlen(compext)+44);
-+	sprintf(glob_pattern,
-+		"%s/%s-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]%s%s",
-+		dirName, baseName, fileext, compext);
-+	rc = glob(glob_pattern, 0, globerr, &globResult);
-+	if (!rc) {
-+	    /* search for files to drop, if we find one remember it,
-+	     * if we find another one mail and remove the first and
-+	     * remember the second and so on */
-+	    struct stat fst_buf;
-+	    int mail_out = -1;
-+	    /* remove the first (n - rotateCount) matches
-+	     * no real rotation needed, since the files have
-+	     * the date in their name */
-+	    for (i = 0; i < globResult.gl_pathc; i++) {
-+		if( !stat((globResult.gl_pathv)[i],&fst_buf) ) {
-+		    if (i <= ((int)globResult.gl_pathc - rotateCount)) {
-+			if ( mail_out != -1 ) {
-+			    if (!hasErrors && log->logAddress) {
-+				char * mailFilename = (globResult.gl_pathv)[mail_out];
-+				hasErrors = mailLogWrapper(mailFilename, mailCommand, logNum, log);
-+				if (!hasErrors)
-+				    hasErrors = removeLogFile(mailFilename);
-+			    }
-+			}
-+			mail_out = i;
-+		    }
-+		}
-+	    }
-+	    if ( mail_out != -1 ) {
-+		/* oldName is oldest Backup found (for unlink later) */
-+		sprintf(oldName, "%s", (globResult.gl_pathv)[mail_out]);
-+		strcpy(disposeName, oldName);
-+	    } else
-+		disposeName = NULL;
-+	} else {
-+	    message (MESS_DEBUG, "glob finding old rotated logs failed\n");
-+	    disposeName = NULL;
-+	}
-+	/* firstRotated is most recently created/compressed rotated log */
-+	sprintf(firstRotated, "%s/%s-%04d%02d%02d%s%s",
-+		dirName, baseName, now.tm_year+1900,
-+		now.tm_mon+1, now.tm_mday, fileext, compext);
-+	globfree(&globResult);
-+	free(glob_pattern);
-+    } 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, 
- 	    (log->flags & LOG_FLAG_DELAYCOMPRESS) ? "" : compext);
-@@ -599,12 +726,27 @@ int rotateSingleLog(logInfo * log, int l
-                 hasErrors = 1;
- 	    }
- 	}
--    }
--    
-+    } 
-+    } /* !LOG_FLAG_DATEEXT */
-+ 
-     finalName = oldName;
-     
--    /* note: the gzip extension is *not* used here! */
--    sprintf(finalName, "%s/%s.%d%s", dirName, baseName, logStart, fileext);
-+    if(log->flags & LOG_FLAG_DATEEXT) {
-+	char * destFile = alloca(strlen(dirName) + strlen(baseName) +
-+				 strlen(fileext) + strlen(compext) + 30);
-+	struct stat fst_buf;
-+	sprintf(finalName, "%s/%s-%04d%02d%02d%s",
-+		dirName, baseName, now.tm_year+1900,
-+		now.tm_mon+1, now.tm_mday, fileext);
-+	sprintf(destFile, "%s%s", finalName, compext);
-+	if(!stat(destFile,&fst_buf)) {
-+	    message (MESS_DEBUG, "destination %s already exists, skipping rotation\n", firstRotated);
-+	    hasErrors = 1;
-+	}
-+    } else {
-+	/* note: the gzip extension is *not* used here! */
-+	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)) {
-@@ -613,9 +755,6 @@ int rotateSingleLog(logInfo * log, int l
-         disposeName = NULL;
-     } 
-     
--    free(dirName);
--    free(baseName);
--    
-     if (!hasErrors) {
-         if (log->pre && !(log->flags & LOG_FLAG_SHAREDSCRIPTS)) {
-             message(MESS_DEBUG, "running prerotate script\n");
-@@ -761,6 +900,8 @@ int rotateSingleLog(logInfo * log, int l
- 	  }
- 	}
- #endif
-+    free(dirName);
-+    free(baseName);
-     return hasErrors;
- }
- 
-Index: logrotate-3.7.1/config.c
-===================================================================
---- logrotate-3.7.1.orig/config.c
-+++ logrotate-3.7.1/config.c
-@@ -511,6 +511,14 @@ static int readConfigFile(const char * c
- 		newlog->flags &= ~LOG_FLAG_IFEMPTY;
- 
- 		*endtag = oldchar, start = endtag;
-+	    } else if (!strcmp(start, "dateext")) {
-+		newlog->flags |= LOG_FLAG_DATEEXT;
-+
-+		*endtag = oldchar, start = endtag;
-+	    } else if (!strcmp(start, "nodateext")) {
-+		newlog->flags &= ~LOG_FLAG_DATEEXT;
-+
-+		*endtag = oldchar, start = endtag;
- 	    } else if (!strcmp(start, "noolddir")) {
- 		newlog->oldDir = NULL;
- 
-Index: logrotate-3.7.1/logrotate.8
-===================================================================
---- logrotate-3.7.1.orig/logrotate.8
-+++ logrotate-3.7.1/logrotate.8
-@@ -200,6 +200,11 @@ file for the omitted attributes. This op
- Log files are rotated every day.
- 
- .TP
-+\fBdateext\fR
-+Archive old versions of log files adding a daily extension like YYYYMMDD
-+instead of simply adding a number.
-+
-+.TP
- \fBdelaycompress\fR
- Postpone compression of the previous log file to the next rotation cycle.
- This has only effect when used in combination with \fBcompress\fR.
diff --git a/patches/logrotate-3.7.1/rh-maxage.patch b/patches/logrotate-3.7.1/rh-maxage.patch
deleted file mode 100644
index 49087c4..0000000
--- a/patches/logrotate-3.7.1/rh-maxage.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-Enhance logrotate with "maxage".
-From upstream RedHat patch.
-
----
- config.c    |   15 +++++++++++++++
- logrotate.8 |    6 ++++++
- logrotate.c |   25 +++++++++++++++++++++++--
- logrotate.h |    1 +
- 4 files changed, 45 insertions(+), 2 deletions(-)
-
-Index: logrotate-3.7.1/logrotate.c
-===================================================================
---- logrotate-3.7.1.orig/logrotate.c
-+++ logrotate-3.7.1/logrotate.c
-@@ -640,7 +640,10 @@ int rotateSingleLog(logInfo * log, int l
- 	     * the date in their name */
- 	    for (i = 0; i < globResult.gl_pathc; i++) {
- 		if( !stat((globResult.gl_pathv)[i],&fst_buf) ) {
--		    if (i <= ((int)globResult.gl_pathc - rotateCount)) {
-+		    if ((i <= ((int)globResult.gl_pathc - rotateCount)) 
-+			|| ((log->rotateAge > 0)
-+			    && (((nowSecs - fst_buf.st_mtime)/60/60/24)
-+				> log->rotateAge))) {
- 			if ( mail_out != -1 ) {
- 			    if (!hasErrors && log->logAddress) {
- 				char * mailFilename = (globResult.gl_pathv)[mail_out];
-@@ -670,6 +673,22 @@ int rotateSingleLog(logInfo * log, int l
- 	globfree(&globResult);
- 	free(glob_pattern);
-     } else {
-+	if ( log->rotateAge ) {
-+	    struct stat fst_buf;
-+	    for (i=1; i <= rotateCount; i++) {
-+		sprintf(oldName, "%s/%s.%d%s%s", dirName, baseName,
-+			rotateCount + 1, fileext, compext);
-+		if(!stat(oldName,&fst_buf)
-+		    && (((nowSecs - fst_buf.st_mtime)/60/60/24)
-+			> log->rotateAge)) {
-+		    char * mailFilename = (globResult.gl_pathv)[i];
-+		    if (!hasErrors && log->logAddress)
-+			hasErrors = mailLogWrapper(mailFilename, mailCommand, logNum, log);
-+		    if (!hasErrors)
-+			hasErrors = removeLogFile(mailFilename);
-+		}
-+	    }
-+	}
- 
-     sprintf(oldName, "%s/%s.%d%s%s", dirName, baseName,
-             logStart + rotateCount, fileext, compext);
-@@ -1188,7 +1207,9 @@ static int readState(char * stateFilenam
- 
- int main(int argc, const char ** argv) {
-     logInfo defConfig = { NULL, NULL, 0, NULL, ROT_SIZE, 
--			  /* threshHold */ 1024 * 1024, 0,
-+			  /* threshHold */ 1024 * 1024,
-+			  /* rotateCount */ 0,
-+			  /* rotateAge */ 0,
- 			  /* log start */ -1,
- 			  /* pre, post */ NULL, NULL,
- 			  /* first, last */ NULL, NULL,
-Index: logrotate-3.7.1/logrotate.h
-===================================================================
---- logrotate-3.7.1.orig/logrotate.h
-+++ logrotate-3.7.1/logrotate.h
-@@ -35,6 +35,7 @@ typedef struct {
-     enum { ROT_DAYS, ROT_WEEKLY, ROT_MONTHLY, ROT_SIZE, ROT_FORCE } criterium;
-     unsigned int threshhold;
-     int rotateCount;
-+    int rotateAge;
-     int logStart;
-     char * pre, * post, * first, * last;
-     char * logAddress;
-Index: logrotate-3.7.1/config.c
-===================================================================
---- logrotate-3.7.1.orig/config.c
-+++ logrotate-3.7.1/config.c
-@@ -678,6 +678,21 @@ static int readConfigFile(const char * c
- 		    }
- 		    *endtag = oldchar, start = endtag;
- 		}
-+	    } else if (!strcmp(start, "maxage")) {
-+		*endtag = oldchar, start = endtag;
-+
-+		if (!isolateValue(configFile, lineNum, "maxage count", &start,
-+				  &endtag)) {
-+		    oldchar = *endtag, *endtag = '\0';
-+
-+		    newlog->rotateAge = strtoul(start, &chptr, 0);
-+		    if (*chptr || newlog->rotateAge < 0) {
-+			message(MESS_ERROR, "%s:%d bad maximum age '%s'\n",
-+				configFile, lineNum, start);
-+			return 1;
-+		    }
-+		    *endtag = oldchar, start = endtag;
-+		}
- 	    } else if (!strcmp(start, "errors")) {
- 		message(MESS_DEBUG, "%s: %d: the errors directive is deprecated and no longer used.\n",
- 			configFile, lineNum);
-Index: logrotate-3.7.1/logrotate.8
-===================================================================
---- logrotate-3.7.1.orig/logrotate.8
-+++ logrotate-3.7.1/logrotate.8
-@@ -251,6 +251,12 @@ When using the \fBmail\fR command, mail 
- instead of the just-rotated file (this is the default).
- 
- .TP
-+\fBmaxage\fR \fIcount\fR
-+Remove rotated logs older than <count> days. The age is only checked
-+if the logfile is to be rotated. The files are mailed to the
-+configured address if \fBmaillast\fR and \fBmail\fR are configured.
-+
-+.TP
- \fBmissingok\fR
- If the log file is missing, go on to the next one without issuing an error
- message. See also \fBnomissingok\fR.
diff --git a/patches/logrotate-3.7.1/rh-noTMPDIR.patch b/patches/logrotate-3.7.1/rh-noTMPDIR.patch
deleted file mode 100644
index 73e5fa7..0000000
--- a/patches/logrotate-3.7.1/rh-noTMPDIR.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Do not use tmpfile to run script anymore (Closes: #149270)
-From RedHat patches.
-
----
- logrotate.c |   31 +------------------------------
- 1 file changed, 1 insertion(+), 30 deletions(-)
-
-Index: logrotate-3.7.1/logrotate.c
-===================================================================
---- logrotate-3.7.1.orig/logrotate.c
-+++ logrotate-3.7.1/logrotate.c
-@@ -88,10 +88,7 @@ static logState * findState(const char *
- }
- 
- static int runScript(char * logfn, char * script) {
--    int fd;
--    char *filespec;
-     int rc;
--    char buf[256];
- 
-     if (debug) {
- 	message(MESS_DEBUG, "running script with arg %s: \"%s\"\n", 
-@@ -99,38 +96,12 @@ static int runScript(char * logfn, char 
- 	return 0;
-     }
- 
--    filespec = buf;
--    snprintf(buf, sizeof(buf), "%s/logrotate.XXXXXX", getenv("TMPDIR") ?: "/tmp");
--    fd = -1;
--    if (!filespec || (fd = mkstemp(filespec)) < 0 || fchmod(fd, 0700)) {
--	message(MESS_DEBUG, "error creating %s: %s\n", filespec,
--		strerror(errno));
--	if (fd >= 0) {
--	    close(fd);
--	    unlink(filespec);
--	}
--	return -1;
--    }
--
--    if (write(fd, "#!/bin/sh\n\n", 11) != 11 ||
--	write(fd, script, strlen(script)) != strlen(script)) {
--	message(MESS_DEBUG, "error writing %s\n", filespec);
--	close(fd);
--	unlink(filespec);
--	return -1;
--    }
--
--    close(fd);
--
-     if (!fork()) {
--	execlp(filespec, filespec, logfn, NULL);
-+	execl("/bin/sh", "sh", "-c", script, NULL);
- 	exit(1);
-     }
- 
-     wait(&rc);
--
--    unlink(filespec);
--
-     return rc;
- }
- 
diff --git a/patches/logrotate-3.7.1/rh-selinux.patch b/patches/logrotate-3.7.1/rh-selinux.patch
deleted file mode 100644
index 6798ce0..0000000
--- a/patches/logrotate-3.7.1/rh-selinux.patch
+++ /dev/null
@@ -1,177 +0,0 @@
-Add selinux_getenforce() calls to work when not in enforcing mode
-- use security_getenforce() instead of selinux_getenforcemode
-From RedHat patches.
-
----
- logrotate.c |  126 +++++++++++++++++++++++++++++++++---------------------------
- 1 file changed, 71 insertions(+), 55 deletions(-)
-
-Index: logrotate-3.7.1/logrotate.c
-===================================================================
---- logrotate-3.7.1.orig/logrotate.c
-+++ logrotate-3.7.1/logrotate.c
-@@ -17,6 +17,7 @@
- #include <selinux/selinux.h>
- static security_context_t prev_context=NULL;
- int selinux_enabled=0;
-+int selinux_enforce=0;
- #endif
- 
- #include "basenames.h"
-@@ -293,38 +294,43 @@ static int copyTruncate(char * currLog, 
- 	    return 1;
- 	}
- #ifdef WITH_SELINUX
--	if ((selinux_enabled=(is_selinux_enabled()>0)))
--	  {
--	    security_context_t oldContext;
--	    if (fgetfilecon(fdcurr, &oldContext) >=0) {
--	      if (getfscreatecon(&prev_context) < 0) {
--		message(MESS_ERROR, "error getting default context: %s\n", 
--			strerror(errno));
--		freecon(oldContext);
--		return 1;
--	      }
--	      if (setfscreatecon(oldContext) < 0) {
--		message(MESS_ERROR, "error setting file context %s to %s: %s\n", 
--			saveLog, oldContext,strerror(errno));
--		freecon(oldContext);
--		return 1;
--	      }
--	      freecon(oldContext);
--	    } else {
--	      message(MESS_ERROR, "error getting file context %s: %s\n", currLog,
--		      strerror(errno));
--	      return 1;
--	    }
--	  }
-+	if (selinux_enabled) {
-+		security_context_t oldContext;
-+		if (fgetfilecon(fdcurr, &oldContext) >=0) {
-+			if (getfscreatecon(&prev_context) < 0) {
-+				message(MESS_ERROR, "error getting default context: %s\n", 
-+					strerror(errno));
-+				if (selinux_enforce) {
-+					freecon(oldContext);
-+					return 1;
-+				}
-+			}
-+			if (setfscreatecon(oldContext) < 0) {
-+				message(MESS_ERROR, "error setting file context %s to %s: %s\n", 
-+					saveLog, oldContext,strerror(errno));
-+				if (selinux_enforce) {
-+					freecon(oldContext);
-+					return 1;
-+				}
-+			}
-+			freecon(oldContext);
-+		} else {
-+			message(MESS_ERROR, "error getting file context %s: %s\n", currLog,
-+				strerror(errno));
-+			if (selinux_enforce) {
-+				return 1;
-+			}
-+		}
-+	}
- #endif
- 	fdsave = open(saveLog, O_WRONLY | O_CREAT | O_TRUNC,sb->st_mode);
- #ifdef WITH_SELINUX
- 	if (selinux_enabled) {
--	  setfscreatecon(prev_context);
--	  if (prev_context!= NULL) {
--	    freecon(prev_context);
--	    prev_context=NULL;
--	  }
-+		setfscreatecon(prev_context);
-+		if (prev_context!= NULL) {
-+			freecon(prev_context);
-+			prev_context=NULL;
-+		}
- 	}
- #endif
- 	if (fdsave < 0) {
-@@ -672,28 +678,34 @@ int rotateSingleLog(logInfo * log, int l
- 	    (log->flags & LOG_FLAG_DELAYCOMPRESS) ? "" : compext);
-     
- #ifdef WITH_SELINUX
--    if ((selinux_enabled=(is_selinux_enabled()>0))) {
--      security_context_t oldContext=NULL;
--      if (getfilecon(log->files[logNum], &oldContext)>0) {
--	if (getfscreatecon(&prev_context) < 0) {
--	  message(MESS_ERROR, "error getting default context: %s\n", 
--		  strerror(errno));
--	  freecon(oldContext);
--	  return 1;
--	}
--	if (setfscreatecon(oldContext) < 0) {
--	  message(MESS_ERROR, "error setting file context %s to %s: %s\n", 
--		  log->files[logNum], oldContext,strerror(errno));
--	  freecon(oldContext);
--	  return 1;
--	}
--	freecon(oldContext);
--      } else {
--	message(MESS_ERROR, "error getting file context %s: %s\n", 
--		log->files[logNum], 
--		strerror(errno));
--	return 1;
--      }
-+    if (selinux_enabled) {
-+	    security_context_t oldContext=NULL;
-+	    if (getfilecon(log->files[logNum], &oldContext)>0) {
-+		    if (getfscreatecon(&prev_context) < 0) {
-+			    message(MESS_ERROR, "error getting default context: %s\n", 
-+				    strerror(errno));
-+			    if (selinux_enforce) {
-+				    freecon(oldContext);
-+				    return 1;
-+			    }
-+		    }
-+		    if (setfscreatecon(oldContext) < 0) {
-+			    message(MESS_ERROR, "error setting file context %s to %s: %s\n", 
-+				    log->files[logNum], oldContext,strerror(errno));
-+			    if (selinux_enforce) {
-+				    freecon(oldContext);
-+				    return 1;
-+			    }
-+		    }
-+		    freecon(oldContext);
-+	    } else {
-+		    message(MESS_ERROR, "error getting file context %s: %s\n", 
-+			    log->files[logNum], 
-+			    strerror(errno));
-+		    if (selinux_enforce) {
-+			    return 1;
-+		    }
-+	    }
-     }
- #endif
-     for (i = rotateCount + logStart - 1; (i >= 0) && !hasErrors; i--) {
-@@ -883,11 +895,11 @@ int rotateSingleLog(logInfo * log, int l
-     
- #ifdef WITH_SELINUX
- 	if (selinux_enabled) {
--	  setfscreatecon(prev_context);
--	  if (prev_context!= NULL) {
--	    freecon(prev_context);
--	    prev_context=NULL;
--	  }
-+		setfscreatecon(prev_context);
-+		if (prev_context!= NULL) {
-+			freecon(prev_context);
-+			prev_context=NULL;
-+		}
- 	}
- #endif
-     free(dirName);
-@@ -1249,6 +1261,10 @@ int main(int argc, const char ** argv) {
- 	exit(1);
-     }
- 
-+#ifdef WITH_SELINUX
-+    selinux_enabled=(is_selinux_enabled()>0);
-+    selinux_enforce=security_getenforce();
-+#endif
-     for (file = files; *file; file++) {
- 	if (readConfigPath(*file, &defConfig, &logs, &numLogs)) {
- 	    exit(1);
diff --git a/patches/logrotate-3.7.1/script-argument.patch b/patches/logrotate-3.7.1/script-argument.patch
deleted file mode 100644
index cfc48a8..0000000
--- a/patches/logrotate-3.7.1/script-argument.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Closes: #330783
-
-Allow the use of $1 in scripts.
-
-
----
- logrotate.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: logrotate-3.7.1/logrotate.c
-===================================================================
---- logrotate-3.7.1.orig/logrotate.c
-+++ logrotate-3.7.1/logrotate.c
-@@ -101,7 +101,7 @@ static int runScript(char * logfn, char 
-     }
- 
-     if (!fork()) {
--	execl("/bin/sh", "sh", "-c", script, NULL);
-+	execl("/bin/sh", "sh", "-c", script, "sh", logfn, NULL);
- 	exit(1);
-     }
- 
diff --git a/patches/logrotate-3.7.1/scripterrors.patch b/patches/logrotate-3.7.1/scripterrors.patch
deleted file mode 100644
index ff16192..0000000
--- a/patches/logrotate-3.7.1/scripterrors.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Give error messages identifying log file on script errors
-(Closes: #122691, #195790, #222050, #306020)
-
----
- logrotate.c |    7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-Index: logrotate-3.7.1/logrotate.c
-===================================================================
---- logrotate-3.7.1.orig/logrotate.c
-+++ logrotate-3.7.1/logrotate.c
-@@ -770,8 +770,8 @@ int rotateSingleLog(logInfo * log, int l
-         if (log->pre && !(log->flags & LOG_FLAG_SHAREDSCRIPTS)) {
-             message(MESS_DEBUG, "running prerotate script\n");
-             if (runScript(log->files[logNum], log->pre)) {
--                message(MESS_ERROR, "error running prerotate script, "
--			"leaving old log in place\n");
-+                message(MESS_ERROR, "error running prerotate script for %s, "
-+			"leaving old log in place\n", log->files[logNum]);
-                 hasErrors = 1;
- 	    }
-         }
-@@ -853,7 +853,8 @@ int rotateSingleLog(logInfo * log, int l
- 	    !(log->flags & LOG_FLAG_SHAREDSCRIPTS)) {
-             message(MESS_DEBUG, "running postrotate script\n");
-             if (runScript(log->files[logNum], log->post)) {
--                message(MESS_ERROR, "error running postrotate script\n");
-+                message(MESS_ERROR, "error running postrotate script for %s\n",
-+			log->files[logNum]);
-                 hasErrors = 1;
- 	    }
-         }
diff --git a/patches/logrotate-3.7.1/series b/patches/logrotate-3.7.1/series
deleted file mode 100644
index 3f2595b..0000000
--- a/patches/logrotate-3.7.1/series
+++ /dev/null
@@ -1,25 +0,0 @@
-rh-dateext.patch
-rh-maxage.patch
-rh-noTMPDIR.patch
-rh-selinux.patch
-deb-taboos.patch
-configparse.patch
-taboo-to-debug.patch
-deb-config-h.patch
-datehack.patch
-compressutime.patch
-scripterrors.patch
-manpage.patch
-man-189243.patch
-man-sizetypo.patch
-man-startcount.patch
-man-lastaction.patch
-man-overriden.patch
-man-mailtypo.patch
-man-rh-1.patch
-cpp-crossbuild.patch
-dst.patch
-man-333996.patch
-script-argument.patch
-uncompressChild-warning.patch
-ptx-timeext.patch
diff --git a/patches/logrotate-3.7.1/taboo-to-debug.patch b/patches/logrotate-3.7.1/taboo-to-debug.patch
deleted file mode 100644
index dd78d64..0000000
--- a/patches/logrotate-3.7.1/taboo-to-debug.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Quietens the taboo list from ERROR to a DEBUG (Closes: #249073)
-
----
- config.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: logrotate-3.7.1/config.c
-===================================================================
---- logrotate-3.7.1.orig/config.c
-+++ logrotate-3.7.1/config.c
-@@ -149,7 +149,7 @@ static int checkFile(const char * fname)
-     for (i = 0; i < tabooCount; i++) {
- 	if (!strcmp(fname + strlen(fname) - strlen(tabooExts[i]),
- 	    tabooExts[i])) {
--	    message(MESS_ERROR, "Ignoring %s, because of %s "
-+	    message(MESS_DEBUG, "Ignoring %s, because of %s "
- 		    "ending\n", fname, tabooExts[i]);
- 
- 	    return 0;
diff --git a/patches/logrotate-3.7.1/uncompressChild-warning.patch b/patches/logrotate-3.7.1/uncompressChild-warning.patch
deleted file mode 100644
index 1b8de68..0000000
--- a/patches/logrotate-3.7.1/uncompressChild-warning.patch
+++ /dev/null
@@ -1,17 +0,0 @@
----
- logrotate.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: logrotate-3.7.1/logrotate.c
-===================================================================
---- logrotate-3.7.1.orig/logrotate.c
-+++ logrotate-3.7.1/logrotate.c
-@@ -209,7 +209,7 @@ static int compressLogFile(char * name, 
- static int mailLog(char * logFile, char * mailCommand, char * uncompressCommand, 
- 		   char * address, char * subject) {
-     int mailInput;
--    pid_t mailChild, uncompressChild;
-+    pid_t mailChild, uncompressChild=-1;
-     int mailStatus, uncompressStatus;
-     int uncompressPipe[2];
-     char * mailArgv[] = { mailCommand, "-s", subject, address, NULL };
diff --git a/patches/logrotate-3.8.7/0001-datehack.patch b/patches/logrotate-3.8.7/0001-datehack.patch
new file mode 100644
index 0000000..a4de645
--- /dev/null
+++ b/patches/logrotate-3.8.7/0001-datehack.patch
@@ -0,0 +1,23 @@
+From: unknown author <unknown.author@example.com>
+Date: Fri, 24 Jan 2014 16:45:55 +0100
+Subject: [PATCH] datehack
+
+No longer consider state file dates before 1996 as fatal errors.
+(Closes: #65534)
+---
+ logrotate.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/logrotate.c b/logrotate.c
+index 174a26b..a153fb7 100644
+--- a/logrotate.c
++++ b/logrotate.c
+@@ -2046,7 +2046,7 @@ static int readState(char *stateFilename)
+ 	}
+ 
+ 	/* Hack to hide earlier bug */
+-	if ((year != 1900) && (year < 1996 || year > 2100)) {
++	if ((year != 1900) && (year < 1970 || year > 2100)) {
+ 	    message(MESS_ERROR,
+ 		    "bad year %d for file %s in state file %s\n", year,
+ 		    argv[0], stateFilename);
diff --git a/patches/logrotate-3.7.1/cpp-crossbuild.patch b/patches/logrotate-3.8.7/0002-cpp-crossbuild.patch
similarity index 50%
rename from patches/logrotate-3.7.1/cpp-crossbuild.patch
rename to patches/logrotate-3.8.7/0002-cpp-crossbuild.patch
index f1bc317..a98ec1d 100644
--- a/patches/logrotate-3.7.1/cpp-crossbuild.patch
+++ b/patches/logrotate-3.8.7/0002-cpp-crossbuild.patch
@@ -1,25 +1,26 @@
-Closes: #284040
+From: unknown author <unknown.author@example.com>
+Date: Fri, 24 Jan 2014 16:45:55 +0100
+Subject: [PATCH] cpp-crossbuild
+
 Patch from: NIIBE Yutaka <gniibe@fsij.org>
 
 Cross-building logrotate with dpkg-cross, I encountered a problem.
 dpkg-cross sets CPP variable, and compilation failures, because
 the executable 'cpp' does not accept multiple input files.
-
-
 ---
  Makefile |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-Index: logrotate-3.7.1/Makefile
-===================================================================
---- logrotate-3.7.1.orig/Makefile
-+++ logrotate-3.7.1/Makefile
-@@ -88,7 +88,7 @@ clean:
- 	rm -f $(OBJS) $(PROG) core* .depend
+diff --git a/Makefile b/Makefile
+index 64cc601..c710de8 100644
+--- a/Makefile
++++ b/Makefile
+@@ -123,7 +123,7 @@ clean:
+ 	rm -f ./test/test.ACL ./test/test.SELINUX ./test/error.log
  
  depend:
 -	$(CPP) $(CFLAGS) -M $(SOURCES) > .depend
 +	$(CC) -E $(CFLAGS) -M $(SOURCES) > .depend
  
- .PHONY : test
- test: $(TARGET)
+ # pretest create the file ./test/test.ACL with
+ # 0 or 1 according to the WITH_ACL=yes presence.
diff --git a/patches/logrotate-3.8.7/0003-chown-484762.patch b/patches/logrotate-3.8.7/0003-chown-484762.patch
new file mode 100644
index 0000000..00f0b0c
--- /dev/null
+++ b/patches/logrotate-3.8.7/0003-chown-484762.patch
@@ -0,0 +1,28 @@
+From: unknown author <unknown.author@example.com>
+Date: Fri, 24 Jan 2014 16:45:55 +0100
+Subject: [PATCH] chown-484762
+
+===================================================================
+---
+ logrotate.c |    8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/logrotate.c b/logrotate.c
+index a153fb7..755f395 100644
+--- a/logrotate.c
++++ b/logrotate.c
+@@ -314,8 +314,12 @@ int createOutputFile(char *fileName, int flags, struct stat *sb, acl_type acl, i
+     if (fchmod(fd, (S_IRUSR | S_IWUSR) & sb->st_mode)) {
+ 	message(MESS_ERROR, "error setting mode of %s: %s\n",
+ 		fileName, strerror(errno));
+-	close(fd);
+-	return -1;
++	if (geteuid() == 0) {
++		/* If run as non-root, we may not be able to duplicate
++		   the ownership of the file. Warn but don't fail. */
++		close(fd);
++		return -1;
++	}
+     }
+ 
+ 	if (fstat(fd, &sb_create)) {
diff --git a/patches/logrotate-3.8.7/0004-mktime-718332.patch b/patches/logrotate-3.8.7/0004-mktime-718332.patch
new file mode 100644
index 0000000..ee32f12
--- /dev/null
+++ b/patches/logrotate-3.8.7/0004-mktime-718332.patch
@@ -0,0 +1,28 @@
+From: unknown author <unknown.author@example.com>
+Date: Fri, 24 Jan 2014 16:45:55 +0100
+Subject: [PATCH] mktime-718332
+
+===================================================================
+---
+ logrotate.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/logrotate.c b/logrotate.c
+index 755f395..526750b 100644
+--- a/logrotate.c
++++ b/logrotate.c
+@@ -2115,12 +2115,14 @@ static int readState(char *stateFilename)
+ 		return 1;
+ 	}
+ 
++	memset(&st->lastRotated, 0, sizeof(st->lastRotated));
+ 	st->lastRotated.tm_year = year;
+ 	st->lastRotated.tm_mon = month;
+ 	st->lastRotated.tm_mday = day;
+ 	st->lastRotated.tm_hour = hour;
+ 	st->lastRotated.tm_min = minute;
+ 	st->lastRotated.tm_sec = second;
++	st->lastRotated.tm_isdst = -1;
+ 
+ 	/* fill in the rest of the st->lastRotated fields */
+ 	lr_time = mktime(&st->lastRotated);
diff --git a/patches/logrotate-3.8.7/series b/patches/logrotate-3.8.7/series
new file mode 100644
index 0000000..0704623
--- /dev/null
+++ b/patches/logrotate-3.8.7/series
@@ -0,0 +1,7 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-datehack.patch
+0002-cpp-crossbuild.patch
+0003-chown-484762.patch
+0004-mktime-718332.patch
+# 0370e7c37f32d0185d759e6b73540bc8  - git-ptx-patches magic
diff --git a/rules/logrotate.make b/rules/logrotate.make
index 5ad7071..145d29e 100644
--- a/rules/logrotate.make
+++ b/rules/logrotate.make
@@ -17,13 +17,14 @@ PACKAGES-$(PTXCONF_LOGROTATE) += logrotate
 #
 # Paths and names
 #
-LOGROTATE_VERSION	:= 3.7.1
-LOGROTATE_MD5		:= 12207ce768031878f6ab70c559043ae2
+LOGROTATE_VERSION	:= 3.8.7
+LOGROTATE_MD5		:= 99e08503ef24c3e2e3ff74cc5f3be213
 LOGROTATE		:= logrotate-$(LOGROTATE_VERSION)
 LOGROTATE_SUFFIX	:= tar.gz
-LOGROTATE_URL		:= http://www.pengutronix.de/software/ptxdist/temporary-src/$(LOGROTATE).$(LOGROTATE_SUFFIX)
+LOGROTATE_URL		:= https://fedorahosted.org/releases/l/o/logrotate/$(LOGROTATE).$(LOGROTATE_SUFFIX)
 LOGROTATE_SOURCE	:= $(SRCDIR)/$(LOGROTATE).$(LOGROTATE_SUFFIX)
 LOGROTATE_DIR		:= $(BUILDDIR)/$(LOGROTATE)
+LOGROTATE_LICENSE	:= GPLv2
 
 # ----------------------------------------------------------------------------
 # Compile
-- 
1.7.10.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2014-01-27  7:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-24 16:13 Alexander Dahl
2014-01-24 17:03 ` Michael Olbrich
2014-01-27  7:07   ` Alexander Dahl [this message]
2014-01-30  8:47     ` Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1390806445-24741-1-git-send-email-post@lespocky.de \
    --to=post@lespocky.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox