Next Previous Contents

4. Uploading packages to the repository

To be really useful, a repository should also make it as easy to upload new packages.

4.1 Upload control files

When packages are built, the software will also generate an "upload control file." This file is always named package-name_version.changes and is used in the first stage of uploading the binary and source packages.

4.2 Upload program: dupload

You start the upload process by running the dupload program, or the debrelease wrapper program. These programs will read the upload control file to determine which files need to be uploaded, and their configuration files to determine how to perform the upload.

/etc/dupload.conf

This file contains the mechanical information about how packages should be uploaded. The default file contains information about the various Debian upload sites, but we will want to replace that information with our own. To avoid any possible risk of uploading our packages to an official Debian site (and the confusion that would cause), we should comment out or delete all Debian site information.

Once we have done that, our configuration should look something like this:


package config;

$default_host = "coyotesong";

$cfg{coyotesong} = {
   fqdn => "coyotesong.com",
   login => getlogin() || $ENV{USER} || $ENV{LOGNAME},
   incoming => "/home/repository/debian/incoming/",
   queuedir => "/home/repository/debian/pending/",
#  mailto => "debian-changes\@lists.coyotesong.com", # stable
#  mailtx => "debian-devel-changes\@lists.coyotesong.com",      # unstable, exper.
   visibleuser => getlogin() || $ENV{USER} || $ENV{LOGNAME},
   visiblename => "",
   fullname => "",
   dinstall_runs => 0,
   method => "scp"
};

# Don't remove the following line.  Perl needs it.
1;

## Local Variables: ##
## mode:perl ##
## End: ##

(I have removed the documentary comments for clarity. You should leave them in the real configuration file.)

This program uses a two-phase copy. Files are initially copied into a temporary holding area, and once all files have been successfully transferred the files are copied to queue directory. This minimizes the risk that tools will attempt to process incomplete packages.

OpenSSH and scp

Dupload can use either "ftp" or "scp" to transfer the files, but for security reasons the "ftp" method should not be used unless absolutely required.

You can set up OpenSSH (version 1.x, or version 2.9 and above) to allow connections between systems without prompting the user for a password. To do this is straightforward:

4.3 Installation

The repository should periodically run a program which checks the queue directory and performs the following tasks for each package:

The Debian project uses a tool called dinstall on its master repository.


Next Previous Contents