+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
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"
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"
from daklib import logging
from daklib import queue
from daklib import utils
+from daklib.dak_exceptions import *
###############################################################################
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))
"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):
+++ /dev/null
-#! /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 ();
-}
#!/bin/bash
+set -e
+
# list of architectures taken from
# http://buildd.debian.org/stats/
# 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 ;}