]> git.donarmstrong.com Git - wannabuild.git/commitdiff
import various post-release changes
authorPhilipp Kern <pkern@debian.org>
Mon, 7 Feb 2011 15:12:13 +0000 (15:12 +0000)
committerPhilipp Kern <pkern@debian.org>
Mon, 7 Feb 2011 15:12:13 +0000 (15:12 +0000)
36 files changed:
bin/WannaBuild.pm [deleted file]
bin/catgdbm [deleted file]
bin/dep-wait-build [deleted symlink]
bin/do_stats [new file with mode: 0755]
bin/failed-build [deleted symlink]
bin/filter-nonfree [new file with mode: 0755]
bin/forget-build [deleted symlink]
bin/give-back-build [deleted symlink]
bin/keep-latest
bin/list-building [deleted symlink]
bin/list-dep-wait [deleted symlink]
bin/list-failed [deleted symlink]
bin/list-installed [deleted symlink]
bin/list-needs-build [deleted symlink]
bin/list-not-for-us [deleted symlink]
bin/list-uploaded [deleted symlink]
bin/no-build [deleted symlink]
bin/save-database [new file with mode: 0755]
bin/sync.sh
bin/uploaded-build [deleted symlink]
bin/wanna-build
bin/wanna-build-statistics
bin/wb-edos-builddebcheck [deleted file]
bin/wb-graph
bin/wb-make-rev [deleted file]
home/.gitignore [deleted file]
lib/WannaBuild.pm [new file with mode: 0644]
libtrigger.sh [deleted file]
postrelease [deleted file]
triggers/common
triggers/filter-nonfree [deleted file]
triggers/trigger.backports
triggers/trigger.debian
triggers/trigger.debian-buildd
triggers/trigger.edu
triggers/trigger.volatile

diff --git a/bin/WannaBuild.pm b/bin/WannaBuild.pm
deleted file mode 100644 (file)
index d9433e2..0000000
+++ /dev/null
@@ -1,207 +0,0 @@
-#
-# WannaBuild.pm: library for wanna-build and sbuild
-# Copyright (C) 2005 Ryan Murray <rmurray@debian.org>
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-#
-# $Id$
-#
-
-package WannaBuild;
-
-use strict;
-use POSIX;
-use FileHandle;
-use Time::Local;
-
-require Exporter;
-@WannaBuild::ISA = qw(Exporter);
-@WannaBuild::EXPORT = qw(version_less version_lesseq version_eq
-                       version_compare binNMU_version parse_date isin);
-
-$WannaBuild::opt_correct_version_cmp = 0;
-
-sub version_less {
-       my $v1 = shift;
-       my $v2 = shift;
-       
-       return version_compare( $v1, "<<", $v2 );
-}
-
-sub version_lesseq {
-       my $v1 = shift;
-       my $v2 = shift;
-
-       return version_compare( $v1, "<=", $v2 );
-}
-
-sub version_eq {
-       my $v1 = shift;
-       my $v2 = shift;
-
-       return version_compare( $v1, "=", $v2 );
-}
-
-sub version_compare {
-       my $v1 = shift;
-       my $rel = shift;
-       my $v2 = shift;
-       
-       if ($WannaBuild::opt_correct_version_cmp) {
-               system "dpkg", "--compare-versions", $v1, $rel, $v2;
-               return $? == 0;
-       }
-       else {
-               if ($rel eq "=" || $rel eq "==") {
-                       return $v1 eq $v2;
-               }
-               elsif ($rel eq "<<") {
-                       return do_version_cmp( $v1, $v2 );
-               }
-               elsif ($rel eq "<=" || $rel eq "<") {
-                       return $v1 eq $v2 || do_version_cmp( $v1, $v2 );
-               }
-               elsif ($rel eq ">=" || $rel eq ">") {
-                       return !do_version_cmp( $v1, $v2 );
-               }
-               elsif ($rel eq ">>") {
-                       return $v1 ne $v2 && !do_version_cmp( $v1, $v2 );
-               }
-               else {
-                       warn "version_compare called with bad relation '$rel'\n";
-                       return $v1 eq $2;
-               }
-       }
-}
-
-sub do_version_cmp {
-       my($versa, $versb) = @_;
-       my($epocha,$upstra,$reva);
-       my($epochb,$upstrb,$revb);
-       my($r);
-
-       ($epocha,$upstra,$reva) = split_version($versa);
-       ($epochb,$upstrb,$revb) = split_version($versb);
-
-       # compare epochs
-       return 1 if $epocha < $epochb;
-       return 0 if $epocha > $epochb;
-
-       # compare upstream versions
-       $r = version_cmp_single( $upstra, $upstrb );
-       return $r < 0 if $r != 0;
-
-       # compare Debian revisions
-       $r = version_cmp_single( $reva, $revb );
-       return $r < 0;
-}
-
-sub order {
-       for ($_[0])
-       {
-       /\~/     and return -1;
-       /\d/     and return  0;
-       /[a-z]/i and return ord;
-                    return (ord) + 256;
-       }
-}
-
-sub version_cmp_single {
-       my($versa, $versb) = @_;
-       my($a,$b,$lena,$lenb,$va,$vb,$i);
-
-       for(;;) {
-               # compare non-numeric parts
-               $versa =~ /^([^\d]*)(.*)/; $a = $1; $versa = $2;
-               $versb =~ /^([^\d]*)(.*)/; $b = $1; $versb = $2;
-               $lena = length($a);
-               $lenb = length($b);
-               for( $i = 0; $i < $lena || $i < $lenb; ++$i ) {
-                       $va = $i < $lena ? order(substr( $a, $i, 1 )) : 0;
-                       $vb = $i < $lenb ? order(substr( $b, $i, 1 )) : 0;
-                       return $va - $vb if $va != $vb;
-               }
-               # compare numeric parts
-               $versa =~ /^(\d*)(.*)/; $a = $1; $a ||= 0; $versa = $2;
-               $versb =~ /^(\d*)(.*)/; $b = $1; $b ||= 0; $versb = $2;
-               return $a - $b if $a != $b;
-               return 0 if !$versa && !$versb;
-               if (!$versa) {
-                       return +1 if order(substr( $versb, 0, 1 ) ) < 0;
-                       return -1;
-               }
-               if (!$versb) {
-                       return -1 if order(substr( $versa, 0, 1 ) ) < 0;
-                       return +1;
-               }
-       }
-}
-
-sub split_version {
-       my($vers) = @_;
-       my($epoch,$revision) = (0,"");
-
-       if ($vers =~ /^(\d+):(.*)/) {
-               $epoch = $1;
-               $vers = $2;
-       }
-
-       if ($vers =~ /(.*)-([^-]+)$/) {
-               $revision = $2;
-               $vers = $1;
-       }
-
-       return( $epoch, $vers, $revision );
-}
-
-sub binNMU_version {
-       my $v = shift;
-       my $binNMUver = shift;
-
-       return "$v+b$binNMUver";
-}
-
-
-my %monname = ('jan', 0, 'feb', 1, 'mar', 2, 'apr', 3, 'may', 4, 'jun', 5,
-               'jul', 6, 'aug', 7, 'sep', 8, 'oct', 9, 'nov', 10, 'dec', 11 );
-
-sub parse_date {
-       my $text = shift;
-
-       return 0 if !$text;
-
-       if ($text =~ /^(\d{4}) (\w{3}) (\d+) (\d{2}):(\d{2}):(\d{2})$/) {
-               my ($year, $mon, $day, $hour, $min, $sec) = ($1, $2, $3, $4, $5, $6);
-               $mon =~ y/A-Z/a-z/;
-               die "Invalid month name $mon" if !exists $monname{$mon};
-               $mon = $monname{$mon};
-               return timegm($sec, $min, $hour, $day, $mon, $year);
-       } elsif ($text =~ /^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})(?:\.\d+)?$/) {
-               my ($year, $mon, $day, $hour, $min, $sec) = ($1, $2-1, $3, $4, $5, $6);
-               return timegm($sec, $min, $hour, $day, $mon, $year);
-       } else {
-               die "Cannot parse date: $text\n";
-       }
-}
-
-sub isin {
-       my $val = shift;
-
-       return 0 if !$val;
-
-       return grep( $_ eq $val, @_ );
-}
-
-1;
diff --git a/bin/catgdbm b/bin/catgdbm
deleted file mode 100755 (executable)
index d7f6bbe..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/perl
-
-use File::Basename;
-$progname = basename($0);
-
-use DB_File;
-use GDBM_File;
-
-die "Filename missing\n" if !@ARGV;
-die "$ARGV[0]: $!\n" if !-f $ARGV[0];
-
-if ($progname =~ /catdb/) {
-       tie %db, 'DB_File', $ARGV[0], O_RDONLY, 0664, $DB_HASH;
-}
-elsif ($progname =~ /catgdbm/) {
-       tie %db, 'GDBM_File', $ARGV[0], GDBM_READER, 0644;
-}
-else {
-       die "Called for unknown db type\n";
-}
-shift;
-
-if (@ARGV > 0) {
-       foreach $key (@ARGV) {
-               print "-"x78, "\n";
-               if (exists $db{$key}) {
-                       print "$key:\n$db{$key}\n";
-               }
-               else {
-                       print "*UNDEFINED*\n";
-               }
-       }
-}
-else {
-       while( ($key,$val) = each %db ) {
-               print "-"x78, "\n";
-               print "$key:\n$val\n";
-       }
-}
-
-untie %db;
-exit 0;
diff --git a/bin/dep-wait-build b/bin/dep-wait-build
deleted file mode 120000 (symlink)
index 0b45c3e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-wanna-build
\ No newline at end of file
diff --git a/bin/do_stats b/bin/do_stats
new file mode 100755 (executable)
index 0000000..d869845
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+. /org/wanna-build/triggers/common
+
+STATS_DISTS="sid wheezy squeeze lenny"
+ALL_ARCHES=$(echo $ARCHS_lenny $ARCHS_squeeze $ARCHS_wheezy $ARCHS_unstable \
+             | tr ' ' '\n' | sort -u)
+
+#
+# Only update stats if it's been at least 20h since the last time.
+#
+interval=72000
+last=`stat --format="%Y" /srv/wanna-build/etc/graph-data`
+now=`date +%s`
+if (( $last + $interval < $now )); then
+        echo "stats start: `date`"
+       /srv/wanna-build/bin/wb-graph >> /srv/wanna-build/etc/graph-data
+       /srv/wanna-build/bin/wb-graph -p >> /srv/wanna-build/etc/graph2-data
+       /srv/buildd.debian.org/bin/makegraph
+       for a in $ALL_ARCHES; do
+           echo Last Updated: `date -u` > /srv/buildd.debian.org/web/stats/$a.txt
+           for d in $STATS_DISTS; do
+               /srv/wanna-build/bin/wanna-build-statistics --database=$a/build-db --dist=$d >> /srv/buildd.debian.org/web/stats/$a.txt
+           done
+       done
+        echo "stats ended: `date`"
+fi
+
diff --git a/bin/failed-build b/bin/failed-build
deleted file mode 120000 (symlink)
index 0b45c3e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-wanna-build
\ No newline at end of file
diff --git a/bin/filter-nonfree b/bin/filter-nonfree
new file mode 100755 (executable)
index 0000000..feb4e16
--- /dev/null
@@ -0,0 +1,71 @@
+#! /usr/bin/python
+
+
+import sys, os.path, gzip, subprocess
+#from debian_bundle import deb822
+import apt_pkg
+
+
+def check_source(ok, srcs, fw):
+    ret=[]
+    for f in srcs:
+        #f = open(f, 'r')
+        f = subprocess.Popen("zcat %s" % (f), shell=True, stdout=subprocess.PIPE).stdout
+        pkg = apt_pkg.ParseTagFile(f)
+        while pkg.Step():
+            if not pkg.Section.get('Package'): continue
+            if pkg.Section.get('Section','').startswith('non-free'):
+                if pkg.Section.get('Autobuild') != 'yes': continue
+                if pkg.Section['Package'] not in ok: continue
+            ret += [pkg.Section['Package']]
+            fw.write(str(pkg.Section))
+            fw.write("\n")
+        f.close()
+    fw.close()
+    return ret
+
+def check_binary(ok, bins, fw):
+    for f in bins:
+        f = subprocess.Popen("zcat %s" % (f), shell=True, stdout=subprocess.PIPE).stdout
+        pkg = apt_pkg.ParseTagFile(f)
+        while pkg.Step():
+            if pkg.Section.get('Source', pkg.Section.get('Package')).split(" ")[0] not in ok: continue
+            fw.write(str(pkg.Section))
+            fw.write("\n")
+        f.close()
+    fw.close()
+
+def outfile(name, file):
+    #return open(dir + "/" + os.path.basename(file), "w")
+    #return open(file + name, "w")
+    if file.endswith(name): return open(file[:-len(name)], "w")
+
+def replarch(arch, pkgs):
+    return [ x.replace('%ARCH%', arch) for x in pkgs ]
+
+def main():
+    # call me:
+    # /org/wanna-build/etc/non-free-include-list "arch1 arch2" write-sources write-packages Sources* . Packages*
+    if len(sys.argv) <= 4:
+        print "Error - too few args"
+        return
+
+    oklist = [ x[:-1].split(' ')[0] for x in open(sys.argv[1]) ]
+    #outsrcs = open(sys.argv[3], "w")
+    #outpkgs = open(sys
+    rem = sys.argv[5:]
+    if '.' not in rem:
+        print "need both Sources and Packages"
+        return
+    src = rem[:rem.index('.')]
+    bin = rem[rem.index('.')+1:]
+    if not src or not bin:
+        print "need non-empty Sources and Packages"
+        return
+    okpkgs = check_source(oklist, src, open(sys.argv[3], "w"))
+    print okpkgs
+    for arch in sys.argv[2].split(" "):
+        check_binary(okpkgs, replarch(arch, bin), open(replarch(arch, [sys.argv[4]])[0], "w"))
+
+if __name__ == '__main__':
+        main()
diff --git a/bin/forget-build b/bin/forget-build
deleted file mode 120000 (symlink)
index 0b45c3e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-wanna-build
\ No newline at end of file
diff --git a/bin/give-back-build b/bin/give-back-build
deleted file mode 120000 (symlink)
index 0b45c3e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-wanna-build
\ No newline at end of file
index 788dcc5eb4185cc35d87c1e4e726ea721fcaf272..dedef69666bd6bc565d658ac42bc5df63878b2d9 100755 (executable)
@@ -27,29 +27,48 @@ my %data;
 
 my $arch = shift @ARGV;
 
