# Uploading the package

Now that you have tested your new package thoroughly, you want to release it to a public archive to share it.

## Uploading to the Debian archive

Once you become an official developer,

See socialdynamics.

you can upload the package to the Debian archive.

There are publicly accessible archives such as which work almost the same way as the Debian archive and provide an upload area for non-DDs. You can set up an equivalent archive by yourself using the tools listed at . So this section is useful for non-DDs, too.

You can do this manually, but it's easier to use the existing automated tools, like

dupload

1 or

dput

1 . We'll describe how it's done with `dupload`.

The `dput` package seems to come with more features and to be becoming more popular than the `dupload` package. It uses the file `/etc/dput` for its global configuration and the file `~/.dput.cf` for per-user configuration. It supports Ubuntu-related services out-of-the-box, too.

First you have to set up `dupload`'s config file. You can either edit the system-wide `/etc/dupload.conf` file, or have your own `~/.dupload.conf` file override the few things you want to change.

You can read the

dupload.conf

5 manual page to understand what each of these options means.

The `$default_host` option determines which of the upload queues will be used by default. `anonymous-ftp-master` is the primary one, but it's possible that you will want to use another one.

See Debian Developer's Reference 5.6, "Uploading a package".

While connected to the Internet, you can upload your package as follows:

    $ dupload gentoo_0.9.12-1_i386.changes

`dupload` checks that the SHA1/SHA256 file checksums match those listed in the `.changes` file. If they do not match, it will warn you to rebuild it as described in completebuild so it can be properly uploaded.

If you encounter an upload problem at , you can fix this by manually uploading a GPG-signed `*.commands` file to there with `ftp`.

See . Alternatively, you can use the `dcut` command from the `dput` package.

For example, using `hello.commands`:

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1
    Uploader: Foo Bar <Foo.Bar@example.org>
    Commands:
     rm hello_1.0-1_i386.deb
     mv hello_1.0-1.dsx hello_1.0-1.dsc
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.10 (GNU/Linux)

    [...]
    -----END PGP SIGNATURE-----

## Including `orig.tar.gz` for upload

When you first upload the package to the archive, you need to include the original `orig.tar.gz` source, too. If the Debian revision number of this package is neither `1` nor `0`, you must provide the `dpkg-buildpackage` option `-sa`.

For the `dpkg-buildpackage` command:

    $ dpkg-buildpackage -sa

For the `debuild` command:

    $ debuild -sa

For the `pdebuild` command:

    $ pdebuild --debbuildopts -sa

On the other hand, the `-sd` option will force the exclusion of the original `orig.tar.gz` source.

## Skipped uploads

If you created multiple entries in `debian/changelog` by skipping uploads, you must create a proper `*_.changes` file that includes all changes since the last upload. This can be done by specifying the `dpkg-buildpackage` option `-v` with the version, e.g., ``1.2``.

For the `dpkg-buildpackage` command:

    $ dpkg-buildpackage -v1.2

For the `debuild` command:

    $ debuild -v1.2

For the `pdebuild` command:

    $ pdebuild --debbuildopts "-v1.2"