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

Bug#629385: marked as done (Please rule on how to implement debian/rules build-arch)



Your message dated Wed, 21 Mar 2012 16:21:58 -0700
with message-id <20120321232158.GU16976@rzlab.ucr.edu>
and subject line Re: Bug#629385: Request for TC to rule on a course of action for supporting build-arch
has caused the Debian Bug report #629385,
regarding Please rule on how to implement debian/rules build-arch
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
629385: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=629385
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: debian-policy
Version: 3.9.1.0
Severity: normal
Tags: patch

Hi,

As a goal for wheezy, I'd like the Build-Depends and
Build-Depends-Indep fields to be fully functional and usable for
autobuilding.  Currently, Build-Depends-Indep isn't useful, and
only Build-Depends is used in practice on our autobuilder
infrastructure (despite it being perfectly capable of handling
and using B-D-I internally).

The reason for this is that we do our building using dpkg-buildpackage,
and while binary-arch and binary-indep are required targets used by
dpkg-buildpackage, the corresponding build-arch and build-indep targets
are not required and are not used by dpkg-buildpackage at present.

There's some history to this in #374029.  Most of the information
about sbuild/buildds in there is outdated and incorrect.  The only
sticking point to using Build-Depends-Indep and autobuilding
arch-all packages is the lack of support for build-arch and build-all
in dpkg-buildpackage.

Simply enabling this in dpkg-buildpackage would cause widespread
breakage.  build-arch and build-indep have been suggested in Policy
for some time, and they are used by a low percentage of the archive
at present (<400 packages), while 50% of the archive uses dh or
cdbs rules which would allow trivial support in all those packages
once the tools are updated.

I'd like to propose that build-arch and build-indep be changed in
Policy from "may be provided" to "must be provided" in preparation
for enabling their use.  We've wanted to fix the root problem for
at least half a decade, and I'd like to get it done for wheezy.

This should probably also be accompanied by a new lintian check which
can warn if these rules are missing.

Note, this patch obviates the need for the patch in #601839.


Regards,
Roger

-- System Information:
Debian Release: 5.0.6
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: powerpc (ppc)

Kernel: Linux 2.6.26-2-powerpc
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

debian-policy depends on no packages.

debian-policy recommends no packages.

Versions of packages debian-policy suggests:
ii  doc-base                      0.8.20     utilities to manage online documen

-- no debconf information
diff --git a/policy.sgml b/policy.sgml
index 642f672..29a7db4 100644
--- a/policy.sgml
+++ b/policy.sgml
@@ -1858,8 +1858,9 @@
 	<p>
 	  The following targets are required and must be implemented
 	  by <file>debian/rules</file>: <tt>clean</tt>, <tt>binary</tt>,
-	  <tt>binary-arch</tt>, <tt>binary-indep</tt>, and <tt>build</tt>.
-	  These are the targets called by <prgn>dpkg-buildpackage</prgn>.
+	  <tt>binary-arch</tt>, <tt>binary-indep</tt>, <tt>build</tt>,
+	  <tt>build-arch</tt>, and <tt>build-indep</tt>.  These are the
+	  targets called by <prgn>dpkg-buildpackage</prgn>.
 	</p>
 
 	<p>
@@ -1943,43 +1944,35 @@
 	    </tag>
 	    <item>
 	      <p>
-		A package may also provide both of the targets
+		A package must also provide both of the targets
 		<tt>build-arch</tt> and <tt>build-indep</tt>.
-		The <tt>build-arch</tt> target, if provided, should
-		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
-		and compilation required for producing all
-		architecture-independent binary packages (those packages
-		for which the body of the <tt>Architecture</tt> field
+		The <tt>build-arch</tt> target should 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, should 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>).
-		The <tt>build</tt> target should depend on those of the
-		targets <tt>build-arch</tt> and <tt>build-indep</tt> that
-		are provided in the rules file.<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.
+		The <tt>build</tt> target should depend on
+		the <tt>build-arch</tt> and <tt>build-indep</tt>
+		targets.<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.
 		</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>
@@ -2006,13 +1999,13 @@
 	      <p>
 		Both <tt>binary-*</tt> targets should depend on the
 		<tt>build</tt> target, or on the appropriate
-		<tt>build-arch</tt> or <tt>build-indep</tt> target, if
-		provided, so that the package is built if it has not
-		been already.  It should then create the relevant
-		binary package(s), using <prgn>dpkg-gencontrol</prgn> to
-		make their control files and <prgn>dpkg-deb</prgn> to
-		build them and place them in the parent of the top
-		level directory.
+		<tt>build-arch</tt> or <tt>build-indep</tt> target, so
+		that the package is built if it has not been already.
+		It should then create the relevant binary package(s),
+		using <prgn>dpkg-gencontrol</prgn> to make their
+		control files and <prgn>dpkg-deb</prgn> to build them
+		and place them in the parent of the top level
+		directory.
 	      </p>
 
 	      <p>

--- End Message ---
--- Begin Message ---
On Wed, 21 Mar 2012, Andreas Barth wrote:
> I vote AB.

With the abstention of Ian; the outcome of the vote is no longer in
doubt, and option A is the technical course of option that
dpkg-buildpackage should take:

A. dpkg-buildpackage, when doing a binary-only build (-B), should probe
   the package with "make -qn" to see if the build-arch target appears to
   be implemented.  If so, it should use "debian/rules build-arch" to
   build the package instead of "debian/rules build".  If it detects via
   "make -qn" that the target is missing, it should output a warning
   asking the packager to implement the required targets, and then fall
   back to using "debian/rules build".

   The fallback to "debian/rules build" and the "make -qn" auto-detection
   are temporary to ease the transition but should be dropped at some
   point (wheezy+1, or wheezy+2).

   Debian Policy should be updated to make build-arch and build-indep
   mandatory targets.



Don Armstrong

-- 
It can sometimes happen that a scholar, his task completed, discovers
that he has no one to thank. Never mind. He will invent some debts.
Research without indebtedness is suspect, and somebody must always,
somehow, be thanked.
 -- Umberto Eco "How to Write an Introduction"

http://www.donarmstrong.com              http://rzlab.ucr.edu


--- End Message ---

Reply to: