[debhelper-devel] Bug#797742: Bug#797742: debhelper: dh_fixperms and dh_md5sums might run into "/usr/bin/xargs: ... Argument list too long"

Niels Thykier niels at thykier.net
Wed Sep 2 12:10:54 UTC 2015


Control: tags -1 moreinfo

On 2015-09-02 09:38, Tobias Grimm wrote:
> Package: debhelper
> Version: 9.20150101
> Severity: normal
> 
> I'm building packages using cowbuilder/pbuilder. Recently I also do this for
> armhf using qemu. There it happens, that I run into problems with dh_fixperms
> and dh_md5sums for packages with lots of files.
> e.g. one package contains about 1459 files, wich makes an argument list of
> about 140kB. `xargs --show-limits` reports:
> 
> Your environment variables take up 6150 bytes
> POSIX upper limit on argument length (this system): 2088954
> POSIX smallest allowable upper limit on argument length (all systems): 4096
> Maximum length of command we could actually use: 2082804
> Size of command buffer we are actually using: 131072
> 
> ....and dh_md5sums causes a "/usr/bin/xargs: md5sum: Argument list too long"
> 
> To be honest, I couldn't figure out, why this only happens for my armhf builds
> and not for i386 and amd64. `xargs --show-limits` reports always the same
> values.
> 
> But I think at least the xarg-calls for md5sum and chown should be replaced
> with something safer like "xargs -r0 -L10 md5sum" to avoid trouble with
> packages containing a lot of files.
> 
> [...]

Hi Tobias,

I am sorry to hear it does not work for you.

To be honest, I am a bit concerned that xargs cannot figure this out on
armhf.  AFAICT, this sounds like a bug in xargs rather than debhelper.

I am not convinced this is a bug we can solve in debhelper unless we end
up determining that xargs is unreliable and should not be used in
debhelper.  Though in that case, dh_fixperms and dh_md5sums are not the
only helpers that needs to be updated.

~Niels




More information about the debhelper-devel mailing list