[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Environment variables, debian/rules and dpkg-buildpackage



On Mon, 16 Mar 2009, Raphael Geissert wrote:
> Stefano Zacchiroli wrote:
> > 
> > ... and pretty please, do not choose a solution that will require
> > adding an "-include" to 15'000 thousands debian/rules; we will finish
> > doing that by Lenny+50, the earliest.
> 
> It would take some time, yes; but packages using cdbs would only require a
> binNMU once cdbs includes that file on its own.

BinNMU are not needed. The default CFLAGS won't have changed. A rebuild to
verify that none are FTBFS would be enough.

> IMO this is what looks like The Right Solution; are we willing to ignore it
> just because it would take some time?

I don't know your criteria for "The Right Solution", so this opinion
doesn't buy me much.

> What other approach (which fulfils all the pros already mentioned by Manoj)
> do you suggest?

What are the pros mentioned by Manoj that are specific to the Makefile
snippet approach except the fact that we can continue to call debian/rules
directly on all packages ?

At this point, I have the feeling it's a matter of individual taste
mainly. Every time we have accepted that we have ended up with 2 different
approachs (python-support vs python-central) and we have not won much.

Is there a way to reconcile both approaches ?

Maybe this one: we let the caller pass the required build options as
environment variables or command line options but the package maintainer
has the possibility to include a Makefile snippet that would set
any missing build-option to the default value chosen by the distribution
so that he can continue to call debian/rules directly without having to
take care of setting the environment variables.

Such a Makefile snippet could then be like this:
CFLAGS ?= -Wall -g
ifeq "$(origin CFLAGS)" "file"
    ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
    else
	CFLAGS += -O2
    endif
endif

How does that sound ?

Cheers,
-- 
Raphaël Hertzog

Contribuez à Debian et gagnez un cahier de l'admin Debian Lenny :
http://www.ouaza.com/wp/2009/03/02/contribuer-a-debian-gagner-un-livre/


Reply to: