summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Iooss2016-08-16 10:57:34 +0200
committerNicolas Iooss2016-08-16 10:57:34 +0200
commit66be3c6196e1d760338071de1686cc9c0d4c4474 (patch)
treea2632c9e7eea0f301a5d3a97a229226a82740ea4
parent6ae464e8a8873612342de7407b242cf3a6553c7f (diff)
downloadaur-66be3c6196e1d760338071de1686cc9c0d4c4474.tar.gz
logrotate-selinux: backport a commit to fix building with gcc 6
Backport https://github.com/logrotate/logrotate/commit/6a36c105587b07ad14fc937f3ee6e2eb402621a2 Do not bump pkgrel as the package should not need to be rebuilt if it has already been installed.
-rw-r--r--.SRCINFO2
-rw-r--r--0001-fixed-gcc6-warning.patch28
-rw-r--r--PKGBUILD7
3 files changed, 35 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b124fdba20d..4acf487fe8c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -21,11 +21,13 @@ pkgbase = logrotate-selinux
source = logrotate.conf
source = logrotate.timer
source = logrotate.service
+ source = 0001-fixed-gcc6-warning.patch
md5sums = 584bca013dcceeb23b06b27d6d0342fb
md5sums = e76526bcd6fc33c9d921e1cb1eff1ffb
md5sums = 94dae4d3eded2fab9ae879533d3680db
md5sums = 287c2ad9b074cb5478db7692f385827c
md5sums = 85560be5272ed68a88bb77a0a2293369
+ md5sums = 451d761df0b769be0289681a3db5f50d
pkgname = logrotate-selinux
diff --git a/0001-fixed-gcc6-warning.patch b/0001-fixed-gcc6-warning.patch
new file mode 100644
index 00000000000..2b400bda79c
--- /dev/null
+++ b/0001-fixed-gcc6-warning.patch
@@ -0,0 +1,28 @@
+From 6a36c105587b07ad14fc937f3ee6e2eb402621a2 Mon Sep 17 00:00:00 2001
+From: Chris Cromer <cromerc@users.noreply.github.com>
+Date: Tue, 2 Aug 2016 19:17:04 -0400
+Subject: [PATCH 1/1] fixed gcc6 warning
+
+Closes #50
+---
+ logrotate.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/logrotate.c b/logrotate.c
+index d42656a9724b..8a88607bf105 100644
+--- a/logrotate.c
++++ b/logrotate.c
+@@ -1781,8 +1781,9 @@ int postrotateSingleLog(struct logInfo *log, int logNum, struct logState *state,
+ {
+ int hasErrors = 0;
+
+- if (!state->doRotate)
++ if (!state->doRotate) {
+ return 0;
++ }
+
+ if (!hasErrors && log->flags & LOG_FLAG_TMPFILENAME) {
+ char *tmpFilename = NULL;
+--
+2.9.3
+
diff --git a/PKGBUILD b/PKGBUILD
index 15d60fc79d6..5e7aace37cd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -18,17 +18,20 @@ backup=('etc/logrotate.conf')
source=("https://github.com/logrotate/logrotate/archive/${pkgver}.tar.gz"
'paths.patch'
'logrotate.conf'
- logrotate.{timer,service})
+ logrotate.{timer,service}
+ '0001-fixed-gcc6-warning.patch')
md5sums=('584bca013dcceeb23b06b27d6d0342fb'
'e76526bcd6fc33c9d921e1cb1eff1ffb'
'94dae4d3eded2fab9ae879533d3680db'
'287c2ad9b074cb5478db7692f385827c'
- '85560be5272ed68a88bb77a0a2293369')
+ '85560be5272ed68a88bb77a0a2293369'
+ '451d761df0b769be0289681a3db5f50d')
build() {
cd "$srcdir/${pkgname/-selinux}-${pkgver}"
patch -p0 -i "$srcdir/paths.patch"
+ patch -p1 -i "$srcdir/0001-fixed-gcc6-warning.patch"
./autogen.sh
./configure \