t/logs/bad-ldflags
t/logs/bad-library
t/logs/bad-multiline
+t/logs/buildd-architecture
+t/logs/buildd-architecture-old
t/logs/buildd-dpkg-dev
t/logs/buildd-dpkg-dev-missing
t/logs/buildd-dpkg-dev-old
Geyer.
- Fix detection of build dependencies for buildd logs (Debian bug #719656),
reported by Nicolas Boulenguez.
+- Fix buildd architecture detection. Only relevant if the chroot setup fails
+ and dpkg-buildpackage is never run; therefore a minor issue.
- Sync architecture specific hardening support with dpkg 1.17.1.
# only, doesn't use the dpkg-buildpackage header. Necessary to ignore
# build logs which aren't built (wrong architecture, build error,
# etc.).
- if (not $arch and index($line, 'Architecture: ') == 0) {
- $arch = substr $line, 14, -1; # -1 to ignore '\n' at the end
+ if (not $arch) {
+ if (index($line, 'Build Architecture: ') == 0) {
+ $arch = substr $line, 20, -1; # -1 to ignore '\n' at the end
+ # For old logs (sbuild << 0.63.0-1).
+ } elsif (index($line, 'Architecture: ') == 0) {
+ $arch = substr $line, 14, -1; # -1 to ignore '\n' at the end
+ }
}
# dpkg-buildflags only provides hardening flags since 1.16.1, don't
--- /dev/null
+Build Architecture: mipsel
+dpkg-buildpackage: source package test
+
+gcc -g -O2 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test.c
--- /dev/null
+# Old logs used Architecture instead of Build Architecture (sbuild <<
+# 0.63.0-1).
+Architecture: mipsel
+dpkg-buildpackage: source package test
+
+gcc -g -O2 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test.c
-Architecture: i386
+Build Architecture: i386
Toolchain package versions: ... dpkg-dev_1.16.1.2 ...
dpkg-buildpackage: source package test
use strict;
use warnings;
-use Test::More tests => 208;
+use Test::More tests => 212;
sub is_blhc {
'';
+# correct architecture detection
+
+is_blhc 'buildd-architecture', '', 0, '';
+is_blhc 'buildd-architecture-old', '', 0, '';
+
+
# ignore architecture
is_blhc ['arch-avr32', 'arch-i386', 'empty', 'arch-mipsel'],