Bug 150741 - builddeb fails with xargs error
Summary: builddeb fails with xargs error
Status: NEW
Alias: None
Product: Other
Classification: Unclassified
Component: Other (show other bugs)
Hardware: ARM Linux
: P1 normal
Assignee: other_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-30 06:54 UTC by Pierre Gaufillet
Modified: 2016-07-30 06:55 UTC (History)
0 users

See Also:
Kernel Version: 4.7
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Pierre Gaufillet 2016-07-30 06:54:51 UTC
Building the kernel packages for debian on armhf with make deb-pkg fails for some configurations with error:

/usr/bin/xargs: md5sum: Argument list too long
[...]/scripts/package/Makefile:90: recipe for target 'deb-pkg' failed
make[1]: *** [deb-pkg] Error 126
Makefile:1163: recipe for target 'deb-pkg' failed
make: *** [deb-pkg] Error 2

It can be fixed in scripts/package/builddeb with something like:

--- linux-org/scripts/package/builddeb	2015-03-24 10:11:29.000000000 +0100
+++ linux-new/scripts/package/builddeb	2016-07-30 08:42:11.112361239 +0200
@@ -18,8 +18,8 @@
 	cp debian/copyright "$pdir/usr/share/doc/$pname/"
 	cp debian/changelog "$pdir/usr/share/doc/$pname/changelog.Debian"
 	gzip -9 "$pdir/usr/share/doc/$pname/changelog.Debian"
-	sh -c "cd '$pdir'; find . -type f ! -path './DEBIAN/*' -printf '%P\0' \
-		| xargs -r0 md5sum > DEBIAN/md5sums"
+	sh -c "cd '$pdir'; find . -type f ! -path './DEBIAN/*' -exec md5sum '{}' ';' \
+		| sed -re 's:^([0-9a-f][0-9a-f]*  )./:\1:' > DEBIAN/md5sums"
 
 	# Fix ownership and permissions
 	chown -R root:root "$pdir"

Note You need to log in before you can comment on or make changes to this bug.