On 2014-12-13, Andreas Beckmann wrote:
> 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.
...
>   Removing groonga-server-common (4.0.6.1-2) ...
>   Purging configuration files for groonga-server-common (4.0.6.1-2) ...
> 0m24.4s ERROR: FAIL: debsums reports modifications inside the chroot:
>   debsums: missing file /etc/groonga/groonga.conf (from groonga-bin package)
>   debsums: missing file /etc/groonga/synonyms.tsv (from libgroonga0:amd64 
> package)
>
>
> I didn't check, but there is probably a rm -rf /etc/groonga in the postrm.

Yes, this appears to be what's happening...

groonga-server-common.postrm:

    for target in /var/run/groonga /var/lib/groonga /var/log/groonga 
/etc/groonga
    do
        dpkg-statoverride --remove $target
        rm -rf $target
    done

groonga-server-common doesn't appear to ship any files in /etc/groonga,
or create them in the .postinst. Though dpkg-statoverride appears to be
used in order to set the group and user permissions:

    for target in /var/run/groonga /var/lib/groonga /etc/groonga 
/var/log/groonga
    do
        dpkg-statoverride --list $target >/dev/null || \
            dpkg-statoverride --update --add groonga groonga 0755 $target
    done


Similar code is present in groonga-httpd.postrm and
groonga-httpd.postinst in the same source package, so that may need to
be fixed in groonga-httpd as well (though I'm unsure if any other
packages ship files in there currently, it seems like it could have the
same issue in the future).


I'm not familiar with groonga, but it seems unecessary to remove
/etc/groonga (and /etc/groonga/httpd) manually on purge, as dpkg should
take care of that when the directories are empty.


live well,
  vagrant

Attachment: signature.asc
Description: PGP signature

Reply via email to