Commit 50a69c57 authored by Paul Martin's avatar Paul Martin Committed by Tobias Frost

Import Debian changes 3.9.1-1~exp1

logrotate (3.9.1-1~exp1) experimental; urgency=medium

  * New upstream release
    - Change in build system requires autoconf/autotools.
    - Unfortunately it doesn't clean up correctly, so have
      to add some files to debian/clean.
  * Patches changed:
    - manpage.patch: Most corrections adopted upstream.
  * Patches dropped:
    - mktime-718332.patch: Adopted upstream.
    - man-su-explanation-729315.patch: Adopted upstream.
    - cpp-crossbuild.patch: Upstream has moved to autoconf.
  * Patches added:
    - remove-makefile.patch: Make build system clean for source
      format 3.0 (quilt), as upstream have left original Makefile
      in tarball.
parents 0c6eee96 255177a1
3.9.0 -> 3.9.1
- Fix off-by-one error which can lead to crash when copytruncate is used.
3.8.9 -> 3.9.0
- Fix crash when using long dateformat. [nmerdan]
- Add support for %H dateformat. [czchen]
- Fix regression introduced in 3.8.9 when when rotating multiple
logs when one of them is missing.
- In the debug mode, do not skip the code-path which handles the case when
the last rotation does not exist. [Sergey Vidishev]
- Show more precise description when "log does not need rotating".\
- Add new -l option to log verbose output to file. The file is overwritten
on every logrotate execution.
- Allow rotation of sparse files with copytruncate.
3.8.8 -> 3.8.9
- Add new directive "createolddir" and "nocreateolddir". These directives
can be used to create the directory specified by olddir with particular
"mode", "owner" and "group".
- Continue with rotation even when first log from logset is removed
during the rotation.
- Fix crash on BSD systems introduced in 3.8.8 caused by different qsort_r
function. Function qsort is now used instead.
- Fix potential buffer overflow in usage of strncat function.
- Fix compilation with musl-libc.
- Add experimental 'renamecopy' directive to allow 'olddir' on different
physical device. See the "man logrotate" for more information.
3.8.7 -> 3.8.8
- Add support for building using autotools/automake. Using "./autogen.sh",
"./configure" and "make" is now preferred way how to build logrotate.
Old Makefile remains available, but it is deprecated and will be removed
in the future. Please report any problem related to new build system.
- Add support for systems which do not support fork (use vfork instead)
and madvise.
- Fix bug when wrong log file has been removed in case of dateext and
dateformat %d-%m-%Y.
- Do not expect that the name of root account is 'root'.
- Do not stop rotation with an error when olddir and log file
are on different devices and copy or copytruncate is used.
- Return an error code when parent directory of log does not exist,
"su" directive is not used, logrotate is running as root and missingok
is not specified. [vcizek]
- Prepend error printed by compression program with the log name even when
the compression program exits with zero exit code.
3.8.6 -> 3.8.7
- Fixed --force/-f option handling together with "size" directive
(3.8.5 regression).
......
......@@ -2,25 +2,22 @@ The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code
2. Type `make' to compile the package.
2. Configure logrotate using `./autogen.sh' and `./configure'.
3. Optionally, type `make test' to run any self-tests that come with
3. Type `make' to compile the package.
4. Optionally, type `make test' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
5. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
6. You can remove the program binaries and object files from the
source code directory by typing `make clean'.
If you want to add the Access Control List (ACL) support to the program
use `make WITH_ACL=yes' at the point 2 and `make test WITH_ACL=yes' at
the point 3.
use `./configure --with-acl=yes' at the point 2.
If you want to add the NSA Security-Enhanced Linux (SELinux) support to
the program use `make WITH_SELINUX=yes' at the point 2.
If you want to add both the ACL and SELinux supports to the program use
`make WITH_ACL=yes WITH_SELINUX=yes' at the point 2 and
`make test WITH_ACL=yes' at the point 3.
the program use `./configure --with-selinux=yes' at the point 2.
VERSION = $(shell awk '/Version:/ { print $$2 }' logrotate.spec)
OS_NAME = $(shell uname -s)
LFS = $(shell echo `getconf LFS_CFLAGS 2>/dev/null`)
CFLAGS = -Wall -D_GNU_SOURCE -D$(OS_NAME) -DVERSION=\"$(VERSION)\" $(RPM_OPT_FLAGS) $(LFS)
CFLAGS = -Wall -D_GNU_SOURCE -D$(OS_NAME) -DVERSION=\"$(VERSION)\" -DHAVE_STRPTIME=1 -DHAVE_QSORT -DHAVE_STRUCT_STAT_ST_BLOCKS -DHAVE_STRUCT_STAT_ST_BLKSIZE $(RPM_OPT_FLAGS) $(LFS)
PROG = logrotate
MAN = logrotate.8
MAN5 = logrotate.conf.5
......@@ -114,7 +114,14 @@ endif
RCSVERSION = $(subst .,-,$(VERSION))
all: $(TARGET) pretest
all: show_warning $(TARGET) pretest
show_warning:
@echo ""
@echo "Building using this Makefile is DEPRECATED."
@echo "Use './autogen.sh', './configure' and 'make' instead."
@echo "Some new features will not be enabled when building using this Makefile."
@echo ""
$(PROG): $(OBJS)
......
MAN = logrotate.8
MAN5 = logrotate.conf.5
AM_CFLAGS = -Wall -Werror
sbin_PROGRAMS = logrotate
logrotate_SOURCES = logrotate.c log.c config.c basenames.c
install-data-local:
$(AM_V_at)$(INSTALL) -d $(DESTDIR)$(mandir)/man8
$(AM_V_at)$(INSTALL) -d $(DESTDIR)$(mandir)/man5
$(AM_V_at)$(INSTALL) -m 644 @srcdir@/logrotate.8 $(DESTDIR)$(mandir)/man8
$(AM_V_at)$(INSTALL) -m 644 @srcdir@/logrotate.conf.5 $(DESTDIR)$(mandir)/man5
uninstall-local:
$(AM_V_at)rm -f $(DESTDIR)$(mandir)/man8/logrotate.8
$(AM_V_at)rm -f $(DESTDIR)$(mandir)/man5/logrotate.conf.5
SUBDIRS = test
This diff is collapsed.
This diff is collapsed.
AC_INIT([logrotate],[3.9.1])
AM_INIT_AUTOMAKE
AC_DEFINE(_GNU_SOURCE)
AM_EXTRA_RECURSIVE_TARGETS([test])
AC_PROG_CC
AC_PROG_CC_STDC
AC_STRUCT_ST_BLKSIZE
AC_STRUCT_ST_BLOCKS
AC_CHECK_LIB([popt],[poptParseArgvString],,
AC_MSG_ERROR([libpopt required but not found]))
AC_ARG_WITH([selinux],
[AS_HELP_STRING([--with-selinux],
[support handling SELinux contexts (yes,no,check) @<:@default=check@:>@])],
[],
[with_selinux=check])
AS_CASE(["$with_selinux"],
[yes], [AC_CHECK_LIB([selinux],[getfscreatecon_raw])],
[no], [],
[AC_CHECK_LIB([selinux],[getfscreatecon_raw])])
AS_IF([test "$ac_cv_lib_selinux_getfscreatecon_raw" = yes],
echo "1" > ./test/test.SELINUX;, echo "0" > ./test/test.SELINUX;)
AC_ARG_WITH([acl],
[AS_HELP_STRING([--with-acl],
[support handling ACL (yes,no,check) @<:@default=check@:>@])],
[],
[with_acl=check])
AS_CASE(["$with_acl"],
[yes], [AC_CHECK_LIB([acl],[acl_get_file])],
[no], [],
[AC_CHECK_LIB([acl],[acl_get_file])])
AS_IF([test "$ac_cv_lib_acl_acl_get_file" = yes],
echo "1" > ./test/test.ACL;, echo "0" > ./test/test.ACL;)
AC_CHECK_FUNCS([strptime qsort fork vfork madvise])
AC_CONFIG_FILES([Makefile test/Makefile])
AC_OUTPUT
logrotate (3.8.7-2.1) unstable; urgency=medium
logrotate (3.9.1-1~exp1) experimental; urgency=medium
* Non-maintainer upload.
* Recommend bsd-mailx | mailx instead of just mailx (mailx provided by
mailutils pulls in python 2.7 into the standard packages).
Closes: #849743.
-- Matthias Klose <doko@debian.org> Tue, 03 Jan 2017 07:45:27 +0100
* New upstream release
- Change in build system requires autoconf/autotools.
- Unfortunately it doesn't clean up correctly, so have
to add some files to debian/clean.
* Patches changed:
- manpage.patch: Most corrections adopted upstream.
* Patches dropped:
- mktime-718332.patch: Adopted upstream.
- man-su-explanation-729315.patch: Adopted upstream.
- cpp-crossbuild.patch: Upstream has moved to autoconf.
* Patches added:
- remove-makefile.patch: Make build system clean for source
format 3.0 (quilt), as upstream have left original Makefile
in tarball.
-- Paul Martin <pm@debian.org> Mon, 24 Aug 2015 16:02:17 +0100
logrotate (3.8.7-2) unstable; urgency=low
......
Makefile
aclocal.m4
AUTHORS
ChangeLog
compile
configure
depcomp
install-sh
Makefile.in
missing
NEWS
README
test/Makefile.in
test/test.example
test/test.ACL
test/test.SELINUX
......@@ -3,7 +3,8 @@ Section: admin
Priority: important
Maintainer: Paul Martin <pm@debian.org>
Build-Depends: libpopt-dev, debhelper (>= 9),
libselinux1-dev [linux-any], libacl1-dev [linux-any]
libselinux1-dev [linux-any], libacl1-dev [linux-any],
autoconf, automake, libtool
Vcs-Svn: http://svn.fedorahosted.org/svn/logrotate/
Homepage: https://fedorahosted.org/logrotate/
Standards-Version: 3.9.6
......@@ -12,7 +13,7 @@ Package: logrotate
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, cron | anacron | cron-daemon, base-passwd (>= 2.0.3.4)
Breaks: postgresql-common (<= 126)
Recommends: bsd-mailx | mailx
Recommends: mailx
Description: Log rotation utility
The logrotate utility is designed to simplify the administration of
log files on a system which generates a lot of log files. Logrotate
......
Index: logrotate-3.7.9/config.c
===================================================================
--- logrotate-3.7.9.orig/config.c 2011-06-22 15:40:42.727459027 +0100
+++ logrotate-3.7.9/config.c 2011-06-22 15:50:46.047374110 +0100
@@ -165,7 +165,7 @@
static int checkFile(const char *fname)
{
int i;
- char pattern[PATH_MAX];
+ char *pattern;
/* Check if fname is '.' or '..'; if so, return false */
if (fname[0] == '.' && (!fname[1] || (fname[1] == '.' && !fname[2])))
@@ -173,15 +173,17 @@
/* Check if fname is ending in a taboo-extension; if so, return false */
for (i = 0; i < tabooCount; i++) {
- snprintf(pattern, sizeof(pattern), "*%s", tabooExts[i]);
+ asprintf(&pattern, "*%s", tabooExts[i]);
if (!fnmatch(pattern, fname, 0))
{
message(MESS_DEBUG, "Ignoring %s, because of %s ending\n",
fname, tabooExts[i]);
+ free(pattern);
return 0;
}
}
+ free(pattern);
/* All checks have been passed; return true */
return 1;
}
Index: logrotate-3.8.5/logrotate.c
Index: logrotate-3.9.1/logrotate.c
===================================================================
--- logrotate-3.8.5.orig/logrotate.c 2013-06-26 22:17:20.821656206 +0100
+++ logrotate-3.8.5/logrotate.c 2013-06-26 22:17:20.817656132 +0100
@@ -314,8 +314,12 @@
--- logrotate-3.9.1.orig/logrotate.c 2015-08-24 14:40:38.162011596 +0100
+++ logrotate-3.9.1/logrotate.c 2015-08-24 14:40:38.162011596 +0100
@@ -381,8 +381,12 @@
if (fchmod(fd, (S_IRUSR | S_IWUSR) & sb->st_mode)) {
message(MESS_ERROR, "error setting mode of %s: %s\n",
fileName, strerror(errno));
......
# Loosens the config syntax checking to allow more flexibility.
# (Closes: #95617,#95630)
Index: logrotate-3.8.3/config.c
===================================================================
--- logrotate-3.8.3.orig/config.c 2012-10-15 14:18:29.117724327 +0100
+++ logrotate-3.8.3/config.c 2012-10-15 14:18:32.089780981 +0100
@@ -1110,7 +1110,7 @@
while (*endtag) {
chptr = endtag;
- while (!isspace(*chptr) && *chptr != ',' && *chptr)
+ while (!isspace(*chptr) && /* *chptr != ',' && */ *chptr)
chptr++;
tabooExts = realloc(tabooExts, sizeof(*tabooExts) *
@@ -1122,8 +1122,10 @@
tabooCount++;
endtag = chptr;
+ /*
if (*endtag == ',')
- start++;
+ endtag++;
+ */
while (isspace(*endtag) && *endtag)
endtag++;
}
......@@ -6,11 +6,11 @@ dpkg-cross sets CPP variable, and compilation failures, because
the executable 'cpp' does not accept multiple input files.
Index: logrotate-3.8.5/Makefile
Index: logrotate-3.9.1/Makefile
===================================================================
--- logrotate-3.8.5.orig/Makefile 2013-06-26 22:15:57.859971822 +0100
+++ logrotate-3.8.5/Makefile 2013-06-26 22:15:57.855971737 +0100
@@ -123,7 +123,7 @@
--- logrotate-3.9.1.orig/Makefile 2015-08-24 14:35:57.564545385 +0100
+++ logrotate-3.9.1/Makefile 2015-08-24 14:35:57.560545307 +0100
@@ -130,7 +130,7 @@
rm -f ./test/test.ACL ./test/test.SELINUX ./test/error.log
depend:
......
Close #388608.
In the extremely unlikely event that a log file to be rotated is going
to be created group readable or writable, and the current group of the
to-be-truncated logfile or the current user's group (for creation of the
new logfile) is not the intended one, guard against the logfile being
briefly readable or writable by the current user's group, or the group
the logfile already had (and probably will have after the operation).
Thanks to Florian Zumbiehl <florz@gmx.de> for being zealously persistent.
Index: logrotate-3.7.9/logrotate.c
===================================================================
--- logrotate-3.7.9.orig/logrotate.c 2011-06-22 15:15:29.087530649 +0100
+++ logrotate-3.7.9/logrotate.c 2011-06-22 15:15:37.963764798 +0100
@@ -233,7 +233,7 @@
{
int fd;
- fd = open(fileName, flags, sb->st_mode);
+ fd = open(fileName, flags, (S_IRUSR | S_IWUSR) & sb->st_mode);
if (fd < 0) {
message(MESS_ERROR, "error creating output file %s: %s\n",
fileName, strerror(errno));
No longer consider state file dates before 1996 as fatal errors.
(Closes: #65534)
Index: logrotate-3.8.6/logrotate.c
Index: logrotate-3.9.1/logrotate.c
===================================================================
--- logrotate-3.8.6.orig/logrotate.c 2013-09-03 21:55:00.397439117 +0100
+++ logrotate-3.8.6/logrotate.c 2013-09-03 21:55:00.393439028 +0100
@@ -2045,7 +2045,7 @@
--- logrotate-3.9.1.orig/logrotate.c 2015-08-24 14:12:54.981672928 +0100
+++ logrotate-3.9.1/logrotate.c 2015-08-24 14:12:54.977672850 +0100
@@ -2334,7 +2334,7 @@
}
/* Hack to hide earlier bug */
......
Fix location of killall in the examples. (Closes: #189243)
--- /home/pm/deb/logrotate/logrotate-3.7/logrotate.8 2004-02-11 21:18:23.000000000 +0000
+++ logrotate-3.7/logrotate.8 2004-02-11 21:18:54.000000000 +0000
@@ -83,7 +83,7 @@
rotate 5
weekly
postrotate
- /sbin/killall -HUP syslogd
+ /usr/bin/killall -HUP syslogd
endscript
}
@@ -93,7 +93,7 @@
size=100k
sharedscripts
postrotate
- /sbin/killall -HUP httpd
+ /usr/bin/killall -HUP httpd
endscript
}
Index: logrotate-3.7.8/logrotate.8
===================================================================
--- logrotate-3.7.8.orig/logrotate.8 2010-05-03 12:25:04.013761517 +0200
+++ logrotate-3.7.8/logrotate.8 2010-05-03 13:38:33.861513873 +0200
@@ -222,6 +222,11 @@
The default value is -%Y%m%d. Note that also the character separating log
name from the extension is part of the dateformat string. The system clock
must be set past Sep 9th 2001 for %s to work correctly.
+Note that the datestamps generated by this format must be lexically sortable
+(i.e., first the year, then the month then the day. e.g., 2001/12/01 is ok,
+but 01/12/2001 is not, since 01/11/2002 would sort lower while it is later).
+This is because when using the \fBrotate\fR option, logrotate sorts all
+rotated filenames to find out which logfiles are older and should be removed.
.TP
\fBdelaycompress\fR
Fix manpage typo (Closes: #310337)
Index: logrotate-3.7.7/logrotate.8
===================================================================
--- logrotate-3.7.7.orig/logrotate.8 2008-11-07 01:32:45.079556409 +0000
+++ logrotate-3.7.7/logrotate.8 2008-11-07 01:33:47.551555931 +0000
@@ -358,7 +358,7 @@
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
Fix manpage typo in the size example.
--- /home/pm/deb/logrotate/logrotate-3.7/logrotate.8 2004-09-13 22:50:08.000000000 +0100
+++ logrotate-3.7/logrotate.8 2004-09-13 22:50:25.000000000 +0100
@@ -90,7 +90,7 @@
"/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
Index: logrotate-3.8.6/logrotate.8
===================================================================
--- logrotate-3.8.6.orig/logrotate.8 2013-09-03 21:55:05.305538834 +0100
+++ logrotate-3.8.6/logrotate.8 2013-11-19 00:04:51.095192999 +0000
@@ -503,7 +503,10 @@
\fBsu \fIuser\fR \fIgroup\fR
Rotate log files set under this user and group instead of using default
user/group (usually root). \fIuser\fR specifies the user name used for
-rotation and \fIgroup\fR specifies the group used for rotation.
+rotation and \fIgroup\fR specifies the group used for rotation. If the
+user/group you specify here does not have sufficient privilege to make
+files with the ownership you've specified in a \fIcreate\fR instruction,
+it will cause an error.
.TP
\fBtabooext\fR [+] \fIlist\fR
......@@ -4,22 +4,11 @@ Patches from: J S Bygott <jsb_no_spm@jsbygott.fsnet.co.uk>
General fixes to manpages.
Index: logrotate-3.8.5/logrotate.8
Index: logrotate-3.9.1/logrotate.8
===================================================================
--- logrotate-3.8.5.orig/logrotate.8 2013-06-26 22:06:31.660308056 +0100
+++ logrotate-3.8.5/logrotate.8 2013-06-26 22:14:03.333646535 +0100
@@ -11,8 +11,8 @@
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 criterion for that log is
-based on the log's size and \fBlogrotate\fR is being run multiple times
+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
@@ -52,22 +52,22 @@
--- logrotate-3.9.1.orig/logrotate.8 2015-04-03 08:39:35.000000000 +0100
+++ logrotate-3.9.1/logrotate.8 2015-08-24 14:31:54.451811627 +0100
@@ -58,21 +58,21 @@
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
......@@ -40,46 +29,11 @@ Index: logrotate-3.8.5/logrotate.8
.TP
-+\fB\-v\fR, \fB\-\-verbose\fR
-Turns on verbose mode.
+\fB\-v\fR, \fB\-\-verbose\fR
+Turns on verbose mode, ie. display messages during rotation.
Turns on verbose mode, ie. display messages during rotation.
.SH CONFIGURATION FILE
@@ -119,9 +119,9 @@
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
@@ -129,14 +129,15 @@
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 it grows over 100k in size, and the old logs
+Each is rotated whenever it grows over 100k in size, and the old logs
files are mailed (uncompressed) to www@my.org after going through 5
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 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 \\ characters supported.
+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
+characters supported.
The next 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
@@ -151,6 +152,10 @@
@@ -158,6 +158,10 @@
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).
......@@ -90,67 +44,7 @@ Index: logrotate-3.8.5/logrotate.8
Here is more information on the directives which may be included in
a \fBlogrotate\fR configuration file:
@@ -162,12 +167,12 @@
.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
@@ -194,7 +199,7 @@
.TP
\fBcopytruncate\fR
-Truncate the original log file in place after creating a copy,
+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.
@@ -254,7 +259,7 @@
.TP
\fBextension \fIext\fR
Log files with \fIext\fR extension can keep it after the rotation.
-If compression is used, the compression extension (normally \fB.gz\fR)
+If compression is used, the compression extension (normally \fI.gz\fR)
appears after \fIext\fR. For example you have a logfile named mylog.foo
and want to rotate it to mylog.1.foo.gz instead of mylog.foo.1.gz.
@@ -281,7 +286,7 @@
.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.
@@ -361,7 +366,7 @@
.TP
\fBnomail\fR
-Don't mail old log files to any address.
+Do not mail old log files to any address.
.TP
\fBnomissingok\fR
@@ -369,7 +374,7 @@
.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
@@ -532,12 +537,15 @@
@@ -566,7 +570,8 @@
.SH SEE ALSO
.BR gzip (1)
......@@ -160,10 +54,9 @@ Index: logrotate-3.8.5/logrotate.8
.SH AUTHORS
.nf
Erik Troan, Preston Brown, Jan Kaluza.
@@ -575,4 +580,5 @@
<logrotate-owner@fedoraproject.org>
+<http://fedorahosted.org/logrotate/>
<http://fedorahosted.org/logrotate/>
+Corrections and changes for Debian by Paul Martin <pm@debian.org>
.fi
Index: logrotate-3.8.6/logrotate.c
===================================================================
--- logrotate-3.8.6.orig/logrotate.c 2013-09-03 21:55:08.153596707 +0100
+++ logrotate-3.8.6/logrotate.c 2013-09-03 22:10:40.012851906 +0100
@@ -2114,12 +2114,14 @@
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);
Index: logrotate-3.7.9/logrotate.c
===================================================================
--- logrotate-3.7.9.orig/logrotate.c 2011-06-22 15:15:37.000000000 +0100
+++ logrotate-3.7.9/logrotate.c 2011-06-22 15:20:33.987573622 +0100
@@ -343,7 +343,7 @@
compressedName = alloca(strlen(name) + strlen(log->compress_ext) + 2);
sprintf(compressedName, "%s%s", name, log->compress_ext);
- if ((inFile = open(name, O_RDONLY)) < 0) {
+ if ((inFile = open(name, O_RDONLY | O_NOFOLLOW)) < 0) {
message(MESS_ERROR, "unable to open %s for compression\n", name);
return 1;
}
@@ -396,7 +396,7 @@
char *mailArgv[] = { mailCommand, "-s", subject, address, NULL };
int rc = 0;
- if ((mailInput = open(logFile, O_RDONLY)) < 0) {
+ if ((mailInput = open(logFile, O_RDONLY | O_NOFOLLOW)) < 0) {
message(MESS_ERROR, "failed to open %s for mailing: %s\n", logFile,
strerror(errno));
return 1;
@@ -487,7 +487,7 @@
message(MESS_DEBUG, "copying %s to %s\n", currLog, saveLog);
if (!debug) {
- if ((fdcurr = open(currLog, (flags & LOG_FLAG_COPY) ? O_RDONLY : O_RDWR)) < 0) {
+ if ((fdcurr = open(currLog, ((flags & LOG_FLAG_COPY) ? O_RDONLY : O_RDWR) | O_NOFOLLOW)) < 0) {
message(MESS_ERROR, "error opening %s: %s\n", currLog,
strerror(errno));
return 1;
@@ -1074,7 +1074,7 @@
security_context_t oldContext = NULL;
int fdcurr = -1;
- if ((fdcurr = open(log->files[logNum], O_RDWR)) < 0) {
+ if ((fdcurr = open(log->files[logNum], O_RDWR | O_NOFOLLOW)) < 0) {
message(MESS_ERROR, "error opening %s: %s\n",
log->files[logNum],
strerror(errno));
Index: logrotate-3.9.1/Makefile
===================================================================
--- logrotate-3.9.1.orig/Makefile 2015-08-24 15:42:37.300831259 +0100
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,189 +0,0 @@
-VERSION = $(shell awk '/Version:/ { print $$2 }' logrotate.spec)
-OS_NAME = $(shell uname -s)
-LFS = $(shell echo `getconf LFS_CFLAGS 2>/dev/null`)
-CFLAGS = -Wall -D_GNU_SOURCE -D$(OS_NAME) -DVERSION=\"$(VERSION)\" -DHAVE_STRPTIME=1 -DHAVE_QSORT -DHAVE_STRUCT_STAT_ST_BLOCKS -DHAVE_STRUCT_STAT_ST_BLKSIZE $(RPM_OPT_FLAGS) $(LFS)
-PROG = logrotate
-MAN = logrotate.8
-MAN5 = logrotate.conf.5
-LOADLIBES = -lpopt
-SVNURL= svn+ssh://svn.fedorahosted.org/svn/logrotate
-SVNPUBURL = http://svn.fedorahosted.org/svn/logrotate
-SVNTAG = r$(subst .,-,$(VERSION))
-
-ifeq ($(WITH_SELINUX),yes)
-CFLAGS += -DWITH_SELINUX
-LOADLIBES += -lselinux
-# See pretest
-TEST_SELINUX=1
-else
-# See pretest
-TEST_SELINUX=0
-endif
-
-ifeq ($(WITH_ACL),yes)
-CFLAGS += -DWITH_ACL
-LOADLIBES += -lacl
-# See pretest
-TEST_ACL=1
-else
-# See pretest
-TEST_ACL=0
-endif
-
-# HP-UX using GCC
-ifeq ($(OS_NAME),HP-UX)
- ifeq ($(RPM_OPT_FLAGS),)
- RPM_OPT_FLAGS = -O2
- endif
- CC = gcc
- INSTALL = cpset
- ifeq ($(POPT_DIR),)
- POPT_DIR = /usr/local
- endif
- ifeq ($(HPLX_DIR),)
- HPLX_DIR = /usr/local/hplx
- endif
- LOADLIBES += -lhplx -L$(HPLX_DIR)/lib
- ifeq ($(BASEDIR),)
- BASEDIR = /usr/local
- endif
-endif
-
-# Solaris using gcc
-ifeq ($(OS_NAME),SunOS)
- CFLAGS = -D_GNU_SOURCE -D$(OS_NAME) -DVERSION=\"$(VERSION)\" $(RPM_OPT_FLAGS) $(LFS)
- CC ?= gcc
- CPP = $(CC) -E -M
- INSTALL = /usr/ucb/install
- ifeq ($(CC),cc)
- CPP = cc -xM
- endif
- BASEDIR ?= /usr/local
-endif
-
-# Red Hat Linux
-ifeq ($(OS_NAME),Linux)
- INSTALL = install
- BASEDIR = /usr
-endif
-