Diff for "PPA"

Not logged in - Log In / Register

Differences between revisions 2 and 3
Revision 2 as of 2008-07-03 18:26:20
Size: 5929
Editor: 92-237-59-186
Comment:
Revision 3 as of 2008-07-04 16:17:35
Size: 7444
Editor: 92-237-59-186
Comment:
Deletions are marked like this. Additions are marked like this.
Line 18: Line 18:
 * [[BecomingAnUbuntero|become an Ubuntero]] (i.e. have signed the Ubuntu Community Code of Conduct)  * [[BecomingAnUbuntero|become an Ubuntero]] (i.e. you must sign the Ubuntu Community Code of Conduct)
Line 25: Line 25:
Before you can start using your own or a team PPA, you need to activate it. Visit your Launchpad [[https://launchpad.net/people/+me/|profile page]] or the team's overview page Before you can start using a PPA, whether it's your own or it belongs to a team, you need to activate it. Visit your Launchpad [[https://launchpad.net/people/+me/|profile page]] or the team's overview page.

You can only activate your PPA if you have [[BecomingAnUbuntero|signed]] the Ubuntu code of conduct.
Line 31: Line 33:
/!\ '''Important:''' when you install software from a PPA, Ubuntu will warn you that it is unsigned. For more on why packages in PPAs aren't signed, [[PPA/FAQs#unsigned|see the PPA FAQs]]. /!\ '''Important:''' when you install software from a PPA, Ubuntu will warn you that it is unsigned. PPA packages are unsigned because they are not official Ubuntu packages. You should make sure that you're confident in the PPA owner's abilities before you install their packages.
Line 48: Line 50:
= Activating a PPA =


Line 54: Line 52:
Before you start using your PPA to distribute software, you need to be familiar with building .deb source packages. 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]].

When you're ready to create a package for your PPA, there are a couple of things 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.
Line 56: Line 68:
To do this, increase the Ubuntu version number and add a suffix of ~ppa`''`n`'' (where ''`n`'' is your package's revision number).
Line 57: Line 70:
 and host them in your own apt repository. 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``, it will supersede your PPA version.

== 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.
 
{i} '''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 ==

Which ```debuild``` options you use depends on whether or not you're creating an alternative version of a package already in the Ubuntu repositories.

 * '''Alternative version:''' ```debuild -S -sd```
 * '''New package with no orig.tar.gz in Ubuntu's repositories:''' ```debuild -S -sa```

{i} '''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.

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/ubuntu/
login = anonymous
allow_unsigned_uploads = 0
}}}

Change the first line to whatever name you want to use to refer to the source package, while retaining the square brackets.

If you're uploading to a team PPA, change the ```~your-launchpad-id``` to your team's Launchpad name. As you might expect, you must be a member of the team before you can upload to its 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.
Line 62: Line 127:
 When upload an updated version of your package, your users' operating systems will prompt them to upgrade.


handles the rest, including:

 * building binaries for x86, AMD64 and lpia
 *
 
 
 
 

Using your Personal Package Archive (PPA), you can build and distribute software packages for use in Ubuntu and Debian.

 * build packages for x86, AMD64 and lpia architectures
 * automatically push updates to users
 *
Line 82: Line 130:
Use the first two paragraphs to summarise all the important points about this article.

Tell the reader if this is the information they need as soon as possible.

= Instructional text =

Where appropriate, use step by step instructions:

'''Step 1:''' Give concise and unambiguous instructions.

'''Step 2:''' Try not to state the obvious, unless you're writing for a novice user.

{i} '''Note:''' Highlight important information with a note.

'''Step 3:''' Use a well cropped screen shot if it will help orient the reader. Don't let the screen shot replace instructional text: not everyone can see your screen shot. Don't worry about borders or annotation for small, cropped screen shots such as this.

{{attachment:screen-shot.png}}

{i} '''Warning:''' If you're about to tell the reader to delete or otherwise change something that would be hard to restore, warn them.
Line 103: Line 132:
== Full screen shots ==
Line 105: Line 133:
||<tablestyle="float:right; font-size: 0.8em; width:30%; background:#F1F1ED; margin: 0 0 1em 1em;" style="padding:0.5em;">{{attachment:proj-announce.png}}||
||<style="text-align: center;">'''Describe the screen shot here'''||
Line 108: Line 134:
Some screen shots will be better placed to the right of your text. As they're not placed directly below the text that they support, use a border and short description.
Line 110: Line 135:
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam sagittis. Aliquam eros dui, scelerisque id, consequat in, accumsan vitae, pede. Suspendisse neque ligula, scelerisque ac, mattis ut, aliquam quis, odio.
Line 112: Line 136:
Proin nunc nisi, fringilla ac, congue ac, luctus eu, lacus. Maecenas ac purus. Cras felis metus, ultricies non, euismod ac, accumsan eleifend, leo. Quisque imperdiet tempus tellus.
Line 114: Line 137:
Ut euismod, diam nec adipiscing interdum, tortor orci fringilla nisi, vel blandit erat magna at nisi. Fusce hendrerit odio non metus. Mauris nisl massa, dapibus id, feugiat quis, blandit a, quam. Integer tincidunt feugiat nunc. Curabitur iaculis egestas elit. Nam imperdiet suscipit odio.

DRAFT: this page is a work in progress. Please seek further help or check the wiki index for a complete page on this topic.

Overview

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 gets their own PPA.

Your PPA gives you:

  • An APT repository of up to 1 gigabyte for material licensed in accordance with the PPA Terms of Use.

  • 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 your PPA, you need to:

Installing and uninstalling software from a PPA is just as easy as installing software 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.

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. Visit your Launchpad profile page or the team's overview page.

You can only activate your PPA if you have signed the Ubuntu code of conduct.

Installing software from a PPA

PPAs work just 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.

/!\ Important: when you install software from a PPA, Ubuntu will warn you that it is unsigned. PPA packages are unsigned because they are not official Ubuntu packages. You should make sure that you're confident in the PPA owner's abilities before you install their packages.

Adding a PPA to your Ubuntu repositories

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 Launchpad page.

Let's take a look at the 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:

deb http://ppa.launchpad.net/awn-testing/ubuntu intrepid main
deb-src http://ppa.launchpad.net/awn-testing/ubuntu intrepid main

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

Take a look at the Ubuntu guide to adding extra software repositories to find out how to add those URLs to your local Ubuntu system.

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 Ubuntu packaging guide.

When you're ready to create a package for your PPA, there are a couple of things that work slightly differently to standard Ubuntu packages:versioning and dependencies.

Let's take a look at each in detail.

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, it will supersede your PPA version.

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.

{i} 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 your PPA or the team's overview page.

Building

Which debuild options you use depends on whether or not you're creating an alternative version of a package already in the Ubuntu repositories.

  • Alternative version: debuild -S -sd

  • New package with no orig.tar.gz in Ubuntu's repositories: debuild -S -sa

{i} 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.

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/ubuntu/
login = anonymous
allow_unsigned_uploads = 0

Change the first line to whatever name you want to use to refer to the source package, while retaining the square brackets.

If you're uploading to a team PPA, change the ~your-launchpad-id to your team's Launchpad name. As you might expect, you must be a member of the team before you can upload to its 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 version number.

PPA (last edited 2008-09-02 11:29:17 by 92-237-59-186)