dupload.conf(5) | Debian Project | dupload.conf(5) |
dupload.conf - configuration file for dupload
The configuration file is rather straight forward Perl code as it is included by the dupload script via "do $config". The config file is read as Perl code!
Any dupload.conf must begin with "package config;" because "config" is the namespace expected by dupload.
For examples of the configuration please refer to the global configuration file /etc/dupload.conf.
It contains associative arrays, each indexed by the nickname (see --to option of dupload), for the following items:
For the copy method, this option is ignored and the local FQDN will be used instead.
If you are using an upload queue, use ftp because it is fast. If you are using an authenticated host, always use scp or rsync via SSH, because ftp transmits the password in clear text.
For scp and rsync to work properly, you have to setup the remote and local host to establish a ssh/slogin connection using .shosts/.rhosts or the files in ~/.ssh/. If you do not want or cannot do that, you may find the scpb more convenient since it uploads in batch, reducing the number of password prompts.
The only major caveat of the rsync and scpb options is that the files are processed in a batch mode, i.e. not separately, so in case of an error dupload will not be able to detect which part of the transfer failed, and just delete the .upload file completely.
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 /etc/passwd.
The configuration files also contain the following global variables:
Hooks are a powerful way to add actions which will be run before or after a dupload (like the preinst and postinst script of dpkg).
You have two sort of hooks: pre-upload and post-upload. Both are simple shell commands (executed by "sh -c" so you can use any shell tricks). Pre-uploads are always run (even in dry mode) and stop dupload 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.
Both sorts of hooks are run for a given category: changes, sourcepackage, package, file or deb.
Hooks are defined in two Perl hashes, %preupload and %postupload, 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.
Hooks are defined as list reference with each item executed in sequence. Note: For backwards compatibility with old configurations they can be defined as a simple scalar, even though they will emit a warning, but this support will be dropped after the next major Debian release.
The shell command will be substituted first: %1 will be replace by the first argument, etc.
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.
This one runs lintian before uploading. It is global and guarantee that you will always upload lintian-clean packages (thanks to lintian return status).
$preupload{'deb'} = [ 'lintian -v -i %1' ];
This one just display the name and versions of successfully uploaded packages.
$postupload{'package'} = [ 'echo PACKAGE %1 %2 uploaded' ];
Unlike the two others, this one is specific to one host, debian-ssh, and overrides the default global hook in charge of checking the OpenPGP signatures:
$cfg{'debian-ssh'}{preupload}{'changes'} = [ 'echo Uploading %1' ];
The configuration is searched as following:
/etc/dupload.conf ~/.dupload.conf
The latest entries override the former.
Those of Net::FTP for the FTP method:
FTP_FIREWALL FTP_PASSIVE
2020-12-30 | 2.9.6 |