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

Bug#591857: debian-policy: please clarify which of DEB_{BUILD,HOST}_* is which



Adam Borowski <kilobyte@angband.pl> writes:

> It is utterly non-obvious what the BUILD and HOST architectures mean.

> Is the latter the build (duh) host, or the target host?
> Is the former the machine you build _on_ or build _for_?

> Browsing the relevant documentation (debian-policy, man dpkg, ...), I
> found no place that disambiguates those.  Only after asking around, I
> got pointed to autoconf's documentation, and it turned out the naming
> goes contrary to what I thought to be the more likely variant.

> This needs to be made more clear, badly.  Could you please reword
> section 4.9 to mention that BUILD is the one you host the build on, and
> HOST the one your build for?  The current version just says that HOST is
> the host machine, and BUILD is the build machine, which is just a waste
> of words.

That information is already in section 4.9, but it could be more
prominent.  I'm applying the following patch to reword that paragraph and
hopefully make this information more obvious, as well as use the term
architecture consistently rather than referring to machines.

diff --git a/policy.sgml b/policy.sgml
index d6c63f6..0624290 100644
--- a/policy.sgml
+++ b/policy.sgml
@@ -2084,14 +2084,21 @@
 
 	<p>
 	  The architectures we build on and build for are determined
-	  by <prgn>make</prgn> variables using the utility
-	  <qref id="pkg-dpkg-architecture"><prgn>dpkg-architecture</prgn></qref>.
-	  You can determine the
-	  Debian architecture and the GNU style architecture
-	  specification string for the build machine (the machine type
-	  we are building on) as well as for the host machine (the
-	  machine type we are building for).  Here is a list of
-	  supported <prgn>make</prgn> variables:
+	  by <prgn>make</prgn> variables using the
+	  utility <qref id="pkg-dpkg-architecture"><prgn>dpkg-architecture</prgn></qref>.
+	  You can determine the Debian architecture and the GNU style
+	  architecture specification string for the build architecture as
+	  well as for the host architecture.  The build architecture is
+	  the architecture on which <file>debian/rules</file> is run and
+	  the package build is performed.  The host architecture is the
+	  architecture on which the resulting package will be installed
+	  and run.  These are normally the same, but may be different in
+	  the case of cross-compilation (building packages for one
+	  architecture on machines of a different architecture).
+	</p>
+
+	<p>
+	  Here is a list of supported <prgn>make</prgn> variables:
 	  <list compact="compact">
 	    <item>
 		<tt>DEB_*_ARCH</tt> (the Debian architecture)
@@ -2115,8 +2122,8 @@
 		<tt>DEB_*_GNU_TYPE</tt>)
 	  </list>
 	  where <tt>*</tt> is either <tt>BUILD</tt> for specification of
-	  the build machine or <tt>HOST</tt> for specification of the
-	  host machine.
+	  the build architecture or <tt>HOST</tt> for specification of the
+	  host architecture.
 	</p>
 
 	<p>

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>



Reply to: