diff --git a/logrotate-fix-test62_with_bash-4.4.patch b/logrotate-fix-test62_with_bash-4.4.patch new file mode 100644 index 0000000..09935f2 --- /dev/null +++ b/logrotate-fix-test62_with_bash-4.4.patch @@ -0,0 +1,29 @@ +From 61f22b1eb2bd441bce998240701b0acd03265a47 Mon Sep 17 00:00:00 2001 +From: Dominique Leuenberger +Date: Mon, 3 Oct 2016 16:43:00 +0200 +Subject: [PATCH] Fix test suite in combination with bash 4.4 + +Until bash 4.4, variables were silently stripped of NUL bytes; with Bash 4.4 +this results now for every single 0-byte that is being stripped in a warning: + +./test: line 170: warning: command substitution: ignored null byte in input + +We now simply strip the NUL bytes before we have bash assign the values to +a variable. The result is the same. +--- + test/test | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: logrotate-3.9.1/test/test +=================================================================== +--- logrotate-3.9.1.orig/test/test ++++ logrotate-3.9.1/test/test +@@ -167,7 +167,7 @@ checkoutput() { + if [ -n "$co_compressed" -a "$co_compressed" != 0 ]; then + contents=`gunzip -c $file` + else +- contents=`cat $file` ++ contents=`cat $file | tr -d '\000'` + fi + if [ "$contents" != "$expected" ]; then + echo "file $file does not contain expected results (compressed $co_compressed, args $*)" >&2 diff --git a/logrotate.changes b/logrotate.changes index 1d83c44..edfc120 100644 --- a/logrotate.changes +++ b/logrotate.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Oct 3 14:46:34 UTC 2016 - dimstar@opensuse.org + +- Add logrotate-fix-test62_with_bash-4.4.patch: Fix the test suite + when running with bash 4.4 (gh#logrotate/logrotate#66). + ------------------------------------------------------------------- Mon Jun 22 12:53:44 UTC 2015 - kstreitova@suse.com diff --git a/logrotate.spec b/logrotate.spec index 2bb703c..edc2fff 100644 --- a/logrotate.spec +++ b/logrotate.spec @@ -1,7 +1,7 @@ # # spec file for package logrotate # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -33,6 +33,8 @@ Patch2: logrotate-autoext.patch Patch3: logrotate-addextension.patch Patch4: logrotate-3.7.8-mess_err.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 +Patch6: logrotate-fix-test62_with_bash-4.4.patch BuildRequires: acl BuildRequires: libacl-devel BuildRequires: libselinux-devel @@ -58,6 +60,7 @@ daily cron job. %patch3 %patch4 %patch5 -p1 +%patch6 -p1 %build make %{?_smp_mflags} CC="gcc" RPM_OPT_FLAGS="%{optflags}" \