[redeclipse] 355/494: Enable hardening

Martin Werner arand-guest at moszumanska.debian.org
Sun Jun 21 20:52:51 UTC 2015


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

arand-guest pushed a commit to branch debdir
in repository redeclipse.

commit ac385e75b8039d12b73d4b18d38d7f2b7d92c4a1
Author: Martin Erik Werner <martinerikwerner at gmail.com>
Date:   Thu Jun 7 20:37:08 2012 +0200

    Enable hardening
    
    * dh compat level 9
    * Add DEB_BUILD_MAINT_OPTIONS = hardening=+all
    * Added build-with-ldflags.patch:
      Patch which appends $(LDFLAGS) to all end-targets
    * Removed build-with-debug-symbols.patch:
      Now handled in d/rules instead
---
 changelog                              |  8 ++++++++
 compat                                 |  2 +-
 control                                |  2 +-
 patches/build-with-debug-symbols.patch | 16 ----------------
 patches/build-with-ldflags.patch       | 34 ++++++++++++++++++++++++++++++++++
 patches/series                         |  2 +-
 rules                                  |  9 ++++++++-
 7 files changed, 53 insertions(+), 20 deletions(-)

diff --git a/changelog b/changelog
index 740a503..d895149 100644
--- a/changelog
+++ b/changelog
@@ -4,6 +4,14 @@ redeclipse (1.2-3) UNRELEASED; urgency=low
     - libgl1-mesa-dev | libgl-dev
     - libsdl1.2-dev | libsdl-dev
     - lib1g-dev | libz-dev
+  * Enable hardening build flags
+    - dh compat level 9
+    - Add DEB_BUILD_MAINT_OPTIONS = hardening=+all
+    - Added build-with-ldflags.patch:
+      Patch which appends $(LDFLAGS) to all end-targets
+    - Removed build-with-debug-symbols.patch:
+      Now handled in d/rules instead
+
 
  -- Martin Erik Werner <martinerikwerner at gmail.com>  Mon, 27 Feb 2012 13:53:19 +0100
 
diff --git a/compat b/compat
index 45a4fb7..ec63514 100644
--- a/compat
+++ b/compat
@@ -1 +1 @@
-8
+9
diff --git a/control b/control
index c059d2d..0a3856e 100644
--- a/control
+++ b/control
@@ -3,7 +3,7 @@ Section: contrib/games
 Priority: optional
 Uploaders: Martin Erik Werner <martinerikwerner at gmail.com>
 Maintainer: Debian Games Team <pkg-games-devel at lists.alioth.debian.org>
-Build-Depends: debhelper (>= 8),
+Build-Depends: debhelper (>= 9),
                imagemagick,
                libenet-dev,
                liblg1-mesa-dev | libgl-dev,
diff --git a/patches/build-with-debug-symbols.patch b/patches/build-with-debug-symbols.patch
deleted file mode 100644
index bb92ac9..0000000
--- a/patches/build-with-debug-symbols.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Description: Build with debug symbols
- In order to create -dbg packages on Debian we need to build with the debug
- flag.
-Forwarded: not-needed
-Author: Martin Erik Werner <martinerikwerner at gmail.com>
-Last-Update: 2011-12-13
-
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -1,5 +1,5 @@
- #CXXFLAGS= -ggdb3
--CXXFLAGS= -O3 -fomit-frame-pointer
-+CXXFLAGS= -O3 -fomit-frame-pointer -g
- override CXXFLAGS+= -Wall -fsigned-char -fno-exceptions -fno-rtti
- 
- PLATFORM= $(shell uname -s)
diff --git a/patches/build-with-ldflags.patch b/patches/build-with-ldflags.patch
new file mode 100644
index 0000000..f244263
--- /dev/null
+++ b/patches/build-with-ldflags.patch
@@ -0,0 +1,34 @@
+Description: Build with LDFLAGS
+ Append $(LDFLAGS) to client server and cube2font targets.
+Author: Martin Erik Werner <martinerikwerner at gmail.com>
+
+Forwarded: no
+Last-Update: 2012-06-07
+
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -159,13 +159,13 @@
+ endif
+ else
+ client: $(CLIENT_OBJS)
+-	$(CXX) $(CXXFLAGS) -o reclient $(CLIENT_OBJS) $(CLIENT_LIBS)
++	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o reclient $(CLIENT_OBJS) $(CLIENT_LIBS)
+ ifneq (,$(STRIP))
+ 	$(STRIP) reclient
+ endif
+ 
+ server: $(SERVER_OBJS)
+-	$(CXX) $(CXXFLAGS) -o reserver $(SERVER_OBJS) $(SERVER_LIBS)
++	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o reserver $(SERVER_OBJS) $(SERVER_LIBS)
+ ifneq (,$(STRIP))
+ 	$(STRIP) reserver
+ endif
+@@ -182,7 +182,7 @@
+ 	$(CXX) $(CXXFLAGS) -c -o $@ $< `freetype-config --cflags`
+ 
+ cube2font: shared/cube2font.o
+-	$(CXX) $(CXXFLAGS) -o cube2font shared/cube2font.o `freetype-config --libs` -lz -lpng
++	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o cube2font shared/cube2font.o `freetype-config --libs` -lz -lpng
+ 
+ install-cube2font: cube2font
+ 	install -d ../bin
diff --git a/patches/series b/patches/series
index 96b12ab..15b0306 100644
--- a/patches/series
+++ b/patches/series
@@ -1,4 +1,4 @@
 windowed-by-default.patch
-build-with-debug-symbols.patch
 build-with-system-enet.patch
 backported-fix-icon-sizes.patch
+build-with-ldflags.patch
diff --git a/rules b/rules
index 6fdb698..b800c70 100755
--- a/rules
+++ b/rules
@@ -1,5 +1,7 @@
 #!/usr/bin/make -f
 
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
 %:
 	dh $@ --sourcedirectory=src
 
@@ -7,7 +9,12 @@ override_dh_auto_clean:
 	dh_auto_clean
 
 override_dh_auto_build:
-	dh_auto_build -- client server icons
+	dh_auto_build -- \
+		CPPFLAGS="$(CPPFLAGS)" \
+		CFLAGS="$(CFLAGS)" \
+		CXXFLAGS="$(CXXFLAGS)" \
+		LDFLAGS="$(LDFLAGS)" \
+		client server icons
 
 override_dh_strip:
 	dh_strip -predeclipse --dbg-package=redeclipse-dbg

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/redeclipse.git



More information about the Pkg-games-commits mailing list