Diff for "PPAQuickStart"

Not logged in - Log In / Register

Differences between revisions 1 and 75 (spanning 74 versions)
Revision 1 as of 2007-07-20 20:12:10
Size: 8382
Editor: 82-47-122-108
Comment:
Revision 75 as of 2008-06-04 12:19:23
Size: 12659
Editor: ta-1-193
Comment: Describe strange upload error and workaround, thanks to Martin Pool's blog
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
With Launchpad's Personal Package Archives (PPA), you can build and publish binary packages for multiple architectures simply by uploading a source package. ||<tablestyle="float:right; font-size: 0.9em; width:40%; background:#F1F1ED; margin: 0 0 1em 1em;" style="padding:0.5em;">[[TableOfContents]]||
= Introduction =
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.

 {i} '''Important:''' This guide does not show you how to create source packages. You should only continue if you are familiar with Debian-based packaging as used by Ubuntu. To learn how to package for Ubuntu, follow [https://wiki.ubuntu.com/PackagingGuide The Ubuntu Packaging Guide].
Line 5: Line 9:
 * Up to a 1 gigabyte apt repository for material licensed with an [http://opensource.org/licenses/category OSI-approved licence].
 * Binaries built for x86 and AMD64 architectures.
 * An APT repository of up to 1 gigabyte for material licensed in accordance with the [wiki:PPATermsofUse PPA Terms of Use].
 * Binary packages built for x86 and AMD64 architectures against Ubuntu.
Line 8: Line 12:
    The Personal Package Archives feature is currently in beta. Before you create your PPA, please note that:
Line 11: Line 13:
 * Everything in your archive will be deleted automatically when PPA moves from beta to production.
 * The PPA beta is running in Launchpad's sandbox environment at dogfood.launchpad.net and uses a snapshot of Launchpad's production database from June 2007.
 * You must be an Ubuntero (i.e. have signed the Ubuntu Community Code of Conduct), a member of the Launchpad Beta Testers team and have uploaded your GPG key all in your user profile in the dogfood environment.
   
{i} '''Important:''' If you are not a member of the Launchpad Beta Testers team in the dogfood environment, email ppa-beta@launchpad.net to request membership.
   
== Checking your account is eligible for a PPA ==
Before you create your PPA, you need to:
Line 19: Line 15:
Before you continue, check that your dogfood Launchpad account is eligible for a PPA.  * [:BecomingAnUbuntero:become an Ubuntero] (i.e. have signed the Ubuntu Community Code of Conduct)
 * have [:ImportingYourOpenPGPKey:imported your PGP key] to your Launchpad account.
Line 21: Line 18:
Log into your account on dogfood Launchpad, then see our guides: = Activating your PPA =
Line 23: Line 20:
 * [:BecomingAnUbuntero:Becoming an Ubuntero]
 * [:ImportingYourOpenPGPKey:Importing your OpenPGP key]
 * [:JoiningLaunchpadBetaTesters:Joining the Launchpad Beta Testers team]

== Activating your PPA ==

'''Step 1:''' Visit your [https://dogfood.launchpad.net/people/+me/ profile page], in dogfood Launchpad, by clicking your name in the top-right corner of the page.
'''Step 1:''' Visit your Launchpad [https://launchpad.net/people/+me/ profile page].
Line 33: Line 24:
'''Step 2:''' Click '''Activate PPA''' in the ''Actions'' menu, in the left-hand column of the page. '''Step 2:''' Click {{{Activate PPA}}} in the {{{Actions}}} menu, in the left-hand column of the page.
Line 39: Line 30:
'''Step 4:''' Enter a description of your PPA, then click '''Add''' if you agree to the terms of service. '''Step 4:''' Enter a description of your PPA, then click {{{Add}}} if you agree to the terms of service.
Line 43: Line 34:
If you are an administrator of a Launchpad team, you can create a team PPA using by following the same steps but clicking '''Activate PPA''' in your team's ''Actions'' menu. == Creating a team PPA ==
Line 45: Line 36:
== Creating your source package == If you are an administrator of a Launchpad team, you can create a team PPA by applying the same steps as you would for creating a personal PPA but on your team's profile page. Any build failures from a team PPA will be sent to the team's contact address or, if none is set, to each member of the team.
Line 47: Line 38:
{i} '''Important:''' This guide does not show you how to create source packages. You should only continue if you are familiar with Debian-based packaging as used by Ubuntu. = Creating your source package =

When creating a source package for use with PPA, you need to consider:

'''Versioning:''' If you're packaging an alternative version of a package already available in Ubuntu's repositories, you should ensure your package supersedes the current Ubuntu version. We recommend using a suffix of `~ppa`''`n`'' (where ''`n`'' is your package's revision number). This will also ensure that a newer Ubuntu version will supercede your PPA version.

Example: if you're packaging an experimental version of MyApp1.0, name the first version of your package myapp_1.0.1-0ubuntu1~ppa1.

However, if you're building an alternative version of a package already in the primary Ubuntu archive, you should also increment the Ubuntu package version. This will also ensure that your package supercedes the current Ubuntu package because a tilde effectively takes a package version backwards.

Example: If you're building an updated version of a current package ubuntuapp_1.2.3-4ubuntu5 then your package should be named ubuntuapp_1.2.3-4ubuntu6~ppa1. This means your package will supercede the current one. If a new package called ubuntuapp_1.2.3-4ubuntu6 later appears in the primary Ubuntu archive then it will supercede your package.
Line 51: Line 52:
 * the latest packages from the PPA you're uploading to
 * the main Ubuntu archive.
  
'''Versioning:''' By using {{{~ppa<n>}}} in the package version string, you can make sure users of your PPA packages can upgrade to a newer version that might hit the real Ubuntu archive later.
 * 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.

{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.
Line 59: Line 60:
fqdn = upload.dogfood.launchpad.net
incoming = ~<LP_NAME>/ubuntu/
login = anonymous}}}
fqdn = ppa.launchpad.net
method = ftp
incoming = ~your-launchpad-id/ubuntu/
login = anonymous
allow_unsigned_uploads = 0
}}}
Line 66: Line 69:
fqdn = upload.dogfood.launchpad.net fqdn = ppa.launchpad.net
method = ftp
Line 68: Line 72:
login = anonymous}}} login = anonymous
allow_unsigned_uploads = 0
}}}
Line 72: Line 77:
'''Step 2:''' Upload signed sources only (no binaries), using: '''Step 3:''' Upload signed sources only (no binaries), using
Line 74: Line 79:
dput phototeam-ppa <package>_<version>.source.changes dput my-ppa P_V_source.changes
Line 77: Line 82:
'''Step 3:''' As there is no override system, you have to upload you package to the right/desired component. In {{{debian/control}}}, use this syntax {{{Section: universe/devel}}}. or alternatively for the team PPA

 {{{
dput phototeam-ppa P_V_source.changes
}}}
replacing ''P'' with the name of the package, and ''V'' with the version number.

