[buildd-tools-devel] Bug#816493: sbuild: stripping quotes from its own perl command

Samuel Thibault sthibault at debian.org
Wed Mar 2 10:40:50 UTC 2016


Source: sbuild
Version: 0.68.0-1
Severity: important

Hello,

I tried to upgrade sbuild on a buildd, and some builds failed with:

W: Stripped single quote from command for security:             use strict;
                use warnings;
                use Dpkg::Arch;
                if (Dpkg::Arch::debarch_is('hurd-i386', 'any')) {
                    exit 0;
                }
                exit 1;

Bareword "hurd" not allowed while "strict subs" in use at -e line 4.
Bareword "i386" not allowed while "strict subs" in use at -e line 4.
Bareword "any" not allowed while "strict subs" in use at -e line 4.
Execution of -e aborted due to compilation errors.

So sbuild stripped the quotes (see get_command_internal function in
ChrootPlain.pm) that it itself introduced (see check_architectures()
function in Build.pm)

I had to use the attached patch to fix the issue.

Samuel

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'oldoldstable'), (500, 'buildd-unstable'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.4.0 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

-- 
Samuel
c> ah (on trouve fluide glacial sur le net, ou il faut aller dans le monde reel ?)
s> dans le monde reel
c> zut
-------------- next part --------------
--- ./lib/Sbuild/Build.pm.original	2016-03-02 11:35:55.854398261 +0100
+++ ./lib/Sbuild/Build.pm	2016-03-02 11:36:04.294413114 +0100
@@ -1181,7 +1181,7 @@
 		use strict;
 		use warnings;
 		use Dpkg::Arch;
-		if (Dpkg::Arch::debarch_is('$host_arch', '$a')) {
+		if (Dpkg::Arch::debarch_is("$host_arch", "$a")) {
 		    exit 0;
 		}
 		exit 1;


More information about the Buildd-tools-devel mailing list