]> git.decadent.org.uk Git - dak.git/commitdiff
Merge from Joachim
authorJoerg Jaspert <joerg@debian.org>
Wed, 6 Aug 2008 23:20:23 +0000 (01:20 +0200)
committerJoerg Jaspert <joerg@debian.org>
Wed, 6 Aug 2008 23:20:23 +0000 (01:20 +0200)
ChangeLog
config/debian/cron.unchecked [changed mode: 0644->0755]
config/debian/cron.weekly
dak/process_accepted.py
daklib/dak_exceptions.py
scripts/debian/ssh-move [deleted file]
scripts/nfu/get-w-b-db

index 74879a3bd06dd467b08d606423efc872081d9271..4bb52a3dd581c1973329c8e582838b0d5aff7479 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2008-08-07  Joerg Jaspert  <joerg@debian.org>
+
+       * dak/process_accepted.py (install): Error out with the new
+       exception if we dont know the source package for a file we want to
+       install. Shouldn't ever hit us, but better safe than sorry.
+
+       * daklib/dak_exceptions.py (dakerrors): new exception - no source field.
+
+2008-08-05  Joerg Jaspert  <joerg@debian.org>
+
+       * config/debian/cron.unchecked: disable the ssh-move insanity (and
+       as soon as rietz is back online - replace it with a one-line scp
+       or rsync statement followed by a one-line rm)
+       And now replaced this 128 line perl "not-invented-here" with a
+       one-line rsync command, using a feature rsync only understands
+       since sarge - damn new-fangled technology.
+
 2008-08-05  Joachim Breitner <nomeata@debian.org>
 
        * dak/cruft_report.py: In full mode, report out-of-date binaries on
old mode 100644 (file)
new mode 100755 (executable)
index 0e59573..92f40cc
@@ -33,7 +33,7 @@ if lockfile -r3 $LOCKFILE; then
                echo "--" >> $report
 
                # sync with debbugs
-               $scriptsdir/ssh-move --server --ssh-identity /srv/ftp.debian.org/s3kr1t/id_debbugs-vt --ssh-move-path /home/debbugs/ssh-move --from-directory $queuedir/bts_version_track --to-directory /org/bugs.debian.org/versions/queue/ftp-master debbugs@bugs.debian.org \*.debinfo \*.versions
+               rsync -aq --remove-source-files  $queuedir/bts_version_track/ bugs-sync:/org/bugs.debian.org/versions/queue/ftp-master/
 
                if lockfile -r3 $NOTICE; then
                        LOCKDAILY="YES"
index 9a4c56f141f57d466652ca462199d56feb1420f2..4baaf46c3a7c9e482ecfce074b1d1298111784fd 100755 (executable)
@@ -50,7 +50,7 @@ apt-ftparchive -q clean apt.conf
 apt-ftparchive -q clean apt.conf.buildd
 
 # Update wanna-build dump
-echo "Update wanan-build database dump"
+echo "Update wanna-build database dump"
 /org/ftp.debian.org/scripts/nfu/get-w-b-db
 
 echo "Finally, all is done, compressing logfile"
index e99c35b359bdce6cec908225e32c1f20ce42ef5e..94c2ea3074980e540f4b4adf0058fc787dc8c1f5 100755 (executable)
@@ -35,6 +35,7 @@ from daklib import database
 from daklib import logging
 from daklib import queue
 from daklib import utils
+from daklib.dak_exceptions import *
 
 ###############################################################################
 
@@ -354,8 +355,7 @@ def install ():
                 projectB.query("INSERT INTO binaries (package, version, maintainer, source, architecture, file, type, sig_fpr) VALUES ('%s', '%s', %d, %d, %d, %d, '%s', %d)"
                                % (package, version, maintainer_id, source_id, architecture_id, files[file]["files id"], type, fingerprint_id))
             else:
-                projectB.query("INSERT INTO binaries (package, version, maintainer, architecture, file, type, sig_fpr) VALUES ('%s', '%s', %d, %d, %d, '%s', %d)"
-                               % (package, version, maintainer_id, architecture_id, files[file]["files id"], type, fingerprint_id))
+                raise NoSourceFieldError, "Unable to find a source id for %s (%s), %s, file %s, type %s, signed by %s" % (package, version, architecture, file, type, sig_fpr)
             for suite in changes["distribution"].keys():
                 suite_id = database.get_suite_id(suite)
                 projectB.query("INSERT INTO bin_associations (suite, bin) VALUES (%d, currval('binaries_id_seq'))" % (suite_id))
index b52e0657f6285629f9b540cd72908335de1989b6..4e795461532e6b6284057b5a961ac88d329c83be 100644 (file)
@@ -48,7 +48,8 @@ dakerrors = {
     "FileExistsError":     """Exception raised when destination file exists.""",
     "SendmailFailedError": """Exception raised when Sendmail invocation failed.""",
     "NoFreeFilenameError": """Exception raised when no alternate filename was found.""",
-    "TransitionsError":    """Exception raised when transitions file can't be parsed."""
+    "TransitionsError":    """Exception raised when transitions file can't be parsed.""",
+    "NoSourceFieldError":  """Exception raised - we cant find the source - wtf?"""
 }
 
 def construct_dak_exception(name, description):
