+2005-11-25 Anthony Towns <aj@erisian.com.au>
+
+ * Changed accepted_autobuild to queue_build everywhere.
+ * Add a queue table.
+ * Add a "queue" field in the queue_build table (currently always 0)
+
2005-11-25 Anthony Towns <aj@erisian.com.au>
* Finishing merge of changes from spohr, by various people still
were pulled out in -2, and we end up with no orig in the archive
:(
- o SecurityAcceptedAutoBuild doesn't handle the case of foo_3.3woody1
+ o SecurityQueueBuild doesn't handle the case of foo_3.3woody1
with a new .orig.tar.gz followed by a foo_3.3potato1 with the same
.orig.tar.gz; jennifer sees it and copes, but the AA code doesn't
and can't really easily know so the potato AA dir is left with no
ALTER TABLE override ADD CONSTRAINT override_section FOREIGN KEY (section) REFERENCES section(id) MATCH FULL;
ALTER TABLE override ADD CONSTRAINT override_type FOREIGN KEY (type) REFERENCES override_type(id) MATCH FULL;
-ALTER TABLE accepted_autobuild ADD CONSTRAINT accepted_autobuild_suite FOREIGN KEY (suite) REFERENCES suite(id) MATCH FULL;
+ALTER TABLE queue_build ADD CONSTRAINT queue_build_suite FOREIGN KEY (suite) REFERENCES suite(id) MATCH FULL;
+ALTER TABLE queue_build ADD CONSTRAINT queue_build_queue FOREIGN KEY (queue) REFERENCES queue(id) MATCH FULL;
-- Then correct all the id SERIAL PRIMARY KEY columns...
maintainer_id_seq, override, override_type, override_type_id_seq,
priority, priority_id_seq, section, section_id_seq, source,
source_id_seq, src_associations, src_associations_id_seq, suite,
- suite_architectures, suite_id_seq, accepted_autobuild, uid,
+ suite_architectures, suite_id_seq, queue_build, uid,
uid_id_seq TO GROUP ftpmaster;
-- Read only access to user 'nobody'
maintainer_id_seq, override, override_type, override_type_id_seq,
priority, priority_id_seq, section, section_id_seq, source,
source_id_seq, src_associations, src_associations_id_seq, suite,
- suite_architectures, suite_id_seq, accepted_autobuild, uid,
+ suite_architectures, suite_id_seq, queue_build, uid,
uid_id_seq TO PUBLIC;
# Needs to be rebuilt, as files have moved. Due to unaccepts, we need to
# update this before wanna-build is updated.
-psql projectb -A -t -q -c "SELECT filename FROM accepted_autobuild WHERE suite = 5 AND in_accepted = true AND filename ~ 'd(sc|eb)$'" > $dbdir/dists/unstable_accepted.list
+psql projectb -A -t -q -c "SELECT filename FROM queue_build WHERE suite = 5 AND queue = 0 AND in_queue = true AND filename ~ 'd(sc|eb)$'" > $dbdir/dists/unstable_accepted.list
apt-ftparchive generate apt.conf.buildd
mkmaintainers
if lockfile -r3 $NOTICE; then
LOCKDAILY="YES"
- psql projectb -A -t -q -c "SELECT filename FROM accepted_autobuild WHERE suite = 5 AND in_accepted = true AND filename ~ 'd(sc|eb)$'" > $dbdir/dists/unstable_accepted.list
+ psql projectb -A -t -q -c "SELECT filename FROM queue_build WHERE queue = 0 AND suite = 5 AND in_queue = true AND filename ~ 'd(sc|eb)$'" > $dbdir/dists/unstable_accepted.list
cd $overridedir
denise &>/dev/null
rm -f override.sid.all3 override.sid.all3.src
| Log "/org/ftp.debian.org/log/";
| Morgue "/org/ftp.debian.org/morgue/";
| MorgueReject "reject";
-| AcceptedAutoBuild "/org/incoming.debian.org/buildd/";
+| QueueBuild "/org/incoming.debian.org/buildd/";
| UrgencyLog "/org/ftp.debian.org/testing/urgencies/";
| Queue
| {
Dir::Queue::Reject, it will try to move it to the Dir::MorgueReject
directory located under Dir::Morgue.
-AcceptedAutoBuild (optional): This variable is only relevant if any suites
-are to be auto built, i.e. if Dinstall::AcceptedAutoBuildSuites has any
+QueueBuild (optional): This variable is only relevant if any suites
+are to be auto built, i.e. if Dinstall::QueueBuildSuites has any
values.
UrgencyLog (optional): If this directory is specified, kelly will store the
| FutureTimeTravelGrace 28800; // 8 hours
| PastCutoffYear "1984";
| BXANotify "false";
-| AcceptedAutoBuildSuites
+| QueueBuildSuites
| {
| unstable;
| };
CloseBugs (optional): a boolean (default: no); if true the automated bug
closing feature of dinstall is activated.
-AcceptedAutoBuildSuites (optional): a list of suites which should be auto
+QueueBuildSuites (optional): a list of suites which should be auto
build.
-SpecialAcceptedAutoBuild is a boolean; if true it activates support
+QueueBuild is a boolean; if true it activates support
for auto-building from accepted.
OverrideMaintainer (optional): be used to globally override the
description TEXT
);
+CREATE TABLE queue (
+ id SERIAL PRIMARY KEY,
+ suite_name TEXT NOT NULL
+);
+
CREATE TABLE suite_architectures (
suite INT4 NOT NULL, -- REFERENCES suite
architecture INT4 NOT NULL, -- REFERENCES architecture
unique (suite, component, package, type)
);
-CREATE TABLE accepted_autobuild (
+CREATE TABLE queue_build (
suite INT4 NOT NULL, -- references suite
+ queue INT4 NOT NULL, -- references queue
filename TEXT NOT NULL,
- in_accepted BOOLEAN NOT NULL,
+ in_queue BOOLEAN NOT NULL,
last_used TIMESTAMP
);
OverrideDisparityCheck "true";
StableDislocationSupport "false";
DefaultSuite "unstable";
- AcceptedAutoBuildSuites
+ QueueBuildSuites
{
unstable;
};
{
// How long (in seconds) dead packages are left before being killed
StayOfExecution 129600; // 1.5 days
- AcceptedAutoBuildStayOfExecution 86400; // 24 hours
+ QueueBuildStayOfExecution 86400; // 24 hours
MorgueSubDir "rhona";
};
Morgue "/org/ftp.debian.org/morgue/";
MorgueReject "reject";
Override "/org/ftp.debian.org/scripts/override/";
- AcceptedAutoBuild "/org/incoming.debian.org/buildd/";
+ QueueBuild "/org/incoming.debian.org/buildd/";
UrgencyLog "/org/ftp.debian.org/testing/urgencies/";
Queue
{
CloseBugs "false";
OverrideDisparityCheck "false";
BXANotify "false";
- AcceptedAutoBuildSuites
+ QueueBuildSuites
{
stable;
testing;
};
- SecurityAcceptedAutoBuild "true";
+ SecurityQueueBuild "true";
DefaultSuite "Testing";
SuiteSuffix "updates";
OverrideMaintainer "katie@security.debian.org";
{
// How long (in seconds) dead packages are left before being killed
StayOfExecution 129600; // 1.5 days
- AcceptedAutoBuildStayOfExecution 86400; // 24 hours
+ QueueBuildStayOfExecution 86400; // 24 hours
MorgueSubDir "rhona";
OverrideFilename "override.source-only";
};
Morgue "/org/security.debian.org/morgue/";
MorgueReject "reject";
Override "/org/security.debian.org/scripts/override/";
- AcceptedAutoBuild "/org/security.debian.org/buildd/";
+ QueueBuild "/org/security.debian.org/buildd/";
Queue
{
Accepted "/org/security.debian.org/queue/accepted/";
# Utility functions for katie
# Copyright (C) 2001, 2002, 2003, 2004, 2005 James Troup <james@nocrew.org>
-# $Id: katie.py,v 1.55 2005-11-25 04:40:14 ajt Exp $
+# $Id: katie.py,v 1.56 2005-11-25 06:59:45 ajt Exp $
# 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
## Special support to enable clean auto-building of accepted packages
self.projectB.query("BEGIN WORK");
for suite in changes["distribution"].keys():
- if suite not in Cnf.ValueList("Dinstall::AcceptedAutoBuildSuites"):
+ if suite not in Cnf.ValueList("Dinstall::QueueBuildSuites"):
continue;
suite_id = db_access.get_suite_id(suite);
- dest_dir = Cnf["Dir::AcceptedAutoBuild"];
- if Cnf.FindB("Dinstall::SecurityAcceptedAutoBuild"):
+ dest_dir = Cnf["Dir::QueueBuild"];
+ if Cnf.FindB("Dinstall::SecurityQueueBuild"):
dest_dir = os.path.join(dest_dir, suite);
for file in file_keys:
src = os.path.join(Cnf["Dir::Queue::Accepted"], file);
dest = os.path.join(dest_dir, file);
- if Cnf.FindB("Dinstall::SecurityAcceptedAutoBuild"):
+ if Cnf.FindB("Dinstall::SecurityQueueBuild"):
# Copy it since the original won't be readable by www-data
utils.copy(src, dest);
else:
# Create a symlink to it
os.symlink(src, dest);
# Add it to the list of packages for later processing by apt-ftparchive
- self.projectB.query("INSERT INTO accepted_autobuild (suite, filename, in_accepted) VALUES (%s, '%s', 't')" % (suite_id, dest));
+ self.projectB.query("INSERT INTO queue_build (suite, queue, filename, in_queue) VALUES (%s, 0, '%s', 't')" % (suite_id, dest));
# If the .orig.tar.gz is in the pool, create a symlink to
# it (if one doesn't already exist)
if self.pkg.orig_tar_id:
src = os.path.join(ql[0][0], ql[0][1]);
os.symlink(src, dest);
# Add it to the list of packages for later processing by apt-ftparchive
- self.projectB.query("INSERT INTO accepted_autobuild (suite, filename, in_accepted) VALUES (%s, '%s', 't')" % (suite_id, dest));
+ self.projectB.query("INSERT INTO queue_build (suite, queue, filename, in_queue) VALUES (%s, 0, '%s', 't')" % (suite_id, dest));
# if it does, update things to ensure it's not removed prematurely
else:
- self.projectB.query("UPDATE accepted_autobuild SET in_accepted = 't', last_used = NULL WHERE filename = '%s' AND suite = %s" % (dest, suite_id));
+ self.projectB.query("UPDATE queue_build SET in_queue = 't', last_used = NULL WHERE filename = '%s' AND suite = %s" % (dest, suite_id));
self.projectB.query("COMMIT WORK");
# Installs Debian packages from queue/accepted into the pool
# Copyright (C) 2000, 2001, 2002, 2003, 2004 James Troup <james@nocrew.org>
-# $Id: kelly,v 1.16 2005-11-15 09:50:32 ajt Exp $
+# $Id: kelly,v 1.17 2005-11-25 06:59:45 ajt Exp $
# 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
###############################################################################
# Globals
-kelly_version = "$Revision: 1.16 $";
+kelly_version = "$Revision: 1.17 $";
Cnf = None;
Options = None;
# from accepted.
projectB.query("BEGIN WORK");
for suite in changes["distribution"].keys():
- if suite not in Cnf.ValueList("Dinstall::AcceptedAutoBuildSuites"):
+ if suite not in Cnf.ValueList("Dinstall::QueueBuildSuites"):
continue;
now_date = time.strftime("%Y-%m-%d %H:%M");
suite_id = db_access.get_suite_id(suite);
- dest_dir = Cnf["Dir::AcceptedAutoBuild"];
- if Cnf.FindB("Dinstall::SecurityAcceptedAutoBuild"):
+ dest_dir = Cnf["Dir::QueueBuild"];
+ if Cnf.FindB("Dinstall::SecurityQueueBuild"):
dest_dir = os.path.join(dest_dir, suite);
for file in files.keys():
dest = os.path.join(dest_dir, file);
# Remove it from the list of packages for later processing by apt-ftparchive
- projectB.query("UPDATE accepted_autobuild SET in_accepted = 'f', last_used = '%s' WHERE filename = '%s' AND suite = %s" % (now_date, dest, suite_id));
- if not Cnf.FindB("Dinstall::SecurityAcceptedAutoBuild"):
+ projectB.query("UPDATE queue_build SET in_queue = 'f', last_used = '%s' WHERE filename = '%s' AND suite = %s" % (now_date, dest, suite_id));
+ if not Cnf.FindB("Dinstall::SecurityQueueBuild"):
# Update the symlink to point to the new location in the pool
pool_location = utils.poolify (changes["source"], files[file]["component"]);
src = os.path.join(Cnf["Dir::Pool"], pool_location, os.path.basename(file));
if dsc_file.endswith(".orig.tar.gz"):
orig_tar_gz = os.path.join(dest_dir, dsc_file);
# Remove it from the list of packages for later processing by apt-ftparchive
- projectB.query("UPDATE accepted_autobuild SET in_accepted = 'f', last_used = '%s' WHERE filename = '%s' AND suite = %s" % (now_date, orig_tar_gz, suite_id));
+ projectB.query("UPDATE queue_build SET in_queue = 'f', last_used = '%s' WHERE filename = '%s' AND suite = %s" % (now_date, orig_tar_gz, suite_id));
projectB.query("COMMIT WORK");
# Finally...
# rhona, cleans up unassociated binary and source packages
# Copyright (C) 2000, 2001, 2002, 2003 James Troup <james@nocrew.org>
-# $Id: rhona,v 1.28 2005-11-25 04:42:59 ajt Exp $
+# $Id: rhona,v 1.29 2005-11-25 06:59:45 ajt Exp $
# 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
################################################################################
-def clean_accepted_autobuild():
+def clean_queue_build():
global now_date;
- if not Cnf.ValueList("Dinstall::AcceptedAutoBuildSuites") or Options["No-Action"]:
+ if not Cnf.ValueList("Dinstall::QueueBuildSuites") or Options["No-Action"]:
return;
- print "Cleaning out accepted autobuild symlinks..."
+ print "Cleaning out queue build symlinks..."
- our_delete_date = time.strftime("%Y-%m-%d %H:%M", time.localtime(time.time()-int(Cnf["Rhona::AcceptedAutoBuildStayOfExecution"])));
+ our_delete_date = time.strftime("%Y-%m-%d %H:%M", time.localtime(time.time()-int(Cnf["Rhona::QueueBuildStayOfExecution"])));
count = 0;
- q = projectB.query("SELECT filename FROM accepted_autobuild WHERE last_used <= '%s'" % (our_delete_date));
+ q = projectB.query("SELECT filename FROM queue_build WHERE last_used <= '%s'" % (our_delete_date));
for i in q.getresult():
filename = i[0];
if not os.path.exists(filename):
- utils.warn("%s (from accepted_autobuild) doesn't exist." % (filename));
+ utils.warn("%s (from queue_build) doesn't exist." % (filename));
continue;
- if not Cnf.FindB("Dinstall::SecurityAcceptedAutoBuild") and not os.path.islink(filename):
- utils.fubar("%s (from accepted_autobuild) should be a symlink but isn't." % (filename));
+ if not Cnf.FindB("Dinstall::SecurityQueueBuild") and not os.path.islink(filename):
+ utils.fubar("%s (from queue_build) should be a symlink but isn't." % (filename));
os.unlink(filename);
count += 1;
- projectB.query("DELETE FROM accepted_autobuild WHERE last_used <= '%s'" % (our_delete_date));
+ projectB.query("DELETE FROM queue_build WHERE last_used <= '%s'" % (our_delete_date));
if count:
- sys.stderr.write("Cleaned %d accepted-autobuild files.\n" % (count));
+ sys.stderr.write("Cleaned %d queue_build files.\n" % (count));
################################################################################
clean();
clean_maintainers();
clean_fingerprints();
- clean_accepted_autobuild();
+ clean_queue_build();
################################################################################
extern "C"
{
-#include <server/postgres.h>
+#include <postgres.h>
int versioncmp(text *A, text *B);