-local($/) = ""; # read in paragraph mode
-while (<>) {
-       my( $version, $name, $architecture );
-       $architecture="none"; # better to keep an entry too much than to delete an entry
-       /^Package:\s*(\S+)$/mi and $name = $1;
-       /^Version:\s*(\S+)$/mi and $version = $1;
-       /^Architecture:\s*(\S+)$/mi and $architecture = $1;
-       if (!defined $name or !defined $version) {
-               warn "Stanza without Package or Version\n";
+#Read in all data files:
+for my $file (@ARGV) {
+       if (! -f $file) {
                next;
        }
-       if ($arch ne "source" && defined $architecture && $architecture ne "all" && $architecture ne $arch) {
-               next;
+       my $fh;
+       if ($file =~ /.gz$/) {
+               open($fh, '-|', 'gzip', '-d', '-c', $file) 
+                       or die("Can't open pipe from gzip: $!");
+       } else {
+               open($fh, '<', $file)
+                       or die("Can't open $file: $!");
        }
-       my $key = $name;
 
-       if ((!exists $version{$key}) or version_less($version{$key},$version)) {
-               $version{$key} = $version;
-               $data{$key} = $_;
+       local($/) = ""; # read in paragraph mode
+       while (<$fh>) {
+               my( $version, $name, $architecture );
+               $architecture="none"; # better to keep an entry too much than to delete an entry
+               /^Package:\s*(\S+)$/mi and $name = $1;
+               /^Version:\s*(\S+)$/mi and $version = $1;
+               /^Architecture:\s*(\S+)$/mi and $architecture = $1;
+               if (!defined $name or !defined $version) {
+                       warn "Stanza without Package or Version\n";
+                       next;
+               }
+               if ($arch ne "source" && defined $architecture && $architecture ne "all" && $architecture ne $arch) {
+                       next;
+               }
+               my $key = $name;
+
+               if ((!exists $version{$key}) or version_less($version{$key},$version)) {
+                       $version{$key} = $version;
+                       $data{$key} = $_;
+               }
        }
+
+       close($fh);
 }
+
+#Now output the shortened list:
 foreach (values %data) {
-       chomp; $_ .= "\n\n";
+       chomp; chomp; $_ .= "\n\n";
        print;
 }
 
diff --git a/bin/list-building b/bin/list-building
deleted file mode 120000 (symlink)
index 0b45c3e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-wanna-build
\ No newline at end of file
diff --git a/bin/list-dep-wait b/bin/list-dep-wait
deleted file mode 120000 (symlink)
index 0b45c3e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-wanna-build
\ No newline at end of file
diff --git a/bin/list-failed b/bin/list-failed
deleted file mode 120000 (symlink)
index 0b45c3e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-wanna-build
\ No newline at end of file
diff --git a/bin/list-installed b/bin/list-installed
deleted file mode 120000 (symlink)
index 0b45c3e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-wanna-build
\ No newline at end of file
diff --git a/bin/list-needs-build b/bin/list-needs-build
deleted file mode 120000 (symlink)
index 0b45c3e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-wanna-build
\ No newline at end of file
diff --git a/bin/list-not-for-us b/bin/list-not-for-us
deleted file mode 120000 (symlink)
index 0b45c3e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-wanna-build
\ No newline at end of file
diff --git a/bin/list-uploaded b/bin/list-uploaded
deleted file mode 120000 (symlink)
index 0b45c3e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-wanna-build
\ No newline at end of file
diff --git a/bin/no-build b/bin/no-build
deleted file mode 120000 (symlink)
index 0b45c3e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-wanna-build
\ No newline at end of file
diff --git a/bin/save-database b/bin/save-database
new file mode 100755 (executable)
index 0000000..4bb5fae
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+PREFIX=$1
+
+sudo -u postgres /usr/bin/pg_dumpall --cluster 8.4/wanna-build | gzip > /org/wanna-build/dumps/dump_${PREFIX}_$(date +%Y.%m.%d-%H:%M:%S).gz
+
+# Expire dumps only on post-trigger saves.
+if [ "$PREFIX" = "post" ]
+then
+       (cd /org/wanna-build/dumps && /org/wanna-build/expire_dumps -d . -f "dump_*")
+fi
+
index c8119f12aa74c3ad210d02f4009f0ca60c2b1ade..8298140e55545f595debca9586e8e00b34b49986 100755 (executable)
@@ -50,7 +50,7 @@ debian)
        USER=cimarosa
        BUILDD_QUEUE_OPTIONS="--include=Packages.gz --include=Sources.gz --include=**Release* --exclude=* $RSYNC_OPTIONS"
        rsync --password-file "$PASSWORD_FILE" $MIRROR_OPTIONS $USER@ftp-master.debian.org::debian/dists/ "$TARGET/archive"
-       rsync --password-file "$PASSWORD_BASE/$1-buildd.rsync-password" $BUILDD_QUEUE_OPTIONS $USER@ftp-master.debian.org::buildd-unstable/ "$TARGET/buildd-unstable"
+       rsync --password-file "$PASSWORD_BASE/$1-buildd.rsync-password" $BUILDD_QUEUE_OPTIONS $USER@ftp-master.debian.org::buildd-sid/ "$TARGET/buildd-sid"
        rsync --password-file "$PASSWORD_BASE/$1-buildd.rsync-password" $BUILDD_QUEUE_OPTIONS $USER@ftp-master.debian.org::buildd-experimental/ "$TARGET/buildd-experimental"
        # Also sync the Maintainers and Uploaders files for consumption through the web interface.
        rsync --password-file "$PASSWORD_FILE" $MIRROR_OPTIONS $USER@ftp-master.debian.org::debian/indices/Maintainers /srv/buildd.debian.org/etc/Maintainers
@@ -61,12 +61,9 @@ debian-security)
        USER=cimarosa
        BUILDD_QUEUE_OPTIONS="--include=Packages.gz --include=Sources.gz --include=**Release* --exclude=* $RSYNC_OPTIONS"
        rsync $MIRROR_OPTIONS $USER@security-master.debian.org::debian-security/dists/ "$TARGET/archive"
+       rsync --password-file "$PASSWORD_BASE/$1-buildd.rsync-password" $BUILDD_QUEUE_OPTIONS $USER@security-master.debian.org::buildd-wheezy/ "$TARGET/buildd-wheezy"
        rsync --password-file "$PASSWORD_BASE/$1-buildd.rsync-password" $BUILDD_QUEUE_OPTIONS $USER@security-master.debian.org::buildd-squeeze/ "$TARGET/buildd-squeeze"
        rsync --password-file "$PASSWORD_BASE/$1-buildd.rsync-password" $BUILDD_QUEUE_OPTIONS $USER@security-master.debian.org::buildd-lenny/ "$TARGET/buildd-lenny"
-       rsync --password-file "$PASSWORD_BASE/$1-buildd.rsync-password" $BUILDD_QUEUE_OPTIONS $USER@security-master.debian.org::buildd-etch/ "$TARGET/buildd-etch"
-       [ -h "$TARGET/buildd-testing" ] || ln -sf buildd-squeeze "$TARGET/buildd-testing"
-       [ -h "$TARGET/buildd-stable" ] || ln -sf buildd-lenny "$TARGET/buildd-stable"
-       [ -h "$TARGET/buildd-oldstable" ] || ln -sf buildd-etch "$TARGET/buildd-oldstable"
        ;;
 debian-volatile)
        rsync $MIRROR_OPTIONS volatile-master.debian.org::debian-volatile/dists/ "$TARGET/archive"
diff --git a/bin/uploaded-build b/bin/uploaded-build
deleted file mode 120000 (symlink)
index 0b45c3e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-wanna-build
\ No newline at end of file
index dc5c3dbcbdcd2e797a3654e7c6dcf5fedff4f0c2..5b3afb15c92017c2ab9c8f2e527a984b08cbad8c 100755 (executable)
@@ -32,7 +32,6 @@ die "dbbase is empty\n" if ! $dbbase;
 die "transactlog is empty\n" if ! $transactlog;
 die "mailprog binary $conf::mailprog does not exist or isn't executable\n"
        if !-x $conf::mailprog;
-die "no distributions defined\n" if ! %distributions;
 package main;
 
 use strict;
@@ -40,7 +39,6 @@ use POSIX;
 use FileHandle;
 use File::Copy;
 use DBI;
-use lib '/org/wanna-build/bin';
 use lib '/org/wanna-build/lib';
 #use lib 'lib';
 use WannaBuild;
@@ -61,7 +59,8 @@ our ($verbose, $mail_logs, $list_order, $list_state,
     $category, %catval, %short_category,
     $short_date, $list_min_age, $dbbase, @curr_time,
     $build_priority, %new_vers, $binNMUver, %merge_srcvers, %merge_binsrc,
-    $printformat, $ownprintformat, $privmode, $extra_depends, $extra_conflicts
+    $printformat, $ownprintformat, $privmode, $extra_depends, $extra_conflicts,
+    %distributions, %distribution_aliases
     );
 our $Pas = '/org/buildd.debian.org/etc/packages-arch-specific/Packages-arch-specific';
 our $simulate = 0;
@@ -216,6 +215,8 @@ my %options =
         export         => { arg => \$export_to, mode => "export" },
         import         => { arg => \$import_from, mode => "import" },
         "manual-edit"  => { mode => "manual-edit" },
+        "distribution-architectures" => { mode => "distribution-architectures" },
+        "distribution-aliases" => { mode => "distribution-aliases" },
         );
 
 while( @ARGV && $ARGV[0] =~ /^-/ ) {
@@ -259,9 +260,51 @@ while( @ARGV && $ARGV[0] =~ /^-/ ) {
        }
 }
 
+my $dbh;
+
+END {
+       if (defined $dbh)
+       {
+               $dbh->disconnect or warn $dbh->errstr;
+       }
+}
+
+my $schema_suffix = '';
+$recorduser //= (not -t and $user =~ /^buildd_/);
+if (isin( $op_mode, qw(list info)) && $distribution !~ /security/ && !$recorduser && !($privmode eq 'yes')) {
+       $dbh = DBI->connect("DBI:Pg:service=wanna-build") || 
+               die "FATAL: Cannot open database: $DBI::errstr\n";
+       $schema_suffix = '_public';
+}
+else
+{
+       $dbh = DBI->connect("DBI:Pg:service=wanna-build-privileged") || 
+               die "FATAL: Cannot open database: $DBI::errstr\n";
+}
+
+# TODO: This shouldn't be needed, file a bug.
+$dbh->{pg_server_prepare} = 0;
+
+$dbh->begin_work or die $dbh->errstr;
+
+my $q = 'SELECT distribution, public, auto_dep_wait FROM distributions';
+my $rows = $dbh->selectall_hashref($q, 'distribution');
+foreach my $name (keys %$rows) {
+       $distributions{$name} = {};
+       $distributions{$name}->{'noadw'} = 1 if !($rows->{$name}->{'auto_dep_wait'});
+       $distributions{$name}->{'hidden'} = 1 if !($rows->{$name}->{'public'});
+}
+
+$q = 'SELECT alias, distribution FROM distribution_aliases';
+$rows = $dbh->selectall_hashref($q, 'alias');
+foreach my $name (keys %$rows) {
+       $distribution_aliases{$name} = $rows->{$name}->{'distribution'};
+}
+$distribution = $distribution_aliases{$distribution} if (isin($distribution, keys %distribution_aliases));
+
 $op_mode = $category ? "set-failed" : "set-building"
        if !$op_mode; # default operation
-$distribution ||= "unstable";
+$distribution ||= "sid";
 if ($distribution eq 'any-priv') {
     $privmode = 'yes';
     $distribution = 'any';
@@ -275,7 +318,7 @@ if ($distribution) {
     my @dists = split(/[, ]+/, $distribution);
     foreach my $dist (@dists) {
         die "Bad distribution '$distribution'\n"
-           if !isin($dist, keys %conf::distributions);
+           if !isin($dist, keys %distributions);
     }
 }
 if (!isin ( $op_mode, qw(list) ) && ( !$distribution || $distribution =~ /[ ,]/)) {
@@ -300,7 +343,8 @@ if ($verbose) {
 
 if (!@ARGV && !isin( $op_mode, qw(list merge-quinn merge-partial-quinn import export
                                  merge-packages manual-edit
-                                 merge-sources))) {
+                                 merge-sources distribution-architectures
+                                 distribution-aliases))) {
        warn "No packages given.\n";
        usage();
 }
@@ -362,33 +406,6 @@ $list_order ||= $yamlmap->{"list-order"}{'default'};
 $api //= $yamlmap->{"api"};
 $api //= 0;
 
-my $dbh;
-
-END {
-       if (defined $dbh)
-       {
-               $dbh->disconnect or warn $dbh->errstr;
-       }
-}
-
-my $schema_suffix = '';
-$recorduser //= (not -t and $user =~ /^buildd_/);
-if (isin( $op_mode, qw(list info)) && $distribution !~ /security/ && !$recorduser && !($privmode eq 'yes')) {
-       $dbh = DBI->connect("DBI:Pg:service=wanna-build") || 
-               die "FATAL: Cannot open database: $DBI::errstr\n";
-       $schema_suffix = '_public';
-}
-else
-{
-       $dbh = DBI->connect("DBI:Pg:service=wanna-build-privileged") || 
-               die "FATAL: Cannot open database: $DBI::errstr\n";
-}
-
-# TODO: This shouldn't be needed, file a bug.
-$dbh->{pg_server_prepare} = 0;
-
-$dbh->begin_work or die $dbh->errstr;
-
 process();
 
 $dbh->commit;
@@ -548,6 +565,14 @@ sub process {
                        export_db( $export_to );
                        last SWITCH;
                };
+               /^distribution-architectures/ && do {
+                       show_distribution_architectures();
+                       last SWITCH;
+               };
+               /^distribution-aliases/ && do {
+                       show_distribution_aliases();
+                       last SWITCH;
+               };
 
                die "Unexpected operation mode $op_mode\n";
        }
