From 9ebfa30b056df56376cb0302a28a190e0aaed765 Mon Sep 17 00:00:00 2001 From: James Troup Date: Fri, 24 Nov 2000 00:20:11 +0000 Subject: [PATCH] Initial revision --- README | 25 + THANKS | 0 add_constraints.sql | 106 +++ apt.conf-non-US | 57 ++ catherine | 83 ++ charisma | 136 ++++ contrib/fix.1 | 221 +++++ contrib/fix.2 | 36 + contrib/fix.3 | 99 +++ contrib/fix.4 | 29 + contrib/fix.6 | 59 ++ contrib/fix.7 | 24 + contrib/fix.8 | 23 + copyoverrides | 32 + cron.daily | 73 ++ cron.daily-non-US | 78 ++ debian/changelog | 9 + debian/control | 13 + debian/copyright | 23 + debian/postinst | 10 + debian/rules | 55 ++ heidi | 205 +++++ jenna | 197 +++++ katie.conf | 331 ++++++++ katie.conf-non-US | 323 ++++++++ mkchecksums | 16 + mklslar | 36 + sortover.pl | 13 + tagdb.dia | 1903 +++++++++++++++++++++++++++++++++++++++++++ vars-non-US | 19 + 30 files changed, 4234 insertions(+) create mode 100644 README create mode 100644 THANKS create mode 100644 add_constraints.sql create mode 100644 apt.conf-non-US create mode 100755 catherine create mode 100755 charisma create mode 100755 contrib/fix.1 create mode 100755 contrib/fix.2 create mode 100755 contrib/fix.3 create mode 100755 contrib/fix.4 create mode 100755 contrib/fix.6 create mode 100755 contrib/fix.7 create mode 100755 contrib/fix.8 create mode 100755 copyoverrides create mode 100755 cron.daily create mode 100755 cron.daily-non-US create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/postinst create mode 100755 debian/rules create mode 100755 heidi create mode 100755 jenna create mode 100644 katie.conf create mode 100644 katie.conf-non-US create mode 100755 mkchecksums create mode 100755 mklslar create mode 100755 sortover.pl create mode 100644 tagdb.dia create mode 100644 vars-non-US diff --git a/README b/README new file mode 100644 index 00000000..3ffe41b6 --- /dev/null +++ b/README @@ -0,0 +1,25 @@ +This is the README file for da-katie version -1. + +da-katie is the collection of programs used to maintain the Debian GNU +project archive. + +See TODO for an incomplete list of things needing to be done. + +See the file NEWS for user-visible changes since the last version. + +See the file INSTALL for installation instructions. + +da-katie is used on the following platforms :- + +Linux/i386 2.2 +Linux/UltraSparc 2.2 + +da-katie 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, a copy of +which is provided under the name COPYING, or (at your option) any +later version. + +-- +James Troup , Oldenburg, Germany +Thu, 12 Oct 2000 12:45:16 +0100 diff --git a/THANKS b/THANKS new file mode 100644 index 00000000..e69de29b diff --git a/add_constraints.sql b/add_constraints.sql new file mode 100644 index 00000000..a23951f7 --- /dev/null +++ b/add_constraints.sql @@ -0,0 +1,106 @@ +-- Fix up after population off the database... + +-- First of all readd the constraints (takes ~1:30 on auric) + +ALTER TABLE files ADD CONSTRAINT files_location FOREIGN KEY (location) REFERENCES location(id) MATCH FULL; + +ALTER TABLE source ADD CONSTRAINT source_maintainer FOREIGN KEY (maintainer) REFERENCES maintainer(id) MATCH FULL; +ALTER TABLE source ADD CONSTRAINT source_file FOREIGN KEY (file) REFERENCES files(id) MATCH FULL; + +ALTER TABLE dsc_files ADD CONSTRAINT dsc_files_source FOREIGN KEY (source) REFERENCES source(id) MATCH FULL; +ALTER TABLE dsc_files ADD CONSTRAINT dsc_files_file FOREIGN KEY (file) REFERENCES files(id) MATCH FULL; + +ALTER TABLE binaries ADD CONSTRAINT binaries_maintainer FOREIGN KEY (maintainer) REFERENCES maintainer(id) MATCH FULL; +ALTER TABLE binaries ADD CONSTRAINT binaries_source FOREIGN KEY (source) REFERENCES source(id) MATCH FULL; +ALTER TABLE binaries ADD CONSTRAINT binaries_architecture FOREIGN KEY (architecture) REFERENCES architecture(id) MATCH FULL; +ALTER TABLE binaries ADD CONSTRAINT binaries_file FOREIGN KEY (file) REFERENCES files(id) MATCH FULL; + +ALTER TABLE suite_architectures ADD CONSTRAINT suite_architectures_suite FOREIGN KEY (suite) REFERENCES suite(id) MATCH FULL; +ALTER TABLE suite_architectures ADD CONSTRAINT suite_architectures_architecture FOREIGN KEY (architecture) REFERENCES architecture(id) MATCH FULL; + +ALTER TABLE bin_associations ADD CONSTRAINT bin_associations_suite FOREIGN KEY (suite) REFERENCES suite(id) MATCH FULL; +ALTER TABLE bin_associations ADD CONSTRAINT bin_associations_bin FOREIGN KEY (bin) REFERENCES binaries(id) MATCH FULL; + +ALTER TABLE src_associations ADD CONSTRAINT src_associations_suite FOREIGN KEY (suite) REFERENCES suite(id) MATCH FULL; +ALTER TABLE src_associations ADD CONSTRAINT src_associations_source FOREIGN KEY (source) REFERENCES source(id) MATCH FULL; + +-- Then correct all the id SERIAL PRIMARY KEY columns... + +CREATE FUNCTION files_id_max() RETURNS INT4 + AS 'SELECT max(id) FROM files' + LANGUAGE 'sql'; +CREATE FUNCTION source_id_max() RETURNS INT4 + AS 'SELECT max(id) FROM source' + LANGUAGE 'sql'; +CREATE FUNCTION src_associations_id_max() RETURNS INT4 + AS 'SELECT max(id) FROM src_associations' + LANGUAGE 'sql'; +CREATE FUNCTION dsc_files_id_max() RETURNS INT4 + AS 'SELECT max(id) FROM dsc_files' + LANGUAGE 'sql'; +CREATE FUNCTION binaries_id_max() RETURNS INT4 + AS 'SELECT max(id) FROM binaries' + LANGUAGE 'sql'; +CREATE FUNCTION bin_associations_id_max() RETURNS INT4 + AS 'SELECT max(id) FROM bin_associations' + LANGUAGE 'sql'; + +SELECT setval('files_id_seq', files_id_max()); +SELECT setval('source_id_seq', source_id_max()); +SELECT setval('src_associations_id_seq', src_associations_id_max()); +SELECT setval('dsc_files_id_seq', dsc_files_id_max()); +SELECT setval('binaries_id_seq', binaries_id_max()); +SELECT setval('bin_associations_id_seq', bin_associations_id_max()); + +-- Vacuum the tables for efficency + +VACUUM archive; +VACUUM component; +VACUUM architecture; +VACUUM maintainer; +VACUUM location; +VACUUM files; +VACUUM source; +VACUUM dsc_files; +VACUUM binaries; +VACUUM suite; +VACUUM suite_architectures; +VACUUM bin_associations; +VACUUM src_associations; + +-- FIXME: has to be a better way to do this +GRANT ALL ON + architecture, architecture_id_seq, archive, archive_id_seq, + bin_associations, bin_associations_id_seq, binaries, + binaries_id_seq, component, component_id_seq, dsc_files, + dsc_files_id_seq, files, files_id_seq, location, location_id_seq, + maintainer, maintainer_id_seq, source, source_id_seq, + src_associations, src_associations_id_seq, suite, + suite_architectures, suite_id_seq + TO GROUP ftpmaster; + +-- Give write privileges to the associations tables for AJ for the purposes of `testing' +GRANT ALL ON + binaries, binaries_id_seq, + bin_associations, bin_associations_id_seq, + source, source_id_seq, + src_associations, src_associations_id_seq, + suite, suite_id_seq + TO ajt; + +-- RO access to AJ for all other tables +GRANT SELECT ON + architecture, archive, binaries, component, + dsc_files, files, location, maintainer, source, suite, suite_architectures + TO ajt; + +-- Read only access to user 'nobody' +GRANT SELECT ON + architecture, architecture_id_seq, archive, archive_id_seq, + bin_associations, bin_associations_id_seq, binaries, + binaries_id_seq, component, component_id_seq, dsc_files, + dsc_files_id_seq, files, files_id_seq, location, location_id_seq, + maintainer, maintainer_id_seq, source, source_id_seq, + src_associations, src_associations_id_seq, suite, + suite_architectures, suite_id_seq + TO PUBLIC; diff --git a/apt.conf-non-US b/apt.conf-non-US new file mode 100644 index 00000000..ca4bfd9e --- /dev/null +++ b/apt.conf-non-US @@ -0,0 +1,57 @@ +Dir +{ + ArchiveDir "/org/non-us.debian.org/ftp/"; + OverrideDir "/org/non-us.debian.org/scripts/override/"; + CacheDir "/org/non-us.debian.org/database/"; +}; + +Default +{ + Packages::Compress ". gzip"; + Sources::Compress "gzip"; + Contents::Compress "gzip"; + DeLinkLimit 0; + MaxContentsChange 6000; + FileMode 0664; +} + +TreeDefault +{ + Contents::Header "/org/non-us.debian.org/scripts/masterfiles/Contents.top"; +}; + +tree "dists/stable/non-US" +{ + FileList "/org/non-us.debian.org/database/dists/stable_non-us/$(SECTION)_binary-$(ARCH).list"; + SourceFileList "/org/non-us.debian.org/database/dists/stable_non-us/$(SECTION)_source.list"; + Sections "main contrib non-free"; + Architectures "alpha arm i386 m68k powerpc sparc source"; + BinOverride "override.potato.$(SECTION)"; + SrcOverride "override.potato.$(SECTION).src"; + External-Links false; +}; + +tree "dists/unstable/non-US" +{ + FileList "/org/non-us.debian.org/database/dists/unstable_non-us/$(SECTION)_binary-$(ARCH).list"; + SourceFileList "/org/non-us.debian.org/database/dists/unstable_non-us/$(SECTION)_source.list"; + Sections "main contrib non-free"; + Architectures "alpha arm hppa hurd-i386 i386 mips mipsel m68k powerpc sh sparc source"; + BinOverride "override.woody.$(SECTION)"; + SrcOverride "override.woody.$(SECTION).src"; +}; + +bindirectory "dists/proposed-updates" +{ + + FileList "/org/non-us.debian.org/database/dists/proposed-updates_-_binary.list"; + SourceFileList "/org/non-us.debian.org/database/proposed-updates_-_source.list"; + Packages "dists/proposed-updates/Packages"; + Sources "dists/proposed-updates/Sources"; + Contents ""; + + BinOverride "override.potato.all3"; + BinCacheDB "packages-proposed-updates.db"; + + PathPrefix ""; +}; diff --git a/catherine b/catherine new file mode 100755 index 00000000..573d57e7 --- /dev/null +++ b/catherine @@ -0,0 +1,83 @@ +#!/usr/bin/env python + +# Poolify (move packages from "legacy" type locations to pool locations) +# Copyright (C) 2000 James Troup +# $Id: catherine,v 1.1 2000-11-24 00:20:11 troup 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 +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +################################################################################ + +import pg +import utils +import apt_pkg; + +################################################################################ + +Cnf = None; +projectB = None; + +################################################################################ + +def main (): + global Cnf, projectB; + + apt_pkg.init(); + + Cnf = apt_pkg.newConfiguration(); + apt_pkg.ReadConfigFileISC(Cnf,utils.which_conf_file()); + + Arguments = [('d',"debug","Heidi::Options::Debug", "IntVal"), + ('h',"help","Heidi::Options::Help"), + ('v',"version","Heidi::Options::Version")]; + + amount = apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv); + + print amount + + return + + projectB = pg.connect('projectb', 'localhost'); + + db_access.init(Cnf, projectB); + + if (Cnf["Heidi::Options::Add"] == "" and Cnf["Heidi::Options::Remove"] == "") or (Cnf["Heidi::Options::Add"] != "" and Cnf["Heidi::Options::Remove"] != ""): + + sys.stderr.write("Need either --add or --remove command line argument; not neither or both.\n"); + sys.exit(2); + + for i in ("add", "remove"): + suite = Cnf["Heidi::Options::%s" % (i)]; + if suite !="": + if not Cnf.has_key("Suite::%s" % (suite)): + sys.stderr.write("Unknown suite %s.\n" %(suite)); + sys.exit(2); + else: + suite_id = db_access.get_suite_id(suite); + action = i; + + if file_list != []: + for file in file_list: + process_file(utils.open_file(file_list[0],'r'), suite_id, action); + else: + process_file(sys.stdin, suite_id, action); + + db_access.init (Cnf, projectB); + +####################################################################################### + +if __name__ == '__main__': + main() + diff --git a/charisma b/charisma new file mode 100755 index 00000000..15798027 --- /dev/null +++ b/charisma @@ -0,0 +1,136 @@ +#!/usr/bin/env python + +# Generate Maintainers file used by e.g. the Debian Bug Tracking System +# Copyright (C) 2000 James Troup +# $Id: charisma,v 1.1 2000-11-24 00:20:11 troup 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 +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +# ``As opposed to "Linux sucks. Respect my academic authoritah, damn +# you!" or whatever all this hot air amounts to.'' +# -- ajt@ in _that_ thread on debian-devel@ + +#################################################################################################################################### + +import os, pg, re, string, sys +import apt_pkg +import utils + +#################################################################################################################################### + +projectB = None +Cnf = None +maintainer_cache = {} +maintainer_from_source_cache = {} +packages = {} +fixed_maintainer_cache = {} + +re_split = re.compile(r"(\S+)\s+(\S+.*)") + +#################################################################################################################################### + +def fix_maintainer (maintainer): + global fixed_maintainer_cache; + + if not fixed_maintainer_cache.has_key(maintainer): + fixed_maintainer_cache[maintainer] = utils.fix_maintainer(maintainer)[0] + + return fixed_maintainer_cache[maintainer] + +def get_maintainer_from_source (source_id): + global maintainer_from_source_cache + + if not maintainer_from_source_cache.has_key(source_id): + q = projectB.query("SELECT name FROM maintainer WHERE id IN (SELECT maintainer FROM source WHERE id = %s)" % (source_id)); + maintainer = q.getresult()[0][0] + maintainer_from_source_cache[source_id] = fix_maintainer(maintainer) + + return maintainer_from_source_cache[source_id] + +def get_maintainer (maintainer_id): + global maintainer_cache + + if not maintainer_cache.has_key(maintainer_id): + q = projectB.query("SELECT name FROM maintainer WHERE id = %s" % (maintainer_id)); + maintainer = q.getresult()[0][0] + maintainer_cache[maintainer_id] = fix_maintainer(maintainer) + + return maintainer_cache[maintainer_id] + +#################################################################################################################################### + +def main(): + global Cnf, projectB; + + projectB = pg.connect('projectb', 'localhost'); + + apt_pkg.init(); + + Cnf = apt_pkg.newConfiguration(); + apt_pkg.ReadConfigFileISC(Cnf,utils.which_conf_file()); + + extra_files = apt_pkg.ParseCommandLine(Cnf,[],sys.argv); + + for suite in Cnf.SubTree("Suite").List(): + suite = string.lower(suite); + suite_priority = int(Cnf["Suite::%s::Priority" % (suite)]) + # Binary packages + q = projectB.query("SELECT b.package, b.source, b.maintainer FROM bin_associations ba, binaries b, suite s WHERE s.suite_name = '%s' AND ba.suite = s.id AND ba.bin = b.id" % (suite)); + binaries = q.getresult(); + for binary in binaries: + package = binary[0] + source_id = binary[1] + # Use the source maintainer first; falling back on the binary maintainer as a last resort only + if source_id != 0: + maintainer = get_maintainer_from_source(source_id) + else: + maintainer = get_maintainer(binary[2]) + if packages.has_key(package): + if packages[package]["priority"] < suite_priority: + packages[package] = { "maintainer": maintainer, "priority": suite_priority } + else: + packages[package] = { "maintainer": maintainer, "priority": suite_priority } + + # Source packages + q = projectB.query("SELECT s.source, m.name FROM src_associations sa, source s, suite su, maintainer m WHERE su.suite_name = '%s' AND sa.suite = su.id AND sa.source = s.id AND m.id = s.maintainer" % (suite)) + sources = q.getresult(); + for source in sources: + package = source[0] + maintainer = fix_maintainer(source[1]) + if packages.has_key(package): + if packages[package]["priority"] < suite_priority: + packages[package] = { "maintainer": maintainer, "priority": suite_priority } + else: + packages[package] = { "maintainer": maintainer, "priority": suite_priority } + + # Process any additional Maintainer files (e.g. from non-US or pseudo packages) + for filename in extra_files: + file = utils.open_file(filename, 'r') + for line in file.readlines(): + m = re_split.match(line[:-1]) + package = m.group(1) + maintainer = fix_maintainer(m.group(2)) + if not packages.has_key(package): + packages[package] = { "maintainer": maintainer, "priority": 0 } + file.close() + + package_keys = packages.keys() + package_keys.sort() + for package in package_keys: + print "%-20s %s" % (package, packages[package]["maintainer"]) + +if __name__ == '__main__': + main() + diff --git a/contrib/fix.1 b/contrib/fix.1 new file mode 100755 index 00000000..0cb2ad61 --- /dev/null +++ b/contrib/fix.1 @@ -0,0 +1,221 @@ +#!/usr/bin/env python + +# Populate the DB +# Copyright (C) 2000 James Troup +# $Id: fix.1,v 1.1 2000-11-24 00:20:11 troup 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 +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +################################################################################ + +# 04:36| elmo: you're making me waste 5 seconds per architecture!!!!!! YOU BASTARD!!!!! + +################################################################################ + +# This code is a horrible mess for two reasons: + +# (o) For Debian's usage, it's doing something like 160k INSERTs, +# even on auric, that makes the program unusable unless we get +# involed in sorts of silly optimization games (local dicts to avoid +# redundant SELECTS, using COPY FROM rather than INSERTS etc.) + +# (o) It's very site specific, because I don't expect to use this +# script again in a hurry, and I don't want to spend any more time +# on it than absolutely necessary. + +############################################################################################################### + +import commands, os, pg, re, sys, string, tempfile +import apt_pkg +import db_access, utils + +############################################################################################################### + +re_arch_from_filename = re.compile(r"binary-[^/]+") + +############################################################################################################### + +Cnf = None; +projectB = None; +files_id_cache = {}; +source_cache = {}; +arch_all_cache = {}; +binary_cache = {}; +# +files_id_serial = 0; +source_id_serial = 0; +src_associations_id_serial = 0; +dsc_files_id_serial = 0; +files_query_cache = None; +source_query_cache = None; +src_associations_query_cache = None; +dsc_files_query_cache = None; +orig_tar_gz_cache = {}; +# +binaries_id_serial = 0; +binaries_query_cache = None; +bin_associations_id_serial = 0; +bin_associations_query_cache = None; +# +source_cache_for_binaries = {}; + +############################################################################################################### + +# Prepares a filename or directory (s) to be file.filename by stripping any part of the location (sub) from it. +def poolify (s, sub): + for i in xrange(len(sub)): + if sub[i:] == s[0:len(sub)-i]: + return s[len(sub)-i:]; + return s; + +############################################################################################################## + +def get_or_set_files_id (filename, size, md5sum, location_id): + global files_id_cache, files_id_serial, files_query_cache; + + cache_key = string.join((filename, size, md5sum, repr(location_id)), '~') + if not files_id_cache.has_key(cache_key): + files_id_serial = files_id_serial + 1 + files_query_cache.write("%d\t%s\t%s\t%s\t%d\n" % (files_id_serial, filename, size, md5sum, location_id)); + files_id_cache[cache_key] = files_id_serial + + return files_id_cache[cache_key] + +############################################################################################################## +def process_packages (location, filename, suite, component, archive): + global arch_all_cache, binary_cache, binaries_id_serial, binaries_query_cache, bin_associations_id_serial, bin_associations_query_cache; + + apt_pkg.init(); + + Cnf = apt_pkg.newConfiguration(); + apt_pkg.ReadConfigFileISC(Cnf,'/home/troup/katie/katie.conf'); + + projectB = pg.connect('projectb', 'localhost', -1, None, None, 'postgres') + + db_access.init (Cnf, projectB); + + count_total = 0; + count_bad = 0; + suite = string.lower(suite); + suite_id = db_access.get_suite_id(suite); + if suite == "stable": + testing_id = db_access.get_suite_id("testing"); + suite_codename = Cnf["Suite::%s::CodeName" % (suite)]; + try: + file = utils.open_file (filename, "r") + except utils.cant_open_exc: + print "WARNING: can't open '%s'" % (filename); + return; + Scanner = apt_pkg.ParseTagFile(file); + while Scanner.Step() != 0: + package = Scanner.Section["package"] + version = Scanner.Section["version"] + maintainer = Scanner.Section["maintainer"] + maintainer = string.replace(maintainer, "'", "\\'") + maintainer_id = db_access.get_or_set_maintainer_id(maintainer); + architecture = Scanner.Section["architecture"] + architecture_id = db_access.get_architecture_id (architecture); + if not Scanner.Section.has_key("source"): + source = package + else: + source = Scanner.Section["source"] + source_version = "" + if string.find(source, "(") != -1: + m = utils.re_extract_src_version.match(source) + source = m.group(1) + source_version = m.group(2) + if not source_version: + source_version = version + xfilename = Scanner.Section["filename"] + filename = xfilename + location_id = db_access.get_location_id (location, component, archive) + filename = poolify (filename, location) + if architecture == "all": + filename = re_arch_from_filename.sub("binary-all", filename); + cache_key = "%s~%s" % (source, source_version); + source_id = source_cache_for_binaries.get(cache_key, None); + size = Scanner.Section["size"]; + md5sum = Scanner.Section["md5sum"]; + files_id = get_or_set_files_id (filename, size, md5sum, location_id); + cache_key = "%s~%s~%s~%d~%d~%d" % (package, version, repr(source_id), architecture_id, location_id, files_id); + if not arch_all_cache.has_key(cache_key): + arch_all_cache[cache_key] = 1; + cache_key = "%s~%s~%d" % (package, version, architecture_id); + if not binary_cache.has_key(cache_key): + binary_cache[cache_key] = (size, md5sum); + else: + (oldsize, oldmd5sum) = binary_cache[cache_key]; + if oldsize != size or oldmd5sum != md5sum: + #print "/org/ftp.debian.org/ftp/%s" % (xfilename); + print "%s: %s vs. %s and %s vs. %s" % (xfilename, oldsize, size, oldmd5sum, md5sum); + #count_bad = count_bad + 1; + + count_total = count_total +1; + + file.close(); + if count_bad != 0: + print "Found %d bad." % (count_bad) + +############################################################################################################## + +def main (): + global Cnf, projectB, query_cache, files_query_cache, source_query_cache, src_associations_query_cache, dsc_files_query_cache, bin_associations_query_cache, binaries_query_cache; + + apt_pkg.init(); + + Cnf = apt_pkg.newConfiguration(); + apt_pkg.ReadConfigFileISC(Cnf,'/home/troup/katie/katie.conf'); + + files_query_cache = utils.open_file(Cnf["Neve::ExportDir"]+"files","w"); + source_query_cache = utils.open_file(Cnf["Neve::ExportDir"]+"source","w"); + src_associations_query_cache = utils.open_file(Cnf["Neve::ExportDir"]+"src_associations","w"); + dsc_files_query_cache = utils.open_file(Cnf["Neve::ExportDir"]+"dsc_files","w"); + binaries_query_cache = utils.open_file(Cnf["Neve::ExportDir"]+"binaries","w"); + bin_associations_query_cache = utils.open_file(Cnf["Neve::ExportDir"]+"bin_associations","w"); + + # Process Packages files to populate `binaries' and friends + + for location in Cnf.SubTree("Location").List(): + SubSec = Cnf.SubTree("Location::%s" % (location)); + server = SubSec["Archive"]; + if server != "ftp-master": # FIXME, don't hard code + continue; + type = Cnf.Find("Location::%s::Type" % (location)); + if type == "legacy-mixed": + packages = location + 'Packages'; + suite = Cnf.Find("Location::%s::Suite" % (location)); + process_packages (location, packages, suite, "", server); + elif type == "legacy": + for suite in Cnf.SubTree("Location::%s::Suites" % (location)).List(): + for component in Cnf.SubTree("Component").List(): + for architecture in Cnf.SubTree("Suite::%s::Architectures" % (suite)).List(): + if architecture == "source" or architecture == "all": + continue; + packages = location + Cnf.Find("Suite::%s::CodeName" % (suite)) + '/' + component + '/binary-' + architecture + '/Packages' + process_packages (location, packages, suite, component, server); + elif type == "pool": + continue; + + files_query_cache.close(); + source_query_cache.close(); + src_associations_query_cache.close(); + dsc_files_query_cache.close(); + binaries_query_cache.close(); + bin_associations_query_cache.close(); + + return; + +if __name__ == '__main__': + main() diff --git a/contrib/fix.2 b/contrib/fix.2 new file mode 100755 index 00000000..7a643fe1 --- /dev/null +++ b/contrib/fix.2 @@ -0,0 +1,36 @@ +#!/usr/bin/env python + +import commands, os, string, sys +import apt_inst, apt_pkg +import utils + +Cnf = None + +def main(): + global Cnf + + apt_pkg.init(); + + Cnf = apt_pkg.newConfiguration(); + apt_pkg.ReadConfigFileISC(Cnf,'/home/troup/katie/katie.conf'); + + Arguments = []; + + dsc_files = apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv); + + for dsc_file in dsc_files: + dsc = utils.parse_changes(dsc_file); + files = utils.build_file_list(dsc, 1); + for file in files.keys(): + if not os.path.exists(file): + (result, output) = commands.getstatusoutput("locate %s | grep /org/ftp.debian.org/ftp/dists/potato/" % (file)); + if (result != 0): + print "%s: can't find '%s'." % (dsc_file, file); + continue; + output = string.replace(output, "/org/ftp.debian.org/ftp/dists/potato/", "../potato/"); + print "symlinking '%s' to '%s'." % (output, file); + os.symlink(output, file); + +if __name__ == '__main__': + main() + diff --git a/contrib/fix.3 b/contrib/fix.3 new file mode 100755 index 00000000..643fedc8 --- /dev/null +++ b/contrib/fix.3 @@ -0,0 +1,99 @@ +#!/bin/sh + +# restore binary-all links +# Copyright (C) 2000 James Troup + +# 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., 675 Mass Ave, Cambridge, MA 02139, USA. + +# WARNING: this is a quick hack to fix several architectures in sid; +# it has lots of things hardcoded when they shouldn't be etc. + +####################################################################### +source `dirname $0`/vars + +# defaults + +dry_run=no + +####################################################################### + +count=0 + +# Write usage message +usage() { + echo "usage: $progname [-n] architecture" 1>&2 +} + +# Write error message to stderr and quit. +error() { + echo "$progname: $@" 1>&2 + exit 1 +} + +# Check for at least one argument +if [ $# -eq 0 ]; then + usage + exit 1 +fi + +# Parse options +progname="$0" +loop=yes +while [ $loop = yes ] +do + case "$1" in + -n|--dry-run) dry_run="yes"; shift 1;; + --) shift; loop=no ;; + -h|--help) usage; exit 0 ;; + -*) error "unknown option $1" ;; + *) loop=no ;; + esac +done + +cd $ftp/dists/potato/ + +if [ ! -d main/binary-$1 ]; then + echo "Can't find arch $1" + exit 1 +fi + +echo "About to run this horrible script for arch $1 which will probably break things." +echo -n "Are you sure? [Y/n]: " +read answer +if [ -z "$answer" ]; then answer="y"; fi +case "$answer" in + n|N) echo "Aborting..";exit 0;; + y|Y) ;; + *) echo "E: '$answer' not understood, exiting.";rm .genreport; exit 1;; +esac + +for j in main non-free contrib; do + for i in $(find $j/binary-all/ ! -type d); do + dir=$(dirname $i | sed -e "s/binary-all/binary-$1/") + pushd $dir >/dev/null + if [ ! -e $(basename $i) ]; then + if [ "$dry_run" = "no" ]; then + echo "Linking to $i" + ln -s ../../../$i . + else + echo "Would link to $i" + fi + count=$(expr $count + 1) + fi + popd > /dev/null + done +done + +echo "Added $count links." diff --git a/contrib/fix.4 b/contrib/fix.4 new file mode 100755 index 00000000..39c94f06 --- /dev/null +++ b/contrib/fix.4 @@ -0,0 +1,29 @@ +#!/bin/sh + +dir=/org/ftp.debian.org/ftp/dists/woody/ + +for component in main non-free contrib; do # non-free contrib + for i in $(find $dir/$component/binary-all/ -type f); do + new=$(find $dir/$component/binary-i386/ -type f -name $(basename $i | sed -e "s/_.*//")_\*); + if [ ! -z "$new" ]; then + oldver=$(dpkg-deb -f $i version) + newver=$(dpkg-deb -f $new version) + if dpkg --compare-versions $oldver gt $newver; then + echo EEH??? + echo $(basename $i) dominates $(basename $new) ???; + fi; + if dpkg --compare-versions $oldver eq $newver; then + #echo $(basename $i) equals $(basename $new); + true; + fi; + if dpkg --compare-versions $oldver lt $newver; then + echo \# $(basename $new) \(arch: any\) DOMINATES $(basename $i) \(arch: all\); + echo mv -iv $i ~troup/removed-from-ftp/all/ + fi; + fi; + done +done + +echo +echo \# Cleanup dangling symlinks +echo symlinks -rd $dir diff --git a/contrib/fix.6 b/contrib/fix.6 new file mode 100755 index 00000000..6a3c25fe --- /dev/null +++ b/contrib/fix.6 @@ -0,0 +1,59 @@ +#!/usr/bin/env python + +import pg, string, os, shutil +import utils +import apt_pkg + +def move(src, dest): + if os.path.exists(dest): + print 'overwrite `'+dest+'\'? ', + yn = utils.our_raw_input() + if yn != 'Y' and yn != 'y': + return + print src + ' -> ' + dest + shutil.copyfile (src, dest) + os.unlink (src) + +def main(): + projectB = pg.connect('projectb', 'localhost') + + apt_pkg.init(); + + suite = "unstable"; + architecture = "i386"; + +# too slow to run every time +# "select b.package from binaries b, architecture a where a.arch_string = 'all' and b.architecture = a.id INTERSECT select b.package from binaries b, architecture a where a.arch_string = 'i386' and b.architecture = a.id;" + + borked = utils.open_file('broken', 'r') + for line in borked.readlines(): + package = string.strip(line[:-1]) + + #print "=========" + #print package + q = projectB.query("SELECT b.version, a.arch_string, l.path, b.filename FROM bin_associations ba, binaries b, architecture a, suite s, location l WHERE b.package = '%s' AND (a.arch_string = '%s' OR a.arch_string = 'all') AND s.suite_name = '%s' AND ba.bin = b.id AND ba.suite = s.id AND b.architecture = a.id AND l.id = b .location" % (package, architecture, suite)) + entries = q.getresult() + version = {} + filename = "" + for entry in entries: + version[entry[1]] = entry[0] + if entry[1] == "all": + filename = entry[2] + entry[3] + if not version.has_key(architecture) or not version.has_key("all"): + #print "SKIPPING" + continue + if apt_pkg.VersionCompare(version[architecture], version["all"]) != 1: + #print architecture+" too new... SKIPPING" + continue + #print " "+repr(version) + if os.path.exists(filename): + if os.path.islink(filename): + print "FIXING: unlinking %s" % (filename); + os.unlink(filename); + else: + print "FIXING: moving %s to /home/troup/removed-from-ftp/foad/" % (filename); + move(filename, "/home/troup/removed-from-ftp/foad/%s" % (os.path.basename(filename))); + +if __name__ == '__main__': + main() + diff --git a/contrib/fix.7 b/contrib/fix.7 new file mode 100755 index 00000000..08b2614e --- /dev/null +++ b/contrib/fix.7 @@ -0,0 +1,24 @@ +#!/bin/sh + +# "I tried to understand you.. I tried to love you right" + +dists=/org/ftp.debian.org/ftp/dists/ +dir=$dists/woody/ + +for i in main contrib non-free; do # main contrib non-free + for j in arm; do # hurd-i386 hppa mips mipsel sh + echo "Processing $j ($i)..." + for k in $(find $dir/$i/binary-$j/ -type l); do + dest=$(readlink $k) + echo $dest | grep -q /binary-all/ + if [ $? -eq 0 ]; then + file=$(basename $k) + woody=$(find $dists/woody/$i/binary-all/ -name $file) + if [ -z "$woody" ]; then + echo "Killing link to $file"; + rm $k + fi + fi + done + done +done diff --git a/contrib/fix.8 b/contrib/fix.8 new file mode 100755 index 00000000..75d5a384 --- /dev/null +++ b/contrib/fix.8 @@ -0,0 +1,23 @@ +#!/bin/sh + +total=0 + +for i in $(cat foo.2); do + if [ -f $i -a ! -L $i ]; then + dir=$(dirname $i) + file=$(basename $i) + size=$(du -b $i | cut -f 1) + arch=$(echo $i | sed -e "s#.*binary-\([a-z]*\).*#\1#") + pushd $dir > /dev/null + destdir=/home/troup/removed-from-ftp/badmd5-$arch/ + if [ ! -d $destdir ]; then mkdir $destdir; fi + mv -iv $file $destdir/ + ln -s ../../../../potato/$(echo $i | sed -e "s#.*woody/##") . + popd > /dev/null + total=$(expr $total + $size) + fi +done + +echo +echo "Replaced $total bytes." + diff --git a/copyoverrides b/copyoverrides new file mode 100755 index 00000000..23714dd1 --- /dev/null +++ b/copyoverrides @@ -0,0 +1,32 @@ +#! /bin/sh +# $Id: copyoverrides,v 1.1 2000-11-24 00:20:11 troup Exp $ + +set -e +. $SCRIPTVARS +echo 'Copying override files into public view ...' + +for f in $copyoverrides ; do + cd $overridedir + sortover.pl override.$f.new + ln -f override.$f old/override.$f.old + mv override.$f.new override.$f + chmod g+w override.$f + + cd $indices + rm -f .newover-$f.gz + pc="`gzip 2>&1 -9nv <$overridedir/override.$f >.newover-$f.gz`" + set +e + nf=override.$f.gz + cmp -s .newover-$f.gz $nf + rc=$? + set -e + if [ $rc = 0 ]; then + rm -f .newover-$f.gz + elif [ $rc = 1 -o ! -f $nf ]; then + echo " installing new $nf $pc" + mv -f .newover-$f.gz $nf + else + echo $? $pc + exit 1 + fi +done diff --git a/cron.daily b/cron.daily new file mode 100755 index 00000000..59bf12a8 --- /dev/null +++ b/cron.daily @@ -0,0 +1,73 @@ +#! /bin/sh +# +# Executed daily via cron, out of troup's crontab. + +set -e +export SCRIPTVARS=/org/ftp.debian.org/scripts/masterfiles/vars +. $SCRIPTVARS + +##### + +echo Archive maintenance started at $(date +%X) + +NOTICE="$ftpdir/Archive_Maintenance_In_Progress" + +cleanup() { + rm -f "$NOTICE" +} +trap cleanup 0 + +rm -f "$NOTICE" +cat > "$NOTICE" < FIXME + +##### + +# temporary hack to work around the lack of an apt-utils package +export PYTHONPATH=$PYTHONPATH:/org/ftp.debian.org/scripts/apt/build/bin/ +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/org/ftp.debian.org/scripts/apt/build/bin/ +export PATH=$PATH:/org/ftp.debian.org/scripts/apt/build/bin/ + +cd $incoming +rm -f REPORT +dak-install -pak *.changes | direport | tee REPORT | \ + mail -s "Install for $(date +%D)" ftpmaster@ftp-master.debian.org +chgrp debadmin REPORT +chmod 664 REPORT + +cd $masterdir +symlinks -d -r $ftpdir + +cd $masterdir +apt-ftparchive generate apt.conf +dak-mkmaintainers +copyoverrides +mklslar +mkchecksums + +# [JT] temporary hack to make the buildd daemons and proposed-updates get along +pushd /org/ftp.debian.org/ftp/dists/proposed-updates +/home/troup/katie/drow *.dsc +popd + +rm -f $NOTICE +echo Archive maintenance finished at $(date +%X) + +ulimit -m 90000 -d 90000 -s 10000 -v 90000 + +run-parts --report /org/ftp.debian.org/scripts/distmnt + +echo Daily cron scripts successful. diff --git a/cron.daily-non-US b/cron.daily-non-US new file mode 100755 index 00000000..553775f8 --- /dev/null +++ b/cron.daily-non-US @@ -0,0 +1,78 @@ +#! /bin/sh +# +# Executed daily via cron, out of troup's crontab. + +set -e +export SCRIPTVARS=/org/non-us.debian.org/katie/vars-non-US +. $SCRIPTVARS + +################################################################################ + +echo Archive maintenance started at $(date +%X) + +NOTICE="$ftpdir/Archive_Maintenance_In_Progress" + +cleanup() { + rm -f "$NOTICE" +} +trap cleanup 0 + +rm -f "$NOTICE" +cat > "$NOTICE" < /org/non-us.debian.org/backup/dump_$(date +%Y.%m.%d-%H:%M:%S) + +################################################################################ + +# temporary hack to work around the lack of an apt-utils & python-apt package +export PYTHONPATH=$PYTHONPATH:/org/ftp.debian.org/scripts/apt/build/bin/ +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/org/ftp.debian.org/scripts/apt/build/bin/ +export PATH=$PATH:/org/ftp.debian.org/scripts/apt/build/bin/ + +cd $incoming +rm -f REPORT +katie -pak *.changes | direport | tee REPORT | \ + mail -s "Non-US Install for $(date +%D)" ftpmaster@ftp-master.debian.org +chgrp debadmin REPORT +chmod 664 REPORT + +cd $masterdir +symlinks -d -r $ftpdir + +cd $masterdir +jenna +apt-ftparchive generate apt.conf-non-US +cd $indices +charisma > .new-maintainers +mv -f .new-maintainers Maintainers +gzip -9v .new-maintainers.gz +mv -f .new-maintainers.gz Maintainers.gz +cd $masterdir +copyoverrides +mklslar +mkchecksums + +rm -f $NOTICE +echo Archive maintenance finished at $(date +%X) + +################################################################################ + +echo "Creating post-daily-cron-job backup of projectb database..." +pg_dump projectb > /org/non-us.debian.org/backup/dump_$(date +%Y.%m.%d-%H:%M:%S) + +################################################################################ + +ulimit -m 90000 -d 90000 -s 10000 -v 90000 + +run-parts --report /org/ftp.debian.org/scripts/distmnt + +echo Daily cron scripts successful. diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..6f87f6ac --- /dev/null +++ b/debian/changelog @@ -0,0 +1,9 @@ +katie (0.0-0) unstable; urgency=low + + * Initial non-release. + + -- James Troup Fri, 29 Sep 2000 01:19:17 +0100 + +Local variables: +mode: debian-changelog +End: diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..918c8252 --- /dev/null +++ b/debian/control @@ -0,0 +1,13 @@ +Source: katie +Section: misc +Priority: extra +Maintainer: James Troup +Standards-Version: 3.1.1.1 + +Package: katie +Architecture: all +Depends: python, apt-utils, gnupg +Suggests: gnupg (>= 1.0.3-1) +Description: Debian's archive maintenance scripts + This is a collection of archive maintenance scripts used by the + Debian project. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..165e2a70 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,23 @@ +This is Debian GNU's prepackaged version of katie, Debian's archive +maintenance scripts. + +This package was put together by me, James Troup , +from my sources. + +Program Copyright (C) 2000 James Troup. + +katie 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, or (at your option) any later +version. + +katie 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 with +your Debian GNU system, in /usr/share/common-licenses/GPL, or with the +Debian GNU gnupg source package as the file COPYING. If not, write to +the Free Software Foundation, Inc., 59 Temple Place, Suite 330, +Boston, MA 02111-1307, USA. diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 00000000..cb8cb1b1 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +if [ "$1" = "configure" ]; then + if [ -d /usr/doc -a ! -e /usr/doc/katie \ + -a -d /usr/share/doc/katie ]; then + ln -sf ../share/doc/katie /usr/doc/katie + fi +fi diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..74c4a05b --- /dev/null +++ b/debian/rules @@ -0,0 +1,55 @@ +#!/usr/bin/make -f +# debian/rules file - for Katie (0.0) +# Based on sample debian/rules file - for GNU Hello (1.3). +# Copyright 1994,1995 by Ian Jackson. +# Copyright 1998,1999,2000 James Troup +# I hereby give you perpetual unlimited permission to copy, +# modify and relicense this file, provided that you do not remove +# my name from the file itself. (I assert my moral right of +# paternity under the Copyright, Designs and Patents Act 1988.) +# This file may have to be extensively modified + +build: + +clean: + $(checkdir) + -rm -rf debian/tmp debian/*~ debian/files* debian/substvars + +binary-indep: checkroot + $(checkdir) + -rm -rf debian/tmp + install -d debian/tmp/DEBIAN/ + install -m 755 debian/prerm debian/postinst debian/tmp/DEBIAN/ + install -d debian/tmp/usr/bin/ + install -m 755 katie debian/tmp/usr/bin/da_install + install -m 755 jenna debian/tmp/usr/bin/da_mkfilelist + install -m 755 heidi debian/tmp/usr/bin/da_tags + install -m 755 charisma debian/tmp/usr/bin/da_mkmaintainers + install -m 755 neve debian/tmp/usr/bin/da_populate + install -m 755 leon debian/tmp/usr/bin/da_clean + install -d debian/tmp/usr/share/doc/gnupg/ + install -m 644 debian/changelog debian/tmp/usr/share/doc/gnupg/changelog.Debian + install -m 644 README NEWS THANKS TODO debian/tmp/usr/share/doc/gnupg/ + install -m 644 ChangeLog debian/tmp/usr/share/doc/gnupg/changelog + gzip -9v debian/tmp/usr/share/doc/gnupg/* + install -m 644 debian/copyright debian/tmp/usr/share/doc/gnupg/ + dpkg-gencontrol -isp + chown -R root.root debian/tmp + chmod -R go=rX debian/tmp + dpkg --build debian/tmp .. + +binary-arch: + +define checkdir + test -f katie -a -f debian/rules +endef + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +checkroot: + $(checkdir) + test root = "`whoami`" + +.PHONY: binary binary-arch binary-indep clean checkroot diff --git a/heidi b/heidi new file mode 100755 index 00000000..b34f951e --- /dev/null +++ b/heidi @@ -0,0 +1,205 @@ +#!/usr/bin/env python + +# Manipulate suite tags +# Copyright (C) 2000 James Troup +# $Id: heidi,v 1.1 2000-11-24 00:20:11 troup 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 +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +####################################################################################### + +# 8to6Guy: "Wow, Bob, You look rough!" +# BTAF: "Mbblpmn..." +# BTAF <.oO>: "You moron! This is what you get for staying up all night drinking vodka and salad dressing!" +# BTAF <.oO>: "This coffee I.V. drip is barely even keeping me awake! I need something with more kick! But what?" +# BTAF: "OMIGOD! I OVERDOSED ON HEROIN" +# CoWorker#n: "Give him air!!" +# CoWorker#n+1: "We need a syringe full of adrenaline!" +# CoWorker#n+2: "Stab him in the heart!" +# BTAF: "*YES!*" +# CoWorker#n+3: "Bob's been overdosing quite a bit lately..." +# CoWorker#n+4: "Third time this week." + +# -- http://www.angryflower.com/8to6.gif + +####################################################################################### + +# Adds or removes packages from a suite. Takes the list of files +# either from stdin or as a command line argument. Special action +# "set", will reset the suite (!) and add all packages from scratch. + +####################################################################################### + +import os, pg, string, sys; +import apt_pkg; +import utils, db_access; + +####################################################################################### + +Cnf = None; +projectB = None; + +####################################################################################### + +def process_file (file, suite_id, action): + + if action == "set": + projectB.query("DELETE FROM bin_associations WHERE suite = %d" % (suite_id)); + projectB.query("DELETE FROM src_associations WHERE suite = %d" % (suite_id)); + action = "add"; + + for line in file.readlines(): + split_line = string.split(string.strip(line[:-1])); + if len(split_line) != 3: + sys.stderr.write("W: '%s' does not break into 'package version architecture'.\n"); + continue; + + (package, version, architecture) = split_line; + + if architecture == "source": + q = projectB.query("SELECT id FROM source WHERE source = '%s' AND version = '%s'" % (package, version)) + else: + q = projectB.query("SELECT b.id FROM binaries b, architecture a WHERE package = '%s' AND b.version = '%s' AND (a.arch_string = '%s' OR a.arch_string = 'all') AND b.architecture = a.id" % (package, version, architecture)) + + ql = q.getresult(); + if ql == []: + sys.stderr.write("W: Couldn't find '%s~%s~%s'.\n" % (package, version, architecture)); + continue; + if len(ql) > 1: + sys.stderr.write("E: Found more than one match for '%s~%s~%s'.\n" % (package, version, architecture)); + continue; + id = ql[0][0]; + + if architecture == "source": + # Find the existing assoications ID, if any + q = projectB.query("SELECT id FROM src_associations WHERE suite = %d and source = %d" % (suite_id, id)); + ql = q.getresult(); + if ql == []: + assoication_id = None; + else: + assoication_id = ql[0][0]; + # Take action + if action == "add": + if assoication_id != None: + sys.stderr.write("W: '%s~%s~%s' already exists in suite %d.\n" % (package, version, architecture, suite_id)); + continue; + else: + q = projectB.query("INSERT INTO src_associations (suite, source) VALUES (%d, %d)" % (suite_id, id)); + elif action == "remove": + if assoication_id == None: + sys.stderr.write("W: '%s~%s~%s' doesn't exist in suite %d.\n" % (package, version, architecture, suite_id)); + continue; + else: + q = projectB.query("DELETE FROM src_associations WHERE id = %d" % (assoication_id)); + else: + # Find the existing assoications ID, if any + q = projectB.query("SELECT id FROM bin_associations WHERE suite = %d and bin = %d" % (suite_id, id)); + ql = q.getresult(); + if ql == []: + assoication_id = None; + else: + assoication_id = ql[0][0]; + # Take action + if action == "add": + if assoication_id != None: + sys.stderr.write("W: '%s~%s~%s' already exists in suite %d.\n" % (package, version, architecture, suite_id)); + continue; + else: + q = projectB.query("INSERT INTO bin_associations (suite, bin) VALUES (%d, %d)" % (suite_id, id)); + elif action == "remove": + if assoication_id == None: + sys.stderr.write("W: '%s~%s~%s' doesn't exist in suite %d.\n" % (package, version, architecture, suite_id)); + continue; + else: + q = projectB.query("DELETE FROM bin_associations WHERE id = %d" % (assoication_id)); + +####################################################################################### + +def get_list (suite_id): + # List binaries + q = projectB.query("SELECT b.package, b.version, a.arch_string FROM binaries b, bin_associations ba, architecture a WHERE ba.suite = %d AND ba.bin = b.id AND b.architecture = a.id" % (suite_id)); + ql = q.getresult(); + for i in ql: + print "%s %s %s" % (i[0], i[1], i[2]); + + # List source + q = projectB.query("SELECT s.source, s.version FROM source s, src_associations sa WHERE sa.suite = %d AND sa.source = s.id" % (suite_id)); + ql = q.getresult(); + for i in ql: + print "%s %s source" % (i[0], i[1]); + +####################################################################################### + +def main (): + global Cnf, projectB; + + apt_pkg.init(); + + Cnf = apt_pkg.newConfiguration(); + apt_pkg.ReadConfigFileISC(Cnf,utils.which_conf_file()); + + Arguments = [('a',"add","Heidi::Options::Add", "HasArg"), + ('d',"debug","Heidi::Options::Debug", "IntVal"), + ('h',"help","Heidi::Options::Help"), + ('l',"list","Heidi::Options::List","HasArg"), + ('r',"remove", "Heidi::Options::Remove", "HasArg"), + ('s',"set", "Heidi::Options::Set", "HasArg"), + ('v',"version","Heidi::Options::Version")]; + + file_list = apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv); + + projectB = pg.connect('projectb', 'localhost'); + + db_access.init(Cnf, projectB); + + action = None; + + for i in ("add", "list", "remove", "set"): + suite = Cnf["Heidi::Options::%s" % (i)]; + if suite !="": + if not Cnf.has_key("Suite::%s" % (suite)): + sys.stderr.write("Unknown suite %s.\n" %(suite)); + sys.exit(2); + else: + suite_id = db_access.get_suite_id(suite); + if action != None: + sys.stderr.write("Can only do one action at a time.\n"); + sys.exit(2); + action = i; + + # Need an action... + if action == None: + sys.stderr.write("No action specified.\n"); + sys.exit(2); + + # Safety/Sanity check + if action == "set" and suite != "testing": + sys.stderr.write("Will not reset a suite other than testing...\n"); + sys.exit(2); + + if action == "list": + get_list(suite_id); + else: + if file_list != []: + for file in file_list: + process_file(utils.open_file(file_list[0],'r'), suite_id, action); + else: + process_file(sys.stdin, suite_id, action); + +####################################################################################### + +if __name__ == '__main__': + main() + diff --git a/jenna b/jenna new file mode 100755 index 00000000..11b5c91e --- /dev/null +++ b/jenna @@ -0,0 +1,197 @@ +#!/usr/bin/env python + +# Generate file list which is then fed to apt-ftparchive to generate Packages and Sources files +# Copyright (C) 2000 James Troup +# $Id: jenna,v 1.1 2000-11-24 00:20:11 troup 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 +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +####################################################################################### + +# BTAF: "GOD *DAMMIT*!! What the FUCK happened to my free will??" +# +# -- http://www.angryflower.com/timelo.gif + +####################################################################################### + +import pg, string, os, sys +import apt_pkg +import db_access, utils + +projectB = None +Cnf = None + +def generate_src_list(suite, component, output): + sources = {} + + suite_id = db_access.get_suite_id(suite); + + if component == "-": + q = projectB.query("SELECT s.source, s.version, l.path, f.filename, s.id FROM source s, src_associations sa, location l, files f WHERE sa.source = s.id AND sa.suite = '%d' AND l.id = f.location AND s.file = f.id" + % (suite_id)); + else: + q = projectB.query("SELECT s.source, s.version, l.path, f.filename, s.id FROM source s, src_associations sa, location l, component c, files f WHERE lower(c.name) = '%s' AND (c.id = l.component OR l.component = NULL) AND sa.source = s.id AND sa.suite = '%d' AND l.id = f.location AND s.file = f.id" + % (component, suite_id)); + entries = q.getresult(); + for entry in entries: + source = entry[0] + version = entry[1] + filename = entry[2]+entry[3]; + id = entry[4] + add_new = 0 + if os.path.exists(filename): + if sources.has_key(source): + if apt_pkg.VersionCompare(sources[source]["version"], version) == -1: + if not Cnf.Find("Suite::%s::Untouchable" % (suite)): + print "deleting %s (%s) in favour of newer version %s..." % (source, sources[source]["version"], version) + projectB.query("DELETE FROM src_associations WHERE source = %s AND suite = %d" % (sources[source]["id"], suite_id)) + else: + if Cnf.Find("Jenna::Options::Verbose"): + print "[untouchable] would delete %s (%s) in favour of newer version %s..." % (source, sources[source]["version"], version) + sources[source] = { "id": id, "version": version, "filename": filename } + else: + if not Cnf.Find("Suite::%s::Untouchable" % (suite)): + print "deleting %s (%s) in favour of newer version %s..." % (source, version, sources[source]["version"]) + projectB.query("DELETE FROM src_associations WHERE source = %s AND suite = %d" % (id, suite_id)) + else: + if Cnf.Find("Jenna::Options::Verbose"): + print "[untouchable] would delete %s (%s) in favour of newer version %s..." % (source, version, sources[source]["version"]) + else: + sources[source] = { "id": id, "version": version, "filename": filename } + else: + if not Cnf.Find("Suite::%s::Untouchable" % (suite)): + sys.stderr.write("WARNING: deleting %s because it doesn't exist.\n" % (filename)); + projectB.query("DELETE FROM src_associations WHERE source = %s AND suite = %d" % (id, suite_id)) + + # Write the list of files out + source_keys = sources.keys(); + source_keys.sort(); + for source in source_keys: + output.write(sources[source]["filename"]+'\n') + +def generate_bin_list(suite, component, architecture, output, type): + packages = {} + + suite_id = db_access.get_suite_id(suite); + + if component == "-": + q = projectB.query("SELECT b.package, b.version, l.path, f.filename, b.id FROM architecture a, binaries b, bin_associations ba, location l, files f WHERE ( a.arch_string = '%s' OR a.arch_string = 'all' ) AND a.id = b.architecture AND ba.bin = b.id AND ba.suite = '%d' AND l.id = f.location AND b.file = f.id AND b.type = '%s'" % (architecture, suite_id, type)); + else: + q = projectB.query("SELECT b.package, b.version, l.path, f.filename, b.id FROM architecture a, binaries b, bin_associations ba, location l, component c, files f WHERE lower(c.name) = '%s' AND (c.id = l.component OR l.component = NULL) AND (a.arch_string = '%s' OR a.arch_string = 'all') AND a.id = b.architecture AND ba.bin = b.id AND ba.suite = '%d' AND l.id = f.location AND b.file = f.id AND b.type = '%s'" % (component, architecture, suite_id, type)); + entries = q.getresult(); + for entry in entries: + package = entry[0] + version = entry[1] + filename = entry[2]+entry[3]; + id = entry[4] + add_new = 0 + + # Hack to handle screwed up sid distro [FIXME: this may have issues, remove ASAP] + if not os.path.exists(filename): + sid_filename = string.replace(filename, "/woody/", "/potato/"); + if os.path.exists(sid_filename): + filename = sid_filename; + + if os.path.exists(filename): + if packages.has_key(package): + if apt_pkg.VersionCompare(packages[package]["version"], version) == -1: + if not Cnf.Find("Suite::%s::Untouchable" % (suite)): + print "deleting %s (%s) in favour of newer version %s..." % (package, packages[package]["version"], version) + projectB.query("DELETE FROM bin_associations WHERE bin = %s AND suite = %d" % (packages[package]["id"], suite_id)) + else: + if Cnf.Find("Jenna::Options::Verbose"): + print "[untouchable] would delete %s (%s) in favour of newer version %s..." % (package, packages[package]["version"], version) + packages[package] = { "id": id, "version": version, "filename": filename } + else: + if not Cnf.Find("Suite::%s::Untouchable" % (suite)): + print "deleting %s (%s) in favour of newer version %s..." % (package, version, packages[package]["version"]) + projectB.query("DELETE FROM bin_associations WHERE bin = %s AND suite = %d" % (id, suite_id)) + else: + if Cnf.Find("Jenna::Options::Verbose"): + print "[untochable] would delete %s (%s) in favour of newer version %s..." % (package, version, packages[package]["version"]) + else: + packages[package] = { "id": id, "version": version, "filename": filename } + else: + if not Cnf.Find("Suite::%s::Untouchable" % (suite)): + sys.stderr.write("WARNING: deleting %s because it doesn't exist.\n" % (filename)); + projectB.query("DELETE FROM bin_associations WHERE bin = %s AND suite = %d" % (id, suite_id)) + + # Write the list of files out + package_keys = packages.keys(); + package_keys.sort(); + for package in package_keys: + output.write(packages[package]["filename"]+'\n') + + + +def main(): + global Cnf, projectB; + + projectB = pg.connect('projectb', 'localhost'); + + apt_pkg.init(); + + Cnf = apt_pkg.newConfiguration(); + apt_pkg.ReadConfigFileISC(Cnf,utils.which_conf_file()); + + Arguments = [('a',"architecture","Jenna::Options::Architecture", "HasArg"), + ('c',"component","Jenna::Options::Component", "HasArg"), + ('d',"debug","Jenna::Options::Debug", "IntVal"), + ('h',"help","Jenna::Options::Help"), + ('s',"suite", "Jenna::Options::Suite", "HasArg"), + ('v',"verbose","Jenna::Options::Verbose"), + ('V',"version","Jenna::Options::Version")]; + + apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv); + + db_access.init(Cnf, projectB); + + if Cnf["Jenna::Options::Suite"] == "": + Cnf["Jenna::Options::Suite"] = string.join(Cnf.SubTree("Suite").List()); + for suite in string.split(Cnf["Jenna::Options::Suite"]): + suite = string.lower(suite); + components = Cnf["Jenna::Options::Component"]; + if not Cnf.has_key("Suite::%s::Components" % (suite)): + components = "-"; + if components == "": + components = string.join(Cnf.SubTree("Suite::%s::Components" % (suite)).List()); + for component in string.split(components): + component = string.lower(component) + architectures = Cnf["Jenna::Options::Architecture"]; + if architectures == "": + architectures = string.join(Cnf.SubTree("Suite::%s::Architectures" % (suite)).List()); + for architecture in string.split(architectures): + architecture = string.lower(architecture) + if architecture == "all": + continue + if architecture == "source": + print "Processing dists/%s/%s/%s..." % (suite, component, architecture); + output = utils.open_file("%s/%s_%s_%s.list" % (Cnf["Dir::ListsDir"], suite, component, architecture), "w") + generate_src_list(suite, component, output); + output.close(); + else: + print "Processing dists/%s/%s/binary-%s..." % (suite, component, architecture); + output = utils.open_file("%s/%s_%s_binary-%s.list" % (Cnf["Dir::ListsDir"], suite, component, architecture), "w"); + generate_bin_list(suite, component, architecture, output, "deb"); + output.close(); + if component == "main": # FIXME: must be a cleaner way to say debian-installer is main only? + print "Processing dists/%s/%s/debian-installer/binary-%s..." % (suite,component, architecture); + output = utils.open_file("%s/%s_%s_debian-installer_binary-%s.list" % (Cnf["Dir::ListsDir"], suite, component, architecture), "w"); + generate_bin_list(suite, component, architecture, output, "udeb"); + output.close(); + +if __name__ == '__main__': + main() + diff --git a/katie.conf b/katie.conf new file mode 100644 index 00000000..40d39c6a --- /dev/null +++ b/katie.conf @@ -0,0 +1,331 @@ +Dinstall +{ + Options + { + Automatic ""; + Debug ""; + Help ""; + Ack-New ""; + Manual-Reject ""; + No-Action ""; + No-Lock ""; + No-Version-Check ""; + No-Mail ""; + Override-Distribution ""; + Version ""; + }; + + PGPKeyring "/org/keyring.debian.org/keyrings/debian-keyring.pgp"; + GPGKeyring "/org/keyring.debian.org/keyrings/debian-keyring.gpg"; + SendmailCommand "/usr/sbin/sendmail -oi -t"; + MyEmailAddress "Debian Installer "; + MyHost "debian.org"; // used for generating user@my_host addresses in e.g. manual_reject() + NewAckList "/home/troup/katie/log"; // !!FIXME!! + LockFile "/home/troup/katie/lock"; // !!FIXME!! + +}; + +Heidi +{ + + Options + { + Add ""; + Debug ""; + Help ""; + List ""; + Remove ""; + Set ""; + Version ""; + }; + +}; + +Jenna +{ + + Options + { + Architecture ""; + Component ""; + Debug ""; + Help ""; + Suite ""; + Verbose ""; + Version ""; + }; + +}; + +Neve +{ + + ExportDir "/home/troup/katie/neve-files/"; + +}; + +Rhona +{ + + Options // Currently don't do anything + { + Debug ""; + Help ""; + Interactive ""; + Version ""; + }; + + //Morgue "/org/ftp.debian.org/morgue/"; + Morgue "/org/scratch/troup/morgue/"; + // How long (in seconds) dead packages are left before being killed + StayOfExecution 259200; +}; + +Suite +{ + + // Priority determines which suite is used for the Maintainers filed as generated by charisma/da_mkmaintainers (highest wins) + + Experimental + { + Architectures + { + "source" ""; + "all" ""; + "alpha" ""; + "arm" ""; + "i386" ""; + "m68k" ""; + "powerpc" ""; + "sparc" ""; + }; + Announce "debian-devel-changes@lists.debian.org"; + Version "xx"; + Origin "Debian"; + Description "Experimental packages - not released; use at your own risk."; + CodeName "experimental"; + OverrideCodeName "experimental"; + SingleOverrideFile "true"; + Priority "0"; + }; + + Stable + { + Components + { + main ""; + contrib ""; + non-free ""; + }; + Architectures + { + "source" ""; + "all" ""; + "alpha" ""; + "arm" ""; + "i386" ""; + "m68k" ""; + "powerpc" ""; + "sparc" ""; + }; + Announce "debian-changes@lists.debian.org"; + Version "2.2r0"; + Origin "Debian"; + Description "Debian 2.2 Released 14th August 2000"; + CodeName "potato"; + OverrideCodeName "potato"; + Priority "1"; + Untouchable "1"; + }; + + Proposed-Updates + { + Architectures + { + "source" ""; + "all" ""; + "alpha" ""; + "arm" ""; + "i386" ""; + "m68k" ""; + "powerpc" ""; + "sparc" ""; + }; + Announce "debian-changes@lists.debian.org"; + CopyChanges "dists/proposed-updates/"; + Version "2.2r1"; + Origin "Debian"; + Description "Proposed Updates for Debian 2.2r1 - Not Released"; + CodeName "proposed-updates"; + OverrideCodeName "potato"; + Priority "2"; + }; + + Testing + { + Components + { + main ""; + contrib ""; + non-free ""; + }; + Architectures + { + "source" ""; + "all" ""; + "alpha" ""; + "arm" ""; + "i386" ""; + "m68k" ""; + "powerpc" ""; + "sparc" ""; + }; + Version "2.3-testing"; + Origin "Debian"; + Description "Debian 2.3 Testing distribution - Not Released"; + Priority "3"; + }; + + Unstable + { + Components + { + main ""; + contrib ""; + non-free ""; + }; + Architectures + { + "source" ""; + "all" ""; + "alpha" ""; + "arm" ""; + "hppa" ""; + "hurd-i386" ""; + "i386" ""; + "m68k" ""; + "mips" ""; + "mipsel" ""; + "powerpc" ""; + "sh" ""; + "sparc" ""; + }; + Announce "debian-devel-changes@lists.debian.org"; + Version "2.3"; + Origin "Debian"; + Description "Debian 2.3 Unstable - Not Released"; + CodeName "woody"; + OverrideCodeName "woody"; + Priority "4"; + }; + +}; + +Dir +{ + RootDir "/org/ftp.debian.org/ftp/"; + PoolDir "/org/scratch/troup/pool/"; + PoolRoot "pool/"; + IncomingDir "/org/ftp.debian.org/incoming/"; + OverrideDir "/org/ftp.debian.org/scripts/override/"; + ListsDir "/org/ftp.debian.org/database/dists/"; +}; + +DB +{ + Host "ftp-master.debian.org"; + Port -1; + ROUser "nobody"; +} + +Architectures +{ + + source "Source"; + all "Architecture Independent"; + alpha "DEC Alpha"; + hurd-i386 "Intel ia32 running the HURD"; + hppa "HP PA RISC"; + arm "Arm"; + i386 "Intel ia32"; + m68k "Motorola Mc680x0"; + mips "SGI MIPS"; + mipsel "SGI MIPS (Little Endian)"; + powerpc "PowerPC"; + sh "Hitatchi SuperH"; + sparc "Sun SPARC/UltraSPARC"; + +}; + +Archive +{ + + ftp-master + { + OriginServer "ftp-master.debian.org"; + Description "Master Archive for the Debian project"; + }; + +}; + +Component +{ + + main + { + Description "Main"; + MeetsDFSG "true"; + }; + + contrib + { + Description "Contrib"; + MeetsDFSG "true"; + }; + + non-free + { + Description "Software that fails to meet the DFSG"; + MeetsDFSG "false"; + }; + +}; + +Location +{ + + // Old style locations on ftp-master.debian.org + + /org/ftp.debian.org/ftp/project/experimental/ + { + Archive "ftp-master"; + Suite "experimental"; + Type "legacy-mixed"; + }; + + /org/ftp.debian.org/ftp/dists/proposed-updates/ + { + Archive "ftp-master"; + Suite "proposed-updates"; + Type "legacy-mixed"; + }; + + /org/ftp.debian.org/ftp/dists/ + { + Archive "ftp-master"; + Suites + { + Stable ""; + Unstable ""; + }; + Type "legacy"; + }; + + // New pool locations on ftp-master.debian.org + /org/scratch/troup/pool/ + { + Archive "ftp-master"; + Type "pool" + }; + +} diff --git a/katie.conf-non-US b/katie.conf-non-US new file mode 100644 index 00000000..a4b7a352 --- /dev/null +++ b/katie.conf-non-US @@ -0,0 +1,323 @@ +Dinstall +{ + Options + { + Automatic ""; + Debug ""; + Help ""; + Ack-New ""; + Manual-Reject ""; + No-Action ""; + No-Lock ""; + No-Version-Check ""; + No-Mail ""; + Override-Distribution ""; + Version ""; + }; + + PGPKeyring "/org/keyring.debian.org/keyrings/debian-keyring.pgp"; + GPGKeyring "/org/keyring.debian.org/keyrings/debian-keyring.gpg"; + SendmailCommand "/usr/sbin/sendmail -oi -t"; + MyEmailAddress "Debian Installer "; + MyHost "debian.org"; // used for generating user@my_host addresses in e.g. manual_reject() + NewAckList "/org/non-us.debian.org/katie/log"; + LockFile "/org/non-us.debian.org/katie/lock"; + +}; + +Heidi +{ + + Options + { + Add ""; + Debug ""; + Help ""; + List ""; + Remove ""; + Set ""; + Version ""; + }; + +}; + +Jenna +{ + + Options + { + Architecture ""; + Component ""; + Debug ""; + Help ""; + Suite ""; + Verbose ""; + Version ""; + }; + +}; + +Neve +{ + + ExportDir "/org/non-us.debian.org/katie/neve-files/"; + +}; + +Rhona +{ + + Options // Currently don't do anything + { + Debug ""; + Help ""; + Interactive ""; + Version ""; + }; + + Morgue "/org/non-us.debian.org/morgue/"; + // How long (in seconds) dead packages are left before being killed + StayOfExecution 259200; +}; + +Suite +{ + + // Priority determines which suite is used for the Maintainers filed as generated by charisma/da_mkmaintainers (highest wins) + + Experimental + { + Architectures + { + "source" ""; + "all" ""; + "alpha" ""; + "arm" ""; + "i386" ""; + "m68k" ""; + "powerpc" ""; + "sparc" ""; + }; + Announce "debian-devel-changes@lists.debian.org"; + Version "xx"; + Origin "Debian"; + Description "Experimental packages - not released; use at your own risk."; + CodeName "experimental"; + OverrideCodeName "experimental"; + SingleOverrideFile "true"; + Priority "0"; + }; + + Stable + { + Components + { + non-US/main ""; + non-US/contrib ""; + non-US/non-free ""; + }; + Architectures + { + "source" ""; + "all" ""; + "alpha" ""; + "arm" ""; + "i386" ""; + "m68k" ""; + "powerpc" ""; + "sparc" ""; + }; + Announce "debian-changes@lists.debian.org"; + Version "2.2r0"; + Origin "Debian"; + Description "Debian 2.2r1 Released 12th November 2000"; + CodeName "potato"; + OverrideCodeName "potato"; + Priority "1"; + Untouchable "1"; + }; + + Proposed-Updates + { + Architectures + { + "source" ""; + "all" ""; + "alpha" ""; + "arm" ""; + "i386" ""; + "m68k" ""; + "powerpc" ""; + "sparc" ""; + }; + Announce "debian-changes@lists.debian.org"; + CopyChanges "dists/proposed-updates/"; + Version "2.2r2"; + Origin "Debian"; + Description "Proposed Updates for Debian 2.2r2 - Not Released"; + CodeName "proposed-updates"; + OverrideCodeName "potato"; + Priority "2"; + }; + + Testing + { + Components + { + non-US/main ""; + non-US/contrib ""; + non-US/non-free ""; + }; + Architectures + { + "source" ""; + "all" ""; + "alpha" ""; + "arm" ""; + "i386" ""; + "m68k" ""; + "powerpc" ""; + "sparc" ""; + }; + Version "2.3-testing"; + Origin "Debian"; + Description "Debian 2.3 Testing distribution - Not Released"; + Priority "3"; + }; + + Unstable + { + Components + { + non-US/main ""; + non-US/contrib ""; + non-US/non-free ""; + }; + Architectures + { + "source" ""; + "all" ""; + "alpha" ""; + "arm" ""; + "hppa" ""; + "hurd-i386" ""; + "i386" ""; + "m68k" ""; + "mips" ""; + "mipsel" ""; + "powerpc" ""; + "sh" ""; + "sparc" ""; + }; + Announce "debian-devel-changes@lists.debian.org"; + Version "2.3"; + Origin "Debian"; + Description "Debian 2.3 Unstable - Not Released"; + CodeName "woody"; + OverrideCodeName "woody"; + Priority "4"; + }; + +}; + +Dir +{ + RootDir "/org/non-us.debian.org/ftp/"; + PoolDir "/org/non-us.debian.org/ftp/pool/"; + PoolRoot "pool/"; + IncomingDir "/org/non-us.debian.org/incoming/"; + OverrideDir "/org/non-us.debian.org/scripts/override/"; + ListsDir "/org/non-us.debian.org/database/dists/"; +}; + +DB +{ + Host "non-us.debian.org"; + Port -1; + ROUser "nobody"; +}; + +Architectures +{ + + source "Source"; + all "Architecture Independent"; + alpha "DEC Alpha"; + hurd-i386 "Intel ia32 running the HURD"; + hppa "HP PA RISC"; + arm "Arm"; + i386 "Intel ia32"; + m68k "Motorola Mc680x0"; + mips "SGI MIPS"; + mipsel "SGI MIPS (Little Endian)"; + powerpc "PowerPC"; + sh "Hitatchi SuperH"; + sparc "Sun SPARC/UltraSPARC"; + +}; + +Archive +{ + + non-US + { + OriginServer "non-us.debian.org"; + Description "Non-US Archive for the Debian project"; + }; + +}; + +Component +{ + + non-US/main + { + Description "Main (non-US)"; + MeetsDFSG "true"; + }; + + non-US/contrib + { + Description "Contrib (non-US)"; + MeetsDFSG "true"; + }; + + non-US/non-free + { + Description "Software that fails to meet the DFSG (non-US)"; + MeetsDFSG "false"; + }; + +}; + +Location +{ + + // Old style locations on non-US.debian.org + + /org/non-us.debian.org/ftp/dists/proposed-updates/ + { + Archive "non-US"; + Suite "proposed-updates"; + Type "legacy-mixed"; + }; + + /org/non-us.debian.org/ftp/dists/ + { + Archive "non-US"; + Suites + { + Stable ""; + Unstable ""; + }; + Type "legacy"; + }; + + // New pool locations on non-US.debian.org + /org/non-us.debian.org/ftp/pool/ + { + Archive "non-US"; + Type "pool"; + }; + +}; diff --git a/mkchecksums b/mkchecksums new file mode 100755 index 00000000..d614fc1f --- /dev/null +++ b/mkchecksums @@ -0,0 +1,16 @@ +#!/bin/sh +# Update the md5sums file +# $Id: mkchecksums,v 1.1 2000-11-24 00:20:11 troup Exp $ + +set -e +. $SCRIPTVARS + +dsynclist=$indices/dsync.list +md5list=$indices/md5sums + +echo -n "Creating md5 / dsync index file ... " + +cd "$ftpdir" +dsync-flist -q generate $dsynclist --exclude $dsynclist --md5 +dsync-flist -q md5sums $dsynclist | tee $md5list | gzip -9n > ${md5list}.gz +dsync-flist -q link-dups $dsynclist || true diff --git a/mklslar b/mklslar new file mode 100755 index 00000000..f4fa4f11 --- /dev/null +++ b/mklslar @@ -0,0 +1,36 @@ +#!/bin/sh +# Update the ls-lR. +# $Id: mklslar,v 1.1 2000-11-24 00:20:11 troup Exp $ + +set -e +. $SCRIPTVARS + +cd $ftpdir + +filename=ls-lR + +echo "Removing any core files ..." +find -type f -name core -print0 | xargs -0r rm -v + +echo "Checking permissions on files in the FTP tree ..." +find -type f \( \! -perm -444 -o -perm +002 \) -ls +find -type d \( \! -perm -555 -o -perm +002 \) -ls + +echo "Checking symlinks ..." +symlinks -r . + +echo "Creating recursive directory listing ... " +rm -f .$filename.new +ls -lR | grep -v Archive_Maintenance_In_Progress > .$filename.new + +if [ -r $filename ] ; then + mv -f $filename $filename.old + mv -f .$filename.new $filename + rm -f $filename.patch.gz + diff -u $filename.old $filename | gzip -9cfn - >$filename.patch.gz + rm -f $filename.old +else + mv -f .$filename.new $filename +fi + +gzip -9cfN $filename >$filename.gz diff --git a/sortover.pl b/sortover.pl new file mode 100755 index 00000000..3328ceec --- /dev/null +++ b/sortover.pl @@ -0,0 +1,13 @@ +#!/usr/bin/perl +%iv=qw(required 00 + important 01 + standard 02 + optional 03 + extra 04); +sub t { + return $_[0] if $_[0] =~ m/^\#/; + $_[0] =~ m/^(\S+)\s+(\S+)\s+(\S+)\s/ || die "$0: `$_[0]'"; + return "$3 $iv{$2} $1"; +} +print(sort { &t($a) cmp &t($b) } ) || die $!; +close(STDOUT) || die $!; diff --git a/tagdb.dia b/tagdb.dia new file mode 100644 index 00000000..6b098eec --- /dev/null +++ b/tagdb.dia @@ -0,0 +1,1903 @@ + + + + + + + + + + #A4# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #binaries# + + + + + + + + + + + + + + + + + + + + + + + #package# + + + #string# + + + + + + + + + + + + + + + + + #version# + + + #version_type# + + + + + + + + + + + + + + + + + #source# + + + #reference# + + + + + + + + + + + + + + + + + #architecture# + + + #reference# + + + + + + + + + + + + + + + + + #file# + + + #reference# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #source# + + + + + + + + + + + + + + + + + + + + + + + #source# + + + #string# + + + + + + + + + + + + + + + + + #version# + + + #version_type# + + + + + + + + + + + + + + + + + #maintainer# + + + #reference# + + + + + + + + + + + + + + + + + #file# + + + #reference# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #bin_associations# + + + + + + + + + + + + + + + + + + + + + + + #suite# + + + #reference# + + + + + + + + + + + + + + + + + #binary# + + + #reference# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #architecture# + + + + + + + + + + + + + + + + + + + + + + + #arch_string# + + + #string# + + + + + + + + + + + + + + + + + #description# + + + #string# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #suite# + + + + + + + + + + + + + + + + + + + + + + + #suite_name# + + + #string# + + + + + + + + + + + + + + + + + #architectures# + + + #mreference# + + + + + + + + + + + + + + + + + #version# + + + #version_type# + + + + + + + + + + + + + + + + + #origin# + + + #string# + + + + + + + + + + + + + + + + + #label# + + + #string# + + + + + + + + + + + + + + + + + #policy_engine# + + + #text# + + + + + + + + + + + + + + + + + #description# + + + #string# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #Project Betsy +Tag Database Detail# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #component# + + + + + + + + + + + + + + + + + + + + + + + #name# + + + #string# + + + + + + + + + + + + + + + + + #description# + + + #string# + + + + + + + + + + + + + + + + + #meets_dfsg# + + + #boolean# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #archive# + + + + + + + + + + + + + + + + + + + + + + + #Name# + + + #string# + + + + + + + + + + + + + + + + + #origin_server# + + + #hostname# + + + + + + + + + + + + + + + + + #description# + + + #string# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #location# + + + + + + + + + + + + + + + + + + + + + + + #path# + + + #string# + + + + + + + + + + + + + + + + + #component# + + + #reference# + + + + + + + + + + + + + + + + + #archive# + + + #reference# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #src_associations# + + + + + + + + + + + + + + + + + + + + + + + #suite# + + + #reference# + + + + + + + + + + + + + + + + + #binary# + + + #reference# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #maintainer# + + + + + + + + + + + + + + + + + + + + + + + #name# + + + #string# + + + + + + + + + + + + + + + + + #ldap_user# + + + #string# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #files# + + + + + + + + + + + + + + + + + + + + + + + #filename# + + + #string# + + + + + + + + + + + + + + + + + #size# + + + #unsigned# + + + + + + + + + + + + + + + + + #md5sum# + + + #string# + + + + + + + + + + + + + + + + + #location# + + + #reference# + + + + + + + + + + + + + + + + + #last_used# + + + #time# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #dsc_files# + + + + + + + + + + + + + + + + + + + + + + + #source# + + + #reference# + + + + + + + + + + + + + + + + + #file# + + + #reference# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vars-non-US b/vars-non-US new file mode 100644 index 00000000..5e006379 --- /dev/null +++ b/vars-non-US @@ -0,0 +1,19 @@ +# locations used by many scripts + +nonushome=/org/non-us.debian.org +ftpdir=$nonushome/ftp +indices=$ftpdir/indices-non-US +archs="alpha arm hppa hurd-i386 i386 m68k powerpc sparc mips mipsel sh" + +masterdir=$nonushome/katie +overridedir=$nonushome/scripts/override +incoming=$nonushome/incoming + +packagesfiles=packagesfiles-non-US +sourcesfiles=sourcesfiles-non-US +contentsfiles=contentsfiles-non-US + +copyoverrides="potato potato.contrib potato.non-free woody woody.contrib woody.non-free" + +PATH=$masterdir:$PATH +umask 022 -- 2.39.5