Re: dpkg-buildpackage now sets DEB_BUILD_HOST etc for you?

Jonathan Nieder <[email protected]>
Newsgroups gmane.linux.debian.devel.embedded,gmane.linux.debian.devel.general
Message-ID <20120329190545.GF3147@burratino>
Hi Wookey,

Wookey wrote:

> I recently noticed that when building with dpkg-buildpackage there is
> no need for the 
>
> DEB_BUILD_GNU_TYPE     := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
> DEB_HOST_GNU_TYPE      := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)

Don't you mean "?="?

[...]
> You can just do the test:
> ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
>
> and it works, so it looks like dpkg-buildpackage is now setting those
> vars for us. This is good and sensible, it's just that it's news to me.
>
> Anyone know when this happened and what if any, the limitations are?

It happened years ago, but it's not guaranteed by policy.  As you
wrote:

[...]
> Now, you can build packages without using dpkg-buildpackage by calling
> rules directly, and in that case the rules file would need to call
> dpkg-architecture, but someone would have to convince me that that was
> an interface worth supporting for non-native builds, because I
> have certainly always considered the minimal interface for cross
> package-building to be dpkg-buildpackage -a<arch>, and in practice
> there are other things you need to do for non-trivial packages (set
> CONFIG_SITE, set DEB_BUILD_OPTS=nocheck).

I believe invoking debian/rules by hand is an interface worth
supporting, even for cross builds, but the person calling debian/rules
by hand is certainly responsible for setting DEB_BUILD_OPTIONS=nocheck!

Hope that helps,
Jonathan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.