Bug#374029: Build-Depends{,-Indep} as defined is not useful and not followed
Hello folks,
The following patch implements the decision of the Debian Technical
Committee in #629385 to make build-arch and build-indep mandatory. Please
review. Note that I'm not looking for conventional seconds since the
Technical Committee has already made a judgement; rather, I'm looking for
wording review and for confirmation that I've implemented the Technical
Committee decision properly.
commit af73c2257019136ee0ce9180aebe6eb8be0dd76e
Author: Russ Allbery <rra@debian.org>
Date: Sun Aug 12 13:14:55 2012 -0700
Make build-arch and build-indep required targets
Implement the Debian Technical Committee decision in #629385.
Remove the normative documentation of what to do when the targets
aren't provided. Remove the informative footnote saying that
the build daemons don't support this.
Closes: #374029 (among others)
diff --git a/policy.sgml b/policy.sgml
index 8c654d1..229a8cc 100644
--- a/policy.sgml
+++ b/policy.sgml
@@ -1987,52 +1987,34 @@ zope.
</p>
</item>
- <tag><tt>build-arch</tt> (optional),
- <tt>build-indep</tt> (optional)
+ <tag><tt>build-arch</tt> (required),
+ <tt>build-indep</tt> (required)
</tag>
<item>
<p>
- A package may also provide one or both of the targets
- <tt>build-arch</tt> and <tt>build-indep</tt>.
- The <tt>build-arch</tt> target, if provided, should
+ The <tt>build-arch</tt> target must
perform all the configuration and compilation required for
producing all architecture-dependant binary packages
(those packages for which the body of the
<tt>Architecture</tt> field in <tt>debian/control</tt> is
not <tt>all</tt>). Similarly, the <tt>build-indep</tt>
- target, if provided, should perform all the configuration
+ target must perform all the configuration
and compilation required for producing all
architecture-independent binary packages (those packages
for which the body of the <tt>Architecture</tt> field
in <tt>debian/control</tt> is <tt>all</tt>).
- </p>
-
- <p>
- If <tt>build-arch</tt> or <tt>build-indep</tt> targets are
- provided in the rules file, the <tt>build</tt> target
+ The <tt>build</tt> target
should either depend on those targets or take the same
actions as invoking those targets would perform.<footnote>
- The intent of this split is so that binary-only builds
- need not install the dependencies required for
- the <tt>build-indep</tt> target. However, this is not
- yet used in practice since <tt>dpkg-buildpackage
- -B</tt>, and therefore the autobuilders,
- invoke <tt>build</tt> rather than <tt>build-arch</tt>
- due to the difficulties in determining whether the
- optional <tt>build-arch</tt> target exists.
+ This split allows binary-only builds to not install the
+ dependencies required for the <tt>build-indep</tt>
+ target and skip any resource-intensive build tasks that
+ are only required when building architecture-independent
+ binary packages.
</footnote>
</p>
<p>
- If one or both of the targets <tt>build-arch</tt> and
- <tt>build-indep</tt> are not provided, then invoking
- <file>debian/rules</file> with one of the not-provided
- targets as arguments should produce a exit status code
- of 2. Usually this is provided automatically by make
- if the target is missing.
- </p>
-
- <p>
The <tt>build-arch</tt> and <tt>build-indep</tt> targets
must not do anything that might require root privilege.
</p>
--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>
Reply to: