[Pkg-samba-maint] Bug#696149: samba4: deletes directories owned by samba-common during purge: /var/{cache, lib, log}/samba

Ivo De Decker ivo.dedecker at ugent.be
Sun Dec 23 20:21:38 UTC 2012


Hi Jelmer,

On Mon, Dec 17, 2012 at 11:45:48AM +0100, Andreas Beckmann wrote:
> >>From the attached log (scroll to the bottom...):
> 
> 0m48.7s ERROR: FAIL: After purging files have disappeared:
>   /var/cache/samba/	 owned by: samba4-common-bin, samba-common
>   /var/lib/samba/	 owned by: samba4, samba-common
>   /var/log/samba/	 owned by: samba-common
> 
> In this test only the samba4 package was purged, all dependencies are
> still installed.
> 
> samba4.postrm purge performs:
> 
>         # Remove Samba's state files, both volatile and non-volatile
>         rm -Rf /var/run/samba/ /var/cache/samba/ /var/lib/samba
> 
>         # Remove log files
>         rm -Rf /var/log/samba/
> 
> (the debconf db_purge is run twice, there is no need to add this
> manually to the maintainer script as dh_installdebconf already adds it)

I had a look at the samba4 package in wheezy, and tried to solve this bug by
limiting the removal to files that are created by samba4 (not by other
samba related packages).

A patch that implements this is attached. With this patch, samba4 doesn't hit
the piuparts issues listed above.

However, I encountered 2 issues:

- samba4 logs to /var/log/samba/log.%m

The removal of this file is easy to solve, but I can't imagine the name of
this logfile is intentional. Obviously this is the result of changes in samba4
(it seems %m is sadly no longer allowed in logfile names).

- the piuparts log also complains about:
  0m48.7s ERROR: FAIL: After purging files have been modified:
    /etc/samba/smb.conf    not owned

Samba4 changes smb.conf (adds 2 parameters and 2 shares), but smb.conf is
owned by samba-common, not by samba4. Maybe this should be solved in
samba-common by allowing other packages to add config files (this is more or
less what was asked in #675906).

Cheers,

Ivo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: samba4_696149.diff
Type: text/x-diff
Size: 1441 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-samba-maint/attachments/20121223/7daba57e/attachment.diff>


More information about the Pkg-samba-maint mailing list