Package: ruby1.9.1 Version: 1.9.3.0-2 Severity: important Tags: patch Please enable hardened build flags through dpkg-buildflags.
Patch attached. cdbs exports hardened build flags since 0.4.106, but an additional changes is needed to not overwrite CFLAGS and CXXFLAGS. (dpkg-buildflags abides "noopt" from DEB_BUILD_OPTIONS) Cheers, Moritz
diff -aur ruby1.9.1-1.9.3.0.harden/debian/control ruby1.9.1-1.9.3.0/debian/control --- ruby1.9.1-1.9.3.0.harden/debian/control 2011-10-18 18:53:33.000000000 +0200 +++ ruby1.9.1-1.9.3.0/debian/control 2012-04-07 19:35:16.000000000 +0200 @@ -3,7 +3,7 @@ Priority: optional Maintainer: akira yamada <ak...@debian.org> Uploaders: Daigo Moriwaki <da...@debian.org>, Lucas Nussbaum <lu...@debian.org> -Build-Depends: debhelper (>= 8.9.7), cdbs, quilt, patch, autoconf, m4, bison, libgdbm-dev, libncursesw5-dev, libncurses5-dev, libreadline6-dev, tcl-dev, tk-dev, zlib1g-dev, libssl-dev, procps, file, libffi-dev, ruby1.8, libyaml-dev, openssl +Build-Depends: debhelper (>= 8.9.7), cdbs (>= 0.4.106), quilt, patch, autoconf, m4, bison, libgdbm-dev, libncursesw5-dev, libncurses5-dev, libreadline6-dev, tcl-dev, tk-dev, zlib1g-dev, libssl-dev, procps, file, libffi-dev, ruby1.8, libyaml-dev, openssl Standards-Version: 3.9.2 Homepage: http://www.ruby-lang.org/ Vcs-Git: git://git.debian.org/collab-maint/ruby1.9.1.git Nur in ruby1.9.1-1.9.3.0/debian: control~. diff -aur ruby1.9.1-1.9.3.0.harden/debian/rules ruby1.9.1-1.9.3.0/debian/rules --- ruby1.9.1-1.9.3.0.harden/debian/rules 2011-12-19 21:18:45.000000000 +0100 +++ ruby1.9.1-1.9.3.0/debian/rules 2012-04-07 19:35:41.000000000 +0200 @@ -32,13 +32,8 @@ DEB_AUTO_UPDATE_AUTOCONF = YES -CFLAGS := -fno-strict-aliasing -g -CXXFLAGS := -fno-strict-aliasing -g -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -g -O0 -else - CFLAGS += -g -O2 -endif +CFLAGS += -fno-strict-aliasing +CXXFLAGS += -fno-strict-aliasing # Renesas SH(sh4) needs -mieee option. #591785 ifeq (sh4,$(shell dpkg-architecture -qDEB_HOST_ARCH)) Nur in ruby1.9.1-1.9.3.0/debian: rules~.