To be really useful, a repository should also make it as easy to upload new packages.
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.
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.
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:
ssh-keygen
. Do
not specify a passphrase..ssh/authorized_keys
files
to each system. Alternately, you can generate this file directly
from the public keys, but I've found the log-in approach easier..ssh/known_hosts
into /etc/ssh/ssh_known_hosts
and turn on "strict host checking."
The repository should periodically run a program which checks the queue directory and performs the following tasks for each package:
dscverify
.
This will require you to replace or extend the GPG (PGP) keyring
file /etc/share/keyrings/debian-keyring.gpg
(.pgp
)
with your own public keys, or better yet modify the dscverify
program to check an additional keyring.
-Dfield=value
option to
dpkg-buildpackage
.
Packages.gz
and Sources.gz
files with
dpkg-scanpackages
and dpkg-scansources
, respectively.
The Debian project uses a tool called dinstall
on its master
repository.