Can we require build-arch/indep targets for lenny?
Hi,
I would like to gather up some momentum for a policy change. Namely
that the build-arch/indep targets in debian/rules become required
instead of being optional.
The reason for this is that dpkg-buildpackage can't reliable detect
the existance of the build-arch/indep targets and must call 'build'
instead. This forces every source to compile both architecture
specific and architecture independent code on all buildds and
increases the Build-Depends of packages a lot.
Current status:
I asked Lucas Nussbaum to rebuild all of debian with dpkg-buildpackage
patched to call 'build-arch'. Here is the result:
7326 packages rebuilt (all packages not Architecture:all)
1727 built successfully
5463 failed to build with a "no rule to make" error.
136 failed for other reasons (unsat builddeps, etc)
That means that only about 25% of debian package have a build-arch
target. So there is still a long way to got.
Possible upgrade paths:
1) Change policy now making 75% of package RC buggy instantly.
This sounds horrible but the fix is trivial and there is still a
long time to lenny to fix it.
2) Enforce the target for all new uploads and change policy once we
exceed XX%.
The unstable/experimental buildds could be patched to call
'build-arch' instead of build making any upload without
'build-arch' FTBFS. The security buildds would be left
as is so nothing old breaks.
3) Require 'build-arch/indep' with Standards-Version x.y.z
Every source has a Standards-Version entry. dpkg-buildpackage could
call 'build-arch' if the standards version is new enough and fall
back to 'build' for older versions.
The options can be combined for maximum effect.
How to fix your own package:
The minimal change to debian/rules would be to replace 'build:' with
'build%:'. But that doesn't always work (e.g. not with cdbs).
The next smallest change is to add 'build-%: build' to
debian/rules. That always works.
If you actualy have different things to build for arch and indep then
you are missing the benefits though with the above solutions. If you
have such a case then the recommended way in policy is the right
solution. Create 'build-arch' and 'build-indep' targets with the
respective build rules and have 'build' depend on both.
If you don't then you can also create 'build-arch' and 'build-indep'
targets that depend on 'build' if you don't like the pattern matching
'build-%' above.
MfG
Goswin
Reply to: