[Pkg-voip-commits] r9663 - in /asterisk/trunk/debian: changelog patches/menuselect_cflags patches/series rules

tzafrir at alioth.debian.org tzafrir at alioth.debian.org
Wed Apr 25 16:25:25 UTC 2012


Author: tzafrir
Date: Wed Apr 25 16:25:24 2012
New Revision: 9663

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=9663
Log:
* Patch menuselect_cflags: allow passing our flags to menuselect's build.
  - Use it t opass our CFLAGS to menuselect (Closes: #664086).

Added:
    asterisk/trunk/debian/patches/menuselect_cflags
Modified:
    asterisk/trunk/debian/changelog
    asterisk/trunk/debian/patches/series
    asterisk/trunk/debian/rules

Modified: asterisk/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/changelog?rev=9663&op=diff
==============================================================================
--- asterisk/trunk/debian/changelog (original)
+++ asterisk/trunk/debian/changelog Wed Apr 25 16:25:24 2012
@@ -5,6 +5,8 @@
     - AST-2012-005 - Heap overflow in chan_skinny (CVE-2012-2415).
     - AST-2012-006 - Remote crash on SIP "UPDATE" method (CVE-2012-2416).
   * Fix daemon status check in init.d script (Closes: #669378).
+  * Patch menuselect_cflags: allow passing our flags to menuselect's build.
+    - Use it t opass our CFLAGS to menuselect (Closes: #664086).
 
  -- Tzafrir Cohen <tzafrir at debian.org>  Wed, 25 Apr 2012 12:19:06 +0300
 

Added: asterisk/trunk/debian/patches/menuselect_cflags
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/menuselect_cflags?rev=9663&op=file
==============================================================================
--- asterisk/trunk/debian/patches/menuselect_cflags (added)
+++ asterisk/trunk/debian/patches/menuselect_cflags Wed Apr 25 16:25:24 2012
@@ -1,0 +1,81 @@
+From 5830cc5b0cd3fd7f3ad86824dc718b4cfc1d4117 Mon Sep 17 00:00:00 2001
+Author: Simon Ruderich <simon at ruderich.org>
+Bug-Debian: http://bugs.debian.org/664086
+Subject: pass BUILD_CFLGAS and BUILD_LDFLAGS to menuselect
+
+Allow menuselect to get its set of CFLAGS and LDFLAGS through the
+environment of Make:
+
+  make BUILD_CFLAGS="whatever" BUILD_LDFLAGS="whatever"
+
+Also keep menuselect from steping over them on its own.
+---
+ Makefile |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/Makefile
++++ b/Makefile
+@@ -884,7 +884,9 @@ nmenuselect: menuselect/nmenuselect menu
+ 	- at menuselect/nmenuselect menuselect.makeopts && (echo "menuselect changes saved!"; rm -f channels/h323/Makefile.ast main/asterisk) || echo "menuselect changes NOT saved!"
+ 
+ # options for make in menuselect/
+-MAKE_MENUSELECT=CC="$(BUILD_CC)" CXX="" LD="" AR="" RANLIB="" CFLAGS="" $(MAKE) -C menuselect CONFIGURE_SILENT="--silent"
++MAKE_MENUSELECT=CC="$(BUILD_CC)" CXX="" LD="" AR="" RANLIB="" \
++		CFLAGS="$(BUILD_CFLAGS)" LDFLAGS="$(BUILD_LDFLAGS)" \
++		$(MAKE) -C menuselect CONFIGURE_SILENT="--silent"
+ 
+ menuselect/menuselect: menuselect/makeopts
+ 	+$(MAKE_MENUSELECT) menuselect
+--- a/menuselect/Makefile
++++ b/menuselect/Makefile
+@@ -22,7 +22,7 @@ endif
+ 
+ # Basic set of sources and flags/libraries/includes
+ OBJS:=menuselect.o strcompat.o
+-CFLAGS:=-g -c -D_GNU_SOURCE -Wall
++CFLAGS+=-g -c -D_GNU_SOURCE -Wall
+ 
+ ifeq ($(MENUSELECT_DEBUG),yes)
+   CFLAGS += -DMENUSELECT_DEBUG
+@@ -64,14 +64,14 @@ all: $(ALL_TGTS)
+ $(OBJS) $(C_OBJS) $(N_OBJS) $(G_OBJS) $(M_OBJS): autoconfig.h menuselect.h
+ 
+ makeopts autoconfig.h: autoconfig.h.in makeopts.in
+-	@./configure $(CONFIGURE_SILENT) CC= LD= AR= CFLAGS=
++	@./configure $(CONFIGURE_SILENT)
+ 
+ $(ALL_TGTS): mxml/libmxml.a
+ 
+ ifdef C_OBJS
+ menuselect_curses.o: CFLAGS+=$(C_INCLUDE)
+ cmenuselect: $(OBJS) $(C_OBJS)
+-	$(CC) -o $@ $^ $(C_LIBS)
++	$(CC) $(LDFLAGS) -o $@ $^ $(C_LIBS)
+ else
+ cmenuselect:
+ endif
+@@ -79,7 +79,7 @@ endif
+ ifdef G_OBJS
+ menuselect_gtk.o: CFLAGS+=$(G_INCLUDE)
+ gmenuselect: $(OBJS) $(G_OBJS)
+-	$(CC) -o $@ $^ $(G_LIBS)
++	$(CC) $(LDFLAGS) -o $@ $^ $(G_LIBS)
+ else
+ gmenuselect:
+ endif
+@@ -87,13 +87,13 @@ endif
+ ifdef N_OBJS
+ menuselect_newt.o: CFLAGS+=$(N_INCLUDE)
+ nmenuselect: $(OBJS) $(N_OBJS)
+-	$(CC) -o $@ $^ $(N_LIBS)
++	$(CC) $(LDFLAGS) -o $@ $^ $(N_LIBS)
+ else
+ nmenuselect:
+ endif
+ 
+ menuselect: $(OBJS) $(M_OBJS)
+-	$(CC) -o $@ $^ $(M_LIBS)
++	$(CC) $(LDFLAGS) -o $@ $^ $(M_LIBS)
+ 
+ mxml/libmxml.a:
+ 	@if test ! -f mxml/Makefile ; then cd mxml && ./configure ; fi

Modified: asterisk/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/series?rev=9663&op=diff
==============================================================================
--- asterisk/trunk/debian/patches/series (original)
+++ asterisk/trunk/debian/patches/series Wed Apr 25 16:25:24 2012
@@ -24,3 +24,4 @@
 
 sparc32_disable
 gmime2.6
+menuselect_cflags

Modified: asterisk/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/rules?rev=9663&op=diff
==============================================================================
--- asterisk/trunk/debian/rules (original)
+++ asterisk/trunk/debian/rules Wed Apr 25 16:25:24 2012
@@ -20,8 +20,12 @@
 LDFLAGS = `dpkg-buildflags --get LDFLAGS`
 CFLAGS += `dpkg-buildflags --get CPPFLAGS`
 
+# For CFLAGS/LDFLAGS of menuselect:
+BUILD_CFLAGS = $(CFLAGS)
+BUILD_LDFLAGS = $(CFLAGS)
+
 # Necessary to pass hardening flags to menuselect.
-export CFLAGS LDFLAGS
+export CFLAGS LDFLAGS BUILD_CFLAGS BUILD_LDFLAGS
 
 
 ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))




More information about the Pkg-voip-commits mailing list