diff --git a/scripts/debian/ssh-move b/scripts/debian/ssh-move
deleted file mode 100755 (executable)
index ab820a7..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-#! /usr/bin/perl -w
-use strict;
-
-use IPC::Open2;
-
-$ENV{LANG} = "C";
-
-# The protocol consists of repeated exchanges of the following:
-#
-#   S: <filename>
-#   S: <each line of file, with dot-stuffing as in SMTP>
-#   S: .
-#   C: [writes file]
-#   C: <filename>
-#   S: [unlinks file]
-
-my $server = 0;
-my $verbose = 0;
-my $nonint = 0;
-my $sshidentity;
-my $sshmovepath = 'ssh-move';
-my $fromdir;
-my $todir;
-
-while (@ARGV) {
-    local $_ = shift @ARGV;
-    if (/^--server$/) {
-       $server = 1;
-    } elsif (/^--verbose$/) {
-       $verbose = 1;
-    } elsif (/^--ssh-identity$/) {
-       $sshidentity = shift @ARGV;
-    } elsif (/^--ssh-move-path$/) {
-       $sshmovepath = shift @ARGV;
-    } elsif (/^--from-directory$/) {
-       $fromdir = shift @ARGV;
-    } elsif (/^--to-directory$/) {
-       $todir = shift @ARGV;
-    } elsif (/^--non-interactive$/) {
-        $nonint = 1;
-    } else {
-       unshift @ARGV, $_;
-       last;
-    }
-}
-
-local $| = 1;
-
-
-my ($in, $out) = (*STDIN, *STDOUT);
-
-unless ($nonint) {
-    my $servername = shift @ARGV;
-    local (*READER, *WRITER);
-
-    my @args = ('ssh');
-    push @args, '-i', $sshidentity if defined $sshidentity;
-
-    push @args, $servername, $sshmovepath;
-    push @args, '--server' unless ($server);
-    push @args, '--to-directory', $todir if (defined $todir && $server);
-    push @args, '--from-directory', $fromdir if (defined $fromdir && !$server);
-    push @args, '--non-interactive';
-    push @args, map quotemeta, @ARGV unless ($server);
-
-    my $pid = open2 (\*READER, \*WRITER, @args);
-
-    ($in, $out) = (*READER, *WRITER);
-}
-
-sub server ()
-{
-    chdir $fromdir if defined $fromdir;
-
-    my @files = map glob, @ARGV;
-
-    for my $file (@files) {
-       print $out "$file\n" or die "can't print to client: $!";
-       open FILE, "< $file" or die "can't open $file: $!\n";
-       local $_;
-       while (<FILE>) {
-           chomp;
-           $_ = ".$_" if /^\./;
-           print $out "$_\n" or die "can't print to client: $!";
-       }
-       print $out ".\n" or die "can't print to client: $!";
-
-       my $confirm = <$in>;
-       chomp $confirm if defined $confirm;
-       unlink $file if defined $confirm and $confirm eq $file;
-    }
-}
-
-sub client ()
-{
-    chdir $todir if defined $todir;
-
-    my $file;
-    while (defined ($file = <$in>)) {
-       chomp $file;
-       print STDERR $file if $verbose;
-       (my $tmpfile = $file) =~ s[.*/][];
-       $tmpfile .= ".$$.tmp";
-       # TODO: unlink $tmpfile if things go wrong
-       open TMP, "> $tmpfile" or die "can't open $tmpfile: $!";
-       local $_;
-       while (<$in>) {
-           chomp;
-           if ($_ eq '.') {
-               close TMP or die "can't close $tmpfile: $!";
-               rename $tmpfile, $file
-                   or die "can't rename $tmpfile to $file: $!";
-               print $out "$file\n" or die "can't print to server: $!";
-               last;
-           } else {
-               s/^\.//;
-               print TMP "$_\n" or die "can't print to $tmpfile: $!";
-           }
-       }
-       print STDERR " ok\n" if $verbose;
-    }
-}
-
-if ($server) {
-    server ();
-} else {
-    client ();
-}
index 48d2c5f8ec499fce7d7bb3da27e190caa65f3c0a..c34e5e388749e55c9b9cde022022d3e380f17b0b 100755 (executable)
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+set -e
+
 # list of architectures taken from
 # http://buildd.debian.org/stats/
 
@@ -7,7 +9,7 @@
 # the WB_DB_DIR enviroment variable
 if [ -z "$WB_DB_DIR" ]
 then
-       WB_DB_DIR=/org/ftp.debian.org/scripts/nfu
+       WB_DB_DIR=/srv/ftp.debian.org/scripts/nfu
 fi
 
 cd $WB_DB_DIR || { echo "Failed to cd to $WB_DB_DIR" ; exit 1 ;}