Diff for "Packaging/PPA"

Not logged in - Log In / Register

Differences between revisions 36 and 62 (spanning 26 versions)
Revision 36 as of 2009-06-24 04:18:38
Size: 18970
Editor: cable-79-203
Comment: jaunty to karmic
Revision 62 as of 2017-10-17 21:51:51
Size: 4408
Editor: cjwatson
Comment: update architectures documentation
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
Line 8: Line 7:
With Launchpad's Personal Package Archives (PPA), you can build and publish binary Ubuntu packages for multiple architectures simply by uploading an Ubuntu source package to Launchpad. Every individual and team in Launchpad can have one or more PPAs Using a Personal Package Archive (PPA), you can distribute software and updates directly to Ubuntu users. Create your source package, upload it and Launchpad will build binaries and then host them in your own apt repository.
Line 10: Line 9:
PPAs give you: That means Ubuntu users can install your packages in just the same way they install standard Ubuntu packages and they'll automatically receive updates as and when you make them.
Line 12: Line 11:
 * An APT repository of up to 1 gigabyte for free software - see our [[PPATermsofUse|PPA terms of use]] for more detail.
 * Binary packages built for x86, AMD64 and LPIA architectures against Ubuntu.
 * A web front-end where Launchpad users can browse and search for your packages.

