From 779bb0691d139ff2487383c6aa9d87b149bad294 Mon Sep 17 00:00:00 2001 From: James Troup Date: Sat, 27 Jan 2001 00:09:36 +0000 Subject: [PATCH] sync --- THANKS | 1 + apt.conf | 10 ---- apt.conf-non-US | 11 ---- apt.conf.stable | 31 +++++++++++ apt.conf.stable-non-US | 32 ++++++++++++ docs/katie.1.sgml | 116 +++++++++++++++++++++++++++++++++++++++++ docs/katie.ent | 13 ++--- docs/natalie.1.sgml | 74 ++++++++++++++++++++++++++ katie | 35 ++++++------- katie.conf | 1 - katie.conf-non-US | 1 - natalie.py | 24 ++++++++- vars | 2 +- vars-non-US | 2 +- 14 files changed, 303 insertions(+), 50 deletions(-) create mode 100644 apt.conf.stable create mode 100644 apt.conf.stable-non-US create mode 100644 docs/katie.1.sgml create mode 100644 docs/natalie.1.sgml diff --git a/THANKS b/THANKS index 4f64b130..7ac86047 100644 --- a/THANKS +++ b/THANKS @@ -8,6 +8,7 @@ Anthony Towns Antti-Juhani Kaijanaho Ben Collins Brendan O'Dea +Brian May Brian Russo Chris Leishman Daniel Jacobwitz diff --git a/apt.conf b/apt.conf index 214fd1ea..3d9a1bff 100644 --- a/apt.conf +++ b/apt.conf @@ -20,16 +20,6 @@ TreeDefault Contents::Header "/org/ftp.debian.org/katie/Contents.top"; }; -tree "dists/stable" -{ - FileList "/org/ftp.debian.org/database/dists/stable_$(SECTION)_binary-$(ARCH).list"; - SourceFileList "/org/ftp.debian.org/database/dists/stable_$(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"; -}; - tree "dists/testing" { FileList "/org/ftp.debian.org/database/dists/testing_$(SECTION)_binary-$(ARCH).list"; diff --git a/apt.conf-non-US b/apt.conf-non-US index f6e3df66..8bc0d7bc 100644 --- a/apt.conf-non-US +++ b/apt.conf-non-US @@ -20,17 +20,6 @@ TreeDefault Contents::Header "/org/non-us.debian.org/katie/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/testing/non-US" { FileList "/org/non-us.debian.org/database/dists/testing_non-us/$(SECTION)_binary-$(ARCH).list"; diff --git a/apt.conf.stable b/apt.conf.stable new file mode 100644 index 00000000..b17f062d --- /dev/null +++ b/apt.conf.stable @@ -0,0 +1,31 @@ +Dir +{ + ArchiveDir "/org/ftp.debian.org/ftp/"; + OverrideDir "/org/ftp.debian.org/scripts/override/"; + CacheDir "/org/ftp.debian.org/database/"; +}; + +Default +{ + Packages::Compress ". gzip"; + Sources::Compress "gzip"; + Contents::Compress "gzip"; + DeLinkLimit 0; + MaxContentsChange 6000; + FileMode 0664; +} + +TreeDefault +{ + Contents::Header "/org/ftp.debian.org/katie/Contents.top"; +}; + +tree "dists/stable" +{ + FileList "/org/ftp.debian.org/database/dists/stable_$(SECTION)_binary-$(ARCH).list"; + SourceFileList "/org/ftp.debian.org/database/dists/stable_$(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"; +}; diff --git a/apt.conf.stable-non-US b/apt.conf.stable-non-US new file mode 100644 index 00000000..494c61d6 --- /dev/null +++ b/apt.conf.stable-non-US @@ -0,0 +1,32 @@ +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/katie/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; +}; diff --git a/docs/katie.1.sgml b/docs/katie.1.sgml new file mode 100644 index 00000000..8ea23bf0 --- /dev/null +++ b/docs/katie.1.sgml @@ -0,0 +1,116 @@ + + +%katieent; + +]> + + + &katie-docinfo; + + + katie + 1 + + + + + katie + Installs packages from incoming + + + + + + katie + + package + + + + + Description</> + <para> + <command>katie</command> is the program which installs packages from incoming into the distribution. + </PARA></REFSECT1> + + <RefSect1><Title>Options</> + + <VariableList> + + <varlistentry> + <term><option>-a/--automatic</option></term> + <listitem> + <para>Run automatically; i.e. perform the default action if it's possible to do so without user interaction. Intend for use in cron jobs and the like.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>-h/--help</option></term> + <listitem> + <para>Display usage help and then exit.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>-k/--ack-new</option></term> + <listitem> + <para>Acknowledge new packages. <emphasis>WARNING:</emphasis> due to the sub-optimal implementation of new packages, this option should only be used when processing *all* packages (e.g. in cron jobs).</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>-m/--manual-reject=<replaceable>message</replaceable></option></term> + <listitem> + <para>Perform a manual rejection of the package. The <replaceable>message</replaceable> is included in the rejection notice sent to the uploader. If no <replaceable>message</replaceable> is given, an editor will be spawned so one can be added to the rejection notice. + </listitem> + </varlistentry> + + <varlistentry> + <term><option>-n/--no-action</option></term> + <listitem> + <para>Don't actually install anything; just show what would be done.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>-p/--no-lock</option></term> + <listitem> + <para>Don't check the lockfile. Obviously dangerous and should only be used for cron jobs (if at all).</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>-u/--distribution=<replaceable>distribution</replaceable></option></term> + <listitem> + <para>Override the <literal>Distribution</Literal> field. Should only be used for binary packages otherwise if used on a source package, all binary recompiles of that source will require a similar manual override.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>-v/--version</option></term> + <listitem> + <para>Display the version number and then exit.</para> + </listitem> + </varlistentry> + + </VariableList> + </RefSect1> + + <RefSect1><Title>Diagnostics</> + <para> + <command>katie</command> returns zero on normal operation, non-zero on error. + </PARA> + </RefSect1> + + <refsect1> + <title>Acknowledgements + katie is based very heavily on dinstall, written by Guy Maor maor@debian.org; in fact it started out life as a dinstall clone. + + + &manauthor; + + + + diff --git a/docs/katie.ent b/docs/katie.ent index b7abf4d9..2c352299 100644 --- a/docs/katie.ent +++ b/docs/katie.ent @@ -3,17 +3,18 @@ -
james@nocrew.org
- James Troup - 2000-2001 James Troup - 15 January 2001 +
james@nocrew.org
+ James Troup + 2000-2001 James Troup + 15 January 2001 "> Author</> + <RefSect1><Title>Author - katie was written by James Troup james@nocrew.org. + katie was written by James Troup james@nocrew.org. + "> diff --git a/docs/natalie.1.sgml b/docs/natalie.1.sgml new file mode 100644 index 00000000..388f6f26 --- /dev/null +++ b/docs/natalie.1.sgml @@ -0,0 +1,74 @@ + + +%katieent; + +]> + + + &katie-docinfo; + + + natalie + 1 + + + + + natalie + Override Utility to remove/add packages from suites + + + + + + natalie + + + + + Description</> + <para> + <command>natalie</command> is the command line tool to handle override files. Override files can be listed to stdout or updated from stdin. + + <RefSect1><Title>Options</> + + <VariableList> + <VarListEntry><term><option>-c/--component=<replaceable>component</replaceable></option></> + <ListItem><Para>Uses the override DB for the component listed. The default is <literal>main</literal>.</PARA></LISTITEM> + </VarListEntry> + + <varlistentry> + <term><option>-l/--list</option></term> + <listitem> + <para>Lists the override DB to stdout.</para> + </listitem> + </varlistentry> + + <VarListEntry><term><option>-s/--suite=<replaceable>suite</replaceable></option></> + <ListItem><Para>Uses the override DB for the suite listed. The default is <literal>unstable</literal>.</PARA></LISTITEM> + </VarListEntry> + + <VarListEntry><term><option>-S/--set</option></term> + <ListItem><Para>Update the override DB based on the contents of stdin. Information on the results of the update are printed to stdout.</PARA></LISTITEM> + </VarListEntry> + + <varlistentry> + <term><option>-t/--type=<replaceable>type</replaceable></option></term> + <listitem> + <para>Uses the override DB for the type listed. The default is <literal>deb</literal>. Possible values are: <literal>deb</literal>, <literal>udeb</literal> and <literal>dsc</literal>.</para> + </listitem> + </varlistentry> + + </VariableList> + </RefSect1> + + <RefSect1><Title>Diagnostics</> + <para> + <command>natalie</command> returns zero on normal operation, non-zero on error. + </RefSect1> + + &manauthor; + +</refentry> diff --git a/katie b/katie index 5596586d..1c611a7e 100755 --- a/katie +++ b/katie @@ -2,7 +2,7 @@ # Installs Debian packaes # Copyright (C) 2000 James Troup <james@nocrew.org> -# $Id: katie,v 1.22 2001-01-23 20:27:35 troup Exp $ +# $Id: katie,v 1.23 2001-01-27 00:09:36 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 @@ -91,13 +91,14 @@ legacy_source_untouchable = {}; def usage (exit_code): print """Usage: dinstall [OPTION]... [CHANGES]... -a, --automatic automatic run - -d, --debug=VALUE debug - -k, --ack-new acknowledge new packages + -D, --debug=VALUE turn on debugging + -h, --help show this help and exit. + -k, --ack-new acknowledge new packages !! for cron.daily only !! -m, --manual-reject=MSG manual reject with `msg' -n, --no-action don't do anything -p, --no-lock don't check lockfile !! for cron.daily only !! - -r, --no-version-check override version check - -u, --distribution=DIST override distribution to `dist'""" + -u, --distribution=DIST override distribution to `dist' + -v, --version display the version number and exit""" sys.exit(exit_code) def check_signature (filename): @@ -178,7 +179,7 @@ def check_changes(filename): # Check for mandatory fields for i in ("source", "binary", "architecture", "version", "distribution","maintainer", "files"): if not changes.has_key(i): - reject_message = "Rejected: Missing field `%s' in changes file." % (i) + reject_message = "Rejected: Missing field `%s' in changes file.\n" % (i) return 0 # Avoid <undef> errors during later tests # Fix the Maintainer: field to be RFC822 compatible @@ -397,11 +398,7 @@ def check_files(): files[file]["oldfiles"][suite] = oldfile # Check versions [NB: per-suite only; no cross-suite checking done (yet)] if apt_pkg.VersionCompare(files[file]["version"], oldfile["version"]) != 1: - if Cnf["Dinstall::Options::No-Version-Check"]: - reject_message = reject_message + "Overriden rejection" - else: - reject_message = reject_message + "Rejected" - reject_message = reject_message + ": %s Old version `%s' >= new version `%s'.\n" % (file, oldfile["version"], files[file]["version"]) + reject_message = reject_message + "Rejected: %s Old version `%s' >= new version `%s'.\n" % (file, oldfile["version"], files[file]["version"]) # Check for existing copies of the file if not changes.has_key("stable upload"): q = projectB.query("SELECT b.id FROM binaries b, architecture a WHERE b.package = '%s' AND b.version = '%s' AND a.arch_string = '%s' AND a.id = b.architecture" % (files[file]["package"], files[file]["version"], files[file]["architecture"])) @@ -545,7 +542,7 @@ def check_dsc (): reject_message = reject_message + "Rejected: %s refers to %s, but I can't find it in Incoming or in the pool.\n" % (file, dsc_file); continue; else: - reject_message = reject_message + "Rejected: %s refers to %s, but I can't find it in Incoming." % (file, dsc_file); + reject_message = reject_message + "Rejected: %s refers to %s, but I can't find it in Incoming.\n" % (file, dsc_file); continue; if actual_md5 != dsc_files[dsc_file]["md5sum"]: reject_message = reject_message + "Rejected: md5sum for %s doesn't match %s.\n" % (found, file); @@ -606,6 +603,9 @@ def check_override (): section = files[file]["section"]; override_section = files[file]["override section"]; if section != override_section and section != "-": + # Ignore this; it's a common mistake and not worth whining about + if section == "non-US/main" and override_section == "non-US": + continue; summary = summary + "%s: section is overridden from %s to %s.\n" % (file, section, override_section); if files[file]["type"] == "deb": # don't do priority for source priority = files[file]["priority"]; @@ -981,8 +981,8 @@ def reject (changes_filename, manual_reject_mail_filename): if os.path.exists(file): try: utils.move (file, "%s/REJECT/%s" % (Cnf["Dir::IncomingDir"], file)); - except utils.cant_overwrite_exc: - sys.stderr.write("W: couldn't overwrite existing file '%s/REJECT/%s" % (Cnf["Dir::IncomingDir"], file)); + except: + sys.stderr.write("W: couldn't reject file '%s' [Got %s].\n" % (file, sys.exc_type); pass; # If this is not a manual rejection generate the .reason file and rejection mail message @@ -1186,15 +1186,16 @@ non-maintainer upload. The .changes file follows. def process_it (changes_file): global reprocess, orig_tar_id, changes, dsc, dsc_files, files; - reprocess = 1; - orig_tar_id = None; # Reset some globals + reprocess = 1; changes = {}; dsc = {}; dsc_files = {}; files = {}; orig_tar_id = None; legacy_source_untouchable = {}; + reject_message = ""; + orig_tar_id = None; # Absolutize the filename to avoid the requirement of being in the # same directory as the .changes file. @@ -1235,7 +1236,6 @@ def main(): ('m',"manual-reject","Dinstall::Options::Manual-Reject", "HasArg"), ('n',"no-action","Dinstall::Options::No-Action"), ('p',"no-lock", "Dinstall::Options::No-Lock"), - ('r',"no-version-check", "Dinstall::Options::No-Version-Check"), ('s',"no-mail", "Dinstall::Options::No-Mail"), ('u',"override-distribution", "Dinstall::Options::Override-Distribution", "HasArg"), ('v',"version","Dinstall::Options::Version")]; @@ -1282,7 +1282,6 @@ def main(): # Process the changes files for changes_file in changes_files: - reject_message = "" print "\n" + changes_file; process_it (changes_file); diff --git a/katie.conf b/katie.conf index c665c912..633ce299 100644 --- a/katie.conf +++ b/katie.conf @@ -9,7 +9,6 @@ Dinstall Manual-Reject ""; No-Action ""; No-Lock ""; - No-Version-Check ""; No-Mail ""; Override-Distribution ""; Version ""; diff --git a/katie.conf-non-US b/katie.conf-non-US index b90ef361..45d561fe 100644 --- a/katie.conf-non-US +++ b/katie.conf-non-US @@ -9,7 +9,6 @@ Dinstall Manual-Reject ""; No-Action ""; No-Lock ""; - No-Version-Check ""; No-Mail ""; Override-Distribution ""; Version ""; diff --git a/natalie.py b/natalie.py index 8206ddfe..e92d6d7d 100755 --- a/natalie.py +++ b/natalie.py @@ -2,7 +2,7 @@ # Manipulate override files # Copyright (C) 2000 James Troup <james@nocrew.org> -# $Id: natalie.py,v 1.1 2001-01-10 05:58:26 troup Exp $ +# $Id: natalie.py,v 1.2 2001-01-27 00:09:36 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 @@ -31,6 +31,25 @@ projectB = None; ################################################################################ +def usage (exit_code): + print """Usage: natalie.py [OPTIONS] + -D, --debug=VALUE debug + -h, --help this help + -V, --version retrieve version + -c, --component=CMPT list/set overrides by component + (contrib,*main,non-free) + -s, --suite=SUITE list/set overrides by suite + (experimental,stable,testing,*unstable) + -t, --type=TYPE list/set overrides by type + (*deb,dsc,udeb) + -S, --set set overrides from stdin + -l, --list list overrides on stdout + + starred (*) values are default""" + sys.exit(exit_code) + +################################################################################ + def init(): global projectB; @@ -194,6 +213,9 @@ def main (): ('t',"type","Natalie::Options::Type", "HasArg")]; file_list = apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv); + if Cnf["Natalie::Options::Help"]: + usage(0); + init(); action = None; diff --git a/vars b/vars index c166ff7f..053f34f1 100644 --- a/vars +++ b/vars @@ -11,7 +11,7 @@ overridedir=$scriptdir/override incoming=/org/ftp.debian.org/incoming -copyoverrides="potato.contrib potato.contrib.src potato.main potato.main.src potato.non-free potato.non-free.src sid.contrib sid.contrib.src sid.main sid.main.debian-installer sid.main.src sid.non-free sid.non-free.src testing.contrib testing.contrib.src testing.main testing.main.src testing.non-free testing.non-free.src" +copyoverrides="potato.contrib potato.contrib.src potato.main potato.main.src potato.non-free potato.non-free.src sid.contrib sid.contrib.src sid.main sid.main.debian-installer sid.main.src sid.non-free sid.non-free.src woody.contrib woody.contrib.src woody.main woody.main.src woody.non-free woody.non-free.src" PATH=$masterdir:$PATH umask 022 diff --git a/vars-non-US b/vars-non-US index 291cec96..d8310c97 100644 --- a/vars-non-US +++ b/vars-non-US @@ -14,7 +14,7 @@ packagesfiles=packagesfiles-non-US sourcesfiles=sourcesfiles-non-US contentsfiles=contentsfiles-non-US -copyoverrides="potato.contrib potato.contrib.src potato.main potato.main.src potato.non-free potato.non-free.src sid.contrib sid.contrib.src sid.main sid.main.src sid.non-free sid.non-free.src testing.contrib testing.contrib.src testing.main testing.main.src testing.non-free testing.non-free.src" +copyoverrides="potato.contrib potato.contrib.src potato.main potato.main.src potato.non-free potato.non-free.src sid.contrib sid.contrib.src sid.main sid.main.src sid.non-free sid.non-free.src woody.contrib woody.contrib.src woody.main woody.main.src woody.non-free woody.non-free.src" PATH=$masterdir:$PATH umask 022 -- 2.39.5