------------
- Sync architecture specific hardening support with dpkg 1.19.7.
+- Fix architecture detection with recent dpkg-buildpackage versions; reported
+ by Ross Vandegrift, patch from Mathieu Parent (Debian bug #929503).
Version 0.09
# Detect architecture automatically unless overridden.
if (not $arch
+ and index($line, 'dpkg-buildpackage: info: host architecture ') == 0) {
+ $arch = substr $line, 43, -1; # -1 to ignore '\n' at the end
+ # Older versions of dpkg-buildpackage
+ } elsif (not $arch
and index($line, 'dpkg-buildpackage: host architecture ') == 0) {
$arch = substr $line, 37, -1; # -1 to ignore '\n' at the end
--- /dev/null
+dpkg-buildpackage: info: source package test
+dpkg-buildpackage: info: host architecture ia64
+
+gcc -D_FORTIFY_SOURCE=2 -g -O2 -fPIE -Wformat -Wformat-security -Werror=format-security -Wall -c test.c
+gcc -fPIE -pie -o test test.o
use strict;
use warnings;
-use Test::More tests => 236;
+use Test::More tests => 238;
sub is_blhc {
is_blhc 'dpkg-buildpackage-architecture-old', '', 0,
'';
+# architecture in newer buildd logs
+
+is_blhc 'dpkg-buildpackage-architecture-new', '', 0,
+ '';
+
# correct architecture detection