]> ruderich.org/simon Gitweb - blhc/blhc.git/blobdiff - bin/blhc
Fix false positive in non-verbose check for python setuptools
[blhc/blhc.git] / bin / blhc
index d9a3bb252b330db2ba43a90a883670b8de4e4581..0892cad25e345f0c830c58a929b4b54ebbac73f3 100755 (executable)
--- a/bin/blhc
+++ b/bin/blhc
@@ -2,7 +2,7 @@
 
 # Build log hardening check, checks build logs for missing hardening flags.
 
-# Copyright (C) 2012-2018  Simon Ruderich
+# Copyright (C) 2012-2019  Simon Ruderich
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -545,6 +545,7 @@ sub is_non_verbose_build {
     return 0 if $line =~ /^\s*C\+\+ Library: stdc\+\+$/;
     # "Compiling" non binary files.
     return 0 if $line =~ /^\s*Compiling \S+\.(?:py|el)['"]?\s*(?:\.\.\.)?$/;
+    return 0 if $line =~ /^\s*[Cc]ompiling catalog \S+\.po\b/;
     # "Compiling" with no file name.
     if ($line =~ /^\s*[Cc]ompiling\s+(.+?)(?:\.\.\.)?$/) {
         # $file_extension_regex may need spaces around the filename.
@@ -683,7 +684,7 @@ if ($option_help) {
 }
 if ($option_version) {
     print <<"EOF";
-blhc $VERSION  Copyright (C) 2012-2018  Simon Ruderich
+blhc $VERSION  Copyright (C) 2012-2019  Simon Ruderich
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -954,6 +955,10 @@ foreach my $file (@ARGV) {
 
         # 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
 
@@ -1117,7 +1122,7 @@ foreach my $file (@ARGV) {
 
     # Option or auto detected.
     if ($arch) {
-        # The following was partially copied from dpkg-dev 1.19.5
+        # The following was partially copied from dpkg-dev 1.19.7
         # (/usr/share/perl5/Dpkg/Vendor/Debian.pm, _add_build_flags()),
         # copyright RaphaĆ«l Hertzog <hertzog@debian.org>, Guillem Jover
         # <guillem@debian.org>, Kees Cook <kees@debian.org>, Canonical, Ltd.
@@ -1775,7 +1780,7 @@ E<lt>jari.aalto@cante.netE<gt> for their valuable input and suggestions.
 
 =head1 LICENSE AND COPYRIGHT
 
-Copyright (C) 2012-2018 by Simon Ruderich
+Copyright (C) 2012-2019 by Simon Ruderich
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by