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
commit cde96eec47692bf0053b4b1903ae7f04b902b34d Author: Ivo De Decker <ivo.dedec...@ugent.be> Date: Sun Dec 23 18:45:49 2012 +0100 On purge, only remove files from samba4, not from samba-common. diff --git a/debian/changelog b/debian/changelog index 6b28d56..1257cdf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +samba4 (4.0.0~beta2+dfsg1-4~t1) UNRELEASED; urgency=low + + * Team upload. + * On purge, only remove files from samba4, not from samba-common. + Closes: #696149 + + -- Ivo De Decker <ivo.dedec...@ugent.be> Sun, 23 Dec 2012 18:44:53 +0100 + samba4 (4.0.0~beta2+dfsg1-3) unstable; urgency=low * Fix setup when no domain is set. Closes: #681048 diff --git a/debian/samba4.postrm b/debian/samba4.postrm index 32d775e..9aab373 100644 --- a/debian/samba4.postrm +++ b/debian/samba4.postrm @@ -5,10 +5,17 @@ set -e if [ "$1" = purge ]; then # Remove Samba's state files, both volatile and non-volatile - rm -Rf /var/run/samba/ /var/cache/samba/ /var/lib/samba + rm -Rf /var/lib/samba/private + rm -Rf /var/lib/samba/sysvol + rm -Rf /var/lib/samba/winbindd_privileged + + rm -Rf /var/run/samba/ncalrpc + rm -Rf /var/run/samba/ntp_signd + rm -Rf /var/run/samba/upgrades + rm -Rf /var/run/samba/winbindd - # Remove log files - rm -Rf /var/log/samba/ + # Remove log file + rm -f /var/log/samba/log.%m if [ -e /usr/share/debconf/confmodule ]; then . /usr/share/debconf/confmodule