Comment 2 for bug 314411

Revision history for this message
Christian Hudon (chrish) wrote : Re: [Bug 314411] Re: logrotate cron spams when only apache2.2-common installed

Andreas Olsson wrote:
> How did you manage to have the packaget manager remove /var/log/apache2
> without touching /etc/logrotate.d/apache2? The only way I've managed to
> get apt to remove /var/log/apache2 is by purging apache2.2-common, and
> that also removes /etc/logrotate.d/apache2.
>
> Was it a fresh install of Hardy, or was it an upgrade from a previous
> Ubuntu version? Do you remember which Apache2 packets you had installed;
> what MPM?
>
It's not a fresh install. It was updated from dapper. Here's my guess at
what happened. You can tell me if it makes sense.

I installed libapache2-something-dev at some point on that machine to
compile an apache module (which was to be installed on other machines).
That -dev package pulled in the apache2-common package. No apache server
was every installed on that machine. Some time later, I remove (not
purge) these packages. When the -common package is being removed, the
/var/log/apache2 directory goes away without problems since there are no
files in it (because no apache web server ever run on that machine), but
the /etc/logrotate.d/apache2 stays (because it is a conffile).

I *think* that's how it happened, but I think the bug should still be
fixed irrespective of that. It's the right thing to do for conffiles
that are executed (logrotate stuff, init.d stuff, crontab entries, etc.)
to check that their package hasn't been removed before doing their thing.

Thanks,

  Christian