Bug#793862: apache2: purging deletes directory co-owned by apache2-bin: /var/lib/apache2/

2015-07-28 Thread Andreas Beckmann
Package: apache2.2-common
Version: 2.4.12-2
Severity: serious
User: debian...@lists.debian.org
Usertags: piuparts

Hi,

during a test with piuparts I noticed your package removes files that
were installed by another package.
The removed files were already present before the package was installed,
they may have been shipped or created by a dependency.

This could be a violation of policy 10.7.4 (Sharing configuration
files), see
https://www.debian.org/doc/debian-policy/ch-files.html#s10.7.4
or policy chapter 6 (Package maintainer scripts...), see
https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html
or policy 7.6 (Overwriting files...), see
https://www.debian.org/doc/debian-policy/ch-relationships.html#s-replaces

If a directory is used by several packages, all should ship it as part
of the package (possibly empty, using $package.dirs to create it), and
no package should mkdir/rmdir it in the maintainer scripts as dpkg will
take care of this.

From the attached log (scroll to the bottom...):

0m54.3s ERROR: FAIL: After purging files have disappeared:
  /var/lib/apache2/  owned by: apache2, apache2-bin


cheers,

Andreas


apache2.log.gz
Description: application/gzip


Bug#793862: apache2: purging deletes directory co-owned by apache2-bin: /var/lib/apache2/

2015-07-28 Thread Jean-Michel Vourgère
Control: reassign -1 apache2 2.4.12-2

The problem is not in apache2.2-common that doesn't exists any more, at
least not in that version, but in apache2.postrm that basically does on
purge:
rm -rf /var/lib/apache2

while apache2-bin.postrm does:
rm -f /var/lib/apache2/deferred_actions

Both packages have /var/lib/apache2 in their .dirs file.

One solution would be to have apache2.postrm purge only remove these
sub-directories:
/var/lib/apache2/conf
/var/lib/apache2/module
/var/lib/apache2/site

On the other hand, apache2 package contains the
apache2-maintscript-helper, the a2enmod-like helpers, the init.d
scripts, so I'm not sure it make sense to have any thing in
/var/lib/apache2 handled by apache2-bin. Maybe the deferred_actions
handling should be fully done by apache2, and /var/lib/apache2 removed
from package apache2-bin.dirs.
The deferred_actions are processed by apache2 any ways, not by apache2-bin.

-- 
Nirgal


-- 
To UNSUBSCRIBE, email to debian-apache-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/55b7ff9e.2040...@debian.org