Différences entre versions de « Backports »
imported>SylvainBeucler m |
imported>SylvainBeucler m (→Tools) |
||
Ligne 260 : | Ligne 260 : | ||
=== Tools === | === Tools === | ||
* [http://lists.backports.org/lurker-bpo/message/20090708.194846.0cc45f10.en.html Helper script for backport?]: various scripts that may help (TODO) | * [http://lists.backports.org/lurker-bpo/message/20090708.194846.0cc45f10.en.html Helper script for backport?]: various scripts that may help (TODO) | ||
+ | * [https://wiki.ubuntu.com/PbuilderHowto PbuilderHowto]: check in particular the section about running a shell when the build fails | ||
* [http://julien.danjou.info/article-apt-build.html apt-build]: this tool might ease backports. To dig out. Beware that it tries to install the package by default (unlike <code>apt-src install</code>). | * [http://julien.danjou.info/article-apt-build.html apt-build]: this tool might ease backports. To dig out. Beware that it tries to install the package by default (unlike <code>apt-src install</code>). | ||
* [http://familiasanchez.net/~roberto/howtos/debcustomize Debian Package Customization HOWTO]: a backports is a form of customization | * [http://familiasanchez.net/~roberto/howtos/debcustomize Debian Package Customization HOWTO]: a backports is a form of customization |
Version du 21 septembre 2009 à 18:58
A backport is a Debian package that is recompiled for an earlier version of the distribution. For example, there is a backport of the latest version of Postfix [1] that was compiled for Etch, based on packages originally meant for Lenny. Here's a HOWTO / tutorial to get started.
Français/French: Un backport, c'est un paquet Debian recompilé pour une version précédente de la distribution. Par exemple, il y a un backport de la dernière version de Postfix [2] compilé pour Etch, à partir des paquets initialement prévue pour Lenny. Voici un HOWTO / didacticiel pour mettre le pied à l'étrier. Le reste de la page sera en anglais.
Motives
You cannot just download the newer .deb
from Debian 'testing' and install it :/
- The system changes, and so do the dependencies (package versions, package names...)
- Binary compatibility issues (see Autopackage Packagers Guide and (FR)Compatibilité binaire)
Where to find backports
There are several repositories for different audiences.
- backports for Debian Stable
- Components not included in Debian for various reasons (patent threats, DMCA, etc.)
Check the licenses, you might install non-free components.
Here's a few repositories:
- backports.org: semi-official backports from Debian 'testing' to Debian 'stable' only
- Debian Unofficial: has a few backports for components not admitted in Debian
- apt-get.org: search engine, some of the repositories there are backports
- [3]: Java OpenJDK+IcedTea 6 backport, with backported dependencies
This documentation covers backports.org in particular.
There are detailed official instructions.
Note: it is not recommended to install all backports at once. Instead you should select only the packages that you need. Unlike in full Debian releases, each backport is tested individually, so they might conflict with each others - but they still use the same backported dependencies.
HOWTO backport?
Manual configuration
If you want to backport for your own use, or if you're new to backports, this is for you: your packages may not work on other systems, but you have more flexibility to debug and fix errors.
You need:
- debootstrap
- basic compilation tools:
aptitude install build-essential
- sources.list:
## # Stable and backports repositories ## deb http://ftp.fr.debian.org/debian etch main deb http://security.debian.org/debian-security etch/updates main deb http://www.backports.org/debian/ etch-backports main deb-src http://ftp.fr.debian.org/debian etch main deb-src http://security.debian.org/debian-security etch/updates main deb-src http://backports.org/debian etch-backports main ## # Testing and unstable repositories ## # Binaries - uncomment if you need to test 'aptitude install' #deb http://ftp.fr.debian.org/debian testing main #deb http://ftp.fr.debian.org/debian unstable main # Sources - uncomment the one you're backporting from #deb-src http://ftp.fr.debian.org/debian testing main deb-src http://ftp.fr.debian.org/debian unstable main ## # backports in progress ## deb file:///usr/src/repo ./
- /etc/apt/preferences:
Package: * Pin: release a=testing Pin-Priority: -1 Package: * Pin: release a=unstable Pin-Priority: -1
- Vital packages (apt-src, apt-ftparchive, dch):
aptitude install apt-src apt-utils devscripts fakeroot interdiff
- Environment variables for Debian tools, in my
~/.bash_profile
:
export DEBEMAIL="beuc@beuc.net" export DEBFULLNAME="Sylvain Beucler" export EDITOR="emacs"
debsign
GPG configuration, if signing packages is needed, in my~/.devscripts
:
DEBSIGN_KEYID="81704B93" DEBSIGN_PROGRAM="gpg --use-agent" DEBSIGN_SIGNLIKE="gpg"
To search for a missing dependency
In a vanilla install, sarge and backports in sources.list:
aptitude search keyword # search package whose name contain 'keyword' apt-cache policy packagename # check what versions are available
Testing the build-deps
apt-get build-dep packagename
will download the missing dependencies, if available, and report the first missing one otherwise.
You can alter the build-dep during the creation of the backport, to test whether a modified dependencies list does the trick. apt-get build-dep
uses the plain-text /var/lib/apt/lists/ftp.[mirror].debian.org_debian_dists_[distro]_[component]_source_Sources
file. You can go quick&dirty and alter that file :) I do not know about a "clean" solution (like feeding apt-get build-dep
directly with a debian/control
file). You then can test your backported dependencies with:
apt-get -t sarge-backports build-dep packagename
You may also be interested in dpkg-checkbuilddeps
: it reports packages that are not installed,
though it doesn't tell you whether the build _could_ be installed or not, nor which packages exactly are missing.
Making the newly built dependencies available to apt
cd /usr/src mkdir repo \mv *-*~bpo*+*.deb *-*~bpo*+*.udeb *-*~bpo*+*.changes *-*~bpo*+*.diff.gz *-*~bpo*+*.dsc repo/ ln -f *.orig.tar.gz repo/ cd repo apt-ftparchive packages . | gzip -c > Packages.gz apt-ftparchive sources . | gzip -c > Sources.gz cd .. #echo "deb file:///usr/src/repo ./" >> /etc/apt/sources.list
There's probably a cleaner way to do this using more comprehensive tools but that does the trick for now.
TODO: this doesn't support native packages (w/o .orig.tar.gz)
Don't's
Don't aptitude -t sarge-backports install debhelper
blindly.
This will include new helper scripts that may be copied into your packages' postinst/prerm/etc.
This is being discussed.
I had to stick to v4 when backporting evince.
Don't use apt-src build
, since it doesn't care about sources packages, unless you configure APT::Src::BuildCommand
accordingly (without the -b
option for dpkg-buildpackage). Using debuild -us -uc
directly worked well for me.
Upload
http://backports.org/dokuwiki/doku.php?id=contribute
Most commonly, upload your files (the contents of repo/
) somewhere and post about it on backports-users@lists.backports.org. Make sure you included a description of what you did in the debian/changelog
.
The page says: Our requirements aren't that high. You need to have a gpg key in the official Debian keyring. Don't get mistaken: only "Debian developpers" get their gpg keys in the keyring, and becoming one is a months-long process. However it is very easy to find somebody on the list willing to upload your package.
Workflow:
- Your package hits testing. backports.org aims at providing a smooth transition between the current Debian stable release and the next one; they don't consider safe to use an unstable package because if may not enter the next stable (while a testing package should) [4]. Fortunately there has been some exceptions.
- You backport the package.
- You test the package. It takes time to upload a package to backports.org, so you'd better send a perfect package from the start.
- You send the package to an authorized member (who will sponsor it), or you upload directly at ftp://backports.org if you have the privileges (requires being part of the Debian GPG keyring i.e. having the "Debian Developer" status)
- If this is the first time your package is backported (or if your source package introduces new binary packages), it will appear at http://www.backports.org/debian/new.html , and wait for a manual review. Norbert Tretkowski (nobse) or Alexander Wirt (formorer) will do so in a matter of days/weeks. eg: evince was accepted after 1 week, ettercap after 1 day - but I don't know the details.
- Your package is send to an autobuilder. Your package will be rebuilt no matter what [5].
- Once the binary package is built, the build logs need to be checked by each buildd admin.
- Then the binary package is published. There might be a delay between the availability of an architecture-independent .deb and an architecture-dependent .deb that is part of the same source package.
What kinds of packages are accepted at backports.org?
The "contribute" page [6] says:
- Don’t backport minor version changes without any user visible changes or bugfixes
- Please only upload package with a noteable userbase. User request for the package maybe an indicator.
- Reconsider if the package can be installed directly from testing without any recompilation and handled via pinning
I would summarize it by:
- Packages need zero review/maintenance time from backports maintainers.
I believe there's only 2 backports.org admin, and I let you image what it's like to get several backports to review each day - after a couple years.
So make yourself trusworthy (become a Debian developper), prove that you won't let packages become outdated, work with the package maintainers and have them sponsor your backport, upload your backports to other places first so they can be tested (reference them to apt-get.org), etc.
Test your backport
First, install and run your backport on a Stable system.
You can also check what changes you introduced using interdiff
(from package patchutils
):
gunzip par2cmdline_0.4-8.diff.gz gunzip par2cmdline_0.4-8~bpo.1.diff.gz interdiff par2cmdline_0.4-8.diff par2cmdline_0.4-8~bpo.1.diff | less
debdiff
will also show you if you mistakenly introduced new files, and will wdiff
debian/control
(you need to install the wdiff
package for that):
aptitude download par2/testing debdiff par2_0.4-8_i386.deb par2_0.4-8~bpo.1_i386.deb
Run lintian
and linda
, two packages test-suites, on your package. If you get errors, check whether they already existed in the original package, or if you introduced them yourself:
linda par2_0.4-8~bpo.1_i386.deb linda par2_0.4-8_i386.deb lintian par2_0.4-8~bpo.1_i386.deb lintian par2_0.4-8_i386.deb
(if your source packages produces several binary packages, specify the .changes instead)
piuparts
is another test suite that actually installs your packages in various ways (instead of inspecting its content), but I have to figure out how to use it accurately for backports.
Track your backported packages
After a while, there will be new versions of your backported package in Debian testing. In this case, either:
- update your backport
- tell backports-users@list.backports.org that you do not intend to do it (lack of time, not using the package anymore, etc.), but that it would be good if someone did
To be notified of new versions of the package automatically, the simplest way is to subscribe to the PTS (package tracking system). You can do so from the package developer package (eg. [7]).
Alternatively, you can send an e-mail to pts@qa.debian.org telling:
Subject: subscribe your_package your@mail.tld keyword your_package your@mail.tld = upload-source quit
The keyword
line tells the BTS to only notify you about new releases. You can check the documentation to see what other kinds of notification you can receive (bug reports, etc.).
This script was recently advertised as a way to track the differences between Ubuntu and Debian packages.
MultiDistroTools also contains informations in this regard, generating reports like:
Such tools should be adaptable for use with backports<->testing.
Examples
Here are a few sample backports made by Cliss XXI.
Lenny backports:
- Backport Git: pbuilder-based, from start to finish
- Backport OpenJDK: idem., a bit more difficult with a backported build-dependency as well as a runtime dependency
Etch backports:
- Backport FreeType: simple - the basics
- Backport SDL_ttf: beware of compilation environment
- Backport Gnash: pbuilder and satisfydepends-experimental
Sarge backports:
- Backport dar: simple
- Backport ettercap: more on decrypting version numbers
- Backport wireless-tools: debhelper and some tricks
- Backport Evince: more complicated
- Backport hplip: dependencies and python policy
- Backport GCJ: in progress, would be useful for OOo2 Base
- Backport PHP5 DSA: just a security update
Troubleshootings
After apt-get update
, you get:
W: GPG error: http://www.backports.org etch-backports Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EA8E8B2116BA136C
This means you didn't include the backports key, see instructions above.
Links
Documentation
- Using pbuilder to backport Debian packages: interesting and detailed document, abeilt a bit old (2006)
- A Heuristic-based Process for Backporting Debs: a high-level HOWTO (with little technical details)
- Re: gnuplot 4.2 backport: instructions to rebuild backports that do not need adaptation, only recompilation
- Slides (in German :/) from backports.org founder. Even if you don't grasp German, have a look at the mentioned commands.
- Backports - Debian Wiki: some procedures to follow when uploading at backports.org. Policies are not explained, though.
- Backport HOWTO (2004)
Tools
- Helper script for backport?: various scripts that may help (TODO)
- PbuilderHowto: check in particular the section about running a shell when the build fails
- apt-build: this tool might ease backports. To dig out. Beware that it tries to install the package by default (unlike
apt-src install
). - Debian Package Customization HOWTO: a backports is a form of customization
Packages information
- Package uploads: who uploaded what at bpo
- http://backports.buildd.net/: Backport's autobuilder homepage (if I got it right, it's the same computer than Debian experimental).
- build logs: (here for OOo) to check if your package was compiled for your architecture
Other pages at doc.cliss21.org
(French):
- Compatibilité binaire: pourquoi les exécutables d'une distribution ne fonctionnent pas sur une autre?
History
- Before 2006, extra pinning (packages priorities) configuration was needed, but this is
Note
As the only copyright holder of this documentation, and to avoid any troll, this documentation is dual-licensed GFDL and GNU GPL, current versions or later.
TODO
There are new "rules" to take into accounts:
Links
- buildd.net: the computer that builds backports packages
- [8]: sample URL to check the build status of a package (here the Mercurial package recompiled for Etch)