@@ -797,7 +822,7 @@ sub add_one_attempted {
        }
        elsif ( !pkg_version_eq($pkg, $version) ) {
                print "$name: version mismatch ".
-                         "($pkg->{'version'} ".
+                         "$(pkg->{'version'} ".
                          "by $pkg->{'builder'})\n";
                return;
        }
@@ -829,7 +854,7 @@ sub add_one_built {
        }
        elsif ( !pkg_version_eq($pkg, $version) ) {
                print "$name: version mismatch ".
-                         "($pkg->{'version'} ".
+                         "$(pkg->{'version'} ".
                          "by $pkg->{'builder'})\n";
                return;
        }
@@ -920,7 +945,7 @@ sub add_one_failed {
        }
        elsif ( !pkg_version_eq($pkg, $version) ) {
                print "$name: version mismatch ".
-                         "($pkg->{'version'} ".
+                         "$(pkg->{'version'} ".
                          "by $pkg->{'builder'})\n";
                return;
        }
@@ -1143,6 +1168,11 @@ sub set_one_binnmu {
                        $pkg->{'notes'} = 'out-of-date';
                        $pkg->{'buildpri'} = $pkg->{'permbuildpri'}
                                if (defined $pkg->{'permbuildpri'});
+                       if (defined $distributions{$distribution}{noadw}) {
+                               change_state( \$pkg, 'Installed' );
+                       } else {
+                               change_state( \$pkg, 'BD-Uninstallable' );
+                       }
                }
                log_ta( $pkg, "--binNMU" );
                update_source_info($pkg);
@@ -1164,7 +1194,7 @@ sub set_one_binnmu {
                return;
        }
 
