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

Jelmer Vernooij jelmer at debian.org
Mon Dec 24 13:11:37 UTC 2012


Hi Ivo,

On Sun, 2012-12-23 at 21:21 +0100, Ivo De Decker wrote:
> 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.
Thanks!

> 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).
I would argue that this is in fact a bug in samba-common; we'll have
this problem as well when we merge the samba and samba4 source packages.
Please file a bug about this.

> - 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).
I guess purge should ideally remove these 2 parameters again; they are
only used by Samba 4. I'm not entirely sure about the shares.

That said, this problem will go away when we merge the samba and samba4
source packages so I'm not sure if it is worth spending much time on,
unless it is for wheezy.

Cheers,

Jelmer



More information about the Pkg-samba-maint mailing list