.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "dupload.conf 5" .TH dupload.conf 5 2024-04-08 2.11.2 "Debian Project" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME dupload.conf \- configuration file for dupload .SH DESCRIPTION .IX Header "DESCRIPTION" The configuration file is rather straight forward Perl code as it is included by the \fBdupload\fR script via \f(CW\*(C`do $config\*(C'\fR. \fIThe config file is read as Perl code!\fR .PP Any \fBdupload.conf\fR must begin with \f(CW\*(C`package config;\*(C'\fR because \f(CW\*(C`config\*(C'\fR is the namespace expected by \fBdupload\fR. .PP For examples of the configuration please refer to the global configuration file \fI/etc/dupload.conf\fR. .PP It contains associative arrays, each indexed by the nickname (see \fB\-\-to\fR option of \fBdupload\fR), for the following items: .IP "\fBfqdn\fR [required]" 4 .IX Item "fqdn [required]" The fully qualified domain name (FQDN) of the nickname. .Sp For the \fBcopy\fR method, this option is ignored and the local FQDN will be used instead. .IP "\fBmethod\fR [optional]" 4 .IX Item "method [optional]" The transfer method. The available methods are: .RS 4 .IP \(bu 2 \&\fBftp\fR (default) .IP \(bu 2 \&\fBhttp\fR (since 2.9.9) .IP \(bu 2 \&\fBhttps\fR (since 2.9.9) .IP \(bu 2 \&\fBscp\fR (since 1.8) .IP \(bu 2 \&\fBscpb\fR (since 1.17) .IP \(bu 2 \&\fBrsync\fR (over SSH; since 2.4.1) .IP \(bu 2 \&\fBcopy\fR (local filesystem; since 2.9.0) .RE .RS 4 .Sp If you are using an upload queue, use \fBftp\fR because it is fast. If you are using an authenticated host, \fBalways\fR use \fBhttps\fR, or one of \fBscp\fR or \fBrsync\fR via SSH, because \fBftp\fR transmits the password in clear text. .Sp For \fBscp\fR and \fBrsync\fR to work properly, you have to setup the remote and local host to establish a ssh/slogin connection using \fI.shosts/.rhosts\fR or the files in \fI~/.ssh/\fR. If you do not want or cannot do that, you may find the \fBscpb\fR more convenient since it uploads in batch, reducing the number of password prompts. .Sp The only major caveat of the \fBrsync\fR and \fBscpb\fR options is that the files are processed in a batch mode, i.e. not separately, so in case of an error \&\fBdupload\fR will not be able to detect which part of the transfer failed, and just delete the \fB.upload\fR file completely. .RE .IP "\fBlogin\fR [optional]" 4 .IX Item "login [optional]" The account name used to log into the remote host. For \fBftp\fR the default is \fBanonymous\fR, which should work with firewall logins too. For \fBscp\fR, \fBscpb\fR and \fBrsync\fR the default is delegated to SSH and its own configuration. For \fBhttp\fR and \fBhttps\fR there is no default. .IP "\fBpasswordcmd\fR [optional] (since 2.9.9)" 4 .IX Item "passwordcmd [optional] (since 2.9.9)" The command to retrieve a password. It is expected to output the password on stdout. .Sp If this option has not been specified, and the \fBsecret-tool\fR program is installed, the following command will be used to retrieve the password from a system secrets store via the Secret Service interface: \fBsecret-tool lookup host \fR\fIhost\fR\fB user \fR\fIuser\fR\fB service dupload\fR .Sp If the command fails, then the password will be requested from a prompt. .IP "\fBpassword\fR [optional]" 4 .IX Item "password [optional]" The FTP password for anonymous logins. .IP "\fBfilemode\fR [optional] (since 2.9.1)" 4 .IX Item "filemode [optional] (since 2.9.1)" The destination files mode, in octal. If the value is \fBundef\fR, the mode will not be modified. The default is \fB0644\fR. .IP "\fBincoming\fR [required]" 4 .IX Item "incoming [required]" Incoming directory, the directory we try to upload to. .IP "\fBqueuedir\fR [optional]" 4 .IX Item "queuedir [optional]" The directory we move the uploaded files to (after successful upload to \&\fIincoming\fR. Usually necessary only with some special upload queues. .IP "\fBdistallowlist\fR [optional] (since 2.9.6)" 4 .IX Item "distallowlist [optional] (since 2.9.6)" The regex of the distributions allowed for this host. This check is done against the \fBDistribution\fR field in the \fI.changes\fR file. .IP "\fBdistblocklist\fR [optional] (since 2.9.6)" 4 .IX Item "distblocklist [optional] (since 2.9.6)" The regex of the distributions blocked for this host. This check is done against the \fBDistribution\fR field in the \fI.changes\fR file. .IP "\fBmail\fR [optional] (since 2.9.9)" 4 .IX Item "mail [optional] (since 2.9.9)" The email addresses (\f(CW\*(C`to\*(C'\fR and \f(CW\*(C`cc\*(C'\fR) where the announcement about the upload for the \f(CW\*(C`match\*(C'\fR distribution should be sent. .Sp This is an array of hashes with the following keys: .RS 4 .IP "\fBmatch\fR [required]" 4 .IX Item "match [required]" The regex of the distribution that needs to match to send an announcement. .IP "\fBto\fR [required]" 4 .IX Item "to [required]" Email address where the announcement about the packages is sent. .IP "\fBcc\fR [optional]" 4 .IX Item "cc [optional]" Email address where to send a copy address of the announcement. .RE .RS 4 .RE .IP "\fBfullname\fR [optional]" 4 .IX Item "fullname [optional]" Your full name, one that should appear in the announcement. .Sp If you leave this setting empty, the default will depend on your mail system. Usually the full name will be copied from the GCOS field in \&\fI/etc/passwd\fR. .IP "\fBvisibleuser\fR [optional]" 4 .IX Item "visibleuser [optional]" Your username that should appear in the announcement. Defaults to \&\f(CWgetlogin()\fR. .IP "\fBvisiblename\fR [optional]" 4 .IX Item "visiblename [optional]" The host/domain name that appears as the part to the right of the \fB@\fR character in the \fIfrom\fR\-part of the announcement. Defaults to the value your local MTA likes. .IP "\fBpassive\fR [optional] (since 2.0)" 4 .IX Item "passive [optional] (since 2.0)" Set the passive mode for FTP transfers. Since \fBdupload\fR uses Net::FTP, you can also use the environment variable \fBFTP_PASSIVE\fR. .IP "\fBoptions\fR [optional] (since 2.6.3.1)" 4 .IX Item "options [optional] (since 2.6.3.1)" An array reference containing option strings (since 2.10.2), that will be added verbatim to the command line of any \&\fBscp\fR or \fBrsync\fR calls done. .Sp For backwards compatibility it can also be specified as a scalar string, but this usage is discouraged and will be deprecated in the future. .IP "\fBdinstall_runs\fR [optional] (since 2.1)" 4 .IX Item "dinstall_runs [optional] (since 2.1)" Tells \fBdupload\fR that the remote host runs dinstall (or equivalent) so that \fBdupload\fR will not send a duplicate announcement mail. The default is 0 (false), set it to 1 to enable it. .IP "\fBarchive\fR [optional] (since 2.0)" 4 .IX Item "archive [optional] (since 2.0)" If set to 0 (false), adds a \fBX\-No-Archive: yes\fR header in the announcement. The default is 1 (true). .PP The configuration files also contain the following global variables: .IP "\fBdefault_host\fR [optional] (since 2.1)" 4 .IX Item "default_host [optional] (since 2.1)" The default host to upload to. The default value of this variable is set depending on the current vendor, but if there is no configuration for that vendor it will be left unset. .IP "\fBmta\fR [optional] (since 2.9.8)" 4 .IX Item "mta [optional] (since 2.9.8)" The pathname to a \fBsendmail\fR compatible \fIMTA\fR. The MTA specified must support the \fB\-f\fR option to set the envelope sender address, and the \fB\-F\fR option to set the sender's full name. The default is \fI/usr/sbin/sendmail\fR. .IP "\fBno_parentheses_to_fullname\fR [optional] (since 2.1)" 4 .IX Item "no_parentheses_to_fullname [optional] (since 2.1)" Prevents \fBdupload\fR to add parentheses around the full name when making mail announcements. Default is 0 (false), set it to 1 to enable it. .SH HOOKS .IX Header "HOOKS" Hooks are a powerful way to add actions which will be run before or after a dupload (like the preinst and postinst script of \fBdpkg\fR). .PP You have two sorts of hooks: pre-upload and post-upload. Both are simple shell commands (executed by \f(CW\*(C`sh \-c\*(C'\fR so you can use any shell tricks). Pre-uploads are always run (even in dry mode) and stop \fBdupload\fR if they fail (failure being measured by the hook's exit status). Post-uploads are only run when you are not in dry mode and only if the uploading succeeded. .PP Hooks get information about themselves and the nickname acted on through the environment (since 2.10.0), with several matching the configuration options for the current nickname: .IP DUPLOAD_HOOK 4 .IX Item "DUPLOAD_HOOK" The hook category. .IP DUPLOAD_HOST 4 .IX Item "DUPLOAD_HOST" The host nickname. .IP DUPLOAD_METHOD 4 .IX Item "DUPLOAD_METHOD" Same as the \fBmethod\fR option. .IP DUPLOAD_FQDN 4 .IX Item "DUPLOAD_FQDN" Same as the \fBfqdn\fR option. .IP DUPLOAD_LOGIN 4 .IX Item "DUPLOAD_LOGIN" Same as the \fBlogin\fR option. .IP DUPLOAD_INCOMING 4 .IX Item "DUPLOAD_INCOMING" Same as the \fBincomingdir\fR option. .IP DUPLOAD_QUEUEDIR 4 .IX Item "DUPLOAD_QUEUEDIR" Same as the \fBqueuedir\fR option. .IP DUPLOAD_SSH_OPTIONS 4 .IX Item "DUPLOAD_SSH_OPTIONS" Same as the \fBoptions\fR option. .IP DUPLOAD_FTP_PASSIVE 4 .IX Item "DUPLOAD_FTP_PASSIVE" Same as the \fBqueuedir\fR option. .PP Both sorts of hooks are run for a given category: \fBchanges\fR, \fBsourcepackage\fR, \&\fBpackage\fR, \fBfile\fR, \fBdeb\fR and \fBhost\fR. .IP changes 4 .IX Item "changes" This hook is run once per \fIchanges\fR file (given as an argument to \fBdupload\fR) with the filename as its parameter. .IP sourcepackage 4 .IX Item "sourcepackage" This hook is run once per \fIchanges\fR file with the source package name and its version as its two parameters. .IP package 4 .IX Item "package" This hook is run once per binary package (a \fIdeb\fR file) with the package name and its version as its two parameters. .IP file 4 .IX Item "file" This hook is run once per uploaded file, with the file name as its parameter. .IP deb 4 .IX Item "deb" This hook is run once per binary package (a \fIdeb\fR file) with the filename as its parameter. .IP "host (since 2.10.0)" 4 .IX Item "host (since 2.10.0)" This hook is run once before any other pre hook and after any post hook, with the host name as its parameter. .SS Syntax .IX Subsection "Syntax" Hooks are defined in two Perl hashes, \f(CW%preupload\fR and \f(CW%postupload\fR, each indexed by category. In addition to the global hashes, each host entry has two fields with the same names, for the host-specific hooks. .PP Hooks are defined as array references with each item executed in sequence. .PP The shell command will be substituted first: \f(CW%1\fR will be replace by the first argument, etc. .SS "Per-host or global hooks" .IX Subsection "Per-host or global hooks" Hooks can be global (for all the hosts) or can be for a specific host. Host specific hooks override the global ones for each category. .SS Examples .IX Subsection "Examples" This one runs \fBlintian\fR before uploading. It is global and guarantees that you will always upload lintian-clean packages (thanks to \fBlintian\fR return status). .PP .Vb 1 \& $preupload{\*(Aqdeb\*(Aq} = [ \*(Aqlintian \-v \-i %1\*(Aq ]; .Ve .PP This one just display the name and versions of successfully uploaded packages. .PP .Vb 1 \& $postupload{\*(Aqpackage\*(Aq} = [ \*(Aqecho PACKAGE %1 %2 uploaded\*(Aq ]; .Ve .PP Unlike the two others, this one is specific to one host, \fIdebian-ssh\fR, and overrides the default global hook in charge of checking the OpenPGP signatures: .PP .Vb 1 \& $cfg{\*(Aqdebian\-ssh\*(Aq}{preupload}{\*(Aqchanges\*(Aq} = [ \*(Aqecho Uploading %1\*(Aq ]; .Ve .SH FILES .IX Header "FILES" .IP \fI/etc/dupload.conf\fR 4 .IX Item "/etc/dupload.conf" .PD 0 .IP \fI~/.dupload.conf\fR 4 .IX Item "~/.dupload.conf" .IP "\fB\-\-configfile\fR \fIconfig-file\fR" 4 .IX Item "--configfile config-file" .PD The configuration files are loaded if available in the order listed, overriding previous files. .SH ENVIRONMENT .IX Header "ENVIRONMENT" .IP \fBFTP_FIREWALL\fR 4 .IX Item "FTP_FIREWALL" .PD 0 .IP \fBFTP_PASSIVE\fR 4 .IX Item "FTP_PASSIVE" .PD Those of Net::FTP for the \fBftp\fR method. .IP "\fBhttp_proxy\fR or \fBHTTP_PROXY\fR" 4 .IX Item "http_proxy or HTTP_PROXY" .PD 0 .IP "\fBhttps_proxy\fR or \fBHTTPS_PROXY\fR" 4 .IX Item "https_proxy or HTTPS_PROXY" .IP "\fBall_proxy\fR or \fBALL_PROXY\fR" 4 .IX Item "all_proxy or ALL_PROXY" .IP \fBno_proxy\fR 4 .IX Item "no_proxy" .IP \fBREQUEST_METHOD\fR 4 .IX Item "REQUEST_METHOD" .PD Those of HTTP::Tiny for the \fBhttp\fR and \fBhttps\fR methods.