If you get a message that there is no signature on your changes file, either run ```debuild -S -sa -k<yourkeyid>``` or ```debsign P_V_source.changes```.

 {i} '''Note:''' If you're building an alternative version of a package already in the primary Ubuntu archive, build your source package using ```debuild -S -sd```. If you're building an entirely new package whose orig.tar.gz is not yet in the Ubuntu primary archive, build the source package with ```debuild -S -sa```.

 {i} '''Note:''' If you get error when signing the changes file (```clearsign failed: secret key not available```), pass an additional option `-k[key_id]` to ```debuild```. You can use ```gpg --list-keys``` to get the key ID. Look for line like "```pub 12345/12ABCDEF```", the part after "/" is the key ID.

 {i} '''Note:''' If your upload appears to succeed but you receive a confusing email response containing the message:

  {{{
Rejected:
Signer has no upload rights at all to this distribution.
Not permitted to upload to the RELEASE pocket in a series in the 'CURRENT' state.
}}}

  this means that you forgot to specify your PPA's name on the command-line (that is, the "```my-ppa```" part). Therefore, your upload was trying to go into the Ubuntu distribution, rather than into a PPA, and you're not authorized to put it there. This is the default behaviour if you omit the PPA name! However, there is a pretty easy (if crude) way to disable this behaviour, by adding these lines to your ```~/.dput.cf```:

  {{{
[DEFAULT]
default_host_main = notspecified

[notspecified]
fqdn = SPECIFY.A.PPA.NAME
incoming = .
}}}

  Now if you omit the PPA name you'll immediately get an error including the text "```SPECIFY.A.PPA.NAME```", which should jog your memory.
