1 deb2zero - publish Debian packages using Zero Install
3 Copyright Thomas Leonard, 2008
8 Zero Install is a decentralised installation system. Meta-data about each
9 package is published in a "feed" file. The Zero Install client reads these
10 feeds files and downloads and runs the programs. For details, see:
12 http://0install.net for details.
14 The feed files can be created manually (e.g. using 0publish or 0publish-gui):
16 http://0install.net/0publish.html
17 http://0install.net/injector-packagers.html
19 However, Debian packages already contain much of the required information. This
20 program extracts the information in an existing Debian package and uses it to
26 To download and create a short-cut to deb2zero:
28 $ 0alias deb2zero http://0install.net/2008/interfaces/deb2zero.xml
30 To create a feed for the GQView image viewer:
32 $ deb2zero http://ftp.uk.debian.org/debian/pool/main/g/gqview/gqview_2.0.1-1_i386.deb GQView.xml
34 Note: deb2zero guesses some things (such as which binary to run by default if
35 the package contains several) so you should check the feed file manually and
40 $ 0launch ./GQView.xml
42 If you want to publish the feed so that others can use it, you'll also need to
43 change the feed's URL to wherever you're planning to upload it, and sign it.
44 This is very easy: load it into 0publish-gui and select or create a key using
45 the "Publishing" tab. See the packaging tutorial for details:
47 http://0install.net/injector-packagers.html
49 To add a new version to your feed later:
51 $ deb2zero http://.../new-version.deb GQView.xml
56 As an alternative to specifying the URL of the Debian package directly, you can
57 download the index file to the current directory and then just give the package
60 $ wget ftp://ftp.debian.org/debian/dists/stable/main/binary-amd64/Packages.bz2
61 $ bunzip2 Packages.bz2
62 $ deb2zero gqview GQView.xml
67 deb2zero can process the 'Depends' field in a Debian package and generate a
68 corresponding <requires> element in the feed. For this to work, you need to
69 create a file called 'deb-mappings' mapping from Debian package names to
70 Zero Install feed URIs, one per line. For example:
72 libfoo: http://0install.net/2008/3rd-party/libfoo.xml
74 deb2zero will then turn
80 <requires interface="http://0install.net/2008/3rd-party/libfoo.xml">
81 <environment insert="usr/lib" name="LD_LIBRARY_PATH"/>
84 Note that setting LD_LIBRARY_PATH is just a guess. It may be that the package
85 depends on libfoo in some other way (e.g. it needs a binary in $PATH). In that
86 case, you'll need to edit the feed to correct it.
91 Version restrictions in dependencies are not currently handled.
93 Source packages are not handled; you have to add the 0compile directives
99 This library is free software; you can redistribute it and/or
100 modify it under the terms of the GNU Lesser General Public
101 License as published by the Free Software Foundation; either
102 version 3 of the License, or (at your option) any later version.
104 This library is distributed in the hope that it will be useful,
105 but WITHOUT ANY WARRANTY; without even the implied warranty of
106 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
107 Lesser General Public License for more details.
109 You should have received a copy of the GNU Lesser General Public
110 License along with this library; if not, write to the Free Software
111 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
116 Please report any bugs to the mailing list:
118 http://0install.net/support.html