[debhelper-devel] Bug#843163: dpkg: -V fails on files with \ in the name

Guillem Jover guillem at debian.org
Sat Nov 5 02:48:16 UTC 2016


Control: reassign -1 debhelper
Control: affects -1 dpkg debsums

[ Leaving enough context for debhelper maintainers. ]

Hi!

On Fri, 2016-11-04 at 14:14:05 +0100, Bernd Zeimetz wrote:
> Package: dpkg
> Severity: normal
> Version: 1.18.10

> open-vm-tools-desktop contains a systemd mount unit with a maybe unusal
> filename:
> 
> /lib/systemd/system/run-vmblock\x2dfuse.mount
> 
> \x2d is the systemd way to escape characters, see systemd.unit(5):
>        Basically, given a path, "/" is replaced by "-", and
>        all other characters which are not ASCII alphanumerics are
>        replaced by C-style "\x2d" escapes (except that "_" is never
>        replaced and "." is only replaced when it would be the first
>        character in the escaped path).
> 
> dpkg -V fails on that:
> 
> # dpkg -V open-vm-tools-desktop
> dpkg: error: control file 'md5sums' missing value separator
> 
> Reason for that seems to be that md5sum - similar as sha256sum and others,
> seems to start such lines with a \:
> 
> \dde14951417e0e9f73b80f871e6540d1
> lib/systemd/system/run-vmblock\\x2dfuse.mount
> 
> Removing the \ from the beginning of the line make dpkg -V verify the
> package successfull.
> 
> So either dh_md5sums should remove \-es, or dpkg should handle the format
> md5sum produces.

Hmm, this is also not what dpkg will generate when creating md5sums
itself, when the packages does not ship one. Also debsums does not
seem like it handles this weird GNU-specific escaping extension.

I've checked around and other md5sum implementations do not support
this, for example FreeBSD, NetBSD nor Mac OS X. In addition the GNU
md5sum --tag option generates BSD-style output with escaped content
which is not understood by the BSD implementations!

The upcoming dpkg-gendigests command will also not generate those
escaped entries, so IMO debhelper should be fixed to either strip
them, switch to a pure perl implementation, or wait a bit and use
the upcoming dpkg-gendigests command. Meanwhile you could strip
them in the open-vm-tools package debian/rules file.

Thanks,
Guillem



More information about the debhelper-devel mailing list