[apache2] 02/02: Fix split-logfile to work with current perl

Stefan Fritsch sf at moszumanska.debian.org
Sat Nov 28 12:59:45 UTC 2015


This is an automated email from the git hooks/post-receive script.

sf pushed a commit to branch jessie
in repository apache2.

commit 0eade9b91e7a199e81943c4e82c34c3602e8f4f2
Author: Stefan Fritsch <sf at sfritsch.de>
Date:   Sat Nov 28 13:57:17 2015 +0100

    Fix split-logfile to work with current perl
---
 debian/changelog                          |  1 +
 debian/patches/series                     |  1 +
 debian/patches/split_logfile-strict.patch | 34 +++++++++++++++++++++++++++++++
 3 files changed, 36 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 7f06aa0..3c1be82 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ apache2 (2.4.10-10+deb8u4) UNRELEASED; urgency=medium
 
   * Add versioned replaces/breaks for libapache2-mod-macro to apache2,
     for the config files in /etc. Closes: #806326
+  * Fix split-logfile to work with current perl. Closes: #803472
 
  -- Stefan Fritsch <sf at debian.org>  Sat, 28 Nov 2015 13:48:49 +0100
 
diff --git a/debian/patches/series b/debian/patches/series
index 9cd9251..dc0983a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -17,3 +17,4 @@ CVE-2015-3185-ap_some_auth_required.diff
 define_restarts.diff
 mpm_event_graceful_restart_deadlock.diff
 mpm_event_crash.diff
+split_logfile-strict.patch
diff --git a/debian/patches/split_logfile-strict.patch b/debian/patches/split_logfile-strict.patch
new file mode 100644
index 0000000..40c0fb5
--- /dev/null
+++ b/debian/patches/split_logfile-strict.patch
@@ -0,0 +1,34 @@
+# Fix for 'use strict' in current perl versions
+# https://svn.apache.org/viewvc?view=revision&revision=1651095
+--- apache2.orig/support/split-logfile.in
++++ apache2/support/split-logfile.in
+@@ -29,7 +29,7 @@
+ use strict;
+ use warnings;
+ 
+-my %is_open = ();
++my %log_file = ();
+ 
+ while (my $log_line = <STDIN>) {
+     #
+@@ -54,10 +54,9 @@ while (my $log_line = <STDIN>) {
+     # If the log file for this virtual host isn't opened
+     # yet, do it now.
+     #
+-    if (! $is_open{$vhost}) {
+-        open $vhost, ">>${vhost}.log"
++    if (! $log_file{$vhost}) {
++        open $log_file{$vhost}, ">>${vhost}.log"
+             or die ("Can't open ${vhost}.log");
+-        $is_open{$vhost} = 1;
+     }
+     #
+     # Strip off the first token (which may be null in the
+@@ -65,6 +64,6 @@ while (my $log_line = <STDIN>) {
+     # record to the current log file.
+     #
+     $log_line =~ s/^\S*\s+//;
+-    printf $vhost "%s", $log_line;
++    print {$log_file{$vhost}} $log_line;
+ }
+ exit 0;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-apache/apache2.git



More information about the Pkg-apache-commits mailing list