rm -f ${LOCK_ACCEPTED}
}
+# If we error out this one is called, *FOLLOWED* by cleanup above
+function onerror() {
+ ERRDATE=$(date "+%Y.%m.%d-%H:%M:%S")
+ cat "$LOGFILE" | mail -s "ATTENTION ATTENTION! dinstall error at ${ERRDATE} (Be quiet, Brain, or I'll stab you with a Q-tip)" cron@ftp-master.debian.org
+}
+
########################################################################
# the actual dinstall functions follow #
########################################################################
function pgdump_post() {
log "Creating post-daily-cron-job backup of projectb database..."
cd $base/backup
- POSTDUMP=$base/backup/dump_$(date +%Y.%m.%d-%H:%M:%S)
- pg_dump projectb > $POSTDUMP
- ln -sf $POSTDUMP current
+ POSTDUMP=$(date +%Y.%m.%d-%H:%M:%S)
+ pg_dump projectb > $base/backup/dump_$POSTDUMP
+ pg_dumpall --globals-only > $base/backup/dumpall_$POSTDUMP
+ ln -sf $base/backup/dump_$POSTDUMP current
+ ln -sf $base/backup/dumpall_$POSTDUMP currentall
+}
+
+# Load the dak-dev projectb
+function pgdakdev() {
+ cd $base/backup
+ echo "drop database projectb" | psql -p 5433 template1
+ cat currentall | psql -p 5433 template1
+ createdb -p 5433 -T template0 projectb
+ fgrep -v '\connect' current | psql -p 5433 projectb
}
# Updating various files
}
function merkel2() {
- # Push katie@merkel so it syncs the projectb there. Returns immediately, the sync runs detached
+ # Push dak@merkel so it syncs the projectb there. Returns immediately, the sync runs detached
log "Trigger merkels projectb sync"
- ssh -2 -o BatchMode=yes -o SetupTimeOut=30 -o ConnectTimeout=30 -i ~/.ssh/push_merkel_projectb katie@merkel.debian.org sleep 1
+ ssh -2 -o BatchMode=yes -o SetupTimeOut=30 -o ConnectTimeout=30 -i ~/.ssh/push_merkel_projectb dak@merkel.debian.org sleep 1
}
function runparts() {
echo ${NOW} > "${dbdir}/dinstallstart"
}
+function maillogfile() {
+ cat "$LOGFILE" | mail -s "Log for dinstall run of ${NOW}" cron@ftp-master.debian.org
+}
+
function renamelogfile() {
- if [ -f "${dbdir}/dinstallstart" ]; then
- RENAMETO=$(cat "${dbdir}/dinstallstart")
- mv "$LOGFILE" "$logdir/dinstall_${RENAMETO}.log"
- logstats "$logdir/dinstall_${RENAMETO}.log"
- bzip2 -9 "$logdir/dinstall_${RENAMETO}.log"
- else
- error "Problem, I don't know when dinstall started, unable to do log statistics."
- NOW=`date "+%Y.%m.%d-%H:%M:%S"`
- mv "$LOGFILE" "$logdir/dinstall_${NOW}.log"
- bzip2 -9 "$logdir/dinstall_${NOW}.log"
- fi
+ if [ -f "${dbdir}/dinstallstart" ]; then
+ NOW=$(cat "${dbdir}/dinstallstart")
+ maillogfile
+ mv "$LOGFILE" "$logdir/dinstall_${NOW}.log"
+ logstats "$logdir/dinstall_${NOW}.log"
+ bzip2 -9 "$logdir/dinstall_${NOW}.log"
+ else
+ error "Problem, I don't know when dinstall started, unable to do log statistics."
+ NOW=`date "+%Y.%m.%d-%H:%M:%S"`
+ maillogfile
+ mv "$LOGFILE" "$logdir/dinstall_${NOW}.log"
+ bzip2 -9 "$logdir/dinstall_${NOW}.log"
+ fi
}
+function testingsourcelist() {
+ dak ls -s testing -f heidi -r .| egrep 'source$' > ${webdir}/testing.list
+}
########################################################################
########################################################################
# it has to cd first!
cd ${configdir}
- if [ -f "${LOCK_STOP}" ]; then
- log "${LOCK_STOP} exists, exiting immediately"
- exit 42
- fi
+ if [ -f "${LOCK_STOP}" ]; then
+ log "${LOCK_STOP} exists, exiting immediately"
+ exit 42
+ fi
if [ "${ERR}" = "false" ]; then
set +e
ts "${TIME}"
fi
- if [ -f "${LOCK_STOP}" ]; then
- log "${LOCK_STOP} exists, exiting immediately"
- exit 42
- fi
+ if [ -f "${LOCK_STOP}" ]; then
+ log "${LOCK_STOP} exists, exiting immediately"
+ exit 42
+ fi
}
########################################################################
LOCK_STOP="$lockdir/archive.stop"
lockfile -l 3600 "${LOCK_DAILY}"
-trap cleanup EXIT ERR TERM HUP INT QUIT
+trap onerror ERR
+trap cleanup EXIT TERM HUP INT QUIT
touch "${LOCK_BRITNEY}"
)
stage $GO
+GO=(
+ FUNC="pgdakdev"
+ TIME="dak-dev db"
+ ARGS=""
+ ERR="false"
+)
+stage $GO
+
GO=(
FUNC="expire"
TIME="expire_dumps"
FUNC="bts"
TIME=""
ARGS=""
- ERR=""
+ ERR="false"
)
stage $GO
)
stage $GO
+GO=(
+ FUNC="testingsourcelist"
+ TIME=""
+ ARGS=""
+ ERR="false"
+)
+
rm -f ${LOCK_BRITNEY}
GO=(
exec > "$logdir/afterdinstall.log" 2>&1
-cat "$LOGFILE" | mail -s "Log for dinstall run of ${NOW}" cron@ftp-master.debian.org
-
GO=(
FUNC="renamelogfile"
TIME=""
SigningKeyring "/srv/ftp.debian.org/s3kr1t/dot-gnupg/secring.gpg";
SigningPubKeyring "/srv/ftp.debian.org/s3kr1t/dot-gnupg/pubring.gpg";
SigningKeyIds "6070D3A1";
- SendmailCommand "/usr/sbin/sendmail -odq -oi -t";
+ SendmailCommand "/usr/sbin/sendmail -odq -oi -t -f envelope@ftp-master.debian.org";
MyEmailAddress "Debian Installer <installer@ftp-master.debian.org>";
MyAdminAddress "ftpmaster@debian.org";
MyHost "debian.org"; // used for generating user@my_host addresses in e.g. manual_reject()
{
Stable;
};
- MustBeOlderThan
- {
- Testing;
- Unstable;
- Experimental;
- };
+// MustBeOlderThan
+// {
+// Testing;
+// Unstable;
+// Experimental;
+// };
Enhances
{
Stable;
MustBeNewerThan
{
Stable;
- Proposed-Updates;
+// Proposed-Updates;
Testing;
};
MustBeOlderThan
MustBeNewerThan
{
Stable;
- Proposed-Updates;
+// Proposed-Updates;
Testing;
Testing-Proposed-Updates;
};
MustBeNewerThan
{
Stable;
- Proposed-Updates;
+// Proposed-Updates;
Testing;
Testing-Proposed-Updates;
Unstable;
import apt_pkg
import daklib.utils, daklib.database
-import syck
+import yaml
import daklib.extensions
from daklib.extensions import replace_dak_function
sourcefile = file(transpath, 'r')
sourcecontent = sourcefile.read()
try:
- transitions = syck.load(sourcecontent)
- except syck.error, msg:
+ transitions = yaml.load(sourcecontent)
+ except yaml.YAMLError, msg:
# This shouldn't happen, there is a wrapper to edit the file which
# checks it, but we prefer to be safe than ending up rejecting
# everything.
controls = ""
bc = BugClassifier()
- for bug in bc.unclassified_bugs():
- controls += bc.classify_bug(bug)
-
- return controls
+ try:
+ for bug in bc.unclassified_bugs():
+ controls += bc.classify_bug(bug)
+
+ return controls
+ except:
+ log.error("couldn't retreive bugs from soap interface: %s" % sys.exc_info()[0])
+ return None
def send_email(commands, simulate=False):
global Cnf
import subprocess
import time
import apt_pkg
+import pg
from daklib import utils
+from daklib import database
################################################################################
def main():
- global Cnf, Options, Logger
+ global Cnf, Options, Logger, projectB
os.umask(0002)
if Options.has_key("RootDir"): Cnf["Dir::Root"] = Options["RootDir"]
+ projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"]))
+ database.init(Cnf, projectB)
+
if not suites:
suites = Cnf.SubTree("Suite").List()
suite = suite.lower()
- architectures = SuiteBlock.ValueList("Architectures")
+ architectures = database.get_suite_architectures(suite)
+ if architectures == None:
+ architectures = []
if SuiteBlock.has_key("Components"):
components = SuiteBlock.ValueList("Components")
files = []
if AptCnf.has_key("tree::%s" % (tree)):
+ if AptCnf.has_key("tree::%s::Contents" % (tree)):
+ pass
+ else:
+ for x in os.listdir("%s/%s" % (Cnf["Dir::Root"], tree)):
+ if x.startswith('Contents-'):
+ files.append(x)
+
for sec in AptCnf["tree::%s::Sections" % (tree)].split():
for arch in AptCnf["tree::%s::Architectures" % (tree)].split():
if arch == "source":
import apt_pkg
from daklib import utils
-from daklib.dbconn import DBConn
-from daklib.config import Config
+from daklib.DBConn import DBConn
+from daklib.Config import Config
################################################################################
#!/usr/bin/env python
# vim:set et ts=4 sw=4:
-""" Handles NEW and BYHAND packages """
-# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 James Troup <james@nocrew.org>
+""" Handles NEW and BYHAND packages
+@contact: Debian FTP Master <ftpmaster@debian.org>
+@copyright: 2001, 2002, 2003, 2004, 2005, 2006 James Troup <james@nocrew.org>
+@license: GNU General Public License version 2 or later
+"""
# 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
################################################################################
-import copy, errno, os, readline, stat, sys, time
+import copy
+import errno
+import os
+import readline
+import stat
+import sys
+import time
import apt_pkg, apt_inst
import examine_package
from daklib import database
from daklib.regexes import re_no_epoch, re_default_answer, re_isanum
# Globals
-Cnf = None
+Cnf = None #: Configuration, apt_pkg.Configuration
Options = None
Upload = None
-projectB = None
+projectB = None #: database connection, pgobject
Logger = None
Priorities = None
Cnf["Process-New::Options::%s" % (i)] = ""
changes_files = apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv)
+ if len(changes_files) == 0 and not Cnf.get("Process-New::Options::Comments-Dir",""):
+ changes_files = utils.get_changes_files(Cnf["Dir::Queue::New"])
+
Options = Cnf.SubTree("Process-New::Options")
if Options["Help"]:
except:
traceback.print_exc()
- result = False
os.chdir(cwd)
return result
--- /dev/null
+ftpmaster meta package for DSA
+
+
+This is a dummy package that makes Debian's package management
+system believe that certain packages needed for ftpmaster have
+to be installed. The intention is that DSA can easily see what
+needs to be there.
+
+If you, for whatever reason, need a package added to this meta-
+packages dependency list, contact ftpmaster@debian.org, NOT
+the Debian admins.
--- /dev/null
+ftpmaster-lenny (1.0) unstable; urgency=low
+
+ * New "package", to help DSA
+
+ -- Joerg Jaspert <joerg@debian.org> Mon, 09 Mar 2009 14:09:09 +0100
+
--- /dev/null
+This package was put together by:
+
+ Joerg Jaspert <joerg@debian.org> on Mon, 09 Mar 2009 14:07:44 +0100
+
+Copyright:
+
+ <Copyright (C) 2009 Joerg Jaspert>
+
+License:
+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License version 2 as
+ published by the Free Software Foundation.
+
+ This package 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 package; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
--- /dev/null
+Section: devel
+Priority: optional
+Standards-Version: 3.8.1
+
+Package: ftpmaster-lenny
+Version: 1.0
+Maintainer: Debian FTP Master <ftpmaster@debian.org>
+Depends: apt-utils, bicyclerepair, binutils-multiarch, build-essential, bzip2, cron, curl, cvs, debian-el, debian-bug, dpkg-dev-el, easypg, devscripts, emacs-goodies-el, emacs22-nox, gnupg, gpgv, graphviz, ikiwiki, irb, libapt-pkg-dev, libdbd-pg-ruby, lintian, mc, mutt, postgresql-plperl-8.3, pychecker, pylint, pymacs, python, python-apt, python-btsutils, python-debian, python-epydoc, python-ldap, python-mode, python-numpy, python-psycopg2, python-pygresql, python-pyrss2gen, python-soappy, python-yaml, r-base, rsync, ruby, ruby-elisp, subversion, git-core, symlinks
+Architecture: all
+Copyright: copyright
+Changelog: changelog
+Readme: README.Debian
+Description: Meta package for DSA listing ftpmaster needs
+ This is a small meta package for the Debian System Administrators
+ so DSA easily knows (and can keep installed) all packages
+ Ftpmaster needs.
+ .
+ If, for whatever reason, you need a package added to this ones
+ Dependencies, ask ftpmaster, not the Debian admins.
+ .
+ This is not only "What DAK needs", but a general "FTPMaster needs this
+ to do the work"
$rss->add_item(title => "$reason",
link => "http://ftp-master.debian.org/removals.txt?" . $link,
- description => qq[<pre>$body</pre>],
+ description => qq[<pre>$body</pre>],
dc => {
creator => "$ftpmaster",
}