[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#178288: marked as done (apache-perl: The apache-perl script placed in /etc/cron.daily/ fails to follow includes in included files)



Your message dated Tue, 14 Oct 2003 17:36:56 +0100
with message-id <20031014163656.GX27861@parcelfarce.linux.theplanet.co.uk>
and subject line We use logrotate now
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 24 Jan 2003 23:54:20 +0000
>From asjo@koldfront.dk Fri Jan 24 17:54:20 2003
Return-path: <asjo@koldfront.dk>
Received: from 0x50c70771.adsl-fixed.tele.dk (virgil.koldfront.dk) [80.199.7.113] (foobar)
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 18cDeM-0003O8-00; Fri, 24 Jan 2003 17:54:19 -0600
Received: by virgil.koldfront.dk (Postfix, from userid 1000)
	id 4DA02804480; Sat, 25 Jan 2003 00:54:12 +0100 (CET)
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: =?iso-8859-1?q?Adam_Sj=F8gren?= <asjo@koldfront.dk>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: apache-perl: The apache-perl script placed in /etc/cron.daily/ fails
	to follow includes in included files
X-Mailer: reportbug 2.10
Date: Sat, 25 Jan 2003 00:54:11 +0100
Message-Id: <20030124235412.4DA02804480@virgil.koldfront.dk>
Delivered-To: submit@bugs.debian.org
X-Spam-Status: No, hits=-1.9 required=5.0
	tests=PATCH_UNIFIED_DIFF,SPAM_PHRASE_00_01,SUBJECT_FREQ
	version=2.41
X-Spam-Level: 

Package: apache-perl
Version: 1.3.26-1.1-1.27-3-1
Severity: normal
Tags: patch

The script that the apache-perl package places in /etc/cron.daily/
hunts for *Log-lines in configurations files. However, it only follow
Include-lines one level deep.

I.e. if an Include'd file Includes another file that defines a *Log,
it's not rotated by the script.

The patch included below hopefully remedies this.

Please not that it does not detect Include-loops[1] and I am not very
proficient in sh, so it may not be as pretty as it could or should
be. And to add to that, I haven't tested it extensively either.

[1] I guess Apache itself would complain about such a situation.

Patch:

--- /etc/cron.daily/apache-perl.orig    2003-01-25 00:41:15.000000000 +0100
+++ /etc/cron.daily/apache-perl 2003-01-25 00:35:00.000000000 +0100
@@ -61,8 +61,13 @@
     fi
 
     # This looks for lines in the conf files like: FooLog /some/where
-    CONFS=$(awk '$1 ~ /^\s*[Ii]nclude$/ && $2 ~ /^\// {print $2}' \
-        /etc/apache-perl/*.conf | sort -u)
+    # recursively
+    RCONFS=$(ls /etc/apache-perl/*.conf | sort -u)
+    while [ "$RCONFS" != "" ]; do
+        CONFS="$CONFS $RCONFS"
+        RCONFS=$(awk '$1 ~ /^\s*[Ii]nclude$/ && $2 ~ /^\// {print $2}' \
+            $RCONFS | sort -u)
+    done
     LOGS=$(awk '$1 ~ /^\s*[A-Za-z]*Log$/ && $2 ~ /^\// {print $2}' \
         /etc/apache-perl/*.conf $CONFS | sort -u)
 


-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux virgil 2.4.20-xfs-hfsplus #1 Fri Dec 6 22:41:56 CET 2002 i686
Locale: LANG=C, LC_CTYPE=da_DK

Versions of packages apache-perl depends on:
hi  apache-common                1.3.26-1.1  Support files for all Apache webse
ii  debconf                      1.2.21      Debian configuration management sy
ii  dpkg                         1.10.9      Package maintenance system for Deb
ii  libapache-mod-perl           1.27-3      Integration of perl with the Apach
ii  libc6                        2.3.1-10    GNU C Library: Shared libraries an
ii  libdb2                       2:2.7.7.0-8 The Berkeley database routines (ru
ii  libperl5.8                   5.8.0-15    Shared Perl library.
ii  mime-support                 3.20-1      MIME files 'mime.types' & 'mailcap

-- debconf information:
  apache-perl/old-pidfile-set: 
* apache-perl/upgrade-from-apache-conflict: 


---------------------------------------
Received: (at 170943-close) by bugs.debian.org; 14 Oct 2003 16:36:58 +0000
>From willy@www.linux.org.uk Tue Oct 14 11:36:57 2003
Return-path: <willy@www.linux.org.uk>
Received: from parcelfarce.linux.theplanet.co.uk (www.linux.org.uk) [195.92.249.252] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1A9SAL-0005xo-00; Tue, 14 Oct 2003 11:36:57 -0500
Received: from willy by www.linux.org.uk with local (Exim 4.22)
	id 1A9SAK-00036r-Q2; Tue, 14 Oct 2003 17:36:56 +0100
Date: Tue, 14 Oct 2003 17:36:56 +0100
From: Matthew Wilcox <willy@debian.org>
To: 178288-close@bugs.debian.org, 170943-close@bugs.debian.org
Subject: We use logrotate now
Message-ID: <20031014163656.GX27861@parcelfarce.linux.theplanet.co.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4.1i
Sender: <willy@www.linux.org.uk>
Delivered-To: 170943-close@bugs.debian.org
X-Spam-Status: No, hits=0.0 required=4.0
	tests=none
	version=2.53-bugs.debian.org_2003_10_13
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_10_13 (1.174.2.15-2003-03-30-exp)


These bugs can now be closed since they apply to the old custom apache
rotate scripts and not to the current logrotate style.

-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk



Reply to: