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

Re: Bug#604397: Request for TC to rule on a course of action for supporting build-arch



On Tue, Jun 07, 2011 at 11:14:14AM +0200, Tollef Fog Heen wrote:
> ]] Steve Langasek 
> 
> Hi,
> 
> |  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.
> 
> I'd be happy to provide hardware to do a full scale rebuild test of the
> archive if somebody does the actual work of doing the rebuilds.  rleigh
> did it for his sbuild resolver test so I've Cc-ed him to see if he's
> interested in doing a test for this too.

We discussed this briefly on IRC, and it's certainly doable.

I would suggest building using the current dpkg.git repo
- unpatched
- with the "make -qn" autodetection patch
- with the "break world" patch which unconditionally enables the
  use of the targets

The unpatched form would contain Bill's Build-Features work, but this
won't have any effect given that no packages yet use the feature; this
will give us a baseline failure rate (given that not all packages in
unstable will currently be buildable) which we can then compare the
other two against.

I still have the build scripts and database schema I used to process
the resolver builds and results, so these can be repurposed easily
enough.

Assuming the same hardware as last time, it'll take around 24-30
hours per complete rebuild, running 24 parallel builds.

I've attached the two patches.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
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);
diff --git a/scripts/dpkg-buildpackage.pl b/scripts/dpkg-buildpackage.pl
index 32427a0..190b164 100755
--- a/scripts/dpkg-buildpackage.pl
+++ b/scripts/dpkg-buildpackage.pl
@@ -252,9 +252,6 @@ if ($noclean) {
     $include = BUILD_BINARY if ($include & BUILD_DEFAULT);
 }
 
-my $buildfeats = Dpkg::BuildFeatures->new();
-$buildtarget = 'build' unless $buildfeats->has('build-arch');
-
 if ($< == 0) {
     warning(_g("using a gain-root-command while being root")) if (@rootcommand);
 } else {

Attachment: signature.asc
Description: Digital signature


Reply to: