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

Bug#282306: apache.postinst doesn't handle include for directories



Package: apache
Version: 1.3.26-0woody6
Severity: normal

apache.postinst does some magic with "Check for log files." to warn
about adjusting logrotate if logs are outside /var/log/apache

        echo Apache has switched to using logrotate.  However, some of your logs
        echo are stored outside the /var/log/apache directory, so you should
        echo edit /etc/logrotate.d/apache to have them automatically rotated.

The awk command fails because the code assumes if there is an Include
in the httpd.conf, it must be a file. However a directory is legal there.

Include /etc/apache/vhost

is a convenient directory to put, appropriately named, per domain conf files.

Not only did awk fail but apt-get didn't notice. I do log access outside
of /var/log/apache and I do pipe errors to an external program for
processing. I don't think any of this is terribly unusual.

Also is it normal to just "rm -f /etc/cron.daily/apache"??? what if
that etc file was modified for the site? I wonder what will become of
/etc/cron.daily/apache-perl?

I removed /etc/rc*.d/*apache files, but they have been recreated for an
upgrade. Why?

(Also, though my installation is very different than a typical debian
install, it is designed to be compatible, SIGUSR1 or "apachectl
graceful" works fine, however this upgrade broke the running apache
on my test box -- just means I need to killall apache and restart.
And stop it first before I upgrade in production. Had I modified
/etc/init.d/apache who's to say it wasn't overwritten?)

All in all, the apache.postinst file seems very delicately balanced
to support (and only support) a complex set of requirements. Is the
supported spec defined anywhere? Such a spec would go a long way on
qa.debian.org.

The awk error doesn't cause me any problems but this does

   /etc/init.d/apache restart || true

please change to 

   /etc/init.d/apache reload || true

in the mean time I'll remember to "chmod 0 /etc/init.d/package" whenever
I "update -f package remove"

Here is my (sanitized) upgrade output.


Setting up apache-common (1.3.26-0woody6) ...

Setting up apache (1.3.26-0woody6) ...
awk: read error (Is a directory)
awk: read error (Is a directory)
Reloading apache modulesProcessing config directory: /etc/apache/vhost
 Processing config file: /etc/apache/vhost/dom1.conf
 Processing config file: /etc/apache/vhost/dom2.conf
 Processing config file: /etc/apache/vhost/dom3.conf
 Processing config file: /etc/apache/vhost/dom4.conf
 Processing config file: /etc/apache/vhost/dom5.conf
 Processing config file: /etc/apache/vhost/dom6.conf
 Processing config file: /etc/apache/vhost/dom7.conf
 Processing config file: /etc/apache/vhost/dom8.conf
 Processing config file: /etc/apache/vhost/dom9.conf
 Processing config file: /etc/apache/vhost/dom0.conf
 Processing config file: /etc/apache/vhost/doma.conf
 Processing config file: /etc/apache/vhost/domb.conf
 Processing config file: /etc/apache/vhost/domc.conf
.




// George

-- 
George Georgalis, systems architect, administrator Linux BSD IXOYE
http://galis.org/george/ cell:646-331-2027 mailto:george@galis.org



Reply to: