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

Re: debian/rules build/build-indep/build-arch



Hi Paul,

Paul Wise wrote:

> According to my reading of debian-policy 4.8 and 7.6, this should be
> correct:
> 
> debian/rules:
> 
> build: build-indep build-arch
> build-indep:
> 	build arch-indep stuff (like docs)
> build-arch: configure
> 	build some binaries
> 
> However the autobuilders use debian/rules build instead of debian/rules
> binary-arch and do not install Build-Depends-Indep. For eg: 
> 
> http://buildd.debian.org/fetch.php?&pkg=mapserver&ver=4.8.1-1&arch=ia64&stamp=1140357449&file=log&as=raw
> http://buildd.debian.org/build.php?&pkg=mapserver

Yes, this is a known issue with the buildd software.  It's been
discussed many times, most recently in this thread:

http://lists.debian.org/debian-policy/2006/01/msg00002.html

The usual conclusion, as I understand it, has been that it will be
difficult to transition safely to a situation where Policy is followed
better.  If the build software switched to running "debian/rules
build-arch", software that only used the build target (which is
permitted because build-arch is currently optional) would FTBFS.  You
may say that the build software could then try "debian/rules build", but
it is apparently not always possible to determine that the initial FTBFS
results from a missing target rather than some other problem.  One
proposal that seems promising is for packages who want buildds to use
build-arch by default to add a certain flag to their control files.

I agree that the current situation is quite annoying.  Hopefully some
solution will be introduced soon.


> So, I'm thinking of switching the build target to something like this:
> 
> # This is the correct, policy-compliant build target
> #build: build-indep build-arch
> 
> # This is the incorrect, non-policy compliant build target
> # it is necessary because the auto-builders use build, but don't install Build-Depends-Indep
> build: build-arch

I just looked into Policy, and 7.6 does not explicitly say anything
about the interrelationships required between debian/rules targets.  4.8
does not specifically say that "build" must depend upon "build-indep";
it is only a "should":

The build target *should* perform all the configuration and compilation
of the package.

The build target *should* depend on those of the targets build-arch and
build-indep that are provided in the rules file.

(emphasis mine)

>From Policy 1.1:

Non-conformance with guidelines denoted by should (or recommended) will
generally be considered a bug, but will not necessarily render a package
unsuitable for distribution. ... These classifications are roughly
equivalent to the bug severities ... minor, normal or important (for
should or recommended directive violations) ....


So you may get a Policy bug filed for ignoring this recommendation of
section 4.8, but from my reading you are free to tag it "wontfix".  In
any case, I've used the solution you suggest in some of my packages.  No
Policy bugs filed against them yet (not that this means anything).


> Is this the correct work-around for this problem? or should I put the
> Build-Depends-Indep packages into Build-Depends and let the autobuilders
> build the docs, but not make them into packages (seems like this is a
> bad thing to do, since it increases build times and seems wasteful)?

This is of course the other possible workaround, which is technically
more Policy-compliant.  I've used it in others of my packages.  If your
documents' build is CPU-intensive, I think the waste of effort to
compile them on every arch outweighs the dubious benefit of technically
being more Policy-compliant this way.

best regards,

-- 
Kevin B. McCarty <kmccarty@princeton.edu>   Physics Department
WWW: http://www.princeton.edu/~kmccarty/    Princeton University
GPG: public key ID 4F83C751                 Princeton, NJ 08544



Reply to: