SHA256
1
0
forked from pool/logrotate

- Version update to 3.10.0:

* Update url to point to github
- Remove upstreamed patch:
  * logrotate-3.7.8-mess_err.patch
- Rebase patches:
  * logrotate-3.7.8-suse.patch
  * logrotate-addextension.patch
  * logrotate-autoext.patch
  * logrotate-fix-test62_with_bash-4.4.patch

OBS-URL: https://build.opensuse.org/package/show/Base:System/logrotate?expand=0&rev=48
This commit is contained in:
Tomáš Chvátal 2016-10-05 11:39:50 +00:00 committed by Git OBS Bridge
parent e408d24b71
commit 841db056ae
9 changed files with 66 additions and 66 deletions

3
logrotate-3.10.0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:15a5d4db53cec8f8e0561e88a0d8ee737a45dee1aba280c6e75f92950ca9306c
size 127492

View File

@ -1,13 +0,0 @@
Index: logrotate.c
===================================================================
--- logrotate.c.orig 2013-07-25 14:52:57.493518089 +0200
+++ logrotate.c 2013-07-25 14:52:57.499518158 +0200
@@ -1327,7 +1327,7 @@ int prerotateSingleLog(struct logInfo *l
message(MESS_FATAL, "could not allocate destFile memory\n");
}
if (!stat(destFile, &fst_buf)) {
- message(MESS_DEBUG,
+ message(MESS_ERROR,
"destination %s already exists, skipping rotation\n",
rotNames->firstRotated);
hasErrors = 1;

View File

@ -1,16 +1,3 @@
Index: Makefile
===================================================================
--- Makefile.orig
+++ Makefile
@@ -81,7 +81,7 @@ ifneq ($(STATEFILE),)
endif
BINDIR = $(BASEDIR)/sbin
-MANDIR ?= $(BASEDIR)/man
+MANDIR ?= $(BASEDIR)/share/man
#--------------------------------------------------------------------------
Index: examples/logrotate.cron Index: examples/logrotate.cron
=================================================================== ===================================================================
--- examples/logrotate.cron.orig --- examples/logrotate.cron.orig

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:022769e3288c80981559a8421703c88e8438b447235e36dd3c8e97cd94c52545
size 79061

View File

@ -2,9 +2,9 @@ Index: test/test
=================================================================== ===================================================================
--- test/test.orig --- test/test.orig
+++ test/test +++ test/test
@@ -1599,4 +1599,27 @@ test.log 0 @@ -1746,5 +1746,28 @@ EOF
test.log.1 0 zero rm -rf testdir adir
EOF rm -rf testdir bdir
+# check rotation with extension appended to the filename +# check rotation with extension appended to the filename
+cleanup 100 +cleanup 100
@ -30,6 +30,7 @@ Index: test/test
+ +
+ +
cleanup cleanup
Index: config.c Index: config.c
=================================================================== ===================================================================
--- config.c.orig --- config.c.orig
@ -42,7 +43,7 @@ Index: config.c
.compress_prog = NULL, .compress_prog = NULL,
.uncompress_prog = NULL, .uncompress_prog = NULL,
.compress_ext = NULL, .compress_ext = NULL,
@@ -1220,6 +1221,19 @@ static int readConfigFile(const char *co @@ -1224,6 +1225,19 @@ static int readConfigFile(const char *co
message(MESS_DEBUG, "extension is now %s\n", message(MESS_DEBUG, "extension is now %s\n",
newlog->extension); newlog->extension);
@ -66,7 +67,7 @@ Index: logrotate.8
=================================================================== ===================================================================
--- logrotate.8.orig --- logrotate.8.orig
+++ logrotate.8 +++ logrotate.8
@@ -283,6 +283,15 @@ configured to be run by cron daily. You @@ -284,6 +284,15 @@ configured to be run by cron daily. You
and run \fIlogrotate\fR hourly to be able to really rotate logs hourly. and run \fIlogrotate\fR hourly to be able to really rotate logs hourly.
.TP .TP
@ -86,7 +87,7 @@ Index: logrotate.c
=================================================================== ===================================================================
--- logrotate.c.orig --- logrotate.c.orig
+++ logrotate.c +++ logrotate.c
@@ -1216,6 +1216,24 @@ int prerotateSingleLog(struct logInfo *l @@ -1219,6 +1219,24 @@ int prerotateSingleLog(struct logInfo *l
rotNames->baseName = strdup(ourBaseName(log->files[logNum])); rotNames->baseName = strdup(ourBaseName(log->files[logNum]));

View File

@ -1,8 +1,8 @@
Index: config.c Index: config.c
=================================================================== ===================================================================
--- config.c.orig 2013-06-10 14:02:36.000000000 +0200 --- config.c.orig
+++ config.c 2013-07-25 15:42:42.465060702 +0200 +++ config.c
@@ -712,6 +712,7 @@ @@ -716,6 +716,7 @@ static int readConfigFile(const char *co
char **scriptDest = NULL; char **scriptDest = NULL;
struct logInfo *newlog = defConfig; struct logInfo *newlog = defConfig;
char *start, *chptr; char *start, *chptr;
@ -10,7 +10,7 @@ Index: config.c
char *dirName; char *dirName;
struct passwd *pw = NULL; struct passwd *pw = NULL;
int rc; int rc;
@@ -1245,6 +1246,20 @@ static int readConfigFile(const char *co @@ -1242,6 +1243,20 @@ static int readConfigFile(const char *co
message(MESS_DEBUG, "compress_prog is now %s\n", message(MESS_DEBUG, "compress_prog is now %s\n",
newlog->compress_prog); newlog->compress_prog);
@ -33,9 +33,9 @@ Index: config.c
Index: logrotate.c Index: logrotate.c
=================================================================== ===================================================================
--- logrotate.c.orig 2013-06-10 14:02:36.000000000 +0200 --- logrotate.c.orig
+++ logrotate.c 2013-07-25 15:30:36.687434418 +0200 +++ logrotate.c
@@ -85,6 +85,16 @@ unsigned int hashSize; @@ -104,6 +104,16 @@ unsigned int hashSize;
int numLogs = 0; int numLogs = 0;
int debug = 0; int debug = 0;
char *mailCommand = DEFAULT_MAIL_COMMAND; char *mailCommand = DEFAULT_MAIL_COMMAND;
@ -54,9 +54,9 @@ Index: logrotate.c
static gid_t save_egid; static gid_t save_egid;
Index: logrotate.h Index: logrotate.h
=================================================================== ===================================================================
--- logrotate.h.orig 2013-06-10 14:02:36.000000000 +0200 --- logrotate.h.orig
+++ logrotate.h 2013-07-25 15:30:36.687434418 +0200 +++ logrotate.h
@@ -66,6 +66,9 @@ TAILQ_HEAD(logInfoHead, logInfo) logs; @@ -79,6 +79,9 @@ TAILQ_HEAD(logInfoHead, logInfo) logs;
extern int numLogs; extern int numLogs;
extern int debug; extern int debug;
@ -68,9 +68,9 @@ Index: logrotate.h
int asprintf(char **string_ptr, const char *format, ...); int asprintf(char **string_ptr, const char *format, ...);
Index: test/test Index: test/test
=================================================================== ===================================================================
--- test/test.orig 2013-07-25 15:30:36.687434418 +0200 --- test/test.orig
+++ test/test 2013-07-25 16:16:11.992044805 +0200 +++ test/test
@@ -536,19 +536,6 @@ checkoutput <<EOF @@ -577,32 +577,6 @@ checkoutput <<EOF
test.log 0 zero test.log 0 zero
EOF EOF
@ -78,7 +78,7 @@ Index: test/test
- -
-# ------------------------------- Test 18 ------------------------------------ -# ------------------------------- Test 18 ------------------------------------
-preptest test.log 18 1 -preptest test.log 18 1
-$RLR test-config.18 --force -$RLR test-config.18 -l syslog --force
- -
-checkoutput <<EOF -checkoutput <<EOF
-test.log 0 -test.log 0
@ -86,6 +86,19 @@ Index: test/test
-EOF -EOF
- -
-(echo "gzip -f -9") | diff -u - compress-args -(echo "gzip -f -9") | diff -u - compress-args
-egrep -q '^LOGROTATE_COMPRESSED_FILENAME=.+/test/test.log.1$' compress-env
-if [ $? != 0 ]; then
- echo "LOGROTATE_COMPRESSED_FILENAME environment variable not found."
- cat compress-env++ exit 3
-fi
-
-if [ $SYSLOG_TESTS = 1 ]; then
- journalctl -n 50 2>/dev/null|grep $PWD/test.log.1 2>/dev/null >/dev/null
- if [ $? != 0 ]; then
- echo "syslog message not found"
- exit 1
- fi
-fi
- -
cleanup 19 cleanup 19

View File

@ -14,12 +14,12 @@ a variable. The result is the same.
test/test | 2 +- test/test | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
Index: logrotate-3.9.1/test/test Index: logrotate-3.10.0/test/test
=================================================================== ===================================================================
--- logrotate-3.9.1.orig/test/test --- logrotate-3.10.0.orig/test/test
+++ logrotate-3.9.1/test/test +++ logrotate-3.10.0/test/test
@@ -167,7 +167,7 @@ checkoutput() { @@ -183,7 +183,7 @@ checkoutput() {
if [ -n "$co_compressed" -a "$co_compressed" != 0 ]; then if [ -n "$co_compressed" ] && [ "$co_compressed" != 0 ]; then
contents=`gunzip -c $file` contents=`gunzip -c $file`
else else
- contents=`cat $file` - contents=`cat $file`

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Wed Oct 5 11:38:13 UTC 2016 - tchvatal@suse.com
- Version update to 3.10.0:
* Update url to point to github
- Remove upstreamed patch:
* logrotate-3.7.8-mess_err.patch
- Rebase patches:
* logrotate-3.7.8-suse.patch
* logrotate-addextension.patch
* logrotate-autoext.patch
* logrotate-fix-test62_with_bash-4.4.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Oct 3 14:46:34 UTC 2016 - dimstar@opensuse.org Mon Oct 3 14:46:34 UTC 2016 - dimstar@opensuse.org

View File

@ -17,13 +17,13 @@
Name: logrotate Name: logrotate
Version: 3.9.1 Version: 3.10.0
Release: 0 Release: 0
Summary: Rotate, compress, remove, and mail system log files Summary: Rotate, compress, remove, and mail system log files
License: GPL-2.0+ License: GPL-2.0+
Group: System/Base Group: System/Base
Url: https://fedorahosted.org/releases/l/o/logrotate Url: https://github.com/logrotate/logrotate
Source: https://fedorahosted.org/releases/l/o/%{name}/%{name}-%{version}.tar.gz Source0: https://github.com/logrotate/logrotate/releases/download/%{version}/logrotate-%{version}.tar.xz
Source100: %{name}-rpmlintrc Source100: %{name}-rpmlintrc
Source101: %{name}.service Source101: %{name}.service
Source102: %{name}.timer Source102: %{name}.timer
@ -31,13 +31,13 @@ Patch0: logrotate-3.7.8-suse.patch
Patch1: logrotate-conf.patch Patch1: logrotate-conf.patch
Patch2: logrotate-autoext.patch Patch2: logrotate-autoext.patch
Patch3: logrotate-addextension.patch Patch3: logrotate-addextension.patch
Patch4: logrotate-3.7.8-mess_err.patch
Patch5: logrotate-manpage_config_clarification.patch Patch5: logrotate-manpage_config_clarification.patch
# PATCH-FIX-UPSTREAM logrotate-fix-test62_with_bash-4.4.patch gh#logrotate/logrotate#66 dimstar@opensuse.org -- Fix test suite in combination with bash 4.4 # PATCH-FIX-UPSTREAM logrotate-fix-test62_with_bash-4.4.patch gh#logrotate/logrotate#66 dimstar@opensuse.org -- Fix test suite in combination with bash 4.4
Patch6: logrotate-fix-test62_with_bash-4.4.patch Patch6: logrotate-fix-test62_with_bash-4.4.patch
BuildRequires: acl BuildRequires: acl
BuildRequires: libacl-devel BuildRequires: libacl-devel
BuildRequires: libselinux-devel BuildRequires: libselinux-devel
BuildRequires: pkgconfig
BuildRequires: popt-devel BuildRequires: popt-devel
BuildRequires: pkgconfig(systemd) >= 197 BuildRequires: pkgconfig(systemd) >= 197
Requires: xz Requires: xz
@ -58,26 +58,24 @@ daily cron job.
%patch1 %patch1
%patch2 %patch2
%patch3 %patch3
%patch4
%patch5 -p1 %patch5 -p1
%patch6 -p1 %patch6 -p1
%build %build
make %{?_smp_mflags} CC="gcc" RPM_OPT_FLAGS="%{optflags}" \ %configure
WITH_SELINUX=yes \ make %{?_smp_mflags}
WITH_ACL=yes
%check %check
make %{?_smp_mflags} test make %{?_smp_mflags} check
%install %install
make PREFIX=%{buildroot} install %make_install
mkdir -p %{buildroot}%{_sysconfdir}/{logrotate.d,cron.daily} mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
mkdir -p %{buildroot}%{_prefix}/sbin
install -m 644 examples/logrotate-default %{buildroot}%{_sysconfdir}/logrotate.conf install -m 644 examples/logrotate-default %{buildroot}%{_sysconfdir}/logrotate.conf
install -m 644 examples/logrotate.wtmp %{buildroot}%{_sysconfdir}/logrotate.d/wtmp install -m 644 examples/logrotate.wtmp %{buildroot}%{_sysconfdir}/logrotate.d/wtmp
install -D -m 0644 %{SOURCE101} %{buildroot}%{_unitdir}/%{name}.service install -D -m 0644 %{SOURCE101} %{buildroot}%{_unitdir}/%{name}.service
install -D -m 0644 %{SOURCE102} %{buildroot}%{_unitdir}/%{name}.timer install -D -m 0644 %{SOURCE102} %{buildroot}%{_unitdir}/%{name}.timer
ln -s service %{buildroot}%{_sbindir}/rc%{name}
%pre %pre
#only the timer can be enabled/disabled/masked ! #only the timer can be enabled/disabled/masked !
@ -102,6 +100,7 @@ fi
%defattr(-,root,root) %defattr(-,root,root)
%doc CHANGES COPYING %doc CHANGES COPYING
%{_sbindir}/logrotate %{_sbindir}/logrotate
%{_sbindir}/rc%{name}
%{_mandir}/man8/logrotate.8* %{_mandir}/man8/logrotate.8*
%{_mandir}/man5/logrotate.conf.5* %{_mandir}/man5/logrotate.conf.5*
%config %{_sysconfdir}/logrotate.conf %config %{_sysconfdir}/logrotate.conf