Bug#985054: coturn: fails to purge: rmdir: failed to remove '/var/lib/turn': No such file or directory
Andreas Beckmann
anbe at debian.org
Mon Mar 22 09:38:50 GMT 2021
On 21/03/2021 18.59, wferi at niif.hu wrote:
> wferi at niif.hu writes:
>
>> Andreas Beckmann <anbe at debian.org> writes:
>>
>>> According to policy 7.2 you cannot rely on the depends being available
>>> during purge, only the essential packages are available for sure.
>>
>> I can't see coturn rely on any of its dependencies during purge, do you?
>
> Hi Andreas,
>
> Have you got anything to add here?
No. In the past, a common error causing failure to purge was
unconditionally using some command provided by the package dependencies
and the template was coined for that. (We even have more specific
templates for unconditional ucf and adduser usage, not needed for years.)
>>> (this was observed in a piuparts nodocs test)
>>
>> Could you please explain to me what a "nodocs" test is?
>
> I read through the Salsa repo, I get it now.
>
>> Since the postinst creates /var/lib/turn/turndb if it doesn't exist,
>> I've got no idea how /var/lib/turn can be missing during purge.
>
> Now I understand: it's created only if the needed schema file is
> present. Unfortunately it's used from under /usr/share/doc. I'll
> upload a fix shortly.
That's something I haven't come across so far ;-) (Conditional usage of
/usr/share/doc content in postinst, unconditional usage of the generated
side effect in postrm purge.)
Please move the bits needed by the package out of /usr/share/doc/$pkg to
/usr/share/$pkg and use it from there.
Andreas
PS: for your reference, this is the template we use for packages failing
to access /usr/share/doc content in nodocs tests:
To: submit at bugs.debian.org
Subject: postinst uses /usr/share/doc content (Policy 12.3):
Package:
Version:
Severity: serious
User: debian-qa at lists.debian.org
Usertags: piuparts
Hi,
a test with piuparts revealed that your package uses files from
/usr/share/doc in its maintainer scripts which is a violation of
Policy 12.3: "Packages must not require the existence of any files in
/usr/share/doc/ in order to function."
https://www.debian.org/doc/debian-policy/ch-docs.html#additional-documentation
These files must be moved to /usr/share/$PACKAGE and may be symlinked
from /usr/share/doc/$PACKAGE.
This piuparts test prevents the installation of (most) files into
/usr/share/doc with 'dpkg --path-exclude=...'.
From the attached log (scroll to the bottom...):
Cheers,
More information about the Pkg-voip-maintainers
mailing list