[SCM] BOINC packaging branch, sid, updated. debian/7.0.27+dfsg-4-10-g71886c7

Guo Yixuan culu.gyx at gmail.com
Sun Jun 24 14:12:48 UTC 2012


The following commit has been merged in the sid branch:
commit 71886c7a427c632d3ac291e2536bb8ceb85fcfd2
Author: Guo Yixuan <culu.gyx at gmail.com>
Date:   Sun Jun 24 21:49:40 2012 +0800

    add hardening flags to several programs in samples/

diff --git a/debian/changelog b/debian/changelog
index 4663365..ce32703 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,12 @@
 boinc (7.0.27+dfsg-5) UNRELEASED; urgency=low
 
   * debian/rules: use dpkg-buildflags to get default flags.
-  * debian/control: build-depend on dpkg-dev >= 1.16.1.1, because buildflags.mk
-    and DEB_BUILD_MAINT_OPTIONS are needed.
+  * debian/control: build-depend on dpkg-dev >= 1.16.1.1, because
+    buildflags.mk and DEB_BUILD_MAINT_OPTIONS are needed.
+  * debian/patches/add_hardening_flags.patch: pass CXXFLAGS, CPPFLAGS and
+    LDFLAGS to hand-written Makefiles in samples/.
 
- -- Guo Yixuan <culu.gyx at gmail.com>  Sun, 24 Jun 2012 17:18:06 +0800
+ -- Guo Yixuan <culu.gyx at gmail.com>  Sun, 24 Jun 2012 21:46:55 +0800
 
 boinc (7.0.27+dfsg-4) unstable; urgency=low
 
diff --git a/debian/patches/add_hardening_flags.patch b/debian/patches/add_hardening_flags.patch
new file mode 100644
index 0000000..9ec11f0
--- /dev/null
+++ b/debian/patches/add_hardening_flags.patch
@@ -0,0 +1,86 @@
+Author: Guo Yixuan <culu.gyx at gmail.com>
+Description: Add standard flags to custom Makefiles
+ There're several hand-written Makefiles among other Makefiles by automake, they don't take
+ CXXFLAGS and CPPFLAGS from environment.
+Index: boinc/samples/sleeper/Makefile
+===================================================================
+--- boinc.orig/samples/sleeper/Makefile	2012-06-24 21:56:27.000000000 +0800
++++ boinc/samples/sleeper/Makefile	2012-06-24 22:01:09.745618530 +0800
+@@ -4,7 +4,7 @@
+ BOINC_API_DIR = $(BOINC_DIR)/api
+ BOINC_LIB_DIR = $(BOINC_DIR)/lib
+ 
+-CXXFLAGS = -g \
++CXXFLAGS += -g \
+     -I$(BOINC_DIR) \
+     -I$(BOINC_LIB_DIR) \
+     -I$(BOINC_API_DIR) \
+@@ -26,4 +26,4 @@
+ 	/bin/rm -f $(PROGS) *.o libstdc++.a
+ 
+ sleeper: sleeper.o libstdc++.a $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_api.a
+-	g++ $(CXXFLAGS) -o sleeper sleeper.o libstdc++.a -pthread -lboinc_api -lboinc
++	g++ $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o sleeper sleeper.o libstdc++.a -pthread -lboinc_api -lboinc
+Index: boinc/samples/example_app/Makefile
+===================================================================
+--- boinc.orig/samples/example_app/Makefile	2012-06-24 21:56:27.000000000 +0800
++++ boinc/samples/example_app/Makefile	2012-06-24 22:00:45.305617579 +0800
+@@ -4,7 +4,7 @@
+ BOINC_API_DIR = $(BOINC_DIR)/api
+ BOINC_LIB_DIR = $(BOINC_DIR)/lib
+ 
+-CXXFLAGS = -g \
++CXXFLAGS += -g \
+ 	-Wall -W -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -fno-common \
+     -DAPP_GRAPHICS \
+     -I$(BOINC_DIR) \
+@@ -47,12 +47,12 @@
+ # because otherwise you might get a version in /usr/lib etc.
+ 
+ uc2: uc2.o libstdc++.a $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a
+-	$(CXX) $(CXXFLAGS) -o uc2 uc2.o libstdc++.a -pthread \
++	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o uc2 uc2.o libstdc++.a -pthread \
+ 	$(BOINC_API_DIR)/libboinc_api.a \
+ 	$(BOINC_LIB_DIR)/libboinc.a
+ 
+ uc2_graphics: uc2_graphics.o libstdc++.a $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_graphics2.a
+-	$(CXX) $(CXXFLAGS) -o uc2_graphics uc2_graphics.o libstdc++.a -pthread \
++	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o uc2_graphics uc2_graphics.o libstdc++.a -pthread \
+ 	$(BOINC_API_DIR)/libboinc_graphics2.a \
+ 	$(BOINC_API_DIR)/libboinc_api.a \
+ 	$(BOINC_LIB_DIR)/libboinc.a \
+Index: boinc/samples/worker/Makefile
+===================================================================
+--- boinc.orig/samples/worker/Makefile	2012-06-24 21:56:27.000000000 +0800
++++ boinc/samples/worker/Makefile	2012-06-24 22:01:23.257619057 +0800
+@@ -1,4 +1,4 @@
+-CXXFLAGS = -g 
++CXXFLAGS += -g
+ 
+ PROGS = worker
+ 
+@@ -11,4 +11,4 @@
+ 	rm $(PROGS)
+ 
+ worker: worker.o
+-	g++ $(CXXFLAGS) -o worker worker.o
++	g++ $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o worker worker.o
+Index: boinc/samples/wrapper/Makefile
+===================================================================
+--- boinc.orig/samples/wrapper/Makefile	2012-06-24 21:56:27.000000000 +0800
++++ boinc/samples/wrapper/Makefile	2012-06-24 22:01:43.641619849 +0800
+@@ -5,7 +5,7 @@
+ BOINC_API_DIR = $(BOINC_DIR)/api
+ BOINC_LIB_DIR = $(BOINC_DIR)/lib
+ 
+-CXXFLAGS = -g \
++CXXFLAGS += -g \
+ 	-Wall -W -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -fno-common \
+     -I$(BOINC_DIR) \
+     -I$(BOINC_LIB_DIR) \
+@@ -28,4 +28,4 @@
+ 	/bin/rm -f $(PROGS) *.o libstdc++.a
+ 
+ wrapper: wrapper.o libstdc++.a $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_api.a
+-	g++ $(CXXFLAGS) -o wrapper wrapper.o libstdc++.a -pthread -lboinc_api -lboinc
++	g++ $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o wrapper wrapper.o libstdc++.a -pthread -lboinc_api -lboinc
diff --git a/debian/patches/series b/debian/patches/series
index 6793efd..0e91f7d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -56,3 +56,4 @@ api_NULL_not_defined.patch
 unlink_undefined.patch
 #screensaver_woes.patch
 boinc_manager_project_info_page.patch
+add_hardening_flags.patch

-- 
BOINC packaging



More information about the pkg-boinc-commits mailing list