[ovs-dev] [PATCH v2] debian: Fix build with old versions of dpkg-buildflags.

Ben Pfaff blp at nicira.com
Wed Aug 14 22:42:54 UTC 2013


I applied this (yesterday).

On Tue, Aug 13, 2013 at 02:04:49PM -0700, Justin Pettit wrote:
> Looks good.
> 
> --Justin
> 
> 
> On Aug 13, 2013, at 12:54 PM, Ben Pfaff <blp at nicira.com> wrote:
> 
> > dpkg-buildflags has not always supported --export=configure, but commit
> > 6c2d4c8780 (debian: Apply hardening options to build.) used it
> > unconditionally, causing the build to fail on old Debian distributions.
> > This fixes the problem.
> > 
> > Signed-off-by: Ben Pfaff <blp at nicira.com>
> > ---
> > debian/rules |    9 +++++++--
> > 1 file changed, 7 insertions(+), 2 deletions(-)
> > 
> > diff --git a/debian/rules b/debian/rules
> > index 1ee7048..b21c8db 100755
> > --- a/debian/rules
> > +++ b/debian/rules
> > @@ -29,6 +29,12 @@ else
> > CFLAGS += -O2
> > endif
> > 
> > +# Old versions of dpkg-buildflags do not understand --export=configure.
> > +# When dpkg-buildflags does not understand an option, it prints its full
> > +# --help output on stdout, so we have to avoid that here.
> > +buildflags := $(shell if dpkg-buildflags --export=configure >/dev/null 2>&1; \
> > +	              then dpkg-buildflags --export=configure; fi)
> > +
> > configure: configure-stamp
> > configure-stamp:
> > 	dh_testdir
> > @@ -40,8 +46,7 @@ configure-stamp:
> > 		test -e Makefile || \
> > 		../configure --prefix=/usr --localstatedir=/var --enable-ssl \
> > 			--sysconfdir=/etc CFLAGS="$(CFLAGS)" \
> > -			$(shell dpkg-buildflags --export=configure) \
> > -			$(DATAPATH_CONFIGURE_OPTS))
> > +			$(buildflags) $(DATAPATH_CONFIGURE_OPTS))
> > 	touch configure-stamp
> > 
> > #Architecture 
> > -- 
> > 1.7.10.4
> > 
> > _______________________________________________
> > dev mailing list
> > dev at openvswitch.org
> > http://openvswitch.org/mailman/listinfo/dev
> 



More information about the dev mailing list