Line 83: Line 120:
https://dogfood.launchpad.net/people/+me/+archive/+builds?build_state=all&build_text= https://launchpad.net/people/+me/+archive/+builds?build_state=all&build_text=
Line 85: Line 122:
== Accessing your archive == == Using sources from other distributions ==
Line 87: Line 124:
The contents of your archive is searchable and browsable using dogfood Launchpad's PPA interface at: You can use PPA to build sources from other distributions that use .deb packages.
Line 89: Line 126:
https://dogfood.launchpad.net/ubuntu/+ppas Upload to ~<lp_name>/ubuntu/<suite> and the suite you specify will override the suite named in the upload changelog. You can upload a source from any Debian-compatible distribution straight to your PPA with no changes required.

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

= Accessing your archive =

You can search and browse all PPAs at:

https://launchpad.net/ubuntu/+ppas
Line 93: Line 138:
http://ppa.dogfood.launchpad.net/<LP_NAME>/

{i} '''Note:''' Replace <LP_NAME> with your Launchpad username.
http://ppa.launchpad.net/your-launchpad-id
Line 100: Line 143:
deb http://ppa.dogfood.launchpad.net/<LP_NAME>/ubuntu <development release) main restricted universe multiverse
deb-src http://ppa.dogfood.launchpad.net/<LP_NAME>/ubuntu <development release> main restricted universe multiverse
deb http://ppa.launchpad.net/your-launchpad-id/ubuntu <ubuntu release> main
deb-src http://ppa.launchpad.net/your-launchpad-id/ubuntu <ubuntu release> main
Line 104: Line 147:
== Frequently asked questions == [[Anchor(copy)]]
= 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: the [https://launchpad.net/~ubuntu-mobile/+archive/+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
 * specifiy 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.


[[Anchor(delete)]]
= Removing packages from your PPA =

To remove packages from your PPA, click ```Delete packages``` in the ```Actions``` menu and then select the packages you want to remove.

= Frequently asked questions =
Line 107: Line 174:
Yes, this service is available to any developer who wants to publish packages of their free software code. You need a Launchpad account, you will also need a GPG key to sign your source code uploads and you will need to accept the Terms of Service [XXX link needed] which include the Ubuntu Code of Conduct. Yes, this service is available to any developer who wants to publish packages of their free software code. You need a Launchpad account, you will also need a GPG key to sign your source code uploads and you will need to accept the Terms of Service which include the Ubuntu Code of Conduct.
Line 110: Line 177:
This is a free service for free software developers, so at present we will only support uploads of software under a free software or open source license. Please do not publish packages in your PPA which are not redistributable (the basic requirement for packages in Ubuntu). We may make this service available to commercial software developers too, and would be happy to hear from you if you think that would be useful for you. This is a free service for free software developers and licensing is limited to those which are specified in the [wiki:PPATermsofUse PPA Terms of Use]. We may make this service available to commercial software developers too, and would be happy to hear from you if you think that would be useful for you.
Line 113: Line 180:
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 [https://dogfood.launchpad.net/people/+me/+ppa-tos PPA Terms of Service] for more information. 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 [wiki:PPATermsofUse PPA Terms of Use] for more information.
Line 129: Line 196:

'''Why do I get a warning about unauthenticated packages?'''[[BR]]
At present the PPA system does not sign the archive, and Ubuntu's apt will issue a warning when fetching from such archives. This is [https://bugs.edge.launchpad.net/soyuz/+bug/125103 bug 125103].

TableOfContents

Introduction

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.

  • {i} Important: This guide does not show you how to create source packages. You should only continue if you are familiar with Debian-based packaging as used by Ubuntu. To learn how to package for Ubuntu, follow [https://wiki.ubuntu.com/PackagingGuide The Ubuntu Packaging Guide].

Your PPA gives you:

  • An APT repository of up to 1 gigabyte for material licensed in accordance with the [wiki:PPATermsofUse PPA Terms of Use].
  • Binary packages built for x86 and AMD64 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:

  • [:BecomingAnUbuntero:become an Ubuntero] (i.e. have signed the Ubuntu Community Code of Conduct)

  • have [:ImportingYourOpenPGPKey:imported your PGP key] to your Launchpad account.

Activating your PPA

Step 1: Visit your Launchpad [https://launchpad.net/people/+me/ profile page].

attachment:name.png

Step 2: Click Activate PPA in the Actions menu, in the left-hand column of the page.

attachment:activate-ppa.png

Step 3: Read the terms of service.

Step 4: Enter a description of your PPA, then click Add if you agree to the terms of service.

You are now ready to upload a source package to your PPA.

Creating a team PPA

If you are an administrator of a Launchpad team, you can create a team PPA by applying the same steps as you would for creating a personal PPA but on your team's profile page. Any build failures from a team PPA will be sent to the team's contact address or, if none is set, to each member of the team.

Creating your source package

When creating a source package for use with PPA, you need to consider:

Versioning: If you're packaging an alternative version of a package already available in Ubuntu's repositories, you should ensure your package supersedes the current Ubuntu version. We recommend using a suffix of ~ppan (where n is your package's revision number). This will also ensure that a newer Ubuntu version will supercede your PPA version.

Example: if you're packaging an experimental version of MyApp1.0, name the first version of your package myapp_1.0.1-0ubuntu1~ppa1.

However, if you're building an alternative version of a package already in the primary Ubuntu archive, you should also increment the Ubuntu package version. This will also ensure that your package supercedes the current Ubuntu package because a tilde effectively takes a package version backwards.

Example: If you're building an updated version of a current package ubuntuapp_1.2.3-4ubuntu5 then your package should be named ubuntuapp_1.2.3-4ubuntu6~ppa1. This means your package will supercede the current one. If a new package called ubuntuapp_1.2.3-4ubuntu6 later appears in the primary Ubuntu archive then it will supercede your package.

Dependencies: Your package's Build-Depends will always be satisfied 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.

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

Step 1: Edit ~/.dput.cf and add something like:

  • [my-ppa]
    fqdn = ppa.launchpad.net
    method = ftp
    incoming = ~your-launchpad-id/ubuntu/
    login = anonymous
    allow_unsigned_uploads = 0

Step 2: To upload to a team PPA, such as ~phototeam, use something similar to ~/.dput.cf:

  • [phototeam-ppa]
    fqdn = ppa.launchpad.net
    method = ftp
    incoming = ~phototeam/ubuntu/
    login = anonymous
    allow_unsigned_uploads = 0

Now you can upload to your PPA or to the phototeam's PPA (only if you are member of it).

Step 3: Upload signed sources only (no binaries), using

  • dput my-ppa P_V_source.changes

or alternatively for the team PPA

  • dput phototeam-ppa P_V_source.changes

replacing P with the name of the package, and V with the version number.

If you get a message that there is no signature on your changes file, either run debuild -S -sa -k<yourkeyid> or debsign P_V_source.changes.

  • {i} Note: If you're building an alternative version of a package already in the primary Ubuntu archive, build your source package using debuild -S -sd. If you're building an entirely new package whose orig.tar.gz is not yet in the Ubuntu primary archive, build the source package with debuild -S -sa.

    {i} Note: If you get error when signing the changes file (clearsign failed: secret key not available), pass an additional option -k[key_id] to debuild. You can use gpg --list-keys to get the key ID. Look for line like "pub 12345/12ABCDEF", the part after "/" is the key ID.

    {i} Note: If your upload appears to succeed but you receive a confusing email response containing the message:

    • Rejected:
      Signer has no upload rights at all to this distribution.
      Not permitted to upload to the RELEASE pocket in a series in the 'CURRENT' state.

      this means that you forgot to specify your PPA's name on the command-line (that is, the "my-ppa" part). Therefore, your upload was trying to go into the Ubuntu distribution, rather than into a PPA, and you're not authorized to put it there. This is the default behaviour if you omit the PPA name! However, there is a pretty easy (if crude) way to disable this behaviour, by adding these lines to your ~/.dput.cf:

      [DEFAULT]
      default_host_main = notspecified
      
      [notspecified]
      fqdn = SPECIFY.A.PPA.NAME
      incoming = .

      Now if you omit the PPA name you'll immediately get an error including the text "SPECIFY.A.PPA.NAME", which should jog your memory.

Step 4: Launchpad will give you an accepted or rejected upload notification.

Step 5: If the build fails, you will receive a failure notification. If you don't receive a build failure notification, you can check the status of your build by visiting:

https://launchpad.net/people/+me/+archive/+builds?build_state=all&build_text=

Using sources from other distributions

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

Upload to ~<lp_name>/ubuntu/<suite> and the suite you specify will override the suite named in the upload changelog. You can upload a source from any Debian-compatible distribution straight to your PPA with no changes required.

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

Accessing your archive

You can search and browse all PPAs at:

https://launchpad.net/ubuntu/+ppas

Your archive is located at:

http://ppa.launchpad.net/your-launchpad-id

To install packages from your archive add the following lines to your /etc/apt/sources.list:

  • deb     http://ppa.launchpad.net/your-launchpad-id/ubuntu <ubuntu release> main
    deb-src http://ppa.launchpad.net/your-launchpad-id/ubuntu <ubuntu release> main

Anchor(copy)

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: the [https://launchpad.net/~ubuntu-mobile/+archive/+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
  • specifiy 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.

Anchor(delete)

Removing packages from your PPA

To remove packages from your PPA, click Delete packages in the Actions menu and then select the packages you want to remove.

Frequently asked questions

Can anybody have a PPA?BR Yes, this service is available to any developer who wants to publish packages of their free software code. You need a Launchpad account, you will also need a GPG key to sign your source code uploads and you will need to accept the Terms of Service which include the Ubuntu Code of Conduct.

Can I publish any software in a PPA?BR This is a free service for free software developers and licensing is limited to those which are specified in the [wiki:PPATermsofUse PPA Terms of Use]. We may make this service available to commercial software developers too, and would be happy to hear from you if you think that would be useful for you.

What other limitations 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 [wiki:PPATermsofUse PPA Terms of Use] for more information.

How long are packages published?BR Packages will remain published until either you remove them yourself, or you supersede them with newer versions, or the underlying release of Ubuntu against which they were built becomes obsolete and unmaintained.

What formats of packages are supported?BR At this stage only .deb packages are supported. If you are interested in building RPM or other package formats, please contact us on the [https://lists.canonical.com/mailman/listinfo/launchpad-users Launchpad users mailing list] to discuss that in more detail!

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 Each user and team in Launchpad can have a single public PPA. If you want to have different versions of the same package, testing different features or focused on different use cases, then we would encourage you to create a new team and use the PPA for that team. That way, for example, you can have a team of people interested in "server" issues that has one version of the Apache package, and another interested in "workstation" issues that has a different version of the same package, each in a different PPA. Please don't abuse this capability!

Why are only x86 and amd64 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 on x86 and amd64.

Why do I get a warning about unauthenticated packages?BR At present the PPA system does not sign the archive, and Ubuntu's apt will issue a warning when fetching from such archives. This is [https://bugs.edge.launchpad.net/soyuz/+bug/125103 bug 125103].

PPAQuickStart (last edited 2008-09-10 18:52:53 by 82-37-240-159)