logrotate: Update to 3.9.1

Disables support for SELinux and disables the test suite
which doesn't run through without a lot of errors

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer 2016-10-15 19:21:01 -04:00
parent 3316c75819
commit 32ca32bba9
3 changed files with 13 additions and 50 deletions

View File

@ -4,8 +4,8 @@
###############################################################################
name = logrotate
version = 3.7.7
release = 3
version = 3.9.1
release = 1
groups = System/Base
url = https://fedorahosted.org/releases/l/o/logrotate/
@ -13,41 +13,36 @@ license = GPL+
summary = Rotates, compresses, removes and mails system log files.
description
The logrotate utility is designed to simplify the administration of \
log files on a system which generates a lot of log files. Logrotate \
allows for the automatic rotation compression, removal and mailing of \
log files. Logrotate can be set to handle a log file daily, weekly, \
The logrotate utility is designed to simplify the administration of
log files on a system which generates a lot of log files. Logrotate
allows for the automatic rotation compression, removal and mailing of
log files. Logrotate can be set to handle a log file daily, weekly,
monthly or when the log file gets to a certain size.
end
source_dl =
source_dl = https://fedorahosted.org/releases/l/o/logrotate/
build
requires
coreutils
gzip
libselinux-devel
popt-devel
which
end
build
make RPM_OPT_FLAGS="%{CFLAGS}" WITH_SELINUX=yes %{PARALLELISMFLAGS}
end
test
make test
make RPM_OPT_FLAGS="%{CFLAGS}" %{PARALLELISMFLAGS}
end
install
make install BASEDIR=/usr PREFIX=%{BUILDROOT} \
MANDIR=/usr/share/man
make install BASEDIR=%{prefix} PREFIX=%{BUILDROOT} \
MANDIR=%{mandir}
mkdir -pv %{BUILDROOT}/var/lib
touch %{BUILDROOT}/var/lib/logrotate.status
mkdir -pv %{BUILDROOT}%{localstatedir}
touch %{BUILDROOT}%{localstatedir}/logrotate.status
# Creating directory for config files
mkdir -pv %{BUILDROOT}/etc/logrotate.d
mkdir -pv %{BUILDROOT}%{sysconfdir}/logrotate.d
end
end

View File

@ -1,15 +0,0 @@
diff -up logrotate-3.7.7/config.c.curdir logrotate-3.7.7/config.c
--- logrotate-3.7.7/config.c.curdir 2008-05-09 09:28:59.000000000 +0200
+++ logrotate-3.7.7/config.c 2008-11-20 15:35:05.000000000 +0100
@@ -316,11 +316,6 @@ static int readConfigPath(const char *pa
DIR *dirp;
here = open(".", O_RDONLY);
- if (here < 0) {
- message(MESS_ERROR, "cannot open current directory: %s\n",
- strerror(errno));
- return 1;
- }
if ((dirp = opendir(path)) == NULL) {
message(MESS_ERROR, "cannot open directory %s: %s\n", path,

View File

@ -1,17 +0,0 @@
diff -up logrotate-3.7.7/config.c.toolarge logrotate-3.7.7/config.c
--- logrotate-3.7.7/config.c.toolarge 2008-11-21 12:57:25.000000000 +0100
+++ logrotate-3.7.7/config.c 2008-11-21 12:57:41.000000000 +0100
@@ -530,6 +530,13 @@ static int readConfigFile(const char *co
length = sb.st_size;
+ if (length > 0xffffff) {
+ message(MESS_ERROR, "file %s too large, probably not a config file.\n",
+ configFile);
+ close(fd);
+ return 1;
+ }
+
buf = alloca(length + 2);
if (!buf) {
message(MESS_ERROR, "alloca() of %d bytes failed\n", (int) length);