[dpkg] 15/192: Dpkg::Vendor::Ubuntu: Remove obsolete hardening-wrapper support

Ximin Luo infinity0 at debian.org
Tue Oct 17 11:03:52 UTC 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch pu/reproducible_builds
in repository dpkg.

commit d62520090a7dafb123b6f1f4d4e9b61b75218057
Author: Adam Conrad <adconrad at 0c3.net>
Date:   Wed Apr 26 03:09:37 2017 +0200

    Dpkg::Vendor::Ubuntu: Remove obsolete hardening-wrapper support
    
    Signed-off-by: Guillem Jover <guillem at debian.org>
---
 debian/changelog              |  3 +++
 scripts/Dpkg/Vendor/Ubuntu.pm | 37 -------------------------------------
 2 files changed, 3 insertions(+), 37 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 043fa8f..864441c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,9 @@ dpkg (1.18.24) UNRELEASED; urgency=medium
   * Architecture support:
     - Add support for ARM64 ILP32. Closes: #824742
       Thanks to Wookey <wookey at wookware.org>.
+  * Perl modules:
+    - Remove obsolete hardening-wrapper support from Dpkg::Vendor::Ubuntu.
+      Thanks to Adam Conrad <adconrad at 0c3.net>.
   * Documentation:
     - Many spelling fixes. Thanks to Josh Soref <jsoref at gmail.com>.
     - Do not include mispellings in changelogs, as that makes detecting them
diff --git a/scripts/Dpkg/Vendor/Ubuntu.pm b/scripts/Dpkg/Vendor/Ubuntu.pm
index 4ea197a..477b8ae 100644
--- a/scripts/Dpkg/Vendor/Ubuntu.pm
+++ b/scripts/Dpkg/Vendor/Ubuntu.pm
@@ -115,43 +115,6 @@ sub run_hook {
 
 	# Run the Debian hook to add hardening flags
 	$self->SUPER::run_hook($hook, $flags);
-
-	# Allow control of hardening-wrapper via dpkg-buildpackage DEB_BUILD_OPTIONS
-	my $hardening;
-	if ($build_opts->has('hardening')) {
-	    $hardening = $build_opts->get('hardening') // 1;
-	}
-	if ($build_opts->has('nohardening')) {
-	    $hardening = 0;
-	}
-	if (defined $hardening) {
-	    my $flag = 'DEB_BUILD_HARDENING';
-	    if ($hardening ne '0') {
-		if (!find_command('hardened-cc')) {
-		    syserr(g_("'hardening' flag found but 'hardening-wrapper' not installed"));
-		}
-		if ($hardening ne '1') {
-		    my @options = split(/,\s*/, $hardening);
-		    $hardening = 1;
-
-		    my @hardopts = qw(format fortify stackprotector pie relro);
-		    foreach my $item (@hardopts) {
-			my $upitem = uc($item);
-			foreach my $option (@options) {
-			    if ($option =~ /^(no)?$item$/) {
-				$flags->set($flag . '_' . $upitem,
-				            not defined $1 or $1 eq '', 'env');
-			    }
-			}
-		    }
-		}
-	    }
-	    if (defined $ENV{$flag}) {
-		info(g_('overriding %s in environment: %s'), $flag, $hardening);
-	    }
-	    $flags->set($flag, $hardening, 'env');
-	}
-
     } else {
         return $self->SUPER::run_hook($hook, @params);
     }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list