debarchiver-0.10.0/0000775000000000000000000000000012241231557010740 5ustar debarchiver-0.10.0/conf/0000775000000000000000000000000012241231557011665 5ustar debarchiver-0.10.0/conf/Makefile0000664000000000000000000000200711173250426013323 0ustar # # Copyright (C) 2000-2008 Ola Lundqvist # # 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., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301 USA. all: install: debarchiver.conf mkdir -p $(DESTDIR)/etc install -m644 debarchiver.conf $(DESTDIR)/etc mkdir -p $(DESTDIR)/etc/logcheck/ignore.d.workstation/ install -m644 debarchiver.logcheck $(DESTDIR)/etc/logcheck/ignore.d.workstation/debarchiver clean: debarchiver-0.10.0/conf/debarchiver.conf0000664000000000000000000000734412240776033015024 0ustar # This is a sample configuration file. # # The configuration file consist of perl variables that can be set to # different values. The suggested value in this sample configuration file # is the default value set by debarchiver. # $destdir = "/var/lib/debarchiver/dists"; # $inputdir = "/var/lib/debarchiver/incoming"; # $copycmd = "cp -af"; # $movecmd = "mv"; # $rmcmd = "rm -f"; # $vrfycmd = "dscverify"; # $cinstall = "installed"; # $distinputcriteria = "^linux.*\\.deb\$"; # Choose to enable or disable signature verification for packages uploaded # into $inputdir (not %distinputdirs). # $verifysignatures = 0; # Force install of changes files even if some files already exists with # wrong size or md5 hash. # $ignoredestcheck = 0; # Choose to enable or disable signature verification for packages uploaded # into %distinputdirs. This works indepentently from $verifysignatures. # $verifysignaturesdistinput = 0; # Generate bzip2 files or not (1 will generate and 0 will not do so). # $bzip = 0; # Time to allow .changes files to be incomplete in seconds. Allow this time # for slow uploads. # Defaults to 24 hours. # $incompletetime = 24*60*60; # This one is used for debarchives that matches distinput criteria. # %distinputdirs = # ( # 'stable' => 'stable', # 'testing' => 'testing', # 'unstable' => 'unstable' # ); # What distributions that should exist. # @distributions = ('stable', 'testing', 'unstable'); # Default major section to install to, if not defined in the uploaded files. # $majordefault = "main"; # Mapping of aliases. # OBS! If you create a mapping that will only be created if you have # added the key to @distributions above. If you want the symlink to be created # in a proper way you MUST add them at the same time. Else you will have # two directories that are independent (and not mapped). # %distmapping = # ( # 'stable' => 'lenny', # 'testing' => 'squeeze', # 'unstable' => 'sid' # ); # What architectures that should exist (automatically created). # All and source will exist anyway. # @architectures = ('i386'); # What sections that should exist. # @sections = ('main', 'contrib', 'non-free'); # What changes file fields that should be used for determine where to send # mail. If there is an '@' character is found here it will be used directly # without consulting the .changes-file. Default is to mail no one. If there # is an '@' character in the beginning, the user owning the file will be # prepended. For the case when a deb file is sorted without a changes file, # then only explicit mail address or @domain.com address will get the mail. # @mailtos = ('Maintainer', The Maintainer field in control file # 'Uploaders', The Uploaders field in control file # '@bar.com', User id @bar.com that own the deb or # changes file # 'installer@foo.com', An explicit email address # 'Changed-By'); The email in the changelog file # Specify the sender of emails. # Default to none. # $mailfrom = ""; # If you want additional information in the generated Release files you have # to set this hash-value. Supported keys are origin, label, and description. # %release = ( 'origin' => "", # 'label' => "", # 'description' => ""); # Where to put the apt-ftparchive cache files if --index is used. Default # is /var/cache/debarchiver. Must be a directory. # $cachedir = '/var/cache/debarchiver'; # GnuPG key to use to sign the archive. # $gpgkey = ""; # File to provide password to GnuPG. # If you use a key with an empty passphrase, set this variable to 0 or "". # If the file does not exist, debarchiver will also fall back to "". # $gpgpassfile = "$ENV{HOME}/.gnupg/passphrase"; # The configuraton file need to return a true value. 1; debarchiver-0.10.0/conf/debarchiver.logcheck0000664000000000000000000000067511173250426015653 0ustar ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ debarchiver: [-_.+~[:alnum:]]+\.changes:$ ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ debarchiver: Good signature found$ ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ debarchiver: validating [-_.+~[:alnum:]]\+\.(u?deb|(diff|tar).gz|dsc)$ ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ debarchiver: All files validated successfully\.$ ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ debarchiver: Validation FAILED!!$ debarchiver-0.10.0/po4a/0000775000000000000000000000000012241231557011603 5ustar debarchiver-0.10.0/po4a/po/0000775000000000000000000000000012241231557012221 5ustar debarchiver-0.10.0/po4a/po/debarchiver.pot0000664000000000000000000004540612240771607015240 0ustar # SOME DESCRIPTIVE TITLE # Copyright (C) YEAR Free Software Foundation, Inc. # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2013-09-23 19:03+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #. type: =head1 #: ./debarchiver.pod:1 msgid "NAME" msgstr "" #. type: textblock #: ./debarchiver.pod:3 msgid "debarchiver - Tool to sort debian packages into a package archive." msgstr "" #. type: =head1 #: ./debarchiver.pod:5 msgid "SYNOPSIS" msgstr "" #. type: textblock #: ./debarchiver.pod:7 msgid "debarchiver [options]" msgstr "" #. type: =head1 #: ./debarchiver.pod:9 msgid "DESCRIPTION" msgstr "" #. type: textblock #: ./debarchiver.pod:11 msgid "" "The debian archiver is a tool that installs debian packages into a file " "structure suitable for apt-get, aptitude, dselect and similar tools. This " "can be used for updating the Debian system. It is meant to be used by local " "administrators that need special packages, or tweaked versions to ease " "administration." msgstr "" #. type: textblock #: ./debarchiver.pod:13 msgid "" "The file structure is based on the potato file structure and does not " "support package pools." msgstr "" #. type: =head1 #: ./debarchiver.pod:15 msgid "OPTIONS" msgstr "" #. type: =item #: ./debarchiver.pod:19 msgid "B<-a | --autoscan>" msgstr "" #. type: textblock #: ./debarchiver.pod:21 msgid "Does both --autoscanpackages and --autoscansources." msgstr "" #. type: =item #: ./debarchiver.pod:23 msgid "B<--autoscanall>" msgstr "" #. type: textblock #: ./debarchiver.pod:25 msgid "Same as --scanall --autoscan." msgstr "" #. type: =item #: ./debarchiver.pod:27 msgid "B<--autoscanpackages>" msgstr "" #. type: textblock #: ./debarchiver.pod:29 msgid "Automatically run dpkg-scanpackages after all new packages are installed." msgstr "" #. type: =item #: ./debarchiver.pod:31 msgid "B<--autoscansources>" msgstr "" #. type: textblock #: ./debarchiver.pod:33 msgid "Automatically run dpkg-scansources after all new packages are installed." msgstr "" #. type: =item #: ./debarchiver.pod:35 msgid "B<-b | --bzip>" msgstr "" #. type: textblock #: ./debarchiver.pod:37 msgid "Create bzip2 compressed Packages.bz2 and Sources.bz2 files." msgstr "" #. type: =item #: ./debarchiver.pod:39 msgid "B<--cachedir> dir" msgstr "" #. type: textblock #: ./debarchiver.pod:41 msgid "" "The apt-ftparchive package cache directory, if --index is used. The default " "is $cachedir." msgstr "" #. type: =item #: ./debarchiver.pod:43 msgid "B<--cinstall> dir" msgstr "" #. type: textblock #: ./debarchiver.pod:45 msgid "" "Where the .changes file will be installed to. Use the empty string to remove " "the .changes file instead. The default is $cinstall." msgstr "" #. type: =item #: ./debarchiver.pod:47 msgid "B<--configfile> file" msgstr "" #. type: textblock #: ./debarchiver.pod:49 msgid "" "Specifies an extra configuration file to read. Will be read after etc " "configuration and after user configuration files." msgstr "" #. type: =item #: ./debarchiver.pod:51 msgid "B<--copycmd>" msgstr "" #. type: textblock #: ./debarchiver.pod:53 msgid "" "The install command to use where the default is $copycmd. Both packages and " ".changes files are installed using this command." msgstr "" #. type: =item #: ./debarchiver.pod:55 msgid "B<-d | --dest | --destdir> dir" msgstr "" #. type: textblock #: ./debarchiver.pod:57 msgid "" "Destination directory. The base directory where all the distribution " "packages will reside and where the $distrib/$major/$arch/$section directory " "structure will be created. The default is $destdir, relative to the input " "directory." msgstr "" #. type: =item #: ./debarchiver.pod:59 msgid "B<--debug-level | --dl> level" msgstr "" #. type: textblock #: ./debarchiver.pod:61 msgid "" "What information that should be printed. 1=critical, 2=error, 3=normal, " "4=message, 5=debug, 6=verbose debug (modules)." msgstr "" #. type: =item #: ./debarchiver.pod:63 msgid "B<--distinputcriteria>" msgstr "" #. type: verbatim #: ./debarchiver.pod:65 #, no-wrap msgid "" "The criteria for what binary packages should be installed even if they do " "not have a .changes file. The default is $distinputcriteria.\n" " \n" msgstr "" #. type: =item #: ./debarchiver.pod:67 msgid "B<--gpgkey>" msgstr "" #. type: textblock #: ./debarchiver.pod:69 msgid "The GnuPG key to use to sign the archive." msgstr "" #. type: =item #: ./debarchiver.pod:71 msgid "B<--gpgpassfile>" msgstr "" #. type: textblock #: ./debarchiver.pod:73 msgid "The file that provides the password to GnuPG." msgstr "" #. type: =item #: ./debarchiver.pod:75 msgid "B<--help>" msgstr "" #. type: textblock #: ./debarchiver.pod:77 msgid "Prints this information." msgstr "" #. type: =item #: ./debarchiver.pod:79 msgid "B<-i | --input | --indir | --inputdir> dir" msgstr "" #. type: textblock #: ./debarchiver.pod:81 msgid "" "This is the directory where debarchiver will look for new package versions " "and corresponding *.changes files that should be installed to the --dest " "directory. The default is $instdir." msgstr "" #. type: =item #: ./debarchiver.pod:83 msgid "B<--ignoredestcheck>" msgstr "" #. type: textblock #: ./debarchiver.pod:85 msgid "" "Force install of .changes file even if some files specified in the .changes " "file already exists with wrong size or md5 hash." msgstr "" #. type: =item #: ./debarchiver.pod:87 msgid "B<--incompletetime>" msgstr "" #. type: textblock #: ./debarchiver.pod:89 msgid "" "The time to allow .changes file to be incomplete in seconds. The default is " "24 hours." msgstr "" #. type: =item #: ./debarchiver.pod:92 msgid "B<--index | -x>" msgstr "" #. type: textblock #: ./debarchiver.pod:94 msgid "" "Automatically run apt-ftparchive after all new packages are installed. Use " "this *or* --autoscan, not both." msgstr "" #. type: =item #: ./debarchiver.pod:96 msgid "B<--instcmd>" msgstr "" #. type: textblock #: ./debarchiver.pod:98 msgid "DEPRECATED!" msgstr "" #. type: =item #: ./debarchiver.pod:100 msgid "B<--lockfile> file" msgstr "" #. type: textblock #: ./debarchiver.pod:102 ./debarchiver.pod:229 msgid "The lockfile to use. The default is $lockfile." msgstr "" #. type: =item #: ./debarchiver.pod:104 msgid "B<--mailcmd>" msgstr "" #. type: textblock #: ./debarchiver.pod:106 msgid "" "The command to use to send emails. The default behavior is to use the " "sendmail command." msgstr "" #. type: =item #: ./debarchiver.pod:109 msgid "B<--mailformat>" msgstr "" #. type: verbatim #: ./debarchiver.pod:111 #, no-wrap msgid "" "Defines the format to be used to send emails with, by the command " "specified\n" "by --mailfrom. Only 'sendmail' and 'mail' formats are supported. By " "default\n" "debarchiver assumes 'sendmail' format. The argument can be one of the\n" "following:\n" " sendmail = use of the sendmail format\n" " mail = use of the mail format\n" "\n" msgstr "" #. type: =item #: ./debarchiver.pod:118 msgid "B<--mailfrom>" msgstr "" #. type: textblock #: ./debarchiver.pod:120 msgid "Specify mail sender." msgstr "" #. type: =item #: ./debarchiver.pod:122 msgid "B<--majordefault>" msgstr "" #. type: textblock #: ./debarchiver.pod:124 msgid "Default major section to use. The default is 'main'." msgstr "" #. type: =item #: ./debarchiver.pod:126 msgid "B<--movecmd>" msgstr "" #. type: textblock #: ./debarchiver.pod:128 msgid "Command to move files (currently not used at all)." msgstr "" #. type: =item #: ./debarchiver.pod:130 msgid "B<--nosort>" msgstr "" #. type: textblock #: ./debarchiver.pod:132 msgid "Do not sort packages." msgstr "" #. type: =item #: ./debarchiver.pod:134 msgid "B<--nostructurefix>" msgstr "" #. type: textblock #: ./debarchiver.pod:136 msgid "Do not create directories and touch Package files." msgstr "" #. type: =item #: ./debarchiver.pod:138 msgid "B<-o | --addoverride>" msgstr "" #. type: textblock #: ./debarchiver.pod:140 msgid "Automatically add new packages to the override file." msgstr "" #. type: =item #: ./debarchiver.pod:142 msgid "B<--quit-level> level" msgstr "" #. type: textblock #: ./debarchiver.pod:144 msgid "On what level to quit the application, see debug level." msgstr "" #. type: =item #: ./debarchiver.pod:146 msgid "B<--rmcmd>" msgstr "" #. type: textblock #: ./debarchiver.pod:148 msgid "" "The remove command to use. The default is $rmcmd. This can be used to move " "away the old packages to some other place." msgstr "" #. type: =item #: ./debarchiver.pod:150 msgid "B<--scanall>" msgstr "" #. type: textblock #: ./debarchiver.pod:152 msgid "Scan all distributions, sections, etc." msgstr "" #. type: =item #: ./debarchiver.pod:154 msgid "B<--scandetect | -s>" msgstr "" #. type: textblock #: ./debarchiver.pod:156 msgid "" "Scan using 'apt-ftparchive' or 'dpkg-scan*' (dpkg-scanpackages and " "dpkg-scansources) depending on what is installed on the system. This is the " "recommended way. Only use --index or --autoscan if you know what you are " "doing." msgstr "" #. type: =item #: ./debarchiver.pod:158 msgid "B<--scanonly>" msgstr "" #. type: textblock #: ./debarchiver.pod:160 msgid "Same as --nosort --nostructurefix." msgstr "" #. type: =item #: ./debarchiver.pod:162 msgid "B<-v | --version>" msgstr "" #. type: textblock #: ./debarchiver.pod:164 msgid "Prints the version string." msgstr "" #. type: =head1 #: ./debarchiver.pod:168 msgid "CONFIGURATION FILES" msgstr "" #. type: textblock #: ./debarchiver.pod:170 msgid "" "You can also place configuration files with the following names (in the " "following order) /etc/debarchiver.conf, ~/.debarchiver.conf and input.conf " "(relative to input directory) that will be read before the arguments to this " "program will be parsed. In the above files you can change the following " "variables:" msgstr "" #. type: textblock #: ./debarchiver.pod:172 msgid "" "The configuration files are read as perl modules they should end with a true " "value. Therefore they should always end with a line that states '1;'." msgstr "" #. type: =item #: ./debarchiver.pod:176 msgid "B<$bzip>" msgstr "" #. type: textblock #: ./debarchiver.pod:178 msgid "" "If set to 0 no bzip2 files will be generated. If set to 1 bzip2 files will " "be generated." msgstr "" #. type: =item #: ./debarchiver.pod:181 msgid "B<$cachedir>" msgstr "" #. type: textblock #: ./debarchiver.pod:183 msgid "The cache directory for apt-ftparchive used if --index is used." msgstr "" #. type: =item #: ./debarchiver.pod:185 msgid "B<$cinstall>" msgstr "" #. type: textblock #: ./debarchiver.pod:187 msgid "Where the .changes files are installed (see --cinstall above)." msgstr "" #. type: =item #: ./debarchiver.pod:189 msgid "B<$copycmd>" msgstr "" #. type: textblock #: ./debarchiver.pod:191 msgid "The install command (see --copycmd)." msgstr "" #. type: =item #: ./debarchiver.pod:193 msgid "B<$destdir>" msgstr "" #. type: textblock #: ./debarchiver.pod:195 msgid "The destination directory (see --destdir above)." msgstr "" #. type: =item #: ./debarchiver.pod:197 msgid "B<$distinputcriteria>" msgstr "" #. type: textblock #: ./debarchiver.pod:199 msgid "" "The criteria for which packages that should be installed even if it does not " "have a .changes file. The default is $distinputcriteria." msgstr "" #. type: =item #: ./debarchiver.pod:201 msgid "B<%distinputdirs>" msgstr "" #. type: textblock #: ./debarchiver.pod:203 msgid "" "Directories (distribution => dir) to be searched for extra binary packages " "that does not need a .changes file to be installed but match " "$distinputcriteria. The default is to accept kernel packages generated by " "make-kpkg (which does not generate a .changes file). Additionally binary " "packages with a valid .changes file will have the default distribution " "overridden to be the current queue directory. This cause uploads to a " "specific queue to place the package into that distribution directly." msgstr "" #. type: =item #: ./debarchiver.pod:205 msgid "B<$gpgkey>" msgstr "" #. type: textblock #: ./debarchiver.pod:207 msgid "" "The GnuPG key to use to sign the archive. If this variable is set, the " "Release file for each changed section of the archive will be signed with " "GnuPG using $gpgkey as the key ID. Unless you use a key that has no " "passphrase or use $gpgpassfile, you will need to run B " "interactively when using this option so that you can supply the passphrase." msgstr "" #. type: =item #: ./debarchiver.pod:209 msgid "B<$gpgpassfile>" msgstr "" #. type: textblock #: ./debarchiver.pod:211 msgid "" "The file that contains the passphrase for the GnuPG key. See $gpgkey for " "more information." msgstr "" #. type: =item #: ./debarchiver.pod:214 msgid "B<$ignoredestcheck>" msgstr "" #. type: textblock #: ./debarchiver.pod:216 msgid "" "Force install of .changes file even if some files specified in the .changes " "file already exist with wrong size or md5 hash. Default to 0 (do not " "ignore)." msgstr "" #. type: =item #: ./debarchiver.pod:218 msgid "B<$incompletetime>" msgstr "" #. type: textblock #: ./debarchiver.pod:220 msgid "" "Time to allow .changes files to be incomplete in seconds. Useful for slow " "uploads. The default is 24 hours." msgstr "" #. type: =item #: ./debarchiver.pod:223 msgid "B<$inputdir>" msgstr "" #. type: textblock #: ./debarchiver.pod:225 msgid "The input directory (no effect in $inputconfigfile)." msgstr "" #. type: =item #: ./debarchiver.pod:227 msgid "B<$lockfile>" msgstr "" #. type: =item #: ./debarchiver.pod:231 msgid "B<@mailtos>" msgstr "" #. type: textblock #: ./debarchiver.pod:233 msgid "" "An array of strings that will receive emails. If the string contains an " "email address that one is used. If it contains an incomplete email address, " "i.e. @hostname, the username owning the file is used @ the hostname " "specified. If no '@' character is found in the string, it is considered as a " "field in the .changes file. Such a field can for example be Maintainer or " "Uploaders." msgstr "" #. type: =item #: ./debarchiver.pod:235 msgid "B<$mailformat>" msgstr "" #. type: textblock #: ./debarchiver.pod:237 msgid "The format to use to send emails (see --mailformat above)." msgstr "" #. type: =item #: ./debarchiver.pod:239 msgid "B<$mailfrom>" msgstr "" #. type: textblock #: ./debarchiver.pod:241 msgid "Specifies the sender of emails. The default is none (\"\")" msgstr "" #. type: =item #: ./debarchiver.pod:243 msgid "B<$majordefault>" msgstr "" #. type: textblock #: ./debarchiver.pod:245 msgid "Default major section (see --majordefault above)." msgstr "" #. type: =item #: ./debarchiver.pod:247 msgid "B<$movecmd>" msgstr "" #. type: textblock #: ./debarchiver.pod:249 msgid "The move command (see --movecmd)." msgstr "" #. type: =item #: ./debarchiver.pod:251 msgid "B<%release>" msgstr "" #. type: textblock #: ./debarchiver.pod:253 msgid "" "Additional information to add to generated Release files. Supported keys are " "'origin', 'label', and 'description'." msgstr "" #. type: =item #: ./debarchiver.pod:255 msgid "B<$rmcmd>" msgstr "" #. type: textblock #: ./debarchiver.pod:257 msgid "The remove command (see --rmcmd above)." msgstr "" #. type: =item #: ./debarchiver.pod:259 msgid "B<$verifysignatures>" msgstr "" #. type: textblock #: ./debarchiver.pod:261 msgid "" "Choose to enable (1) or disable (0) signature verification for packages " "uploaded into $inputdir (not %distinputdirs)." msgstr "" #. type: =item #: ./debarchiver.pod:263 msgid "B<$verifysignaturesdistinput>" msgstr "" #. type: textblock #: ./debarchiver.pod:265 msgid "" "Choose to enable (1) or disable (2) signature verification for packages " "uploaded into %distinputdirs. This works independently from " "$verifysignatures." msgstr "" #. type: =item #: ./debarchiver.pod:267 msgid "B<$usermailcmd>" msgstr "" #. type: textblock #: ./debarchiver.pod:269 msgid "" "It allows the user to tell debarchiver to use a specific command to send " "emails. You may also want to specify the mailformat your mail command " "handles by setting the value of the $mailformat variable. Using the " "--mailcmd option on the command line will superseed this variable." msgstr "" #. type: =head1 #: ./debarchiver.pod:276 msgid "PACKAGE INDEXING" msgstr "" #. type: textblock #: ./debarchiver.pod:278 msgid "There are two ways to generate the indexes that B relies on." msgstr "" #. type: textblock #: ./debarchiver.pod:280 msgid "" "Using B<--autoscanpackages>, B<--autoscansources>, or B<--autoscan> will use " "B and B. This will generate the " "Packages and Sources files, but will not generate Contents files and can be " "slow with a large repository." msgstr "" #. type: textblock #: ./debarchiver.pod:282 msgid "" "Alternatively, the B<--index> I option will call B " "to index the package tree. B can also generate Contents " "files (for use with B), and can optionally use a cache of package " "information to speed up multiple runs. The B configuration " "file will be generated automatically. This is however not fully tested." msgstr "" #. type: textblock #: ./debarchiver.pod:284 msgid "" "You should use either B<--autoscanpackages> and B<--autoscansources> or " "B<--index>, not both, as they do basically the same thing." msgstr "" #. type: textblock #: ./debarchiver.pod:286 msgid "" "The default action (and the recommended) is B<--scandetect> that probe for " "installed software and use the best choice depending on what software you " "have installed (chooses between --index and --autoscan right now)." msgstr "" #. type: =head1 #: ./debarchiver.pod:288 msgid "REJECT" msgstr "" #. type: verbatim #: ./debarchiver.pod:290 #, no-wrap msgid "" "Changes files are rejected in the following conditions:\n" " * A file that is about to be installed already exist in the archive and is " "not identical to the one that is about to be installed.\n" " * Changes file is incomplete and has been there for $incompletetime time.\n" " * A file that is part of the Changes file is not yet big enough and the " "changes file has been there for $incompletetime time.\n" " * A file that is part of the Changes file is bigger than specified.\n" " * Verify signatures is enabled and signature do not match.\n" "\n" msgstr "" #. type: =head1 #: ./debarchiver.pod:297 msgid "FILES" msgstr "" #. type: textblock #: ./debarchiver.pod:299 msgid "B" msgstr "" #. type: =head1 #: ./debarchiver.pod:301 msgid "SEE ALSO" msgstr "" #. type: textblock #: ./debarchiver.pod:303 msgid "B(1)" msgstr "" #. type: =head1 #: ./debarchiver.pod:305 msgid "AUTHOR" msgstr "" #. type: textblock #: ./debarchiver.pod:307 msgid "Ola Lundqvist " msgstr "" debarchiver-0.10.0/po4a/po/fr.po0000664000000000000000000010462612240771607013205 0ustar # Translation of debarchiver_0.9.3 manpage to French # Copyright (C) 2005, 2006, 2010 Free Software Foundation, Inc. # Valery Perrin , 2005, 2006, 2010, 2011. msgid "" msgstr "" "Project-Id-Version: debarchiver manpages\n" "POT-Creation-Date: 2013-09-23 19:03+0300\n" "PO-Revision-Date: 2011-11-05 20:20+0100\n" "Last-Translator: \n" "Language-Team: French \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Lokalize 1.1\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" # type: =head1 #. type: =head1 #: debarchiver.pod:1 msgid "NAME" msgstr "NOM" # type: textblock #. type: textblock #: debarchiver.pod:3 msgid "debarchiver - Tool to sort debian packages into a package archive." msgstr "" "debarchiver - Outil de gestion des paquets Debian au sein d'une archive de " "paquet." # type: =head1 #. type: =head1 #: debarchiver.pod:5 msgid "SYNOPSIS" msgstr "SYNOPSIS" # type: textblock #. type: textblock #: debarchiver.pod:7 msgid "debarchiver [options]" msgstr "debarchiver [options]" # type: =head1 #. type: =head1 #: debarchiver.pod:9 msgid "DESCRIPTION" msgstr "DESCRIPTION" # type: textblock #. type: textblock #: debarchiver.pod:11 msgid "" "The debian archiver is a tool that installs debian packages into a file " "structure suitable for apt-get, aptitude, dselect and similar tools. This " "can be used for updating the Debian system. It is meant to be used by local " "administrators that need special packages, or tweaked versions to ease " "administration." msgstr "" "L'archiveur Debian (debarchiver) est un outil qui installe les paquets " "Debian dans une structure de fichiers exploitable par apt-get, aptitude, " "dselect et d'autres outils semblables. Il peut être utilisé pour la mise à " "jour des systèmes Debian. Il est destiné à être employé par des " "administrateurs locaux qui ont besoin de paquets spéciaux, ou de versions " "particulières, afin d'en faciliter la gestion." # type: textblock #. type: textblock #: debarchiver.pod:13 msgid "" "The file structure is based on the potato file structure and does not " "support package pools." msgstr "" "La structure de fichiers est basée sur celle de potato et ne reconnaît pas " "la structure de paquets en « pools ». (NdT : Structure utilisée à partir de " "woody)." # type: =head1 #. type: =head1 #: debarchiver.pod:15 msgid "OPTIONS" msgstr "OPTIONS" # type: =item #. type: =item #: debarchiver.pod:19 msgid "B<-a | --autoscan>" msgstr "B<-a | --autoscan>" # type: textblock #. type: textblock #: debarchiver.pod:21 msgid "Does both --autoscanpackages and --autoscansources." msgstr "Exécute « --autoscanpackages » et « --autoscansources »." # type: =item #. type: =item #: debarchiver.pod:23 msgid "B<--autoscanall>" msgstr "B<--autoscanall>" # type: textblock #. type: textblock #: debarchiver.pod:25 msgid "Same as --scanall --autoscan." msgstr "Identique à « --scanall --autoscan »." # type: =item #. type: =item #: debarchiver.pod:27 msgid "B<--autoscanpackages>" msgstr "B<--autoscanpackages>" # type: textblock #. type: textblock #: debarchiver.pod:29 msgid "" "Automatically run dpkg-scanpackages after all new packages are installed." msgstr "" "Démarre automatiquement « dpkg-scanpackages » après l'installation de tous " "les nouveaux paquets." # type: =item #. type: =item #: debarchiver.pod:31 msgid "B<--autoscansources>" msgstr "B<--autoscansources>" # type: textblock #. type: textblock #: debarchiver.pod:33 msgid "" "Automatically run dpkg-scansources after all new packages are installed." msgstr "" "Lance automatiquement « dpkg-scansources » après l'installation de tous les " "nouveaux paquets." # type: =item #. type: =item #: debarchiver.pod:35 msgid "B<-b | --bzip>" msgstr "B<-b | --bzip>" # type: textblock #. type: textblock #: debarchiver.pod:37 msgid "Create bzip2 compressed Packages.bz2 and Sources.bz2 files." msgstr "" "Crée les fichiers « Packages.bz2 » et « Sources.bz2 » comprimés avec bzip2." # type: =item #. type: =item #: debarchiver.pod:39 msgid "B<--cachedir> dir" msgstr "B<--cachedir> répertoire" # type: textblock #. type: textblock #: debarchiver.pod:41 msgid "" "The apt-ftparchive package cache directory, if --index is used. The default " "is $cachedir." msgstr "" "Indique le répertoire de cache utilisé par apt-ftparchive, si « --index » " "est utilisé. La valeur par défaut est « $cachedir »." # type: =item #. type: =item #: debarchiver.pod:43 msgid "B<--cinstall> dir" msgstr "B<--cinstall> répertoire" # type: textblock #. type: textblock #: debarchiver.pod:45 msgid "" "Where the .changes file will be installed to. Use the empty string to remove " "the .changes file instead. The default is $cinstall." msgstr "" "Indique le répertoire où le fichier « .changes » sera installé. " "L'utilisation d'une chaîne vide permet de supprimer ce fichier. La valeur " "par défaut est « $cinstall »." # type: =item #. type: =item #: debarchiver.pod:47 msgid "B<--configfile> file" msgstr "B<--configfile> fichier" # type: textblock #. type: textblock #: debarchiver.pod:49 msgid "" "Specifies an extra configuration file to read. Will be read after etc " "configuration and after user configuration files." msgstr "" "Indique un fichier de configuration supplémentaire à lire. Il sera lu après " "la configuration « etc » et après les fichiers de configuration utilisateur." # type: =item #. type: =item #: debarchiver.pod:51 msgid "B<--copycmd>" msgstr "B<--copycmd>" # type: verbatim #. type: textblock #: debarchiver.pod:53 msgid "" "The install command to use where the default is $copycmd. Both packages and ." "changes files are installed using this command." msgstr "" "Commande à utiliser pour l'installation. La valeur par défaut est " "« $copycmd ». Les paquets ainsi que les fichiers indiqués dans « .changes » " "seront installés grâce à cette commande." # type: =item #. type: =item #: debarchiver.pod:55 msgid "B<-d | --dest | --destdir> dir" msgstr "B<-d | --dest | --destdir> répertoire" # type: textblock #. type: textblock #: debarchiver.pod:57 msgid "" "Destination directory. The base directory where all the distribution " "packages will reside and where the $distrib/$major/$arch/$section directory " "structure will be created. The default is $destdir, relative to the input " "directory." msgstr "" "Indique le répertoire de destination. C'est le répertoire de base où seront " "situés tous les paquets de la distribution et où l'arborescence « $distrib/" "$major/$arch/$section » sera créée. Par défaut le chemin relatif " "« $destdir » sera utilisé." # type: =item #. type: =item #: debarchiver.pod:59 msgid "B<--debug-level | --dl> level" msgstr "B<--debug-level | --dl> niveau" # type: textblock #. type: textblock #: debarchiver.pod:61 msgid "" "What information that should be printed. 1=critical, 2=error, 3=normal, " "4=message, 5=debug, 6=verbose debug (modules)." msgstr "" "Indique le niveau des informations qui seront affichées. 1=critique, " "2=erreur, 3=normal, 4=message, 5=débogage, 6=débogage détaillé (modules)." # type: =item #. type: =item #: debarchiver.pod:63 msgid "B<--distinputcriteria>" msgstr "B<--distinputcriteria>" # type: verbatim #. type: verbatim #: debarchiver.pod:65 #, no-wrap msgid "" "The criteria for what binary packages should be installed even if they do not have a .changes file. The default is $distinputcriteria.\n" " \n" msgstr "" "Indique les critères définissant quels paquets binaires devront être installés même en l'absence de fichier « .changes ». La valeur par défaut est « $distinputcriteria ».\n" "\n" # type: =item #. type: =item #: debarchiver.pod:67 msgid "B<--gpgkey>" msgstr "B<--gpgkey>" # type: textblock #. type: textblock #: debarchiver.pod:69 msgid "The GnuPG key to use to sign the archive." msgstr "Indique la clé GnuPG à utiliser pour signer l'archive." # type: =item #. type: =item #: debarchiver.pod:71 msgid "B<--gpgpassfile>" msgstr "B<--gpgpassfile>" # type: textblock #. type: textblock #: debarchiver.pod:73 msgid "The file that provides the password to GnuPG." msgstr "Indique le fichier qui fournit le mot de passe à GnuPG." # type: =item #. type: =item #: debarchiver.pod:75 msgid "B<--help>" msgstr "B<--help>" # type: textblock #. type: textblock #: debarchiver.pod:77 msgid "Prints this information." msgstr "" "Affiche ce fichier d'aide. (NdT : Affiche, en fait, l'original en anglais.)" # type: =item #. type: =item #: debarchiver.pod:79 msgid "B<-i | --input | --indir | --inputdir> dir" msgstr "B<-i | --input | --indir | --inputdir> répertoire" # type: textblock #. type: textblock #: debarchiver.pod:81 msgid "" "This is the directory where debarchiver will look for new package versions " "and corresponding *.changes files that should be installed to the --dest " "directory. The default is $instdir." msgstr "" "Indique le répertoire où debarchiver cherchera les nouvelles versions du " "paquet, ainsi que les fichiers « *.changes » correspondants qui devront être " "installés au sein du répertoire « --dest ». La valeur par défaut est " "« $instdir »." # type: =item #. type: =item #: debarchiver.pod:83 msgid "B<--ignoredestcheck>" msgstr "B<--ignoredestcheck>" # type: textblock #. type: textblock #: debarchiver.pod:85 msgid "" "Force install of .changes file even if some files specified in the .changes " "file already exists with wrong size or md5 hash." msgstr "" "Force l'installation conformément au fichier « .changes » même si certains " "fichiers indiqués dans le fichier « .changes » existent déjà avec une taille " "erronée ou une mauvaise somme de contrôle md5." # type: =item #. type: =item #: debarchiver.pod:87 msgid "B<--incompletetime>" msgstr "B<--incompletetime>" # type: textblock #. type: textblock #: debarchiver.pod:89 msgid "" "The time to allow .changes file to be incomplete in seconds. The default is " "24 hours." msgstr "" "Indique la durée autorisée, en secondes, pendant laquelle le fichier « ." "changes » peut être incomplet. La valeur par défaut est de 24 heures." # type: =item #. type: =item #: debarchiver.pod:92 msgid "B<--index | -x>" msgstr "B<--index | -x>" # type: textblock #. type: textblock #: debarchiver.pod:94 msgid "" "Automatically run apt-ftparchive after all new packages are installed. Use " "this *or* --autoscan, not both." msgstr "" "Lance automatiquement « apt-ftparchive » après l'installation de tous les " "nouveaux paquets. Utiliser cette option OU « --autoscan », mais pas les deux " "ensemble." # type: =item #. type: =item #: debarchiver.pod:96 msgid "B<--instcmd>" msgstr "B<--instcmd>" # type: textblock #. type: textblock #: debarchiver.pod:98 msgid "DEPRECATED!" msgstr "Obsolète !" # type: =item #. type: =item #: debarchiver.pod:100 msgid "B<--lockfile> file" msgstr "B<--lockfile> fichier" # type: textblock #. type: textblock #: debarchiver.pod:102 debarchiver.pod:229 msgid "The lockfile to use. The default is $lockfile." msgstr "" "Indique le fichier de verrouillage à utiliser. La valeur par défaut est " "« $lockfile »." # type: =item #. type: =item #: debarchiver.pod:104 msgid "B<--mailcmd>" msgstr "B<--mailcmd>" # type: textblock #. type: textblock #: debarchiver.pod:106 msgid "" "The command to use to send emails. The default behavior is to use the " "sendmail command." msgstr "" "Indique le programme à utiliser pour envoyer des courriels. Par défaut, " "« sendmail » est utilisé." # type: =item #. type: =item #: debarchiver.pod:109 msgid "B<--mailformat>" msgstr "B<--mailformat>" # type: verbatim #. type: verbatim #: debarchiver.pod:111 #, no-wrap msgid "" "Defines the format to be used to send emails with, by the command specified\n" "by --mailfrom. Only 'sendmail' and 'mail' formats are supported. By default\n" "debarchiver assumes 'sendmail' format. The argument can be one of the\n" "following:\n" " sendmail = use of the sendmail format\n" " mail = use of the mail format\n" "\n" msgstr "" "Indique le format à utiliser pour envoyer les courriels avec le programme\n" "spécifié par « --mailfrom ». Seuls les formats « mail » et « sendmail » sont\n" "acceptés. Par défaut, debarchiver utilisera le format « sendmail ».\n" "Les valeurs autorisées sont :\n" " sendmail = utilise le format « sendmail » ;\n" " mail = utilise le format « mail ».\n" "\n" # type: =item #. type: =item #: debarchiver.pod:118 msgid "B<--mailfrom>" msgstr "B<--mailfrom>" # type: textblock #. type: textblock #: debarchiver.pod:120 msgid "Specify mail sender." msgstr "Indique l'expéditeur du courriel." # type: =item #. type: =item #: debarchiver.pod:122 msgid "B<--majordefault>" msgstr "B<--majordefault>" # type: textblock #. type: textblock #: debarchiver.pod:124 msgid "Default major section to use. The default is 'main'." msgstr "" "Indique la section principale à utiliser. La valeur par défaut est « main »." # type: =item #. type: =item #: debarchiver.pod:126 msgid "B<--movecmd>" msgstr "B<--movecmd>" # type: textblock #. type: textblock #: debarchiver.pod:128 msgid "Command to move files (currently not used at all)." msgstr "" "Indique la commande à utiliser pour déplacer des fichiers. (Actuellement " "cette option n'est pas utilisée du tout)." # type: =item #. type: =item #: debarchiver.pod:130 msgid "B<--nosort>" msgstr "B<--nosort>" # type: textblock #. type: textblock #: debarchiver.pod:132 msgid "Do not sort packages." msgstr "Permet de ne pas trier pas les paquets." # type: =item #. type: =item #: debarchiver.pod:134 msgid "B<--nostructurefix>" msgstr "B<--nostructurefix>" # type: textblock #. type: textblock #: debarchiver.pod:136 msgid "Do not create directories and touch Package files." msgstr "" "Permet de ne pas créer les répertoires et actualise (touch) les fichiers " "« Package »." # type: =item #. type: =item #: debarchiver.pod:138 msgid "B<-o | --addoverride>" msgstr "B<-o | --addoverride>" # type: textblock #. type: textblock #: debarchiver.pod:140 msgid "Automatically add new packages to the override file." msgstr "" "Ajoute automatiquement de nouveaux paquets au fichier des exclusions " "(override)." # type: =item #. type: =item #: debarchiver.pod:142 msgid "B<--quit-level> level" msgstr "B<--quit-level> niveau" # type: textblock #. type: textblock #: debarchiver.pod:144 msgid "On what level to quit the application, see debug level." msgstr "" "Indique le niveau d'erreurs qui produira l'arrêt de l'exécution. Cf. « --" "debug-level » ci-dessus." # type: =item #. type: =item #: debarchiver.pod:146 msgid "B<--rmcmd>" msgstr "B<--rmcmd>" # type: textblock #. type: textblock #: debarchiver.pod:148 msgid "" "The remove command to use. The default is $rmcmd. This can be used to move " "away the old packages to some other place." msgstr "" "Indique la commande à utiliser pour la suppression. La valeur par défaut est " "« $rmcmd ». Cette commande peut être utilisée pour déplacer les anciens " "paquets à un autre emplacement." # type: =item #. type: =item #: debarchiver.pod:150 msgid "B<--scanall>" msgstr "B<--scanall>" # type: textblock #. type: textblock #: debarchiver.pod:152 msgid "Scan all distributions, sections, etc." msgstr "Explore toutes les distributions, sections, etc." # type: =item #. type: =item #: debarchiver.pod:154 msgid "B<--scandetect | -s>" msgstr "B<--scandetect | -s>" # type: verbatim #. type: textblock #: debarchiver.pod:156 msgid "" "Scan using 'apt-ftparchive' or 'dpkg-scan*' (dpkg-scanpackages and dpkg-" "scansources) depending on what is installed on the system. This is the " "recommended way. Only use --index or --autoscan if you know what you are " "doing." msgstr "" "Choisit automatiquement d'utiliser, soit « apt-ftparchive », soit « dpkg-" "scan* » (« dpkg-scanpackages » et « dpkg-scansources »), selon ce qui est " "installé sur le système. C'est la méthode recommandée. N'utilisez « --" "index » ou « --autoscan » que si vous savez parfaitement ce que vous faites." # type: =item #. type: =item #: debarchiver.pod:158 msgid "B<--scanonly>" msgstr "B<--scanonly>" # type: textblock #. type: textblock #: debarchiver.pod:160 msgid "Same as --nosort --nostructurefix." msgstr "Identique à « --nosort --nostructurefix »." # type: =item #. type: =item #: debarchiver.pod:162 msgid "B<-v | --version>" msgstr "B<-v | --version>" # type: textblock #. type: textblock #: debarchiver.pod:164 msgid "Prints the version string." msgstr "Affiche le numéro de version." # type: =head1 #. type: =head1 #: debarchiver.pod:168 msgid "CONFIGURATION FILES" msgstr "FICHIERS DE CONFIGURATION" # type: textblock #. type: textblock #: debarchiver.pod:170 msgid "" "You can also place configuration files with the following names (in the " "following order) /etc/debarchiver.conf, ~/.debarchiver.conf and input.conf " "(relative to input directory) that will be read before the arguments to this " "program will be parsed. In the above files you can change the following " "variables:" msgstr "" "Vous pouvez également utiliser des fichiers de configuration portant les " "noms suivants (dans l'ordre suivant) : « /etc/debarchiver.conf »>, « ~/." "debarchiver.conf » et « input.conf » (chemin relatif) qui seront lus et " "exploités dans cet ordre. Les arguments de la commande auront priorité sur " "ces fichiers de configuration. Dans les fichiers ci-dessus vous pouvez " "modifier les variables suivantes :" # type: textblock #. type: textblock #: debarchiver.pod:172 msgid "" "The configuration files are read as perl modules they should end with a true " "value. Therefore they should always end with a line that states '1;'." msgstr "" "Les fichiers de configuration sont lus comme des fichiers perl et doivent se " "terminer avec une valeur « true ». Par conséquent ils doivent toujours finir " "par une ligne d'état « 1 »." # type: =item #. type: =item #: debarchiver.pod:176 msgid "B<$bzip>" msgstr "B<$bzip>" # type: textblock #. type: textblock #: debarchiver.pod:178 msgid "" "If set to 0 no bzip2 files will be generated. If set to 1 bzip2 files will " "be generated." msgstr "" "Si cette variable est positionnée à 0, aucun fichier bzip2 ne sera créé. Si " "elle est positionnée à 1 les fichiers bzip2 seront créés." # type: =item #. type: =item #: debarchiver.pod:181 msgid "B<$cachedir>" msgstr "B<$cachedir>" # type: textblock #. type: textblock #: debarchiver.pod:183 msgid "The cache directory for apt-ftparchive used if --index is used." msgstr "" "Indique le répertoire de cache pour apt-ftparchive utilisé si « --index » " "est précisé." # type: =item #. type: =item #: debarchiver.pod:185 msgid "B<$cinstall>" msgstr "B<$cinstall>" # type: textblock #. type: textblock #: debarchiver.pod:187 msgid "Where the .changes files are installed (see --cinstall above)." msgstr "" "Emplacement où les fichiers « .changes » sont installés (voir « --cinstall » " "ci-dessus)." # type: =item #. type: =item #: debarchiver.pod:189 msgid "B<$copycmd>" msgstr "B<$copycmd>" # type: textblock #. type: textblock #: debarchiver.pod:191 msgid "The install command (see --copycmd)." msgstr "Commande d'installation (voir « --copycmd » ci-dessus)." # type: =item #. type: =item #: debarchiver.pod:193 msgid "B<$destdir>" msgstr "B<$destdir>" # type: textblock #. type: textblock #: debarchiver.pod:195 msgid "The destination directory (see --destdir above)." msgstr "Répertoire de destination (voir « --destdir » ci-dessus)." # type: =item #. type: =item #: debarchiver.pod:197 msgid "B<$distinputcriteria>" msgstr "B<$distinputcriteria>" # type: textblock #. type: textblock #: debarchiver.pod:199 msgid "" "The criteria for which packages that should be installed even if it does not " "have a .changes file. The default is $distinputcriteria." msgstr "" "Critères permettant de déterminer les paquets qui devront être installés " "même en l'absence de fichier « .changes ». La valeur par défaut est " "« $distinputcriteria »." # type: =item #. type: =item #: debarchiver.pod:201 msgid "B<%distinputdirs>" msgstr "B<%distinputdirs>" # type: textblock #. type: textblock #: debarchiver.pod:203 msgid "" "Directories (distribution => dir) to be searched for extra binary packages " "that does not need a .changes file to be installed but match " "$distinputcriteria. The default is to accept kernel packages generated by " "make-kpkg (which does not generate a .changes file). Additionally binary " "packages with a valid .changes file will have the default distribution " "overridden to be the current queue directory. This cause uploads to a " "specific queue to place the package into that distribution directly." msgstr "" "Répertoires (distribution → répertoire) où sont cherchés les paquets " "binaires supplémentaires qui n'ont pas besoin de fichier « .changes » pour " "être installés mais qui correspondent à « $distinputcriteria ». Par défaut " "cela accepte les paquets du noyau, produits par « make-kpkg » (qui ne " "génèrent pas de fichier « .changes »). En plus, les paquets binaires avec un " "fichier « .changes » correct passeront outre la distribution par défaut et " "seront placés dans le répertoire de la file d'attente actuelle. Cela " "produira la remontée vers une file d'attente spécifique pour placer le " "paquet directement dans cette distribution." # type: =item #. type: =item #: debarchiver.pod:205 msgid "B<$gpgkey>" msgstr "B<$gpgkey>" # type: textblock #. type: textblock #: debarchiver.pod:207 msgid "" "The GnuPG key to use to sign the archive. If this variable is set, the " "Release file for each changed section of the archive will be signed with " "GnuPG using $gpgkey as the key ID. Unless you use a key that has no " "passphrase or use $gpgpassfile, you will need to run B " "interactively when using this option so that you can supply the passphrase." msgstr "" "Indique la clé GnuPG utilisée pour signer l'archive. Si cette variable est " "renseignée, le fichier « Release » de chaque partie modifiée de l'archive " "sera signé par GnuPG en utilisant « $gpgkey » comme clé d'identification. À " "moins d'utiliser une clé sans mot de passe ou de se servir de la variable " "« $gpgpassfile », il est nécessaire d'exécuter B de manière " "interactive afin de pouvoir fournir le mot de passe si cette option est " "utilisée." # type: =item #. type: =item #: debarchiver.pod:209 msgid "B<$gpgpassfile>" msgstr "B<$gpgpassfile>" # type: textblock #. type: textblock #: debarchiver.pod:211 msgid "" "The file that contains the passphrase for the GnuPG key. See $gpgkey for " "more information." msgstr "" "Indique le nom du fichier qui contient le mot de passe de la clé GnuPG. Voir " "« $gpgkey » pour plus d'informations." # type: =item #. type: =item #: debarchiver.pod:214 msgid "B<$ignoredestcheck>" msgstr "B<$ignoredestcheck>" # type: textblock #. type: textblock #: debarchiver.pod:216 msgid "" "Force install of .changes file even if some files specified in the .changes " "file already exist with wrong size or md5 hash. Default to 0 (do not ignore)." msgstr "" "Force l'installation conformément au fichier « .changes » même si certains " "fichiers déjà existants ont une taille erronée ou une mauvaise somme de " "contrôle md5." # type: =item #. type: =item #: debarchiver.pod:218 msgid "B<$incompletetime>" msgstr "B<$incompletetime>" # type: textblock #. type: textblock #: debarchiver.pod:220 msgid "" "Time to allow .changes files to be incomplete in seconds. Useful for slow " "uploads. The default is 24 hours." msgstr "" "Indique la durée autorisée, en secondes, pendant laquelle le fichier « ." "changes » peut demeurer incomplet. Ceci est utile pour les remontées lentes. " "La valeur par défaut est de 24 heures." # type: =item #. type: =item #: debarchiver.pod:223 msgid "B<$inputdir>" msgstr "B<$inputdir>" # type: textblock #. type: textblock #: debarchiver.pod:225 msgid "The input directory (no effect in $inputconfigfile)." msgstr "Répertoire d'entrée (n'affecte pas « $inputconfigfile »)." # type: =item #. type: =item #: debarchiver.pod:227 msgid "B<$lockfile>" msgstr "B<$lockfile>" # type: =item #. type: =item #: debarchiver.pod:231 msgid "B<@mailtos>" msgstr "B<@mailtos>" # type: textblock #. type: textblock #: debarchiver.pod:233 msgid "" "An array of strings that will receive emails. If the string contains an " "email address that one is used. If it contains an incomplete email address, " "i.e. @hostname, the username owning the file is used @ the hostname " "specified. If no '@' character is found in the string, it is considered as a " "field in the .changes file. Such a field can for example be Maintainer or " "Uploaders." msgstr "" "Tableau de chaînes indiquant les destinataires de courriels. Si la chaîne " "contient une adresse de courrier électronique, celle-ci sera utilisée. Si " "elle contient une adresse incomplète, par exemple « @nom_hôte », le nom de " "l'utilisateur propriétaire du fichier sera utilisé en combinaison avec le " "« @nom_hôte » indiqué. Si aucun caractère « @ » n'est trouvé dans la chaîne, " "on considérera qu'il s'agit d'un champ dans le fichier « .changes ». Ce " "champ peut par exemple être « Maintainer » ou « Uploaders »." # type: =item #. type: =item #: debarchiver.pod:235 msgid "B<$mailformat>" msgstr "B<$mailformat>" # type: textblock #. type: textblock #: debarchiver.pod:237 msgid "The format to use to send emails (see --mailformat above)." msgstr "" "Format utilisé pour envoyer les courriels. (Voir « --mailformat » ci-dessus.)" # type: =item #. type: =item #: debarchiver.pod:239 msgid "B<$mailfrom>" msgstr "B<$mailfrom>" # type: textblock #. type: textblock #: debarchiver.pod:241 msgid "Specifies the sender of emails. The default is none (\"\")" msgstr "Indique l'expéditeur des courriels. Par défaut : aucun (\"\")." # type: =item #. type: =item #: debarchiver.pod:243 msgid "B<$majordefault>" msgstr "B<$majordefault>" # type: textblock #. type: textblock #: debarchiver.pod:245 msgid "Default major section (see --majordefault above)." msgstr "Section principale par défaut. Voir « --majordefault » ci-dessus." # type: =item #. type: =item #: debarchiver.pod:247 msgid "B<$movecmd>" msgstr "B<$movecmd>" # type: textblock #. type: textblock #: debarchiver.pod:249 msgid "The move command (see --movecmd)." msgstr "Commande de déplacement (voir « --movecmd » ci-dessus)." # type: =item #. type: =item #: debarchiver.pod:251 msgid "B<%release>" msgstr "B<%release>" # type: textblock #. type: textblock #: debarchiver.pod:253 msgid "" "Additional information to add to generated Release files. Supported keys are " "'origin', 'label', and 'description'." msgstr "" "Information complémentaire à ajouter au fichier « Release ». Les mots-clés " "acceptés sont : « origin », « label », et « description »." # type: =item #. type: =item #: debarchiver.pod:255 msgid "B<$rmcmd>" msgstr "B<$rmcmd>" # type: textblock #. type: textblock #: debarchiver.pod:257 msgid "The remove command (see --rmcmd above)." msgstr "Commande de suppression (voir « --rmcmd » ci-dessus)." # type: =item #. type: =item #: debarchiver.pod:259 msgid "B<$verifysignatures>" msgstr "B<$verifysignatures>" # type: textblock #. type: textblock #: debarchiver.pod:261 msgid "" "Choose to enable (1) or disable (0) signature verification for packages " "uploaded into $inputdir (not %distinputdirs)." msgstr "" "Permet d'activer (1) ou de désactiver (0) la vérification de la signature " "des paquets remontés vers « $inputdir » (pas ceux vers « %distinputdirs »)." # type: =item #. type: =item #: debarchiver.pod:263 msgid "B<$verifysignaturesdistinput>" msgstr "B<$verifysignaturesdistinput>" # type: textblock #. type: textblock #: debarchiver.pod:265 msgid "" "Choose to enable (1) or disable (2) signature verification for packages " "uploaded into %distinputdirs. This works independently from " "$verifysignatures." msgstr "" "Permet d'activer (1) ou de désactiver (2) la vérification de la signature " "des paquets remontés vers « %distinputdirs ». Cette option fonctionne " "indépendamment de « $verifysignatures »." # type: =item #. type: =item #: debarchiver.pod:267 msgid "B<$usermailcmd>" msgstr "B<$usermailcmd>" # type: textblock #. type: textblock #: debarchiver.pod:269 msgid "" "It allows the user to tell debarchiver to use a specific command to send " "emails. You may also want to specify the mailformat your mail command " "handles by setting the value of the $mailformat variable. Using the --" "mailcmd option on the command line will superseed this variable." msgstr "" "Cela permet à l'utilisateur d'indiquer à debarchiver le programme à utiliser " "pour envoyer les courriels. Il est également possible de spécifier le format " "que cette commande doit utiliser en définissant la valeur de la variable " "« $mailformat ». L'utilisation de l'option « --mailcmd », dans la ligne de " "commande, surchargera cette variable." # type: =head1 #. type: =head1 #: debarchiver.pod:276 msgid "PACKAGE INDEXING" msgstr "INDEXATION DES PAQUETS" # type: textblock #. type: textblock #: debarchiver.pod:278 msgid "There are two ways to generate the indexes that B relies on." msgstr "" "Il y a deux manières de produire des index exploitables par B :" # type: textblock #. type: textblock #: debarchiver.pod:280 msgid "" "Using B<--autoscanpackages>, B<--autoscansources>, or B<--autoscan> will use " "B and B. This will generate the " "Packages and Sources files, but will not generate Contents files and can be " "slow with a large repository." msgstr "" "On peut utiliser B<--autoscanpackages>, B<--autoscansources>, ou B<--" "autoscan> ce qui exploitera B et B. " "Ceci produira les paquets et les fichiers source mais ne générera pas les " "fichiers « Contents » et risque d'être lent avec un référentiel de grande " "taille." # type: textblock #. type: textblock #: debarchiver.pod:282 msgid "" "Alternatively, the B<--index> I option will call B " "to index the package tree. B can also generate Contents " "files (for use with B), and can optionally use a cache of package " "information to speed up multiple runs. The B configuration " "file will be generated automatically. This is however not fully tested." msgstr "" "En revanche, l'option B<--index > I utilisera B pour " "indexer l'arborescence des paquets. B peut également " "produire des fichiers « Contents » (destinés à B), et il peut, " "éventuellement, employer un cache afin d'accélérer des exécutions multiples. " "Le fichier de configuration B sera produit automatiquement. " "Ceci n'a cependant pas été complètement testé." # type: textblock #. type: textblock #: debarchiver.pod:284 msgid "" "You should use either B<--autoscanpackages> and B<--autoscansources> or B<--" "index>, not both, as they do basically the same thing." msgstr "" "Vous devez employer soit B<--autoscanpackages> et B<--autoscansources> soit " "B<--index>, mais pas les deux, puisqu'ils font fondamentalement la même " "chose." # type: textblock #. type: textblock #: debarchiver.pod:286 msgid "" "The default action (and the recommended) is B<--scandetect> that probe for " "installed software and use the best choice depending on what software you " "have installed (chooses between --index and --autoscan right now)." msgstr "" "L'action par défaut (et celle qui est recommandée) est B<--scandetect> qui " "analyse les logiciels déjà installés et choisit efficacement entre « --" "index » et « --autoscan » suivant ce que vous avez implanté sur votre " "système." # type: =head1 #. type: =head1 #: debarchiver.pod:288 msgid "REJECT" msgstr "REJET" # type: verbatim #. type: verbatim #: debarchiver.pod:290 #, no-wrap msgid "" "Changes files are rejected in the following conditions:\n" " * A file that is about to be installed already exist in the archive and is not identical to the one that is about to be installed.\n" " * Changes file is incomplete and has been there for $incompletetime time.\n" " * A file that is part of the Changes file is not yet big enough and the changes file has been there for $incompletetime time.\n" " * A file that is part of the Changes file is bigger than specified.\n" " * Verify signatures is enabled and signature do not match.\n" "\n" msgstr "" "Les fichiers « changes » sont rejetés dans les conditions suivantes :\n" " - Si un fichier en cours d'installation existe déjà dans l'archive et n'est pas identique à celui en cours d'installation.\n" " - Si le fichier « changes » n'est pas terminé bien que présent depuis un délai supérieur à « $incompletetime ».\n" " - Si un des fichiers qui font partie du fichier « changes » est incomplet depuis un délai supérieur à « $incompletetime ».\n" " - Si un des fichiers mentionnés dans le fichier « changes » est plus grand que spécifié.\n" " - Si la vérification des signatures est activée et que la signature ne correspond pas.\n" "\n" # type: =head1 #. type: =head1 #: debarchiver.pod:297 msgid "FILES" msgstr "FICHIERS" # type: textblock #. type: textblock #: debarchiver.pod:299 msgid "B" msgstr "B" # type: =head1 #. type: =head1 #: debarchiver.pod:301 msgid "SEE ALSO" msgstr "VOIR AUSSI" # type: textblock #. type: textblock #: debarchiver.pod:303 msgid "B(1)" msgstr "B(1)" # type: =head1 #. type: =head1 #: debarchiver.pod:305 msgid "AUTHOR" msgstr "AUTEUR" # type: textblock #. type: textblock #: debarchiver.pod:307 msgid "Ola Lundqvist " msgstr "Ola Lundqvist " # type: textblock #~ msgid "" #~ "Automatically run apt-ftparchive after all new packages are installed. " #~ "config must be an absolute path to the configuration file to use for apt-" #~ "ftparchive generate. See the apt-ftparchive manual page for more " #~ "information. Use this *or* --autoscan, not both." #~ msgstr "" #~ "Exécute automatiquement « apt-ftparchive » après l'installation de tous " #~ "les nouveaux paquets. I doit être un chemin absolu vers le " #~ "fichier de configuration à employer pour que apt-ftparchive fonctionne. " #~ "Voir les pages du manuel de apt-ftparchive pour plus d'informations. " #~ "Utilisez cette option OU l'option « --autoscan », mais pas les deux " #~ "ensemble." debarchiver-0.10.0/po4a/po/de.po0000664000000000000000000007500512240771607013164 0ustar # German translation of the debarchiver program messages # This file is distributed under the same license as the debarchiver package. # (C) Helge Kreutzmann , 2011. msgid "" msgstr "" "Project-Id-Version: debarchiver 0.9.6\n" "POT-Creation-Date: 2013-09-23 19:03+0300\n" "PO-Revision-Date: 2011-11-06 10:38+0100\n" "Last-Translator: Helge Kreutzmann \n" "Language-Team: debian-l10n-german@lists.debian.org\n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. type: =head1 #: debarchiver.pod:1 msgid "NAME" msgstr "NAME" #. type: textblock #: debarchiver.pod:3 msgid "debarchiver - Tool to sort debian packages into a package archive." msgstr "" "debarchiver - Werkzeug zum Sortieren von Debian-Paketen in ein Paketarchiv" #. type: =head1 #: debarchiver.pod:5 msgid "SYNOPSIS" msgstr "ÜBERSICHT" #. type: textblock #: debarchiver.pod:7 msgid "debarchiver [options]" msgstr "debarchiver [Optionen]" #. type: =head1 #: debarchiver.pod:9 msgid "DESCRIPTION" msgstr "BESCHREIBUNG" #. type: textblock #: debarchiver.pod:11 msgid "" "The debian archiver is a tool that installs debian packages into a file " "structure suitable for apt-get, aptitude, dselect and similar tools. This " "can be used for updating the Debian system. It is meant to be used by local " "administrators that need special packages, or tweaked versions to ease " "administration." msgstr "" "Der Debian-Archivar ist ein Werkzeug, um Debian-Pakete in eine Dateistruktur " "zu installieren, die für Apt-get, Aptitude, Dselect und ähnliche Werkzeuge " "geeignet ist. Dies kann zur Aktualisierung des Debian-Systems verwandt " "werden. Es ist für lokale Administratoren zur Erleichterung gedacht, die " "besondere Pakete oder angepasste Versionen benötigen." #. type: textblock #: debarchiver.pod:13 msgid "" "The file structure is based on the potato file structure and does not " "support package pools." msgstr "" "Die Dateistruktur basiert auf der Dateistruktur von Potato und untertützt " "keine Paket-Pools." #. type: =head1 #: debarchiver.pod:15 msgid "OPTIONS" msgstr "OPIONEN" #. type: =item #: debarchiver.pod:19 msgid "B<-a | --autoscan>" msgstr "B<-a | --autoscan>" #. type: textblock #: debarchiver.pod:21 msgid "Does both --autoscanpackages and --autoscansources." msgstr "Kombiniert --autoscanpackages und --autoscansources" #. type: =item #: debarchiver.pod:23 msgid "B<--autoscanall>" msgstr "B<--autoscanall>" #. type: textblock #: debarchiver.pod:25 msgid "Same as --scanall --autoscan." msgstr "Identisch zu --scanall --autoscan" #. type: =item #: debarchiver.pod:27 msgid "B<--autoscanpackages>" msgstr "B<--autoscanpackages>" #. type: textblock #: debarchiver.pod:29 msgid "" "Automatically run dpkg-scanpackages after all new packages are installed." msgstr "Automatisch Dpkg-scanpackages nach Installation aller Pakete aufrufen" #. type: =item #: debarchiver.pod:31 msgid "B<--autoscansources>" msgstr "B<--autoscansources>" #. type: textblock #: debarchiver.pod:33 msgid "" "Automatically run dpkg-scansources after all new packages are installed." msgstr "Automatisch Dpkg-scansources nach Installation aller Pakete aufrufen" #. type: =item #: debarchiver.pod:35 msgid "B<-b | --bzip>" msgstr "B<-b | --bzip>" #. type: textblock #: debarchiver.pod:37 msgid "Create bzip2 compressed Packages.bz2 and Sources.bz2 files." msgstr "Mit Bzip2 komprimierte Packages.bz2- und Sources.bz2-Dateien erstellen" #. type: =item #: debarchiver.pod:39 msgid "B<--cachedir> dir" msgstr "B<--cachedir> Verz" #. type: textblock #: debarchiver.pod:41 msgid "" "The apt-ftparchive package cache directory, if --index is used. The default " "is $cachedir." msgstr "" "Das Paketzwischenspeicherverzeichnis von Apt-ftparchive, falls --index " "verwandt wird. Standardmäßig $cachedir." #. type: =item #: debarchiver.pod:43 msgid "B<--cinstall> dir" msgstr "B<--cinstall> Verz" #. type: textblock #: debarchiver.pod:45 msgid "" "Where the .changes file will be installed to. Use the empty string to remove " "the .changes file instead. The default is $cinstall." msgstr "" "Installationsort der Datei .changes. Verwenden Sie die leere Zeichenkette, " "um die .changes-Datei stattdessen zu entfernen. Standardmäßig $cinstall." #. type: =item #: debarchiver.pod:47 msgid "B<--configfile> file" msgstr "B<--configfile> Datei" #. type: textblock #: debarchiver.pod:49 msgid "" "Specifies an extra configuration file to read. Will be read after etc " "configuration and after user configuration files." msgstr "" "Eine zusätzlich einzulesende Konfigurationsdatei angeben. Wird nach den Etc-" "und Benutzerkonfigurationsdateien eingelesen." #. type: =item #: debarchiver.pod:51 msgid "B<--copycmd>" msgstr "B<--copycmd>" #. type: textblock #: debarchiver.pod:53 msgid "" "The install command to use where the default is $copycmd. Both packages and ." "changes files are installed using this command." msgstr "" "Der zu verwendende Installationsbefehl, standardmäßig $copycmd. Sowohl die " "Paket- als auch die .changes-Datei werden mit diesem Befehl installiert." #. type: =item #: debarchiver.pod:55 msgid "B<-d | --dest | --destdir> dir" msgstr "B<-d | --dest | --destdir> Verz" #. type: textblock #: debarchiver.pod:57 msgid "" "Destination directory. The base directory where all the distribution " "packages will reside and where the $distrib/$major/$arch/$section directory " "structure will be created. The default is $destdir, relative to the input " "directory." msgstr "" "Zielverzeichnis. Das Basisverzeichnis, innerhalb dessen alle Distributions-" "Pakete liegen und wo die Struktur $distrib/$major/$arch/$section erstellt " "werden wird. Standardmäßig $destdir relativ zum Eingabeverzeichnis." #. type: =item #: debarchiver.pod:59 msgid "B<--debug-level | --dl> level" msgstr "B<--debug-level | --dl> Stufe" #. type: textblock #: debarchiver.pod:61 msgid "" "What information that should be printed. 1=critical, 2=error, 3=normal, " "4=message, 5=debug, 6=verbose debug (modules)." msgstr "" "Die auszugebenden Informationen. 1=kritische, 2=Fehler, 3=normale, " "4=Meldungen, 5=Debug, 6=ausführlicher Debug (Module)" #. type: =item #: debarchiver.pod:63 msgid "B<--distinputcriteria>" msgstr "B<--distinputcriteria>" #. type: verbatim #: debarchiver.pod:65 #, no-wrap msgid "" "The criteria for what binary packages should be installed even if they do not have a .changes file. The default is $distinputcriteria.\n" " \n" msgstr "" "Die Kriterien, welche Binärpakete installiert werden sollen, selbst falls sie keine .changes-Datei haben. Standardmäßig $distinputcriteria.\n" " \n" #. type: =item #: debarchiver.pod:67 msgid "B<--gpgkey>" msgstr "B<--gpgkey>" #. type: textblock #: debarchiver.pod:69 msgid "The GnuPG key to use to sign the archive." msgstr "" "Der GnuPG-Schlüssel, der zum Signieren des Archivs verwandt werden soll" #. type: =item #: debarchiver.pod:71 msgid "B<--gpgpassfile>" msgstr "B<--gpgpassfile>" #. type: textblock #: debarchiver.pod:73 msgid "The file that provides the password to GnuPG." msgstr "Datei, die das Passwort für GnuPG bereit stellt" #. type: =item #: debarchiver.pod:75 msgid "B<--help>" msgstr "B<--help>" #. type: textblock #: debarchiver.pod:77 msgid "Prints this information." msgstr "Gibt diese Information aus" #. type: =item #: debarchiver.pod:79 msgid "B<-i | --input | --indir | --inputdir> dir" msgstr "B<-i | --input | --indir | --inputdir> Verz" #. type: textblock #: debarchiver.pod:81 msgid "" "This is the directory where debarchiver will look for new package versions " "and corresponding *.changes files that should be installed to the --dest " "directory. The default is $instdir." msgstr "" "Dies ist das Verzeichnis, in dem Debarchiver nach neuen Paketversionen und " "entsprechenden .changes.Dateien schaut, die in das Verzeichnis --dest " "installiert werden sollen. Standardmäßig $instdir." #. type: =item #: debarchiver.pod:83 msgid "B<--ignoredestcheck>" msgstr "B<--ignoredestcheck>" #. type: textblock #: debarchiver.pod:85 msgid "" "Force install of .changes file even if some files specified in the .changes " "file already exists with wrong size or md5 hash." msgstr "" "Erwzingen der Installation der changes-Datei, selbst wenn einige in der ." "changes-Dateien angegebenen Dateien bereits mit der falschen Größe oder Md5-" "Prüfsumme existieren." #. type: =item #: debarchiver.pod:87 msgid "B<--incompletetime>" msgstr "B<--incompletetime>" #. type: textblock #: debarchiver.pod:89 msgid "" "The time to allow .changes file to be incomplete in seconds. The default is " "24 hours." msgstr "" "Die Zeit in Sekunden, die .changes-Dateien unvollständig bleiben dürfen. " "Standardmäßig 24 Stunden." #. type: =item #: debarchiver.pod:92 msgid "B<--index | -x>" msgstr "B<--index | -x>" #. type: textblock #: debarchiver.pod:94 msgid "" "Automatically run apt-ftparchive after all new packages are installed. Use " "this *or* --autoscan, not both." msgstr "" "Automatisch Apt-ftparchive nach Installation aller neuen Pakete aufrufen. " "Verwenden Sie dies *oder* --autoscan, nicht beide." #. type: =item #: debarchiver.pod:96 msgid "B<--instcmd>" msgstr "B<--instcmd>" #. type: textblock #: debarchiver.pod:98 msgid "DEPRECATED!" msgstr "VERALTET" #. type: =item #: debarchiver.pod:100 msgid "B<--lockfile> file" msgstr "B<--lockfile> Datei" #. type: textblock #: debarchiver.pod:102 debarchiver.pod:229 msgid "The lockfile to use. The default is $lockfile." msgstr "Die zu verwendende Sperrdatei, standardmäßig $lockfile" #. type: =item #: debarchiver.pod:104 msgid "B<--mailcmd>" msgstr "B<--mailcmd>" #. type: textblock #: debarchiver.pod:106 msgid "" "The command to use to send emails. The default behavior is to use the " "sendmail command." msgstr "" "Der Befehl, der zum Verschicken von E-Mails verwandt werden soll. " "Standardmäßig wird der der Befehl »sendmail« verwandt." #. type: =item #: debarchiver.pod:109 msgid "B<--mailformat>" msgstr "B<--mailformat>" #. type: verbatim #: debarchiver.pod:111 #, no-wrap msgid "" "Defines the format to be used to send emails with, by the command specified\n" "by --mailfrom. Only 'sendmail' and 'mail' formats are supported. By default\n" "debarchiver assumes 'sendmail' format. The argument can be one of the\n" "following:\n" " sendmail = use of the sendmail format\n" " mail = use of the mail format\n" "\n" msgstr "" "Definiert das Format, das zum Versenden von E-Mails mit verwandt werden soll,\n" "über den mit --mailfrom angegebenen Befehl. Es werden nur die Formate\n" "»sendmail« und »mail« unterstützt. Standardmäßig verwendet Debarchiver das\n" "Format »sendmail«. Das Argument kann eines der Folgenden sein:\n" " sendmail = Verwendung des Sendmail-Formats\n" " mail = Verwendung des E-Mail-Formats\n" #. type: =item #: debarchiver.pod:118 msgid "B<--mailfrom>" msgstr "B<--mailfrom>" #. type: textblock #: debarchiver.pod:120 msgid "Specify mail sender." msgstr "Angabe des E-Mail-Absenders" #. type: =item #: debarchiver.pod:122 msgid "B<--majordefault>" msgstr "B<--majordefault>" #. type: textblock #: debarchiver.pod:124 msgid "Default major section to use. The default is 'main'." msgstr "Vorgabe für Hauptbereich. Der Vorgabewert ist »main«." #. type: =item #: debarchiver.pod:126 msgid "B<--movecmd>" msgstr "B<--movecmd>" #. type: textblock #: debarchiver.pod:128 msgid "Command to move files (currently not used at all)." msgstr "Befehl zum Verschieben von Dateien (derzeit überhaupt nicht verwandt)" #. type: =item #: debarchiver.pod:130 msgid "B<--nosort>" msgstr "B<--nosort>" #. type: textblock #: debarchiver.pod:132 msgid "Do not sort packages." msgstr "Pakete nicht sortieren" #. type: =item #: debarchiver.pod:134 msgid "B<--nostructurefix>" msgstr "B<--nostructurefix>" #. type: textblock #: debarchiver.pod:136 msgid "Do not create directories and touch Package files." msgstr "Verzeichnisse und Package-Dateien nicht anlegen." #. type: =item #: debarchiver.pod:138 msgid "B<-o | --addoverride>" msgstr "B<-o | --addoverride>" #. type: textblock #: debarchiver.pod:140 msgid "Automatically add new packages to the override file." msgstr "Automatisch neue Pakete zu der Override-Datei hinzufügen" #. type: =item #: debarchiver.pod:142 msgid "B<--quit-level> level" msgstr "B<--quit-level> Stufe" #. type: textblock #: debarchiver.pod:144 msgid "On what level to quit the application, see debug level." msgstr "" "Auf welcher Stufe die Anwendung beendet werden soll, lesen Sie Debug-Stufe" #. type: =item #: debarchiver.pod:146 msgid "B<--rmcmd>" msgstr "B<--rmcmd>" #. type: textblock #: debarchiver.pod:148 msgid "" "The remove command to use. The default is $rmcmd. This can be used to move " "away the old packages to some other place." msgstr "" "Der zum Entfernen verwandte Befehl, standardmäßig $rmcmd. Dieser kann " "verwandt werden, um alte Paketen an einen anderen Platz zu verschieben." #. type: =item #: debarchiver.pod:150 msgid "B<--scanall>" msgstr "B<--scanall>" #. type: textblock #: debarchiver.pod:152 msgid "Scan all distributions, sections, etc." msgstr "Alle Distributionen, Bereiche usw. durchsuchen" #. type: =item #: debarchiver.pod:154 msgid "B<--scandetect | -s>" msgstr "B<--scandetect | -s>" #. type: textblock #: debarchiver.pod:156 msgid "" "Scan using 'apt-ftparchive' or 'dpkg-scan*' (dpkg-scanpackages and dpkg-" "scansources) depending on what is installed on the system. This is the " "recommended way. Only use --index or --autoscan if you know what you are " "doing." msgstr "" "Mit »apt-ftparchive« oder »dpkg-scan*« (dpkg-scanpackages and dpkg-" "scansources) durchsuchen, abhängig davon, was installiert ist. Dies ist die " "empfohlene Vorgehensweise. Verwenden Sie »--index« oder »--autoscan« nur, " "wenn Sie wissen, was Sie tun." #. type: =item #: debarchiver.pod:158 msgid "B<--scanonly>" msgstr "B<--scanonly>" #. type: textblock #: debarchiver.pod:160 msgid "Same as --nosort --nostructurefix." msgstr "Identisch zu --nosort --nostructurefix" #. type: =item #: debarchiver.pod:162 msgid "B<-v | --version>" msgstr "B<-v | --version>" #. type: textblock #: debarchiver.pod:164 msgid "Prints the version string." msgstr "Gibt die Versionszeichenkette aus" #. type: =head1 #: debarchiver.pod:168 msgid "CONFIGURATION FILES" msgstr "KONFIGURATIONSDATEIEN" #. type: textblock #: debarchiver.pod:170 msgid "" "You can also place configuration files with the following names (in the " "following order) /etc/debarchiver.conf, ~/.debarchiver.conf and input.conf " "(relative to input directory) that will be read before the arguments to this " "program will be parsed. In the above files you can change the following " "variables:" msgstr "" "Sie können auch Konfigurationsdateien mit den folgenden Namen (in der " "folgenden Reihenfolge) erstellen, die vor der Auswertung der Argumente für " "dieses Programm gelesen werden: /etc/debarchiver.conf, ~/.debarchiver.conf " "und input.conf (relativ zum Eingabeverzeichnis). In den aufgeführten Dateien " "können Sie die folgenden Variablen ändern:" # s/they/so they/ #. type: textblock #: debarchiver.pod:172 msgid "" "The configuration files are read as perl modules they should end with a true " "value. Therefore they should always end with a line that states '1;'." msgstr "" "Die Konfigurationsdateien werden als Perl-Module eingelesen, daher sollten " "sie mit einem wahren Wert enden. Daher sollten Sie immer mit einer Zeile, in " "der »1;« steht, enden." #. type: =item #: debarchiver.pod:176 msgid "B<$bzip>" msgstr "B<$bzip>" #. type: textblock #: debarchiver.pod:178 msgid "" "If set to 0 no bzip2 files will be generated. If set to 1 bzip2 files will " "be generated." msgstr "" "Falls auf 0 gesetzt, werden keine Bzip2-Dateien erstellt. Falls auf 1 " "gesetzt, werden Bzip2-Dateien erstellt." #. type: =item #: debarchiver.pod:181 msgid "B<$cachedir>" msgstr "B<$cachedir>" #. type: textblock #: debarchiver.pod:183 msgid "The cache directory for apt-ftparchive used if --index is used." msgstr "" "Das Zwischenspeicherverzeichnis für Apt-ftparchive, verwandt, falls --index " "genutzt wird." #. type: =item #: debarchiver.pod:185 msgid "B<$cinstall>" msgstr "B<$cinstall>" #. type: textblock #: debarchiver.pod:187 msgid "Where the .changes files are installed (see --cinstall above)." msgstr "" "Ort, an dem die .changes-Dateien installiert werden (siehe --cinstall oben)" #. type: =item #: debarchiver.pod:189 msgid "B<$copycmd>" msgstr "B<$copycmd>" #. type: textblock #: debarchiver.pod:191 msgid "The install command (see --copycmd)." msgstr "Der Installationsbefehl (lesen Sie --copycmd)" #. type: =item #: debarchiver.pod:193 msgid "B<$destdir>" msgstr "B<$destdir>" #. type: textblock #: debarchiver.pod:195 msgid "The destination directory (see --destdir above)." msgstr "Das Zielverzeichnis (siehe --destdir oben)" #. type: =item #: debarchiver.pod:197 msgid "B<$distinputcriteria>" msgstr "B<$distinputcriteria>" # FIXME Sentence #. type: textblock #: debarchiver.pod:199 msgid "" "The criteria for which packages that should be installed even if it does not " "have a .changes file. The default is $distinputcriteria." msgstr "" "Die Kriterien, nach denen Pakete installiert werden sollen, selbst falls sie " "keine .changes-Datei haben, standardmäßig $distinputcriteria." #. type: =item #: debarchiver.pod:201 msgid "B<%distinputdirs>" msgstr "B<%distinputdirs>" # FIXME: s/that does not/that do not/ # FIXME: s/this cause/this causes/ #. type: textblock #: debarchiver.pod:203 msgid "" "Directories (distribution => dir) to be searched for extra binary packages " "that does not need a .changes file to be installed but match " "$distinputcriteria. The default is to accept kernel packages generated by " "make-kpkg (which does not generate a .changes file). Additionally binary " "packages with a valid .changes file will have the default distribution " "overridden to be the current queue directory. This cause uploads to a " "specific queue to place the package into that distribution directly." msgstr "" "Verzeichnis (Distribution => Verz), das nach zusätzlichen binären Paketen " "durchsucht werden soll, für die keine .changes-Datei installiert werden " "soll, die aber auf $distinputcriteria passen. Standardmäßig werden von Make-" "kpkg erstellte Kernel-Pakete akzeptiert (da hier keine .changes-Dateien " "erstellt werden). Zusätzlich wird bei Binärpaketen mit einer gültigen ." "changes-Datei die Standard-Distribution auf das aktuelle Warteschlangen-" "Verzeichnis ersetzt. Dies führt dazu, dass Uploads in eine bestimmte " "Warteschlange dazu führen, dass das Pakete direkt in diese Distribution " "gestellt wird." #. type: =item #: debarchiver.pod:205 msgid "B<$gpgkey>" msgstr "B<$gpgkey>" #. type: textblock #: debarchiver.pod:207 msgid "" "The GnuPG key to use to sign the archive. If this variable is set, the " "Release file for each changed section of the archive will be signed with " "GnuPG using $gpgkey as the key ID. Unless you use a key that has no " "passphrase or use $gpgpassfile, you will need to run B " "interactively when using this option so that you can supply the passphrase." msgstr "" "GunPG-Schlüssel, der zum Signieren des Archivs verwandt wird. Falls diese " "Variable gesetzt ist, wird eine Release-Datei für jeden geänderten Bereich " "des Archivs durch GnuPG mit $gpgkey als die Schlüssel-ID unterschrieben. " "Sofern Sie nicht einen Schlüssel ohne Passphrase oder $gpgpassfile " "verwenden, müssen Sie B bei Verwendung dieser Option interaktiv " "ausführen, so dass Sie die Passphrase verwenden können." #. type: =item #: debarchiver.pod:209 msgid "B<$gpgpassfile>" msgstr "B<$gpgpassfile>" #. type: textblock #: debarchiver.pod:211 msgid "" "The file that contains the passphrase for the GnuPG key. See $gpgkey for " "more information." msgstr "" "Die Datei, die die Passphrase für den GnuPG-Schlüssel enthält. Siehe $gpgkey " "für weitere Informationen." #. type: =item #: debarchiver.pod:214 msgid "B<$ignoredestcheck>" msgstr "B<$ignoredestcheck>" #. type: textblock #: debarchiver.pod:216 msgid "" "Force install of .changes file even if some files specified in the .changes " "file already exist with wrong size or md5 hash. Default to 0 (do not ignore)." msgstr "" "Erzwinge Installation der .changes-Dateien, selbst falls einige in der ." "changes-Datei angegebenen Dateien bereits mit falscher Größe oder md5-" "Prüfsumme existieren. Standardmäßig 0." #. type: =item #: debarchiver.pod:218 msgid "B<$incompletetime>" msgstr "B<$incompletetime>" #. type: textblock #: debarchiver.pod:220 msgid "" "Time to allow .changes files to be incomplete in seconds. Useful for slow " "uploads. The default is 24 hours." msgstr "" "Zeit, die .changes-Dateien unvollständig sein dürfen, in Sekunden. Nützlich " "für langsame Hochladevorgänge. Standardmäßig 24 Stunden." #. type: =item #: debarchiver.pod:223 msgid "B<$inputdir>" msgstr "B<$inputdir>" #. type: textblock #: debarchiver.pod:225 msgid "The input directory (no effect in $inputconfigfile)." msgstr "Das Eingabeverzeichnis (kein Effekt in $inputconfigfile)" #. type: =item #: debarchiver.pod:227 msgid "B<$lockfile>" msgstr "B<$lockfile>" #. type: =item #: debarchiver.pod:231 msgid "B<@mailtos>" msgstr "B<@mailtos>" #. type: textblock #: debarchiver.pod:233 msgid "" "An array of strings that will receive emails. If the string contains an " "email address that one is used. If it contains an incomplete email address, " "i.e. @hostname, the username owning the file is used @ the hostname " "specified. If no '@' character is found in the string, it is considered as a " "field in the .changes file. Such a field can for example be Maintainer or " "Uploaders." msgstr "" "Ein Feld von Zeichenketten, an die E-Mails geschickt werden sollen. Falls " "die Zeichenkette eine E-Mail-Adresse enthält, wird diese verwandt. Falls sie " "eine unvollständige E-Mail-Adresse enthält, d.h. @Rechnername, dann wird der " "Benutzername des Eigentümers vor dem @ beim Rechnernamen verwandt. Falls " "kein »@«-Zeichen in der Zeichenkette gefunden wird, wird es als Feld in der ." "changes-Datei angesehen. Solch ein Feld kann zum Beispiel »Maintainer« oder " "»Uploaders« sein." #. type: =item #: debarchiver.pod:235 msgid "B<$mailformat>" msgstr "B<$mailformat>" #. type: textblock #: debarchiver.pod:237 msgid "The format to use to send emails (see --mailformat above)." msgstr "" "Das Format, in dem E-Mails versandt werden sollen (siehe --mailformat oben)" #. type: =item #: debarchiver.pod:239 msgid "B<$mailfrom>" msgstr "B<$mailfrom>" #. type: textblock #: debarchiver.pod:241 msgid "Specifies the sender of emails. The default is none (\"\")" msgstr "Spezifiziert den Absender von E-Mails. Standardmäßig keiner (\"\")" #. type: =item #: debarchiver.pod:243 msgid "B<$majordefault>" msgstr "B<$majordefault>" #. type: textblock #: debarchiver.pod:245 msgid "Default major section (see --majordefault above)." msgstr "Standardmäßiger Hauptbereich (siehe --majordefault oben)" #. type: =item #: debarchiver.pod:247 msgid "B<$movecmd>" msgstr "B<$movecmd>" #. type: textblock #: debarchiver.pod:249 msgid "The move command (see --movecmd)." msgstr "Der Verschiebe-Befehl (siehe --movecmd)" #. type: =item #: debarchiver.pod:251 msgid "B<%release>" msgstr "B<%release>" #. type: textblock #: debarchiver.pod:253 msgid "" "Additional information to add to generated Release files. Supported keys are " "'origin', 'label', and 'description'." msgstr "" "Zusätzliche Informationen, die zu der erstellten Release-Datei hinzugefügt " "werden soll. Unterstützte Schlüssel sind »origin«, »label« und »description«." #. type: =item #: debarchiver.pod:255 msgid "B<$rmcmd>" msgstr "B<$rmcmd>" #. type: textblock #: debarchiver.pod:257 msgid "The remove command (see --rmcmd above)." msgstr "Der Entfernungs-Befehl (siehe --rmcmd oben)" #. type: =item #: debarchiver.pod:259 msgid "B<$verifysignatures>" msgstr "B<$verifysignatures>" #. type: textblock #: debarchiver.pod:261 msgid "" "Choose to enable (1) or disable (0) signature verification for packages " "uploaded into $inputdir (not %distinputdirs)." msgstr "" "Auswahl, ob Signaturprüfung für Pakete, die nach $inputdir (nicht " "%distinputdirs) hochgeladen wurden, aktiviert (1) oder deaktiviert (0) wird." #. type: =item #: debarchiver.pod:263 msgid "B<$verifysignaturesdistinput>" msgstr "B<$verifysignaturesdistinput>" #. type: textblock #: debarchiver.pod:265 msgid "" "Choose to enable (1) or disable (2) signature verification for packages " "uploaded into %distinputdirs. This works independently from " "$verifysignatures." msgstr "" "Auswahl, ob Signaturprüfung für Pakete, die nach $inputdir %distinputdirs " "hochgeladen wurden aktiviert (1) oder deaktiviert (0) wird. Dies " "funktioniert unabhängig von $verifysignatures." #. type: =item #: debarchiver.pod:267 msgid "B<$usermailcmd>" msgstr "B<$usermailcmd>" #. type: textblock #: debarchiver.pod:269 msgid "" "It allows the user to tell debarchiver to use a specific command to send " "emails. You may also want to specify the mailformat your mail command " "handles by setting the value of the $mailformat variable. Using the --" "mailcmd option on the command line will superseed this variable." msgstr "" "Dies erlaubt es Benutzern, Debarchiver mitzuteilen, einen bestimmten Befehl " "zum Versenden von E-Mails zu verwenden. Sie sollten auch angeben, welches E-" "Mail-Format Ihr E-Mail-Befehl erwartet, indem Sie den Wert der $mailformat-" "Variablen setzen. Verwendung der Option --mailcmd auf der Kommandozeile " "überschreibt diese Variable." #. type: =head1 #: debarchiver.pod:276 msgid "PACKAGE INDEXING" msgstr "PAKETINDIZIERUNG" #. type: textblock #: debarchiver.pod:278 msgid "There are two ways to generate the indexes that B relies on." msgstr "" "Es gibt zwei Arten, die Indizes, die B benötigt, zu erstellen." #. type: textblock #: debarchiver.pod:280 msgid "" "Using B<--autoscanpackages>, B<--autoscansources>, or B<--autoscan> will use " "B and B. This will generate the " "Packages and Sources files, but will not generate Contents files and can be " "slow with a large repository." msgstr "" "Mit B<--autoscanpackages>, B<--autoscansources> oder B<--autoscan> wird " "B und B verwandt. Damit werden die " "Dateien »Packages« und »Sources« erstellt, aber nicht die Contents-Dateien. " "Dies kann bei großen Depots langsam sein." #. type: textblock #: debarchiver.pod:282 msgid "" "Alternatively, the B<--index> I option will call B " "to index the package tree. B can also generate Contents " "files (for use with B), and can optionally use a cache of package " "information to speed up multiple runs. The B configuration " "file will be generated automatically. This is however not fully tested." msgstr "" "Alternativ teilt die Option B<--index> I B mit, " "einen Index des Paketbaums anzulegen. B kann auch Contents-" "Dateien erstellen (für die Verwendung mit B) und optional einen " "Zwischenspeicher verwenden, um Mehrfachaufrufe zu beschleunigen. Die " "Konfigurationsdatei von B wird automatisch erstellt. Das " "wurde allerdings nicht vollständig getestet." #. type: textblock #: debarchiver.pod:284 msgid "" "You should use either B<--autoscanpackages> and B<--autoscansources> or B<--" "index>, not both, as they do basically the same thing." msgstr "" "Sie sollten entweder B<--autoscanpackages> und B<--autoscansources> oder B<--" "index> verwenden, aber nicht beide, da sie im Wesentlichen das Gleiche " "erledigen." # FIXME s/that probe/that probes/ and s/and use/and uses/ #. type: textblock #: debarchiver.pod:286 msgid "" "The default action (and the recommended) is B<--scandetect> that probe for " "installed software and use the best choice depending on what software you " "have installed (chooses between --index and --autoscan right now)." msgstr "" "Die (empfohlene) Standardaktion ist B<--scandetect>, die auf installierte " "Software testet und die beste Wahl trifft, abhängig von der von Ihnen " "installierten Software (wählt direkt zwischen »--index« und »--autoscan«)." #. type: =head1 #: debarchiver.pod:288 msgid "REJECT" msgstr "ABLEHNUNGEN" #. type: verbatim #: debarchiver.pod:290 #, no-wrap msgid "" "Changes files are rejected in the following conditions:\n" " * A file that is about to be installed already exist in the archive and is not identical to the one that is about to be installed.\n" " * Changes file is incomplete and has been there for $incompletetime time.\n" " * A file that is part of the Changes file is not yet big enough and the changes file has been there for $incompletetime time.\n" " * A file that is part of the Changes file is bigger than specified.\n" " * Verify signatures is enabled and signature do not match.\n" "\n" msgstr "" "Unter den folgenden Bedingungen werden Changes-Dateien abgelehnt:\n" " * Eine Datei, die installiert werden soll, existiert bereits im Archiv und ist nicht mit der zu installierenden identisch.\n" " * Eine Changes-Datei ist unvollständig und liegt bereits die Zeit $incompletetime dort.\n" " * Eine Datei, die Teil einer Changes-Datei ist, ist noch nicht groß genug und liegt bereits die Zeit $incompletetime dort.\n" " * Eine Datei, die Teil einer Changes-Datei ist, ist größer als angegeben.\n" " * »verify signatures« ist aktiviert und die Signaturen passen nicht.\n" #. type: =head1 #: debarchiver.pod:297 msgid "FILES" msgstr "DATEIEN" #. type: textblock #: debarchiver.pod:299 msgid "B" msgstr "B" #. type: =head1 #: debarchiver.pod:301 msgid "SEE ALSO" msgstr "SIEHE AUCH" #. type: textblock #: debarchiver.pod:303 msgid "B(1)" msgstr "B(1)" #. type: =head1 #: debarchiver.pod:305 msgid "AUTHOR" msgstr "AUTOR" #. type: textblock #: debarchiver.pod:307 msgid "Ola Lundqvist " msgstr "Ola Lundqvist " # type: textblock # FIXME apt-ftparchive to generate #~ msgid "" #~ "Automatically run apt-ftparchive after all new packages are installed. " #~ "config must be an absolute path to the configuration file to use for apt-" #~ "ftparchive generate. See the apt-ftparchive manual page for more " #~ "information. Use this *or* --autoscan, not both." #~ msgstr "" #~ "Automatisch Apt-ftparchive nach der Installation aller neuen Pakete " #~ "ausführen. Konfiguration muss ein absoluter Pfad zu der " #~ "Konfigurationsdatei sein, die für die Erstellung von Apt-ftparchive " #~ "verwandt werden soll. Lesen Sie die Handbuchseiten von Apt-ftparchive für " #~ "weitere Informationen. Verwenden Sie dies *oder* --autoscan, nicht beide." debarchiver-0.10.0/po4a/po4a.cfg0000664000000000000000000000027111655555412013136 0ustar [po4a_langs] fr de [po4a_paths] po/debarchiver.pot $lang:po/$lang.po [type: pod] ./debarchiver.pod $lang:./debarchiver.$lang.pod add_fr:./debarchiver.add.fr add_de:./debarchiver.add.de debarchiver-0.10.0/po4a/debarchiver.add.de0000664000000000000000000000067211655555365015145 0ustar PO4A-HEADER:mode=after;position=AUTOR;beginboundary=\=head1 =head1 ÜBERSETZUNG Diese Übersetzung wurde 2011 von Helge Kreutzmann erstellt. Sie unterliegt der GNU GPL Version 2 (oder neuer). Um die englische Originalversion zu lesen, geben Sie »man -L C BEFEHL« ein. Fehler in der Übersetzung melden Sie bitte über die Fehlerdatenbank (BTS) von Debian oder indem Sie eine E-Mail an B schreiben. debarchiver-0.10.0/po4a/debarchiver.add.fr0000664000000000000000000000102411655555517015153 0ustar PO4A-HEADER:mode=after;position=AUTEUR;beginboundary=\=head1 =head1 TRADUCTION Valéry Perrin le 23 février 2005. Dernière mise à jour le 5 novembte 2011. L'équipe de traduction a fait le maximum pour réaliser une adaptation française de qualité. La version anglaise la plus à jour de ce document est toujours consultable via la commande S<« man -L en debarchiver »>. N'hésitez pas à signaler à l'auteur ou au traducteur, selon le cas, toute erreur dans cette page de manuel. =cut debarchiver-0.10.0/po4a/Makefile0000664000000000000000000000365311655555526013267 0ustar # # Copyright (C) 2000-2008 Ola Lundqvist # # 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., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301 USA. export DDATE=`LANG=C date` all: debarchiver.1.gz debarchiver.fr.1.gz debarchiver.de.1.gz debarchiver.pod: podselect ../src/debarchiver.pl > $@ debarchiver.fr.pod: po4a -L UTF-8 -A UTF-8 po4a.cfg debarchiver.de.pod: po4a -L UTF-8 -A UTF-8 po4a.cfg debarchiver.1: debarchiver.pod pod2man --center="Debarchiver" \ --section=1 \ --release="Debarchiver " \ --date="$(DDATE)" \ $^ > $@ debarchiver.fr.1: debarchiver.fr.pod pod2man --utf8 \ --center="Debarchiver" \ --section=1 \ --release="Debarchiver " \ --date="$(DDATE)" \ $^ > $@ debarchiver.de.1: debarchiver.de.pod pod2man --utf8 \ --center="Debarchiver" \ --section=1 \ --release="Debarchiver " \ --date="$(DDATE)" \ $^ > $@ %.1.gz: %.1 gzip -9 -c $^ > $@ install: mkdir -p $(DESTDIR)/usr/share/man/man1 install -m644 debarchiver.1.gz \ $(DESTDIR)/usr/share/man/man1 mkdir -p $(DESTDIR)/usr/share/man/fr/man1 install -m644 debarchiver.fr.1.gz \ $(DESTDIR)/usr/share/man/fr/man1/debarchiver.1.gz mkdir -p $(DESTDIR)/usr/share/man/de/man1 install -m644 debarchiver.de.1.gz \ $(DESTDIR)/usr/share/man/de/man1/debarchiver.1.gz clean: -rm -f *.pod -rm -f *.1.gz -rm -f *.1 debarchiver-0.10.0/src/0000775000000000000000000000000012241231557011527 5ustar debarchiver-0.10.0/src/Makefile0000664000000000000000000000164711173250426013176 0ustar # # Copyright (C) 2000-2008 Ola Lundqvist # # 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., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301 USA. all: install: mkdir -p $(DESTDIR)/usr/bin install -m755 debarchiver.pl $(DESTDIR)/usr/bin/debarchiver mkdir -p $(DESTDIR)/usr/lib/debarchiver/signhelper clean: debarchiver-0.10.0/src/debarchiver.pl0000775000000000000000000033131712241231360014345 0ustar #!/usr/bin/perl # # This program reads a config file, traverse through all .changes files # in the specified directory and puts the files into the right place. # # Copyright (C) 2000-2013 Ola Lundqvist # Copyright (C) 2013 Uditha Atukorala # Copyright (C) 2011 Helge Kreutzmann # Copyright (C) 2010 Mats Erik Andersson # Copyright (C) 2009 Franck Joncourt # Copyright (C) 2004,2008 Michael Rash # Copyright (C) 2007 Turbo Fredriksson # Copyright (C) 2004-2005 Russ Allbery # Copyright (C) 2005 Joel Baker # Copyright (C) 2005 Daniel Leidert # Copyright (C) 2005 Bob Proulx # Copyright (C) 2005-2006 Valry Perrin # Copyright (C) 2006 Yaroslav Halchenko # Copyright (C) 2006 Jrmy Bobbio # Copyright (C) 2006 Michael Hanke # Copyright (C) 2006 Martin F Krafft # Copyright (C) 2006 Hkon Stordahl # # 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., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301, USA. # ############################################################################### ############################ REQUIRE ########################################## ############################################################################### # Require autoloader require AutoLoader; *AUTOLOAD = \&AutoLoader::AUTOLOAD; ############################################################################### ############################# USES ############################################ ############################################################################### use IPC::Open3; use File::Spec; use Symbol qw(gensym); use Digest::MD5; use File::Path qw(mkpath); use OpaL::action qw(pdebug action cmdaction setDebugLevel setQuitLevel setErrorHandler); use OpaL::read qw(readfile readcommand); ############################################################################### ########################### CONSTANTS ######################################### ############################################################################### # Changelog: # 2000-2004 Ola Lundqvist # Written # 2005-05-01 Ola Lundqvist # Bug fix for bzip2 support. # 2005-05-06 Daniel Leidert # Add setting to enable/disable signature checking in distinput-dirs. # 2005-09-09 Ola Lundqvist # Support for gpg password file. # 2005-09-15 Daniel Leidert # Fix regarding $gpgpassfile. # 2005-10-08 Ola Lundqvist # Now invokes a helper program to sign the files. It may be implemented # by some perl module but this solution was good enough. # 2005-10-11 Daniel Leidert # Removed fix regarding $gpgpassfile (moved to checks below). # 2005-10-12 Daniel Leidert # Fix signcmd default. # 2005-10-14 Daniel Leidert # Remove signcmd variable. # 2007-10-09 Turbo Fredriksson # Allow forcing an install of an upload (i.e., ignore existing files in # destdir). # 2007-10-09 Ola Lundqvist # Changed force option to ignoredestcheck option. # 2009-03-16 Franck Joncourt # Added usermailcmd, mailsearch, usermailcmd and cmds. Removed mailcmd. $mailformat = ""; @mailsearch = (); $usermailcmd = ''; %cmds = (); $cmds{'sendmail'} = "sendmail"; $cmds{'mail'} = "mail"; $copycmd = "cp -af"; $rmcmd = "rm -f"; $movecmd = "mv"; $vrfycmd = "dscverify"; $cachedir = "/var/cache/debarchiver"; $inputdir = "/var/lib/debarchiver/incoming"; $destdir = "/var/lib/debarchiver/dists"; $cinstall = "installed"; $lockfile = "debarchiver.lock"; $etcconfigfile = "/etc/debarchiver.conf"; $inputconfigfile = "input.conf"; $verifysignatures = 0; $verifysignaturesdistinput = 0; $userconfigfile = "$ENV{HOME}/.debarchiver.conf"; $bzip = 0; $gpgpassfile = "$ENV{HOME}/.gnupg/passphrase"; ############################################################################### ########################## DECLARATION ######################################## ############################################################################### # Changelog: # 2000-2004 Ola Lundqvist # Written # 2007-10-08 Ola Lundqvist # Updated with new options. # 2007-10-09 Ola Lundqvist # Changed force option to ignoredestcheck option. # 2013-11-14 Ola Lundqvist # Introduced DMeta for pure Deb only cases. # Indexed by config name. %CConf = (); # Indexed by meta type. %CMeta = (); # Indexed by meta type. %DMeta = (); # Indexed by file name. %CFiles = (); # Indexed by package name. %CDesc = (); # Just a string describing what has changed. $CChanges = ""; # Destination directories that should be scanned. %dests = (); # Information to add to Release files. %release = (); # The criteria to use for which binary packages that does not need a .changes # file. $distinputcriteria = "^linux.*\\.deb\$"; # Extra directories with specified destination. Where to find for distinput # files. %distinputdirs = ( 'stable' => 'stable', 'testing' => 'testing', 'unstable' => 'unstable' ); @distributions = ('stable', 'testing', 'unstable'); %distmapping = ( 'stable' => 'lenny', 'testing' => 'squeeze', 'unstable' => 'sid' ); @architectures = ('i386'); @sections = ('main', 'contrib', 'non-free'); # Default major $majordefault = 'main'; @mailtos = (); $mailfrom = ""; @ARGS1 = @ARGV; @ARGS2 = (); $incompletetime = 24*60*60; $sortpackages = 1; $fixstructure = 1; $ignoredestcheck = 0; $errorarea = ""; ############################################################################### ############################# ARGS ############################################ ############################################################################### # Changelog: # 2000-2004 Ola Lundqvist # Written # 2005-10-08 Ola Lundqvist # Added the possibility to specify a config file on command line. # Inspired by a patch from Alexander Wirt . while ($_ = shift @ARGS1) { if (/^-[a-zA-Z0-9]/) { if (length($_) > 1) { s/^-//; foreach $_ (split /(.)/, $_) { if (length($_) > 0) { @ARGS1 = ("-$_", @ARGS1); } } $_ = shift @ARGS1; } else { pdebug(2, "Unknown option $_."); } } if (/^-/) { if (/^--dl$/ || /^--debug-level$/) { setDebugLevel(shift @ARGS1); } elsif (/^--ql$/ || /^--quit-level$/) { setQuitLevel(shift @ARGS1); } elsif (/^--configfile$/) { $cmdlineconfigfile = shift @ARGS1; } elsif (/^-i$/ || /^--input$/ || /^--indir$/ || /^--inputdir$/) { $inputdir = shift @ARGS1; $inputdir =~ s/\/$//; } else { push @ARGS2, $_; } } else { push @ARGS2, $_; } } ############################################################################### ############################ CONFIG ########################################### ############################################################################### # Changelog: # 2000-2004 Ola Lundqvist # Written # 2005-10-08 Ola Lundqvist # Added the possibility to specify a config file on command line. # Inspired by a patch from Alexander Wirt . # 2007-08-14 Ola Lundqvist # Changed severity level for configuration file problems from info # to warning, so that it is displayed in the normal case. if (-e $etcconfigfile) { my $t = do $etcconfigfile; unless ($t) { pdebug(3, "Loading config file $etcconfigfile:\n\t$!\n\t$@"); } } if (-e $userconfigfile) { my $t = do $userconfigfile; unless ($t) { pdebug(3, "Loading config file $userconfigfile:\n\t$!\n\t$@"); } } if (-e $cmdlineconfigfile) { my $t = do $cmdlineconfigfile; unless ($t) { pdebug(3, "Loading config file $cmdlineconfigfile:\n\t$!\n\t$@"); } } ############################################################################### ######################### INPUT CONFIG ######################################## ############################################################################### # Changelog: # 2000-2004 Ola Lundqvist # Written # 2007-08-14 Ola Lundqvist # Changed severity level for configuration file problems from info # to warning, so that it is displayed in the normal case. action(! chdir $inputdir, "Change to dir $inputdir", 2); if (-e $inputconfigfile) { my $t = do $inputconfigfile; unless ($t) { pdebug(3, "Loading config file $inputconfigfile:\n\t$!\n\t$@"); } } ############################################################################### ############################# CHECKS ########################################## ############################################################################### # Changelog: # 2005-10-11 Daniel Leidert # Written if ($gpgpassfile) { $gpgpassfile = "" if (! -f $gpgpassfile); } else { $gpgpassfile = ""; } ############################################################################### ############################# HELP ############################################ ############################################################################### # Changelog: # 2000-2004 Ola Lundqvist # Written # 2005-09-09 Ola Lundqvist # Added information about gpg support. # 2005-10-08 Ola Lundqvist # Added the possibility to specify a config file on command line. # Inspired by a patch from Alexander Wirt . # Now invokes a helper program to sign the files. It may be implemented # by some perl module but this solution was good enough. # 2005-10-14 Daniel Leidert # Removed signcmd. # 2006-02-25 Yaroslav Halchenko and # Ola Lundqvist # Default major section function. # 2006-11-28 Ola Lundqvist # Sorted options in alphabetical order. # 2007-10-08 Ola Lundqvist # Make it possible to specify mail sender. # 2007-10-09 Turbo Fredriksson # Allow forcing an install of an upload (i.e., ignore existing files in # destdir). # 2007-10-09 Ola Lundqvist # Changed force option to ignoredestcheck option. # 2009-03-16 Franck Joncourt # Modified mailcmd and added mailformat option. # 2009-03-16 Ola Lundqvist # Changed to version 0.9. # 2011-11-02 Ola Lundqvist # Improved english lanauge. # 2013-11-13 Ola Lundqvist # Changed to version 0.10. $version = "0.10"; $versionstring = "Debian package archiver, version $version"; $help = "Usage: debarchiver [option(s)] options: -a | --autoscan - Does both --autoscanpackages and --autoscansources. Use this *or* --index, not both. --autoscanall - Same as --scanall --autoscan. --autoscanpackages - Automaticly run dpkg-scanpackages after all new packages are installed. --autoscansources - Automaticly run dpkg-scansources after all new packages are installed. -b | --bzip - Create bzip2 compressed Packages.bz2 and Sources.bz2 files. --cachedir dir - The apt-ftparchive package cache directory to use if --index is used. Default \"/var/cache/debarchiver\". --cinstall dir - Where the .changes file will be installed to. Use the empty string to remove the .changes file instead. The default is \"installed\". --configfile file - Specifies an extra configuration file to read. Will be read after etc configuration and after user configuration files. --copycmd - The install command to use where the default is \"cp -af\". Both packages and .changes files are installed using this command. -d | --dest dir - Destination directory. The base directory where all --destdir dir the distribution packages will reside and where the \$distrib/\$major/\$arch/\$section directory structure will be created. The default is /var/lib/debarchiver/dists. --debug-level level - What information that should be printed. --dl level 1 = critical, 2 = error, 3 = normal, 4 = message, 5 = debug, 6 = verbose debug (modules). --distinputcriteria - The criteria for what binary packages should be installed even they do not have a .changes file. The default criteria is \"^linux.*\\.deb\$\". --gpgkey - The GnuPG key to use to sign the archive. --gpgpassfile - The file that provides the password to GnuPG. --help - Prints this information. -i | --input dir - This is the directory where debarchiver will look for --indir dir new package versions and corresponding *.changes files that --inputdir dir should be installed to the --dest directory. The default directory is /var/lib/debarchiver/incoming. --ignoredestcheck - Force install of .changes file even if some files specified in the .changes file already exists with wrong size or md5 hash. --index | -x - Automatically run apt-ftparchive after all new packages are installed. Use this *or* --autoscan, not both. --incompletetime - The time to allow .changes file to be incomplete in seconds. The default is 24 hours. --instcmd - DEPRICATED! --lockfile file - The lockfile to use. The default is \"debarchiver.lock\". --mailcmd - The mail command to use. The default is to use the \"sendmail\" command. --mailformat format - Defines the format to be used to send emails. It should correspond to the format used by the command specified by --mailfrom. Only 'sendmail' and 'mail' formats are supported. By default debarchiver assumes 'sendmail' format. The format argument can be one of the following: sendmail = use of the sendmail format mail = use of the mail format --mailfrom - Specifies mail sender. --majordefault section - The default major section to use. The default is 'main'. --movecmd - Command used to move files (currently not used at all). --nosort - Do not sort packages. --nostructurefix - Do not create directories and touch 'Package' files. -o | --addoverride - Automaticly add new packages to the override file. --quit-level level - On what level to quit the application. See debug level for further information. --rmcmd - The remove command to use. The default is \"rm -f\". This can be used to move away the old packages to some other place. --scanall - Scan all distributions, sections, etc. --scandetect | -s - Scan using 'apt-ftparchive' or 'dpkg-scan*' (dpkg-scanpackages and dpkg-scansources) depending on what is installed on the system. This is the recommended way. Only use --index or --autoscan if you know what you are doing. --scanonly - Same as --nosort --nostructurefix. -v | --version - Prints the version string. You can also place configuration files with the following names (in the following order) /etc/debarchiver.conf, ~/.debarchiver.conf and input.conf (relative to input dir), that will be read before the arguments to this program will be parsed. In the above files you can change the following variables: \$bzip2 - If set to 0 no bzip2 files will be generated. If set to 1 bzip2 files will be generated. \$cachedir - The cache directory for apt-ftparchive used if --index is used. \$cinstall - Where the .changes files are installed (see --cinstall above). \$copycmd - The install command (see --copycmd). \$destdir - The destination directory (see --destdir above). \$distinputcriteria - The criteria for which packages that should be installed even if it does not have a .changes file. The default is \"^linux.*\\.deb\$\". \%distinputdirs - The directories (distribution => dir) that should be searched for extra binary packages that does not need a .changes file to be installed but match \$distinputcriteria. \$gpgkey - The GnuPG key to use to sign the archive. \$gpgpassfile - The file that will provide the password to GnuPG. \$inputdir - The input directory (no effect in \"input.conf\"). \$ignoredestcheck - Force install of .changes file even if some files specified in the .changes file already exists with wrong size or md5 hash. The default is 0 (do not ignore). \$incompletetime - The time to allow .changes file to be incomplete in seconds. The default is 24 hours. \$lockfile - The lockfile to use. The default is \"debarchiver.lock\". \$mailformat - The format to use to send emails (see --mailformat above). \$mailfrom - Specify the mail sender. \@mailtos - The fields in .changes file that should be used for mailing SUCCESS and REJECT messages. If there is an @ char in the array that address will be used directly. \$majordefault - Default major section (see --majordefault above). \$movecmd - The move command (see --movecmd). \%release - Additional information to add to generated Release files. Supported keys are 'origin', 'label', and 'description'. \$rmcmd - The remove command (see --rmcmd above). \$usermailcmd - It allows the user to tell debarchiver to use a specific command to send emails. You may also want to specify the mailformat your mail command handles by setting the value of the \$mailformat variable. Using the --mailcmd option on the command line will superseed this variable. "; ############################################################################### ############################# ARGS ############################################ ############################################################################### # Changelog: # 2000-2004 Ola Lundqvist # Written # 2005-05-01 Daniel Leidert # Added bzip2 support. # 2005-09-09 Ola Lundqvist # Added options for gpg signing support. # 2006-02-25 Yaroslav Halchenko and # Ola Lundqvist # Default major section function. # 2007-10-09 Turbo Fredriksson # Allow forcing an install of an upload (i.e., ignore existing files in # destdir). # 2007-10-09 Ola Lundqvist # Changed force option to ignoredestcheck option. while ($_ = shift @ARGS2) { if (/^-[a-zA-Z0-9]/) { if (length($_) > 1) { s/^-//; foreach $_ (split /(.)/, $_) { if (length($_) > 0) { @ARGS1 = ("-$_", @ARGS1); } } $_ = shift @ARGS1; } else { pdebug(2, "Unknown option $_."); } } if (/^-/) { if (/^-v$/ || /^--version$/) { print("$versionstring\n"); exit(0); } elsif (/^--help$/) { print($help); exit(0); } elsif (/^--copycmd$/) { $copycmd = shift @ARGS2; } elsif (/^--movecmd$/) { $movecmd = shift @ARGS2; } elsif (/^--mailcmd$/) { $usermailcmd = shift @ARGS2; } elsif (/^--mailformat$/) { $mailformat = shift @ARGS2; } elsif (/^--mailfrom$/) { $mailfrom = shift @ARGS2; } elsif (/^--incompletetime$/) { $incompletetime = shift @ARGS2; } elsif (/^--rmcmd$/) { $rmcmd = shift @ARGS2; } elsif (/^-d$/ || /^--destdir$/ || /^--dest$/) { $destdir = shift @ARGS2; $destdir =~ s/\/$//; } elsif (/^--majordefault$/) { $majordefault = shift @ARGS2; $majordefault =~ s/\/$//; } elsif (/^--cachedir$/) { $cachedir = shift @ARGS2; } elsif (/^--lockfile$/) { $lockfile = shift @ARGS2; } elsif (/^--cinstall$/) { $cinstall = shift @ARGS2; $cinstall =~ s/\/$//; } elsif (/^-o$/ || /^--addoverride$/) { $addoverride = 1; } elsif (/^--gpgkey$/) { $gpgkey = shift @ARGS2; } elsif (/^--gpgpassfile$/) { $gpgpassfile = shift @ARGS2; } elsif (/^--autoscanpackages$/) { $autoscanpackages = 1; } elsif (/^--autoscansources$/) { $autoscansources = 1; } elsif (/^-a$/ || /^--autoscan$/) { $autoscanpackages = 1; $autoscansources = 1; } elsif (/^-x$/ || /^--index$/) { $indexall = 1; } elsif (/^-s$/ || /^--scandetect$/) { if (-x "/usr/bin/apt-ftparchive") { $indexall = 1; } else { if (-x "/usr/bin/dpkg-scansources") { $autoscansources = 1; } if (-x "/usr/bin/dpkg-scanpackages") { $autoscanpackages = 1; } } } elsif (/^-b$/ || /^--bzip$/) { $bzip = 1; } elsif (/^--distinputcriteria/) { $distinputcriteria = shift @ARGS2; } elsif (/^--scanall$/) { $scanall = 1; } elsif (/^--autoscanall$/) { $scanall = 1; $autoscanpackages = 1; $autoscansources = 1; } elsif (/^--scanonly$/) { undef $sortpackages; undef $fixstructure; } elsif (/^--ignoredestcheck$/) { $ignoredestcheck = 1; } elsif (/^--nosort$/) { undef $sortpackages; } elsif (/^--nostructurefix$/) { undef $fixstructure; } else { pdebug(2, "Unknown option $_\n"); } } else { pdebug(2, "Unknown option $_\n"); } } &check_mailconfig(); &check_commands({}, {}); ############################################################################### ############################# START ########################################### ############################################################################### ############################################################################### # Now create the directory structure and files that are needed. ############################################################################### handleStructureFix(); ############################################################################### # Fix so that it scan all distributions, sections and so on. ############################################################################### if (defined $scanall) { handleScanAll(); } ############################################################################### # Sort packages. ############################################################################### handleSorting(); if (defined $indexall) { handleIndex(); } else { handleScan(); } ############################################################################### ########################### FUNCTIONS ######################################### ############################################################################### ############################################################################### # Name: createPF # Description: Create the directory and file if it does not exist, # including the .gz file. # Arguments: directory, filename # Changelog: # 2001-07-14 Ola Lundqvist # Written. ############################################################################### sub createPF($$) { my ($dir, $file) = @_; if (! -d "$dir") { action(! mkpath($dir, 0, 0755), "Create directory $dir", 2); } if (! -e "$dir/$file") { cmdaction("touch $dir/$file", "Create file $dir/$file.", 2); } if (! -e "$dir/${file}.gz") { cmdaction("gzip -c $dir/$file > $dir/${file}.gz", "Create file $dir/$file.gz from $dir/$file.", 3); } } ############################################################################### # Name: createRelease # Description: Create a Release file. # Arguments: directory, distribution, section, architecture # Uses: %release # Changelog: # 2004-08-09 Ola Lundqvist # Written. # 2004-08-10 Ola Lundqvist # Renamed $release to $contents. Don't generate if any under a symlink. ############################################################################### sub createRelease($$$$) { my ($dir, $distribution, $section, $architecture) = @_; my $contents = ''; $contents .= "Archive: $distribution\n"; $contents .= "Component: $section\n"; $contents .= "Label: $release{label}\n" if defined $release{label}; $contents .= "Origin: $release{origin}\n" if defined $release{origin}; $contents .= "Architecture: $architecture\n"; $contents .= "Description: $release{description}\n" if defined $release{description}; $contents .= "\n"; # Don't generate a Release file if any level of the directory is a symlink, # since otherwise for a testing -> unstable symlink, we'll keep regenerating # the Release file, first for testing and then for unstable. Assume that # we'll also be called with the non-symlink path and create the Release file # then. my @components = split('/', $dir); for (my $i = 0; $i < @components; $i++) { my $testdir = join ('/', @components[0..$i]); if (-l "$testdir") { return; } } # If the release file already exists, read it to see if anything has # changed. Don't recreate the file unless we're actually changing anything, # to avoid unnecessary timestamp updates. if (-e "$dir/Release") { action(! open(REL, "$dir/Release"), "Read Release file in $dir", 2); local $/; my $old = ; close REL; if ($contents ne $old) { action(! open(REL, "> $dir/Release"), "Update Release file in $dir", 2); print REL $contents; close REL; } } else { action(! open(REL, "> $dir/Release"), "Create Release file in $dir", 2); print REL $contents; close REL; } } ############################################################################### ######################### EMAIL HANDLING ###################################### ############################################################################### ############################################################################### # Name: determineMailTo # Description: Determine the address to set mail to. # Uses: %CConf, %CMeta hash. # Changelog: # 2003-02-12 Ola Lundqvist # Wrote it. # 2003-02-13 Ola Lundqvist # Extended it with @hostname calculation. # 2003-02-28 Ola Lundqvist # Added debugging information. # 2003-03-14 Ola Lundqvist # Switched to using CMeta for ChangeLog meta information. # 2003-06-10 Ola Lundqvist # Switched from direct determination of changes owner to use # precalculated data from CMeta{FileOwner}. # 2007-10-09 Turbo Fredriksson # Change in foreach to use my variable. # 2010-04-17 Mats Erik Andersson # Correction of debug for sendlist. # 2010-04-22 Ola Lundqvist # Extended the suggestion from Mats to make sure the list is properly # ordered. ############################################################################### sub determineMailTo() { my $to = ""; my %to_hash = (); foreach my $toi (@mailtos) { # Expand to email if there is no email address. if ($toi !~ /\@/) { $toi = $CConf{$toi}; } # Expand to full email address from @hostname field. if ($toi =~ /^\@/) { $toi = "$CMeta{FileOwner}$toi"; # If still the same... if ($toi =~ /^\@/) { pdebug(3, "No file owner has been determined, so email address can not be calculated."); $toi = ""; } } if ($toi !~ /^\s*$/) { if (! defined $to_hash{$toi}) { if ($to eq "") { $to = $toi; } else { $to = $to . ", " . $toi; } $to_hash{$toi} = 1; } } } chomp $to; pdebug(5, "Mail will be sent to $to."); return $to; } ############################################################################### # Name: email # Description: Send an email to persons, for package with message. # Arguments: to, package, key, message # Changelog: # 2002-09-11 Ola Lundqvist # Stub written. # 2003-02-12 Ola Lundqvist # Writen the mail sending function. # 2003-02-28 Ola Lundqvist # Added debugging information and fixed arg handling. # 2003-03-13 Ola Lundqvist # Debugged the mail command. It stalls. # 2007-10-08 Ola Lundqvist # Make it possible to specify mail sender. # 2009-03-16 Franck Joncourt # Added support for sendmail in addition to mail command format. ############################################################################### sub email($$$) { my ($toAddress, $subject, $msg) = @_; pdebug(5, "Sending mail ..."); if ( $use_sendmail && ($mailfrom eq "") ) { pdebug(5, "No sender mail address found, use of the debarchiver user instead."); } my $err=1; if ($toAddress eq "") { pdebug(3, "No recipient to send mail to."); } elsif ($subject eq "") { pdebug(3, "Empty subject"); } elsif ($msg eq "") { pdebug(3, "Empty message") } else { $err = 0; } if ($err) { pdebug(2, "No mail sent due to missing parameters"); } elsif (defined $cmds{'sendmail'}) { pdebug(4, "Use of the sendmail command: $cmds{'sendmail'}"); if (open(M, "| $cmds{'sendmail'} -t")) { print M "From: $mailfrom\n" unless ($mailfrom eq ""); print M "To: $toAddress\n", "Subject: $subject\n\n", $msg . "\n"; close(M); } else { pdebug(2, "Could not execute $cmds{'sendmail'} $!"); } } else { pdebug(4, "Use of the mail command: $cmds{'mail'}"); if (open(M, "| $cmds{'mail'} -s '$subject' '$toAddress'")) { print M $msg . "\n"; close(M); } else { pdebug(2, "Could not execute $cmds{'mail'} $!"); } } pdebug(5, "Mail exec done."); } ############################################################################### # Name: mailSuccessChanges # including the .gz file. # Uses: %CMeta and maybe %Cfiles in the future. # Changelog: # 2002-09-11 Ola Lundqvist # Written. # 2003-02-12 Ola Lundqvist # Uses CConf instead of cfile argument. # 2003-03-14 Ola Lundqvist # Switched to using CMeta for ChangeLog meta information. # 2009-03-16 Franck Joncourt # Small modification. # 2013-11-13 Ola Lundqvist # Changed name from mailSuccess to mailSuccessChanges to clarify what # situation this function is used. ############################################################################### sub mailSuccessChanges() { # We can not read that file after it has been moved! my $message = $CMeta{ChangesContent}; my $subject = "$CConf{'Source'} ACCEPTED"; my $recipient = determineMailTo(); pdebug(5, "Mail Success."); email($recipient, $subject, $message); } ############################################################################### # Name: mailSuccessDeb # Uses: $CConf{Binary}, %DMeta # Changelog: # 2013-11-13 Ola Lundqvist # Written based on mailSuccessChanges ############################################################################### sub mailSuccessDeb() { # We can not read that file after it has been moved! my $file = $DMeta{DebFile}; my $message = "$file\n". "----------------------------------------------------------------\n". "\n$DMeta{DebContent}\n"; my $subject = "$CConf{Binary} ACCEPTED"; my $recipient = determineMailTo(); pdebug(5, "Mail Success."); email($recipient, $subject, $message); } ############################################################################### # Name: mailRejectChanges # Uses: %CMeta and maybe %Cfiles in the future. # Changelog: # 2002-09-12 Ola Lundqvist # Written using data from mailSuccessChanges. # 2003-02-12 Ola Lundqvist # Uses CConf instead of cfile argument. # 2003-03-14 Ola Lundqvist # Switched to using CMeta for ChangeLog meta information. # 2007-10-08 Turbo Fredriksson # Error string in beginning and full message (+= => .=). # 2009-03-16 Franck Joncourt # Small modification. # 2013-11-06 Ola Lundqvist # Changed name from mailReject to mailRejectChanges to clarify that # it just handle changes files. ############################################################################### sub mailRejectChanges() { # We can not read that file after it has been moved! my $message; if (length($CConf{ERROR}) > 0) { $message = "ERROR:\n$CConf{ERROR}\n"; } $message .= $CMeta{ChangesContent}; my $subject = "$CConf{'Source'} REJECTED"; my $recipient = determineMailTo(); pdebug(5, "Mail Reject."); email($recipient, $subject, $message); } ############################################################################### # Name: mailRejectDeb # Uses: %DMeta # Changelog: # 2013-11-13 Ola Lundqvist # Function written based on mailRejectChanges. ############################################################################### sub mailRejectDeb() { # We can not read that file after it has been moved! my $message = "ERROR:\nIncomplete upload of $DMeta{DebFile} and older than $incompletetime seconds.\n"; my $subject = "$DMeta{DebFile} REJECTED"; my $recipient = determineMailTo(); pdebug(5, "Mail Reject."); email($recipient, $subject, $message); } ############################################################################### ########################### HANDLERS ########################################## ############################################################################### ############################################################################### # Name: handleScanAll # Description: Fix so that it scan all distributions, sections and so on. # Changes: %dests # Uses: @distributions, @sections, @architectures, $destdir. # Changelog: # 2001-07-23 Ola Lundqvist # Written. # 2007-10-09 Turbo Fredriksson # Change in foreach to use my variable. ############################################################################### sub handleScanAll() { foreach my $d (@distributions) { foreach my $s (@sections) { if (-e "$destdir/$d/$s/override") { foreach my $a (@architectures) { $dests{"$d/$s/binary-$a"} = 1; } $dests{"$d/$s/binary-all"} = 1; } if (-e "$destdir/$d/$s/override.src") { $dests{"$d/$s/source"} = 1; } } } } ############################################################################### # Name: handleScan # Description: Handles the autoscan. # Uses: %dests, $destdir, # $autoscanpackages, $autoscansources. # Changes: $ENV{PWD} # Changelog: # 2001-06-26 Ola Lundqvist # Written. # 2001-07-23 Ola Lundqvist # Added lockfile check to distr directory. # Improved documentation. # 2002-01-22 Ola Lundqvist # Moved lock file checking to its own function. # 2003-02-12 Ola Lundqvist # Now redirects stderr to stdout for # dpkg-scan* so that it can be logged. # 2005-05-01 Daniel Leidert # Modified to add bzip2 support. # 2005-05-02 Ola Lundqvist # Bugfix for bzip2 support. ############################################################################### sub handleScan() { if (defined $autoscansources || defined $autoscanpackages) { $destdir =~ s|/$||; action(! chdir $destdir, "Change to dir $destdir", 2); &destinationLock(); my $destddir = $destdir; $destddir =~ s|^.*/([^/]+)$|$1|; my $destcdir = $destdir; $destcdir =~ s|^(.*)/[^/]+$|$1|; action(! chdir $destcdir, "Change to dir $destcdir", 2); foreach $_ (keys %dests) { my $archdest = $_; $archdest = "$destddir/$archdest"; my $over = $_; $over =~ s/^(.*)\/[^\/]+$/$1/; $over = "$destddir/$over"; if ($archdest =~ /source$/ && defined $autoscansources) { cmdaction("dpkg-scansources $archdest $over/override.src 2>&1 > $archdest/Sources", "Scan source files in $archdest, $over/override.src", 3); cmdaction("gzip $archdest/Sources -c > $archdest/Sources.gz", "Gzip $archdest/Sources", 3); if ($bzip) { cmdaction("bzip2 $archdest/Sources -c > $archdest/Sources.bz2", "BZip $archdest/Sources", 3); } } elsif (defined $autoscanpackages) { cmdaction("dpkg-scanpackages $archdest $over/override 2>&1 > $archdest/Packages.gen", "Scan package files in $archdest, $over/override", 3); if ($archdest =~ /binary-all$/) { opendir DD, $over; my $d; while ($d = readdir(DD)) { if (! ($d =~ /^binary-all/) && $d =~ /^binary-/ && -d "$over/$d") { if (-f "$over/$d/Packages.gen") { cmdaction("cat $over/$d/Packages.gen $archdest/Packages.gen > $over/$d/Packages", "Concatenate packages files from binary-all and $d.", 3); } else { cmdaction("cat $archdest/Packages.gen > $over/$d/Packages", "Copy packages file from binary-all to $d.", 3); } cmdaction("gzip $over/$d/Packages -c > $over/$d/Packages.gz", "Gzip $over/$d/Packages", 3); if ($bzip) { cmdaction("bzip2 $over/$d/Packages -c > $over/$d/Packages.bz2", "BZip $over/$d/Packages", 3); } } } closedir DD; } else { if (-f "$over/binary-all/Packages.gen") { cmdaction("cat $archdest/Packages.gen $over/binary-all/Packages.gen > $archdest/Packages", "Concatenate packages files from binary-all and $d.", 3); } else { cmdaction("cat $archdest/Packages.gen > $archdest/Packages", "Copy packages file from $d.", 3); } cmdaction("gzip $archdest/Packages -c > $archdest/Packages.gz", "Gzip $archdest/Packages", 3); if ($bzip) { cmdaction("bzip2 $archdest/Packages -c > $archdest/Packages.bz2", "BZip $archdest/Packages", 3); } } } } &destinationRelease(); } } ############################################################################### # Name: findSectionsArchitectures # Description: Find sections and architectures in a distribution. # Arguments: Path to distribution directory to check, # reference to section array to fill out, # reference to architectures array to fill out # Changelog: # 2004-08-10 Ola Lundqvist # Written. # 2007-10-09 Turbo Fredriksson # Change in foreach to use my variable. ############################################################################### sub findSectionsArchitectures($\@\@) { my ($dir, $sectionlist, $archlist) = @_; my (%dirsections, %dirarches); foreach my $s (@sections) { if (-e "$dir/$s/override") { foreach my $a (@architectures) { $dirarches{$a} = 1; } $dirarches{all} = 1; $dirsections{$s} = 1; } if (-e "$dir/$s/override.src") { $dirarches{source} = 1; $dirsections{$s} = 1; } } # Do things this way so that the lists are in the same order as @sections # and @architectures. Purely aesthetic. @$sectionlist = grep { $dirsections{$_} } @sections; @$archlist = grep { $dirarches{$_} } @architectures, 'all', 'source'; } ############################################################################### # Name: generateIndexConfig # Description: Generate an apt-ftparchive configuration for the archive. # Uses: %dests, $destdir, $cachedir # Returns: Path to the generated config file # Changelog: # 2004-08-10 Ola Lundqvist # Written. # 2005-05-01 Daniel Leidert # Modified to add bzip2 support. # 2005-05-02 Ola Lundqvist # Bugfix for bzip2 support. # 2007-10-09 Turbo Fredriksson # Change in foreach to use my variable. ############################################################################### sub generateIndexConfig() { my $destcdir = $destdir; $destcdir =~ s|^(.*)/[^/]+$|$1|; my $configpath = "$destdir/.apt-ftparchive.conf"; action(! open(CONF, "> $configpath"), "Create apt-ftparchive config", 2); # The common header. print CONF "Dir {\n"; print CONF " ArchiveDir \"$destcdir\";\n"; print CONF " Cachedir \"$cachedir\";\n"; print CONF "};\n\n"; print CONF "Default {\n"; print CONF " Packages::Compress \". gzip bzip2\";\n" if ($bzip); print CONF " Sources::Compress \". gzip bzip2\";\n" if ($bzip); print CONF " Contents::Compress \". gzip\";\n"; print CONF "};\n\n"; print CONF "TreeDefault {\n"; print CONF " BinCacheDB \"cache.db\";\n"; print CONF " Release::Origin \"$release{origin}\";\n" if defined $release{origin}; print CONF " Release::Label \"$release{label}\";\n" if defined $release{label}; print CONF "};\n\n"; # The keys of %dests are all of the distribution/section/arch paths that # were modified in this run. We can have apt-ftparchive only index the # distributions that were changed, but we have to reindex the entire # distribution, since otherwise the Contents files won't be accurate. Find # all affected distributions from %dests, but then locate all sections and # architectures under there using the handleScanAll logic. Skip # distributions that are symlinks so that we don't index the same # distribution more than once. my %changedist = map { s%/.*%%; $_ => 1 } keys %dests; foreach my $d (keys %changedist) { my $codename = $distmapping{$d} || $d; next if -l "$destdir/$codename"; print CONF "Tree \"dists/$d\" {\n"; my (@dsections, @darches); &findSectionsArchitectures("$destdir/$d", \@dsections, \@darches); print CONF " Sections \"", join (' ', @dsections), "\";\n"; print CONF " Architectures \"", join (' ', @darches), "\";\n"; print CONF " Release::Suite \"$d\";\n"; print CONF " Release::Codename \"$codename\";\n"; print CONF "};\n\n"; } close CONF; return $configpath; } ############################################################################### # Name: handleRelease # Description: Handles creation of Release files via apt-ftparchive. # Arguments: Path to the directory to generate Release for # Archive suite this Release file is for # Reference to array of sections # Reference to array of architectures # Uses: %distmapping, %release, $gpgkey, $gpgpassfile # Changelog: # 2005-08-20 Russ Allbery # Written. # 2005-09-02 Joergen Haegg # Unlink Relase.gpg before creation. # 2005-09-09 Ola Lundqvist # Made it possible for gnupg to read passphrase from file. # 2005-09-15 Daniel Leidert # Fix regarding $gpgpassfile. # 2005-10-08 Ola Lundqvist # Now invokes a helper program to sign the files. It may be implemented # by some perl module but this solution was good enough. # 2005-10-14 Daniel Leidert # No longer invokes a helper program. We run gpg in batch mode without # tty to work-around old problems. # 2005-11-07 Russ Allbery # Don't set batch mode unless the passphrase is obtained from a file; # otherwise running debarchiver interactively with a signing key that # has a passphrase silently fails. ############################################################################### sub generateRelease($$\@\@) { my ($path, $suite, $dsections, $darches) = @_; my $codename = $distmapping{$suite} || $suite; # Judging from the Release file in the Debian archive, "all" and "source" # shouldn't be included. my @arches = grep { $_ ne 'all' && $_ ne 'source' } @$darches; # We can't use the same config as generate, since release wants the # variables set in a different place. my $configpath = "$path/.apt-ftparchive.conf"; action(! open(CONF, "> $configpath"), "Create apt-ftparchive Release config for $path", 2); my $prefix = 'APT::FTPArchive::Release'; print CONF "${prefix}::Origin \"$release{origin}\";\n" if defined $release{origin}; print CONF "${prefix}::Label \"$release{label}\";\n" if defined $release{label}; print CONF "${prefix}::Description \"$release{description}\";\n" if defined $release{description}; print CONF "${prefix}::Suite \"$suite\";\n"; print CONF "${prefix}::Codename \"$codename\";\n"; print CONF "${prefix}::Architectures \"", join (' ', @arches), "\";\n"; print CONF "${prefix}::Components \"", join (' ', @$dsections), "\";\n"; close CONF; # Do the generation and optional signing. unlink("$path/Release"); cmdaction("apt-ftparchive -c $configpath release $path > Release", "Generate Release file for $path", 3); cmdaction("mv Release $path/Release", "Put Release file for $path in the right location", 3); if ($gpgkey) { unlink("$path/Release.gpg"); if ($gpgpassfile) { cmdaction("cat $gpgpassfile | gpg --batch --no-tty -a -b -s -u $gpgkey " . "--passphrase-fd 0 -o $path/Release.gpg $path/Release", "Sign Release file for $path with key '$gpgkey'", 3); } else { cmdaction("gpg -a -b -s -u $gpgkey " . "-o $path/Release.gpg $path/Release", "Sign Release file for $path with key '$gpgkey'", 3); } } unlink("$configpath"); } ############################################################################### # Name: handleIndex # Description: Handles the indexing via apt-ftparchive. # Uses: %dests, $destdir # Changes: $ENV{PWD} # Changelog: # 2004-07-30 Ola Lundqvist # Written. # 2004-08-09 Ola Lundqvist # Add merging of binary-all Packages file. # 2005-05-01 Daniel Leidert # Modified to add bzip2 support and handle contents-all in a proper way. # 2005-05-02 Ola Lundqvist # Bugfix for bzip2 support. # 2005-08-20 Russ Allbery # Call generateRelease for Release file support (optionally signed). # 2007-10-09 Turbo Fredriksson # Change in foreach to use my variable. ############################################################################### sub handleIndex() { $destdir =~ s|/+$||; action(! chdir $destdir, "Change to dir $destdir", 2); &destinationLock(); my $aptconfig = &generateIndexConfig(); cmdaction("apt-ftparchive generate $aptconfig", "Index source and package files in $destdir", 3); unlink($aptconfig); # apt-ftparchive doesn't correctly combine binary-all/Packages with # binary-arch/Packages, so we have to patch it up after the fact. # apt-ftparchive reindexes the whole distribution when anything in that # distribution is touched, so find modified distributions and then touch up # the Packages files for each section and architecture under there. # # Remove binary-all/Packages after we finish with all architectures for a # section, so as to not append to Packages more than once even if we revist # the same area twice due to a symlink. my %changedist = map { s%/.*%%; $_ => 1 } keys %dests; foreach my $d (keys %changedist) { my (@dsections, @darches); &findSectionsArchitectures("$destdir/$d", \@dsections, \@darches); if (-s "$d/Contents-all") { foreach my $a (@darches) { next if ($a eq 'source' || $a eq 'all'); action(! open(ARCH, ">> $d/Contents-$a"), "Append to $d/Contents-$a", 2); action(! open(ALL, "$d/Contents-all"), "Read $d/Contents-all", 2); print ARCH ; close ALL; close ARCH; cmdaction("gzip $d/Contents-$a -c > $d/Contents-$a.gz", "Gzip merged Contents files $d/Contents-$a", 3); } } unlink("$d/Contents-all", "$d/Contents-all.gz"); foreach my $s (@dsections) { if (-s "$d/$s/binary-all/Packages") { foreach $_ (@darches) { $a = $_; next if ($a eq 'source' || $a eq 'all'); $a = "binary-$a"; action(! open(ARCH, ">> $d/$s/$a/Packages"), "Append to $d/$s/binary-$a/Packages", 2); action(! open(ALL, "$d/$s/binary-all/Packages"), "Read $d/$s/binary-all/Packages", 2); print ARCH ; close ALL; close ARCH; cmdaction("gzip $d/$s/$a/Packages -c > $d/$s/$a/Packages.gz", "Gzip merged Packages file $d/$s/$a/Packages", 3); if ($bzip) { cmdaction("bzip2 $d/$s/$a/Packages -c > $d/$s/$a/Packages.bz2", "Bzip merged Packages file $d/$s/$a/Packages", 3); } } } unlink("$d/$s/binary-all/Packages", "$d/$s/binary-all/Packages.gz", "$d/$s/binary-all/Packages.bz2"); } # This has to be done after we integrate the Packages files. generateRelease($d, $d, @dsections, @darches); } &destinationRelease(); } ############################################################################### # Name: findAndSortChangesFiles # Arguments: signature checking, override distribution(s) (optional) # Description: Sort packages into the right place. # Uses: parseChangesFile, verifyChangesFile, handleChangesFile # Changes: $errorarea = "sortchanges" # Changelog: # 2005-05-01 Ola Lundqvist # Written using parts of handleSorting. # Improved changes file verification structure. # 2005-05-06 Daniel Leidert # Add arg to handle signature verification in inputdir and distinput-dirs # independetly. # 2006-11-24 Håkon Stordahl # Substituted the call to rejectChangesFile with a call to pdebug, # to explicitly trigger the error handler incomingError, which # itself contains a call to rejectChangesFile. This is in order # to avoid a situation in which an error in rejectChangesFile # causes rejectChangesFile to be called again. # 2013-11-06 Ola Lundqvist # Added $errorarea = sortchanges so the error handler know what area # of processing being done. ############################################################################### sub findAndSortChangesFiles($;$) { my ($verify, $override) = @_; opendir(D, "."); $errorarea = "sortchanges"; my $found = 1; my $cfile; # Loop again to make sure that no new .changes files have been uploaded. while ($found) { # go through all .changes files: $found = 0; while($cfile = readdir(D)) { # Only .changes files. if ($cfile =~ /\.changes$/) { parseChangesFile($cfile); uploaderIsChangesFileOwner($cfile); my ($verify, $reason) = verifyChangesFile($cfile, $verify); if ($verify =~ /^reject$/) { # Reject .changes file by calling pdebug with error # level 2, which in turn calls the error handler # for this function, incomingError, which calls # rejectChangesFile. pdebug(2, "Rejecting $cfile."); } elsif ($verify =~ /^incomplete$/) { # Handle incomplete .changes file. } else { # Changes file verified. $CConf{Distribution} = $override if ($override !~ /^\s*$/); handleChangesFile($cfile); $found = 1; } } } } closedir(D); } ############################################################################### # Name: handleSorting # Description: Sort packages into the right place. # Uses: A lot. # Changelog: # 2001-07-23 Ola Lundqvist # Moved from START section to this subprocedure. # 2005-04-xx Bob Proulx # Added support for .changes files in distinputdir. # 2005-04-30 Ola Lundqvist # Modified support for .changes files in distinput dir. # 2005-05-01 Ola Lundqvist # Broke out .changes file handling to a separate function # findAndSortChangesFiles. # 2005-05-06 Daniel Leidert # Add signature checking setting to arguments given to # findAndSortChangesFiles(). # 2007-10-09 Turbo Fredriksson # Change in foreach to use my variable. # 2013-11-06 Ola Lundqvist # Broke out the deb only handling into its own function. ############################################################################### sub handleSorting() { if (defined $sortpackages) { # First check if a lockfile is created. action(! chdir $inputdir, "Change to dir $inputdir", 2); &incomingLock(); # Look in the incoming directory for .changes files. findAndSortChangesFiles($verifysignatures); # Look in the incoming/ directories for either .changes # files or for plain .debs matching the dist input criteria. foreach my $dir (keys %distinputdirs) { my $inpdir = "$inputdir/$distinputdirs{$dir}"; if (-d $inpdir) { action(! chdir "$inpdir", "Change to dir $inpdir", 2); findAndSortChangesFiles($verifysignaturesdistinput, $dir); findAndSortDebFiles($dir); } } action(! chdir $inputdir, "Change to dir $inputdir", 2); &incomingRelease(); } } ############################################################################### # Name: findAndSortDebFiles # Description: Sort packages into the right place. # Uses: verifyDebFile, $distinputcriteria, handleDebOnlyFile, # pdebug. # Changes: # $errorarea = "sortdeb"; # Empties %CMeta and %DMeta # $CMeta (FileOwner) # $DMeta (DebFile) # Changelog: # 2013-11-06 Ola Lundqvist # Written based on code from handleSorting and added verification of # deb file completeness to not sort incomplete uploads. # 2013-11-13 Ola Lundqvist # Poplate %DMeta %CMeta instead of setting $rejecteddebfile. ############################################################################### sub findAndSortDebFiles($) { my ($dir) = @_; pdebug(5, "find and sort deb for $dir"); $errorarea = "sortdeb"; opendir(D, "."); my $file; while (defined($file = readdir(D))) { if ($file =~ /$distinputcriteria/) { # This is a fix for reject case. It is set again in # parseDebOnlyFile %DMeta = (); %CMeta = (); $DMeta{DebFile} = $file; $CMeta{FileOwner} = getpwuid($file); # We can add checks here to check for incomplete .changes files # se we do not sort .deb files that is a part of a .changes file. my $verify = verifyDebFile($file); if ($verify =~ /^ok$/) { handleDebOnlyFile($file, $dir); } elsif ($verify =~ /^reject$/) { pdebug(2, "Rejecting $file."); } # else incomplete, do nothing } } closedir(D); } ############################################################################### # Name: verifyDebFile # Description: Check a deb file to see that it is complete # Uses: $incompletetime, open3, File::Spec, open, gensym, dpkg -c, stat # Returns: # "ok" Complete # "reject" Incomplete and older than $incompletetime seconds. # "incomplete" Incomplete and newer than $incompletetime seconds. # Changelog: # 2013-11-06 Ola Lundqvist # Function created to check for deb file completeness. ############################################################################### sub verifyDebFile($) { my ($file) = @_; open(TMPNULL, ">", File::Spec->devnull); my $pid = open3(gensym, ">&TMPNULL", \*TMPSTDERR, "dpkg -c ".$file); while( ) { } waitpid($pid, 0); close (TMPSTDERR); close (TMPNULL); if ($? == 0) { return "ok"; } my $clastmod = (stat $file)[9]; if ($clastmod < time() - $incompletetime) { pdebug(4, "$file is incomplete and is older than $incompletetime seconds."); return "reject"; } return "incomplete"; } ############################################################################### # Name: handleStructureFix # Description: Fix the distribution directory structure. # Uses: @distributions, @sections, @architectures, $fixstructure # Changelog: # 2001-07-23 Ola Lundqvist # Moved from START section to this subprocedure. # 2004-08-09 Ola Lundqvist # Call createRelease to build Release files. # 2007-10-08 Turbo Fredriksson # Distmapping for files. ############################################################################### sub handleStructureFix() { action(! chdir $destdir, "Change to dir $destdir", 2); if (defined $fixstructure) { my ($di, $se, $ar); for $di (@distributions) { my $dis = $distmapping{$di} || $di; if (! defined($dis)) { $dis = $di; } elsif ($dis =~ /^\s*$/) { $dis = $di; } if ((! -l "$di") && $dis !~ /^$di$/) { cmdaction("ln -s $dis $di", "Symlink $dis to $di.", 2); } for $se (@sections) { if (! -d "$dis/$se/binary-all") { action(! mkpath("$dis/$se/binary-all", 0, 0755), "Create binary-all directory $dis/$se/binary-all", 2); } for $ar (@architectures) { createPF("$dis/$se/binary-$ar", "Packages"); createRelease("$dis/$se/binary-$ar", $di, $se, $ar); } createPF("$dis/$se/source", "Sources"); createRelease("$dis/$se/source", $di, $se, 'source'); if (! -e "$dis/$se/override") { cmdaction("touch $dis/$se/override", "Create file $dis/$se/override.", 2); } if (! -e "$dis/$se/override.src") { cmdaction("touch $dis/$se/override.src", "Create file $dis/$se/override.src.", 2); } } } } } ############################################################################### # Name: handleDebOnlyFile # Description: Handles installation of a deb image. # Arguments: A deb file. # The distribution to install to. # Changes: see parseKernelFile # Uses: %CFiles, parseDebOnlyFile (populates %CFiles) # Changelog: # 2001-06-29 Ola Lundqvist # Written. # 2007-10-09 Turbo Fredriksson # Change in foreach to use my variable. # 2013-11-14 Ola Lundqvist # Changed from a for loop to direct use of file name as it is always # just one file in this situation. # Also added mail support for successfully installed packages. ############################################################################### sub handleDebOnlyFile($$) { my ($kfile, $distr) = @_; parseDebOnlyFile($kfile, $distr); handlePackageFile($kfile); # Now the package is moved so now we should not use the filename # directly anymore. mailSuccessDeb(); } ############################################################################### # Name: checkFileInDestDirs # Description: Check the location of the file in the dest dirs. ############################################################################### # Uses: parseFileName # parseFileStruct # parseSection # %CConf # %CFiles # %distmapping # Arguments: # filename to check for # Returns: # filepath If file exist in dest dirs. # "" If file not found. # Changelog: # 2007-10-08 Ola Lundqvist # Write function based on the code from Turbo Fredriksson # in function verifyChangesFile below. # 2007-10-09 Turbo Fredriksson # Change in foreach to use my variable. ############################################################################### sub checkFileInDestDirs($) { my ($file) = @_; my (undef, undef, $section, undef) = parseFileStruct($CFiles{$file}); my ($major, $section) = parseSection($section); my $distrd = $CConf{Distribution}; my $inst_files = ""; foreach my $distr (split /\s+/, $distrd) { $distr = $distmapping{$distr} || $distr; my (undef, undef, $arch, undef) = parseFileName($file); my $archsec = "source"; if ($arch !~ /^source$/) { $archsec = "binary-$arch"; } my $inst_file = "$destdir/$distr/$major/$archsec/$section/$file"; if (-f "$inst_file") { if ($inst_files eq "") { $inst_files = $inst_file; } else { $inst_files .= " $inst_file"; } } } return $inst_files; } ############################################################################### # Name: getMD5HashForFile # Description: Get the MD5 hash for a file. File must exist. ############################################################################### # Uses: # Digest::MD5 # Arguments: # filename to check for # Returns: # MD5 sum for file # Changelog: # 2007-10-08 Ola Lundqvist # Write function based on the code from Turbo Fredriksson # in function verifyChangesFile below. # 2007-10-09 Turbo Fredriksson # Correction. ############################################################################### sub getMD5HashForFile($) { my ($file) = @_; open(FILE, $file) or die "Can't open $file: $!\n"; binmode(FILE); $digest = Digest::MD5->new->addfile(*FILE)->hexdigest, " $file\n"; close (FILE); return $digest; } ############################################################################### # Name: verifyChangesFile # Description: Parses the .changes file. # Uses: pdebug, uploaderIsChangesFileOwner # %CFiles # $filename => "$hash $size $section $type" # Arguments: The .changes file and the signature checking setting. # Returns: # incomplete Incomplete upload. # reject Reject a changes file. # ok Else verification ok (anything except incomplete or reject). # Changelog: # 2005-04-xx Bob Proulx # Split out parts of handleChangesFile to this proc. # 2005-05-01 Ola Lundqvist # Renamed from parseChangesFile to verifyChangesFile and removed parse # part. Rewrote parts to allow it to return some kind of status. # Added code to verify that changes file upload is complete. # 2005-05-06 Daniel Leidert # Add arg to handle signature verification in inputdir and distinput-dirs # independetly. # 2007-10-08 Turbo Fredriksson # Stat only existing files. # 2007-10-08 Ola Lundqvist # Correct indention (as Turbo explained). # 2007-10-08 Turbo Fredriksson # The changes file is only incomplete if the file is missing _and_ # a file in the destination do not already exist with the correct MD5 # hash. # 2007-10-08 Ola Lundqvist # Extraced the file check to two own functions. # Changed the order to always check for installed files and reject if it # exist with wrong size or md5sum. # 2007-10-09 Turbo Fredriksson # Change in foreach to use my variable. # Check incomplete time only once. # Allow forcing an install of an upload (i.e., ignore existing files in # destdir). # 2007-10-09 Ola Lundqvist # Changed force option to ignoredestcheck option. ############################################################################### sub verifyChangesFile($$) { my ($cfile, $verify) = @_; # Get changes file owner uid my $cfowner = (stat $cfile)[4]; my $clastmod = (stat $cfile)[9]; my $old_changes = 0; if ($clastmod < time() - $incompletetime) { $old_changes = 1; } # Verify changelog so it is complete, ok is default. # If incomplete continue checking for errors. my $ret = "ok"; foreach my $file (keys %CFiles) { # Does it exist in the destdir? my $inst_files = checkFileInDestDirs($file); if (($inst_files ne "") && ($ignoredestcheck == 0)) { foreach my $inst_file (split / /, $inst_files) { # Get data for the file to install. my ($hash, $size, undef, undef) = parseFileStruct($CFiles{$file}); # Get size for the already installed one my (undef, undef, undef, undef, undef, undef, undef, $ssize) = stat($inst_file); if ($size != $ssize) { pdebug(4, "$cfile is rejected. $file already installed and size do not match."); $CConf{ERROR} = "$CConf{ERROR}$cfile is rejected. $file already installed and size do not match.\n"; return "reject"; } my $digest = getMD5HashForFile($inst_file); if ($hash != $digest) { pdebug(4, "$cfile is rejected. $file already installed and MD5 sum do not match."); $CConf{ERROR} = "$CConf{ERROR}$cfile is rejected. $file already installed and MD5 sum do not match.\n"; return "reject"; } } } elsif (! -f $file) { # Modification time of the changesfile. if ($old_changes) { pdebug(4, "$cfile is incomplete and is older than $incompletetime seconds."); $CConf{ERROR} = "$CConf{ERROR}$cfile is incomplete and is older than $incompletetime seconds.\n"; return "reject"; } else { pdebug(4, "$cfile is incomplete. Missing file: $file."); $ret = "incomplete"; } } else { # File exist, now verify it. my (undef, undef, undef, undef, $fowner, undef, undef, $size) = stat($file); if ($fowner != $cfowner) { pdebug(4,"$file owner ($fowner) do not match $cfile owner ($cfowner)."); $CConf{ERROR} = "$CConf{ERROR}$file owner do not match $cfile owner.\n"; return "reject"; } my ($cfhash, $cfsize) = split / /, $CFiles{$file}; if ($size < $cfsize) { # Modification time of the changesfile. pdebug(4, "$cfile is incomplete and is older than $incompletetime seconds as $file is not of full size."); if ($old_changes) { $CConf{ERROR} = "$CConf{ERROR}$cfile is incomplete and is older than $incompletetime seconds as $file is not of full size.\n"; return "reject"; } else { $ret = "incomplete"; } } elsif ($size > $cfsize) { pdebug(4, "$cfile upload is broken, $file is bigger than expected."); $CConf{ERROR} = "$CConf{ERROR}$cfile upload is broken, $file is bigger than expected.\n"; return "reject"; } } } # Verify signatures. if ($verify) { if (system($vrfycmd,$cfile)) { # non-zero == verification failure pdebug(4, "Signature verification failed for $cfile"); $CConf{ERROR} = "$CConf{ERROR}$vrfycmd was not able to verify $cfile.\n"; return "reject"; } } return $ret; } ############################################################################### # Name: handleChangesFile # Description: Handles the .changes file. # Uses: pdebug, $copycmd, $rmcmd # Arguments: The .changes file. # Returns: nothing # Changelog: # 2001-06-26 Ola Lundqvist # Taken from the main script. Cut and paste with simple changes. # 2003-03-13 Ola Lundqvist # Added mailSuccessChanges command thing. # 2003-06-10 Ola Lundqvist # Now uses uploaderIsChangesFileOwner to make sure that the owner can be # calculated before the changes file will be moved or something similar. # Also added rejectChangesFile to vrfycmd so that messages will be sent # properly if it is rejected. # Moved parseChanges before sig verify and uploaderIsChangesFileOwner to # make sure that CMeta is created before that. # 2005-04-xx Bob Proulx # Split out parts of this function to parseChangesFile. # 2007-10-09 Turbo Fredriksson # Change in foreach to use my variable. # 2013-11-13 Ola Lundqvist # Changed name of mailSuccess to mailSuccessChanges to clarify what # situation this function is used. ############################################################################### sub handleChangesFile($) { my ($cfile) = @_; foreach my $file (keys %CFiles) { handlePackageFile($file, $cfile); } installChangesFile($cfile); mailSuccessChanges(); } ############################################################################### # Name: uploaderIsChangesFileOwner # Description: Sets CMeta{FileOwner} from # Changes: CMeta # Changelog: # 2003-06-10 Ola Lundqvist # Switched to using CMeta for ChangeLog meta information. # 2005-05-01 Ola Lundqvist # Modified reject cause. # 2005-05-06 Daniel Leidert # Fixed move-command and check for .changes file. # 2007-10-09 Turbo Fredriksson # Change in foreach to use my variable. # Create reject log code. # 2007-10-09 Ola Lundqvist # Moved reject log code to REJECT dir and changed coding style some. ############################################################################### sub rejectChangesFile() { if (! -d "REJECT") { action(! mkpath ("REJECT", 0, 0775), "Making REJECT directory.", 2); } if (-f $CMeta{ChangesFile}) { cmdaction("$movecmd $CMeta{ChangesFile} REJECT/", "Move .changes to REJECT dir.", 2); } foreach my $file (keys %CFiles) { if (-f $file) { cmdaction ("$movecmd $file REJECT/", "Move $file to REJECT dir.", 3); } else { $CConf{ERROR} = "$CConf{ERROR}File $file can not be moved because it is already installed (or incomplete upload).\n"; } } # Create a reject log my $log = $CMeta{ChangesFile}; $log =~ s/\.changes/\.reject/; $log = "REJECT/$log"; if (open(LOG, "> $log")) { print LOG $CConf{ERROR}; close(LOG); } else { pdebug(4, "Can't create reject log [$log]."); $CConf{ERROR} = "$CConf{ERROR}Can't create reject log [$log].\n"; } } ############################################################################### # Name: rejectDebFile # Description: Reject the changes file so that it is moved away. # Uses: $DMeta{DebFile} # Changelog: # 2013-11-06 Ola Lundqvist # Created based on code from rejectChangesFile. # 2013-11-13 Ola Lundqvist # Updated to use $DMeta instead of $rejecteddebfile. ############################################################################### sub rejectDebFile() { if (! -d "REJECT") { action(! mkpath ("REJECT", 0, 0775), "Making REJECT directory.", 2); } if (-f $DMeta{DebFile}) { cmdaction("$movecmd $DMeta{DebFile} REJECT/", "Move .deb to REJECT dir.", 2); } # Create a reject log my $log = $DMeta{DebFile}; $log =~ s/\.deb/\.reject/; $log = "REJECT/$log"; if (open(LOG, "> $log")) { print LOG "Incomplete upload and older than $incompletetime seconds."; close(LOG); } else { pdebug(4, "Can't create reject log [$log]."); } } ############################################################################### # Name: handlePackageFile # Description: Handles the package file. # Uses: Same as parseChangesFile produces. # Changes: %dests # Arguments: The package file (the key in %CFiles). # Returns: nothing # Changelog: # 2001-06-26 Ola Lundqvist # Taken from the main script. Cut and paste with simple changes. # 2006-06-11 Michael Hanke # Only remove source tarball file if not referenced by any other .changes file. # 2006-07-20 Ola Lundqvist # Changed indentation. # 2007-10-08 Turbo Fredriksson # Distmapping for files. # 2007-10-08 Turbo Fredriksson # The changes file is only incomplete if the file is missing _and_ # a file in the destination do not already exist with the correct MD5 # hash. # 2007-10-09 Turbo Fredriksson # Change in foreach to use my variable. # 2013-09-23 Uditha Atukorala # Fix for incorrect 'Release' file when used with -so options. To be # specific, it used the alias from %distmapping for both 'Suite' and # 'Codename' values which makes aptitude throw a warning. This was # introduced in r2484 and is now fixed. # 2013-09-24 Uditha Atukorala # When I was uploading .changes files for different distributions other # than unstable built using the distribution codenames, e.g. wheezy, # jessie etc., debarchiver generates an incorrect 'Release' file by # putting the codename value into 'Suite'. I have been using sbuild # --dist=jessie package.dsc etc. to build for different distributions. # # As a workaround you can have the suite name (e.g. testing) as the # 'Distribution' in the .changes file but the following simple patch # (also attached) would take into account such scenarios and generate # the correct 'Release' file. # 2013-11-13 Ola Lundqvist # Added debug code to debug a fault case regarding autoscan. ############################################################################### sub handlePackageFile ($) { my ($file, $cfile) = @_; my $distrd = $CConf{Distribution}; pdebug(5, "File $_: $CFiles{$file}"); my ($hash, $size, $section, $prio) = parseFileStruct($CFiles{$file}); my ($pkgname, $ver, $arch, $ext) = parseFileName($file); my $archsec = "source"; if ($arch !~ /^source$/) { $archsec = "binary-$arch"; } my ($major, $section) = parseSection($section); # OVERRIDES foreach my $distr (split /\s+/, $distrd) { # Do a reverse mapping of the distribution here so we always # speak the same language. i.e. testing, unstable etc. instead # of jessie, sid etc. my %distlookup = reverse %distmapping; $distr = $distlookup{$distr} || $distr; # Note to autoscan that files are installed to this dir. pdebug(5, "Mark $distr/$major/$archsec for autoscan ($file, $section)"); $dests{"$distr/$major/$archsec"} = 1; $distr = $distmapping{$distr} || $distr; pdebug(5, "Mapped to $distr/$major/$archsec ($file, $section)"); my $srcext = ".src" if ($arch =~ /^source$/); parseOverrideFile($distr, $major, $srcext); if (defined $Override{$distr, $major, "$pkgname$srcext"}) { pdebug(5, "Defined in override, $pkgname$srcext"); $section = secondIfNotEmpty($section, $Override{$distr, $major, "$pkgname$srcext", Section}); } elsif (defined $addoverride) { pdebug(5, "Add to override$srcext, $pkgname $prio $section"); open F, ">>$destdir/$distr/$major/override$srcext"; print(F "$pkgname $prio $section\n"); close(F); $Override{$distr, $major, "$pkgname$srcext"} = 1; } my $installto = "$destdir/$distr/$major/$archsec/$section"; if (! -d $installto) { action(! mkpath ($installto, 0, 0755), "Making directory $installto", 2); } # Not sure why we have a -f check here. It should exist at this point. elsif (-f $file) { if ($arch =~ /^source$/) { cmdaction("$rmcmd $installto/${pkgname}_*$ext", "Delete $installto/${pkgname}_*$ext", 2); } else { # This will not work but tells what to do. cmdaction("$rmcmd $installto/${pkgname}_*_$arch$ext", "Delete $installto/${pkgname}_*_$arch$ext", 2); } } cmdaction("$copycmd $file $installto", "Install $file to $installto.", 2); } # flag whether file should get deleted my $killfile = 1; # only do checks of processing source tarballs if ($file =~ m/.tar.gz$/) { my @upstream_version = split(/-/, $ver); $upstream_version = $upstream_version[0]; # get list of remaining *.changes files of this package upstream # version my @otherchangesfiles = <$inputdir/${pkgname}_$upver*.changes>; # check whether any of the remaining *.changes files does not match the # current package CHGSPARSER: foreach my $otherchangesfile (@otherchangesfiles) { if (!($otherchangesfile =~ $cfile)) { open ( otherchangesfilehandle, $otherchangesfile); while ($line = ) { if ($line =~ m/${pkgname}_$upver.*\.tar\.gz/) { pdebug(4, "Found additional package using the source tarball of the package. Will not delete it now!"); $killfile = 0; close(otherchangesfilehandle); last CHGSPARSER; } } close(otherchangesfilehandle) } } } if ($killfile) { cmdaction("$rmcmd $file", "Remove $file after it has been installed.", 2); } } ############################################################################### # Name: installChangesFile # Description: Moves the changes file to the right place, or remove it. # Arguments: The .changes file. # Where to place it. # Returns: ($major, $section) # if on the form foo/bar it returns (foo, bar) and if it # is on the form foo it returns (main, foo). # Changelog: # 2001-06-10 Ola Lundqvist # Wrote it. # 2003-03-14 Ola Lundqvist # Now CConf{ChangesFile} is changed when copying it. # 2007-10-08 Turbo Fredriksson # Distmapping for files. # 2007-10-09 Turbo Fredriksson # Change in foreach to use my variable. ############################################################################### sub installChangesFile ($) { my ($cfile) = @_; my $distrd = $CConf{Distribution}; foreach my $distr (split /\s+/, $distrd) { $distr = $distmapping{$distr} || $distr; my $todir = relativePath($cinstall, "$destdir/$distr"); if ($cinstall !~ /^\s*$/) { # Now remove or move away the .changes file (if $cinstall not empty). if (! -d $todir) { action(! mkpath ($todir, 0, 0755), "Making directory $todir", 2); } cmdaction("$copycmd $cfile $todir", "Copy $cfile to $todir.", 2); } } cmdaction("$rmcmd $cfile", "Remove changes file $cfile after installation.", 2); } ############################################################################### ######################### LOCK HANDLERS ####################################### ############################################################################### # Changelog: # 2006-11-24 Håkon Stordahl # Tried to fix the error handler functions incomingError and # rejectError, by removing the lock file in rejectError instead # of incomingError, so the lock file is not removed immediately # after an error, but rather if another error occurs while # handling the error. Also added a call to exit in rejectError # so the program will terminate in this case. # # Because of the chdir in handleSorting, the lock file name # needs to prefixed by $inputdir in the functions incomingError # and rejectError. # # Restored the error handler in incomingError so subsequent # errors are treated in the same way. # # Also moved the call to mailRejectChanges from the function rejectError # to the function incomingError, so a mail is sent each time # a .changes file is rejected. When called from rejectError, # which actually is the error handler of incomingError, which # itself is an error handler and calls rejectChangesFile, a mail # would only be sent if there was a problem with the rejection. # 2013-11-06 Ola Lundqvist # Changed incoming error handler so that it can differentiate between # changes file processing and deb only processing. # 2013-11-13 Ola Lundqvist # Added support for email at deb rejection. ############################################################################### sub incomingLock() { &createLockExit("$lockfile"); &setErrorHandler(\&incomingError); } sub incomingRelease() { &setErrorHandler(undef); &removeLockfile("$lockfile"); } sub incomingError() { &setErrorHandler(\&rejectError); if ($errorarea =~ /^sortchanges$/) { &rejectChangesFile(); &mailRejectChanges(); } elsif ($errorarea =~ /^sortdeb$/) { &rejectDebFile(); &mailRejectDeb(); } &setErrorHandler(\&incomingError); } sub rejectError() { &setErrorHandler(undef); &removeLockfile("$inputdir/$lockfile"); exit; } sub destinationLock() { &createLockExit("$destdir/$lockfile"); &setErrorHandler(\&destinationError); } sub destinationRelease() { &setErrorHandler(undef); &removeLockfile("$destdir/$lockfile"); } sub destinationError() { &setErrorHandler(undef); &removeLockExit("$destdir/$lockfile"); } ############################################################################### ######################### LOCK FUNCTIONS ###################################### ############################################################################### ############################################################################### # Name: createLockExit # Description: creates a lockfile, but exits if it can't. # Changelog: # 2002-01-22 Ola Lundqvist # Written. # Arguments: $lockfile # Returns: nothing ############################################################################### sub createLockExit($) { my ($lockfile) = @_; if (-e $lockfile) { pdebug(2, "Lockfile exists in distribution directory, skipping."); } cmdaction("touch $lockfile", "Create lockfile $lockfile", 2); } ############################################################################### # Name: removeLockfile # Description: Removes the lockfile. # Arguments: none # Needs: $rmcmd $lockfile # Returns: nothing # Changelog: # 2002-01-22 Ola Lundqvist # Written. ############################################################################### sub removeLockExit() { my ($lockfile) = @_; removeLockfile($lockfile); exit; } ############################################################################### # Name: removeLockfile # Description: Removes the lockfile. # Arguments: $lockfile # Returns: nothing # Changelog: # 2002-01-22 Ola Lundqvist # Written. ############################################################################### sub removeLockfile() { my ($lockfile) = @_; cmdaction("rm $lockfile", "Remove lockfile $lockfile.", 2); } ############################################################################### ############################ PARSERS ########################################## ############################################################################### ############################################################################### # Name: parseSection # Description: Takes a section and convert that into the used ones. # Arguments: A section on the form foo/bar or foo. # Returns: ($major, $section) # if on the form foo/bar it returns (foo, bar) and if it # is on the form foo it returns (main, foo). # Changelog: # 2001-06-10 Ola Lundqvist # Written. # 2006-02-25 Yaroslav Halchenko and # Ola Lundqvist # Default major section function. ############################################################################### sub parseSection($) { my ($major, $section) = split /\//, shift @_; if ($section =~ /^\s*$/) { # on the foo form. $section = $major; $major = $majordefault; } return ($major, $section); } ############################################################################### # Name: parseFileStruct # Description: Parses a hash size section prio string. # It is a simple split... # Arguments: The string. # Returns: ($hash, $size, $section, $prio) # Changelog: # 2001-06-10 Ola Lundqvist # Written. ############################################################################### sub parseFileStruct($) { return split / /, shift @_; } ############################################################################### # Name: parseFileName # Description: Parses a file name and splits into $pkgname, $version, $arch # Arguments: deb filename. # Returns: ($pkgname, $version, $arch, $ext) # Changelog: # 2001-06-10 Ola Lundqvist # Written. ############################################################################### sub parseFileName($) { my ($file) = @_; my ($pkgname, $ver, $arch) = split /_/, $file; $pkgname =~ s/^.*\///; my $ext; if ($arch !~ /^\s*$/) { $ext = $arch; $arch =~ s/\..*$//; $ext =~ s/^[^\.]*\./\./; } else { $ext = $ver; $ver = $CConf{Version}; $ext =~ s/$ver//; $arch = "source"; } return ($pkgname, $ver, $arch, $ext); } ############################################################################### # Name: parseDebOnlyFile # Description: Parses a debian deb file and extracs the information in the # way that parseChangesFile does. # Arguments: A deb file name. # Changes: see parseChangesFile and in addition to that %DMeta # Changelog: # 2001-06-29 Ola Lundqvist # Written with info from parseChanges. # 2003-02-12 Ola Lundqvist # Added ChangesFile to CConf hash. # 2007-10-09 Turbo Fredriksson # Change in foreach to use my variable. ############################################################################### sub parseDebOnlyFile($$) { my ($kfile, $distr) = @_; my $state = ""; my $section; my $priority; my $size; my $desc; %CConf = (Distribution => $distr); %CMeta = (ChangesFile => "", ChangesContent => ""); %DMeta = (); $DMeta{DebFile} = $kfile; $CMeta{FileOwner} = getpwuid($kfile); %CFiles = (); %CDesc = (); my @cmdres = readcommand("dpkg-deb -f $kfile"); my $content = ""; foreach my $line (@cmdres) { $content .= $line; # The state to just put the line in the hash. if ($line =~ /^\s*$/) { next; } $line =~ s/\n$//; if ($line =~ /^Provides:/ || $line =~ /^Suggests:/ || $line =~ /^Depends:/) { #next; } elsif ($line =~ /^Package:/) { $line =~ s/^[^:]*:\s//; $CConf{Binary} = $line; } elsif ($line =~ /^Section:/) { $line =~ s/^[^:]*:\s//; $section = $line; } elsif ($line =~ /^Priority:/) { $line =~ s/^[^:]*:\s//; $priority = $line; } elsif ($line =~ /^Installed-Size:/) { $line =~ s/^[^:]*:\s//; $size = $line; } elsif ($line =~ /^Description:/) { $line =~ s/^[^:]*:\s//; $desc = $line; } elsif ($line =~ /^ ./) { pdebug(6, "Do nothing with description."); } else { my $pre = $line; $pre =~ s/:.*$//; $line =~ s/^[^:]*:\s//; $CConf{$pre} = $line; } } $DMeta{DebContent} = $content; $CDesc{$CConf{Binary}} = $desc; $CFiles{$kfile} = "0 $size $section $priority"; } ############################################################################### # Name: parseChangesFile # Description: Parses a debian changelog file and extracs the information. # Arguments: .changes file name. # Changes: # %CConf # 'Format' => The file format. # 'Source' => The source packages # 'Binary' => The binary packages # 'Architecture' => [source] [all] or other # 'Version' => The packages version. # 'Distribution' => The intended distribution. # 'Urgency' => How urgent the package installation is. # 'Maintainer' => The package maintainer. # 'Uploaders' => The other package maintainers. # ... => other undocumentated things that can be used. # %CMeta # 'ChangesFile' => The file. # 'ChangesContent' => The content of the ChangeLog file. # %CFiles # $filename => "$hash $size $section $type" # %CDesc # $pkgname => "The short description of the package." # ChangeLog: # 2001-06-10 Ola Lundqvist # Written. # 2001-06-26 Ola Lundqvist # Changed print to pdebug. # 2002-09-11 Ola Lundqvist # Added uploaders field to the description. # 2003-02-12 Ola Lundqvist # Added ChangesFile to CConf hash. # 2003-03-14 Ola Lundqvist # Switched to using CMeta for ChangeLog meta information. # 2005-05-01 Ola Lundqvist # Renamed to parseChangesFile. # 2006-03-25 J�r�my Bobbio # One line fix for udeb support. ############################################################################### sub parseChangesFile($) { my ($file) = @_; if ($file =~ /\|$/) { pdebug(2, "The changes file is not allowed to end in |, because that can cause a failure\nin the debarchiver program."); } open (F, $file); my $state = ""; my $line; %CConf = (); %CMeta = (ChangesFile => $file, ChangesContent => ""); %CFiles = (); %CDesc = (); while ($line = ) { $CMeta{ChangesContent} = $CMeta{ChangesContent} . $line; # The state to just put the line in the hash. if ($line =~ /^\s*$/) { next; } $line =~ s/\n$//; if ($line =~ /^[^:]+:\s*$/) { $line =~ s/^([^:]+):\s*$/$1/; $state = $line; pdebug(6, "State change to $state\n"); } elsif ($line =~ /^\-+BEGIN PGP SIGNED MESSAGE\-+/) { $state = ""; pdebug(6, "State change to normal state.\n"); } elsif ($line =~ /^\-+BEGIN PGP SIGNATURE\-+/) { $state = "PGP"; pdebug(6, "State change to $state\n"); } elsif ($line =~ /^\-+END PGP SIGNATURE\-+/) { $state = "END"; pdebug(6, "State change to $state\n"); } # The default state. elsif ($state =~ /^$/) { my $pre = $line; $pre =~ s/:.*$//; $line =~ s/^[^:]*:\s//; $CConf{$pre} = $line; } # Description state. elsif ($state =~ /Description/) { my ($pkg, $desc) = split /\s+\-\s+/, $line; $pkg =~ s/^\s*//; $desc =~ s/\s*$//; $CDesc{$pkg} = $desc; pdebug(6, "Saving desc '$desc' indexed by $pkg.\n"); } # PGP Sign elsif ($state =~ /PGP/) { pdebug(6, "Do nothing with $line\n"); } # Changes state. elsif ($state =~ /Changes/) { pdebug(6, "Do nothing with $line\n"); } # Files state. elsif ($state =~ /Files/ && $line =~ /^ /) { my @f = split / /, $line; shift @f; my $file = pop @f; $CFiles{$file} = "$f[0] $f[1] $f[2] $f[3]";#[ @f ]; pdebug (6, "Saving file $file.\n"); } } } ############################################################################### # Name: parseOverrideFile # Description: Parses the override file. # Arguments: The distribution (like unstable) # The major dir (like main or contrib) # The src extention (undef or .src) # Changes: %Override The override structure this overrides the # packages information. # Changelog: # 2001-06-26 Ola Lundqvist # Written. # 2007-10-09 Turbo Fredriksson # Change in foreach to use my variable. ############################################################################### sub parseOverrideFile($$$) { my ($distr, $major, $srcext) = @_; my $def = ".pkg"; if (defined $srcext && $srcext !~ /^\s*$/) { $def = $srcext; } pdebug(5, "override $def"); if (! defined $Override{$distr, $major, $def}) { pdebug(5, "Load override file for $distr, $major"); my $odir = "$destdir/$distr/$major"; my @o = readfile("$odir/override$srcext"); $Override{$distr,$major, $def} = 1; foreach my $tmp (@o) { my ($pkg, $prio, $section, $maint) = split(/\s+/, $tmp, 4); $pkg = "$pkg$srcext"; $Override{$distr, $major, $pkg, Priority} = $prio if ($prio !~ /^\s*$/ && defined $prio ); $Override{$distr, $major, $pkg, Section} = $section if ($section !~ /^\s*$/ && defined $section); $Override{$distr, $major, $pkg, Maintainer} = $maint if ($maint !~ /^\s*$/ && defined $maint ); $Override{$distr, $major, $pkg} = 1; } } } ############################################################################### # Name: relativePath # Description: Returns the relative path to another path. # Arguments: path to check for # path to give it against. # Returns: ($pkgname, $version, $arch, $ext) # Changelog: # 2001-06-26 Ola Lundqvist # Written. ############################################################################## sub relativePath ($$) { my ($p1, $p2) = @_; if ($p1 =~ /^\//) { return $p1; } elsif ($p1 =~ /^\~\//) { $p1 =~ s/^~\//$ENV{HOME}\//; return $p1; } $p2 =~ s/\/$//; return "$p2/$p1"; } ############################################################################### # Name: secondIfNotEmpty # Description: Returns the relative path to another path. # Arguments: two arguments # Returns: the second one if it is not empty, else the first one. # Changelog: # 2001-06-26 Ola Lundqvist # Written. ############################################################################### sub secondIfNotEmpty ($$) { my ($p1, $p2) = @_; if (defined $p2 && $p2 !~ /^\s*$/) { return $p2; } return $p1; } ############################################################################### # Name: check_commands # Description: Check command available through the hash %cmds # Arguments: %include_hr: set of commands to check # they must be available into the hash %cmds # %exclude_hr: set of commands to exclude from the check # they must be available into the hash %cmds # Uses: %cmds # Changelog: # 2004 Michael Rash # Function written (fwknop). # 2008-09-28 Michael Rash # Updated (fwknop). # 2009-03-15 Franck Joncourt # Taken from fwknop (cipherdyne.com) (see changelog above) # and updated to suite debarchiver. ############################################################################### sub check_commands() { my ($include_hr, $exclude_hr) = @_; my @path = qw( /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin ); for my $cmd (keys %cmds) { if (keys %$include_hr) { next unless defined $include_hr->{$cmd}; } if (keys %$exclude_hr) { next if defined $exclude_hr->{$cmd}; } unless (-x $cmds{$cmd}) { my $found = 0; pdebug(4, "$cmd not located/executable at $cmds{$cmd}\n"); PATH: for my $dir (@path) { if (-x "${dir}/${cmd}") { $cmds{$cmd} = "${dir}/${cmd}"; $found = 1; last PATH; } } if ($found) { pdebug(4,"Found $cmd at $cmds{$cmd}\n"); } else { $err = 1; pdebug(4, "Could not find $cmd anywhere."); return 1; } } unless (-x $cmds{$cmd}) { pdebug(4, "Command $cmd is located at $cmds{$cmd}, but is not executable by uid: $<"); return 1; } } return 0; } ############################################################################### # Name: check_mailconfig # Description: Check the mail settings # Arguments: none # Uses: @mailsearch, %cmds, $usermailcmd, $mailformat # Changelog: # 2009-03-15 Franck Joncourt # Written ############################################################################### sub check_mailconfig() { # If the user defines his own mail command through the --mailcmd option, # we check which mail format has to be used according to the --mailformat # option. Sendmail is the default behavior. if ( ($mailformat ne "") && ($usermailcmd eq "") ) { pdebug(2, "The mailformat option must be used in conjunction to the mailcmd option."); } elsif ( ($mailformat eq "sendmail") || ($mailformat eq "") ) { @mailsearch = ("sendmail", "mail"); } elsif ($mailformat eq "mail") { @mailsearch = ("mail", "sendmail"); } else { pdebug(2, "The mailformat option only supports either sendmail or mail format."); } # Check whether the user has specified its own mail command or not. # The full path to this one is stored in the cmd specify by first # value in the array $mailformat. if ($usermailcmd ne "") { if (!File::Spec->file_name_is_absolute($usermailcmd)) { $usermailcmd = File::Spec->rel2abs($usermailcmd); } $usermailcmd !~ m|^(.*\/)+(.*)|; $cmds{$2} = $usermailcmd; $usermailcmd = $2; my $err = &check_commands({$usermailcmd => ''}, {}); if ($err) { pdebug(2, "Unable to find $usermailcmd"); } $cmds{$mailsearch[0]} = $cmds{$usermailcmd}; } # Go through all of the mail commands, find one available and remove # the others from the hash. my $nberr = 0; my $found = 0; foreach $cmd (@mailsearch) { my $err = &check_commands({$cmd => ''}, {}); if ($err) { delete $cmds{$cmd}; $nberr++; } elsif ($found == 0) { $found = 1; } else { delete $cmds{$cmd}; } } if ($nberr >= @mailsearch) { pdebug(2, "No mail command has been found."); } } __END__ ############################################################################### ############################# DOCUMENTATION ################################### ############################################################################### =head1 NAME debarchiver - Tool to sort debian packages into a package archive. =head1 SYNOPSIS debarchiver [options] =head1 DESCRIPTION The debian archiver is a tool that installs debian packages into a file structure suitable for apt-get, aptitude, dselect and similar tools. This can be used for updating the Debian system. It is meant to be used by local administrators that need special packages, or tweaked versions to ease administration. The file structure is based on the potato file structure and does not support package pools. =head1 OPTIONS =over 4 =item B<-a | --autoscan> Does both --autoscanpackages and --autoscansources. =item B<--autoscanall> Same as --scanall --autoscan. =item B<--autoscanpackages> Automatically run dpkg-scanpackages after all new packages are installed. =item B<--autoscansources> Automatically run dpkg-scansources after all new packages are installed. =item B<-b | --bzip> Create bzip2 compressed Packages.bz2 and Sources.bz2 files. =item B<--cachedir> dir The apt-ftparchive package cache directory, if --index is used. The default is $cachedir. =item B<--cinstall> dir Where the .changes file will be installed to. Use the empty string to remove the .changes file instead. The default is $cinstall. =item B<--configfile> file Specifies an extra configuration file to read. Will be read after etc configuration and after user configuration files. =item B<--copycmd> The install command to use where the default is $copycmd. Both packages and .changes files are installed using this command. =item B<-d | --dest | --destdir> dir Destination directory. The base directory where all the distribution packages will reside and where the $distrib/$major/$arch/$section directory structure will be created. The default is $destdir, relative to the input directory. =item B<--debug-level | --dl> level What information that should be printed. 1=critical, 2=error, 3=normal, 4=message, 5=debug, 6=verbose debug (modules). =item B<--distinputcriteria> The criteria for what binary packages should be installed even if they do not have a .changes file. The default is $distinputcriteria. =item B<--gpgkey> The GnuPG key to use to sign the archive. =item B<--gpgpassfile> The file that provides the password to GnuPG. =item B<--help> Prints this information. =item B<-i | --input | --indir | --inputdir> dir This is the directory where debarchiver will look for new package versions and corresponding *.changes files that should be installed to the --dest directory. The default is $instdir. =item B<--ignoredestcheck> Force install of .changes file even if some files specified in the .changes file already exists with wrong size or md5 hash. =item B<--incompletetime> The time to allow .changes file to be incomplete in seconds. The default is 24 hours. =item B<--index | -x> Automatically run apt-ftparchive after all new packages are installed. Use this *or* --autoscan, not both. =item B<--instcmd> DEPRECATED! =item B<--lockfile> file The lockfile to use. The default is $lockfile. =item B<--mailcmd> The command to use to send emails. The default behavior is to use the sendmail command. =item B<--mailformat> Defines the format to be used to send emails with, by the command specified by --mailfrom. Only 'sendmail' and 'mail' formats are supported. By default debarchiver assumes 'sendmail' format. The argument can be one of the following: sendmail = use of the sendmail format mail = use of the mail format =item B<--mailfrom> Specify mail sender. =item B<--majordefault> Default major section to use. The default is 'main'. =item B<--movecmd> Command to move files (currently not used at all). =item B<--nosort> Do not sort packages. =item B<--nostructurefix> Do not create directories and touch Package files. =item B<-o | --addoverride> Automatically add new packages to the override file. =item B<--quit-level> level On what level to quit the application, see debug level. =item B<--rmcmd> The remove command to use. The default is $rmcmd. This can be used to move away the old packages to some other place. =item B<--scanall> Scan all distributions, sections, etc. =item B<--scandetect | -s> Scan using 'apt-ftparchive' or 'dpkg-scan*' (dpkg-scanpackages and dpkg-scansources) depending on what is installed on the system. This is the recommended way. Only use --index or --autoscan if you know what you are doing. =item B<--scanonly> Same as --nosort --nostructurefix. =item B<-v | --version> Prints the version string. =back =head1 CONFIGURATION FILES You can also place configuration files with the following names (in the following order) /etc/debarchiver.conf, ~/.debarchiver.conf and input.conf (relative to input directory) that will be read before the arguments to this program will be parsed. In the above files you can change the following variables: The configuration files are read as perl modules they should end with a true value. Therefore they should always end with a line that states '1;'. =over 4 =item B<$bzip> If set to 0 no bzip2 files will be generated. If set to 1 bzip2 files will be generated. =item B<$cachedir> The cache directory for apt-ftparchive used if --index is used. =item B<$cinstall> Where the .changes files are installed (see --cinstall above). =item B<$copycmd> The install command (see --copycmd). =item B<$destdir> The destination directory (see --destdir above). =item B<$distinputcriteria> The criteria for which packages that should be installed even if it does not have a .changes file. The default is $distinputcriteria. =item B<%distinputdirs> Directories (distribution => dir) to be searched for extra binary packages that does not need a .changes file to be installed but match $distinputcriteria. The default is to accept kernel packages generated by make-kpkg (which does not generate a .changes file). Additionally binary packages with a valid .changes file will have the default distribution overridden to be the current queue directory. This cause uploads to a specific queue to place the package into that distribution directly. =item B<$gpgkey> The GnuPG key to use to sign the archive. If this variable is set, the Release file for each changed section of the archive will be signed with GnuPG using $gpgkey as the key ID. Unless you use a key that has no passphrase or use $gpgpassfile, you will need to run B interactively when using this option so that you can supply the passphrase. =item B<$gpgpassfile> The file that contains the passphrase for the GnuPG key. See $gpgkey for more information. =item B<$ignoredestcheck> Force install of .changes file even if some files specified in the .changes file already exist with wrong size or md5 hash. Default to 0 (do not ignore). =item B<$incompletetime> Time to allow .changes files to be incomplete in seconds. Useful for slow uploads. The default is 24 hours. =item B<$inputdir> The input directory (no effect in $inputconfigfile). =item B<$lockfile> The lockfile to use. The default is $lockfile. =item B<@mailtos> An array of strings that will receive emails. If the string contains an email address that one is used. If it contains an incomplete email address, i.e. @hostname, the username owning the file is used @ the hostname specified. If no '@' character is found in the string, it is considered as a field in the .changes file. Such a field can for example be Maintainer or Uploaders. =item B<$mailformat> The format to use to send emails (see --mailformat above). =item B<$mailfrom> Specifies the sender of emails. The default is none ("") =item B<$majordefault> Default major section (see --majordefault above). =item B<$movecmd> The move command (see --movecmd). =item B<%release> Additional information to add to generated Release files. Supported keys are 'origin', 'label', and 'description'. =item B<$rmcmd> The remove command (see --rmcmd above). =item B<$verifysignatures> Choose to enable (1) or disable (0) signature verification for packages uploaded into $inputdir (not %distinputdirs). =item B<$verifysignaturesdistinput> Choose to enable (1) or disable (2) signature verification for packages uploaded into %distinputdirs. This works independently from $verifysignatures. =item B<$usermailcmd> It allows the user to tell debarchiver to use a specific command to send emails. You may also want to specify the mailformat your mail command handles by setting the value of the $mailformat variable. Using the --mailcmd option on the command line will superseed this variable. =back =head1 PACKAGE INDEXING There are two ways to generate the indexes that B relies on. Using B<--autoscanpackages>, B<--autoscansources>, or B<--autoscan> will use B and B. This will generate the Packages and Sources files, but will not generate Contents files and can be slow with a large repository. Alternatively, the B<--index> I option will call B to index the package tree. B can also generate Contents files (for use with B), and can optionally use a cache of package information to speed up multiple runs. The B configuration file will be generated automatically. This is however not fully tested. You should use either B<--autoscanpackages> and B<--autoscansources> or B<--index>, not both, as they do basically the same thing. The default action (and the recommended) is B<--scandetect> that probe for installed software and use the best choice depending on what software you have installed (chooses between --index and --autoscan right now). =head1 REJECT Changes files are rejected in the following conditions: * A file that is about to be installed already exist in the archive and is not identical to the one that is about to be installed. * Changes file is incomplete and has been there for $incompletetime time. * A file that is part of the Changes file is not yet big enough and the changes file has been there for $incompletetime time. * A file that is part of the Changes file is bigger than specified. * Verify signatures is enabled and signature do not match. =head1 FILES B =head1 SEE ALSO B(1) =head1 AUTHOR Ola Lundqvist =cut debarchiver-0.10.0/debian/0000775000000000000000000000000012241231557012162 5ustar debarchiver-0.10.0/debian/debarchiver.postinst0000664000000000000000000000461211173250426016247 0ustar #! /bin/sh # postinst script for debarchiver # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-deconfigure' `in-favour' # `removing' # # for details, see /usr/share/doc/packaging-manual/ # # quoting from the policy: # Any necessary prompting should almost always be confined to the # post-installation script, and should be protected with a conditional # so that unnecessary prompting doesn't happen if a package's # installation fails and the `postinst' is called with `abort-upgrade', # `abort-remove' or `abort-deconfigure'. case "$1" in configure) if ! getent passwd debarchiver >/dev/null 2>&1 ; then adduser --home /var/lib/debarchiver \ --system --disabled-password \ --gecos "Deb archiving tool" \ --group debarchiver fi if [ "debarchiver.debarchiver" != $(find /var/cache/debarchiver -prune -printf "%u.%g") ] ; then echo "Setting owner for /var/cache/debarchiver to debarchiver." chown -Rf debarchiver:debarchiver /var/cache/debarchiver fi if [ "debarchiver.debarchiver" != $(find /var/lib/debarchiver/dists -prune -printf "%u.%g") ] ; then echo "Setting owner for /var/lib/debarchiver/dists to debarchiver." chown -Rf debarchiver:debarchiver /var/lib/debarchiver/dists fi if [ "debarchiver" != $(find /var/lib/debarchiver/incoming -prune -printf "%g") ] ; then echo "Setting group owner for /var/lib/debarchiver/incoming to debarchiver." chgrp -Rf debarchiver /var/lib/debarchiver/incoming fi if [ -f /etc/aliases ] ; then if ! grep "^debarchiver:" /etc/aliases > /dev/null 2>&1 ; then echo "Setting up a alias for debarchiver to root in /etc/aliases." echo "debarchiver: root" >> /etc/aliases fi if [ -e $(which newaliases) ] ; then newaliases || true fi fi ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 0 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 debarchiver-0.10.0/debian/rules0000775000000000000000000000317011654333062013244 0ustar #!/usr/bin/make -f # Sample debian/rules that uses debhelper. # GNU copyright 1997 to 1999 by Joey Hess. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # This is the debhelper compatability version to use. configure: configure-stamp configure-stamp: dh_testdir # Add here commands to configure the package. touch configure-stamp build: configure-stamp build-stamp build-stamp: dh_testdir # Add here commands to compile the package. $(MAKE) touch build-stamp clean: dh_testdir dh_testroot -rm -f build-stamp configure-stamp # Add here commands to clean up after the build process. $(MAKE) clean dh_clean install: build dh_testdir dh_testroot dh_prep dh_installdirs # Add here commands to install the package into debian/debarchiver. $(MAKE) install DESTDIR=$(CURDIR)/debian/debarchiver mkdir -p $(CURDIR)/debian/debarchiver/usr/share/lintian/overrides install -m644 debian/debarchiver.override \ $(CURDIR)/debian/debarchiver/usr/share/lintian/overrides/debarchiver binary-arch: # Build architecture-independent files here. binary-indep: build install dh_testdir dh_testroot # dh_installdebconf dh_installdocs dh_installexamples debian/debarchiver.cron.d dh_installmenu # dh_installlogrotate # dh_installemacsen # dh_installpam # dh_installmime # dh_installinit dh_installcron dh_installinfo # dh_undocumented dh_installchangelogs dh_link dh_strip dh_compress dh_fixperms -Xvar/lib/debarchiver/incoming # dh_makeshlibs dh_installdeb dh_perl # dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-arch binary-indep .PHONY: build clean binary-indep binary install configure debarchiver-0.10.0/debian/changelog0000664000000000000000000007042712241231504014036 0ustar debarchiver (0.10.0) unstable; urgency=low * Support for mail sending when accepting or rejecting a deb only file. * Clarified that configuration strings shall be quoted. -- Ola Lundqvist Wed, 13 Nov 2013 22:18:29 +0100 debarchiver (0.9.13) unstable; urgency=low * Added verification of deb file completeness to make sure that it does not process incomplete deb files that is not part of a .changes file. -- Ola Lundqvist Wed, 06 Nov 2013 21:52:34 +0100 debarchiver (0.9.12) unstable; urgency=low * Applied fix from Uditha Atukorala that solves a second error in the generated Release file. Closes: #724512. -- Ola Lundqvist Fri, 27 Sep 2013 08:21:50 +0200 debarchiver (0.9.11) unstable; urgency=low * Applied fix from Uditha Atukorala that solves a release name conflict in the generated Release file. Closes: #724316. Thanks a lot for the patch. -- Ola Lundqvist Mon, 23 Sep 2013 19:02:08 +0200 debarchiver (0.9.10) unstable; urgency=low * Spelling correction in manual. -- Ola Lundqvist Sun, 06 Nov 2011 20:30:19 +0100 debarchiver (0.9.9) unstable; urgency=low * Updated French and German translation. Thanks to Valéry Perrin and Helge Kreutzmann for translation and support. -- Ola Lundqvist Sun, 06 Nov 2011 20:14:27 +0100 debarchiver (0.9.8) unstable; urgency=low * German translation included. Closes: #640236. Thanks to Helge Kreutzmann for the translation. -- Ola Lundqvist Thu, 03 Nov 2011 16:41:25 +0100 debarchiver (0.9.7) unstable; urgency=low * Improved english language in the documentation. Closes: #640235. * Updated to standards version 3.9.1 (from 3.8.0). * Using debhelper version 8. -- Ola Lundqvist Wed, 02 Nov 2011 22:15:14 +0100 debarchiver (0.9.6) unstable; urgency=low * Solved a misspelling of recomments to recommends in the control file. Closes: #604432. -- Ola Lundqvist Mon, 22 Nov 2010 18:04:56 +0100 debarchiver (0.9.5) unstable; urgency=low * Correction of debug for sendlist. Extended the suggestion from Mats to make sure the list is properly ordered. -- Ola Lundqvist Mon, 01 Nov 2010 21:39:44 +0100 debarchiver (0.9.4) unstable; urgency=low * Applied patch for french language translation. Closes: #601185. -- Ola Lundqvist Mon, 01 Nov 2010 21:38:35 +0100 debarchiver (0.9.3) unstable; urgency=low * Applied patch from Franck Joncourt to make sure that mailformat has proper backwards compatibility. Closes: #522227. -- Ola Lundqvist Fri, 03 Apr 2009 07:13:51 +0200 debarchiver (0.9.2) unstable; urgency=low * Changed dependency on mail functionality to a recommendation. Also added exim4 and mail-transport-agent to the list due to the recent patch from Franck Joncourt. -- Ola Lundqvist Fri, 27 Mar 2009 06:39:56 +0100 debarchiver (0.9.1) unstable; urgency=low * Correction of syntax error. Closes: #520145. -- Ola Lundqvist Tue, 17 Mar 2009 22:19:19 +0100 debarchiver (0.9.0) unstable; urgency=low * Applied patch from Franck Joncourt for sendmail support instead of mail support. Closes: #517689. * Updated manpage for debarchiver to print out the default instead of erroneously printing the variable name. Closes: #447843. * Clarified error messages. Closes: #437147. * Corrected spelling debian to Debian in package description. * Copyright file is now UTF-8 encoded instead of ISO-8859-1 coded. * Postinst file now use user:group syntax for chown operation instead of previous user.group syntax. * Now uses compat file instead of setting DH_COMPAT variable in rules file. * Use standards version 3.8.0. * Added 5 override exceptions for lintian warnings. They are intentional. -- Ola Lundqvist Mon, 16 Mar 2009 21:00:44 +0100 debarchiver (0.8.4) unstable; urgency=low * Corrected path error in README.gnupg, closes: #502060. Thanks for the clarification from Per Eric Rosen -- Ola Lundqvist Sat, 18 Oct 2008 15:21:35 +0200 debarchiver (0.8.3) unstable; urgency=high * Updated to show that lenny is stable and squeeze is testing as it will be after the release. -- Ola Lundqvist Thu, 4 Sep 2008 08:01:33 +0200 debarchiver (0.8.2) unstable; urgency=low * Changed upstream address from opalsys.net to inguza.com. -- Ola Lundqvist Mon, 7 Apr 2008 19:22:28 +0200 debarchiver (0.8.1) unstable; urgency=low * Added dependency on mailutils | bsd-mailx | mailx as that software is needed for full functionality, closes: #472491. -- Ola Lundqvist Mon, 24 Mar 2008 18:31:08 +0100 debarchiver (0.8.0) unstable; urgency=low * Applied patch from Turbo Fredriksson to: - correct reject message. - only stat existing files. - allow distmapping for files as well. - ignore files already installed with correct MD5 hash. * End configuration file with 1; * Now check changes file for already installed files. * Instead of always rejecting (as suggested by Turbo) incomplete files, the time is now configurable (minor version number bump). * Configuration files need to return a true value is now documented. Closes: #443405. * Documented when a file can be rejected, closes: #323614. * Added option to specify mail sender, closes: #425936. * Applied some more patches from Turbo Fredriksson to: - correct getMD5HashForFile function - change so that foreach use my variables - check incomplete time only once - allow forcing an install of an upload (i.e., ignore existing files in destdir) - Create reject log code. * Cleanup and documentation after patches from Turbo and changed "force" option to "ignoredestcheck" option. * This new option is now in the configuration file as well. -- Ola Lundqvist Tue, 9 Oct 2007 22:38:52 +0200 debarchiver (0.7.4) unstable; urgency=low * Changed severity level for configuration file problems from info to warning, so that it is displayed in the normal case. * Changed official homepage. -- Ola Lundqvist Tue, 14 Aug 2007 08:52:48 +0200 debarchiver (0.7.3) unstable; urgency=medium * Correction of French translation for index option, closes: #409301. -- Ola Lundqvist Fri, 2 Feb 2007 07:25:12 +0100 debarchiver (0.7.2) unstable; urgency=low * Upgrade code to handle moved logcheck configuration file. This avoids an error text during the upgrade as well. (It can be seen as a correction of #408483). -- Ola Lundqvist Sun, 28 Jan 2007 18:29:32 +0100 debarchiver (0.7.1) unstable; urgency=low * Correction of logcheck location issue, closes: #408483. -- Ola Lundqvist Fri, 26 Jan 2007 21:04:19 +0100 debarchiver (0.7.0) unstable; urgency=medium * Updated to match that etch will be stable. -- Ola Lundqvist Fri, 8 Dec 2006 21:53:09 +0100 debarchiver (0.6.6) unstable; urgency=low * Applied a correction from Hakon Stordahl that correct problems with incoming, closes: #400691, #375932. * Sorted options in alphabetical order, closes: #323612. -- Ola Lundqvist Tue, 28 Nov 2006 08:50:40 +0100 debarchiver (0.6.5) unstable; urgency=low * Check the existance of userdel and groupdel before using that command in purge phaes, closes: #390187. -- Ola Lundqvist Fri, 29 Sep 2006 20:50:05 +0200 debarchiver (0.6.4) unstable; urgency=low * Updated french translation and french addendum with files provided by Valery Perrin , closes: #386047. * Added logcheck configuration for workstation, closes: #372298. Thanks to Martin F Krafft for the config file. -- Ola Lundqvist Tue, 5 Sep 2006 07:38:36 +0200 debarchiver (0.6.3) unstable; urgency=low * Applied a patch from Michael Hanke to make it possible to upload files to two dists sharing the same orig file, closes: #372130. -- Ola Lundqvist Thu, 20 Jul 2006 10:04:22 +0200 debarchiver (0.6.2) unstable; urgency=low * Documented default configuration options, closes: #373840. * Corrected version number, closes: #374298. * Corrected unknown character problem, closes: #374297. * Corrected so that debhelper is now build depends instead of build depends indep. * Updated to standards version 3.7.2. -- Ola Lundqvist Thu, 6 Jul 2006 00:11:53 +0200 debarchiver (0.6.1) unstable; urgency=low * Small fix for udeb support, closes: #358144. Thanks to Jeremy Bobbio for the fix. -- Ola Lundqvist Sat, 25 Mar 2006 17:45:45 +0100 debarchiver (0.6.0) unstable; urgency=low * Applied patch from Yaroslav Halchenko that add a new feature called --majordefault to make it possible to define another major target instead of main if it is not defined in the source, closes: #354430. * Changed the patch described above so it is fully documented and renamed it so it integrate better with the other functions. -- Ola Lundqvist Sun, 26 Feb 2006 13:56:43 +0100 debarchiver (0.5.5) unstable; urgency=low * Applied patch from Geoff Crompton to avoid duplicated emails, closes: #339696. * Documented a feature that I was not aware of myself, closes: #335830. * Updated french documentation, closes: #338510. * Updated to standards version 3.6.2. * Updated to debhelper compatibility 4. * Removed debian/debarchiver.conffiles because of higher debhelper compatibility. -- Ola Lundqvist Sat, 28 Jan 2006 22:24:35 +0100 debarchiver (0.5.4) unstable; urgency=low * Applied fix from Russ Allbery that reallow interactive gpg signing of Release files, closes: #338012. -- Ola Lundqvist Mon, 7 Nov 2005 21:48:55 +0100 debarchiver (0.5.3) unstable; urgency=low * Applied patch from Daniel Leidert that make the signhelper script obsolete. Also correct signing so it work from a cron-job and not just from a tty. * Made sure that the signhelper command is not installed, and removed from the source tree. -- Ola Lundqvist Fri, 14 Oct 2005 08:34:17 +0200 debarchiver (0.5.2) unstable; urgency=low * Applied patch from Daniel Leidert that correct the following issues: - fix for the $signcmd-issues - fix for debarchiver.conf (signcmd default and gpgpassfile info) - updates to all old FSF addresses - fix to include README.gnupg instead of README.dscverify -- Ola Lundqvist Thu, 13 Oct 2005 11:20:20 +0200 debarchiver (0.5.1) unstable; urgency=low * Applied patch from Daniel Leidert that fix the last (hopefully) issues with signed release files, closes: #333182. -- Ola Lundqvist Tue, 11 Oct 2005 21:01:02 +0200 debarchiver (0.5.0) unstable; urgency=low * Added a new command line option --configfile, inspired by patch from Alexander Wirt , closes: #331425. * Added a helper script to sign release files. It could be implemented using some perl cpan module but I decided not to do so, closes: #328883. * Updated copyright information in README and source files. * Updated French translation. Thanks to Valery Perrin for that valuable help, closes: #329254. -- Ola Lundqvist Sat, 8 Oct 2005 16:51:08 +0200 debarchiver (0.4.2) unstable; urgency=low * Fix from Daniel Leidert regarding a bug in generateRelease, closes: #328449. -- Ola Lundqvist Fri, 16 Sep 2005 22:46:59 +0200 debarchiver (0.4.1) unstable; urgency=low * Fix for signed release file support, closes: #326195. Thanks to Joergen Haegg for the fix. * Made it possible to read gpg password from file and added options to manage gpg support, closes: #324191, #317472. -- Ola Lundqvist Fri, 9 Sep 2005 22:10:14 +0200 debarchiver (0.4.0) unstable; urgency=low * Applied patch from Russ Allbery to allow signed release files, closes: #324191. -- Ola Lundqvist Sun, 21 Aug 2005 21:11:05 +0200 debarchiver (0.3.2) unstable; urgency=low * Improved argument handling to make debugging easier. * Minor typo fix in debarchiver.conf, closes: #309940. -- Ola Lundqvist Mon, 4 Jul 2005 18:00:21 +0200 debarchiver (0.3.1) unstable; urgency=low * Updated French manpage translation, thanks to Valery Perrin . -- Ola Lundqvist Tue, 10 May 2005 21:58:56 +0200 debarchiver (0.3.0) unstable; urgency=low * Applied a patch from Daniel Leidert that add support for optional verification of signatures in distinputputdirs, with README updates. -- Ola Lundqvist Sat, 7 May 2005 10:03:41 +0200 debarchiver (0.2.1) unstable; urgency=low * Bugfix for bzip2 support. -- Ola Lundqvist Mon, 2 May 2005 17:49:11 +0200 debarchiver (0.2.0) unstable; urgency=low * Applied patch from Bob Proulx that add .changes file support to dist input directories. * Make sure that .changes files are processed before any .deb files to avoid a race condition. * Applied patch from Daniel Leidert to support bzip2 file generation and also fix so that contents-all files is generated too, closes: #304532, #307004. * Added a README file from Daniel Leidert that document how to publish the repository. * Verification of chages files are now much more complete. Owner size and that all files exist is checked before handling. -- Ola Lundqvist Sun, 1 May 2005 13:09:49 +0200 debarchiver (0.1.8) unstable; urgency=low * Rewrote install structure to use makefiles instead of just the debian/rules file. At the same time a file permission problem was fixed, closes: #292174. -- Ola Lundqvist Wed, 13 Apr 2005 22:28:20 +0200 debarchiver (0.1.7) unstable; urgency=low * Added README.dscverify contributed by Daniel Leidert . -- Ola Lundqvist Wed, 13 Apr 2005 21:47:16 +0200 debarchiver (0.1.6) unstable; urgency=low * Applied patch from Valery Perrin that add a French translation and support for po4a translations, closes: #297049. -- Ola Lundqvist Sun, 27 Feb 2005 15:53:10 +0100 debarchiver (0.1.5) unstable; urgency=low * Fix default group write permissions in incoming subdirectories, closes: #292174. -- Ola Lundqvist Wed, 26 Jan 2005 10:36:57 +0100 debarchiver (0.1.4) unstable; urgency=low * Added a notice that /var/lib/debarchiver is intentionally not removed on purge, closes: #287149. -- Ola Lundqvist Mon, 10 Jan 2005 21:57:09 +0100 debarchiver (0.1.3) unstable; urgency=low * Applied a patch from Tommaso Moroni that fix a number of typo errors, closes: #289618. -- Ola Lundqvist Mon, 10 Jan 2005 21:53:37 +0100 debarchiver (0.1.2) unstable; urgency=low * Applied patch from Valery Perrin that makes the manpage more readable, closes: #288108. -- Ola Lundqvist Sat, 1 Jan 2005 20:10:25 +0100 debarchiver (0.1.1) unstable; urgency=low * Fixed debarchiver path example in configuration, closes: #276347. -- Ola Lundqvist Mon, 18 Oct 2004 22:29:08 +0200 debarchiver (0.1.0) unstable; urgency=medium * Now it will remove /var/cache/debarchiver on purge. * Updated minor version number because of the distribution remapping. Also decided to use a more common version numbering system. -- Ola Lundqvist Sun, 12 Sep 2004 10:30:37 +0200 debarchiver (0.0.40) unstable; urgency=high * Remapping of distribution releases. Needed for sarge release. In this release sarge is considered stable and etch is testing. -- Ola Lundqvist Wed, 8 Sep 2004 15:03:01 +0200 debarchiver (0.0.39) unstable; urgency=low * Fixed spelling with distinputcriteria, closes: #182408. * Added testing to distinput dirs. Also documented this better in source and config. * Documented a bit more clear so that it is not so easy to misunderstand the distributions and distributionmappings. -- Ola Lundqvist Thu, 12 Aug 2004 09:23:50 +0200 debarchiver (0.0.38) unstable; urgency=low * Applied patch from Russ Allbery that add support for automatic generation of apt-ftparchive config files and more... - The --index option no longer takes a configuration file. Instead, the configuration file is always automatically generated from the debarchiver configuration. - Only the changed distribution is reindexed, if there are multiple distributions. apt-ftparchive has to index a distribution at a time, in order to generate accurate Contents files, so there's no way to be more granular with the --index option unfortunately. - apt-ftparchive is automatically configured to use a cache for package information. By default, that cache is stored in /var/cache/debarchiver, and the debian control files are updated below to create and deal with that directory like the other /var/lib directories that are created. - A new --cachedir command-line option and a new $cachedir configuration variable have been added to configure where the apt-ftparchive cache will be stored. I updated the sample configuration file to mention it. - Release files are no longer generated in directories where one of the components of the directory (up to the root of the archive) is a symlink. This is to keep Release files from being constantly regenerated when there's a testing -> unstable symlink, going back and forth between testing and unstable. I generalized this check, just in case someone is crazy enough to link non-free to main or binary-i386 to binary-alpha or something bizarre like that. - $release changed to $contents per previous discussion. - I noticed that override.src was getting touched only if override didn't exist, rather than checking for override.src, resulting in override.src not being created when the directory archive structure was being fixed. That's been fixed. - Some minor formatting fixes in the --help and POD documentation. * Created AUTHORS file to accnowledge the people helping with this package. * Added option -x as an alias for --index. * Fixed documentation so that '--index config' is replaced with '--index'. Also added a not about that apt-ftparchive is not fully tested. * Added option --scandetect or -s that probe for apt-ftparchive or dpkg-scan* and use the installed one. Apt-ftparchive is the preferred method. * Changed from suggest of apt-utils to depend on apt-utils or dpkg-dev. -- Ola Lundqvist Wed, 11 Aug 2004 10:08:59 +0200 debarchiver (0.0.37) unstable; urgency=low * Better support for apt-ftparchive. Patch is from Russ Allbery . * Applied patch from from Russ Allbery , that add support for Release file creation. Closes: #143155. * Added suggest on apt-utils. * Added release hash to config file too. -- Ola Lundqvist Tue, 10 Aug 2004 17:08:24 +0200 debarchiver (0.0.36) unstable; urgency=low * Applied patch from Russ Allbery , that add support for using apt-ftparchive instead of dpkg-scanpackages and dpkg- scansources. Closes: #262206. It is really a great move in the right direction as some problems with debarchiver will be solved this way. The best thing with this option is that it will be a lot faster. Later this should be the default. * Removed emacs variables in the end of this changelog. * Updated standards version to 3.6.1. -- Ola Lundqvist Fri, 6 Aug 2004 12:05:13 +0200 debarchiver (0.0.35) unstable; urgency=low * Option -i should override etcconfig and userconfig but not inputdir option, closes: #207051. * Applied patch from Achim Derigs that fixes an Packages file not found error, closes: #192433. * Updated standards version to 3.5.10. -- Ola Lundqvist Thu, 28 Aug 2003 11:37:55 +0200 debarchiver (0.0.34) unstable; urgency=low * Added dependency on adduser. -- Ola Lundqvist Mon, 4 Aug 2003 14:35:37 +0200 debarchiver (0.0.33) unstable; urgency=low * Fixed a bug in the email code. The changesfile was removed before it was checked for owner, closes: #196922. -- Ola Lundqvist Tue, 10 Jun 2003 21:39:21 +0200 debarchiver (0.0.32) unstable; urgency=low * Fixing option error, closes: #193791. * Added -t to logger in default cron-job. -- Ola Lundqvist Mon, 19 May 2003 08:41:08 +0200 debarchiver (0.0.31) unstable; urgency=low * Added shortcut options for common operations. -- Ola Lundqvist Tue, 13 May 2003 07:26:23 +0200 debarchiver (0.0.30) unstable; urgency=low * Fixed postinst so that is uses getend instead of directly grep for user in passwd file. -- Ola Lundqvist Mon, 12 May 2003 21:26:21 +0200 debarchiver (0.0.29) unstable; urgency=low * Fixed cron documentation in cron file. * Now the cron-script will log messages instead of sending email. Little modification in the source was needed. * Changed so that correct home directory will be created for new debarchiver account. Old ones still have to be corrected manually. * Added support for the debarchiver tool to send email about successful and rejected packages. This code is experimental but seems to be working fine. * Updated license information. -- Ola Lundqvist Wed, 12 Feb 2003 07:00:26 +0100 debarchiver (0.0.28) unstable; urgency=low * Updated debarchiver config so that it matches the current release state. -- Ola Lundqvist Sat, 15 Feb 2003 22:08:58 +0100 debarchiver (0.0.27) unstable; urgency=low * Added gpg verification code using patch from Joel Baker , closes: #143095. -- Ola Lundqvist Fri, 7 Feb 2003 09:07:06 +0100 debarchiver (0.0.26) unstable; urgency=low * Enforce working opalmod version. * Fixed manpage, using suggestion from Tomas Pospisek , closes: #142392. -- Ola Lundqvist Wed, 5 Feb 2003 18:29:18 +0100 debarchiver (0.0.25) unstable; urgency=low * Updated standards version from 3.5.2 to 3.5.8 (no other changes). * Removed full stop from package description. -- Ola Lundqvist Fri, 10 Jan 2003 17:48:42 +0100 debarchiver (0.0.24) unstable; urgency=low * Some fixes so it run nicely, thanks to Stephen Peters for the patch. -- Ola Lundqvist Fri, 22 Nov 2002 06:54:00 +0100 debarchiver (0.0.23) unstable; urgency=low * Fixed compile error, closes: #169538, #169388. -- Ola Lundqvist Wed, 20 Nov 2002 09:55:42 +0100 debarchiver (0.0.22) unstable; urgency=low * Fixed override creation problem on new distributions. -- Ola Lundqvist Fri, 15 Nov 2002 09:46:58 +0100 debarchiver (0.0.21) unstable; urgency=low * Bugfix, typo error in debarchiver.pl, closes: #169093, #169094, #169127. -- Ola Lundqvist Fri, 15 Nov 2002 06:56:25 +0100 debarchiver (0.0.20) unstable; urgency=low * Minor security check. -- Ola Lundqvist Thu, 7 Nov 2002 07:09:18 +0100 debarchiver (0.0.19) unstable; urgency=low * Fixed bug with patch from Werner Fleck , closes: #14920. -- Ola Lundqvist Fri, 9 Aug 2002 22:56:35 +0200 debarchiver (0.0.18) unstable; urgency=low * Added binary arch target, closes: #131559. -- Ola Lundqvist Mon, 4 Feb 2002 09:28:12 +0100 debarchiver (0.0.17) unstable; urgency=low * Fixed lock file issues, closes: #130813. -- Ola Lundqvist Sun, 27 Jan 2002 00:59:38 +0100 debarchiver (0.0.16) unstable; urgency=low * Better lockfile handling, closes: #113627. * Error handling when changing directory, closes: #111010. * Documented how non-US is handled, closes: #120474. -- Ola Lundqvist Wed, 23 Jan 2002 11:33:37 +0100 debarchiver (0.0.15) unstable; urgency=low * Fixed the policy violation of alias handling, closes: #127397. * Fixed missing dpkg-dev dependency, closes: #119494. -- Ola Lundqvist Tue, 15 Jan 2002 22:00:58 +0100 debarchiver (0.0.14) unstable; urgency=low * Fix postinst typo, closes: #115075. -- Ola Lundqvist Wed, 10 Oct 2001 14:14:11 +0200 debarchiver (0.0.13) unstable; urgency=low * Documented the use of a cronjob, closes: #110587. * Fixed removal scripts, closes: #112063. * Sets up an alias, closes: #110587. * Fixed --scanll to --scanall. * Made the README file more clear. -- Ola Lundqvist Thu, 13 Sep 2001 23:26:06 +0200 debarchiver (0.0.12) unstable; urgency=low * Change distr -> dists. * Fixed postrm problem, closes: #109105. * Fixed lockfile problem, closes: #109104. -- Ola Lundqvist Mon, 20 Aug 2001 15:09:02 +0200 debarchiver (0.0.11) unstable; urgency=low * Added user and group debarchiver for archive opertations. * Fixed so that the user config is really used. * Updated the readme file. * Fixed and updated the manpage, closes: #108148. * Changed so that it will be runned every 5 minutes instead of one every hour. * Added todo item. * Fixed so that the input.conf file will really be loaded. -- Ola Lundqvist Fri, 16 Aug 2001 11:38:48 +0200 debarchiver (0.0.10) unstable; urgency=low * Fixed installation problem with .changes file when installing to multiple distrs. -- Ola Lundqvist Thu, 2 Aug 2001 15:52:38 +0200 debarchiver (0.0.9) unstable; urgency=low * Fixed bug with sorting to several distributions. -- Ola Lundqvist Thu, 2 Aug 2001 15:30:25 +0200 debarchiver (0.0.8) unstable; urgency=low * Can now sort packages to more than one destination archive. For example to both unstable and stable. * Option --instcmd is now obsolete. Replaced by a copycmd, movecmd and rmcmd option. -- Ola Lundqvist Thu, 26 Jul 2001 19:05:44 +0200 debarchiver (0.0.7) unstable; urgency=low * Added regenerate all option. * Can scan only, or fix structure only too, with some more options. -- Ola Lundqvist Mon, 23 Jul 2001 10:42:13 +0200 debarchiver (0.0.6) unstable; urgency=low * Fixed concatenation problem. -- Ola Lundqvist Wed, 18 Jul 2001 09:11:36 +0200 debarchiver (0.0.5) unstable; urgency=low * Fixed 404 error. -- Ola Lundqvist Tue, 17 Jul 2001 10:14:51 +0200 debarchiver (0.0.4) unstable; urgency=low * Fixed link error. -- Ola Lundqvist Mon, 16 Jul 2001 11:23:21 +0200 debarchiver (0.0.3) unstable; urgency=low * Added automatic creation of the directory structure. -- Ola Lundqvist Sat, 14 Jul 2001 20:06:21 +0200 debarchiver (0.0.2) unstable; urgency=low * Fixed problems with Package file generation. It did not regenerate the Packages files properly. Now the scanpackages are relative to the destdir and nothing else. * Added test to cron. * Fixed strange output and unexpected exit. -- Ola Lundqvist Fri, 13 Jul 2001 17:56:52 +0200 debarchiver (0.0.1) unstable; urgency=low * Initial Release. -- Ola Lundqvist Wed, 27 Jun 2001 16:15:47 +0200 debarchiver-0.10.0/debian/copyright0000664000000000000000000000420212220071023014076 0ustar This package was debianized by Ola Lundqvist on Wed, 27 Jun 2001 16:15:47 +0200. Homepage: http://inguza.com/software/debarchiver/ Copyright: Copyright (C) 2000-2013 Ola Lundqvist Copyright (C) 2013 Uditha Atukorala Copyright (C) 2011 Helge Kreutzmann Copyright (C) 2010 Mats Erik Andersson Copyright (C) 2009 Franck Joncourt Copyright (C) 2004,2008 Michael Rash Copyright (C) 2007 Turbo Fredriksson Copyright (C) 2004-2005 Russ Allbery Copyright (C) 2005 Joel Baker Copyright (C) 2005 Daniel Leidert Copyright (C) 2005 Bob Proulx Copyright (C) 2005-2011 Valéry Perrin Copyright (C) 2006 Yaroslav Halchenko Copyright (C) 2006 Jérémy Bobbio Copyright (C) 2006 Michael Hanke Copyright (C) 2006 Martin F Krafft Copyright (C) 2006 Håkon Stordahl See the AUTHORS file for information on what the individual copyright holder has contributed with. License: This 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. This 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/Linux system, in /usr/share/common-licenses/GPL, or with the debarchiver source package as the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. debarchiver-0.10.0/debian/debarchiver.override0000664000000000000000000000063611173250426016205 0ustar debarchiver: non-standard-dir-perm var/lib/debarchiver/incoming/ 2775 != 0755 debarchiver: non-standard-dir-perm var/lib/debarchiver/incoming/stable/ 2775 != 0755 debarchiver: non-standard-dir-perm var/lib/debarchiver/incoming/testing/ 2775 != 0755 debarchiver: non-standard-dir-perm var/lib/debarchiver/incoming/unstable/ 2775 != 0755 debarchiver: package-contains-empty-directory usr/lib/debarchiver/signhelper/ debarchiver-0.10.0/debian/debarchiver.cron.d0000664000000000000000000000032311173250426015542 0ustar # # Regular cron jobs for the debarchiver package # # Run the archiver every five minutes. */5 * * * * debarchiver test -x /usr/bin/debarchiver && /usr/bin/debarchiver -so | logger -t debarchiver -p daemon.info debarchiver-0.10.0/debian/debarchiver.postrm0000664000000000000000000000376011173250426015713 0ustar #! /bin/sh # postrm script for debarchiver # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `remove' # * `purge' # * `upgrade' # * `failed-upgrade' # * `abort-install' # * `abort-install' # * `abort-upgrade' # * `disappear' overwrit>r> # for details, see /usr/share/doc/packaging-manual/ case "$1" in purge) if [ -x /usr/sbin/userdel ] ; then if grep "^debarchiver:" /etc/passwd > /dev/null 2>&1 ; then userdel debarchiver fi fi if [ -x /usr/sbin/groupdel ] ; then if grep "^debarchiver:" /etc/group > /dev/null 2>&1 ; then groupdel debarchiver fi fi if [ -f /etc/aliases ] ; then if grep "^debarchiver:" /etc/aliases > /dev/null 2>&1 ; then echo "Removing alias for debarchiver in /etc/aliases." cp -a /etc/aliases /etc/aliases.tmp grep -v "^debarchiver:" /etc/aliases.tmp > /etc/aliases chown $(find /etc/aliases.tmp -prune -printf "%u.%g") \ /etc/aliases chmod $(find /etc/aliases.tmp -prune -printf "%m") \ /etc/aliases fi if [ -e $(which newaliases) ] ; then newaliases || true fi fi if [ -d /var/cache/debarchiver ] ; then rm -Rf /var/cache/debarchiver fi if [ -d /var/lib/debarchiver ] ; then echo "WARNING! Files exist in the directory /var/lib/debarchiver." echo "These are intentionally not removed by the package on purge because it can" echo "contain lot of important data. It will not be updated by debarchiver anymore." fi ;; remove) ;; upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 0 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# debarchiver-0.10.0/debian/compat0000664000000000000000000000000211654332635013366 0ustar 8 debarchiver-0.10.0/debian/debarchiver.preinst0000664000000000000000000000225511173250426016051 0ustar #! /bin/sh # preinst script for debarchiver # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `install' # * `install' # * `upgrade' # * `abort-upgrade' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in install) ;; upgrade) if [ -e /etc/logcheck/ignore.workstation.d/debarchiver ] && \ [ ! -e /etc/logcheck/ignore.d.workstation/debarchiver ] ; then if [ ! -d /etc/logcheck/ignore.d.workstation ] ; then mkdir /etc/logcheck/ignore.d.workstation fi mv /etc/logcheck/ignore.workstation.d/debarchiver \ /etc/logcheck/ignore.d.workstation/debarchiver if [ "$(find /etc/logcheck/ignore.workstation.d -type f)" != "" ] ; then rmdir /etc/logcheck/ignore.workstation.d fi fi ;; abort-upgrade) ;; *) echo "preinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 debarchiver-0.10.0/debian/control0000664000000000000000000000150611654333104013565 0ustar Source: debarchiver Section: devel Priority: optional Maintainer: Ola Lundqvist Build-Depends-Indep: perl (>= 5.6.0-16), po4a Build-Depends: debhelper (>= 8.0.0) Standards-Version: 3.9.1 Package: debarchiver Architecture: all Depends: opalmod (>= 0.1.10), apt-utils | dpkg-dev, adduser, ${misc:Depends} Recommends: exim4 | mail-transport-agent | mailutils | bsd-mailx | mailx Suggests: devscripts, gnupg Description: Tool to handle Debian package archives This tool can create a potato like file structure that dselect, apt-get and similar tools can use for easier installation. . You just have to place the package files into a incoming directory and the tool does the sorting (if you place the generated '.changes' file there too). . OBSERVE! This package will create a cronjob that does the actual sorting. debarchiver-0.10.0/debian/debarchiver.docs0000664000000000000000000000005311173250426015307 0ustar README TODO README.gnupg README.repository debarchiver-0.10.0/patches/0000775000000000000000000000000012241231557012367 5ustar debarchiver-0.10.0/patches/143155-release-file-creation.patch0000664000000000000000000001065711173250426020317 0ustar From: Russ Allbery Okay, here you go. This works well for me. It adds a new %release configuration variable, although it will work fine if it's not set; it only needs to be set to add the additional Origin and Label fields for pinning and Description for general information. I also fixed the reference to @mailtos in the printed help (needed to be escaped). --- debarchiver-0.0.36/src/debarchiver.pl.orig 2004-08-06 03:08:01.000000000 -0700 +++ debarchiver-0.0.36/src/debarchiver.pl 2004-08-09 15:57:37.000000000 -0700 @@ -54,6 +54,8 @@ $CChanges = ""; # Destination directories that should be scanned. %dests = (); +# Information to add to Release files. +%release = (); # The criteria to use for which binary packages that does not need a .changes # file. $distinputcriteria = "^kernel.*\\.deb\$"; @@ -231,9 +233,12 @@ searched for extra bianry packages that does not need a .changes file to be installed. \$lockfile The lockfile to use, default $lockfile. - @mailtos The fields in .changes file that should be used for + \@mailtos The fields in .changes file that should be used for mailing SUCCESS and REJECT messages. If there is an @ char in the arrach it will be used directly. + \%release Additional information to add to generated Release + files. Supported keys are origin, label, and + description. "; ############################################################################### @@ -398,6 +405,46 @@ } ############################################################################### +# Name: createRelease +# Description: Create a Release file. +# Dates: 2004-08-09 Written. +# Arguments: directory, distribution, section, architecture +# Uses: %release +############################################################################### + +sub createRelease($$$$) { + my ($dir, $distribution, $section, $architecture) = @_; + my $release = ''; + $release .= "Archive: $distribution\n"; + $release .= "Component: $section\n"; + $release .= "Label: $release{label}\n" if defined $release{label}; + $release .= "Origin: $release{origin}\n" if defined $release{origin}; + $release .= "Architecture: $architecture\n"; + $release .= "Description: $release{description}\n" + if defined $release{description}; + $release .= "\n"; + + # If the release file already exists, read it to see if anything has + # changed. Don't recreate the file unless we're actually changing anything, + # to avoid unnecessary timestamp updates. + if (-e "$dir/Release") { + action(! open(REL, "$dir/Release"), "Read Release file in $dir", 2); + local $/; + my $old = ; + close REL; + if ($release ne $old) { + action(! open(REL, "> $dir/Release"), "Update Release file in $dir", 2); + print REL $release; + close REL; + } + } else { + action(! open(REL, "> $dir/Release"), "Create Release file in $dir", 2); + print REL $release; + close REL; + } +} + +############################################################################### ######################### EMAIL HANDLING ###################################### ############################################################################### @@ -728,6 +817,7 @@ # Name: handleStructureFix # Description: Fix the distribution directory structure. # Dates: 2001-07-23 Moved from START section to this subprocedure. +# 2004-08-09 Call createRelease to build Release files. # Uses: @distributions, @sections, @architectures, $fixstructure ############################################################################### @@ -756,8 +846,10 @@ } for $ar (@architectures) { createPF("$dis/$se/binary-$ar", "Packages"); + createRelease("$dis/$se/binary-$ar", $di, $se, $ar); } createPF("$dis/$se/source", "Sources"); + createRelease("$dis/$se/source", $di, $se, 'source'); if (! -e "$dis/$se/override") { cmdaction("touch $dis/$se/override", "Create file $dis/$se/override.", @@ -1519,6 +1611,9 @@ the string, it is considered as a field in the .changes file. Such a field can for example be Maintainer or Uploaders. + \%release Additional information to add to generated Release + files. Supported keys are origin, label, and + description. =head1 PACKAGE INDEXING -- Russ Allbery (rra@stanford.edu) debarchiver-0.10.0/patches/turbo-create-reject.patch0000664000000000000000000000116611173250426017261 0ustar --- /usr/bin/debarchiver.old 2007-10-09 09:15:29.000000000 +0200 +++ /usr/bin/debarchiver 2007-10-09 10:10:00.000000000 +0200 @@ -1698,6 +1698,17 @@ $CConf{ERROR} = "$CConf{ERROR}File $file can not be moved because it is already installed (or incomplete upload).\n"; } } + + # Create a reject log + my $log = $CMeta{ChangesFile}; + $log =~ s/\.changes/\.reject/; + if (!open(LOG, "> $log")) { + $CConf{ERROR} = "$CConf{ERROR}Can't open reject log.\n"; + } + else { + print LOG $CConf{ERROR}; + close(LOG); + } } ############################################################################### debarchiver-0.10.0/patches/turbo-reject-msg-correction0000664000000000000000000000101311173250426017642 0ustar --- debarchiver.orig 2007-10-08 15:24:34.000000000 +0200 +++ debarchiver 2007-10-08 15:25:15.000000000 +0200 @@ -753,10 +753,12 @@ sub mailReject() { # OOPS! We can not read that file after it has been moved! - my $message = $CMeta{ChangesContent}; + my $message; if (length($CConf{ERROR}) > 0) { - $message += "\n$CConf{ERROR}"; + $message = "ERROR:\n$CConf{ERROR}\n"; } + $message .= $CMeta{ChangesContent}; + pdebug(5, "Mail Reject."); email(determineMailTo(), $CConf{'Source'}, debarchiver-0.10.0/patches/339696-no-dup-email.patch0000664000000000000000000000125611173250426016463 0ustar --- debarchiver.orig 2005-11-18 12:15:48.640511216 +1100 +++ debarchiver 2005-11-18 12:21:26.084211976 +1100 @@ -506,6 +506,7 @@ sub determineMailTo() { my $to = ""; my $toi; + my %to_hash; foreach $toi (@mailtos) { # Expand to email if there is no email address. if ($toi !~ /\@/) { @@ -521,16 +522,11 @@ } } if ($toi !~ /^\s*$/) { - if ($to =~ /^\s*$/) { - $to = $toi; - } - else { - $to = "$to, $toi"; - } + $to_hash{$toi} = ""; } } pdebug(5, "Mail will be sent to $to."); - return $to; + return join(", ", keys(%to_hash)); } ############################################################################### debarchiver-0.10.0/patches/sendmail.diff0000664000000000000000000006402711173250426015025 0ustar diff --git a/src/debarchiver.pl b/src/debarchiver.pl index 2eaa9bd..73bf596 100755 --- a/src/debarchiver.pl +++ b/src/debarchiver.pl @@ -34,7 +34,7 @@ ############################################################################### ############################# USES ############################################ ############################################################################### - +use File::Spec; use Digest::MD5; use File::Path qw(mkpath); use OpaL::action qw(pdebug action cmdaction @@ -72,9 +72,16 @@ use OpaL::read qw(readfile readcommand); # 2007-10-09 Ola Lundqvist # Changed force option to ignoredestcheck option. +$mailformat = "sendmail"; +@mailsearch = (); +$usermailcmd = ''; + +%cmds = (); +$cmds{'sendmail'} = "sendmail"; +$cmds{'mail'} = "mail"; + $copycmd = "cp -af"; $rmcmd = "rm -f"; -$mailcmd = "mail"; $movecmd = "mv"; $vrfycmd = "dscverify"; $cachedir = "/var/cache/debarchiver"; @@ -304,107 +311,124 @@ $help = "Usage: debarchiver [option(s)] options: - -a | --autoscan Does both --autoscanpackages and --autoscansources. - Use this *or* --index, not both. - --autoscanall Same as --scanall --autoscan. - --autoscanpackages Automaticly run dpkg-scanpackages after all new - packages are installed. - --autoscansources Automaticly run dpkg-scansources after all new - packages are installed. - -b | --bzip Create bzip2 compressed Packages.bz2 and Sources.bz2 - files. - --cachedir dir The apt-ftparchive package cache directory, if --index - is used. Default $cachedir. - --cinstall dir Where the .changes file will be installed to, - empty string to remove it instead, default $cinstall. - --configfile file Specify an extra configuration file to read. Will be read - after etc config and user config file. - --copycmd The install command to use, default $copycmd. - Both packages and .changes files are installed using - this command. - -d | --dest dir Destination directory. The base directory where all - --destdir dir the distribution packages reside. Here the - \$distrib/\$major/\$arch/\$section directory structure - will be created. - Default $destdir, - relative to the input directory. - --debug-level level What information that should be printed. - --dl level 1 = critical, 2 = error, 3 = normal, - 4 = message, 5 = debug, 6 = verbose debug (modules). - --distinputcriteria The criteria for which binary packages that should be - installed even if it does not have a .changes file, - default $distinputcriteria. - --gpgkey GnuPG key to use to sign the archive. - --gpgpassfile File to provide password to GnuPG. - --help Prints this information. - -i | --input dir This is the directory where debarchiver is looking for - --indir dir new packages corresponding *.changes files that - --inputdir dir should be installed to the --dest directory. - The default directory is - /var/lib/debarchiver/incoming. - --index | -x Automatically run apt-ftparchive after all new packages - are installed. Use this *or* --autoscan, not both. - --instcmd DEPRICATED! - --lockfile file The lockfile to use, default $lockfile. - --incompletetime The time to allow .changes file to be incomplete in - seconds. Defaults to 24 hours. - --mailcmd The mail command to use, default $mail. - --mailfrom Specify mail sender. - --majordefault section Default major section to use if undefined - (default: main) - --movecmd Command to move files (currently not used at all). - --nosort Do not sort packages. - --nostructurefix Do not create directories and touch Package files. - -o | --addoverride Automaticly add new packages to the override file. - --rmcmd The remove command to use, default $rmcmd. - This can be used to move away the old packages to - some other place. - --quit-level level On what level to quit the application, see debug level. - --scanall Scan all distributions, sections, etc. - --scandetect | -s Scan using apt-ftparchive or dpkg-scan* depending on - what is installed on the system. This is the - recommended way. Only use --index or --autoscan if - you know what you are doing. - --scanonly Same as --nosort --nostructurefix. - -v | --version Prints the version string. - --ignoredestcheck Force install of changes files even if some files - already exists with wrong size or md5 hash. + -a | --autoscan - Does both --autoscanpackages and --autoscansources. + Use this *or* --index, not both. + --autoscanall - Same as --scanall --autoscan. + --autoscanpackages - Automaticly run dpkg-scanpackages after all new + packages are installed. + --autoscansources - Automaticly run dpkg-scansources after all new + packages are installed. + -b | --bzip - Create bzip2 compressed Packages.bz2 and Sources.bz2 + files. + --cachedir dir - The apt-ftparchive package cache directory, if --index + is used. Default $cachedir. + --cinstall dir - Where the .changes file will be installed to, + empty string to remove it instead, default $cinstall. + --configfile file - Specify an extra configuration file to read. Will be + read after etc config and user config file. + --copycmd - The install command to use, default $copycmd. + Both packages and .changes files are installed using + this command. + -d | --dest dir - Destination directory. The base directory where all + --destdir dir the distribution packages reside. Here the + \$distrib/\$major/\$arch/\$section directory structure + will be created. + Default $destdir, relative to the input directory. + --debug-level level - What information that should be printed. + --dl level 1 = critical, 2 = error, 3 = normal, + 4 = message, 5 = debug, 6 = verbose debug (modules). + --distinputcriteria - The criteria for which binary packages that should be + installed even if it does not have a .changes file, + default $distinputcriteria. + --gpgkey - GnuPG key to use to sign the archive. + --gpgpassfile - File to provide password to GnuPG. + --help - Prints this information. + -i | --input dir - This is the directory where debarchiver is looking for + --indir dir new packages corresponding *.changes files that + --inputdir dir should be installed to the --dest directory. + The default directory is + /var/lib/debarchiver/incoming. + --index | -x - Automatically run apt-ftparchive after all new + packages are installed. Use this *or* --autoscan, + not both. + --instcmd - DEPRICATED! + --lockfile file - The lockfile to use, default $lockfile. + --incompletetime - The time to allow .changes file to be incomplete in + seconds. Defaults to 24 hours. + --mailcmd - The mail command to use, default $mailformat. + --mailfrom - Specify mail sender. + --mailformat format - Define which format has to be used to send emails with + the user command specify by --mailfrom. Only sendmail + and mail formats are supported. By default, if this + option is not given, debarchiver assumes the sendmail + format. The format argument can be one of the + followings: + sendmail = use of the sendmail format + mail = use of the mail format + --majordefault section - Default major section to use if undefined + (default: main) + --movecmd - Command to move files (currently not used at all). + --nosort - Do not sort packages. + --nostructurefix - Do not create directories and touch Package files. + -o | --addoverride - Automaticly add new packages to the override file. + --rmcmd - The remove command to use, default $rmcmd. + This can be used to move away the old packages to + some other place. + --quit-level level - On what level to quit the application, see debug + level. + --scanall - Scan all distributions, sections, etc. + --scandetect | -s - Scan using apt-ftparchive or dpkg-scan* depending on + what is installed on the system. This is the + recommended way. Only use --index or --autoscan if + you know what you are doing. + --scanonly - Same as --nosort --nostructurefix. + -v | --version - Prints the version string. + --ignoredestcheck - Force install of changes files even if some files + already exists with wrong size or md5 hash. You can also place config files with the following names (in following order) $etcconfigfile, $userconfigfile and $inputconfigfile (relative to input dir), that will be read before the arguments to this program will be parsed. Here you can change the following variables - \$cachedir The cache directory for apt-ftparchive, used if - --index is used. - \$cinstall Where the .changes files are installed - (see --cinstall above). - \$copycmd The install command (see --copycmd). - \$destdir The destination directory (see --destdir above). - \$distinputcriteria The criteria for which packages that should be - installed even if it does not have a .changes file, - default $distinputcriteria. - \%distinputdirs The directories (distribution => dir) that should be - searched for extra binary packages that does not need - a .changes file to be installed. - \$gpgkey GnuPG key to use to sign the archive. - \$gpgpassfile File to provide password to GnuPG. - \$inputdir The input directory (no effect in $inputconfigfile). - \$lockfile The lockfile to use, default $lockfile. - \$ignoredestcheck Force install of changes files even if some files - already exists with wrong size or md5 hash. - Default to 0. - \$incompletetime The time to allow .changes file to be incomplete in - seconds. Defaults to 24 hours. - \@mailtos The fields in .changes file that should be used for - mailing SUCCESS and REJECT messages. If there is an - @ char in the arrach it will be used directly. - \$mailfrom Specify mail sender. - \$majordefault Default major section (see --majordefault above). - \$movecmd The move command (see --movecmd). - \%release Additional information to add to generated Release - files. Supported keys are origin, label, and - description. - \$rmcmd The remove command (see --rmcmd above). + \$cachedir - The cache directory for apt-ftparchive, used if + --index is used. + \$cinstall - Where the .changes files are installed + (see --cinstall above). + \$copycmd - The install command (see --copycmd). + \$destdir - The destination directory (see --destdir above). + \$distinputcriteria - The criteria for which packages that should be + installed even if it does not have a .changes file, + default $distinputcriteria. + \%distinputdirs - The directories (distribution => dir) that should be + searched for extra binary packages that does not need + a changes file to be installed. + \$gpgkey - GnuPG key to use to sign the archive. + \$gpgpassfile - File to provide password to GnuPG. + \$inputdir - The input directory (no effect in $inputconfigfile). + \$ignoredestcheck - Force install of changes files even if some files + already exists with wrong size or md5 hash. + Default to 0. + \$incompletetime - The time to allow .changes file to be incomplete in + seconds. Defaults to 24 hours. + \$lockfile - The lockfile to use, default $lockfile. + \$mailformat - The format to use to send emails (see --mailformat + above). + \$mailfrom - Specify mail sender. + \@mailtos - The fields in .changes file that should be used for + mailing SUCCESS and REJECT messages. If there is an + @ char in the arrach it will be used directly. + \$majordefault - Default major section (see --majordefault above). + \$movecmd - The move command (see --movecmd). + \%release - Additional information to add to generated Release + files. Supported keys are origin, label, and + description. + \$rmcmd - The remove command (see --rmcmd above). + \$usermailcmd - It allows the user to tell debarchiver to use a + specific command to send emails. You may also want to + specify which mailformat your mail command handles + by setting the value of the $mailformat variable. + Using the --mailcmd option on the command line will + superseed this variable. "; ############################################################################### @@ -456,9 +480,12 @@ while ($_ = shift @ARGS2) { elsif (/^--movecmd$/) { $movecmd = shift @ARGS2; } - elsif (/^--mailcmd$/) { - $mailcmd = shift @ARGS2; - } + elsif (/^--mailcmd$/) { + $usermailcmd = shift @ARGS2; + } + elsif (/^--mailformat$/) { + $mailformat = shift @ARGS2; + } elsif (/^--mailfrom$/) { $mailfrom = shift @ARGS2; } @@ -553,10 +580,13 @@ while ($_ = shift @ARGS2) { } } else { - pdebug(2, "Unknown option $_\n"); + pdebug(2, "Unknown option $_\n"); } } +&check_mailconfig(); +&check_commands({}, {}); + ############################################################################### ############################# START ########################################### ############################################################################### @@ -742,37 +772,59 @@ sub determineMailTo() { # 2007-10-08 Ola Lundqvist # Make it possible to specify mail sender. ############################################################################### +sub email($$$) { + my ($toAddress, $subject, $msg) = @_; -sub email($$$$) { - my ($to, $package, $key, $message) = @_; - if (length($to) > 0) { - pdebug(5, "Executing mail command, $mailcmd -s '$package $key' $to."); - if ($mailfrom ne "") { - if (open(M, "|$mailcmd -s '$package $key' '$to' -- -f '$mailfrom'")) { - print M $message; - close(M); - } - else { - pdebug(2, - "Error executing mail command, $mailcmd -s '$package $key' '$to' -- -f '$mailfrom'."); - } - pdebug(5, "Mail exec done."); - } - else { - if (open(M, "|$mailcmd -s '$package $key' '$to'")) { - print M $message; - close(M); - } - else { - pdebug(2, - "Error executing mail command, $mailcmd -s '$package $key' '$to'."); - } - pdebug(5, "Mail exec done."); - } + pdebug(5, "Sending mail ..."); + + if ( $use_sendmail && ($mailfrom eq "") ) { + pdebug(5, "No sender mail address found, use of the debarchiver user instead."); } - else { - pdebug(3, "No one to send mail to."); + + my $err=1; + if ($toAddress eq "") { + pdebug(3, "No recipient to send mail to."); + + } elsif ($subject eq "") { + pdebug(3, "Empty subject"); + + } elsif ($msg eq "") { + pdebug(3, "Empty message") + + } else { + $err = 0; + } + + if ($err) { + pdebug(2, "No mail sent due to missing parameters"); + + } elsif (defined $cmds{'sendmail'}) { + + pdebug(4, "Use of the sendmail command: $cmds{'sendmail'}"); + if (open(M, "| $cmds{'sendmail'} -t")) { + print M "From: $mailfrom\n" unless ($mailfrom eq ""); + print M "To: $toAddress\n", + "Subject: $subject\n\n", + $msg . "\n"; + close(M); + + } else { + pdebug(2, "Could not execute $cmds{'sendmail'} $!"); + } + + } else { + pdebug(4, "Use of the mail command: $cmds{'mail'}"); + if (open(M, "| $cmds{'mail'} -s '$subject' '$toAddress'")) { + print M $msg . "\n"; + close(M); + + } else { + pdebug(2, "Could not execute $cmds{'mail'} $!"); + } + } + + pdebug(5, "Mail exec done."); } ############################################################################### @@ -790,12 +842,11 @@ sub email($$$$) { sub mailSuccess() { # OOPS! We can not read that file after it has been moved! - my $message = $CMeta{ChangesContent}; + my $message = $CMeta{ChangesContent}; + my $subject = "$CConf{'Source'} ACCEPTED"; + my $recipient = determineMailTo(); pdebug(5, "Mail Success."); - email(determineMailTo(), - $CConf{'Source'}, - "ACCEPTED", - $message); + email($recipient, $subject, $message); } ############################################################################### @@ -816,15 +867,13 @@ sub mailReject() { # OOPS! We can not read that file after it has been moved! my $message; if (length($CConf{ERROR}) > 0) { - $message = "ERROR:\n$CConf{ERROR}\n"; + $message = "ERROR:\n$CConf{ERROR}\n"; } - $message .= $CMeta{ChangesContent}; - + $message .= $CMeta{ChangesContent}; + my $subject = "$CConf{'Source'} REJECTED"; + my $recipient = determineMailTo(); pdebug(5, "Mail Reject."); - email(determineMailTo(), - $CConf{'Source'}, - "REJECTED", - $message); + email($recipient, $subject, $message); } ############################################################################### @@ -2246,7 +2295,7 @@ sub parseDebOnlyFile($$) { # Switched to using CMeta for ChangeLog meta information. # 2005-05-01 Ola Lundqvist # Renamed to parseChangesFile. -# 2006-03-25 Jrmy Bobbio +# 2006-03-25 J�r�my Bobbio # One line fix for udeb support. ############################################################################### @@ -2403,8 +2452,146 @@ sub secondIfNotEmpty ($$) { return $p1; } +############################################################################### +# Name: check_commands +# Description: Check command available through the hash %cmds +# Arguments: %include_hr: set of commands to check +# they must be available into the hash %cmds +# %exclude_hr: set of commands to exclude from the check +# they must be available into the hash %cmds +# Uses: %cmds +# Changelog: +# 2009-03-15 Franck Joncourt +# Taken from fwknop (cipherdyne.com) +############################################################################### +sub check_commands() { + my ($include_hr, $exclude_hr) = @_; + + my @path = qw( + /bin + /sbin + /usr/bin + /usr/sbin + /usr/local/bin + /usr/local/sbin + ); + + for my $cmd (keys %cmds) { + + if (keys %$include_hr) { + next unless defined $include_hr->{$cmd}; + } + if (keys %$exclude_hr) { + next if defined $exclude_hr->{$cmd}; + } + + unless (-x $cmds{$cmd}) { + + my $found = 0; + pdebug(4, "$cmd not located/executable at $cmds{$cmd}\n"); + + PATH: for my $dir (@path) { + if (-x "${dir}/${cmd}") { + $cmds{$cmd} = "${dir}/${cmd}"; + $found = 1; + last PATH; + } + } + + if ($found) { + pdebug(4,"Found $cmd at $cmds{$cmd}\n"); + + } else { + $err = 1; + pdebug(4, "Could not find $cmd anywhere."); + return 1; + } + + } + + unless (-x $cmds{$cmd}) { + pdebug(4, "Command $cmd is located at $cmds{$cmd}, but is not executable by uid: $<"); + return 1; + } + } + + return 0; + } + +############################################################################### +# Name: check_mailconfig +# Description: Check the mail settings +# Arguments: none +# Uses: @mailsearch, %cmds, $usermailcmd, $mailformat +# Changelog: +# 2009-03-15 Franck Joncourt +# Written +############################################################################### +sub check_mailconfig() +{ + # If the user defines his own mail command through the --mailcmd option, + # we check which mail format has to be used according to the --mailformat + # option. Sendmail is the default behavior. + if ( ($mailformat ne "") && ($usermailcmd eq "") ) { + pdebug(2, "The mailformat option must be used in conjunction to the mailcmd option."); + + } elsif ($mailformat eq "sendmail") { + @mailsearch = ("sendmail", "mail"); + + } elsif ($mailformat eq "mail") { + @mailsearch = ("mail", "sendmail"); + + } else { + pdebug(2, "The mailformat option only supports either sendmail or mail format."); + } + + # Check whether the user has specified its own mail command or not. + # The full path to this one is stored in the cmd specify by first + # value in the array $mailformat. + if ($usermailcmd ne "") { + + if (!File::Spec->file_name_is_absolute($usermailcmd)) { + $usermailcmd = File::Spec->rel2abs($usermailcmd); + } + + $usermailcmd !~ m|^(.*\/)+(.*)|; + $cmds{$2} = $usermailcmd; + $usermailcmd = $2; + + my $err = &check_commands({$usermailcmd => ''}, {}); + if ($err) { + pdebug(2, "Unable to find $usermailcmd"); + } + + $cmds{$mailsearch[0]} = $cmds{$usermailcmd}; + } + + # Go through all of the mail commands, find one available and remove + # the others from the hash. + my $nberr = 0; + my $found = 0; + foreach $cmd (@mailsearch) { + + my $err = &check_commands({$cmd => ''}, {}); + if ($err) { + delete $cmds{$cmd}; + $nberr++; + + } elsif ($found == 0) { + $found = 1; + + } else { + delete $cmds{$cmd}; + } + } + if ($nberr >= @mailsearch) { + pdebug(2, "No mail command has been found."); + } +} + __END__ + ############################################################################### ############################# DOCUMENTATION ################################### ############################################################################### @@ -2516,6 +2703,20 @@ Command to move files (currently not used at all). The time to allow .changes file to be incomplete in seconds. Defaults to 24 hours. +=item B<--mailcmd> + +The command to use to send emails. The default behavior is to use the +sendmail command. + +=item B<--mailformat> + +Define which format has to be used to send emails with the user command +specify by --mailfrom. Only sendmail and mail formats are supported. By +default, if this option is not given, debarchiver assumes the sendmail +format. The argument can be one of the followings: + sendmail = use of the sendmail format + mail = use of the mail format + =item B<--mailfrom> Specify mail sender. @@ -2560,12 +2761,16 @@ Prints the version string. Force install of changes files even if some files already exists with wrong size or md5 hash. +=back + =head1 CONFIG FILE You can also place config files with the following names (in following order) /etc/debarchiver.conf, ~/.debarchiver.conf and input.conf (relative to input directory) that will be read before, the arguments to this program will be parsed. Here you can change the following variables: The configuration files are read as perl modules they should end with a true value. Therefore they should always end with 1; +=over 4 + =item B<$bzip> If set to 0 no bzip2 files will be generated. If set to 1 bzip2 files will @@ -2621,6 +2826,10 @@ The lockfile to use, default $lockfile. An array of strings that should be mailed to. If the string contains an email address that one is used. If it contains an incomplete email address, i.e. @hostname, the username owning the file is used @ the hostname specified. If no @ character is found in the string, it is considered as a field in the .changes file. Such a field can for example be Maintainer or Uploaders. +=item B<$mailformat> + +The format to use to send emails (see --mailformat above). + =item B<$mailfrom> Specify the sender of emails. @@ -2654,6 +2863,14 @@ Force install of changes files even if some files already exists with wrong size Choose to enable (1) or disable (2) signature verification for packages uploaded into %distinputdirs. This works independently from $verifysignatures. +=item B<$usermailcmd> + +It allows the user to tell debarchiver to use a specific command to send emails. +You may also want to specify which mailformat your mail command handles by +setting the value of the $mailformat variable. Using the --mailcmd option on the +command line will superseed this +variable. + =back =head1 PACKAGE INDEXING debarchiver-0.10.0/patches/turbo-distmapping-for-files.patch0000664000000000000000000000172011173250426020743 0ustar --- /usr/bin/debarchiver.old 2007-10-08 14:11:12.000000000 +0200 +++ /usr/bin/debarchiver 2007-10-08 14:48:47.000000000 +0200 @@ -1321,7 +1321,7 @@ if (defined $fixstructure) { my ($di, $se, $ar); for $di (@distributions) { - my $dis = $distmapping{$di}; + my $dis = $distmapping{$di} || $di; if (! defined($dis)) { $dis = $di; } @@ -1594,6 +1594,7 @@ my $distr; foreach $distr (split /\s+/, $distrd) { + $distr = $distmapping{$distr} || $distr; my $srcext = ".src" if ($arch =~ /^source$/); parseOverrideFile($distr, $major, $srcext); if (defined $Override{$distr, $major, "$pkgname$srcext"}) { @@ -1699,6 +1700,7 @@ my $distrd = $CConf{Distribution}; my $distr; foreach $distr (split /\s+/, $distrd) { + $distr = $distmapping{$distr} || $distr; my $todir = relativePath($cinstall, "$destdir/$distr"); if ($cinstall !~ /^\s*$/) { # Now remove or move away the .changes file (if $cinstall not empty). debarchiver-0.10.0/patches/326195-release-file-fix.patch0000664000000000000000000000136211173250426017301 0ustar From: Joergen Haegg To: Debian Bug Tracking System Subject: debarchiver: gpg complains about overwriting Release.gpg Date: Fri, 02 Sep 2005 11:55:34 +0200 Package: debarchiver Version: 0.4.0 Severity: normal Tags: patch gpg complains about aan existing Release.gpg, debarchiver should remove the file before creating it. --- /tmp/debarchiver 2005-09-02 11:49:05.000000000 +0200 +++ /usr/bin/debarchiver 2005-09-02 11:49:47.000000000 +0200 @@ -943,6 +943,7 @@ "Put Release for $path in the right location", 3); if ($gpgkey) { + unlink("$path/Release.gpg"); cmdaction("gpg -a -b -s -u '$gpgkey' -o $path/Release.gpg" . " $path/Release", "Signing Release file for $path", debarchiver-0.10.0/patches/turbo-force-install.patch0000664000000000000000000000440411173250426017304 0ustar --- /usr/bin/debarchiver.old 2007-10-09 10:14:01.000000000 +0200 +++ /usr/bin/debarchiver 2007-10-09 11:01:14.000000000 +0200 @@ -87,6 +87,7 @@ $verifysignaturesdistinput = 0; $userconfigfile = "$ENV{HOME}/.debarchiver.conf"; $bzip = 0; +$force_install = 0; $gpgpassfile = "$ENV{HOME}/.gnupg/passphrase"; ############################################################################### @@ -188,6 +189,9 @@ $inputdir = shift @ARGS1; $inputdir =~ s/\/$//; } + elsif (/^--force$/) { + $force_install = 1; + } else { push @ARGS2, $_; } @@ -358,6 +362,8 @@ you know what you are doing. --scanonly Same as --nosort --nostructurefix. -v | --version Prints the version string. + --force Force install of chagnes even if it already exists, + but with wrong size or md5 hash etc. You can also place config files with the following names (in following order) $etcconfigfile, $userconfigfile and $inputconfigfile @@ -1528,6 +1534,9 @@ # Extraced the file check to two own functions. # Changed the order to always check for installed files and reject if it # exist with wrong size or md5sum. +# 2007-10-09 Turbo Fredriksson +# Allow forcing an install of an upload (i.e., ignore existing files in +# destdir). ############################################################################### sub verifyChangesFile($$) { @@ -1545,7 +1554,7 @@ foreach my $file (keys %CFiles) { # Does it exist in the destdir? my $inst_files = checkFileInDestDirs($file); - if ($inst_files ne "") { + if (($inst_files ne "") and ($force_install != 1)) { foreach my $inst_file (split / /, $inst_files) { # Get data for the file to install. my ($hash, undef, undef, undef) = parseFileStruct($CFiles{$file}); @@ -2487,6 +2496,11 @@ Prints the version string. +=item B<--force> + +Force install of chagnes even if it already exists, +but with wrong size or md5 hash etc. + =head1 CONFIG FILE You can also place config files with the following names (in following order) /etc/debarchiver.conf, ~/.debarchiver.conf and input.conf (relative to input directory) that will be read before, the arguments to this program will be parsed. Here you can change the following variables: debarchiver-0.10.0/patches/typosfix.patch0000664000000000000000000001024111173250426015272 0ustar From: Tommaso Moroni diff -ruN debarchiver-0.1.2.orig/debian/debarchiver.conf debarchiver-0.1.2/debian/debarchiver.conf --- debarchiver-0.1.2.orig/debian/debarchiver.conf 2004-10-18 22:27:34.000000000 +0200 +++ debarchiver-0.1.2/debian/debarchiver.conf 2005-01-10 04:59:29.000000000 +0100 @@ -33,7 +33,7 @@ # unstable => 'sid' # ); -# What architectures that should exist (automaticly created). +# What architectures that should exist (automatically created). # All and source will exist anyway. # @architectures = ('i386'); diff -ruN debarchiver-0.1.2.orig/src/debarchiver.pl debarchiver-0.1.2/src/debarchiver.pl --- debarchiver-0.1.2.orig/src/debarchiver.pl 2005-01-01 20:09:29.000000000 +0100 +++ debarchiver-0.1.2/src/debarchiver.pl 2005-01-10 04:58:14.000000000 +0100 @@ -1653,7 +1653,7 @@ =head1 DESCRIPTION -The debian archiver is a tool that installs debian packages into a file structure suitable for apt-get, dselect and similar tools to use for updating the installed debian system. It is ment to be used by local administrators that needs special packages, or tweaked versions to ease administration. +The debian archiver is a tool that installs debian packages into a file structure suitable for apt-get, dselect and similar tools to use for updating the installed debian system. It is meant to be used by local administrators that needs special packages, or tweaked versions to ease administration. The file structure is based on the potato file structure and does not support package pools. This may be implemented later, but is not high priority. @@ -1691,7 +1691,7 @@ =item B<--instcmd> -DEPRICATED! +DEPRECATED! =item B<-d | --dest | --destdir> dir @@ -1727,15 +1727,15 @@ =item B<-o | --addoverride> -Automaticly add new packages to the override file. +Automatically add new packages to the override file. =item B<--autoscanpackages> -Automaticly run dpkg-scanpackages after all new packages are installed. +Automatically run dpkg-scanpackages after all new packages are installed. =item B<--autoscansources> -Automaticly run dpkg-scansources after all new packages are installed. +Automatically run dpkg-scansources after all new packages are installed. =item B<-a | --autoscan> @@ -1807,7 +1807,7 @@ =item B<@mailtos> -An array of strings that should be mailed to. If the string contains en email address that one is used. If it contains an incomplete email address, i.e. @hostname, the username owning the file is used @ the hostname specified. If no @ character is found in the string, it is considered as a field in the.changes file. Such a field can for example be Maintainer or Uploaders. +An array of strings that should be mailed to. If the string contains an email address that one is used. If it contains an incomplete email address, i.e. @hostname, the username owning the file is used @ the hostname specified. If no @ character is found in the string, it is considered as a field in the .changes file. Such a field can for example be Maintainer or Uploaders. =item B<%release> @@ -1819,7 +1819,7 @@ Using B<--autoscanpackages>, B<--autoscansources>, or B<--autoscan> will use B and B. This will generate the Packages and Sources files, but will not generate Contents files and can be slow with a large repository. -Alternately, the B<--index> I option will call B to index the package tree. B can also generate Contents files (for use with B), and can optionally use a cache of package information to speed up multiple runs. The B configuration file will be generated automatically. This is however not fully tested. +Alternatively, the B<--index> I option will call B to index the package tree. B can also generate Contents files (for use with B), and can optionally use a cache of package information to speed up multiple runs. The B configuration file will be generated automatically. This is however not fully tested. You should use either B<--autoscanpackages> and B<--autoscansources> or B<--index>, not both, as they both do basically the same thing. debarchiver-0.10.0/patches/turbo-foreachcorr.patch0000664000000000000000000001331211173250426017035 0ustar --- /usr/bin/debarchiver.old 2007-10-09 08:30:19.000000000 +0200 +++ /usr/bin/debarchiver 2007-10-09 08:43:13.000000000 +0200 @@ -679,9 +679,8 @@ sub determineMailTo() { my $to = ""; - my $toi; my %to_hash; - foreach $toi (@mailtos) { + foreach my $toi (@mailtos) { # Expand to email if there is no email address. if ($toi !~ /\@/) { $toi = $CConf{$toi}; @@ -819,11 +818,10 @@ ############################################################################### sub handleScanAll() { - my ($d, $s, $a); - foreach $d (@distributions) { - foreach $s (@sections) { + foreach my $d (@distributions) { + foreach my $s (@sections) { if (-e "$destdir/$d/$s/override") { - foreach $a (@architectures) { + foreach my $a (@architectures) { $dests{"$d/$s/binary-$a"} = 1; } $dests{"$d/$s/binary-all"} = 1; @@ -964,9 +962,9 @@ sub findSectionsArchitectures($\@\@) { my ($dir, $sectionlist, $archlist) = @_; my (%dirsections, %dirarches); - foreach $s (@sections) { + foreach my $s (@sections) { if (-e "$dir/$s/override") { - foreach $a (@architectures) { + foreach my $a (@architectures) { $dirarches{$a} = 1; } $dirarches{all} = 1; @@ -1034,7 +1032,7 @@ # distributions that are symlinks so that we don't index the same # distribution more than once. my %changedist = map { s%/.*%%; $_ => 1 } keys %dests; - foreach $d (keys %changedist) { + foreach my $d (keys %changedist) { my $codename = $distmapping{$d} || $d; next if -l "$destdir/$codename"; print CONF "Tree \"dists/$d\" {\n"; @@ -1171,11 +1169,11 @@ # section, so as to not append to Packages more than once even if we revist # the same area twice due to a symlink. my %changedist = map { s%/.*%%; $_ => 1 } keys %dests; - foreach $d (keys %changedist) { + foreach my $d (keys %changedist) { my (@dsections, @darches); &findSectionsArchitectures("$destdir/$d", \@dsections, \@darches); if (-s "$d/Contents-all") { - foreach $a (@darches) { + foreach my $a (@darches) { next if ($a eq 'source' || $a eq 'all'); action(! open(ARCH, ">> $d/Contents-$a"), "Append to $d/Contents-$a", @@ -1192,7 +1190,7 @@ } } unlink("$d/Contents-all", "$d/Contents-all.gz"); - foreach $s (@dsections) { + foreach my $s (@dsections) { if (-s "$d/$s/binary-all/Packages") { foreach $_ (@darches) { $a = $_; @@ -1416,8 +1414,7 @@ my ($kfile, $distr) = @_; parseDebOnlyFile($kfile, $distr); - my $file; - foreach $file (keys %CFiles) { + foreach my $file (keys %CFiles) { handlePackageFile($file); } } @@ -1451,8 +1448,8 @@ my $distrd = $CConf{Distribution}; my $inst_files = ""; - foreach $distr (split /\s+/, $distrd) { - my $distr = $distmapping{$distr} || $distr; + foreach my $distr (split /\s+/, $distrd) { + $distr = $distmapping{$distr} || $distr; my (undef, undef, $arch, undef) = parseFileName($file); my $archsec = "source"; @@ -1541,12 +1538,11 @@ # Verify changelog so it is complete, ok is default. # If incomplete continue checking for errors. my $ret = "ok"; - foreach $file (keys %CFiles) { + foreach my $file (keys %CFiles) { # Does it exist in the destdir? my $inst_files = checkFileInDestDirs($file); if ($inst_files ne "") { - my $inst_file; - foreach $inst_file (split / /, $inst_files) { + foreach my $inst_file (split / /, $inst_files) { # Get data for the file to install. my ($hash, $size, undef, undef) = parseFileStruct($CFiles{$file}); # Get size for the already installed one @@ -1636,8 +1632,7 @@ sub handleChangesFile($) { my ($cfile) = @_; - my $file; - foreach $file (keys %CFiles) { + foreach my $file (keys %CFiles) { handlePackageFile($file, $cfile); } installChangesFile($cfile); @@ -1685,7 +1680,6 @@ ############################################################################### sub rejectChangesFile() { - my $file; if (! -d "REJECT") { action(! mkpath ("REJECT", 0, 0775), "Making REJECT directory.", @@ -1696,7 +1690,7 @@ "Move .changes to REJECT dir.", 2); } - foreach $file (keys %CFiles) { + foreach my $file (keys %CFiles) { if (-f $file) { cmdaction ("$movecmd $file REJECT/", "Move $file to REJECT dir.", @@ -1747,8 +1741,7 @@ # OVERRIDES - my $distr; - foreach $distr (split /\s+/, $distrd) { + foreach my $distr (split /\s+/, $distrd) { $distr = $distmapping{$distr} || $distr; my $srcext = ".src" if ($arch =~ /^source$/); parseOverrideFile($distr, $major, $srcext); @@ -1855,8 +1848,7 @@ my ($cfile) = @_; my $distrd = $CConf{Distribution}; - my $distr; - foreach $distr (split /\s+/, $distrd) { + foreach my $distr (split /\s+/, $distrd) { $distr = $distmapping{$distr} || $distr; my $todir = relativePath($cinstall, "$destdir/$distr"); if ($cinstall !~ /^\s*$/) { @@ -2088,7 +2080,6 @@ sub parseDebOnlyFile($$) { my ($kfile, $distr) = @_; my $state = ""; - my $line; my $section; my $priority; my $size; @@ -2098,7 +2089,7 @@ %CFiles = (); %CDesc = (); my @cmdres = readcommand("dpkg-deb -f $kfile"); - foreach $line (@cmdres) { + foreach my $line (@cmdres) { # The state to just put the line in the hash. if ($line =~ /^\s*$/) { next; @@ -2277,9 +2268,8 @@ pdebug(5, "Load override file for $distr, $major"); my $odir = "$destdir/$distr/$major"; my @o = readfile("$odir/override$srcext"); - my $tmp; $Override{$distr,$major, $def} = 1; - foreach $tmp (@o) { + foreach my $tmp (@o) { my ($pkg, $prio, $section, $maint) = split(/\s+/, $tmp, 4); $pkg = "$pkg$srcext"; $Override{$distr, $major, $pkg, Priority} = $prio debarchiver-0.10.0/patches/update-l10n-fr.gz0000664000000000000000000001366111173250426015376 0ustar sCupdate-l10n-fr<]s8_N,*I\82IٻI"CEOroI"NM64F71k)w7\:so%iv( <7>grwM=˲_;Vg`p;٣~;iQ덇^1۲??Z?>8^xg?,ȋ0xyz}u~}c/炻68}}}v5}5 b}!%4=I! f%=!bf R -L$v,X,nu;MaA2=|NXr7q$b_E`K"7%`˘Sr|NSQ9E2O3I"b ~QYy:zD` Nn;ow8]HM?I,`0a;ѭ}-%A 'Qi1_u&a`8&Ŷ:uǽ1"m]mw'39toy[Wz"*ڢ@0H cv"7] FNrfg͘;RC{WۦxɝOhd2ԛeN.fT\F`Oh-n X9 !ҐzSM+[J1Iٴ R4bVZ#`ר?rv²x_古,i1 .{VԽ&{h>o~2}.o2-T ppgoBV[C0jLIB  WRkaRY={n^c9OQ[$o+&Lɺ&T^FuDbw ! ) hGٸ Wv'WK̞qLz7 09Tk bf)qε}gh3]NTP9j΅/E,c! &q.?ڢe}DƮ|oĺL1)s}$0Ae05&O_/cT3Ԉ=)Seɣۤ1?5Ovs!I{2T .&:I3=x6$$eÚQFgF˄[Ӥ[#]:ӮAgIwXa,yO׏KFaT^r,'Ny_*^ڜ5ٝIp M${;1m 8S=akS1 ѣ ߲lf{s&E+=`em𩒮^6rm:{iJg?O/s:\_b}Hԫѣ^G:g06D`|3i;0t;@وzц0 =HPՈZ쿟ˍ.;RJUqGsXN]o\KkF{yWEY5[F;v`A{E'S0$pR:)R q8u`qf)S=!6nlnL~lZAl'γt;GyQ&թ>,@6\F+J3SFJ'-.dpeUg nՇKqk`G'!jv`.--omζJtTj?Kb4 z FIv (nhmLA2 F f@zr|2 =@58(x&O֜85;,z}["MW\Lѹ',Cj T#ÂcIRjf47&ӰFf֜r*M=*[Ehp5yYMAOd$3Ue>$TShOE~U4)Ķ޳`x'DmӰVane5uoQQN 6-?R,&*^k[Ŵy@Ż}2QS@JP'Y0 ^8M(IũCߕ"b)KPHMAi,4mv&Dҵ9 px#TU4+|v3eptIA-_otE~9* V=Gs}h#uCxDe|* ӕB7[ӍGLwƙ ~6CuR#1zhjg)0`2PFa%K?.%k03*Ŷl.<V# D6J`ru@ H G)Cdߋn"$5qѸ-d5qM2Oĺ"MeޅS0i25pagҲGhR<68/Z9m^ 5xlr.+J/2ln6[O~X&5r9)x%__U!TIN{'2Rr'jHĒH ((!Ŕ{s`/9D@& Et\r2J aV2W ѱf]Oh=2,Z`9F]#네  , E{gOW5 :`ok)I~_LKAl|E.uy}>!sQk:TD6 8xK0_W1뜱 FG)Z Aʴ8:CsDJC }7%P <7H AFvy]]K.bwxTwFmv a?ɐ%1pP Ԇ+"TV{liPHqr}*g%!DWo-QRya=xV[^}]Be$ +h#Q@XUx+V; oMz_Յ/M%ZySF+%B2ê^H+~`TXe+pRCZ(֨Wo'3Ҩgƌݺ5e]ٿ9gwcYMT/I~}~uy/ɨ>Pڅ2 'Gw!ȌHz$=V܊&f5^КIH, h ܰ\˹SiXS޵MWk[-L NTH` ] Ƈyd;l|`hE`#"#Iv.VR`_*N\%񪘖b*ˍ1V1"+ȡފRtDM3 X q}*7,Sr-_vPu^ A@p)dtiTtRh?B`V׊ܐHӣ CxSb~5촶/.lxŖ;Wu[W8cFj\QHӃoCDa^};1'ʁMQp_?lpߡ F ߳$ASMtF9Q8fi^^mbn^qTu(b˞3{J ucGJ~x~x90NwZ0>&f"rMoeE[Q*W.FFoyXꭴU0k ;BQimcQ245Zƅ.W$Ps5+ ՋAjmf5\ӷi?^齖\cjfamO ˭p5ʸrz} cB"Y#>ƽ`n&yڿ/n@EWoZdebarchiver-0.10.0/patches/turbo-stat-only-existing.patch0000664000000000000000000000110711173250426020321 0ustar --- debarchiver.orig 2007-10-08 14:55:40.000000000 +0200 +++ debarchiver 2007-10-08 14:56:41.000000000 +0200 @@ -1424,7 +1424,7 @@ else { $ret = "incomplete"; } - } + } else { my (undef, undef, undef, undef, $fowner, undef, undef, $size) = stat($file); if ($fowner != $cfowner) { pdebug(4,"$file owner ($fowner) do not match $cfile owner ($cfowner)."); @@ -1448,7 +1448,7 @@ $CConf{ERROR} = "$CConf{ERROR}$cfile upload is broken, $file is bigger than expected.\n"; return "reject"; } - + } } # Verify signatures. if ($verify) { debarchiver-0.10.0/patches/apt-ftparchive-autoconfig-1.patch0000664000000000000000000005330211173250426020621 0ustar From: Russ Allbery Okay, here you go. This is working for me in testing. This patch does the following: * The --index option no longer takes a configuration file. Instead, the configuration file is always automatically generated from the debarchiver configuration. * Only the changed distribution is reindexed, if there are multiple distributions. apt-ftparchive has to index a distribution at a time, in order to generate accurate Contents files, so there's no way to be more granular with the --index option unfortunately. * apt-ftparchive is automatically configured to use a cache for package information. By default, that cache is stored in /var/cache/debarchiver, and the debian control files are updated below to create and deal with that directory like the other /var/lib directories that are created. * A new --cachedir command-line option and a new $cachedir configuration variable have been added to configure where the apt-ftparchive cache will be stored. I updated the sample configuration file to mention it. * Release files are no longer generated in directories where one of the components of the directory (up to the root of the archive) is a symlink. This is to keep Release files from being constantly regenerated when there's a testing -> unstable symlink, going back and forth between testing and unstable. I generalized this check, just in case someone is crazy enough to link non-free to main or binary-i386 to binary-alpha or something bizarre like that. * $release changed to $contents per previous discussion. * I noticed that override.src was getting touched only if override didn't exist, rather than checking for override.src, resulting in override.src not being created when the directory archive structure was being fixed. That's been fixed. * Some minor formatting fixes in the --help and POD documentation. Note that this patch generates some additional bits in the apt-ftparchive configuration file that apt-ftparchive doesn't currently know how to use, namely all the variables that start with Release::. They're ignored and are harmless, but will immediately do the right thing if my patch to apt-ftparchive in Debian bug #262204 is accepted. If you'd rather not include them yet out of cleanliness, I can give you a modified patch that doesn't include them (or just take out all the lines that include Release:: variables). After this patch, there are still two outstanding issues in generating archives that look just like the regular Debian archives except for pools: * Contents generation isn't quite right, since the "all" architecture is indexed independently of the binary architectures and apt-file doesn't know how to deal with that and merge them together. This is a bug in apt-ftparchive; I'm going to try to deal with it there. One could fix this in debarchiver, but I think it's more work than is really worth it when it's simpler to fix in apt-ftparchive. * The top-level Release file for each distribution isn't generated. If my patch in Debian bug #262204 is accepted into apt-utils, this will be fixed in apt-ftparchive, using those Release:: variables that are already set. --- debarchiver-0.0.37/debian/debarchiver.dirs.orig 2001-08-20 06:07:42.000000000 -0700 +++ debarchiver-0.0.37/debian/debarchiver.dirs 2004-08-10 14:03:27.000000000 -0700 @@ -1,5 +1,6 @@ usr/bin etc +var/cache/debarchiver var/lib/debarchiver/dists var/lib/debarchiver/incoming/stable var/lib/debarchiver/incoming/testing --- debarchiver-0.0.37/debian/debarchiver.postinst.orig 2003-05-12 12:26:43.000000000 -0700 +++ debarchiver-0.0.37/debian/debarchiver.postinst 2004-08-10 14:05:55.000000000 -0700 @@ -30,6 +30,10 @@ --gecos "Deb archiving tool" \ --group debarchiver fi + if [ "debarchiver.debarchiver" != $(find /var/cache/debarchiver -prune -printf "%u.%g") ] ; then + echo "Setting owner for /var/cache/debarchiver to debarchiver." + chown -Rf debarchiver.debarchiver /var/cache/debarchiver + fi if [ "debarchiver.debarchiver" != $(find /var/lib/debarchiver/dists -prune -printf "%u.%g") ] ; then echo "Setting owner for /var/lib/debarchiver/dists to debarchiver." chown -Rf debarchiver.debarchiver /var/lib/debarchiver/dists --- debarchiver-0.0.37/debian/debarchiver.conf.orig 2004-08-10 08:17:36.000000000 -0700 +++ debarchiver-0.0.37/debian/debarchiver.conf 2004-08-10 16:18:20.000000000 -0700 @@ -48,3 +48,7 @@ # %release = ( 'origin' => "", # 'label' => "", # 'description' => ""); + +# Where to put the apt-ftparchive cache files if --index is used. Default +# is /var/cache/debarchiver. Must be a directory. +# $cachedir = '/var/cache/debarchiver'; --- debarchiver-0.0.37/src/debarchiver.pl.orig 2004-08-10 08:09:53.000000000 -0700 +++ debarchiver-0.0.37/src/debarchiver.pl 2004-08-10 16:10:57.000000000 -0700 @@ -29,6 +29,7 @@ $mailcmd = "mail"; $movecmd = "mv"; $vrfycmd = "dscverify"; +$cachedir = "/var/cache/debarchiver"; $inputdir = "/var/lib/debarchiver/incoming"; $destdir = "/var/lib/debarchiver/dists"; $cinstall = "installed"; @@ -159,7 +160,7 @@ ############################# HELP ############################################ ############################################################################### -$version = "0.0.35"; +$version = "0.0.38"; $versionstring = "Debian package archiver, version $version"; $help = @@ -186,16 +187,15 @@ \$distrib/\$major/\$arch/\$section directory structure will be created. Default $destdir, relative to the input directory. - --index config Automatically run apt-ftparchive after all new packages - are installed. config must be an absolute path to the - configuration file to use for apt-ftparchive generate. - See the apt-ftparchive manual page for more - information. Use this *or* --autoscan, not both. + --index Automatically run apt-ftparchive after all new packages + are installed. Use this *or* --autoscan, not both. -i | --input dir This is the directory where debarchiver is looking for --indir dir new packages corresponding *.changes files that --inputdir dir should be installed to the --dest directory. The default directory is /var/lib/debarchiver/incoming. + --cachedir dir The apt-ftparchive package cache directory, if --index + is used. Default $cachedir. --lockfile file The lockfile to use, default $lockfile. --cinstall dir Where the .changes file will be installed to, empty string to remove it instead, default $cinstall. @@ -221,6 +221,8 @@ will be parsed. Here you can change the following variables \$destdir The destination directory (see --destdir above). \$inputdir The input directory (no effect in $inputconfigfile). + \$cachedir The cache directory for apt-ftparchive, used if + --index is used. \$copycmd The install command (see --copycmd). \$movecmd The move command (see --movecmd). \$rmcmd The remove command (see --rmcmd above). @@ -236,9 +238,9 @@ \@mailtos The fields in .changes file that should be used for mailing SUCCESS and REJECT messages. If there is an @ char in the arrach it will be used directly. - \%release Additional information to add to generated Release - files. Supported keys are origin, label, and - description. + \%release Additional information to add to generated Release + files. Supported keys are origin, label, and + description. "; ############################################################################### @@ -285,6 +287,9 @@ $destdir = shift @ARGS2; $destdir =~ s/\/$//; } + elsif (/^--cachedir$/) { + $cachedir = shift @ARGS2; + } elsif (/^--lockfile$/) { $lockfile = shift @ARGS2; } @@ -306,7 +311,6 @@ $autoscansources = 1; } elsif (/^--index$/) { - $aptconfig = shift @ARGS2; $indexall = 1; } elsif (/^--distinputcriteria/) { @@ -355,8 +359,7 @@ # Fix so that it scan all distributions, sections and so on. ############################################################################### -# apt-ftparchive always scans the entire archive. -if (defined $scanall or defined $indexall) { +if (defined $scanall) { handleScanAll(); } @@ -408,21 +411,36 @@ # Name: createRelease # Description: Create a Release file. # Dates: 2004-08-09 Written. +# 2004-08-10 Renamed $release to $contents. +# Don't generate if any under a symlink. # Arguments: directory, distribution, section, architecture # Uses: %release ############################################################################### sub createRelease($$$$) { my ($dir, $distribution, $section, $architecture) = @_; - my $release = ''; - $release .= "Archive: $distribution\n"; - $release .= "Component: $section\n"; - $release .= "Label: $release{label}\n" if defined $release{label}; - $release .= "Origin: $release{origin}\n" if defined $release{origin}; - $release .= "Architecture: $architecture\n"; - $release .= "Description: $release{description}\n" + my $contents = ''; + $contents .= "Archive: $distribution\n"; + $contents .= "Component: $section\n"; + $contents .= "Label: $release{label}\n" if defined $release{label}; + $contents .= "Origin: $release{origin}\n" if defined $release{origin}; + $contents .= "Architecture: $architecture\n"; + $contents .= "Description: $release{description}\n" if defined $release{description}; - $release .= "\n"; + $contents .= "\n"; + + # Don't generate a Release file if any level of the directory is a symlink, + # since otherwise for a testing -> unstable symlink, we'll keep regenerating + # the Release file, first for testing and then for unstable. Assume that + # we'll also be called with the non-symlink path and create the Release file + # then. + my @components = split('/', $dir); + for (my $i = 0; $i < @components; $i++) { + my $testdir = join ('/', @components[0..$i]); + if (-l "$testdir") { + return; + } + } # If the release file already exists, read it to see if anything has # changed. Don't recreate the file unless we're actually changing anything, @@ -432,14 +450,14 @@ local $/; my $old = ; close REL; - if ($release ne $old) { + if ($contents ne $old) { action(! open(REL, "> $dir/Release"), "Update Release file in $dir", 2); - print REL $release; + print REL $contents; close REL; } } else { action(! open(REL, "> $dir/Release"), "Create Release file in $dir", 2); - print REL $release; + print REL $contents; close REL; } } @@ -701,11 +719,96 @@ } ############################################################################### +# Name: findSectionsArchitectures +# Description: Find sections and architectures in a distribution. +# Dates: 2004-08-10 Written. +# Arguments: Path to distribution directory to check, +# reference to section array to fill out, +# reference to architectures array to fill out +############################################################################### + +sub findSectionsArchitectures($\@\@) { + my ($dir, $sectionlist, $archlist) = @_; + my (%dirsections, %dirarches); + foreach $s (@sections) { + if (-e "$dir/$s/override") { + foreach $a (@architectures) { + $dirarches{$a} = 1; + } + $dirarches{all} = 1; + $dirsections{$s} = 1; + } + if (-e "$dir/$s/override.src") { + $dirarches{source} = 1; + $dirsections{$s} = 1; + } + } + + # Do things this way so that the lists are in the same order as @sections + # and @architectures. Purely aesthetic. + @$sectionlist = grep { $dirsections{$_} } @sections; + @$archlist = grep { $dirarches{$_} } @architectures, 'all', 'source'; +} + +############################################################################### +# Name: generateIndexConfig +# Description: Generate an apt-ftparchive configuration for the archive. +# Dates: 2004-08-10 Written. +# Uses: %dests, $destdir, $cachedir +# Returns: Path to the generated config file +############################################################################### + +sub generateIndexConfig() { + my $destcdir = $destdir; + $destcdir =~ s|^(.*)/[^/]+$|$1|; + + my $configpath = "$destdir/.apt-ftparchive.conf"; + action(! open(CONF, "> $configpath"), "Create apt-ftparchive config", 2); + + # The common header. + print CONF "Dir {\n"; + print CONF " ArchiveDir \"$destcdir\";\n"; + print CONF " Cachedir \"$cachedir\";\n"; + print CONF "};\n\n"; + print CONF "TreeDefault {\n"; + print CONF " BinCacheDB \"cache.db\";\n"; + print CONF " Release::Origin \"$release{origin}\";\n" + if defined $release{origin}; + print CONF " Release::Label \"$release{label}\";\n" + if defined $release{label}; + print CONF "};\n\n"; + + # The keys of %dests are all of the distribution/section/arch paths that + # were modified in this run. We can have apt-ftparchive only index the + # distributions that were changed, but we have to reindex the entire + # distribution, since otherwise the Contents files won't be accurate. Find + # all affected distributions from %dests, but then locate all sections and + # architectures under there using the handleScanAll logic. Skip + # distributions that are symlinks so that we don't index the same + # distribution more than once. + my %changedist = map { s%/.*%%; $_ => 1 } keys %dests; + foreach $d (keys %changedist) { + my $codename = $distmapping{$d} || $d; + next if -l "$destdir/$codename"; + print CONF "Tree \"dists/$d\" {\n"; + my (@dsections, @darches); + &findSectionsArchitectures("$destdir/$d", \@dsections, \@darches); + print CONF " Sections \"", join (' ', @dsections), "\";\n"; + print CONF " Architectures \"", join (' ', @darches), "\";\n"; + print CONF " Release::Suite \"$d\";\n"; + print CONF " Release::Codename \"$codename\";\n"; + print CONF "};\n\n"; + } + close CONF; + return $configpath; +} + +############################################################################### # Name: handleIndex # Description: Handles the indexing via apt-ftparchive. # Dates: 2004-07-30 Written. # 2004-08-09 Add merging of binary-all Packages file. -# Uses: %dests, $destdir, $aptconfig +# Uses: %dests, $destdir # Changes: $ENV{PWD} ############################################################################### @@ -715,49 +818,47 @@ action(! chdir $destdir, "Change to dir $destdir", 2); &destinationLock(); + my $aptconfig = &generateIndexConfig(); cmdaction("apt-ftparchive generate $aptconfig", "Index source and package files in $destdir", 3); + unlink($aptconfig); # apt-ftparchive doesn't correctly combine binary-all/Packages with - # binary-arch/Packages, so we have to patch it up after the fact. We don't, - # however, want to patch up the same area twice, even if it appears twice in - # %dests (which it can in, say, the case of a symlink from testing to - # unstable and --scanall). We also don't want to leave the stray - # binary-all/Packages files around. + # binary-arch/Packages, so we have to patch it up after the fact. + # apt-ftparchive reindexes the whole distribution when anything in that + # distribution is touched, so find modified distributions and then touch up + # the Packages files for each section and architecture under there. # - # Therefore, build a hash of archive areas (unstable/main, testing/contrib, - # etc.), where the value is a hash of all of the architectures in that area - # that we care about. Then, for each archive area, patch up the Packages - # file for each architecture and then remove the binary-all Packages file. - # The removal will keep us from doing the patching up twice if we revist the - # same area through a symlink. - my %areas; - foreach $_ (keys %dests) { - my ($area, $arch) = m|(.*)/([^/]+)$|; - next if $arch eq 'binary-all'; - $areas{$area}{$arch} = 1; - } - foreach $_ (keys %areas) { - my $area = $_; - if (-s "$area/binary-all/Packages") { - foreach $_ (keys %{ $areas{$area} }) { - my $arch = $_; - action(! open(ARCH, ">> $area/$arch/Packages"), - "Append to $area/$arch/Packages", - 2); - action(! open(ALL, "$area/binary-all/Packages"), - "Read $area/binary-all/Packages", - 2); - print ARCH ; - close ALL; - close ARCH; - cmdaction("gzip $area/$arch/Packages -c > $area/$arch/Packages.gz", - "Compress merged Packages file", - 3); + # Remove binary-all/Packages after we finish with all architectures for a + # section, so as to not append to Packages more than once even if we revist + # the same area twice due to a symlink. + my %changedist = map { s%/.*%%; $_ => 1 } keys %dests; + foreach $d (keys %changedist) { + my (@dsections, @darches); + &findSectionsArchitectures("$destdir/$d", \@dsections, \@darches); + foreach $s (@dsections) { + if (-s "$d/$s/binary-all/Packages") { + foreach $_ (@darches) { + $a = $_; + next if ($a eq 'source' || $a eq 'all'); + $a = "binary-$a"; + action(! open(ARCH, ">> $d/$s/$a/Packages"), + "Append to $d/$s/binary-$a/Packages", + 2); + action(! open(ALL, "$d/$s/binary-all/Packages"), + "Read $d/$s/binary-all/Packages", + 2); + print ARCH ; + close ALL; + close ARCH; + cmdaction("gzip $d/$s/$a/Packages -c > $d/$s/$a/Packages.gz", + "Compress merged Packages file", + 3); + } } + unlink("$d/$s/binary-all/Packages", "$d/$s/binary-all/Packages.gz"); } - unlink("$area/binary-all/Packages", "$area/binary-all/Packages.gz"); } &destinationRelease(); @@ -855,7 +956,7 @@ "Create file $dis/$se/override.", 2); } - if (! -e "$dis/$se/override") { + if (! -e "$dis/$se/override.src") { cmdaction("touch $dis/$se/override.src", "Create file $dis/$se/override.src.", 2); @@ -1564,6 +1665,8 @@ --indir dir corresponding *.changes files that should be --inputdir dir installed to the --dest directory, default $instdir. + --cachedir dir The apt-ftparchive package cache directory, if --index + is used. Default $cachedir. --lockfile file The lockfile to use, default $lockfile. --cinstall dir Where the .changes file will be installed to, empty string to remove it instead, default $cinstall. @@ -1591,6 +1694,8 @@ $destdir The destination directory (see --destdir above). $inputdir The input directory (no effect in $inputconfigfile). + $cachedir The cache directory for apt-ftparchive, used if + --index is used. $copycmd The install command (see --copycmd). $movecmd The move command (see --movecmd). $rmcmd The remove command (see --rmcmd above). @@ -1611,7 +1716,7 @@ the string, it is considered as a field in the .changes file. Such a field can for example be Maintainer or Uploaders. - \%release Additional information to add to generated Release + %release Additional information to add to generated Release files. Supported keys are origin, label, and description. @@ -1625,52 +1730,15 @@ slow with a large repository. This, however, is simple and doesn't require any further configuration. -Alternately, the B<--index> I option will call B -with the I configuration file to index the whole package tree. -B can also generate Contents files (for use with -B), and can optionally use a cache of package information to speed -up multiple runs. However, you have to write the separate configuration -file. - -Here is a sample configuration file for B that indexes the -default destination directory with the distributions that were current at -the time of this writing, and with only the all and i386 architectures. It -uses F as the cache directory; you would need to -create this directory. - - Dir { - ArchiveDir "/var/lib/debarchiver"; - CacheDir "/var/lib/debarchiver/cache"; - }; - - TreeDefault { - BinCacheDB "cache.db"; - }; - - Tree "dists/sid" { - Sections "main contrib non-free"; - Architectures "all i386 source"; - }; - - Tree "dists/sarge" { - Sections "main contrib non-free"; - Architectures "all i386 source"; - }; - - Tree "dists/woody" { - Sections "main contrib non-free"; - Architectures "all i386 source"; - }; - -Save the above into a file, changing the paths, architectures, and trees as -needed for your purposes, and then call B with the B<--index> -option, passing it this configuration file as an argument. +Alternately, the B<--index> I option will call B to +index the package tree. B can also generate Contents files +(for use with B), and can optionally use a cache of package +information to speed up multiple runs. The B configuration +file will be generated automatically. You should use either B<--autoscanpackages> and B<--autoscansources> or B<--index>, not both, as they both do basically the same thing. -Neither at the moment can generate Release files. - =head1 AUTHOR Ola Lundqvist -- Russ Allbery (rra@stanford.edu) debarchiver-0.10.0/patches/324191-signed-release.patch0000664000000000000000000001171111173250426017040 0ustar diff -rupN debarchiver-0.3.2.save/debian/control debarchiver-0.3.2/debian/control --- debarchiver-0.3.2.save/debian/control 2005-02-27 06:53:10.000000000 -0800 +++ debarchiver-0.3.2/debian/control 2005-08-20 12:40:32.000000000 -0700 @@ -8,7 +8,7 @@ Standards-Version: 3.6.1 Package: debarchiver Architecture: all Depends: opalmod (>= 0.1.10), apt-utils | dpkg-dev, adduser -Suggests: devscripts +Suggests: devscripts, gnupg Description: Tool to handle debian package archives This tool can create a potato like file structure that dselect, apt-get and similar tools can use for easier installation. diff -rupN debarchiver-0.3.2.save/src/debarchiver.pl debarchiver-0.3.2/src/debarchiver.pl --- debarchiver-0.3.2.save/src/debarchiver.pl 2005-07-04 09:03:36.000000000 -0700 +++ debarchiver-0.3.2/src/debarchiver.pl 2005-08-20 12:41:53.000000000 -0700 @@ -271,6 +271,7 @@ will be parsed. Here you can change the \%release Additional information to add to generated Release files. Supported keys are origin, label, and description. + \$gpgkey GnuPG key to use to sign the archive. "; ############################################################################### @@ -895,6 +896,62 @@ sub generateIndexConfig() { } ############################################################################### +# Name: handleRelease +# Description: Handles creation of Release files via apt-ftparchive. +# Arguments: Path to the directory to generate Release for +# Archive suite this Release file is for +# Reference to array of sections +# Reference to array of architectures +# Uses: %distmapping, %release, $gpgkey +# Changelog: +# 2005-08-20 Russ Allbery +# Written. +############################################################################### + +sub generateRelease($$\@\@) { + my ($path, $suite, $dsections, $darches) = @_; + my $codename = $distmapping{$suite} || $suite; + + # Judging from the Release file in the Debian archive, "all" and "source" + # shouldn't be included. + my @arches = grep { $_ ne 'all' && $_ ne 'source' } @$darches; + + # We can't use the same config as generate, since release wants the + # variables set in a different place. + my $configpath = "$path/.apt-ftparchive.conf"; + action(! open(CONF, "> $configpath"), + "Create apt-ftparchive Release config for $path", 2); + my $prefix = 'APT::FTPArchive::Release'; + print CONF "${prefix}::Origin \"$release{origin}\";\n" + if defined $release{origin}; + print CONF "${prefix}::Label \"$release{label}\";\n" + if defined $release{label}; + print CONF "${prefix}::Description \"$release{description}\";\n" + if defined $release{description}; + print CONF "${prefix}::Suite \"$suite\";\n"; + print CONF "${prefix}::Codename \"$codename\";\n"; + print CONF "${prefix}::Architectures \"", join (' ', @arches), "\";\n"; + print CONF "${prefix}::Components \"", join (' ', @$dsections), "\";\n"; + close CONF; + + # Do the generation and optional signing. + unlink("$path/Release"); + cmdaction("apt-ftparchive -c $configpath release $path > Release", + "Generate Release file for $path", + 3); + cmdaction("mv Release $path/Release", + "Put Release for $path in the right location", + 3); + if ($gpgkey) { + cmdaction("gpg -a -b -s -u '$gpgkey' -o $path/Release.gpg" + . " $path/Release", + "Signing Release file for $path", + 3); + } + unlink("$configpath"); +} + +############################################################################### # Name: handleIndex # Description: Handles the indexing via apt-ftparchive. # Uses: %dests, $destdir @@ -908,6 +965,8 @@ sub generateIndexConfig() { # Modified to add bzip2 support and handle contents-all in a proper way. # 2005-05-02 Ola Lundqvist # Bugfix for bzip2 support. +# 2005-08-20 Russ Allbery +# Call generateRelease for Release file support (optionally signed). ############################################################################### sub handleIndex() { @@ -981,6 +1040,9 @@ sub handleIndex() { unlink("$d/$s/binary-all/Packages", "$d/$s/binary-all/Packages.gz", "$d/$s/binary-all/Packages.bz2"); } + + # This has to be done after we integrate the Packages files. + generateRelease($d, $d, @dsections, @darches); } &destinationRelease(); @@ -2089,6 +2151,12 @@ An array of strings that should be maile Additional information to add to generated Release files. Supported keys are origin, label, and description. +=item B<$gpgkey> + +GnuPG key to use to sign the archive. If this variable is set, the Release file for each changed section of the archive will be signed with GnuPG using $gpgkey as the key ID. Unless you use a key that has no passphrase, you will need to run B interactively when using this option so that you can supply the passphrase. + +=back + =head1 PACKAGE INDEXING There are two ways to generate the indexes that B relies on. debarchiver-0.10.0/patches/debarchiver-i10n-support.patch0000664000000000000000000005750611173250426020161 0ustar diff -pruN debarchiver-0.1.5.orig/debian/control debarchiver-0.1.5/debian/control --- debarchiver-0.1.5.orig/debian/control 2004-08-11 10:05:38.000000000 +0200 +++ debarchiver-0.1.5/debian/control 2005-02-26 16:15:46.000000000 +0100 @@ -2,7 +2,7 @@ Source: debarchiver Section: devel Priority: optional Maintainer: Ola Lundqvist -Build-Depends-Indep: perl (>= 5.6.0-16), debhelper (>> 3.0.18) +Build-Depends-Indep: perl (>= 5.6.0-16), debhelper (>> 3.0.18), po4a Standards-Version: 3.6.1 Package: debarchiver diff -pruN debarchiver-0.1.5.orig/debian/.cvsignore debarchiver-0.1.5/debian/.cvsignore --- debarchiver-0.1.5.orig/debian/.cvsignore 2001-08-17 14:24:24.000000000 +0200 +++ debarchiver-0.1.5/debian/.cvsignore 2005-02-26 16:57:42.000000000 +0100 @@ -1,5 +1,6 @@ debarchiver debarchiver.1 +debarchiver.fr.1 *.debhelper files *.substvars diff -pruN debarchiver-0.1.5.orig/debian/debarchiver.dirs debarchiver-0.1.5/debian/debarchiver.dirs --- debarchiver-0.1.5.orig/debian/debarchiver.dirs 2004-08-11 09:18:00.000000000 +0200 +++ debarchiver-0.1.5/debian/debarchiver.dirs 2005-02-26 16:16:20.000000000 +0100 @@ -6,3 +6,4 @@ var/lib/debarchiver/incoming/stable var/lib/debarchiver/incoming/testing var/lib/debarchiver/incoming/unstable usr/share/man/man1 +usr/share/man/fr/man1 diff -pruN debarchiver-0.1.5.orig/debian/rules debarchiver-0.1.5/debian/rules --- debarchiver-0.1.5.orig/debian/rules 2002-02-04 09:30:36.000000000 +0100 +++ debarchiver-0.1.5/debian/rules 2005-02-26 16:54:36.000000000 +0100 @@ -23,10 +23,17 @@ build-stamp: dh_testdir # Add here commands to compile the package. - pod2man --section=1 \ + podselect src/debarchiver.pl > man/debarchiver.pod + po4a man/po4a.cfg + pod2man --section=1 \ + --release="Debarchiver " \ + --date="$(DDATE)" \ + man/debarchiver.pod > debian/debarchiver.1 + pod2man --section=1 \ --release="Debarchiver " \ --date="$(DDATE)" \ - src/debarchiver.pl > debian/debarchiver.1 + man/debarchiver.fr.pod > debian/debarchiver.fr.1 + rm man/*.pod touch build-stamp @@ -37,6 +44,7 @@ clean: # Add here commands to clean up after the build process. -rm debian/debarchiver.1 + -rm debian/debarchiver.fr.1 dh_clean @@ -68,6 +76,8 @@ binary-indep: build install dh_installcron cp debian/debarchiver.1 $(DEST)/usr/share/man/man1 gzip -9 $(DEST)/usr/share/man/man1/*.1 + cp debian/debarchiver.fr.1 $(DEST)/usr/share/man/fr/man1/debarchiver.1 + gzip -9 $(DEST)/usr/share/man/fr/man1/*.1 dh_installinfo # dh_undocumented dh_installchangelogs diff -pruN debarchiver-0.1.5.orig/man/debarchiver.add.fr debarchiver-0.1.5/man/debarchiver.add.fr --- debarchiver-0.1.5.orig/man/debarchiver.add.fr 1970-01-01 01:00:00.000000000 +0100 +++ debarchiver-0.1.5/man/debarchiver.add.fr 2005-02-26 17:29:16.000000000 +0100 @@ -0,0 +1,13 @@ +PO4A-HEADER:mode=after;position=AUTEUR;beginboundary=\=head1 + +=head1 TRADUCTION + +Valry Perrin le 23 fvrier 2005. + +L'quipe de traduction a fait le maximum pour raliser une adaptation franaise de qualit. + +La version anglaise la plus jour de ce document est toujours consultable via la commande S< man -L en debarchiver >. + +N'hsitez pas signaler l'auteur ou au traducteur, selon le cas, toute erreur dans de cette page de manuel. + +=cut diff -pruN debarchiver-0.1.5.orig/man/po/fr.po debarchiver-0.1.5/man/po/fr.po --- debarchiver-0.1.5.orig/man/po/fr.po 1970-01-01 01:00:00.000000000 +0100 +++ debarchiver-0.1.5/man/po/fr.po 2005-02-26 18:09:44.000000000 +0100 @@ -0,0 +1,643 @@ +# SOME DESCRIPTIVE TITLE +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: debarchiver 0.1.2\n" +"POT-Creation-Date: 2005-02-26 18:09+0100\n" +"PO-Revision-Date: 2005-02-26 18:02+0100\n" +"Last-Translator: Valery Perrin \n" +"Language-Team: debian french \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: French\n" +"X-Poedit-Country: FRANCE\n" +"X-Poedit-SourceCharset: iso-8859-1\n" + +# type: =head1 +#: man/debarchiver.pod:1 +msgid "NAME" +msgstr "NOM" + +# type: textblock +#: man/debarchiver.pod:3 +msgid "debarchiver - Tool to sort debian packages." +msgstr "debarchiver - Outil de gestion des paquets Debian." + +# type: =head1 +#: man/debarchiver.pod:5 +msgid "SYNOPSIS" +msgstr "SYNOPSIS" + +# type: textblock +#: man/debarchiver.pod:7 +msgid "debarchiver [options]" +msgstr "debarchiver [options]" + +# type: =head1 +#: man/debarchiver.pod:9 +msgid "DESCRIPTION" +msgstr "DESCRIPTION" + +# type: textblock +#: man/debarchiver.pod:11 +msgid "" +"The debian archiver is a tool that installs debian packages into a file " +"structure suitable for apt-get, dselect and similar tools to use for " +"updating the installed debian system. It is meant to be used by local " +"administrators that needs special packages, or tweaked versions to ease " +"administration." +msgstr "" +"L'archiveur Debian (debarchiver) est un outil qui installe les paquets " +"Debian dans une structure de fichiers exploitable par apt-get, dselect et " +"d'autres outils semblables, utiliss pour la mise jour des systmes " +"Debian. Il est destin tre employ par des administrateurs locaux qui ont " +"besoin de paquets spciaux, ou de versions particulires, afin d'en " +"faciliter la gestion." + +# type: textblock +#: man/debarchiver.pod:13 +msgid "" +"The file structure is based on the potato file structure and does not " +"support package pools. This may be implemented later, but is not high " +"priority." +msgstr "" +"La structure de fichiers est base sur celle de potato et ne reconnat pas " +"la structure de paquets en S< pools > S<(NdT :> Structure utilise " +"partir de woody). Ceci pourra tre ralis plus tard, mais ce n'est pas une " +"priorit." + +# type: =head1 +#: man/debarchiver.pod:15 +msgid "OPTIONS" +msgstr "OPTIONS" + +# type: =item +#: man/debarchiver.pod:19 +msgid "B<--debug-level | --dl> level" +msgstr "B<--debug-level | --dl> niveau" + +# type: textblock +#: man/debarchiver.pod:21 +msgid "" +"What information that should be printed. 1=critical, 2=error, 3=normal, " +"4=message, 5=debug, 6=verbose debug (modules)." +msgstr "" +"Niveau des informations qui seront affiches. 1=critique, 2=erreur, " +"3=normal, 4=message, 5=dbogage, 6=dbogage dtaill (modules)." + +# type: =item +#: man/debarchiver.pod:23 +msgid "B<--quit-level> level" +msgstr "B<--quit-level> niveau" + +# type: textblock +#: man/debarchiver.pod:25 +msgid "On what level to quit the application, see debug level." +msgstr "" +"Niveau d'information qui produira l'arrt de l'excution, selon la " +"classification ci-dessus." + +# type: =item +#: man/debarchiver.pod:27 +msgid "B<-v | --version>" +msgstr "B<-v | --version>" + +# type: textblock +#: man/debarchiver.pod:29 +msgid "Prints the version string." +msgstr "Affiche le numro de version." + +# type: =item +#: man/debarchiver.pod:31 +msgid "B<--help>" +msgstr "B<--help>" + +# type: textblock +#: man/debarchiver.pod:33 +msgid "Prints this information." +msgstr "Affiche ce fichier d'aide S<(NdT :> Original en anglais)." + +# type: =item +#: man/debarchiver.pod:35 +msgid "B<--copycmd>" +msgstr "B<--copycmd>" + +# type: verbatim +#: man/debarchiver.pod:37 +#, no-wrap +msgid "" +"The install command to use, default $copycmd. Both packages and .changes files are installed using this command.\n" +" \n" +msgstr "" +"Commande utiliser pour l'installation. Par dfaut $copycmd. Les paquets ainsi que les fichiers indiqus dans .changes seront installs grce cette commande.\n" +"\n" + +# type: =item +#: man/debarchiver.pod:39 +msgid "B<--movecmd>" +msgstr "B<--movecmd>" + +# type: textblock +#: man/debarchiver.pod:41 +msgid "Command to move files (currently not used at all)." +msgstr "" +"Commande utiliser pour dplacer des fichiers (Actuellement parfaitement " +"inutile)." + +# type: =item +#: man/debarchiver.pod:43 +msgid "B<--rmcmd>" +msgstr "B<--rmcmd>" + +# type: textblock +#: man/debarchiver.pod:45 +msgid "" +"The remove command to use, default $rmcmd. This can be used to move away the " +"old packages to some other place." +msgstr "" +"Commande utiliser pour la suppression. Par dfaut $rmcmd. Cette commande " +"peut tre utilise pour dplacer les anciens paquets un autre emplacement." + +# type: =item +#: man/debarchiver.pod:47 +msgid "B<--instcmd>" +msgstr "B<--instcmd>" + +# type: textblock +#: man/debarchiver.pod:49 +msgid "DEPRECATED!" +msgstr "Obsolte !" + +# type: =item +#: man/debarchiver.pod:51 +msgid "B<-d | --dest | --destdir> dir" +msgstr "B<-d | --dest | --destdir> rpertoire" + +# type: textblock +#: man/debarchiver.pod:53 +msgid "" +"Destination directory. The base directory where all the distribution " +"packages reside. Here the $distrib/$major/$arch/$section directory structure " +"will be created. Default $destdir, relative to the input directory." +msgstr "" +"Rpertoire de destination. Rpertoire de base o sont situs tous les " +"paquets de la distribution. En cas de besoin, l'arborescence $distrib/$major/" +"$arch/$section sera cre. Par dfaut le chemin relatif $destdir sera " +"utilis." + +# type: =item +#: man/debarchiver.pod:55 +msgid "B<--scandetect | -s>" +msgstr "B<--scandetect | -s>" + +# type: verbatim +#: man/debarchiver.pod:57 +#, no-wrap +msgid "" +"Scan using apt-ftparchive or dpkg-scan* depending on what is installed on the system. This is the recommended way. Only use --index or --autoscan if you know what you are doing.\n" +" \n" +msgstr "" +"Choisit automatiquement d'utiliser, soit apt-ftparchive, soit dpkg-scan*, selon ce qui est install sur le systme. C'est la mthode recommande. N'utilisez --index ou --autoscan que si vous savez parfaitement ce que vous faites.\n" +"\n" + +# type: =item +#: man/debarchiver.pod:59 +msgid "B<-x | --index>" +msgstr "B<-x | --index>" + +# type: textblock +#: man/debarchiver.pod:61 +msgid "" +"Automatically run apt-ftparchive after all new packages are installed. " +"config must be an absolute path to the configuration file to use for apt-" +"ftparchive generate. See the apt-ftparchive manual page for more " +"information. Use this *or* --autoscan, not both." +msgstr "" +"Excute automatiquement apt-ftparchive aprs l'installation de tous les " +"nouveaux paquets. I doit tre un chemin absolu vers le fichier de " +"configuration employer pour qu'apt-ftparchive fonctionne. Voir les pages " +"du manuel d'apt-ftparchive pour plus d'informations. Utilisez cette option " +"*ou* l'option --autoscan, mais pas les deux ensemble." + +# type: =item +#: man/debarchiver.pod:63 +msgid "B<-i | --input | --indir | --inputdir> dir" +msgstr "B<-i | --input | --indir | --inputdir> rpertoire" + +# type: textblock +#: man/debarchiver.pod:65 +msgid "" +"This is the directory where the all packages and corresponding *.changes " +"files that should be installed to the --dest directory, default $instdir." +msgstr "" +"Rpertoire o tous les paquets, ainsi que les fichiers *.changes " +"correspondants, devront tre installs dans le rpertoire --dest. La valeur " +"par dfaut est $instdir." + +# type: =item +#: man/debarchiver.pod:67 +msgid "B<--cachedir> dir" +msgstr "B<--cachedir> rpertoire" + +# type: textblock +#: man/debarchiver.pod:69 +msgid "" +"The apt-ftparchive package cache directory, if --index is used. Default " +"$cachedir." +msgstr "" +"Rpertoire de cache utilis par apt-ftparchive (si --index est utilis). La " +"valeur par dfaut est $cachedir." + +# type: =item +#: man/debarchiver.pod:71 +msgid "B<--lockfile> file" +msgstr "B<--lockfile> fichier" + +# type: textblock +#: man/debarchiver.pod:73 man/debarchiver.pod:161 +msgid "The lockfile to use, default $lockfile." +msgstr "" +"Fichier de verrouillage utiliser. La valeur par dfaut est $lockfile." + +# type: =item +#: man/debarchiver.pod:75 +msgid "B<--cinstall> dir" +msgstr "B<--cinstall> rpertoire" + +# type: textblock +#: man/debarchiver.pod:77 +msgid "" +"Where the .changes file will be installed to, empty string to remove it " +"instead, default $cinstall." +msgstr "" +"Rpertoire o le fichier .changes sera install. Utiliser une chane vide " +"pour le supprimer. La valeur par dfaut est $cinstall." + +# type: =item +#: man/debarchiver.pod:79 +msgid "B<--distinputcriteria>" +msgstr "B<--distinputcriteria>" + +# type: verbatim +#: man/debarchiver.pod:81 +#, no-wrap +msgid "" +"The criteria for which binary packages that should be installed even if it does not have a .changes file, default $distinputcriteria.\n" +" \n" +msgstr "" +"Critres indiquant quels paquets binaires devront tre installs, mme en l'absence de fichier .changes. Par dfaut $distinputcriteria.\n" +" \n" + +# type: =item +#: man/debarchiver.pod:83 +msgid "B<-o | --addoverride>" +msgstr "B<-o | --addoverride>" + +# type: textblock +#: man/debarchiver.pod:85 +msgid "Automatically add new packages to the override file." +msgstr "" +"Ajoute automatiquement de nouveaux paquets au fichier des exclusions " +"(override)." + +# type: =item +#: man/debarchiver.pod:87 +msgid "B<--autoscanpackages>" +msgstr "B<--autoscanpackages>" + +# type: textblock +#: man/debarchiver.pod:89 +msgid "" +"Automatically run dpkg-scanpackages after all new packages are installed." +msgstr "" +"Dmarre automatiquement dpkg-scanpackages aprs l'installation de tous les " +"nouveaux paquets." + +# type: =item +#: man/debarchiver.pod:91 +msgid "B<--autoscansources>" +msgstr "B<--autoscansources>" + +# type: textblock +#: man/debarchiver.pod:93 +msgid "" +"Automatically run dpkg-scansources after all new packages are installed." +msgstr "" +"Lance automatiquement dpkg-scansources aprs l'installation de tous les " +"nouveaux paquets." + +# type: =item +#: man/debarchiver.pod:95 +msgid "B<-a | --autoscan>" +msgstr "B<-a | --autoscan>" + +# type: textblock +#: man/debarchiver.pod:97 +msgid "Does both --autoscanpackages and --autoscansources." +msgstr "Excute --autoscanpackages et --autoscansources." + +# type: =item +#: man/debarchiver.pod:99 +msgid "B<--scanall>" +msgstr "B<--scanall>" + +# type: textblock +#: man/debarchiver.pod:101 +msgid "Scan all distributions, sections, etc." +msgstr "Explore toutes les distributions, sections, etc." + +# type: =item +#: man/debarchiver.pod:103 +msgid "B<--autoscanall>" +msgstr "B<--autoscanall>" + +# type: textblock +#: man/debarchiver.pod:105 +msgid "Same as --scanall --autoscan." +msgstr "Identique --scanall --autoscan." + +# type: =item +#: man/debarchiver.pod:107 +msgid "B<--nosort>" +msgstr "B<--nosort>" + +# type: textblock +#: man/debarchiver.pod:109 +msgid "Do not sort packages." +msgstr "Ne trie pas les paquets." + +# type: =item +#: man/debarchiver.pod:111 +msgid "B<--nostructurefix>" +msgstr "B<--nostructurefix>" + +# type: textblock +#: man/debarchiver.pod:113 +msgid "Do not create directories and touch Package files." +msgstr "Ne cre pas les rpertoires ni les fichiers S< Package .>" + +# type: =item +#: man/debarchiver.pod:115 +msgid "B<--scanonly>" +msgstr "B<--scanonly>" + +# type: textblock +#: man/debarchiver.pod:117 +msgid "Same as --nosort --nostructurefix." +msgstr "Identique --nosort --nostructurefix." + +# type: =head1 +#: man/debarchiver.pod:119 +msgid "CONFIG FILE" +msgstr "FICHIER DE CONFIGURATION" + +# type: textblock +#: man/debarchiver.pod:121 +msgid "" +"You can also place config files with the following names (in following " +"order) /etc/debarchiver.conf, ~/.debarchiver.conf and input.conf (relative " +"to input directory) that will be read before, the arguments to this program " +"will be parsed. Here you can change the following variables:" +msgstr "" +"Vous pouvez galement utiliser des fichiers de configuration portant les " +"noms S /etc/debarchiver.conf, ~/.debarchiver.conf et input.conf " +"(chemin relatif) qui seront lus et exploits dans cet ordre. Les arguments " +"de la commande auront priorit sur ces fichiers de configuration. Voici les " +"variables que vous pouvez S" + +# type: =item +#: man/debarchiver.pod:123 +msgid "B<$destdir>" +msgstr "B<$destdir>" + +# type: textblock +#: man/debarchiver.pod:125 +msgid "The destination directory (see --destdir above)." +msgstr "Rpertoire de destination (voir --destdir ci-dessus)." + +# type: =item +#: man/debarchiver.pod:127 +msgid "B<$inputdir>" +msgstr "B<$inputdir>" + +# type: textblock +#: man/debarchiver.pod:129 +msgid "The input directory (no effect in $inputconfigfile)." +msgstr "Rpertoire d'entre (sans effet dans $inputconfigfile)." + +# type: =item +#: man/debarchiver.pod:131 +msgid "B<$cachedir>" +msgstr "B<$cachedir>" + +# type: textblock +#: man/debarchiver.pod:133 +msgid "The cache directory for apt-ftparchive, used if --index is used." +msgstr "" +"Rpertoire de cache pour apt-ftparchive, utilis si --index est prcis." + +# type: =item +#: man/debarchiver.pod:135 +msgid "B<$copycmd>" +msgstr "B<$copycmd>" + +# type: textblock +#: man/debarchiver.pod:137 +msgid "The install command (see --copycmd)." +msgstr "Commande d'installation (voir --copycmd ci-dessus)." + +# type: =item +#: man/debarchiver.pod:139 +msgid "B<$movecmd>" +msgstr "B<$movecmd>" + +# type: textblock +#: man/debarchiver.pod:141 +msgid "The move command (see --movecmd)." +msgstr "Commande de dplacement (voir --movecmd ci-dessus)." + +# type: =item +#: man/debarchiver.pod:143 +msgid "B<$rmcmd>" +msgstr "B<$rmcmd>" + +# type: textblock +#: man/debarchiver.pod:145 +msgid "The remove command (see --rmcmd above)." +msgstr "Commande de suppression (voir --rmcmd ci-dessus)." + +# type: =item +#: man/debarchiver.pod:147 +msgid "B<$cinstall>" +msgstr "B<$cinstall>" + +# type: textblock +#: man/debarchiver.pod:149 +msgid "Where the .changes files are installed (see --cinstall above)." +msgstr "" +"Emplacement o les fichiers .changes sont installs (voir --cinstall ci-" +"dessus)." + +# type: =item +#: man/debarchiver.pod:151 +msgid "B<$distinputcriteria>" +msgstr "B<$distinputcriteria>" + +# type: textblock +#: man/debarchiver.pod:153 +msgid "" +"The criteria for which packages that should be installed even if it does not " +"have a .changes file, default $distinputcriteria." +msgstr "" +"Critres permettant de dterminer les paquets qui devront tre installs " +"mme en l'absence de fichier .changes. Par dfaut $distinputcriteria." + +# type: =item +#: man/debarchiver.pod:155 +msgid "B<%distinputdirs>" +msgstr "B<%distinputdirs>" + +# type: textblock +#: man/debarchiver.pod:157 +msgid "" +"The directories (distribution => dir) that should be searched for extra " +"bianry packages that does not need a .changes file to be installed." +msgstr "" +"Rpertoires (nom de la distribution => nom du rpertoire) o devront tre " +"cherchs les paquets supplmentaires qui n'ont pas besoin de fichier ." +"changes pour tre installs." + +# type: =item +#: man/debarchiver.pod:159 +msgid "B<$lockfile>" +msgstr "B<$lockfile>" + +# type: =item +#: man/debarchiver.pod:163 +msgid "B<@mailtos>" +msgstr "B<@mailtos>" + +# type: textblock +#: man/debarchiver.pod:165 +msgid "" +"An array of strings that should be mailed to. If the string contains an " +"email address that one is used. If it contains an incomplete email address, " +"i.e. @hostname, the username owning the file is used @ the hostname " +"specified. If no @ character is found in the string, it is considered as a " +"field in the .changes file. Such a field can for example be Maintainer or " +"Uploaders." +msgstr "" +"Tableau de chanes indiquant les destinataires de courriel. Si la chane " +"contient une adresse mail, celle-ci sera utilise. Si elle contient une " +"adresse mail incomplte, par exemple @nom_hte, le nom de l'utilisateur " +"propritaire du fichier sera utilis en combinaison avec le @nom_hte " +"indiqu. Si aucun caractre @ n'est trouv dans la chane, on considrera " +"qu'il s'agit d'un champ dans le fichier .changes. Un tel champ peut par " +"exemple tre S< Maintainer > ou S< Uploaders .>" + +# type: =item +#: man/debarchiver.pod:167 +msgid "B<%release>" +msgstr "B<%release>" + +# type: textblock +#: man/debarchiver.pod:169 +msgid "" +"Additional information to add to generated Release files. Supported keys " +"are origin, label, and description." +msgstr "" +"Information complmentaire ajouter au fichier Release. Les mots-cls " +"supports S origin, label, et description." + +# type: =head1 +#: man/debarchiver.pod:171 +msgid "PACKAGE INDEXING" +msgstr "INDEXATION DES PAQUETS" + +# type: textblock +#: man/debarchiver.pod:173 +msgid "There are two ways to generate the indexes that B relies on." +msgstr "" +"Il y a deux manires de produire des index exploitables par S :>" + +# type: textblock +#: man/debarchiver.pod:175 +msgid "" +"Using B<--autoscanpackages>, B<--autoscansources>, or B<--autoscan> will use " +"B and B. This will generate the " +"Packages and Sources files, but will not generate Contents files and can be " +"slow with a large repository." +msgstr "" +"On peut utiliser B<--autoscanpackages>, B<--autoscansources>, ou B<-- " +"autoscan> ce qui emploiera B et B. Ceci " +"produira les paquets et les fichiers source mais ne gnrera pas les " +"fichiers Contents et risque d'tre lent avec un rfrentiel de grande taille." + +# type: textblock +#: man/debarchiver.pod:177 +msgid "" +"Alternatively, the B<--index> I option will call B " +"to index the package tree. B can also generate Contents " +"files (for use with B), and can optionally use a cache of package " +"information to speed up multiple runs. The B configuration " +"file will be generated automatically. This is however not fully tested." +msgstr "" +"En revanche, l'option B<--index > I utilisera B pour " +"indexer l'arbre des paquets. B peut galement produire des " +"fichiers Contents (destins B), et il peut, ventuellement, " +"employer un cache afin d'acclrer des excutions multiples. Le fichier de " +"configuration B sera produit automatiquement. Ceci cependant " +"n'a pas t compltement test." + +# type: textblock +#: man/debarchiver.pod:179 +msgid "" +"You should use either B<--autoscanpackages> and B<--autoscansources> or B<--" +"index>, not both, as they both do basically the same thing." +msgstr "" +"Vous devez employer soit B<--autoscanpackages> et B<--autoscansources> soit " +"B<--index>, mais pas les deux, puisqu'ils font la mme chose." + +# type: textblock +#: man/debarchiver.pod:181 +msgid "" +"The default action (and the recommended) is B<--scandetect> that probe for " +"installed software and use the best choice depending on what software you " +"have installed (choose between --index and --autoscan right now)." +msgstr "" +"L'action par dfaut (et celle qui est recommande) est B<--scandetect> qui " +"analyse les logiciels dj installs et choisit efficacement entre --index " +"et --autoscan suivant ce que vous avez implant sur votre systme." + +# type: =head1 +#: man/debarchiver.pod:183 +msgid "FILES" +msgstr "FICHIERS" + +# type: textblock +#: man/debarchiver.pod:185 +msgid "B" +msgstr "B" + +# type: =head1 +#: man/debarchiver.pod:187 +msgid "SEE ALSO" +msgstr "VOIR AUSSI" + +# type: textblock +#: man/debarchiver.pod:189 +msgid "B(1)" +msgstr "B(1)" + +# type: =head1 +#: man/debarchiver.pod:191 +msgid "AUTHOR" +msgstr "AUTEUR" + +# type: textblock +#: man/debarchiver.pod:193 +msgid "Ola Lundqvist " +msgstr "Ola Lundqvist " diff -pruN debarchiver-0.1.5.orig/man/po4a.cfg debarchiver-0.1.5/man/po4a.cfg --- debarchiver-0.1.5.orig/man/po4a.cfg 1970-01-01 01:00:00.000000000 +0100 +++ debarchiver-0.1.5/man/po4a.cfg 2005-02-26 15:46:45.000000000 +0100 @@ -0,0 +1,3 @@ +[po4a_paths] man/po/debarchiver.pot fr:man/po/fr.po +[type: pod] ./man/debarchiver.pod fr:./man/debarchiver.fr.pod \ + add_fr:./man/debarchiver.add.fr debarchiver-0.10.0/patches/incomingerror_handler_fix.patch0000664000000000000000000000651111173250426020632 0ustar --- a/src/debarchiver.pl 2006-07-20 08:08:17.000000000 +0000 +++ b/src/debarchiver.pl 2006-11-25 16:31:10.000000000 +0000 @@ -1188,6 +1188,12 @@ # 2005-05-06 Daniel Leidert # Add arg to handle signature verification in inputdir and distinput-dirs # independetly. +# 2006-11-24 Håkon Stordahl +# Substituted the call to rejectChangesFile with a call to pdebug, +# to explicitly trigger the error handler incomingError, which +# itself contains a call to rejectChangesFile. This is in order +# to avoid a situation in which an error in rejectChangesFile +# causes rejectChangesFile to be called again. ############################################################################### sub findAndSortChangesFiles($;$) { @@ -1207,8 +1213,11 @@ uploaderIsChangesFileOwner($cfile); my ($verify, $reason) = verifyChangesFile($cfile, $verify); if ($verify =~ /^reject$/) { - # Reject .changes file. - rejectChangesFile(); + # Reject .changes file by calling pdebug with error + # level 2, which in turn calls the error handler + # for this function, incomingError, which calls + # rejectChangesFile. + pdebug(2, "Rejecting $cfile."); } elsif ($verify =~ /^incomplete$/) { # Handle incomplete .changes file. @@ -1696,6 +1705,29 @@ ############################################################################### ######################### LOCK HANDLERS ####################################### ############################################################################### +# Changelog: +# 2006-11-24 Håkon Stordahl +# Tried to fix the error handler functions incomingError and +# rejectError, by removing the lock file in rejectError instead +# of incomingError, so the lock file is not removed immediately +# after an error, but rather if another error occurs while +# handling the error. Also added a call to exit in rejectError +# so the program will terminate in this case. +# +# Because of the chdir in handleSorting, the lock file name +# needs to prefixed by $inputdir in the functions incomingError +# and rejectError. +# +# Restored the error handler in incomingError so subsequent +# errors are treated in the same way. +# +# Also moved the call to mailReject from the function rejectError +# to the function incomingError, so a mail is sent each time +# a .changes file is rejected. When called from rejectError, +# which actually is the error handler of incomingError, which +# itself is an error handler and calls rejectChangesFile, a mail +# would only be sent if there was a problem with the rejection. +############################################################################### sub incomingLock() { &createLockExit("$lockfile"); @@ -1708,15 +1740,16 @@ } sub incomingError() { - &setErrorHandler(undef); - &removeLockfile("$lockfile"); &setErrorHandler(\&rejectError); &rejectChangesFile(); + &mailReject(); + &setErrorHandler(\&incomingError); } sub rejectError() { &setErrorHandler(undef); - &mailReject(); + &removeLockfile("$inputdir/$lockfile"); + exit; } sub destinationLock() { debarchiver-0.10.0/patches/inputdirs-verify.patch0000664000000000000000000001746611173250426016750 0ustar diff -puN --recursive debarchiver-old/conf/debarchiver.conf debarchiver/conf/debarchiver.conf --- debarchiver-old/conf/debarchiver.conf 2005-05-07 00:18:51.871769272 +0200 +++ debarchiver/conf/debarchiver.conf 2005-05-07 00:17:35.378398032 +0200 @@ -8,8 +8,15 @@ # $vrfycmd = "dscverify"; # $cinstall = "installed"; # $distinputcriteria = "^kernel.*\\.deb\$"; + +# Choose to enable or disable signature verification for packages uploaded +# into $inputdir (not %distinputdirs). # $verifysignatures = 0; +# Choose to enable or disable signature verification for packages uploaded +# into %distinputdirs. This works indepentently from $verifysignatures. +# $verifysignaturesdistinput = 0; + # Generate bzip2 files or not (1 will generate and 0 will not do so). # $bzip = 0; diff -puN --recursive debarchiver-old/src/debarchiver.pl debarchiver/src/debarchiver.pl --- debarchiver-old/src/debarchiver.pl 2005-05-07 00:18:51.873768968 +0200 +++ debarchiver/src/debarchiver.pl 2005-05-07 00:24:13.486876344 +0200 @@ -27,6 +27,8 @@ use OpaL::read qw(readfile readcommand); # Written # 2005-05-01 Ola Lundqvist # Bug fix for bzip2 support. +# 2005-05-06 Daniel Leidert +# Add setting to enable/disable signature checking in distinput-dirs. $copycmd = "cp -af"; $rmcmd = "rm -f"; $mailcmd = "mail"; @@ -40,6 +42,7 @@ $lockfile = "debarchiver.lock"; $etcconfigfile = "/etc/debarchiver.conf"; $inputconfigfile = "input.conf"; $verifysignatures = 0; +$verifysignaturesdistinput = 0; $userconfigfile = "$ENV{HOME}/.debarchiver.conf"; $bzip = 0; @@ -985,17 +988,20 @@ sub handleIndex() { ############################################################################### # Name: handleSorting -# Arguments: override distribution(s) (optional) +# Arguments: signature checking, override distribution(s) (optional) # Description: Sort packages into the right place. # Uses: parseChangesFile, verifyChangesFile, handleChangesFile # Changelog: # 2005-05-01 Ola Lundqvist # Written using parts of handleSorting. # Improved changes file verification structure. +# 2005-05-06 Daniel Leidert +# Add arg to handle signature verification in inputdir and distinput-dirs +# independetly. ############################################################################### -sub findAndSortChangesFiles(;$) { - my ($override) = @_; +sub findAndSortChangesFiles($;$) { + my ($verify, $override) = @_; opendir(D, "."); my $found = 1; @@ -1009,7 +1015,7 @@ sub findAndSortChangesFiles(;$) { if ($cfile =~ /\.changes$/) { parseChangesFile($cfile); uploaderIsChangesFileOwner($cfile); - my ($verify, $reason) = verifyChangesFile($cfile); + my ($verify, $reason) = verifyChangesFile($cfile, $verify); if ($verify =~ /^reject$/) { # Reject .changes file. rejectChangesFile(); @@ -1043,6 +1049,9 @@ sub findAndSortChangesFiles(;$) { # 2005-05-01 Ola Lundqvist # Broke out .changes file handling to a separate function # findAndSortChangesFiles. +# 2005-05-06 Daniel Leidert +# Add signatur checking setting to arguments given to +# findAndSortChangesFiles(). # Uses: A lot. ############################################################################### @@ -1054,7 +1063,7 @@ sub handleSorting() { &incomingLock(); # Look in the incoming directory for .changes files. - findAndSortChangesFiles(); + findAndSortChangesFiles($verifysignatures); # Look in the incoming/ directories for either .changes # files or for plain .debs matching the dist input criteria. @@ -1063,7 +1072,7 @@ sub handleSorting() { my $inpdir = "$inputdir/$distinputdirs{$dir}"; if (-d $inpdir) { action(! chdir "$inpdir", "Change to dir $inpdir", 2); - findAndSortChangesFiles($dir); + findAndSortChangesFiles($verifysignaturesdistinput, $dir); opendir(D, "."); my $file; while (defined($file = readdir(D))) { @@ -1166,7 +1175,7 @@ sub handleDebOnlyFile($$) { # Uses: pdebug, uploaderIsChangesFileOwner # %CFiles # $filename => "$hash $size $section $type" -# Arguments: The .changes file. +# Arguments: The .changes file and the signature checking setting. # Returns: # incomplete Incomplete upload. # reject Reject a changes file. @@ -1178,10 +1187,13 @@ sub handleDebOnlyFile($$) { # Renamed from parseChangesFile to verifyChangesFile and removed parse # part. Rewrote parts to allow it to return some kind of status. # Added code to verify that changes file upload is complete. +# 2005-05-06 Daniel Leidert +# Add arg to handle signature verification in inputdir and distinput-dirs +# independetly. ############################################################################### -sub verifyChangesFile($) { - my ($cfile) = @_; +sub verifyChangesFile($$) { + my ($cfile, $verify) = @_; # Get changes file owner uid my $cfowner = (stat $cfile)[4]; my $clastmod = (stat $cfile)[9]; @@ -1202,7 +1214,7 @@ sub verifyChangesFile($) { } my (undef, undef, undef, undef, $fowner, undef, undef, $size) = stat($file); if ($fowner != $cfowner) { - pdebug(4,"$file owner do not match $cfile owner."); + pdebug(4,"$file owner ($fowner) do not match $cfile owner ($cfowner)."); $CConf{ERROR} = "$CConf{ERROR}$file owner do not match $cfile owner.\n"; return "reject"; } @@ -1226,7 +1238,7 @@ sub verifyChangesFile($) { } # Verify signatures. - if ($verifysignatures) { + if ($verify) { if (system($vrfycmd,$cfile)) { # non-zero == verification failure pdebug(4, "Signature verification failed for $cfile"); $CConf{ERROR} = "$CConf{ERROR}$vrfycmd was not able to verify $cfile.\n"; @@ -1305,6 +1317,8 @@ sub uploaderIsChangesFileOwner($) { # Switched to using CMeta for ChangeLog meta information. # 2005-05-01 Ola Lundqvist # Modified reject cause. +# 2005-05-06 Daniel Leidert +# Fixed move-command and check for .changes file. ############################################################################### sub rejectChangesFile() { @@ -1314,14 +1328,14 @@ sub rejectChangesFile() { "Making REJECT directory.", 2); } - if ($CMeta{ChangesFile} != "") { - cmdaction("$mvcmd $CMeta{ChangesFile} REJECT/", + if (-f $CMeta{ChangesFile}) { + cmdaction("$movecmd $CMeta{ChangesFile} REJECT/", "Move .changes to REJECT dir.", 2); } foreach $file (keys %CFiles) { if (-f $file) { - cmdaction ("$mvcmd $file REJECT/", + cmdaction ("$movecmd $file REJECT/", "Move $file to REJECT dir.", 3); } @@ -2044,7 +2058,7 @@ Where the .changes files are installed ( =item B<$bzip> -If set to 0 no bzip2 fils will be generated. If set to 1 bzip2 files will +If set to 0 no bzip2 files will be generated. If set to 1 bzip2 files will be generated. =item B<$distinputcriteria> @@ -2055,6 +2069,14 @@ The criteria for which packages that sho Directories (distribution => dir) to be searched for binary packages that do not need a .changes file to be installed but match $distinputcriteria. The default is kernel packages generated by make-kpkg which does not generate a .changes file. Additionally binary packages with a valid .changes file will have the default distribution overridden to be the current queue directory. This causes uploads to a specific queue to place the package into that distribution directly. +=item B<$verifysignatures> + +Choose to enable (1) or disable (0) signature verification for packages uploaded into $inputdir (not %distinputdirs). + +=item B<$verifysignaturesdistinput> + +Choose to enable (1) or disable (2) signature verification for packages uploaded into %distinputdirs. This works independently from $verifysignatures. + =item B<$lockfile> The lockfile to use, default $lockfile. debarchiver-0.10.0/patches/192433-newdirfix.patch0000664000000000000000000000077011173250426016155 0ustar From: Achim Derigs --- debarchiver 2003-03-19 07:57:34.000000000 +0100 +++ debarchiver 2003-05-08 12:51:34.000000000 +0200 @@ -593,6 +593,11 @@ "Concatenate packages files from binary-all and $d.", 3); } + else { + cmdaction("cat $archdest/Packages.gen > $archdest/Packages", + "Copy packages file from $d.", + 3); + } cmdaction("gzip $archdest/Packages -c > $archdest/Packages.gz", "Zip it", 3); debarchiver-0.10.0/patches/328449-generaterelease-fix.patch0000664000000000000000000000225211173250426020102 0ustar --- debarchiver/src/debarchiver.pl 2005-09-09 21:43:52.000000000 +0200 +++ /usr/bin/debarchiver 2005-09-15 13:53:37.000000000 +0200 @@ -49,7 +49,9 @@ $verifysignaturesdistinput = 0; $userconfigfile = "$ENV{HOME}/.debarchiver.conf"; $bzip = 0; $gpgpassfile = "$ENV{HOME}/.gnupg/passphrase"; -$gpgpassfile = "" if (! -f $gpgpassfile); +if ($gpgpassfile) { + $gpgpassfile = 0 if (! -f $gpgpassfile); +} ############################################################################### ########################## DECLARATION ######################################## @@ -967,10 +969,10 @@ sub generateRelease($$\@\@) { if ($gpgkey) { unlink("$path/Release.gpg"); if ($gpgpassfile) { - cmdaction("gpg -a -b -s --passphrase-fd 2 -u '$gpgkey' -o $path/Release.gpg" - . " $path/Release 2 diff -ur debarchiver-0.0.18.orig/debian/control debarchiver-0.0.18/debian/control --- debarchiver-0.0.18.orig/debian/control Wed Jan 23 14:24:00 2002 +++ debarchiver-0.0.18/debian/control Mon Apr 15 23:11:48 2002 @@ -8,6 +8,7 @@ Package: debarchiver Architecture: all Depends: opalmod (>= 0.1.6), dpkg-dev +Suggests: devscripts Description: Tool to handle debian package archives. This tool can create a potato like file structure that dselect, apt-get and similar tools can use for easier installation. diff -ur debarchiver-0.0.18.orig/debian/debarchiver.conf debarchiver-0.0.18/debian/debarchiver.conf --- debarchiver-0.0.18.orig/debian/debarchiver.conf Mon Aug 20 07:07:42 2001 +++ debarchiver-0.0.18/debian/debarchiver.conf Mon Apr 15 23:10:41 2002 @@ -5,8 +5,10 @@ # $copycmd = "cp -af"; # $movecmd = "mv"; # $rmcmd = "rm -f"; +# $vrfycmd = "dscverify"; # $cinstall = "installed"; # $distinputcriteria = "^kernel.*\\.deb\$"; +# $verifysignatures = 0; # This one is used for debarchives that matches above criteria. # %distinputdirs = diff -ur debarchiver-0.0.18.orig/src/debarchiver.pl debarchiver-0.0.18/src/debarchiver.pl --- debarchiver-0.0.18.orig/src/debarchiver.pl Sat Jan 26 15:59:04 2002 +++ debarchiver-0.0.18/src/debarchiver.pl Mon Apr 15 23:15:58 2002 @@ -27,12 +27,14 @@ $copycmd = "cp -af"; $rmcmd = "rm -f"; $movecmd = "mv"; +$vrfycmd = "dscverify"; $inputdir = "/var/lib/debarchiver/incoming"; $destdir = "/var/lib/debarchiver/dists"; $cinstall = "installed"; $lockfile = "debarchiver.lock"; $etcconfigfile = "/etc/debarchiver.conf"; $inputconfigfile = "input.conf"; +$verifysignatures = 0; $userconfigfile = "$ENV{HOME}/.debarchiver.conf"; ############################################################################### @@ -566,6 +568,13 @@ sub handleChangesFile($) { my ($cfile) = @_; + + if ($verifysignatures) { + if (system($vrfycmd,$cfile)) { # non-zero == verification failure + pdebug(2, "Signature verification failed for $cfile"); + return; + } + } parseChanges($cfile); my $file; debarchiver-0.10.0/patches/bzip2-and-contents-all-fix.patch0000664000000000000000000001132711173250426020366 0ustar From: Daniel Leidert I attached a diff to the current debarchiver script from 0.1.8, containing the necessary fixes to solve bugs #304532 and #307004. For #304532: The manpage needs an update to mention the -b|--bzip option and debarchiver.conf should contain a line 'bzip = 0;' too. BTW: There is another issue in the manpage: -x | --index says 'config must be an absolute path to the configuration file to use for apt-ftparchive generate ...'. debarchiver does not accept a path or a file as argument. Or am I wrong? Regards, Daniel --- /usr/bin/debarchiver 2005-04-13 22:29:44.000000000 +0200 +++ /usr/local/bin/debarchiver2 2005-04-30 13:49:29.374001624 +0200 @@ -34,6 +34,7 @@ $inputdir = "/var/lib/debarchiver/incomi $destdir = "/var/lib/debarchiver/dists"; $cinstall = "installed"; $lockfile = "debarchiver.lock"; +$bzip2 = 0; $etcconfigfile = "/etc/debarchiver.conf"; $inputconfigfile = "input.conf"; $verifysignatures = 0; @@ -213,6 +214,8 @@ options: packages are installed. --autoscansources Automaticly run dpkg-scansources after all new packages are installed. + -b | --bzip Create bzip2 compressed Packages.bz2 and Sources.bz2 + files. -a | --autoscan Does both --autoscanpackages and --autoscansources. Use this *or* --index, not both. --scanall Scan all distributions, sections, etc. @@ -332,6 +335,9 @@ while ($_ = shift @ARGS2) { } } } + elsif (/^-b$/ || /^--bzip$/) { + $bzip = 1; + } elsif (/^--distinputcriteria/) { $distinputcriteria = shift @ARGS2; } @@ -681,6 +687,11 @@ sub handleScan() { cmdaction("gzip $archdest/Sources -c > $archdest/Sources.gz", "Zip it", 3); + if (defined $bzip) { + cmdaction("bzip2 $archdest/Sources -c > $archdest/Sources.bz2", + "BZip it", + 3); + } } elsif (defined $autoscanpackages) { cmdaction("dpkg-scanpackages $archdest $over/override 2>&1 > $archdest/Packages.gen", @@ -711,6 +722,11 @@ sub handleScan() { cmdaction("gzip $over/$d/Packages -c > $over/$d/Packages.gz", "Zip it", 3); + if (defined $bzip) { + cmdaction("bzip2 $over/$d/Packages -c > $over/$d/Packages.bz2", + "BZip it", + 3); + } } } closedir DD; @@ -729,6 +745,11 @@ sub handleScan() { cmdaction("gzip $archdest/Packages -c > $archdest/Packages.gz", "Zip it", 3); + if (defined $bzip) { + cmdaction("bzip2 $archdest/Packages -c > $archdest/Packages.bz2", + "BZip it", + 3); + } } } } @@ -789,6 +810,13 @@ sub generateIndexConfig() { print CONF " ArchiveDir \"$destcdir\";\n"; print CONF " Cachedir \"$cachedir\";\n"; print CONF "};\n\n"; + print CONF "Default {\n"; + print CONF " Packages::Compress \". gzip bzip2\";\n" + if defined $bzip; + print CONF " Sources::Compress \". gzip bzip2\";\n" + if defined $bzip; + print CONF " Contents::Compress \". gzip\";\n"; + print CONF "};\n\n"; print CONF "TreeDefault {\n"; print CONF " BinCacheDB \"cache.db\";\n"; print CONF " Release::Origin \"$release{origin}\";\n" @@ -856,6 +884,24 @@ sub handleIndex() { foreach $d (keys %changedist) { my (@dsections, @darches); &findSectionsArchitectures("$destdir/$d", \@dsections, \@darches); + if (-s "$d/Contents-all") { + foreach $a (@darches) { + next if ($a eq 'source' || $a eq 'all'); + action(! open(ARCH, ">> $d/Contents-$a"), + "Append to $d/Contents-$a", + 2); + action(! open(ALL, "$d/Contents-all"), + "Read $d/Contents-all", + 2); + print ARCH ; + close ALL; + close ARCH; + cmdaction("gzip $d/Contents-$a -c > $d/Contents-$a.gz", + "Compress merged Contents files", + 3); + } + } + unlink("$d/Contents-all", "$d/Contents-all.gz"); foreach $s (@dsections) { if (-s "$d/$s/binary-all/Packages") { foreach $_ (@darches) { @@ -872,11 +918,17 @@ sub handleIndex() { close ALL; close ARCH; cmdaction("gzip $d/$s/$a/Packages -c > $d/$s/$a/Packages.gz", - "Compress merged Packages file", + "Compress merged Packages file with gzip", 3); + if (defined $bzip) { + cmdaction("bzip2 $d/$s/$a/Packages -c > $d/$s/$a/Packages.bz2", + "Compress merged Packages file with bzip2", + 3); + } } } - unlink("$d/$s/binary-all/Packages", "$d/$s/binary-all/Packages.gz"); + unlink("$d/$s/binary-all/Packages", "$d/$s/binary-all/Packages.gz", + "$d/$s/binary-all/Packages.bz2"); } } debarchiver-0.10.0/patches/debarchiver_fix_gpg_run.patch0000664000000000000000000001036111173250426020255 0ustar Index: conf/debarchiver.conf =================================================================== --- conf/debarchiver.conf (Revision 2147) +++ conf/debarchiver.conf (Arbeitskopie) @@ -17,11 +17,6 @@ # into %distinputdirs. This works indepentently from $verifysignatures. # $verifysignaturesdistinput = 0; -# The command to use for siging files. Used for Release files. -# This command take four arguments input file, output file, key and optionally -# a file with a password. -# $signcmd = "/usr/lib/debarchiver/signhelper/signhelper.sh"; - # Generate bzip2 files or not (1 will generate and 0 will not do so). # $bzip = 0; Index: src/debarchiver.pl =================================================================== --- src/debarchiver.pl (Revision 2147) +++ src/debarchiver.pl (Arbeitskopie) @@ -60,6 +60,8 @@ # Removed fix regarding $gpgpassfile (moved to checks below). # 2005-10-12 Daniel Leidert # Fix signcmd default. +# 2005-10-14 Daniel Leidert +# Remove signcmd variable. $copycmd = "cp -af"; $rmcmd = "rm -f"; @@ -76,7 +78,6 @@ $verifysignatures = 0; $verifysignaturesdistinput = 0; $userconfigfile = "$ENV{HOME}/.debarchiver.conf"; -$signcmd = "/usr/lib/debarchiver/signhelper/signhelper.sh"; $bzip = 0; $gpgpassfile = "$ENV{HOME}/.gnupg/passphrase"; @@ -255,6 +256,8 @@ # Inspired by a patch from Alexander Wirt . # Now invokes a helper program to sign the files. It may be implemented # by some perl module but this solution was good enough. +# 2005-10-14 Daniel Leidert +# Removed signcmd. $version = "0.2.0"; $versionstring = "Debian package archiver, version $version"; @@ -349,10 +352,6 @@ description. \$gpgkey GnuPG key to use to sign the archive. \$gpgpassfile File to provide password to GnuPG. - \$signcmd The command to use for siging files. Used for Release - files. This command take four arguments input file, - output file, key and optionally a file with a - password. "; ############################################################################### @@ -1004,6 +1003,9 @@ # 2005-10-08 Ola Lundqvist # Now invokes a helper program to sign the files. It may be implemented # by some perl module but this solution was good enough. +# 2005-10-14 Daniel Leidert +# No longer invokes a helper program. We run gpg in batch mode without +# tty to work-around old problems. ############################################################################### sub generateRelease($$\@\@) { @@ -1041,10 +1043,19 @@ "Put Release for $path in the right location", 3); if ($gpgkey) { - cmdaction("$signcmd '$path/Release' '$path/Release.gpg' ". - "'$gpgkey' '$gpgpassfile'", - "Signing Release file for $path with key '$gpgkey'", - 3); + unlink("$path/Release.gpg"); + if ($gpgpassfile) { + cmdaction("cat $gpgpassfile | gpg --batch --no-tty -a -b -s -u $gpgkey " . + "--passphrase-fd 0 -o $path/Release.gpg $path/Release", + "Signing Release file for $path with key '$gpgkey'", + 3); + } + else { + cmdaction("gpg --batch --no-tty -a -b -s -u $gpgkey " . + "-o $path/Release.gpg $path/Release", + "Signing Release file for $path with key '$gpgkey'", + 3); + } } unlink("$configpath"); } @@ -2270,10 +2281,6 @@ A file that contain the passphrase for the GnuPG key. See $gpgkey for more information. -=item B<$signcmd> - -The command to use for siging files. Used for Release files. This command take four arguments input file, output file, key and optionally a file with a password. - =back =head1 PACKAGE INDEXING Index: README.gnupg =================================================================== --- README.gnupg (Revision 2147) +++ README.gnupg (Arbeitskopie) @@ -160,8 +160,6 @@ To enable automatic archive signing: # vi /etc/debarchiver.conf - -> uncomment $signcmd - $signcmd = "/usr/lib/debarchiver/signhelper/signhelper.sh"; -> $gpgkey = "MY_ARCHIVE_SIGNING_KEY"; (replace MY_ARCHIVE_SIGNING_KEY with the appropriate value) -> $gpgpassfile = "$ENV{HOME}/.gnupg/passphrase"; debarchiver-0.10.0/patches/better-manpage-look.patch0000664000000000000000000003062411173250426017251 0ustar From: Valery Perrin The purpose of this patch is to improve the look of the man pages and to allow its translation more easily. This is working for me in testing. This patch does the following: * Make a better look to man page with using =item * add a description in DESCRIPTION section by copy of readme introduction * add apt-ftparchive in SEE-ALSO section * add debarchiver.conf in FILES section --- ../src/debarchiver.pl.orig 2004-09-08 14:04:22.000000000 +0200 +++ ../src/debarchiver.pl 2005-01-01 15:19:40.000000000 +0100 @@ -1653,122 +1653,188 @@ =head1 DESCRIPTION +The debian archiver is a tool that installs debian packages into a file structure suitable for apt-get, dselect and similar tools to use for updating the installed debian system. It is ment to be used by local administrators that needs special packages, or tweaked versions to ease administration. + +The file structure is based on the potato file structure and does not support package pools. This may be implemented later, but is not high priority. =head1 OPTIONS - --debug-level level What information that should be printed. - --dl level 1 = critical, 2 = error, 3 = normal, - 4 = message, 5 = debug, 6 = verbose debug (modules). - --quit-level level On what level to quit the application, see debug level. - -v | --version Prints the version string. - --help Prints this information. - --copycmd The install command to use, default $copycmd. - Both packages and .changes files are installed using - this command. - --movecmd Command to move files (currently not used at all). - --rmcmd The remove command to use, default $rmcmd. - This can be used to move away the old packages to - some other place. - --instcmd DEPRICATED! - -d | --dest dir Destination directory. The base directory where all - --destdir dir the distribution packages reside. Here the - \$distrib/\$major/\$arch/\$section directory structure - will be created. Default $destdir, relative to the - input directory. - --scandetect | -s Scan using apt-ftparchive or dpkg-scan* depending on - what is installed on the system. This is the - recommended way. Only use --index or --autoscan if - you know what you are doing. - -x | --index Automatically run apt-ftparchive after all new packages - are installed. config must be an absolute path to the - configuration file to use for apt-ftparchive generate. - See the apt-ftparchive manual page for more - information. Use this *or* --autoscan, not both. - -i | --input dir This is the directory where the all packages and - --indir dir corresponding *.changes files that should be - --inputdir dir installed to the --dest directory, - default $instdir. - --cachedir dir The apt-ftparchive package cache directory, if --index - is used. Default $cachedir. - --lockfile file The lockfile to use, default $lockfile. - --cinstall dir Where the .changes file will be installed to, - empty string to remove it instead, default $cinstall. - --distinputcriteria The criteria for which binary packages that should be - installed even if it does not have a .changes file, - default $distinputcriteria. - -o | --addoverride Automaticly add new packages to the override file. - --autoscanpackages Automaticly run dpkg-scanpackages after all new - packages are installed. - --autoscansources Automaticly run dpkg-scansources after all new - packages are installed. - -a | --autoscan Does both --autoscanpackages and --autoscansources. - --scanall Scan all distributions, sections, etc. - --autoscanall Same as --scanall --autoscan. - --nosort Do not sort packages. - --nostructurefix Do not create directories and touch Package files. - --scanonly Same as --nosort --nostructurefix. +=over 4 + +=item B<--debug-level | --dl> level + +What information that should be printed. 1=critical, 2=error, 3=normal, 4=message, 5=debug, 6=verbose debug (modules). + +=item B<--quit-level> level + +On what level to quit the application, see debug level. + +=item B<-v | --version> + +Prints the version string. + +=item B<--help> + +Prints this information. + +=item B<--copycmd> + +The install command to use, default $copycmd. Both packages and .changes files are installed using this command. + +=item B<--movecmd> + +Command to move files (currently not used at all). + +=item B<--rmcmd> + +The remove command to use, default $rmcmd. This can be used to move away the old packages to some other place. + +=item B<--instcmd> + +DEPRICATED! + +=item B<-d | --dest | --destdir> dir + +Destination directory. The base directory where all the distribution packages reside. Here the $distrib/$major/$arch/$section directory structure will be created. Default $destdir, relative to the input directory. + +=item B<--scandetect | -s> + +Scan using apt-ftparchive or dpkg-scan* depending on what is installed on the system. This is the recommended way. Only use --index or --autoscan if you know what you are doing. + +=item B<-x | --index> + +Automatically run apt-ftparchive after all new packages are installed. config must be an absolute path to the configuration file to use for apt-ftparchive generate. See the apt-ftparchive manual page for more information. Use this *or* --autoscan, not both. + +=item B<-i | --input | --indir | --inputdir> dir + +This is the directory where the all packages and corresponding *.changes files that should be installed to the --dest directory, default $instdir. + +=item B<--cachedir> dir + +The apt-ftparchive package cache directory, if --index is used. Default $cachedir. + +=item B<--lockfile> file + +The lockfile to use, default $lockfile. + +=item B<--cinstall> dir + +Where the .changes file will be installed to, empty string to remove it instead, default $cinstall. + +=item B<--distinputcriteria> + +The criteria for which binary packages that should be installed even if it does not have a .changes file, default $distinputcriteria. + +=item B<-o | --addoverride> + +Automaticly add new packages to the override file. + +=item B<--autoscanpackages> + +Automaticly run dpkg-scanpackages after all new packages are installed. + +=item B<--autoscansources> + +Automaticly run dpkg-scansources after all new packages are installed. + +=item B<-a | --autoscan> + +Does both --autoscanpackages and --autoscansources. + +=item B<--scanall> + +Scan all distributions, sections, etc. + +=item B<--autoscanall> + +Same as --scanall --autoscan. + +=item B<--nosort> + +Do not sort packages. + +=item B<--nostructurefix> + +Do not create directories and touch Package files. + +=item B<--scanonly> + +Same as --nosort --nostructurefix. =head1 CONFIG FILE -You can also place config files with the following names (in following order) -/etc/debarchiver.conf, ~/.debarchiver.conf and input.conf (relative to input -directory) that will be read before, the arguments to this program -will be parsed. Here you can change the following variables: - - $destdir The destination directory (see --destdir above). - $inputdir The input directory (no effect in $inputconfigfile). - $cachedir The cache directory for apt-ftparchive, used if - --index is used. - $copycmd The install command (see --copycmd). - $movecmd The move command (see --movecmd). - $rmcmd The remove command (see --rmcmd above). - $cinstall Where the .changes files are installed - (see --cinstall above). - $distinputcriteria The criteria for which packages that should be - installed even if it does not have a .changes file, - default $distinputcriteria. - %distinputdirs The directories (distribution => dir) that should be - searched for extra bianry packages that does not need - a .changes file to be installed. - $lockfile The lockfile to use, default $lockfile. - @mailtos An array of strings that should be mailed to. - If the string contains en email address that one is - used. If it contains an incomplete email address, i.e. - @hostname, the username owning the file is used @ - the hostname specified. If no @ character is found in - the string, it is considered as a field in the - .changes file. Such a field can for example be - Maintainer or Uploaders. - %release Additional information to add to generated Release - files. Supported keys are origin, label, and - description. +You can also place config files with the following names (in following order) /etc/debarchiver.conf, ~/.debarchiver.conf and input.conf (relative to input directory) that will be read before, the arguments to this program will be parsed. Here you can change the following variables: + +=item B<$destdir> + +The destination directory (see --destdir above). + +=item B<$inputdir> + +The input directory (no effect in $inputconfigfile). + +=item B<$cachedir> + +The cache directory for apt-ftparchive, used if --index is used. + +=item B<$copycmd> + +The install command (see --copycmd). + +=item B<$movecmd> + +The move command (see --movecmd). + +=item B<$rmcmd> + +The remove command (see --rmcmd above). + +=item B<$cinstall> + +Where the .changes files are installed (see --cinstall above). + +=item B<$distinputcriteria> + +The criteria for which packages that should be installed even if it does not have a .changes file, default $distinputcriteria. + +=item B<%distinputdirs> + +The directories (distribution => dir) that should be searched for extra bianry packages that does not need a .changes file to be installed. + +=item B<$lockfile> + +The lockfile to use, default $lockfile. + +=item B<@mailtos> + +An array of strings that should be mailed to. If the string contains en email address that one is used. If it contains an incomplete email address, i.e. @hostname, the username owning the file is used @ the hostname specified. If no @ character is found in the string, it is considered as a field in the.changes file. Such a field can for example be Maintainer or Uploaders. + +=item B<%release> + +Additional information to add to generated Release files. Supported keys are origin, label, and description. =head1 PACKAGE INDEXING There are two ways to generate the indexes that B relies on. -Using B<--autoscanpackages>, B<--autoscansources>, or B<--autoscan> will use -B and B. This will generate the -Packages and Sources files, but will not generate Contents files and can be -slow with a large repository. - -Alternately, the B<--index> I option will call B to -index the package tree. B can also generate Contents files -(for use with B), and can optionally use a cache of package -information to speed up multiple runs. The B configuration -file will be generated automatically. This is however not fully tested. - -You should use either B<--autoscanpackages> and B<--autoscansources> or -B<--index>, not both, as they both do basically the same thing. - -The default action (and the recommended) is B<--scandetect> that probe for -installed software and use the best choice depending on what software you -have installed (choose between --index and --autoscan right now). +Using B<--autoscanpackages>, B<--autoscansources>, or B<--autoscan> will use B and B. This will generate the Packages and Sources files, but will not generate Contents files and can be slow with a large repository. -=head1 AUTHOR +Alternately, the B<--index> I option will call B to index the package tree. B can also generate Contents files (for use with B), and can optionally use a cache of package information to speed up multiple runs. The B configuration file will be generated automatically. This is however not fully tested. -Ola Lundqvist +You should use either B<--autoscanpackages> and B<--autoscansources> or B<--index>, not both, as they both do basically the same thing. + +The default action (and the recommended) is B<--scandetect> that probe for installed software and use the best choice depending on what software you have installed (choose between --index and --autoscan right now). + +=head1 FILES + +B =head1 SEE ALSO +B(1) + +=head1 AUTHOR + +Ola Lundqvist + =cut debarchiver-0.10.0/patches/149120-scanallfix.patch0000664000000000000000000000235411173250426016275 0ustar From: Werner Fleck --- debarchiver.2002-08-05 Mon Aug 5 15:51:14 2002 +++ debarchiver Mon Aug 5 16:23:03 2002 @@ -248,10 +248,10 @@ $autoscansources = 1; } elsif (/^--scanall$/) { - handleScanAll(); + $scanall = 1; } elsif (/^--autoscanall$/) { - handleScanAll(); + $scanall = 1; $autoscanpackages = 1; $autoscansources = 1; } @@ -287,6 +287,14 @@ handleStructureFix(); ############################################################################### +# Fix so that it scan all distributions, sections and so on. +############################################################################### + +if (defined $scanall) { + handleScanAll(); +} + +############################################################################### # Sort packages. ############################################################################### @@ -519,6 +527,11 @@ 2); } for $se (@sections) { + if (! -e "$dis/$se/override") { + cmdaction("touch $dis/$se/override", + "Create file $dis/$se/override.", + 2); + } if (! -d "$dis/$se/binary-all") { action(! mkpath("$dis/$se/binary-all", 0, 0755), "Create binary-all directory $dis/$se/binary-all", debarchiver-0.10.0/patches/262206-apt-ftparchivesupport.patch0000664000000000000000000001525311173250426020526 0ustar From: Russ Allbery Package: debarchiver Version: 0.0.35 Tags: patch Followup-For: Bug #262206 Here you go. As you can see, apt-ftparchive is far, far easier to use than dpkg-scanpackages, although it needs a separate configuration file. Most of the patch is documentation. (Incidentally, I'd be happy to flesh out the man page if you'd like and you're happy with the style of documentation that I write.) Let me know if anything bothers you about this patch; this is the very easy and minimally intrusive approach, and I can see a few other ways that I could have added the functionality. --- debarchiver-0.0.35/src/debarchiver.pl.orig 2003-08-28 02:45:27.000000000 -0700 +++ debarchiver-0.0.35/src/debarchiver.pl 2004-07-30 17:44:57.000000000 -0700 @@ -184,6 +184,11 @@ \$distrib/\$major/\$arch/\$section directory structure will be created. Default $destdir, relative to the input directory. + --index config Automatically run apt-ftparchive after all new packages + are installed. config must be an absolute path to the + configuration file to use for apt-ftparchive generate. + See the apt-ftparchive manual page for more + information. Use this *or* --autoscan, not both. -i | --input dir This is the directory where debarchiver is looking for --indir dir new packages corresponding *.changes files that --inputdir dir should be installed to the --dest directory. @@ -201,6 +206,7 @@ --autoscansources Automaticly run dpkg-scansources after all new packages are installed. -a | --autoscan Does both --autoscanpackages and --autoscansources. + Use this *or* --index, not both. --scanall Scan all distributions, sections, etc. --autoscanall Same as --scanall --autoscan. --nosort Do not sort packages. @@ -294,6 +300,10 @@ $autoscanpackages = 1; $autoscansources = 1; } + elsif (/^--index$/) { + $aptconfig = shift @ARGS2; + $indexall = 1; + } elsif (/^--distinputcriteria/) { $distinputcriteria = shift @ARGS2; } @@ -352,6 +362,9 @@ handleSorting(); handleScan(); +if (defined $indexall) { + handleIndex(); +} ############################################################################### ########################### FUNCTIONS ######################################### @@ -641,6 +654,27 @@ } ############################################################################### +# Name: handleIndex +# Description: Handles the indexing via apt-ftparchive. +# Dates: 2004-07-30 Written. +# Uses: %dests, $destdir, $aptconfig +# Changes: $ENV{PWD} +############################################################################### + +sub handleIndex() { + $destdir =~ s|/$||; + + action(! chdir $destdir, "Change to dir $destdir", 2); + &destinationLock(); + + cmdaction("apt-ftparchive generate $aptconfig", + "Index source and package files in $destdir", + 3); + + &destinationRelease(); +} + +############################################################################### # Name: handleSorting # Description: Sort packages into the right place. # Dates: 2001-07-23 Moved from START section to this subprocedure. @@ -1429,6 +1463,11 @@ \$distrib/\$major/\$arch/\$section directory structure will be created. Default $destdir, relative to the input directory. + --index config Automatically run apt-ftparchive after all new packages + are installed. config must be an absolute path to the + configuration file to use for apt-ftparchive generate. + See the apt-ftparchive manual page for more + information. Use this *or* --autoscan, not both. -i | --input dir This is the directory where the all packages and --indir dir corresponding *.changes files that should be --inputdir dir installed to the --dest directory, @@ -1481,6 +1520,62 @@ .changes file. Such a field can for example be Maintainer or Uploaders. +=head1 PACKAGE INDEXING + +There are two ways to generate the indexes that B relies on. + +Using B<--autoscanpackages>, B<--autoscansources>, or B<--autoscan> will use +B and B. This will generate the +Packages and Sources files, but will not generate Contents files and can be +slow with a large repository. This, however, is simple and doesn't require +any further configuration. + +Alternately, the B<--index> I option will call B +with the I configuration file to index the whole package tree. +B can also generate Contents files (for use with +B), and can optionally use a cache of package information to speed +up multiple runs. However, you have to write the separate configuration +file. + +Here is a sample configuration file for B that indexes the +default destination directory with the distributions that were current at +the time of this writing, and with only the all and i386 architectures. It +uses F as the cache directory; you would need to +create this directory. + + Dir { + ArchiveDir "/var/lib/debarchiver"; + CacheDir "/var/lib/debarchiver/cache"; + }; + + TreeDefault { + BinCacheDB "cache.db"; + }; + + Tree "dists/sid" { + Sections "main contrib non-free"; + Architectures "all i386 source"; + }; + + Tree "dists/sarge" { + Sections "main contrib non-free"; + Architectures "all i386 source"; + }; + + Tree "dists/woody" { + Sections "main contrib non-free"; + Architectures "all i386 source"; + }; + +Save the above into a file, changing the paths, architectures, and trees as +needed for your purposes, and then call B with the B<--index> +option, passing it this configuration file as an argument. + +You should use either B<--autoscanpackages> and B<--autoscansources> or +B<--index>, not both, as they both do basically the same thing. + +Neither at the moment can generate Release files. + =head1 AUTHOR Ola Lundqvist -- System Information: Debian Release: 3.1 APT prefers testing APT policy: (990, 'testing'), (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.4.26 Locale: LANG=C, LC_CTYPE=C (ignored: LC_ALL set to C) Versions of packages debarchiver depends on: ii adduser 3.57 Add and remove users and groups ii dpkg-dev 1.10.22 Package building tools for Debian ii opalmod 0.1.12 A set of modules for various tasks -- no debconf information debarchiver-0.10.0/patches/turbo-timecheck-only-once.patch0000664000000000000000000000242411173250426020377 0ustar --- /usr/bin/debarchiver.old 2007-10-09 09:04:57.000000000 +0200 +++ /usr/bin/debarchiver 2007-10-09 09:07:57.000000000 +0200 @@ -1535,6 +1535,10 @@ # Get changes file owner uid my $cfowner = (stat $cfile)[4]; my $clastmod = (stat $cfile)[9]; + my $old_changes = 0; + if ($clastmod < time() - $incompletetime) { + $old_changes = 1; + } # Verify changelog so it is complete, ok is default. # If incomplete continue checking for errors. my $ret = "ok"; @@ -1556,7 +1560,7 @@ } elsif (! -f $file) { # Modification time of the changesfile. - if ($clastmod < time() - $incompletetime) { + if ($old_changes) { pdebug(4, "$cfile is incomplete and is older than $incompletetime seconds."); $CConf{ERROR} = "$CConf{ERROR}$cfile is incomplete and is older than $incompletetime seconds.\n"; return "reject"; @@ -1576,7 +1580,7 @@ if ($size < $cfsize) { # Modification time of the changesfile. pdebug(4, "$cfile is incomplete and is older than $incompletetime seconds as $file is not of full size."); - if ($clastmod < time() - $incompletetime) { + if ($old_changes) { $CConf{ERROR} = "$CConf{ERROR}$cfile is incomplete and is older than $incompletetime seconds as $file is not of full size.\n"; return "reject"; } debarchiver-0.10.0/patches/262206-better-apt-ftparchivesupport.patch0000664000000000000000000001043111173250426022002 0ustar From: Russ Allbery Ola Lundqvist writes: > Debarchiver does already do that. dpkg-scanpackages have exactly the > same problem. > If you could check if it works just as it should I would be greatful. > I'll apply the patch anyway. I had seriously misunderstood how things were working inside debarchiver, and I'm afraid that the first patch really didn't do the right thing. This patch, against the current debarchiver version, should do a much better job. It's based on a separate script I'm currently using to clean up after various indexing problems, which I'm attempting to slowly make obsolete by folding the changes into debarchiver and apt-ftparchive. Note that this patch is still a workaround for a problem that's really in apt-ftparchive, and I'm going to try to get it fixed there, but this will be harmless once apt-ftparchive is fixed and useful in the interim. This patch also adds a Recommends for apt-utils (to get apt-ftparchive); I don't know if you want a Recommends or a Suggests for that. I'm going to work on building the Release files next, and then on building the apt-ftparchive configuration file automatically. --- debarchiver-0.0.36/src/debarchiver.pl.orig 2004-08-06 03:08:01.000000000 -0700 +++ debarchiver-0.0.36/src/debarchiver.pl 2004-08-09 12:19:26.000000000 -0700 @@ -350,7 +350,8 @@ # Fix so that it scan all distributions, sections and so on. ############################################################################### -if (defined $scanall) { +# apt-ftparchive always scans the entire archive. +if (defined $scanall or defined $indexall) { handleScanAll(); } @@ -361,9 +362,10 @@ action(! chdir $inputdir, "Change to dir $inputdir", 2); handleSorting(); -handleScan(); if (defined $indexall) { handleIndex(); +} else { + handleScan(); } ############################################################################### @@ -657,12 +659,13 @@ # Name: handleIndex # Description: Handles the indexing via apt-ftparchive. # Dates: 2004-07-30 Written. +# 2004-08-09 Add merging of binary-all Packages file. # Uses: %dests, $destdir, $aptconfig # Changes: $ENV{PWD} ############################################################################### sub handleIndex() { - $destdir =~ s|/$||; + $destdir =~ s|/+$||; action(! chdir $destdir, "Change to dir $destdir", 2); &destinationLock(); @@ -671,6 +674,47 @@ "Index source and package files in $destdir", 3); + # apt-ftparchive doesn't correctly combine binary-all/Packages with + # binary-arch/Packages, so we have to patch it up after the fact. We don't, + # however, want to patch up the same area twice, even if it appears twice in + # %dests (which it can in, say, the case of a symlink from testing to + # unstable and --scanall). We also don't want to leave the stray + # binary-all/Packages files around. + # + # Therefore, build a hash of archive areas (unstable/main, testing/contrib, + # etc.), where the value is a hash of all of the architectures in that area + # that we care about. Then, for each archive area, patch up the Packages + # file for each architecture and then remove the binary-all Packages file. + # The removal will keep us from doing the patching up twice if we revist the + # same area through a symlink. + my %areas; + foreach $_ (keys %dests) { + my ($area, $arch) = m|(.*)/([^/]+)$|; + next if $arch eq 'binary-all'; + $areas{$area}{$arch} = 1; + } + foreach $_ (keys %areas) { + my $area = $_; + if (-s "$area/binary-all/Packages") { + foreach $_ (keys %{ $areas{$area} }) { + my $arch = $_; + action(! open(ARCH, ">> $area/$arch/Packages"), + "Append to $area/$arch/Packages", + 2); + action(! open(ALL, "$area/binary-all/Packages"), + "Read $area/binary-all/Packages", + 2); + print ARCH ; + close ALL; + close ARCH; + cmdaction("gzip $area/$arch/Packages -c > $area/$arch/Packages.gz", + "Compress merged Packages file", + 3); + } + } + unlink("$area/binary-all/Packages", "$area/binary-all/Packages.gz"); + } + &destinationRelease(); } -- Russ Allbery (rra@stanford.edu) debarchiver-0.10.0/patches/turbo-correct-md5-hash0000664000000000000000000000503511173250426016512 0ustar --- /usr/bin/debarchiver.old 2007-10-08 16:03:48.000000000 +0200 +++ /usr/bin/debarchiver 2007-10-08 18:26:30.000000000 +0200 @@ -38,6 +38,7 @@ ############################# USES ############################################ ############################################################################### +use Digest::MD5; use File::Path qw(mkpath); use OpaL::action qw(pdebug action cmdaction setDebugLevel @@ -1423,9 +1424,43 @@ return "reject"; } else { - pdebug(4, "$cfile is incomplete. Missing file: $file."); - $CConf{ERROR} = "$CConf{ERROR}$cfile is incomplete. Missing file: $file.\n"; - return "incomplete"; + # $file is missing in incoming. Does it exist in the destdir? + my $file_installed = 0; + my $distrd = $CConf{Distribution}; + my $inst_file, $hash, $size, $section; + foreach $distr (split /\s+/, $distrd) { + my $distr = $distmapping{$distr} || $distr; + my (undef, undef, $arch, undef) = parseFileName($file); + ($hash, $size, $section, undef) = parseFileStruct($CFiles{$file}); + + my $archsec = "source"; + if ($arch !~ /^source$/) { + $archsec = "binary-$arch"; + } + my ($major, $section) = parseSection($section); + + $inst_file = "$destdir/$distr/$major/$archsec/$section/$file"; + if (-f $inst_file) { + $file_installed = 1; + } + } + + if ($file_installed) { + # File exists. Get it's hash. The hash it SHOULD have is in $hash. + open(FILE, $inst_file) or die "Can't open $inst_file: $!\n"; + binmode(FILE); + + $digest = Digest::MD5->new->addfile(*FILE)->hexdigest, " $inst_file\n"; + if ($hash != $digest) { + pdebug(4, "$cfile is incomplete. Missing file: $file (installed $file not the correct)."); + $CConf{ERROR} = "$CConf{ERROR}$cfile is incomplete. Missing file: $file (installed $file not the correct).\n"; + return "incomplete"; + } + } else { + pdebug(4, "$cfile is incomplete. Missing file: $file."); + $CConf{ERROR} = "$CConf{ERROR}$cfile is incomplete. Missing file: $file.\n"; + return "incomplete"; + } } } else { my (undef, undef, undef, undef, $fowner, undef, undef, $size) = stat($file); @@ -1462,6 +1497,7 @@ return "reject"; } } + return $ret; } ############################################################################### @@ -1626,7 +1662,7 @@ "Making directory $installto", 2); } - else { + elsif (-f $file) { if ($arch =~ /^source$/) { cmdaction("$rmcmd $installto/${pkgname}_*$ext", "Delete $installto/${pkgname}_*$ext", debarchiver-0.10.0/patches/333182-sign-release-fix.patch0000664000000000000000000000236111173250426017314 0ustar --- /home/dl/debarchiver.pl 2005-10-11 20:07:59.000000000 +0200 +++ /usr/bin/debarchiver 2005-10-11 20:05:46.000000000 +0200 @@ -74,9 +74,6 @@ $userconfigfile = "$ENV{HOME}/.debarchiv $signcmd = "/usr/lib/debarchiver/signhelper"; $bzip = 0; $gpgpassfile = "$ENV{HOME}/.gnupg/passphrase"; -if ($gpgpassfile) { - $gpgpassfile = 0 if (! -f $gpgpassfile); -} ############################################################################### ########################## DECLARATION ######################################## @@ -226,6 +223,21 @@ if (-e $inputconfigfile) { } ############################################################################### +############################# CHECKS ########################################## +############################################################################### +# Changelog: +# 2005-10-11 Daniel Leidert +# Written + +if ($gpgpassfile) { + $gpgpassfile = "" if (! -f $gpgpassfile); +} +else { + $gpgpassfile = ""; +} + + +############################################################################### ############################# HELP ############################################ ############################################################################### # Changelog: debarchiver-0.10.0/patches/multiple_packages_one_orig_v2.diff0000664000000000000000000000407111173250426021203 0ustar From: Michael Hanke --- /usr/bin/debarchiver 2006-06-10 13:57:07.000000000 +0200 +++ /home/hanke/bin/my-debarchiver 2006-06-11 19:47:07.914210264 +0200 @@ -1464,7 +1464,7 @@ my $file; foreach $file (keys %CFiles) { - handlePackageFile($file); + handlePackageFile($file, $cfile); } installChangesFile($cfile); mailSuccess(); @@ -1547,7 +1547,7 @@ ############################################################################### sub handlePackageFile ($) { - my ($file, $action) = @_; + my ($file, $cfile) = @_; my $distrd = $CConf{Distribution}; pdebug(5, "File $_: $CFiles{$file}"); @@ -1610,10 +1610,43 @@ cmdaction("$copycmd $file $installto", "Installing $file to $installto.", 2); - } - cmdaction("$rmcmd $file", - "Removing $file after it has been installed.", - 2); + } + # flag whether file should get deleted + my $killfile = 1; + + # only do checks of processing source tarballs + if ($file =~ m/.tar.gz$/) { + my @upstream_version = split(/-/, $ver); + $upstream_version = $upstream_version[0]; + + # get list of remaining *.changes files of this package upstream + # version + my @otherchangesfiles = <$inputdir/${pkgname}_$upver*.changes>; + + # check whether any of the remaining *.changes files does not match the + # current package + CHGSPARSER: foreach my $otherchangesfile (@otherchangesfiles) { + if (!($otherchangesfile =~ $cfile)) { + open ( otherchangesfilehandle, $otherchangesfile); + + while ($line = ) { + if ($line =~ m/${pkgname}_$upver.*\.tar\.gz/) { + pdebug(4, "Found additional package using the source tarball of the package. Will not delete it now!"); + $killfile = 0; + close(otherchangesfilehandle); + last CHGSPARSER; + } + } + + close(otherchangesfilehandle) + } + } + } + + if ($killfile) { + cmdaction("$rmcmd $file", + "Removing $file after it has been installed.", 2); + } } ############################################################################### debarchiver-0.10.0/patches/turbo-incomplete-give-reject.patch0000664000000000000000000000220411173250426021077 0ustar --- /usr/bin/debarchiver.old 2007-10-08 15:57:28.000000000 +0200 +++ /usr/bin/debarchiver 2007-10-08 16:03:26.000000000 +0200 @@ -1235,6 +1235,7 @@ } elsif ($verify =~ /^incomplete$/) { # Handle incomplete .changes file. + pdebug(2, "Incomplete $cfile."); } else { # Changes file verified. @@ -1422,7 +1423,9 @@ return "reject"; } else { - $ret = "incomplete"; + pdebug(4, "$cfile is incomplete. Missing file: $file."); + $CConf{ERROR} = "$CConf{ERROR}$cfile is incomplete. Missing file: $file.\n"; + return "incomplete"; } } else { my (undef, undef, undef, undef, $fowner, undef, undef, $size) = stat($file); @@ -1442,7 +1445,8 @@ return "reject"; } else { - $ret = "incomplete"; + $CConf{ERROR} = "$CConf{ERROR}$cfile is incomplete and $file is not of full size.\n"; + return "incomplete"; } } elsif ($size > $cfsize) { pdebug(4, "$cfile upload is broken, $file is bigger than expected."); @@ -1459,7 +1463,6 @@ return "reject"; } } - return $ret; } ############################################################################### debarchiver-0.10.0/patches/queue-override.patch0000664000000000000000000001545011173250426016355 0ustar From: Bob Proulx Here is a patch that modifies debarchiver so that packages uploaded to the specific queues under incoming will override the distribution and be installed in the specified queue. - Added scanning of the %distinputdirs for packages with .changes files in addition to the previous scanning for plain .deb files. Any valid packages with a .changes file will be pulled into the archive using the queue name as the explicit distribution. This suports uploads to the testing queue being put in the testing distribution and so forth for the other dists. - Updated documentation with information on this feature. - Refactored handleChangesFile() into two routines creating a new routine parseChangesFile() in order to support the new feature. One routine parses the changes file the other processes it. - Modified handleSorting() to use the new routines. Added searching of the %distinputdirs for .changes files. Reorganized the chdir calls to support searching the input queues. The first item from the above would be a typical thing to put in a NEWS.Debian entry. However I see that you don't normally maintain that file. (shrug) Thanks! Bob --- debarchiver.pl.original 2005-04-23 16:10:12.435713520 -0600 +++ debarchiver.pl 2005-04-23 17:57:25.213687537 -0600 @@ -238,7 +238,7 @@ installed even if it does not have a .changes file, default $distinputcriteria. \%distinputdirs The directories (distribution => dir) that should be - searched for extra bianry packages that does not need + searched for extra binary packages that does not need a .changes file to be installed. \$lockfile The lockfile to use, default $lockfile. \@mailtos The fields in .changes file that should be used for @@ -370,8 +370,6 @@ # Now create the directory structure and files that are needed. ############################################################################### -action(! chdir $destdir, "Change to dir $destdir", 2); - handleStructureFix(); ############################################################################### @@ -386,7 +384,6 @@ # Sort packages. ############################################################################### -action(! chdir $inputdir, "Change to dir $inputdir", 2); handleSorting(); if (defined $indexall) { @@ -893,42 +890,49 @@ sub handleSorting() { if (defined $sortpackages) { # First check if a lockfile is created. - + + action(! chdir $inputdir, "Change to dir $inputdir", 2); &incomingLock(); - # Read the content of this directory. - opendir(D, "."); + # Look in the incoming directory for .changes files. - my $found = 1; + opendir(D, "."); - while ($found) { - # go through all .changes files: - $found = 0; - while($cfile = readdir(D)) { - # Only .changes files. - if ($cfile =~ /\.changes$/) { - handleChangesFile($cfile); - $found = 1; - } + # go through all .changes files: + my $file; + while (defined($file = readdir(D))) { + if ($file =~ /\.changes$/) { + parseChangesFile($file); + handleChangesFile($file); } } closedir(D); - my $kdir; - foreach $kdir (keys %distinputdirs) { - $distinputdirs{$kdir} =~ s/\n$//; - if (-d $distinputdirs{$kdir}) { - opendir(D, $distinputdirs{$kdir}); - my $kfile; - while ($kfile = readdir(D)) { - if ($kfile =~ /$distinputcriteria/) { - handleDebOnlyFile("$distinputdirs{$kdir}/$kfile", $kdir); + # Look in the incoming/ directories for either .changes + # files or for plain .debs matching the dist input criteria. + + foreach my $dir (keys %distinputdirs) { + my $inpdir = "$inputdir/$distinputdirs{$dir}"; + if (-d $inpdir) { + action(! chdir "$inpdir", "Change to dir $inpdir", 2); + opendir(D, "."); + my $file; + while (defined($file = readdir(D))) { + if ($file =~ /\.changes$/) { + parseChangesFile($file); + $CConf{Distribution} = $dir; + handleChangesFile($file); + } + if ($file =~ /$distinputcriteria/) { + handleDebOnlyFile($file, $dir); } } + closedir(D); } } + action(! chdir $inputdir, "Change to dir $inputdir", 2); &incomingRelease(); } } @@ -942,6 +946,8 @@ ############################################################################### sub handleStructureFix() { + action(! chdir $destdir, "Change to dir $destdir", 2); + if (defined $fixstructure) { my ($di, $se, $ar); for $di (@distributions) { @@ -1004,6 +1010,27 @@ } } +############################################################################### +# Name: parseChangesFile +# Description: Parses the .changes file. +# Uses: parseChanges, pdebug, uploaderIsChangesFileOwner +# Arguments: The .changes file. +# Returns: nothing +############################################################################### + +sub parseChangesFile($) { + my ($cfile) = @_; + + parseChanges($cfile); + uploaderIsChangesFileOwner($cfile); + if ($verifysignatures) { + if (system($vrfycmd,$cfile)) { # non-zero == verification failure + rejectChangesFile(); + pdebug(2, "Signature verification failed for $cfile"); + return; + } + } +} ############################################################################### # Name: handleChangesFile @@ -1020,8 +1047,7 @@ # properly if it is rejected. # Moved parseChanges before sig verify and uploaderIsChangesFileOwner to # make sure that CMeta is created before that. -# Uses: parseChanges, pdebug, $copycmd, $rmcmd, uploaderIsChangesFileOwner -# Changes: See parseChanges. +# Uses: pdebug, $copycmd, $rmcmd # Arguments: The .changes file. # Returns: nothing ############################################################################### @@ -1029,16 +1055,6 @@ sub handleChangesFile($) { my ($cfile) = @_; - parseChanges($cfile); - uploaderIsChangesFileOwner($cfile); - if ($verifysignatures) { - if (system($vrfycmd,$cfile)) { # non-zero == verification failure - rejectChangesFile(); - pdebug(2, "Signature verification failed for $cfile"); - return; - } - } - my $file; foreach $file (keys %CFiles) { handlePackageFile($file); @@ -1799,7 +1815,7 @@ =item B<%distinputdirs> -The directories (distribution => dir) that should be searched for extra bianry packages that does not need a .changes file to be installed. +Directories (distribution => dir) to be searched for binary packages that do not need a .changes file to be installed but match $distinputcriteria. The default is kernel packages generated by make-kpkg which does not generate a .changes file. Additionally binary packages with a valid .changes file will have the default distribution overridden to be the current queue directory. This causes uploads to a specific queue to place the package into that distribution directly. =item B<$lockfile> debarchiver-0.10.0/patches/522227-mailformat-correction.diff0000664000000000000000000000147711173250426020272 0ustar diff --git a/src/debarchiver.pl b/src/debarchiver.pl index efa3797..ce3cf0a 100755 --- a/src/debarchiver.pl +++ b/src/debarchiver.pl @@ -76,7 +76,7 @@ use OpaL::read qw(readfile readcommand); # 2009-03-16 Franck Joncourt # Added usermailcmd, mailsearch, usermailcmd and cmds. Removed mailcmd. -$mailformat = "sendmail"; +$mailformat = ""; @mailsearch = (); $usermailcmd = ''; @@ -2554,7 +2554,7 @@ sub check_mailconfig() if ( ($mailformat ne "") && ($usermailcmd eq "") ) { pdebug(2, "The mailformat option must be used in conjunction to the mailcmd option."); - } elsif ($mailformat eq "sendmail") { + } elsif ( ($mailformat eq "sendmail") || ($mailformat eq "") ) { @mailsearch = ("sendmail", "mail"); } elsif ($mailformat eq "mail") { debarchiver-0.10.0/patches/333182-sign-release-fix.patch20000664000000000000000000001464211173250426017403 0ustar Index: debian/debarchiver.docs =================================================================== --- debian/debarchiver.docs (Revision 2146) +++ debian/debarchiver.docs (Arbeitskopie) @@ -1,4 +1,4 @@ README TODO -README.dscverify +README.gnupg README.repository Index: debian/copyright =================================================================== --- debian/copyright (Revision 2146) +++ debian/copyright (Arbeitskopie) @@ -18,5 +18,6 @@ You should have received a copy of the GNU General Public License with your Debian GNU/Linux system, in /usr/share/common-licenses/GPL, or with the debarchiver 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. + Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. + Index: conf/debarchiver.conf =================================================================== --- conf/debarchiver.conf (Revision 2146) +++ conf/debarchiver.conf (Arbeitskopie) @@ -20,7 +20,7 @@ # The command to use for siging files. Used for Release files. # This command take four arguments input file, output file, key and optionally # a file with a password. -# $signcmd = "/usr/lib/debarchiver/signhelper"; +# $signcmd = "/usr/lib/debarchiver/signhelper/signhelper.sh"; # Generate bzip2 files or not (1 will generate and 0 will not do so). # $bzip = 0; @@ -77,4 +77,6 @@ # $gpgkey = ""; # File to provide password to GnuPG. +# If you use a key with an empty passphrase, set this variable to 0 or "". +# If the file does not exist, debarchiver will also fall back to "". # $gpgpassfile = "$ENV{HOME}/.gnupg/passphrase"; Index: src/debarchiver.pl =================================================================== --- src/debarchiver.pl (Revision 2146) +++ src/debarchiver.pl (Arbeitskopie) @@ -25,7 +25,8 @@ # # 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. # ############################################################################### ############################# USES ############################################ @@ -57,6 +58,8 @@ # by some perl module but this solution was good enough. # 2005-10-11 Daniel Leidert # Removed fix regarding $gpgpassfile (moved to checks below). +# 2005-10-12 Daniel Leidert +# Fix signcmd default. $copycmd = "cp -af"; $rmcmd = "rm -f"; @@ -73,7 +76,7 @@ $verifysignatures = 0; $verifysignaturesdistinput = 0; $userconfigfile = "$ENV{HOME}/.debarchiver.conf"; -$signcmd = "/usr/lib/debarchiver/signhelper"; +$signcmd = "/usr/lib/debarchiver/signhelper/signhelper.sh"; $bzip = 0; $gpgpassfile = "$ENV{HOME}/.gnupg/passphrase"; Index: src/signhelper.sh =================================================================== --- src/signhelper.sh (Revision 2146) +++ src/signhelper.sh (Arbeitskopie) @@ -15,7 +15,8 @@ # # 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. # # # Changelog: Index: COPYING =================================================================== --- COPYING (Revision 2146) +++ COPYING (Arbeitskopie) @@ -2,7 +2,7 @@ Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -305,7 +305,7 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. Index: README.repository =================================================================== --- README.repository (Revision 2146) +++ README.repository (Arbeitskopie) @@ -122,10 +122,10 @@ own - what you prefer. Be aware of the following problem: If you decided to enable signature checking -for incoming packages (see README.dscverify), then you maybe have user +for incoming packages (see README.gnupg), then you maybe have user directories (.gnupg) and user files (.bash_history, .devscripts) in /var/lib/debarchiver. Use the above rules to forbid access OR change the -archive-dir or thehome-dir for debarchiver (see README.dscverify), which is the +archive-dir or the home-dir for debarchiver (see README.gnupg), which is the cleaner solution. @@ -191,3 +191,4 @@ The above file is only an example which will show the packages in Sid. Feel free to customize it and enjoy the possibilities of this famous script. + Index: README =================================================================== --- README (Revision 2146) +++ README (Arbeitskopie) @@ -50,9 +50,16 @@ Dependent on your decision (see $verifysignatures, $verifysignaturesdistinput, $vrfycmd) debarchiver checks the signature of uploaded packages. Unsigned packages (except binary-only packages without a .changes file) will be rejected -if verification is enabled. See README.dscverify for how to enable signature verification. +if verification is enabled. See README.gnupg for how to enable signature verification. +Archive signing: +---------------- + +See README.gnupg for infos on how to enable the creation of a signed Release +files. + + Multiple archives: ------------------ @@ -83,6 +90,7 @@ of the information in the configuration file. More exact information is available there. + non-US: ------- @@ -114,5 +122,6 @@ You should have received a copy of the GNU General Public License with the debarchiver 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. +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301, USA. + debarchiver-0.10.0/patches/turbo-getmd5hashcorrection.patch0000664000000000000000000000126111173250426020661 0ustar --- /usr/bin/debarchiver.old 2007-10-09 08:22:04.000000000 +0200 +++ /usr/bin/debarchiver 2007-10-09 08:23:13.000000000 +0200 @@ -1490,10 +1490,10 @@ ############################################################################### sub getMD5HashForFile($) { - # File exists. Get it's hash. The hash it SHOULD have is in $hash. - open(FILE, $inst_file) or die "Can't open $inst_file: $!\n"; + my ($file) = @_; + open(FILE, $file) or die "Can't open $file: $!\n"; binmode(FILE); - $digest = Digest::MD5->new->addfile(*FILE)->hexdigest, " $inst_file\n"; + $digest = Digest::MD5->new->addfile(*FILE)->hexdigest, " $file\n"; close (FILE); return $digest; } debarchiver-0.10.0/patches/debarchiver-udeb.diff0000664000000000000000000000061411173250426016414 0ustar --- debarchiver-0.6.0.orig/src/debarchiver.pl 2006-02-26 14:12:37.000000000 +0100 +++ debarchiver-0.6.0/src/debarchiver.pl 2006-03-21 11:49:04.000000000 +0100 @@ -1995,7 +1995,7 @@ pdebug(6, "Do nothing with $line\n"); } # Files state. - elsif ($state =~ /Files/) { + elsif ($state =~ /Files/ && $line =~ /^ /) { my @f = split / /, $line; shift @f; my $file = pop @f; debarchiver-0.10.0/patches/debarchiver_readmes.patch0000664000000000000000000004222411173250426017371 0ustar diff -puN --recursive debarchiver/README /home/dl/packages/projects/debarchiver/README --- debarchiver/README 2005-01-28 11:07:07.000000000 +0100 +++ /home/dl/packages/projects/debarchiver/README 2005-05-07 14:10:35.090326912 +0200 @@ -1,9 +1,9 @@ -DocumentId $Id$ -Author $Author$ -Date $Date$ -Version $Revision: 1.7 $ +DocumentId $Id$ +Author $Author$ +Date $Date$ +Version $Revision: 1.7 $ Summary - Read this file to get some basic information about the debian archiver. + Read this file to get some basic information about the debian archiver. Introduction: @@ -24,11 +24,16 @@ Function: The basic functionality of this package is simple. It takes packages from the incoming directory (default /var/lib/debarchiver/incoming), looks at the *.changes files, sorts the packages into the right place in -the destination (default /var/lib/debarchiver/dists). +the destination-dir (default /var/lib/debarchiver/dists). The destination +distribution is determined by the 'Distribution:' field in .changes. -It also sort packages (and does not look at the .changes file) in directories -with the same name as the distr version, see %distinputdirs. So it will sort -packages in /var/lib/debarchiver/incoming/stable to the stable branch. +It also sorts packages (and does _not_ look at the .changes file) +in directories with the same name as the distribution version (see +%distinputdirs). So it will sort packages in +/var/lib/debarchiver/incoming/stable to the stable branch. Packages +in these directories do not need a .changes file, but can have one. +So you will be able to add binary-only packages, but also "move" packages +from sid to sarge/etch or (normally much less frequent) woody. Cronjob: @@ -39,6 +44,15 @@ the example cronfile to /etc/cron.d. You setup like multiple archives, see below. +Signature verification: +----------------------- + +Dependent on your decision (see $verifysignatures, $verifysignaturesdistinput, +$vrfycmd) debarchiver checks the signature of uploaded packages. Unsigned +packages (except binary-only packages without a .changes file) will be rejected +if verification is enabled. See README.dscverify for how to enable signature verification. + + Multiple archives: ------------------ diff -puN --recursive debarchiver/README.dscverify /home/dl/packages/projects/debarchiver/README.dscverify --- debarchiver/README.dscverify 2005-04-13 21:41:13.000000000 +0200 +++ /home/dl/packages/projects/debarchiver/README.dscverify 2005-05-07 14:04:39.446393008 +0200 @@ -1,92 +1,139 @@ -Information from Daniel Leidert about how to -get dscverify to work properly. +DocumentId $Id$ +Author $Author$ +Date $Date$ +Version $Revision: 1.1 $ +Summary + Read this file to get some information on how to enable (GnuPG) + signature verification. ---------------------------------------------------------------------- -Here is what I did to make dscverify work -(# means root-shell, $ means user-shell). +($ means user-shell, # means root-shell) -- install debarchiver +1. Change home directory for user debarchiver (optional): +--------------------------------------------------------- -- become root -$ su +This first point is optional, but it is based on my experiences. The thoughts: +We will create a .gnupg sub-directory and the devscripts config file +.devscripts in debarchiver's home directory. Now it is possible, that you make +your repository public (read README.web). Maybe you share my opinion, that +guests looking at your website should not have access to these files. There +are 3 ways to prevent them to access .gnupg or .devscripts: -- moving debarchiver's home-dir -(to still be able to use Jarno Elonens script) -# mkdir /dome/debarchiver -# chown debarchiver.debarchiver /home/debarchiver -# usermod -d /home/debarchiver debarchiver + - see README.repository for entry to make in httpd.conf/vhosts.conf or + don't make /var/lib/debarchiver public + + - move your repository into a sub-directory of /var/lib/debarchiver (e.g. + /var/lib/debarchiver/archive) and make this sub-directory public + + # cd /var/lib/debarchiver + # mkdir archive + # mv dists archive/ + # mv incoming archive/ + # vi /etc/debarchiver.conf + -> fix '$destdir' and '$inputdir' -- creating necessary GnuPG-structure -(giving temporary access to /bin/bash) -# chsh -s /bin/bash debarchiver -# su debarchiver + - change the home directory for debarchiver to e.g. /home/debarchiver + + # mkdir /home/debarchiver + # chown debarchiver.debarchiver /home/debarchiver + # usermod -d /home/debarchiver debarchiver + +I prefer the last alternative, because this is IMHO the cleanest solution. But +decide at your own. -$ cd ~ -the next command must be possibly run twice -$ echo -n "" | gpg -$ vi .gnupg/gpg.conf --> comment out all keyservers (maybe not necessary, because the -auto-retrieve-keys should not be set) -$ exit +2. Create GnuPG infrastructure: +------------------------------- -- Creating a new keyring for uploaders -# touch /usr/local/share/keyrings/debarchiver-uploaders.gpg +First, we will give debarchiver temporary access to /bin/bash and login as +debarchiver: -next is only a suggestion -# chown debarchiver.debarchiver -/usr/local/share/keyrings/debarchiver-uploaders.gpg -# chmod 640 /usr/local/share/keyrings/debarchiver-uploaders.gpg + # chsh -s /bin/bash debarchiver + # su debarchiver + $ cd ~ -- add uploaders keys: -# su debarchiver -$ gpg --no-default-keyring --keyring pubring.gpg ---keyring /usr/local/share/keyrings/debarchiver-uploaders.gpg --import - +The next step creates the GnuPG infrastructure (maybe you need to run this +command twice): -or + $ echo -n "" | gpg -$ gpg --no-default-keyring --keyring pubring.gpg ---keyring /usr/local/share/keyrings/debarchiver-uploaders.gpg ---keyserver --recv-keys +Optional, but recommended: Comment out all keyservers in +~debarchiver/.gnupg/gpg.conf. -$ exit +Now we have the necessary infrastructure and we can begin to import keys: -/------------------------------------------------------------------------ -Instead of creating and -using /usr/local/share/keyrings/debarchiver-uploaders.gpg, it is also -possible to do (as debarchiver) + $ gpg --no-default-keyring --keyring uploaders.gpg \ + --import + + or + + $ gpg --no-default-keyring --keyring uploaders.gpg \ + --keyserver --recv-keys -$ touch ~/.gnupg/uploaders.gpg -$ gpg --no-default-keyring --keyring pubring.gpg --keyring uploaders.gpg ---import -$ exit +Now we need to make dscverify recognize our keyring uploaders.gpg: -Then DSCVERIFY_KEYRINGS="/home/debarchiver/.gnupg/uploaders.gpg". -This is what debpool suggests. -\------------------------------------------------------------------------- + $ cp /etc/devscripts.conf ~/.devscripts + $ vi .devscripts + -> uncomment DSCVERIFY_KEYRINGS and add our keyring: + DSCVERIFY_KEYRINGS="~/.gnupg/uploaders.gpg" + [save&exit] -(.bash_history and .viminfo can be deleted in ~debarchiver/) -- make dscverify know this keyring -# vi /etc/devscripts.conf --> uncomment DSCVERIFY_KEYRINGS and add keyring -DSCVERIFY_KEYRINGS="/usr/local/share/keyrings/debarchiver-uploaders.gpg" +A first test will show, if everything works as expected. Therefor upload a +signed package into $incomingdir and run dscverify. The output should be: -- remove temporary access to /bin/bash for debarchiver -# chsh -s /bin/false debarchiver + $ dscverify .changes + .changes: + Good signature found + validating .dsc + Good signature found + validating .orig.tar.gz + validating .diff.gz + validating .deb + All files validated successfully. -Last thing to do: In /etc/debarchiver.conf set $verifysignatures = 1; +If everything works, we are ready to continue: -If it still reports errors, but -# su debarchiver -c "dscverify .changes" + $ exit -works (I had this problem), then as root: -# usermod -d /var/lib/debarchiver debarchiver -# usermod -d /home/debarchiver debarchiver +3. Some clean-up: +----------------- + +We can now remove the access to /bin/bash for debarchiver: + + # chsh -s /bin/false debarchiver + +Optional: Remove .bash_hostory and .viminfo from ~debarchiver/ + + # rm ~debarchiver/.bash_history ~debarchiver/.viminfo + + +4. Enable GnuPG signature verification: +--------------------------------------- + +Finally we need to enable the verification of signed package files: + + # vi /etc/debarchiver.conf + -> $vrfycmd = "dscverify"; + -> $verifysignatures = 1; + -> $verifysignaturesdistinput = 1; + [save&exit] + +Now you should test your repository and upload a signed package. + + +5. Known problems: +------------------ + +If you changed the home-directory for debarchiver, it sometimes can happen, +that it will still not work. In this case make sure, that you followed all +steps as described above and then run: + + # usermod -d /var/lib/debarchiber debarchiver + # usermod -d /home/debarchiver Now it should work. -Regards, Daniel +In every other cases: Make sure, that you followed all steps as described +above. \ Kein Zeilenumbruch am Dateiende. diff -puN --recursive debarchiver/README.repository /home/dl/packages/projects/debarchiver/README.repository --- debarchiver/README.repository 2005-05-01 13:02:01.000000000 +0200 +++ /home/dl/packages/projects/debarchiver/README.repository 2005-05-07 14:10:24.570926104 +0200 @@ -1,12 +1,77 @@ -Basic instructions to access your repository -============================================ +DocumentId $Id$ +Author $Author$ +Date $Date$ +Version $Revision: 1.1 $ +Summary + Read this file to get some information on how to work with and access + your repository. + ($ means user-shell, # means root-shell) +Uploading packages: +------------------- + +The easiest way is, to copy the package files into incoming-dir ($inputdir) +or distinput-dirs (%distinputdirs). But there are 2 tools, which can do the +job for you: dput and dupload. Both will only work, if the package has a +.changes file (binary-only packages must still be copied the "manual" way). + +Here are some example-entries for ~/.dput.cf (see also man dput.cf, to +understand the settings/options used in these examples; replace my_* examples +with values, which fit your environment/systems): + + example 1: upload to a local repository + usage: dput my_local_repository my_package.changes + /-------------------------------------------------------------------------- + [my_local_repository] + fqdn = localhost + method = local + incoming = /var/lib/debarchiver/incoming + allow_unsigned_uploads = 0 + \-------------------------------------------------------------------------- + + example 2: upload to a remote/local FTP-server using passive-ftp + usage: dput my_ftp_server my_package.changes + /-------------------------------------------------------------------------- + [my_ftp_server] + fqdn = my_ftp.domain.tld + method = ftp + login = my_user_name + incoming = /var/lib/debarchiver/incoming + allow_unsigned_uploads = 0 + passive_ftp = 1 + \-------------------------------------------------------------------------- + + example 3: upload to a remote server using SCP, SSH-server is listening on + port 2222 and uses authentification by public-key + usage: dput my_ssh_server my_package.changes + /-------------------------------------------------------------------------- + [my_ssh_server] + fqdn = my_domain.tld + login = my_user + method = scp + ssh_config_options = Host=my_domain.tld + IdentityFile2 /home/my_user/.ssh/my_id_dsa + Port=2222 + incoming = /var/lib/debarchiver/incoming + allow_unsigned_uploads = 0 + \-------------------------------------------------------------------------- + +Please note: /etc/dput.cf knows some default identifiers (the part in +brackets). Use different identifiers for your rule-sets. + +If you want to upload a package into distinput-dirs (see README), then you +need to adjust 'incoming'. Please note, that every upload creates or expands +my_package.upload. So maybe you need to remove the .upload-file, if you see: + $ dput my_location my_package.changes + Already uploaded to my_location + Doing nothing for my_package.changes -Accessing it locally with file:/ -================================ + +Accessing the repository locally with file://: +---------------------------------------------- Add the lines, which fit your repository structure, to your /etc/apt/sources.list: @@ -21,9 +86,8 @@ deb file:/var/lib/debarchiver etch main deb file:/var/lib/debarchiver sid main contrib non-free - -Accessing it by http:// -======================= +Accessing the repository by http://: +------------------------------------ To make your repository public and/or allow access with http://, add the following lines to a (virtual) server of your choice. @@ -60,48 +124,58 @@ own - what you prefer. Be aware of the following problem: If you decided to enable signature checking for incoming packages (see README.dscverify), then you maybe have user directories (.gnupg) and user files (.bash_history, .devscripts) in -/var/lib/debarchiver. Use the above rules to forbid access or change the -home-dir for debarchiver (see README.dscverify), which is the cleaner solution. +/var/lib/debarchiver. Use the above rules to forbid access OR change the +archive-dir or thehome-dir for debarchiver (see README.dscverify), which is the +cleaner solution. - -Optional: Generate website with package overview -================================================ +Optional: Generate website with package overview: +------------------------------------------------- Maybe you want to provide a website, which gives an overview of available packages. The PHP parser script 'parse-apt-files.inc' (originally written by Jarno Elonen [1] and released into public domain) can do this for you. A version, which should work with debarchiver generated repositories is currently avaiable at http://debian.wgdd.de/debian/parse-apt-files.inc. + +********************** Please note ! ***************************************** +* * +* Only download and use software if you are sure, it is doing, what you * +* expect it to do - for your own safety! What I want to say: I can't * +* guarantee anything about this script. * +* * +* [1] http://elonen.iki.fi/ * +****************************************************************************** + Copy this script into /var/lib/debarchiver. Now create /var/lib/debarchiver/index.php with the following content: -/----------------------------------------------------------------------------- -\n" ?> - - - - - Debian packages in my unofficial Debian repository - - -Packages in sid (unstable)"; -parse_and_list( - Array("dists/sid/main/binary-i386/Packages.gz", - "dists/sid/contrib/binary-i386/Packages.gz", - "dists/sid/non-free/binary-i386/Packages.gz"), - Array("dists/sid/main/source/Sources.gz", - "dists/sid/contrib/source/Sources.gz", - "dists/sid/non-free/source/Sources.gz"), - "dists/sid/installed"); -?> - - -\----------------------------------------------------------------------------- + /-------------------------------------------------------------------------- + \n" ?> + + + + + Debian packages in my unofficial Debian repository + + + Packages in sid (unstable)"; + parse_and_list( + Array("dists/sid/main/binary-i386/Packages.gz", + "dists/sid/contrib/binary-i386/Packages.gz", + "dists/sid/non-free/binary-i386/Packages.gz"), + Array("dists/sid/main/source/Sources.gz", + "dists/sid/contrib/source/Sources.gz", + "dists/sid/non-free/source/Sources.gz"), + "dists/sid/installed"); + ?> + + + \-------------------------------------------------------------------------- Run a browser to see the result at http://your.domain.tld/debian/index.php. @@ -115,5 +189,5 @@ In this case, do a or try another solution by using suphp Apache mod. -The file 'index.php' is only an example which will show the packages in Sid. -Feel free to customize and enjoy the possibilities of this famous script. \ Kein Zeilenumbruch am Dateiende. +The above file is only an example which will show the packages in Sid. +Feel free to customize it and enjoy the possibilities of this famous script. debarchiver-0.10.0/patches/354430-majordefault.patch0000664000000000000000000000576511173250426016641 0ustar Package: debarchiver Severity: wishlist Tags: patch Dear Ola, I am sorry to bring this question again, and sorry that I haven't filed a wishlist bug to begin with ;-) Below you can find a patch which provides a very simple feature: overriding hard-coded default major ('main') with the one provided in command line (if any). The reason I need to change a major (main/non-free/etc) is simple. Since my repository is a temporary storage for some packages which are in the future to be duploaded, I don't want to tune .changes files in any way. That is why I came up with a tiny patch to debarchiver which takes care about overriding the default major, and now I can organize packages in different majors: # local -- localy used packages (of limited interest/access for outside people) # alianed -- packages which are simply alianed rpms # perspect -- perspective Debian packages, which can appear in Debian main repository and present here temporarily for testin # backport -- repackaged versions of official Debian packages And depending on who is using my repository, he might choose to use only specific majors in his /etc/apt/sources.list line Please consider the patch if you think it might be useful for anyone else --- debarchiver/src/debarchiver.pl 2005-08-21 15:10:55.000000000 -0400 +++ debarchiver-0.4.1-y1/src/debarchiver.pl 2005-09-12 14:49:41.000000000 -0400 @@ -90,6 +90,9 @@ @sections = ('main', 'contrib', 'non-free'); +# Default major +$majordefault = 'main'; + @mailtos = (); @ARGS1 = @ARGV; @@ -206,6 +209,7 @@ This can be used to move away the old packages to some other place. --instcmd DEPRICATED! + --major section Major to use if undefined (default: main) -d | --dest dir Destination directory. The base directory where all --destdir dir the distribution packages reside. Here the \$distrib/\$major/\$arch/\$section directory structure @@ -250,6 +254,7 @@ "(relative to input dir) that will be read before the arguments to this program will be parsed. Here you can change the following variables \$destdir The destination directory (see --destdir above). + \$majordefault Default major (see --major above). \$inputdir The input directory (no effect in $inputconfigfile). \$cachedir The cache directory for apt-ftparchive, used if --index is used. @@ -323,6 +328,10 @@ $destdir = shift @ARGS2; $destdir =~ s/\/$//; } + elsif (/^--major$/) { + $majordefault = shift @ARGS2; + $majordefault =~ s/\/$//; + } elsif (/^--cachedir$/) { $cachedir = shift @ARGS2; } @@ -1648,7 +1657,7 @@ if ($section =~ /^\s*$/) { # on the foo form. $section = $major; - $major = "main"; + $major = $majordefault; } return ($major, $section); } -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.13.4 Locale: LANG=ru_RU.KOI8-R, LC_CTYPE=ru_RU.KOI8-R (charmap=KOI8-R) --Yarik debarchiver-0.10.0/IDEAS0000664000000000000000000000040511173250426011506 0ustar An ida of a simple pool structure. pool/x/source # Normal files .changes (?) .deb .dsc .tar.gz .diff.gz But for each package (not deb) name there is a control file package.control. This control file tells the following: [Distributionname] Source: Binary: debarchiver-0.10.0/COPYING0000664000000000000000000004310511173250426011775 0ustar GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. debarchiver-0.10.0/TODO0000664000000000000000000000115311173250426011427 0ustar Things that should be done. Major changes: -------------- * Redesign it in a object-oriented fashion. Possible (probably?) in a object oriented language, like python, ruby (or C++?) or simething as wicked as scheme. - Implement transactions. - Add check package/upload features. This should be made in a - Implement the pool structure. * Write a script that converts the potato structure to the pool structure. Minor things: ------------- * Make the manpage look better. Stability enhancements: ----------------------- * Make sure that all information is available when sorting the package. debarchiver-0.10.0/AUTHORS0000664000000000000000000000354112221221421011776 0ustar Ola Lundqvist Started the project and the maintainer and author of this software if nothing else is stated. Russ Allbery Apt-ftparchive support, Release file generation and fixes. Signed release files support and fixes for interactive signing mode. Joel Baker GPG signature verification. Valry Perrin French manual translation. Daniel Leidert Readme file on how to use gpg signature verification and how to publish the repository. Support for optional verification of signatures in distinputdirs. Also provided bzip2 support and a fix to contents-all. Fix for signed release files. Bob Proulx Changes file support in distribution directory. Alexander Wirt Sent a simple patch that added the possibility to specify an extra configuration file. This patch was not applied but the same functionality has been implemented in a similar way. Yaroslav Halchenko --majordefault feature Jrmy Bobbio One line fix for udeb support. Michael Hanke Only remove source tar file if not referenced by any other .changes file. Martin F Krafft Logcheck configuration. Hkon Stordahl Fix for reject mail and lock problem when a file in incoming directory is read-only. Turbo Fredriksson Improved and corrected reject handling. Distmapping for files. Franck Joncourt Sendmail support. Michael Rash check_commands function (included by Franck Joncourt). Helge Kreutzmann German manual translation. Uditha Atukorala Two fixes for wrong Release file content. debarchiver-0.10.0/README0000664000000000000000000001346112220070774011624 0ustar Read this file to get some basic information about the Debian Archiver. Introduction: ------------- The debian archiver is a tool that installs debian packages into a file structure suitable for apt-get, dselect and similar tools to use for updating the installed debian system. It is ment to be used bu local administrators that needs special packages, or tweaked versions to ease administration. The file structure is based on the potato file structure and does not support package pools. This may be implemented later, but is not high priority. The official site of this software can be found at http://inguza.com/software/debarchiver/ Function: --------- The basic functionality of this package is simple. It takes packages from the incoming directory (default /var/lib/debarchiver/incoming), looks at the *.changes files, sorts the packages into the right place in the destination-dir (default /var/lib/debarchiver/dists). The destination distribution is determined by the 'Distribution:' field in .changes. It also sorts packages in directories with the same name as the distribution version (see %distinputdirs). So it will sort packages in /var/lib/debarchiver/incoming/stable to the stable branch. Packages in these directories do not need a .changes file, but can have one. Packages with a .changes file will be sorted before any other .deb package. So you will be able to add binary-only packages, but also "move" (or actually copy) packages from sid to woody, sarge, etch, lenny or squeeze. Cronjob: -------- Debarchiver is very easy to run from a cronjob. In fact you only have to copy the example cronfile to /etc/cron.d. You may edit it if you have some special setup like multiple archives, see below. Signature verification: ----------------------- Dependent on your decision (see $verifysignatures, $verifysignaturesdistinput, $vrfycmd) debarchiver checks the signature of uploaded packages. Unsigned packages (except binary-only packages without a .changes file) will be rejected if verification is enabled. See README.gnupg for how to enable signature verification. Archive signing: ---------------- See README.gnupg for infos on how to enable the creation of a signed Release files. Multiple archives: ------------------ It is possible to hand multiple archives at the same time. Set the common settings in /etc/debarchiver.conf and then create a input.conf file in the incoming directory of each incoming directory. If you use different users for sorting the archives you can use the ~/.debarchiver.conf file of that user instead. Now edit /etc/cron.d/debarchiver and change it to something like this: 0 * * * * debarchiver test -x /usr/bin/debarchiver && /usr/bin/debarchiver --autoscan --addoverride --input /var/lib/debarchiver/incoming 0 * * * * debarchiver test -x /usr/bin/debarchiver && /usr/bin/debarchiver --autoscan --addoverride --input /home/debarchive-internal/incoming or like this if you have separate users. 0 * * * * debarchiver test -x /usr/bin/debarchiver && /usr/bin/debarchiver --autoscan --addoverride 0 * * * * debarchiver2 test -x /usr/bin/debarchiver && /usr/bin/debarchiver --autoscan --addoverride Email: ------ It is possible to configure debarchiver to send email on successfully or rejected packages. Make sure not to activate that if you add packages from different sources because you will easily harass the maintainers of these packages. Simply add Maintainer, Uploaders, @domain and/or user@domain as recipient of the information in the configuration file. More exact information is available there. non-US: ------- Packages uploaded to non-US will have only a non-US section. This is not a problem because it will create a non-US section in main. If the section is non-free/non-US the same will be done, except that the non-US section is in non-free instead. So there is no special non-US major section, just a minor one. Copyright: ---------- Copyright (C) 2000-2013 Ola Lundqvist Copyright (C) 2013 Uditha Atukorala Copyright (C) 2011 Helge Kreutzmann Copyright (C) 2010 Mats Erik Andersson Copyright (C) 2009 Franck Joncourt Copyright (C) 2004,2008 Michael Rash Copyright (C) 2007 Turbo Fredriksson Copyright (C) 2004-2005 Russ Allbery Copyright (C) 2005 Joel Baker Copyright (C) 2005 Daniel Leidert Copyright (C) 2005 Bob Proulx Copyright (C) 2005-2011 Valry Perrin Copyright (C) 2006 Yaroslav Halchenko Copyright (C) 2006 Jrmy Bobbio Copyright (C) 2006 Michael Hanke Copyright (C) 2006 Martin F Krafft Copyright (C) 2006 Hkon Stordahl See the AUTHORS file for information on what the individual copyright holder has contributed with. License: -------- This 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. This 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 the debarchiver source package as the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. debarchiver-0.10.0/Makefile0000664000000000000000000000225111173250426012377 0ustar # # Copyright (C) 2000-2008 Ola Lundqvist # # 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., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301 USA. DIRS=po4a conf src all install clean:: for d in $(DIRS) ; do \ make -C $$d $@ ; \ done install:: mkdir -p $(DESTDIR)/var/cache/debarchiver mkdir -p $(DESTDIR)/var/lib/debarchiver/dists mkdir -p $(DESTDIR)/var/lib/debarchiver/incoming/stable mkdir -p $(DESTDIR)/var/lib/debarchiver/incoming/testing mkdir -p $(DESTDIR)/var/lib/debarchiver/incoming/unstable chmod -Rf g+ws $(DESTDIR)/var/lib/debarchiver/incoming debarchiver-0.10.0/README.repository0000664000000000000000000001636211173250426014045 0ustar Read this file to get some information on how to work with and access your repository. ($ means user-shell, # means root-shell) Uploading packages: ------------------- The easiest way is, to copy the package files into incoming-dir ($inputdir) or distinput-dirs (%distinputdirs). But there are 2 tools, which can do the job for you: dput and dupload. Both will only work, if the package has a .changes file (binary-only packages must still be copied the "manual" way). Here are some example-entries for ~/.dput.cf (see also man dput.cf, to understand the settings/options used in these examples; replace my_* examples with values, which fit your environment/systems): example 1: upload to a local repository usage: dput my_local_repository my_package.changes /-------------------------------------------------------------------------- [my_local_repository] fqdn = localhost method = local incoming = /var/lib/debarchiver/incoming allow_unsigned_uploads = 0 \-------------------------------------------------------------------------- example 2: upload to a remote/local FTP-server using passive-ftp usage: dput my_ftp_server my_package.changes /-------------------------------------------------------------------------- [my_ftp_server] fqdn = my_ftp.domain.tld method = ftp login = my_user_name incoming = /var/lib/debarchiver/incoming allow_unsigned_uploads = 0 passive_ftp = 1 \-------------------------------------------------------------------------- example 3: upload to a remote server using SCP, SSH-server is listening on port 2222 and uses authentification by public-key usage: dput my_ssh_server my_package.changes /-------------------------------------------------------------------------- [my_ssh_server] fqdn = my_domain.tld login = my_user method = scp ssh_config_options = Host=my_domain.tld IdentityFile2 /home/my_user/.ssh/my_id_dsa Port=2222 incoming = /var/lib/debarchiver/incoming allow_unsigned_uploads = 0 \-------------------------------------------------------------------------- Please note: /etc/dput.cf knows some default identifiers (the part in brackets). Use different identifiers for your rule-sets. If you want to upload a package into distinput-dirs (see README), then you need to adjust 'incoming'. Please note, that every upload creates or expands my_package.upload. So maybe you need to remove the .upload-file, if you see: $ dput my_location my_package.changes Already uploaded to my_location Doing nothing for my_package.changes Accessing the repository locally with file://: ---------------------------------------------- Add the lines, which fit your repository structure, to your /etc/apt/sources.list: deb file:/var/lib/debarchiver stable main contrib non-free deb file:/var/lib/debarchiver testing main contrib non-free deb file:/var/lib/debarchiver unstable main contrib non-free deb file:/var/lib/debarchiver experimental main contrib non-free deb file:/var/lib/debarchiver woody main contrib non-free deb file:/var/lib/debarchiver sarge main contrib non-free deb file:/var/lib/debarchiver etch main contrib non-free deb file:/var/lib/debarchiver lenny main contrib non-free deb file:/var/lib/debarchiver squeeze main contrib non-free deb file:/var/lib/debarchiver sid main contrib non-free Accessing the repository by http://: ------------------------------------ To make your repository public and/or allow access with http://, add the following lines to a (virtual) server of your choice. /-------------------------------------------------------------------------- Alias /debian /var/lib/debarchiver Options Indexes FollowSymLinks MultiViews +Includes # forbid access to user files AllowOverride None Order deny,allow Deny from all AllowOverride None Order allow,deny Allow from all # forbid access to .gnupg AllowOverride None Order deny,allow Deny from all \-------------------------------------------------------------------------- You could also make /var/lib/debarchiver/dists an aliased path. Decide at your own - what you prefer. Be aware of the following problem: If you decided to enable signature checking for incoming packages (see README.gnupg), then you maybe have user directories (.gnupg) and user files (.bash_history, .devscripts) in /var/lib/debarchiver. Use the above rules to forbid access OR change the archive-dir or the home-dir for debarchiver (see README.gnupg), which is the cleaner solution. Optional: Generate website with package overview: ------------------------------------------------- Maybe you want to provide a website, which gives an overview of available packages. The PHP parser script 'parse-apt-files.inc' (originally written by Jarno Elonen [1] and released into public domain) can do this for you. A version, which should work with debarchiver generated repositories is currently avaiable at http://debian.wgdd.de/debian/parse-apt-files.inc. ********************** Please note ! ***************************************** * * * Only download and use software if you are sure, it is doing, what you * * expect it to do - for your own safety! What I want to say: I can't * * guarantee anything about this script. * * * * [1] http://elonen.iki.fi/ * ****************************************************************************** Copy this script into /var/lib/debarchiver. Now create /var/lib/debarchiver/index.php with the following content: /-------------------------------------------------------------------------- \n" ?> Debian packages in my unofficial Debian repository Packages in sid (unstable)"; parse_and_list( Array("dists/sid/main/binary-i386/Packages.gz", "dists/sid/contrib/binary-i386/Packages.gz", "dists/sid/non-free/binary-i386/Packages.gz"), Array("dists/sid/main/source/Sources.gz", "dists/sid/contrib/source/Sources.gz", "dists/sid/non-free/source/Sources.gz"), "dists/sid/installed"); ?> \-------------------------------------------------------------------------- Run a browser to see the result at http://your.domain.tld/debian/index.php. It is possible, that you will see a warning, if you set php_admin_value safe_mode on In this case, do a # chown debarchiver.debarchiver parse-apt-files.inc index.php or try another solution by using suphp Apache mod. The above file is only an example which will show the packages in Sid. Feel free to customize it and enjoy the possibilities of this famous script. debarchiver-0.10.0/README.gnupg0000664000000000000000000001357011173250426012744 0ustar Read this file to get some information on how to enable (GnuPG) signature verification and automatic archive signing. 1. Change home directory for user debarchiver (optional) 2. Create GnuPG infrastructure 3. Enable GnuPG signature verification 4. Create a primary key 5. Create an archive signing key 6. Enable GnuPG archive signing 7. Clean-up 8. Known problems ($ means user-shell, # means root-shell) 1. Change home directory for user debarchiver (optional): --------------------------------------------------------- This first point is optional, but it is based on my experiences. The thoughts: We will create a .gnupg sub-directory and the devscripts config file .devscripts in debarchiver's home directory. Now it is possible, that you make your repository public (read README.web). Maybe you share my opinion, that guests looking at your website should not have access to these files. There are 3 ways to prevent them to access .gnupg or .devscripts: - see README.repository for entry to make in httpd.conf/vhosts.conf or don't make /var/lib/debarchiver public - move your repository into a sub-directory of /var/lib/debarchiver (e.g. /var/lib/debarchiver/archive) and make this sub-directory public # cd /var/lib/debarchiver # mkdir archive # mv dists archive/ # mv incoming archive/ # vi /etc/debarchiver.conf -> fix '$destdir' and '$inputdir' - change the home directory for debarchiver to e.g. /home/debarchiver # mkdir /home/debarchiver # chown debarchiver.debarchiver /home/debarchiver # usermod -d /home/debarchiver debarchiver I prefer the last alternative, because this is IMHO the cleanest solution. But decide at your own. 2. Create GnuPG infrastructure: ------------------------------- First, we will give debarchiver temporary access to /bin/bash and login as debarchiver: # chsh -s /bin/bash debarchiver # su debarchiver $ cd ~ The next step creates the GnuPG infrastructure (maybe you need to run this command twice): $ echo -n "" | gpg Optional, but recommended: Comment out all keyservers in ~debarchiver/.gnupg/gpg.conf. Now we have the necessary infrastructure and we can begin to import keys: $ gpg --no-default-keyring --keyring uploaders.gpg \ --import or $ gpg --no-default-keyring --keyring uploaders.gpg \ --keyserver --recv-keys Now we need to make dscverify recognize our keyring uploaders.gpg: $ cp /etc/devscripts.conf ~/.devscripts $ vi .devscripts -> uncomment DSCVERIFY_KEYRINGS and add our keyring: DSCVERIFY_KEYRINGS="~/.gnupg/uploaders.gpg" [save&exit] A first test will show, if everything works as expected. Therefor upload a signed package into $incomingdir and run dscverify. The output should be: $ dscverify .changes .changes: Good signature found validating .dsc Good signature found validating .orig.tar.gz validating .diff.gz validating .deb All files validated successfully. 3. Enable GnuPG signature verification: --------------------------------------- To enable the verification of signed package files: # vi /etc/debarchiver.conf -> $vrfycmd = "dscverify"; -> $verifysignatures = 1; -> $verifysignaturesdistinput = 1; [save&exit] Now you should test your repository and upload a signed package. If you're only using GnuPG signature verification, you can stop here and go to 7. Clean-ups. 4. Create a primary key: ------------------------ NOTE: You don't want to use this key to sign the Release files. We will create the archive signing key one step later. NOTE: You can skip this step if you are running debarchiver on your own account and if you already have a primary key. $ gpg --gen-key 5. Create an archive signing key: --------------------------------- To sign an archive (the Release files) as written in 'man apt-secure' and http://www.debian.org/doc/manuals/securing-debian-howto/ch7#s7.4.1, we will need to create a GnuPG key-pair and tell debarchiver to use this key (and passphrase) to sign our archive (see 6.). $ gpg --gen-key The passphrase (if existent) needs to stored in a file, which is set to permissions 0600. Of course this violates traditional practice. But there is no other way of an automatic Release signing mechanism. The default file is ~/.gnupg/passphrase. $ touch ~/.gnupg/passphrase $ chmod 600 ~/.gnupg/passphrase $ vi ~/.gnupg/passphrase -> Enter passphrase [save$exit] 6. Enable GnuPG archive signing: -------------------------------- To enable automatic archive signing: # vi /etc/debarchiver.conf -> $gpgkey = "MY_ARCHIVE_SIGNING_KEY"; (replace MY_ARCHIVE_SIGNING_KEY with the appropriate value) -> $gpgpassfile = "$ENV{HOME}/.gnupg/passphrase"; (only if you use a key with a non-empty passphrase, the file above is the default value -> adjust it if necessary) -OR- $gpgpassfile = ""; -OR- $gpgpassfile = 0; (for an empty passphrase) Next time debarchiver is run, it will create Release.gpg files. In this case, you should upload your public archive signing key to a server to make it available to the public. 7. Clean-up: ----------------- If everything works, we are ready to continue. Logout from debarchiver shell: $ exit We can now remove the access to /bin/bash for debarchiver: # chsh -s /bin/false debarchiver Optional: Remove .bash_history and .viminfo from ~debarchiver/ # rm ~debarchiver/.bash_history ~debarchiver/.viminfo 8. Known problems: ------------------ If you changed the home-directory for debarchiver, it sometimes can happen, that it will still not work. In this case make sure, that you followed all steps as described above and then run: # usermod -d /var/lib/debarchiver debarchiver # usermod -d /home/debarchiver Now it should work. In every other cases: Make sure, that you followed all steps as described above.