Before you create and use your PPA, you need to:

 * [[https://wiki.ubuntu.com/PackagingGuide|learn Ubuntu packaging]]
 * install dput - ```sudo apt-get install dput```
 * have [[ImportingYourOpenPGPKey|imported your PGP key]] to your Launchpad account.
 * [[BecomingAnUbuntero|become an Ubuntero]] (i.e. you must sign the Ubuntu Community Code of Conduct)


Installing and uninstalling software from a PPA is just as easy as installing software from Ubuntu's primary archive. This makes it an ideal way to distribute beta versions, daily builds and other versions of your software for testing, without having to ask your testers to compile your software from source.
Every individual and team in Launchpad can have one or more PPAs, each with its own URL.
Line 28: Line 15:
== Activating a PPA == '''Note:''' [[CommercialHosting]] allow you to have private PPAs.

== Size and transfer limits ==

Each PPA gets 2 GiB of disk space. If you need more space for a particular PPA, [[https://answers.launchpad.net/soyuz|ask us]].

While we don't enforce a strict limit on data transfer, we will get in touch with you if your data transfer looks unusually high.

== Supported architectures ==

When Launchpad builds a source package in a PPA, by default it creates binaries for:

 * [[http://en.wikipedia.org/wiki/X86|x86]]
 * [[http://en.wikipedia.org/wiki/AMD64|AMD64]]

You may also request builds for arm64, armhf, and/or ppc64el. Use the "Change details" page for the PPA to enable the architectures you want.

Changing the set of architectures for which a PPA builds does not create new builds for source packages that are already published in that PPA; it only affects which builds will be created for new uploads. If you need to create builds for newly-enabled architectures without reuploading, go to "View package details" and then "Copy packages", select all the packages for which you want to create builds, select "This PPA", "The same series", and "Copy existing binaries", and submit the form using the "Copy Packages" button.

We use Open``Stack clouds for security during the build process, ensuring that each build has a clean build environment and different developers cannot affect one another's builds accidentally. These clouds do not yet have support for the powerpc and s390x architectures; when they do, it will also be possible to request those architectures in PPAs.

== Supported series ==

When building a source package you can specify one of the supported series in your [[http://packaging.ubuntu.com/html/debian-dir-overview.html#the-changelog|changelog file]] which are listed at [[https://launchpad.net/ubuntu/+ppas|the Launchpad PPA page]].

If you specify a different series the build will fail.

= Activating a PPA =
Line 32: Line 46:
You can only activate your PPA if you have [[BecomingAnUbuntero|signed]] the Ubuntu code of conduct.
Line 38: Line 51:
This means that people downloading/installing packages from your PPA can verify their source. After you've activated your PPA, it can take a couple of hours for Launchpad to generate your key. This means that people downloading/installing packages from your PPA can verify their source. After you've activated your PPA, uploading its first package causes Launchpad to start generating your key, which can take up to a couple of hours to complete.
Line 40: Line 53:
= Installing software from a PPA = Your key, and instructions for adding it to Ubuntu, are shown on the PPA's overview page.
Line 42: Line 55:
PPAs work like normal Ubuntu archives. You can install software in the usual way -- for example, through ```apt-get``` or ```synaptic``` -- and whenever there's an update Ubuntu will prompt you to install it. = Deleting a PPA =
Line 44: Line 57:
== Adding a PPA to your Ubuntu repositories == When you no longer need your PPA, you can delete it. This deletes all of the PPA's packages, and removes the repository from `ppa.launchpad.net`. You'll have to wait up to an hour before you can recreate a PPA with the same name.
Line 46: Line 59:
To install packages from a PPA, you need to tell Ubuntu where to find it. You do this by giving Ubuntu the PPA's URL, which you can find on the PPA's overview page. = Next steps =
Line 48: Line 61:
Let's take a look at the [[https://launchpad.net/~awn-testing/+archive|AWN Testing team's PPA]] as an example. If you're using the most recent '''development''' version of Ubuntu, all you need do is copy these lines in the ```apt sources.list entries``` section of the page. For example: You can familiarise yourself with how PPAs work by [[Packaging/PPA/InstallingSoftware|installing a package from an existing PPA]]. You can also jump straight into [[Packaging/PPA/Uploading|uploading your source packages]].
Line 50: Line 63:
{{{
deb http://ppa.launchpad.net/awn-testing/ubuntu karmic main
deb-src http://ppa.launchpad.net/awn-testing/ubuntu karmic main
}}}

If, like most people, you're using another version of Ubuntu -- such as the most recent stable version -- then you need to select that version from the drop-down box. That'll automatically update the URLs you need to copy.

Take a look at the [[https://help.ubuntu.com/8.04/add-applications/C/extra-repositories-adding.html|Ubuntu guide to adding extra software repositories]] to find out how to add those URLs to your local Ubuntu system.

<<Anchor(keys)>>
== Adding a PPA's keys to your system ==

Each PPA has its own unique key that is used to sign the packages in that archive. This lets you know that:

 * the packages you're downloading haven't been altered since Launchpad built them
 * you are downloading from the PPA you wanted.

'''Important:''' You download and install PPA packages at your own risk. Ubuntu, Launchpad and Canonical do '''not''' endorse these packages. You must be certain that you trust the PPA owner before you install their software.

Until you add the PPA's key to your own system, you'll see warnings that you're downloading from an untrusted source. If you trust the PPA owner, add the PPA's key to your system.

'''Tip:''' for a general introduction to GPG keys and signing, see [[https://help.ubuntu.com/community/GnuPrivacyGuardHowto|Ubuntu's GPG help page]].

=== Adding the keys using GNOME ===

The easiest way to add a PPA's key to your system is to follow our screen cast: [[http://www.archive.org/download/LaunchpadAddingAPpasKeyToYourUbuntuSystem/launchpad-adding-key-for-signed-ppa.ogv|Ogg Theora version]], [[http://www.youtube.com/watch?v=UUZOQsNo_ws|YouTube version]].

Here's what the screencast tells you:

'''Step 1:''' Visit the PPA's overview page in Launchpad. Let's go back to the [[https://launchpad.net/~awn-testing/+archive|AWN Testing team's PPA]] that we were looking at earlier.

'''Step 2:''' Click the key fingerprint on the overview page. It'll look something like this: ``B0BE17C2A0C914F086B7B8327D2C7A23BF810CD5``.

'''Step 3:''' This will take you to the key's page on the Ubuntu keyserver. Click the ID, which looks something like this: ```BF810CD5```

'''Step 4:''' Copy the public key, which will be something like: -- i.e. the portion starting:

{{{
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: SKS 1.0.10

mI0ESXS1/wEEALis4to4JdgrkdRunmSTfB2tYRq99Cdcgdh9up4HzAf1yTZU1EtmETPP1Uy2
vnAFf/cCunL5VRywNJB3QOxiHdvNlijbdsa0H/fT/ulq+A4iDljUEfsaJug+dAB5uEJE0BzZ
agRjgLbFvRYtsKf3BwZizbo4XtWSAm3JSjZCGZKTABEBAAG0IkxhdW5jaHBhZCBQUEEgZm9y
IEF3biBUZXN0aW5nIFRlYW2IRgQQEQIABgUCSXqnWgAKCRBBf7ZCSCH+JPZMAJ4xW7gbpuA+
yedehvDQWdJHHUgseQCgy6NOmAyXqRKrIXWERkXw6h9TsRuItgQTAQIAIAUCSXS1/wIbAwYL
CQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEH0seiO/gQzVpSID/0FXxTSLtxPHrT7IE9eif5qJ
vjOjzcmOCXe9/3G0ctV8IfYHx0VynddjxgTqJ9WuEjMLVHRgXvK1Rw1XMlik+MeyyHrr9EWQ
DUFbUs+Yc2usRyZY8pVe2Uwy2x7lFsi6VBfo0k9jVsu1l1qBU9BhANJDUTHjR15aPYiUJiZa
13CZ
=a6Gh
-----END PGP PUBLIC KEY BLOCK-----
}}}

'''Step 5:''' Paste the public key into a text editor and save it.

'''Step 6:''' Open ''System->Administration->Software Sources'' and click the ''Authentication'' tab.

'''Step 7:''' Click ''Import Key File'', select the key you saved earlier and you're done!

=== Adding the keys in the terminal ===

If you're used to adding keys to your personal keyring, you'll still want to read this section as we're going to add the PPA's key to apt's keyring.

First up, visit the PPA's overview page. Let's go back to the [[https://launchpad.net/~awn-testing/+archive|AWN Testing team's PPA]] that we were looking at earlier.

Here you can see the fingerprint of the PPA's key. It'll look something like this: ```B0BE17C2A0C914F086B7B8327D2C7A23BF810CD5```. Copy it and then open a terminal.

To add the AWN key, you'd enter this:

{{{
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com B0BE17C2A0C914F086B7B8327D2C7A23BF810CD5
}}}

Replace ```B0BE17C2A0C914F086B7B8327D2C7A23BF810CD5``` with the fingerprint of the PPA key you're dealing with.

= Building your source package =

Before you start using your PPA to distribute software, you need to be familiar with building .deb source packages for Ubuntu. The best place to learn how to package for Ubuntu is the [[https://wiki.ubuntu.com/PackagingGuide|Ubuntu packaging guide]].

You should also ensure that the email address and GPG key you use with dput are the same as those associated with your Launchpad account.

There are a couple of aspects of PPAs that work slightly differently to standard Ubuntu packages: '''versioning''' and '''dependencies'''.

Let's take a look at each in detail.

<<Anchor(versioning)>>
== Versioning ==

Ubuntu package names are suffixed by the version number of the package. This allows Ubuntu to distinguish newer packages from older ones and so remain up to date.

If you're creating an alternative version of a package already available in Ubuntu's repositories, you should ensure that:

 * your package supersedes the official Ubuntu version
 * future Ubuntu versions will supersede your package.
 
To do this, increase the Ubuntu version number and add a suffix of ~ppa''n'' (where ''n'' is your package's revision number).

For example: you're creating an experimental version of the ``myapp_1.0-1`` package. Your PPA package would be named ``myapp_1.0-2~ppa1``.

Here, the tilde knocks the precedence of the package down to below whatever is in front of it. So, for now, this package counts as being a higher version number than ``myapp_1.0-1`` but when Ubuntu releases ``myapp_1.0-2`` that will supersede your PPA version.

Version numbers must be unique. This has implications if you want to provide packages for multiple Ubuntu series at once:

If your package can be used on different versions of Ubuntu ''without being recompiled'' then use the naming scheme already described. When you have successfully uploaded your package to your PPA you can copy the existing binaries to the new series; see [[Packaging/PPA#copyingpackages|Copying packages]] below.

If your package does need to be recompiled to support multiple Ubuntu series, then you should add a suffix of the series name to the version number. So a package for the Intrepid Ibex could be named ``myapp_1.0-2~ppa1~intrepid1`` and for the Hardy Heron ``myapp_1.0-2~ppa1~hardy1``. If you need to release an updated package, increment the ~ppa''n'' suffix. It is important to note that specifying the version name here doesn't change the series that you are targetting; this must still be set correctly as described in the Ubuntu packaging guide's section on the [[https://wiki.ubuntu.com/PackagingGuide/Basic#changelog|changelog file]].

== Dependencies ==

Launchpad satisfies your package's {{{Build-Depends}}} using:

 * the most recent versions of the packages in the PPA you're uploading to
 * all sections of the primary Ubuntu archive - i.e. main, restricted, universe and multiverse
 * '''optionally:''' other PPAs in Launchpad.
 
'''Note:''' If you're already familiar with uploading to the Ubuntu primary archive, you should note that PPA builds do not have any build dependency restrictions, unlike a build in the primary Ubuntu archive. If you want to build the same package in the primary Ubuntu archive at a later point you may need to revise the package's component and/or pocket.

=== Depending on other PPAs ===

If you want Launchpad to satisfy your package dependencies using one or more other PPAs, follow the ```Edit dependencies``` link on [[https://launchpad.net/people/+me/+archive|your PPA]] or the team's overview page.

== Building ==

''See the Ubuntu packaging guide's section on [[https://wiki.ubuntu.com/PackagingGuide/Basic#Building%20the%20Source%20Package|building source packages]].''

How you build your package depends on whether you're creating a brand new package or you're creating a derivative of a package that's already in Ubuntu's primary archive.

If you're creating an alternative version of a package that's already in Ubuntu's primary archive, you don't need to upload the ```.orig.tar.gz``` file, i.e. the original source.

So, the ```debuild``` options you'd use are:

 * '''alternative version of an existing package (will be uploaded without the .orig.tar.gz file):''' ```debuild -S -sd```
 * '''brand new package with no existing version in Ubuntu's repositories (will be uploaded with the .orig.tar.gz file):''' ```debuild -S -sa```

'''Note:''' If you get the error ```clearsign failed: secret key not available``` when signing the changes file, use an additional option ```-k[key_id]``` when calling debuild. Use ```gpg --list-keys``` to get the key ID. Look for a line like "```pub 12345/12ABCDEF```"; the part after the slash is the key ID.

== Uploading ==

```Dput``` is the tool you use to upload your source package to Launchpad. It uploads the following files:

 * ```.dsc```
 * ```.changes```
 * ```.diff.gz```
 * and optionally the ```.orig.tar.gz``` (if you used ```debuild -S -sa``` to build your package)

First, you need to tell ``dput`` where to send your package and by what method. To do that, edit ```~/.dput.cf``` to look like this:

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

You'll need to:

 * Change the first line to whatever name you want to use to refer to your PPA, while retaining the square brackets.
 * If you're uploading to a team PPA, change the ```~<your-launchpad-id>``` to your team's Launchpad name (maintaining the tilde). As you might expect, you must be a member of the team before you can upload to its PPA.
 * Set the correct ```<ppa-name>```, the default PPA name is ''ppa'', use the specific name for other PPA in the same context. Don't confuse the PPA name with the display name you have configured for your PPA in Launchpad, for most users creating their first PPA the PPA name will be literally just the string ''ppa''.

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 [[PPA#versioning|version]] number.

'''Find out about [[Packaging/UploadErrors|possible upload errors]]'''.
 
=== Using packages from other distributions ===

You can use your PPA to build sources from other distributions that use ```.deb``` packages.

Create a new dput configuration section using ```incoming = ~<lp_name>/ppa/ubuntu/<a ubuntu suite>``` 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 meet all of the dependencies of a source created for another a distribution.
 
<<Anchor(copyingpackages)>>
= Copying packages =

You can copy packages from other PPAs into any PPA that you can upload to. You also have the option of copying packages between distro-series (i.e different distribution releases).

For example: take a look at the [[https://launchpad.net/~ubuntu-mobile/+archive/ppa/+copy-packages|Ubuntu Mobile team's PPA copy packages]] page.

Here you can:

 * select one or more sources to copy
 * select the destination PPA - you must have upload permission for that archive
 * specify the destination series
 * choose whether or not to also copy the related binary package.

As soon as you request the copy, the source will be listed in your PPA with details of it origin. However, it can take up to twenty minutes for the files to actually appear in your archive.

If you only copy the source, the corresponding build records are created in the destination PPA immediately.

= Deleting packages =

You can delete any package from your PPA. However, it can take some time before the package is removed from the listing on your PPA overview page and the reported size of your archive is adjusted.

The deletion page allows you to schedule packages for deletion. To do this, search first for the desired packages, select one of more of them, input a comment, and request deletion. Deletion will affect the source selected and any binary packages built from it.

Deletion marks the packages as deleted in the UI, but they are actually removed from your PPA in separate steps:

 * '''Archive indexes''': A deleted package disappears from the archive indexes in at most 20 minutes. As soon as this happens, users will no longer be able to install it via apt.
 * '''Files on disk''': A file will be removed from the archive disk pool only when '''all''' packages referencing it have been scheduled for deletion. This includes packages published in other series, or multiple package versions referring to the same original upstream tarball.

The archive removal job runs every 30 minutes. It may take some time to remove a file from disk, depending on the number of packages referencing it. In the most common situation, files are removed within an hour.

Because of these conditions, the easiest alternative to replace a broken source is always to upload a package with a higher version number and let the system automatically supersede and remove the older version. '''You should not rely on deletion requests to re-upload the same source version with different contents.'''


= Frequently asked questions =


'''What limits apply to the PPA service?'''<<BR>>
Other than the expectation that packages in your PPA are free software, we do ask that you not abuse the build system with unnecessary builds or automated uploads of large numbers of packages. We will monitor the total amount of build time per user and ask folks to be reasonable in their use of the shared resources in the PPA pool. Developers and teams each start with 1 gigabyte of storage space freely available in their PPA's for source and binary packages. We will not accept uploads of packages that are unmodified from their original source in Ubuntu or Debian, only packages that include your own changes. 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 [[PPATermsofUse|PPA Terms of Use]] for more information.

'''How many users can download packages from my PPA?'''<<BR>>
There are no limits on the number of users you can point at your PPA. We would encourage you to build communities of users and testers around your PPA, and there are no bandwidth restrictions on downloads from any PPA.

'''How many PPAs can I have?'''<<BR>>
Since release 2.2.3 multiple PPAs per person are supported. See [[http://blog.launchpad.net/cool-new-stuff/multiple-ppas-per-person|this launchpad blog entry]] for details.

'''Why are only X86, AMD64 and LPIA architectures supported?'''<<BR>>
We use the Xen virtualisation system for security during the build process, ensuring that each build has a clean build environment and different developers cannot impact on one another's builds accidentally. This technology is only available for these architectures.

||<tablestyle="border: 0; width: 100%;"> ~-[[Translations/Groups|< Translation groups]] -~ ||<style="text-align: right;"> ~-[[Packaging/UploadErrors|Package upload errors >]] -~||
||<tablestyle="border: 0; width: 100%;"> ~-[[Translations/Groups|< Translation groups]] -~ ||<style="text-align: right;"> ~-[[Packaging/PPA/InstallingSoftware|Installing software from a PPA >]] -~||

Launchpad Help > Packaging > Personal Package Archives

Overview

Using a Personal Package Archive (PPA), you can distribute software and updates directly to Ubuntu users. Create your source package, upload it and Launchpad will build binaries and then host them in your own apt repository.

That means Ubuntu users can install your packages in just the same way they install standard Ubuntu packages and they'll automatically receive updates as and when you make them.

Every individual and team in Launchpad can have one or more PPAs, each with its own URL.

Packages you publish in your PPA will remain there until you remove them, they're superseded by another package that you upload or the version of Ubuntu against which they're built becomes obsolete.

Note: CommercialHosting allow you to have private PPAs.

Size and transfer limits

Each PPA gets 2 GiB of disk space. If you need more space for a particular PPA, ask us.

While we don't enforce a strict limit on data transfer, we will get in touch with you if your data transfer looks unusually high.

Supported architectures

When Launchpad builds a source package in a PPA, by default it creates binaries for:

You may also request builds for arm64, armhf, and/or ppc64el. Use the "Change details" page for the PPA to enable the architectures you want.

Changing the set of architectures for which a PPA builds does not create new builds for source packages that are already published in that PPA; it only affects which builds will be created for new uploads. If you need to create builds for newly-enabled architectures without reuploading, go to "View package details" and then "Copy packages", select all the packages for which you want to create builds, select "This PPA", "The same series", and "Copy existing binaries", and submit the form using the "Copy Packages" button.

We use OpenStack clouds for security during the build process, ensuring that each build has a clean build environment and different developers cannot affect one another's builds accidentally. These clouds do not yet have support for the powerpc and s390x architectures; when they do, it will also be possible to request those architectures in PPAs.

Supported series

When building a source package you can specify one of the supported series in your changelog file which are listed at the Launchpad PPA page.

If you specify a different series the build will fail.

Activating a PPA

Before you can start using a PPA, whether it's your own or it belongs to a team, you need to activate it on your profile page or the team's overview page. If you already have one or more PPAs, this is also where you'll be able to create additional archives.

Your PPA's key

Launchpad generates a unique key for each PPA and uses it to sign any packages built in that PPA.

This means that people downloading/installing packages from your PPA can verify their source. After you've activated your PPA, uploading its first package causes Launchpad to start generating your key, which can take up to a couple of hours to complete.

Your key, and instructions for adding it to Ubuntu, are shown on the PPA's overview page.

Deleting a PPA

When you no longer need your PPA, you can delete it. This deletes all of the PPA's packages, and removes the repository from ppa.launchpad.net. You'll have to wait up to an hour before you can recreate a PPA with the same name.

Next steps

You can familiarise yourself with how PPAs work by installing a package from an existing PPA. You can also jump straight into uploading your source packages.

< Translation groups

Installing software from a PPA >

Packaging/PPA (last edited 2023-08-17 12:50:36 by jugmac00)