FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian dpkg

 
 
LinkBack Thread Tools
 
Old 06-07-2011, 07:41 AM
Raphael Hertzog
 
Default Request for TC to rule on a course of action for supporting build-arch

(Bcc to debian-dpkg for info)

On Mon, 06 Jun 2011, Steve Langasek wrote:
> If this were to be put to a vote today, I would propose the following ballot
> options:
>
> 1) Implement support for calling 'debian/rules build-arch' in place of
> 'debian/rules build' by checking for the presence of the target using
> 'make -qn'.[1]
>
> 2) Implement support for calling 'debian/rules build-arch' with a fallback
> to 'debian/rules build' by checking whether the output of the build-arch
> target matches that of a dummy target.[2]
>
> 3) Implement support for calling 'debian/rules build-arch' in place of
> 'debian/rules build' if a Build-Options field is set in debian/control
> of the source package specifying that this target is supported.[3]
>
> 4) Turn on direct use of 'debian/rules build-arch' on the autobuilders for
> all packages in unstable and experimental immediately, with no fallback
> if the target does not exist; requires a corresponding update to Policy
> and mass updates to fix packages that fail to build as a result.
>
> 5) Further Discussion

I suggest a supplementary option that combines 4 and 1. And I attach the
corresponding dpkg patch.

---
Turn on direct use of "debian/rules build-arch" unless the package seems
to be missing the target according to "make -qn". In that case output a
warning that asks the packager to implement the required targets, but
fallback to using the "build" target.

The fallback to build and the "make -qn" auto-detection is temporary to
ease the transition but should dropped at some point (wheezy+1, or
wheezy+2). The policy should document that the targets must be supported.
---

Lucas, can you do a full rebuild with the packages below ?
http://people.debian.org/~hertzog/packages/dpkg-dev_1.16.1~buildarch.1_all.deb
http://people.debian.org/~hertzog/packages/libdpkg-perl_1.16.1~buildarch.1_all.deb

You should use a binary-only build (i.e. dpkg-buildpackage -B or -A for
packages which are arch: all).

I would like to know if it introduces new build failures, and
also how many packages have this warning:
dpkg-buildpackage: warning: debian/rules must be updated to support the 'build-arch' and 'build-indep' targets (at least 'build-arch' seems to be missing)

grep just on "debian/rules must be updated to support", the parenthesis
can vary between -B and -A. Also you can only see the warning if you use
-B or -A, with -b (the default), you can't generate it.

Cheers,
--
Raphaël Hertzog ◈ Debian Developer

Follow my Debian News ▶ http://RaphaelHertzog.com (English)
▶ http://RaphaelHertzog.fr (Français)
diff --git a/scripts/dpkg-buildpackage.pl b/scripts/dpkg-buildpackage.pl
index 32427a0..a7d217c 100755
--- a/scripts/dpkg-buildpackage.pl
+++ b/scripts/dpkg-buildpackage.pl
@@ -32,6 +32,7 @@ use Dpkg::Compression;
use Dpkg::Version;
use Dpkg::Changelog::Parse;
use Dpkg::Path qw(find_command);
+use Dpkg::IPC;

textdomain("dpkg-dev");

@@ -253,7 +254,22 @@ if ($noclean) {
}

my $buildfeats = Dpkg::BuildFeatures->new();
-$buildtarget = 'build' unless $buildfeats->has('build-arch');
+unless ($buildtarget eq "build" or $buildfeats->has('build-arch') or
+ scalar(@debian_rules) > 1) {
+ my $pid = spawn(exec => [ "make", "-f", @debian_rules, "-qn", $buildtarget ],
+ from_file => "/dev/null", to_file => "/dev/null",
+ error_to_file => "/dev/null");
+ my $cmdline = "make -f @debian_rules -qn $buildtarget";
+ wait_child($pid, nocheck => 1, cmdline => $cmdline);
+ my $exitcode = WEXITSTATUS($?);
+ subprocerr($cmdline) unless WIFEXITED($?);
+ if ($exitcode == 2) {
+ warning(_g("%s must be updated to support the 'build-arch' and " .
+ "'build-indep' targets (at least '%s' seems to be " .
+ "missing)"), "@debian_rules", $buildtarget);
+ $buildtarget = "build";
+ }
+}

if ($< == 0) {
warning(_g("using a gain-root-command while being root")) if (@rootcommand);
 
Old 03-18-2012, 12:15 AM
Russ Allbery
 
Default Request for TC to rule on a course of action for supporting build-arch

I believe that the discussion of this has reached a conclusion and the
dpkg maintainers are moving forward with an implementation. At this
point, it seems like the right thing for the Technical Committee to do is
to affirm that we agree with the approach arrived at.

I propose the following ballot:

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.

B. Further discussion

Please send any wording changes to the above, or any other options that
you believe should be on the ballot. If there are no objections, I plan
to call for a vote in a few days.

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


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87ipi2n1z2.fsf@windlord.stanford.edu">http://lists.debian.org/87ipi2n1z2.fsf@windlord.stanford.edu
 

Thread Tools




All times are GMT. The time now is 09:45 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org