Uploading to Extras-devel

(Add dput line)
(Tidy-up page: remove signing steps since these are now unnecessary)
Line 1: Line 1:
 +
== Introduction ==
 +
{{main|Extras}}
 +
[[Extras]] is the recommended home for all Maemo software. It provides an easy mechanism for users to discover new applications, and can help ensure quality and continued support for applications and their authors.
 +
== Pre-requisites ==
== Pre-requisites ==
 +
Three things are necessary to upload to maemo.org Extras:
* A [http://garage.maemo.org/ Garage] account: [[https://garage.maemo.org/account/register.php signup]]
* A [http://garage.maemo.org/ Garage] account: [[https://garage.maemo.org/account/register.php signup]]
-
* An "invitation" to upload: [[https://garage.maemo.org/extras-assistant/index.php?target=invitation_request request]] (nb without this you can't do anything - even upload an ssh key)
+
* An "invitation" to upload: [[https://garage.maemo.org/extras-assistant/index.php?target=invitation_request request]]
-
* <code>ssh-keygen</code>
+
* <code>ssh-keygen</code> ('''optional:''' not needed if only going to use the web-based upload)
-
* <code>debsign</code>
+
== Setup ==
== Setup ==
-
=== Setting up SSH and PGP to upload to extras ===
+
=== Setting up SSH to upload to extras ===
-
Put your SSH key[http://kimmo.suominen.com/docs/ssh/#ssh-keygen] and PGP key[http://fedoraproject.org/wiki/DocsProject/UsingGpg/CreatingKeys] into Garage.
+
<small>''This step is unnecessary if you are only going to use the web-based [https://garage.maemo.org/extras-assistant/index.php Extras Assistant] wizard to upload.''</small>
-
* If you need to create an RSA SSH key (Make sure it is an RSA key):
+
Put your SSH key<ref>[http://kimmo.suominen.com/docs/ssh/#ssh-keygen Generating SSH keys with ssh-keygen]</ref> online:
-
# <code>ssh-keygen -t rsa</code> (enter enter, passphraseIfDesired, enter).
+
-
# Copy the contents of <code>~/.ssh/id_rsa.pub</code> in the "Public SSH keys" section of your [https://garage.maemo.org/account/index2.php garage account maintenance] page.
+
-
* If you need to create a PGP key:
+
* If you need to create an RSA SSH key (make sure it is an RSA key):
-
# Create the key using: <code>gpg --gen-key</code>:
+
*# <code>ssh-keygen -t rsa</code> (enter, enter, passphrase (if desired), enter).
-
## Select default key ("DSA and Elgamal")
+
* Copy the contents of <code>~/.ssh/id_rsa.pub</code> in the "Public SSH keys" section of your [https://garage.maemo.org/account/index2.php garage account maintenance] page.
-
## Minimum keysize of 1024
+
-
## Key does not expire
+
-
## Enter your name, email, (comment)
+
-
## Select a passphrase (that you will never forget...)
+
-
## While key generation is running, surf the web / draw onscreen / watch video on your machine to generate enough entropy input - this can take a few minutes
+
-
# Export the key using: <tt>gpg --export --armor jqdoe@example.com >mypubkey.asc</tt>
+
-
# Copy the contents of <code>mypubkey.asc</code> file to the [https://garage.maemo.org/my/contrib.php extras sign-up page].
+
-
=== Setting up Scratchbox to use the extras repository ===
+
=== Setting up Scratchbox to use the Extras repository ===
Add the extras repository to your Scratchbox install:
Add the extras repository to your Scratchbox install:
# Login to Scratchbox
# Login to Scratchbox
Line 41: Line 36:
== Preparing a source package ==
== Preparing a source package ==
-
Upstream sources can be easily repacked using [[User:Jaffa/mud design|mud-builder]] which automates the steps below. Alternatively, you can do it directly using Debian tooling:
+
There are three main routes to creating source packages:
 +
# Using Debian tooling directly.
 +
# Using [[User:Jaffa/mud design|mud-builder]] to help repackage existing upstream sources.
 +
# Using [[Py2deb|py2deb]] for Python applications.
-
Create your package with dpkg-buildpackage in the project source directory:
+
=== Debian tooling ===
 +
Once your source tree contains a <code>debian</code> directory, create your package with dpkg-buildpackage in the project source directory:
  dpkg-buildpackage -rfakeroot -sa -S -i
  dpkg-buildpackage -rfakeroot -sa -S -i
-
You may verify that your Build-Depends field in debian/control is complete by running
+
You may verify that your <code>Build-Depends</code> field in debian/control is complete by running
  dpkg-depcheck -m dpkg-buildpackage -rfakeroot -b
  dpkg-depcheck -m dpkg-buildpackage -rfakeroot -b
Line 53: Line 52:
in the source tree.  (You'll need to <code>fakeroot apt-get install devscripts</code> for this to work).
in the source tree.  (You'll need to <code>fakeroot apt-get install devscripts</code> for this to work).
-
Note that the Extras Assistant https://garage.maemo.org/extras-assistant/index.php can be used to upload (without signing or keys).  It asks for the required files using a straightforward web interface.
+
=== mud-builder ===
 +
[http://mud-builder.garage.maemo.org/ mud-builder] uses a simple XML file to define an upstream source location (such as an svn location, web-based tarball or existing Debian package), it then handles the Maemo packaging specifics, builds a source package ready to upload and can even upload directly to Extras using a few simple commands:
-
== Autobuilder special considerations ==
+
mud build vim
-
If it builds under your local scratchbox but doesn't on the autobuilder, you need to do the above dep-check and/or otherwise correct the Build-Depends field as the builder uses the minimal rootstrap and only adds extra packages if they are mentioned in this field (This includes most -dev versions which include the special libraries and includes, and the pkg-config stuff and applies to almost everything)
+
mud upload vim
-
Also make sure the Section: in the control file is *all lowercase*, e.g. user/navigation not user/Navigation, otherwise after building it will silently NOT be moved to extras-devel
+
=== py2deb ===
 +
Python applications can be developed outside of Scratchbox. [http://www.manatlan.com/page/py2deb py2deb] makes it easy to build packages ready for upload from a Python script.
== Upload ==
== Upload ==
-
=== Sign the package ===
+
=== "free" packages ===
-
Sign the .changes file (you'll need to do it outside scratchbox) with
+
There are three mechanisms to upload files:
-
 
+
# The [https://garage.maemo.org/extras-assistant/index.php Extras Assistant] is a web-based wizard, which guides you through the process.
-
debsign -k<key-id> <package>.changes
+
# Debian's <code>dput</code> tool<ref>[http://extras-cauldron.garage.maemo.org/HOWTO.html#how-to-prepare-and-upload-source-packages-for-build Upload to autobuilder with dput]</ref> which, under the covers, uses SSH.
-
 
+
# SSH directly (using <code>scp</code><ref>[http://lists.maemo.org/pipermail/maemo-users/2006-September/002080.html Use scp to upload a package]</ref>).
-
If you have multiple keys or don't know your key-id, you can find it with
+
-
 
+
-
gpg --list-keys
+
-
 
+
-
Example output:
+
-
 
+
-
pub  1024D/FEA210ED 2007-06-14 [expired: 2008-06-13]
+
-
uid                  Niels Breet (Maemo) <maemo@xxx>
+
-
pub  4096R/80C3F817 2008-06-30 [expires: 2009-06-30]
+
-
uid                  Niels Breet (Maemo) <niels@xxx>
+
-
 
+
-
The key-id is found in the second column, in this case ''FEA210ED'' or ''80C3F817''.
+
-
 
+
-
=== Upload the package ===
+
-
 
+
-
==== free packages ====
+
-
 
+
-
Describe: upload source package to diablo-extras-builder via <code>dput</code><ref>[http://extras-cauldron.garage.maemo.org/HOWTO.html#how-to-prepare-and-upload-source-packages-for-build upload to autobuilder with dput]</ref>, <code>scp</code><ref>[http://lists.maemo.org/pipermail/maemo-users/2006-September/002080.html Use scp to upload a package]</ref> or through the web interface<ref>[https://garage.maemo.org/extras-assistant/index.php Extras assistant]</ref>.
+
-
The <code>/etc/dput.cf</code> sections for free packages are:
+
==== dput ====
 +
The <code>/etc/dput.cf</code> (or <code>~/.dput.cf</code> sections for free packages are:
  [chinook-extras-builder]
  [chinook-extras-builder]
Line 94: Line 78:
  allow_unsigned_uploads = 0
  allow_unsigned_uploads = 0
  incoming = /var/www/extras-devel/incoming-builder/chinook
  incoming = /var/www/extras-devel/incoming-builder/chinook
-
 
+
  [diablo-extras-builder]
  [diablo-extras-builder]
  login = <your_garage_login_name>
  login = <your_garage_login_name>
Line 104: Line 88:
Then run:
Then run:
-
  dput -f diablo-extras-builder PACKAGE_VERSION_*.changes
+
  dput -uf diablo-extras-builder PACKAGE_VERSION_*.changes
-
  dput -f chinook-extras-builder PACKAGE_VERSION_*.changes
+
  dput -uf chinook-extras-builder PACKAGE_VERSION_*.changes
-
==== non-free packages ====
+
==== scp ====
 +
Using scp directly is trivial:
 +
 
 +
scp *.tar.gz *.diff.gz *.dsc *.changes <your_garage_login_name>@garage.maemo.org:/var/www/extras-devel/incoming-builder/chinook/
 +
scp *.tar.gz *.diff.gz *.dsc *.changes <your_garage_login_name>@garage.maemo.org:/var/www/extras-devel/incoming-builder/diablo/
 +
 
 +
=== "non-free" packages ===
Publishing non-free packages in the Maemo Extras repository for Diablo is done via dput. Direct upload of binary packages is allowed for non-free packages only.
Publishing non-free packages in the Maemo Extras repository for Diablo is done via dput. Direct upload of binary packages is allowed for non-free packages only.
-
Settings for /etc/dput.cf for Diablo Extras-Devel non-free:
+
Settings for <code>dput.cf</code> for Diablo Extras-Devel non-free:
  [diablo-extras-devel-non-free]
  [diablo-extras-devel-non-free]
Line 120: Line 110:
  allow_unsigned_uploads = 0
  allow_unsigned_uploads = 0
  incoming = /var/www/extras-devel/incoming-nonfree/diablo
  incoming = /var/www/extras-devel/incoming-nonfree/diablo
-
 
+
-
Settings for /etc/dput.cf for Diablo Extras non-free:
+
-
 
+
  [diablo-extras-non-free]
  [diablo-extras-non-free]
  login = <your_garage_login_name>
  login = <your_garage_login_name>
Line 131: Line 119:
  incoming = /var/www/extras/incoming-nonfree/diablo
  incoming = /var/www/extras/incoming-nonfree/diablo
-
Upload with dput:
+
Upload with <code>dput</code>:
-
 
+
-
dput -f diablo-extras-devel-non-free PACKAGE_VERSION_*.changes
+
 +
dput -uf diablo-extras-devel-non-free PACKAGE_VERSION_*.changes
The packages are imported into the repository once per hour.  
The packages are imported into the repository once per hour.  
Line 141: Line 128:
There is no promotion available for non-free. You need to upload your package to the right repository yourself.
There is no promotion available for non-free. You need to upload your package to the right repository yourself.
 +
 +
== Autobuilder special considerations ==
 +
If it builds under your local Scratchbox but doesn't on the autobuilder, you need to do the above dependecy check (<code>dpkg-depcheck</code>) and/or otherwise correct the <code>Build-Depends</code> field: the builder uses the minimal rootstrap and only adds extra packages if they are mentioned in this field. This includes most <code>-dev</code> versions which include the special libraries and includes, and the <code>pkg-config</code> metadata; so applies to almost everything.
 +
 +
Also make sure the <code>Section:</code> in the control file is '''all lowercase''', e.g. "user/navigation" not "user/Navigation", otherwise after building it will silently NOT be moved to extras-devel
== Promotion ==
== Promotion ==

Revision as of 08:14, 25 January 2009

Contents

Introduction

Main article: Extras

Extras is the recommended home for all Maemo software. It provides an easy mechanism for users to discover new applications, and can help ensure quality and continued support for applications and their authors.

Pre-requisites

Three things are necessary to upload to maemo.org Extras:

  • A Garage account: [signup]
  • An "invitation" to upload: [request]
  • ssh-keygen (optional: not needed if only going to use the web-based upload)

Setup

Setting up SSH to upload to extras

This step is unnecessary if you are only going to use the web-based Extras Assistant wizard to upload.

Put your SSH key[1] online:

  • If you need to create an RSA SSH key (make sure it is an RSA key):
    1. ssh-keygen -t rsa (enter, enter, passphrase (if desired), enter).
  • Copy the contents of ~/.ssh/id_rsa.pub in the "Public SSH keys" section of your garage account maintenance page.

Setting up Scratchbox to use the Extras repository

Add the extras repository to your Scratchbox install:

  1. Login to Scratchbox
  2. Create /etc/apt/sources.list.d/extras-repo.list
  3. Update apt's information.

Note: this should be done in both your ARMEL and x86 targets.

/scratchbox/login
cat >/etc/apt/sources.list.d/extras-repo.list <<EOT
#Maemo extras
deb http://repository.maemo.org/extras/ diablo free non-free
deb-src http://repository.maemo.org/extras/ diablo free
EOT
fakeroot apt-get update

Preparing a source package

There are three main routes to creating source packages:

  1. Using Debian tooling directly.
  2. Using mud-builder to help repackage existing upstream sources.
  3. Using py2deb for Python applications.

Debian tooling

Once your source tree contains a debian directory, create your package with dpkg-buildpackage in the project source directory:

dpkg-buildpackage -rfakeroot -sa -S -i

You may verify that your Build-Depends field in debian/control is complete by running

dpkg-depcheck -m dpkg-buildpackage -rfakeroot -b

in the source tree. (You'll need to fakeroot apt-get install devscripts for this to work).

mud-builder

mud-builder uses a simple XML file to define an upstream source location (such as an svn location, web-based tarball or existing Debian package), it then handles the Maemo packaging specifics, builds a source package ready to upload and can even upload directly to Extras using a few simple commands:

mud build vim
mud upload vim

py2deb

Python applications can be developed outside of Scratchbox. py2deb makes it easy to build packages ready for upload from a Python script.

Upload

"free" packages

There are three mechanisms to upload files:

  1. The Extras Assistant is a web-based wizard, which guides you through the process.
  2. Debian's dput tool[2] which, under the covers, uses SSH.
  3. SSH directly (using scp[3]).

dput

The /etc/dput.cf (or ~/.dput.cf sections for free packages are:

[chinook-extras-builder]
login = <your_garage_login_name>
fqdn = garage.maemo.org
method = scp
hash = md5
allow_unsigned_uploads = 0
incoming = /var/www/extras-devel/incoming-builder/chinook

[diablo-extras-builder]
login = <your_garage_login_name>
fqdn = garage.maemo.org
method = scp
hash = md5
allow_unsigned_uploads = 0
incoming = /var/www/extras-devel/incoming-builder/diablo

Then run:

dput -uf diablo-extras-builder PACKAGE_VERSION_*.changes
dput -uf chinook-extras-builder PACKAGE_VERSION_*.changes

scp

Using scp directly is trivial:

scp *.tar.gz *.diff.gz *.dsc *.changes <your_garage_login_name>@garage.maemo.org:/var/www/extras-devel/incoming-builder/chinook/
scp *.tar.gz *.diff.gz *.dsc *.changes <your_garage_login_name>@garage.maemo.org:/var/www/extras-devel/incoming-builder/diablo/

"non-free" packages

Publishing non-free packages in the Maemo Extras repository for Diablo is done via dput. Direct upload of binary packages is allowed for non-free packages only.

Settings for dput.cf for Diablo Extras-Devel non-free:

[diablo-extras-devel-non-free]
login = <your_garage_login_name>
fqdn = garage.maemo.org
method = scp
hash = md5
allow_unsigned_uploads = 0
incoming = /var/www/extras-devel/incoming-nonfree/diablo

[diablo-extras-non-free]
login = <your_garage_login_name>
fqdn = garage.maemo.org
method = scp
hash = md5
allow_unsigned_uploads = 0
incoming = /var/www/extras/incoming-nonfree/diablo

Upload with dput:

dput -uf diablo-extras-devel-non-free PACKAGE_VERSION_*.changes

The packages are imported into the repository once per hour.

Please make sure your dependencies are correct. If there is a dependency problem between a free and a non-free package, the non-free package will most likely be removed first. (As we can recompile free packages, but can't do that for non-free ones)

There is no promotion available for non-free. You need to upload your package to the right repository yourself.

Autobuilder special considerations

If it builds under your local Scratchbox but doesn't on the autobuilder, you need to do the above dependecy check (dpkg-depcheck) and/or otherwise correct the Build-Depends field: the builder uses the minimal rootstrap and only adds extra packages if they are mentioned in this field. This includes most -dev versions which include the special libraries and includes, and the pkg-config metadata; so applies to almost everything.

Also make sure the Section: in the control file is all lowercase, e.g. "user/navigation" not "user/Navigation", otherwise after building it will silently NOT be moved to extras-devel

Promotion

After the autobuilder builds a package, it will be available in Extras-Devel. This is the experimental repository.

Please make sure your package is ready for the masses and at least test:

  • if it installs without problems
  • if it uninstalls without problems
  • if it doesn't introduce dependency problems for other packages.

You can promote your package to Extras with the promotion interface.

Resources

Reference

Template:Refs


Cite error: <ref> tags exist, but no <references/> tag was found