-       if ($distribution eq "unstable") {
+       if (!defined $distributions{$distribution}{noadw}) {
                change_state( \$pkg, 'BD-Uninstallable' );
                $pkg->{'bd_problem'} = "Installability of build dependencies not tested yet";
        }
@@ -2112,7 +2142,7 @@ sub info_packages {
        my( $name, $pkg, $key, $dist );
        my @firstkeys = qw(package version builder state section priority
                                           installed_version previous_state state_change);
-       my @dists = $info_all_dists ? keys %conf::distributions : ($distribution);
+       my @dists = $info_all_dists ? keys %distributions : ($distribution);
        my %beautykeys = ( 'package' => 'Package', 'version' => 'Version', 'builder' => 'Builder',
                'state' => 'State', 'section' => 'Section', 'priority' => 'Priority',
                'installed_version' => 'Installed-Version', 'previous_state' => 'Previous-State',
@@ -2532,7 +2562,7 @@ sub call_edos_depcheck {
     my $srcs = $args->{'srcs'};
     my $key;
     
-    return if defined ($conf::distributions{$distribution}{noadw}) && not defined $args->{'depwait'};
+    return if defined ($distributions{$distribution}{noadw}) && not defined $args->{'depwait'};
 
     # We need to check all of needs-build, as any new upload could make
     # something in needs-build have uninstallable deps
@@ -2542,13 +2572,13 @@ sub call_edos_depcheck {
     my $db = get_all_source_info();
     foreach $key (keys %$db) {
        my $pkg = $db->{$key};
-        if (defined $pkg and isin($pkg->{'state'}, qw/Needs-Build BD-Uninstallable/) and not defined ($conf::distributions{$distribution}{noadw})) {
+        if (defined $pkg and isin($pkg->{'state'}, qw/Needs-Build BD-Uninstallable/) and not defined ($distributions{$distribution}{noadw})) {
                $interesting_packages{$key} = undef;
        }
         if (defined $pkg and isin($pkg->{'state'}, qw/Dep-Wait/) and defined $args->{'depwait'}) {
                $interesting_packages_depwait{$key} = undef;
                 # we always check for BD-Uninstallability in depwait - could be that depwait is satisfied but package is uninstallable
-               $interesting_packages{$key} = undef unless defined ($conf::distributions{$distribution}{noadw});
+               $interesting_packages{$key} = undef unless defined ($distributions{$distribution}{noadw});
        }
     }
     
@@ -2824,6 +2854,22 @@ sub get_all_source_info {
        return $db;
 }
 
+sub show_distribution_architectures {
+       my $q = 'SELECT distribution, spacecat_all(architecture) AS architectures '.
+               'FROM distribution_architectures '.
+               'GROUP BY distribution';
+       my $rows = $dbh->selectall_hashref($q, 'distribution');
+       foreach my $name (keys %$rows) {
+               print $name.': '.$rows->{$name}->{'architectures'}."\n";
+       }
+}
+
+sub show_distribution_aliases {
+       foreach my $alias (keys %distribution_aliases) {
+               print $alias.': '.$distribution_aliases{$alias}."\n";
+       }
+}
+
 sub update_source_info {
        my $pkg = shift;
         $pkg->{'extra_depends'} = $extra_depends if defined $extra_depends;
index e828121266d061bee7bf07200b2dc016ec5399c9..3d7b0d10b070e2e31ba148abc258d59294d30c16 100755 (executable)
@@ -38,7 +38,7 @@ use strict;
 use vars qw($verbose $dist $database);
 
 $verbose = 0;
-$dist = "unstable";
+$dist = "sid";
 $database = "build-db";
 
 while( @ARGV && $ARGV[0] =~ /^-/ ) {
@@ -56,11 +56,6 @@ while( @ARGV && $ARGV[0] =~ /^-/ ) {
                else {
                        $dist = shift @ARGV;
                }
-               $dist = "oldstable"   if $dist eq "o";
-               $dist = "stable"   if $dist eq "s";
-               $dist = "testing"  if $dist eq "t";
-               $dist = "unstable" if $dist eq "u";
-               die "Bad distribution\n" if !isin($dist, qw(stable testing unstable stable-security testing-security oldstable oldstable-security));
        }
        elsif (/^--$/) {
                last;
diff --git a/bin/wb-edos-builddebcheck b/bin/wb-edos-builddebcheck
deleted file mode 100755 (executable)
index 0562a95..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-#!/usr/bin/perl -w
-
-# Copyright (C) 2008 Ralf Treinen <treinen@debian.org>
-# This program is free software: you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation, version 2 of the License.
-
-$debug=0;
-
-# the prefix used to encode source packages
-$sourceprefix="source---";
-
-$architecture="";
-$binexplain=0;
-$edosoptions = "-failures -explain -quiet";
-while ( $arg = shift @ARGV ) {
-    if ( $arg eq '-a' || $arg eq '--architecture' ) {
-       if ($#ARGV == -1) {
-           die "-a option needs a value";
-       } else {
-           $architecture = shift @ARGV;
-       }
-    } elsif ( $arg =~ "--binexplain" || $arg =~ "-be" ) {
-       $binexplain = 1;
-    } elsif ( $arg =~ /^-.*/ ) {
-       die "unrecognized option: $arg";
-    } else {
-       last;
-    }
-}
-
-if ($#ARGV != 0) {
-    die "Usage: edos-debbuildcheck [options] Packages Sources"
-} else {
-    $packagefile = $arg;
-    $sourcesfile = shift(@ARGV);
-}
-
-if ($debug) {
-    print "Arch: $architecture\n";
-    print "Packages: $packagefile\n";
-    print "Sources:  $sourcesfile\n";
-    print "Edos options: $edosoptions\n";
-}
-
-# check that all stanzas in the binary package file have the same
-# architecture.
-$packagearch="";
-open(P,$packagefile);
-while (<P>) {
-    next unless /^Architecture/;
-    next if /^Architecture:\s*all/;
-    /Architecture:\s*([^\s]*)/;
-    if ($packagearch eq "") {
-       $packagearch = $1;
-    } elsif ( $packagearch ne $1) {
-       die "Package file contains different architectures: $packagearch, $1";
-    }
-}
-close P;
-
-if ( $architecture eq "" ) {
-    if ( $packagearch eq "" ) {
-       die "No architecture option given, " .
-           "and no non-all architecture found in the Packages file";
-    } else {
-       $architecture = $packagearch;
-    }
-} else {
-    if ( $packagearch ne "" & $architecture ne $packagearch) {
-       die "Architecture option is $architecture ".
-           "but the package file contains architecture $packagearch";
-    }
-}
-
-open(RESULT,"cat $sourcesfile".
-     "| edos-debcheck $edosoptions '-base FILE' $packagefile |");
-
-$sourcestanza=0;
-$explanation="";
-$binpackage="";
-
-while (<RESULT>) {
-    if (/^\s+/) {
-       if ($sourcestanza) {
-           s/^(\s*)$sourceprefix(.*)depends on/$1$2build-depends on/o;
-           s/^(\s*)$sourceprefix(.*) and (.*) conflict/$1$2 build-conflicts with $3/o;
-           print;
-           if (/depends on ([^\s]*) .*\{.*\}/) {
-               push(@binqueue,$1);
-           }
-       } else {
-           $explanation .= $_;
-       }
-    } else {
-       if ($sourcestanza) {
-           print "\n";
-           $sourcestanza=0;
-       }
-       if ($binpackage ne ""){
-           $binfailures{$binpackage} = $explanation;
-           $binpackage="";
-       }
-       if (/^$sourceprefix(.*) \(.*\): FAILED/o) {
-           print "Package: $1\n";
-           print "Failed-Why:\n";
-           $sourcestanza=1;
-       } elsif (/^([^\s]*) .*: FAILED/) {
-           $binpackage=$1;
-           $explanation=$_;
-           $explanation.=<RESULT>;
-           $sourcestanza=0;
-       } else {
-           # we have someting strange here
-           $sourcestanza=0;
-       }
-    }
-}
-
-close RESULT;
-
-if ($binexplain) {
-    while (@binqueue) {
-       $p=pop(@binqueue);
-       $v=$binfailures{$p};
-       next unless defined $v;
-       $binfailures{$p}="";
-       print "$v" if $v ne "";
-       if ($v=~/depends on ([^\s]*) .*\{.*\}/) {
-           push(@binqueue,$1);
-       }
-    }
-}
-
index b5dce42ed7e18937437c39416dea149db44e61b4..2a952d004b2374ef05cbc525c459917cf5d8e1a9 100755 (executable)
@@ -5,7 +5,7 @@ use strict;
 use vars qw($dist);
 my $previously_built;
 
-$dist = "unstable";
+$dist = "sid";
 
 while( @ARGV && $ARGV[0] =~ /^-/ ) {
        $_ = shift @ARGV;
@@ -19,11 +19,6 @@ while( @ARGV && $ARGV[0] =~ /^-/ ) {
                else {
                        $dist = shift @ARGV;
                }
-               $dist = "oldstable" if $dist eq "o";
-               $dist = "stable"    if $dist eq "s";
-               $dist = "tesing"    if $dist eq "t";
-               $dist = "unstable"  if $dist eq "u";
-               die "Bad distribution\n" if !isin($dist, qw(oldstable stable testing unstable));
        }
        elsif (/^--$/) {
                last;
@@ -48,7 +43,7 @@ foreach $arch (@archs) {
 my($lastmsg, %n_state, $total, %n_builder, $pu_total);
 $pu_total = 0;
 $n_state{"Installed"} = 0;
-open( PIPE, "wanna-build --database=$arch/build-db --dist=$dist --list=all 2>&1 |" )
+open( PIPE, "wanna-build --database=$arch/build-db --dist=$dist --list=all |" )
        or die "Cannot spawn wanna-build: $!\n";
 while( <PIPE> ) {
        if (/^Database for $dist doesn't exist$/) {
diff --git a/bin/wb-make-rev b/bin/wb-make-rev
deleted file mode 100755 (executable)
index dad0946..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/perl -w
-
-use strict;
-
-my $arch = "i386";
-my $suite = "unstable";
-my %dep;
-
-my $in_bd = 0;
-
-open F, "/org/wanna-build/tmp/Sources.$suite-old";
-while (<F>) {
-       if (s/^Build-Depends:// or (/^\s/ and $in_bd)) {
-               foreach my $pkg (split/,|\|/) {
-                       $pkg =~ s/\(.+\)//;
-                       $pkg =~ s/\[.+\]//;
-                       $pkg =~ s/^\s*(\S+)\s*/$1/;
-                       $dep{$pkg} = 1 if $pkg ne "\n";
-               }
-               $in_bd = 1;
-       } else {
-               $in_bd = 0;
-       }
-}
-close F;
-
-open F, "/org/wanna-build/tmp/Packages.$suite.$arch-old";
-while (<F>) {
-       if (s/^Package:
-       if (s/^Depends:// or (/^\s/ and $in_bd)) {
-               foreach my $pkg (split/,|\|/) {
-                       $pkg =~ s/\(.+\)//;
-                       $pkg =~ s/\[.+\]//;
-                       $pkg =~ s/^\s*(\S+)\s*/$1/;
-                       $dep{$pkg} = 1 if $pkg ne "\n";
-               }
-               $in_bd = 1;
-       } else {
-               $in_bd = 0;
-       }
-}
-
-       
-print join ("\n",sort keys %dep);
diff --git a/home/.gitignore b/home/.gitignore
deleted file mode 100644 (file)
index 1ae1ecd..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-.alias
-.bash_history
-.bash_logout
-.bash_profile
-.bashrc
-.cshrc
-.lesshst
-.viminfo
-.zshrc
-attic
diff --git a/lib/WannaBuild.pm b/lib/WannaBuild.pm
new file mode 100644 (file)
index 0000000..dab9a3b
--- /dev/null
@@ -0,0 +1,221 @@
+#
+# WannaBuild.pm: library for wanna-build and sbuild
+# Copyright (C) 2005 Ryan Murray <rmurray@debian.org>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+#
+# $Id$
+#
+
+package WannaBuild;
+
+use strict;
+use POSIX;
+use FileHandle;
+use Time::Local;
+
+require Exporter;
+@WannaBuild::ISA = qw(Exporter);
+@WannaBuild::EXPORT = qw(version_less version_lesseq version_eq
+                       version_compare binNMU_version parse_date isin);
+
+$WannaBuild::opt_correct_version_cmp = 0;
+
+sub version_less {
+       my $v1 = shift;
+       my $v2 = shift;
+       
+       return version_compare( $v1, "<<", $v2 );
+}
+
+sub version_lesseq {
+       my $v1 = shift;
+       my $v2 = shift;
+
+       return version_compare( $v1, "<=", $v2 );
+}
+
+sub version_eq {
+       my $v1 = shift;
+       my $v2 = shift;
+
+       return version_compare( $v1, "=", $v2 );
+}
+
+sub version_compare {
+       my $v1 = shift;
+       my $rel = shift;
+       my $v2 = shift;
+       
+       if ($WannaBuild::opt_correct_version_cmp) {
+               system "dpkg", "--compare-versions", $v1, $rel, $v2;
+               return $? == 0;
+       }
+       else {
+               if ($rel eq "=" || $rel eq "==") {
+                       return $v1 eq $v2;
+               }
+               elsif ($rel eq "<<") {
+                       return do_version_cmp( $v1, $v2 );
+               }
+               elsif ($rel eq "<=" || $rel eq "<") {
+                       return $v1 eq $v2 || do_version_cmp( $v1, $v2 );
+               }
+               elsif ($rel eq ">=" || $rel eq ">") {
+                       return !do_version_cmp( $v1, $v2 );
+               }
+               elsif ($rel eq ">>") {
+                       return $v1 ne $v2 && !do_version_cmp( $v1, $v2 );
+               }
+               else {
+                       warn "version_compare called with bad relation '$rel'\n";
+                       return $v1 eq $2;
+               }
+       }
+}
+
+sub do_version_cmp {
+       my($versa, $versb) = @_;
+       my($epocha,$upstra,$reva);
+       my($epochb,$upstrb,$revb);
+       my($r);
+
+       ($epocha,$upstra,$reva) = split_version($versa);
+       ($epochb,$upstrb,$revb) = split_version($versb);
+
+       # compare epochs
+       return 1 if $epocha < $epochb;
+       return 0 if $epocha > $epochb;
+
+       # compare upstream versions
+       $r = version_cmp_single( $upstra, $upstrb );
+       return $r < 0 if $r != 0;
+
+       # compare Debian revisions
+       $r = version_cmp_single( $reva, $revb );
+       return $r < 0;
+}
+
+sub order {
+       for ($_[0])
+       {
+       /\~/     and return -1;
+       /\d/     and return  0;
+       /[a-z]/i and return ord;
+                    return (ord) + 256;
+       }
+}
+
+sub version_cmp_single {
+       my($versa, $versb) = @_;
+       my($a,$b,$lena,$lenb,$va,$vb,$i);
+
+       for(;;) {
+               # compare non-numeric parts
+               $versa =~ /^([^\d]*)(.*)/; $a = $1; $versa = $2;
+               $versb =~ /^([^\d]*)(.*)/; $b = $1; $versb = $2;
+               $lena = length($a);
+               $lenb = length($b);
+               for( $i = 0; $i < $lena || $i < $lenb; ++$i ) {
+                       $va = $i < $lena ? order(substr( $a, $i, 1 )) : 0;
+                       $vb = $i < $lenb ? order(substr( $b, $i, 1 )) : 0;
+                       return $va - $vb if $va != $vb;
+               }
+               # compare numeric parts
+               $versa =~ /^(\d*)(.*)/; $a = $1; $a ||= 0; $versa = $2;
+               $versb =~ /^(\d*)(.*)/; $b = $1; $b ||= 0; $versb = $2;
+               return $a - $b if $a != $b;
+               return 0 if !$versa && !$versb;
+               if (!$versa) {
+                       return +1 if order(substr( $versb, 0, 1 ) ) < 0;
+                       return -1;
+               }
+               if (!$versb) {
+                       return -1 if order(substr( $versa, 0, 1 ) ) < 0;
+                       return +1;
+               }
+       }
+}
+
+sub split_version {
+       my($vers) = @_;
+       my($epoch,$revision) = (0,"");
+
+       if ($vers =~ /^(\d+):(.*)/) {
+               $epoch = $1;
+               $vers = $2;
+       }
+
+       if ($vers =~ /(.*)-([^-]+)$/) {
+               $revision = $2;
+               $vers = $1;
+       }
+
+       return( $epoch, $vers, $revision );
+}
+
+sub binNMU_version {
+       my $v = shift;
+       my $binNMUver = shift;
+
+       return "$v+b$binNMUver";
+}
+
+
+my %monname = ('jan', 0, 'feb', 1, 'mar', 2, 'apr', 3, 'may', 4, 'jun', 5,
+               'jul', 6, 'aug', 7, 'sep', 8, 'oct', 9, 'nov', 10, 'dec', 11 );
+
+sub parse_date {
+       my $text = shift;
+
+       return 0 if !$text;
+
+       if ($text =~ /^(\d{4}) (\w{3}) (\d+) (\d{2}):(\d{2}):(\d{2})$/) {
+               my ($year, $mon, $day, $hour, $min, $sec) = ($1, $2, $3, $4, $5, $6);
+               $mon =~ y/A-Z/a-z/;
+               die "Invalid month name $mon" if !exists $monname{$mon};
+               $mon = $monname{$mon};
+               return timegm($sec, $min, $hour, $day, $mon, $year);
+       } elsif ($text =~ /^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})(?:\.\d+)?$/) {
+               my ($year, $mon, $day, $hour, $min, $sec) = ($1, $2-1, $3, $4, $5, $6);
+               return timegm($sec, $min, $hour, $day, $mon, $year);
+       } else {
+               die "Cannot parse date: $text\n";
+       }
+}
+
+sub isin {
+       my $val = shift;
+
+       return 0 if !$val;
+
+       return grep( $_ eq $val, @_ );
+}
+
+#sub get_distributions {
+#      my %distributions;
+
+#      my $q = 'SELECT distribution, public, auto_dep_wait FROM distributions';
+#      my $rows = $dbh->selectall_hashref($q, 'distribution');
+#      foreach my $name (keys %$rows) {
+#              $distributions{$name} = {};
+#              $distributions{$name}->{'noadw'} = 1 if ($rows->{$name}->{'auto_dep_wait'});
+#              $distributions{$name}->{'hidden'} = 1 if ($rows->{$name}->{'public'});
+#      }
+
+#      return %distributions;
+#}
+
+1;
diff --git a/libtrigger.sh b/libtrigger.sh
deleted file mode 100644 (file)
index 1c82eaf..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-ARCHS_oldstable="alpha amd64 arm hppa i386 ia64 mips mipsel powerpc s390 sparc"
-ARCHS_stable="alpha amd64 arm armel hppa i386 ia64 mips mipsel powerpc s390 sparc"
-ARCHS_testing="amd64 armel hppa i386 ia64 mips mipsel powerpc s390 sparc kfreebsd-amd64 kfreebsd-i386"
-ARCHS_unstable="$ARCHS_testing alpha hurd-i386"
-CURLOPT="-q -s -S -R -f -Y 10 -y 120 -K /srv/wanna-build/trigger.curlrc"
-
-curl_index () {
-    local url tmpname destname appendname curlopt
-    url="$1"
-    destname="$2"
-    appendname="$3"
-    tmpname=".$destname"
-    rc=0
-    rm -f "$tmpname"
-    if [ -e "$destname" ]; then
-       refdate=`perl -e "print scalar gmtime(((stat ('$destname'))[9]))"`
-        curl $CURLOPT -z "$refdate" "$url" -o "$tmpname"
-        rc=$?
-    else
-       curl $CURLOPT "$url" -o "$tmpname"
-       rc=$?
-    fi
-    if [ $rc -eq 0 -a -e "$tmpname" ]; then
-       if gzip -t "$tmpname"; then
-           mv "$tmpname" "$destname"
-       else
-           rc=$?
-       fi
-    fi
-    gzip -dc "$destname" >> "$appendname"
-    return $rc
-}
-
diff --git a/postrelease b/postrelease
deleted file mode 100644 (file)
index da81f80..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/sh
-# Meant to be run from the /srv/wanna-build/db dir
-
-set -e
-
-# lenny -> squeeze move
-ARCHS_old_stable="alpha amd64 arm hppa i386 ia64 mips mipsel powerpc s390 sparc"
-ARCHS_new_stable="alpha amd64 arm armel hppa i386 ia64 mips mipsel powerpc s390 sparc"
-ARCHS_new_testing="alpha amd64 armel hppa i386 ia64 mips mipsel powerpc s390 sparc"
-
-#for a in $ALL_ARCHS; do
-#   rm $a/build-db-oldstable
-#   rm $a/build-db-oldstable-security
-#done
-
-for a in $ARCHS_old_stable; do
-    mv $a/build-db-stable $a/build-db-oldstable
-    mv $a/build-db-stable-security $a/build-db-oldstable-security
-done
-
-for a in $ARCHS_new_stable; do
-    mv $a/build-db-testing $a/build-db-stable
-    mv $a/build-db-testing-security $a/build-db-stable-security
-done
-
-for a in $ARCHS_new_testing; do
-    group=wb-$a
-    chmod 400 $a/build-db-stable
-    cp -a $a/build-db-stable $a/build-db-testing
-    wanna-build -b $a/build-db -d testing-security --create-db --list all
-    if [ "$a" = "powerpc" ]; then
-        group=wb-ppc
-    fi
-    if [ "$a" = "mipsel" ]; then
-        group=wb-mips
-    fi
-    if [ "$a" = "amd64" ]; then
-        group=wb-i386
-    fi
-    if [ "$a" = "armel" ]; then
-        group=wb-arm
-    fi
-    chgrp $group $a/build-db-testing*
-    chmod 000 $a/build-db-testing
-    chmod 000 $a/build-db-testing-security
-done
-
-# Important!  And rebuild it afterwards, check for sanity.
-#rm ../tmp/*
index 71ce5cc3dd453a782b8292895dd7b6e17240d1d8..4c0778b509d95c1482c1c629042d25c481497e2d 100644 (file)
@@ -9,10 +9,10 @@ ARCHIVE_BASE="/org/wanna-build/tmp/archive/${ARCHIVE}"
 PAS_BASE="/org/buildd.debian.org/web/quinn-diff"
 PAS_FILE="$PAS_BASE/$SUITE/Packages-arch-specific"
 LOCKFILE="${ARCHIVE_BASE}/lock"
-ARCHS_etch="alpha amd64 arm hppa i386 ia64 mips mipsel powerpc s390 sparc"
 ARCHS_lenny="alpha amd64 arm armel hppa i386 ia64 mips mipsel powerpc s390 sparc"
-ARCHS_squeeze="amd64 armel hppa i386 ia64 mips mipsel powerpc s390 sparc kfreebsd-amd64 kfreebsd-i386"
-ARCHS_unstable="$ARCHS_squeeze alpha hurd-i386"
+ARCHS_squeeze="amd64 armel i386 ia64 mips mipsel powerpc s390 sparc kfreebsd-amd64 kfreebsd-i386"
+ARCHS_wheezy="amd64 armel i386 ia64 mips mipsel powerpc s390 sparc kfreebsd-amd64 kfreebsd-i386"
+ARCHS_sid="$ARCHS_squeeze alpha hppa hurd-i386"
 
 # Creates a working environment within the corresponding archive
 # directory and jumps there.
@@ -25,13 +25,13 @@ ensure_workdir() {
 get_architectures() {
     SUITE="$1"
 
-    if [ "$SUITE" = "etch" -o "$SUITE" = "oldstable" ]; then echo $ARCHS_etch
-    elif [ "$SUITE" = "lenny" -o "$SUITE" = "stable" ]; then echo $ARCHS_lenny
-    elif [ "$SUITE" = "squeeze" -o "$SUITE" = "testing" ]; then echo $ARCHS_squeeze
-    elif [ "$SUITE" = "unstable" -o "$SUITE" = "sid" ]; then echo $ARCHS_unstable
-    elif [ "$SUITE" = "experimental" ]; then echo $ARCHS_unstable
+    if [ "$SUITE" = "lenny" -o "$SUITE" = "oldstable" ]; then echo $ARCHS_lenny
+    elif [ "$SUITE" = "squeeze" -o "$SUITE" = "stable" ]; then echo $ARCHS_squeeze
+    elif [ "$SUITE" = "wheezy" -o "$SUITE" = "testing" ]; then echo $ARCHS_wheezy
+    elif [ "$SUITE" = "unstable" -o "$SUITE" = "sid" ]; then echo $ARCHS_sid
+    elif [ "$SUITE" = "experimental" ]; then echo $ARCHS_sid
     else
-        echo "Unknown suite encountered, aborting." >2
+        echo "Unknown suite encountered, aborting." >&2
         exit 1
     fi
 }
@@ -62,9 +62,9 @@ trigger_wb_update() {
 
     echo "`date`: Processing ${ARCHIVE}/${SUITE} ..."
 
-    new-keep-latest source $(eval echo ${SOURCES}) > Sources.${SUITE}
+    keep-latest source $(eval echo ${SOURCES}) > Sources.${SUITE}
     for ARCH in ${ARCHS}; do
-        new-keep-latest ${ARCH} $(eval echo $(echo ${PACKAGES} | sed -e 's/%ARCH%/${ARCH}/g')) > Packages.${SUITE}.${ARCH}
+        keep-latest ${ARCH} $(eval echo $(echo ${PACKAGES} | sed -e 's/%ARCH%/${ARCH}/g')) > Packages.${SUITE}.${ARCH}
     done
     [ -f Packages.${SUITE}.i386.non-free ] && PNF="Packages.${SUITE}.%ARCH%.non-free" || PNF=""
     [ -f Sources.${SUITE}.non-free ] && SNF="Sources.${SUITE}.non-free" || SNF=""
@@ -90,14 +90,16 @@ trigger_wb_update_for_overlay() {
 
     echo "`date`: Processing ${ARCHIVE}/${SUITE} ..."
 
-    new-keep-latest source $(eval echo ${SOURCES}) > Sources.${SUITE}
-    new-keep-latest source $(eval echo Sources.${SUITE} ${SOURCES_BASE}) > Sources.${SUITE}-all
+    keep-latest source $(eval echo ${SOURCES}) > Sources.${SUITE}
+    keep-latest source $(eval echo Sources.${SUITE} ${SOURCES_BASE}) > Sources.${SUITE}-all
     for ARCH in ${ARCHS}; do
-        new-keep-latest ${ARCH} $(eval echo $(echo ${PACKAGES} | sed -e 's/%ARCH%/${ARCH}/g')) > Packages.${SUITE}.${ARCH}
-        new-keep-latest ${ARCH} Packages.${SUITE}.${ARCH} $(eval echo $(echo ${PACKAGES_BASE} | sed -e 's/%ARCH%/${ARCH}/g')) > Packages.${SUITE}.${ARCH}-all
+        keep-latest ${ARCH} $(eval echo $(echo ${PACKAGES} | sed -e 's/%ARCH%/${ARCH}/g')) > Packages.${SUITE}.${ARCH}
+        keep-latest ${ARCH} Packages.${SUITE}.${ARCH} $(eval echo $(echo ${PACKAGES_BASE} | sed -e 's/%ARCH%/${ARCH}/g')) > Packages.${SUITE}.${ARCH}-all
     done
     [ -f Packages.${SUITE}.i386.non-free ] && PNF="Packages.${SUITE}.%ARCH%.non-free" || PNF=""
     [ -f Sources.${SUITE}.non-free ] && SNF="Sources.${SUITE}.non-free" || SNF=""
+    echo parallel -l 5 -i wanna-build -v --Pas ${PAS_FILE} --merge-v3 -A "{}" --dist=$WB_SUITE Packages.${SUITE}.%ARCH% $PNF . Sources.${SUITE} $SNF . \
+        Packages.${SUITE}.%ARCH%-all . Sources.${SUITE}-all $SNF -- ${ARCHS} 
     parallel -l 5 -i wanna-build -v --Pas ${PAS_FILE} --merge-v3 -A "{}" --dist=$WB_SUITE Packages.${SUITE}.%ARCH% $PNF . Sources.${SUITE} $SNF . \
         Packages.${SUITE}.%ARCH%-all . Sources.${SUITE}-all $SNF -- ${ARCHS} || true
 
@@ -125,10 +127,10 @@ trigger_wb_update_with_secondary() {
 
     echo "`date`: Processing ${ARCHIVE}/${SUITE} ..."
 
-    new-keep-latest source $(eval echo ${SOURCES}) > Sources.${SUITE}
+    keep-latest source $(eval echo ${SOURCES}) > Sources.${SUITE}
 
     for ARCH in ${ARCHS}; do
-        new-keep-latest ${ARCH} $(eval echo $(echo ${PACKAGES} | sed -e 's/%ARCH%/${ARCH}/g')) > Packages.${SUITE}.${ARCH}
+        keep-latest ${ARCH} $(eval echo $(echo ${PACKAGES} | sed -e 's/%ARCH%/${ARCH}/g')) > Packages.${SUITE}.${ARCH}
         ucat Packages.${SUITE}.${ARCH} $(eval echo $(echo ${PACKAGES_BASE} | sed -e 's/%ARCH%/${ARCH}/g')) > Packages.${SUITE}.${ARCH}-all
     done
     [ -f Packages.${SUITE}.i386.non-free ] && PNF="Packages.${SUITE}.%ARCH%.non-free" || PNF=""
@@ -156,3 +158,11 @@ ucat() {
       fi
     done
 }
+
+filter_out_nonfree() {
+    INPUT="$1"
+    OUTPUT="$2"
+
+    gunzip -c "$INPUT" | grep-dctrl -v -r -F Section 'non-free/.*' | gzip -c > "$OUTPUT"
+}
+
diff --git a/triggers/filter-nonfree b/triggers/filter-nonfree
deleted file mode 100755 (executable)
index feb4e16..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-#! /usr/bin/python
-
-
-import sys, os.path, gzip, subprocess
-#from debian_bundle import deb822
-import apt_pkg
-
-
-def check_source(ok, srcs, fw):
-    ret=[]
-    for f in srcs:
-        #f = open(f, 'r')
-        f = subprocess.Popen("zcat %s" % (f), shell=True, stdout=subprocess.PIPE).stdout
-        pkg = apt_pkg.ParseTagFile(f)
-        while pkg.Step():
-            if not pkg.Section.get('Package'): continue
-            if pkg.Section.get('Section','').startswith('non-free'):
-                if pkg.Section.get('Autobuild') != 'yes': continue
-                if pkg.Section['Package'] not in ok: continue
-            ret += [pkg.Section['Package']]
-            fw.write(str(pkg.Section))
-            fw.write("\n")
-        f.close()
-    fw.close()
-    return ret
-
-def check_binary(ok, bins, fw):
-    for f in bins:
-        f = subprocess.Popen("zcat %s" % (f), shell=True, stdout=subprocess.PIPE).stdout
-        pkg = apt_pkg.ParseTagFile(f)
-        while pkg.Step():
-            if pkg.Section.get('Source', pkg.Section.get('Package')).split(" ")[0] not in ok: continue
-            fw.write(str(pkg.Section))
-            fw.write("\n")
-        f.close()
-    fw.close()
-
-def outfile(name, file):
-    #return open(dir + "/" + os.path.basename(file), "w")
-    #return open(file + name, "w")
-    if file.endswith(name): return open(file[:-len(name)], "w")
-
-def replarch(arch, pkgs):
-    return [ x.replace('%ARCH%', arch) for x in pkgs ]
-
-def main():
-    # call me:
-    # /org/wanna-build/etc/non-free-include-list "arch1 arch2" write-sources write-packages Sources* . Packages*
-    if len(sys.argv) <= 4:
-        print "Error - too few args"
-        return
-
-    oklist = [ x[:-1].split(' ')[0] for x in open(sys.argv[1]) ]
-    #outsrcs = open(sys.argv[3], "w")
-    #outpkgs = open(sys
-    rem = sys.argv[5:]
-    if '.' not in rem:
-        print "need both Sources and Packages"
-        return
-    src = rem[:rem.index('.')]
-    bin = rem[rem.index('.')+1:]
-    if not src or not bin:
-        print "need non-empty Sources and Packages"
-        return
-    okpkgs = check_source(oklist, src, open(sys.argv[3], "w"))
-    print okpkgs
-    for arch in sys.argv[2].split(" "):
-        check_binary(okpkgs, replarch(arch, bin), open(replarch(arch, [sys.argv[4]])[0], "w"))
-
-if __name__ == '__main__':
-        main()
index 96d29a781e5a50a498487a8a259756159c4539ac..58d20f574f79867dd19a1befe9f45925c0a3c20c 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/bash
-# vim:set et ts=4 sw=4 ft=bash ai:
+# vim:set et ts=4 sw=4 ft=sh ai:
 
 ARCHIVE="backports"
 
@@ -27,7 +27,7 @@ main() {
     sync.sh $ARCHIVE nolock
 
     # Autodetect suites by inspecting the directories in dists/.
-    SUITES="$(find ${ARCHIVE_BASE}/archive/ -maxdepth 1 -mindepth 1 -type d | \
+    SUITES="$(find ${ARCHIVE_BASE}/archive/ -maxdepth 1 -mindepth 1 -type d -name '*-backports' | \
         xargs -n 1 basename | \
         sort | uniq)"
 
@@ -37,7 +37,23 @@ main() {
         SOURCES="${ARCHIVE_BASE}/archive/${suite}/{main,contrib}/source/Sources.gz"
         PACKAGES="${ARCHIVE_BASE}/archive/${suite}/{main,contrib}/binary-%ARCH%/Packages.gz"
         PACKAGES_BASE="${ARCHIVE_MAIN}/archive/${base_suite}/{main,contrib}/binary-%ARCH%/Packages.gz"
-        trigger_wb_update_with_secondary "$base_suite" "`get_architectures $base_suite`" "$PACKAGES_BASE" "$SOURCES" "$PACKAGES" "$suite"
+        trigger_wb_update_with_secondary "$suite" "`get_architectures $base_suite`" "$PACKAGES_BASE" "$SOURCES" "$PACKAGES" "$suite"
+    done
+
+    # Now the sloppy ones, which are a bit different.
+    SUITES="$(find ${ARCHIVE_BASE}/archive/ -maxdepth 1 -mindepth 1 -type d -name '*-backports-sloppy' | \
+        xargs -n 1 basename | \
+        sort | uniq)"
+
+    for suite in $SUITES
+    do
+        base_suite=${suite%%-backports-sloppy}
+        base_bpo_suite=${suite%%-sloppy}
+        SOURCES="${ARCHIVE_BASE}/archive/${suite}/{main,contrib}/source/Sources.gz"
+        PACKAGES="${ARCHIVE_BASE}/archive/${suite}/{main,contrib}/binary-%ARCH%/Packages.gz"
+        PACKAGES_BASE="${ARCHIVE_MAIN}/archive/${base_suite}/{main,contrib}/binary-%ARCH%/Packages.gz"
+        PACKAGES_BASE="${PACKAGES_BASE} ${ARCHIVE_BASE}/archive/${base_bpo_suite}/{main,contrib}/binary-%ARCH%/Packages.gz"
+        trigger_wb_update_with_secondary "$suite" "`get_architectures $base_suite`" "$PACKAGES_BASE" "$SOURCES" "$PACKAGES" "$suite"
     done
 
     cleanup
index 26265c7188e432ef9e9f5bc55a6feb4efd2115a8..88c24fd924980b1528f1e788c8c97e411bf24d58 100755 (executable)
@@ -2,16 +2,16 @@
 # vim:set et ts=4 sw=4 ft=sh ai:
 
 ARCHIVE="debian"
-SUITES="stable testing
+SUITES="lenny squeeze wheezy
 # Please note that SUITES_FAST_AUTOBUILD does not pull proposed-updates
 # because there was no need for that yet.
-SUITES_FAST_AUTOBUILD="unstable experimental"
+SUITES_FAST_AUTOBUILD="sid experimental"
 
 . /org/wanna-build/triggers/common
 
 exec >> /org/wanna-build/db/merge.$ARCHIVE.log 2>&1
 
-if [ -f /org/wanna-build/NO-TRIGGERS ]
+if [ -f /org/wanna-build/NO-TRIGGERS -a -z "$1" ]
 then
     echo Trigger for $ARCHIVE skipped due to NO-TRIGGERS, aborting. >&2
     exit 0
@@ -32,8 +32,12 @@ main_sync() {
         # files for -proposed-updates itself and additionally for
         # debian-installer.
         SOURCES="${ARCHIVE_BASE}/archive/${SUITE}-proposed-updates/{main,contrib}/source/Sources.gz"
+        NFSOURCES="${ARCHIVE_BASE}/archive/${SUITE}-proposed-updates/non-free/source/Sources.gz"
         PACKAGES="${ARCHIVE_BASE}/archive/${SUITE}-proposed-updates/{main,contrib}/binary-%ARCH%/Packages.gz"
         PACKAGES="${PACKAGES} ${ARCHIVE_BASE}/archive/${SUITE}-proposed-updates/{main,contrib}/debian-installer/binary-%ARCH%/Packages.gz"
+        NFPACKAGES="${ARCHIVE_BASE}/archive/${SUITE}-proposed-updates/non-free/binary-%ARCH%/Packages.gz"
+        NFPACKAGES="${NFPACKAGES} ${ARCHIVE_BASE}/archive/${SUITE}-proposed-updates/non-free/debian-installer/binary-%ARCH%/Packages.gz"
+        /org/wanna-build/bin/filter-nonfree /org/wanna-build/etc/non-free-include-list "`get_architectures $SUITE`" Sources.${SUITE}.non-free Packages.${SUITE}.%ARCH%.non-free ${NFSOURCES} . ${NFPACKAGES} || true
         # Now add the overlay suite as above.
         SOURCES_BASE="${ARCHIVE_BASE}/archive/${SUITE}/{main,contrib}/source/Sources.gz"
         PACKAGES_BASE="${ARCHIVE_BASE}/archive/${SUITE}/{main,contrib}/binary-%ARCH%/Packages.gz"
@@ -44,21 +48,22 @@ main_sync() {
     for SUITE in $SUITES_FAST_AUTOBUILD
     do
         SOURCES="${ARCHIVE_BASE}/archive/${SUITE}/{main,contrib}/source/Sources.gz"
-        SOURCES="${SOURCES} ${ARCHIVE_BASE}/buildd-${SUITE}/Sources.gz"
+        filter_out_nonfree "${ARCHIVE_BASE}/buildd-${SUITE}/Sources.gz" "Sources.${SUITE}.incoming-filtered.gz"
+        SOURCES="${SOURCES} Sources.${suite}.incoming-filtered.gz"
         NFSOURCES="${ARCHIVE_BASE}/archive/${SUITE}/non-free/source/Sources.gz"
         PACKAGES="${ARCHIVE_BASE}/archive/${SUITE}/{main,contrib}/binary-%ARCH%/Packages.gz"
         PACKAGES="${PACKAGES} ${ARCHIVE_BASE}/archive/${SUITE}/{main,contrib}/debian-installer/binary-%ARCH%/Packages.gz"
         PACKAGES="${PACKAGES} ${ARCHIVE_BASE}/buildd-${SUITE}/Packages.gz"
         NFPACKAGES="${ARCHIVE_BASE}/archive/${SUITE}/non-free/binary-%ARCH%/Packages.gz"
         NFPACKAGES="${NFPACKAGES} ${ARCHIVE_BASE}/archive/${SUITE}/non-free/debian-installer/binary-%ARCH%/Packages.gz"
-        /org/wanna-build/triggers/filter-nonfree /org/wanna-build/etc/non-free-include-list "`get_architectures $SUITE`" Sources.${SUITE}.non-free Packages.${SUITE}.%ARCH%.non-free ${NFSOURCES} . ${NFPACKAGES} || true
+        /org/wanna-build/bin/filter-nonfree /org/wanna-build/etc/non-free-include-list "`get_architectures $SUITE`" Sources.${SUITE}.non-free Packages.${SUITE}.%ARCH%.non-free ${NFSOURCES} . ${NFPACKAGES} || true
 
         if [ "$SUITE" != "experimental" ]
         then
             # The "it's not an overlay" part.
             trigger_wb_update "${SUITE}" "`get_architectures ${SUITE}`" "$SOURCES" "$PACKAGES"
         else
-            BASE_SUITE=unstable
+            BASE_SUITE=sid
             PACKAGES_BASE="${ARCHIVE_MAIN}/archive/${BASE_SUITE}/{main,contrib}/binary-%ARCH%/Packages.gz"
             PACKAGES_BASE="${PACKAGES_BASE} ${ARCHIVE_MAIN}/archive/${BASE_SUITE}/{main,contrib}/debian-installer/binary-%ARCH%/Packages.gz"
             #PACKAGES_BASE="${PACKAGES_BASE} ${ARCHIVE_MAIN}/buildd-${BASE_SUITE}/Packages.gz"
index e7f9980ef2c25bc2a87657dcade7d3e902f16511..0bee1705ace15c16b398a58806e3976f37597a4b 100755 (executable)
@@ -26,9 +26,10 @@ main() {
     sync.sh $ARCHIVE nolock
 
     # Handle unstable as a normal suite.
-    suite=unstable
+    suite=sid
     SOURCES="${ARCHIVE_BASE}/archive/${suite}/{main,contrib}/source/Sources.gz"
-    SOURCES="${SOURCES} ${ARCHIVE_BASE}/buildd-${suite}/Sources.gz"
+    filter_out_nonfree "${ARCHIVE_BASE}/buildd-${suite}/Sources.gz" "Sources.${suite}.incoming-filtered.gz"
+    SOURCES="${SOURCES} Sources.${suite}.incoming-filtered.gz"
     PACKAGES="${ARCHIVE_BASE}/archive/${suite}/{main,contrib}/binary-%ARCH%/Packages.gz"
     PACKAGES="${PACKAGES} ${ARCHIVE_BASE}/archive/${suite}/main/debian-installer/binary-%ARCH%/Packages.gz"
     PACKAGES="${PACKAGES} ${ARCHIVE_BASE}/buildd-${suite}/Packages.gz"
@@ -36,9 +37,10 @@ main() {
 
     # Handle experimental as an overlay suite.
     suite=experimental
-    base_suite=unstable
+    base_suite=sid
     SOURCES="${ARCHIVE_BASE}/archive/${suite}/{main,contrib}/source/Sources.gz"
-    SOURCES="${SOURCES} ${ARCHIVE_BASE}/buildd-${suite}/Sources.gz"
+    filter_out_nonfree "${ARCHIVE_BASE}/buildd-${suite}/Sources.gz" "Sources.${suite}.incoming-filtered.gz"
+    SOURCES="${SOURCES} Sources.${suite}.incoming-filtered.gz"
     PACKAGES="${ARCHIVE_BASE}/archive/${suite}/{main,contrib}/binary-%ARCH%/Packages.gz"
     PACKAGES="${PACKAGES} ${ARCHIVE_BASE}/buildd-${suite}/Packages.gz"
 
index e92e7fc820f8f2f3ab48268ecdcaf92e51672a0d..654b177361197b2894ce752b7d510a43c6b6e49a 100755 (executable)
@@ -11,7 +11,7 @@ exec >> /org/wanna-build/db/merge.$ARCHIVE.log 2>&1
 
 if [ -f /org/wanna-build/NO-TRIGGERS ]
 then
-    echo Trigger for $ARCHIVE skipped due to NO-TRIGGERS, aborting. >2
+    echo Trigger for $ARCHIVE skipped due to NO-TRIGGERS, aborting. >&2
     exit 0
 fi
 
index 0a91dca3e6c159e6d0bb53786f3bdc436576f58a..a4e874e0f60d0de623d8a3469233c622047e17a9 100755 (executable)
@@ -9,7 +9,7 @@ exec >> /org/wanna-build/db/merge.$ARCHIVE.log 2>&1
 
 if [ -f /org/wanna-build/NO-TRIGGERS ]
 then
-    echo Trigger for $ARCHIVE skipped due to NO-TRIGGERS, aborting. >2
+    echo Trigger for $ARCHIVE skipped due to NO-TRIGGERS, aborting. >&2
     exit 0
 fi