Upload a package to a PPA

How you upload a source package to a PPA depends on whether you want to use File Transfer Protocol (FTP) or Secure File Transfer Protocol (SFTP).

Once you’ve built your source package, you need to upload it to Launchpad using the dput tool.

Note

We ask that people include useful changelogs for each package so that users and other developers can understand what new features they are exploring in their work. Read the PPA terms of use for more information.

Basic FTP upload

The simplest way to upload a package is using the basic FTP method with dput.

If you would like to upload your source package using FTP, visit your PPA’s overview page and follow the instructions in the Uploading packages to this PPA section. This will look something like:

dput ppa:your-lp-id/ppa <source.changes>

The source.changes file is usually generated by debuild. If you’re not sure what this means, you should familiarise yourself with creating packages for Ubuntu.

Note

Launchpad builds the packages onsite, and does not accept deb files. The correct command for creating the Debian package source is debuild -S.

Advanced FTP upload

If you’d like additional control over the upload process, you can configure dput manually. To do that, edit ~/.dput.cf to look like this:

[my-ppa]
fqdn = ppa.launchpad.net
method = ftp
incoming = ~<your_launchpad_id>/ubuntu/<ppa_name>/
login = anonymous
allow_unsigned_uploads = 0

You’ll need to:

  • Change my-ppa to whatever name you want to use to refer to your PPA, while retaining the square brackets. Do not use just “ppa” as the name here - that conflicts with an entry in /etc/dput.cf.

  • If you’re uploading to a team PPA, change ~<your-launchpad-id> to your team’s Launchpad name (maintaining the tilde). You must be a member of the team before you can upload to its PPA.

  • Set the correct <ppa-name>. Don’t confuse the PPA name with the display name you have configured for your PPA in Launchpad.

Next, open a terminal and enter the following:

$  dput my-ppa P_V_source.changes

Replace P with the package name and V with the version number. Replace my-ppa with the name you used in your dput.cf file.

Find out about possible upload errors.

Uploading using SFTP

Follow the instructions for uploading with FTP but ensure your dput.cf includes the following:

method = sftp
login = <your Launchpad account name>

You should check the fingerprint of ppa.launchpad.net when prompted to do so by SSH.

Using packages from other distributions

You may be able to use your PPA to build sources from other distributions that use .deb packages. This depends on whether the dependencies can be resolved in Ubuntu.

Create a new dput configuration section using incoming = ~<lp_name>/ubuntu/<ppa_name>/ and the suite you specify will override the suite named in the upload changelog when you upload it using the new configuration:

$ dput my-ppa-force-hardy  P_V_source.changes

You can upload a source from any Debian-compatible distribution straight to your PPA with no changes required and it will be built and published in the targeted Ubuntu suite.

Important

Although Launchpad will attempt to build the package, it may not be able to include all the dependencies of a source created for another a distribution.

If your package can be used on different versions of Ubuntu without being recompiled you can copy the existing binaries from the older series to the new series; see Copying packages.

If your package does need to be recompiled to support multiple Ubuntu series, then you should add a suffix of the series version to the version number. So a package for Ubuntu 17.04 could be named myapp_1.0-2~ppa1~ubuntu17.04.1 and for Ubuntu 16.04 myapp_1.0-2~ppa1~ubuntu16.04.1. (The exact spelling of the suffix is not very important, but it should be based on the series version rather than the series name, since series names aren’t guaranteed to sort lexicographically.) If you need to release an updated package, increment the ~ppa*n* suffix. Specifying the series version here doesn’t change the series that you are targeting; this must still be set correctly as described in the Ubuntu packaging guide’s section on the changelog file.

Important

Version numbers must be unique. This has implications if you want to provide packages for multiple Ubuntu series at once. The same version cannot be reused across releases, each Ubuntu series must have a distinct package version (e.g. by suffixing the series name) or uploads will conflict and be rejected.

Next steps

If there’s a problem with your source package, or its upload, Launchpad will give you an error. Find out more about what the upload errors mean.

You can also read how to delete packages from a PPA.