Menu

[2275f9]: / 0install-2.0.xml  Maximize  Restore  History

Download this file

368 lines (300 with data), 16.3 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
<?xml version='1.0' encoding='utf-8'?>
<html>
<div>
<h2>0install 2.0 release notes</h2>
<p>[ see the <a href='news.html'>main news page</a> for other news ]</p>
<p>2013-03-05</p>
<toc level='h3'/>
<h3>About 0install</h3>
<p>
Zero Install is a decentralised cross-platform software
installation system available under the LGPL. It allows software
developers to publish programs directly from their own web-sites,
while supporting features familiar from centralised distribution
repositories such as shared libraries, automatic updates and digital
signatures. It is intended to complement, rather than replace, the
operating system's package management. 0install packages never
interfere with those provided by the distribution.
</p>
<p style='float: right; padding-left: 1em;'>
<a href='injector-feeds.html'><img width="263" height="364" src="screens/manage-apps-narrow.png" alt='0desktop --manage'/></a>
</p>
<p>
0install does not define a new packaging format; unmodified tarballs
or zip archives can be used. Instead, it defines an XML metadata
format to describe these packages and the dependencies between them. A
single metadata file can be used on multiple platforms (e.g. Ubuntu,
Debian, Fedora, openSUSE, Mac OS X and Windows), assuming binary or
source archives are available that work on those systems.
</p><p>
0install also has some interesting features not often found in
traditional package managers. For example, while it will share
libraries whenever possible, it can always install multiple versions
of a package in parallel when there are conflicting requirements.
Installation is always side-effect-free (each package is unpacked to
its own directory and will not touch shared directories such as
/usr/bin), making it ideal for use with sandboxing technologies and
virtualisation.
</p><p>
The XML file describing the program's requirements can also be
included in a source-code repository, allowing full dependency
handling for unreleased developer versions. For example, a user can
clone a Git repository and build and test the program, automatically
downloading newer versions of libraries where necessary, without
interfering with the versions of those libraries installed by their
distribution, which continue to be used for other software.
</p><p>
Started in 2003, 0install is developed by volunteers from around the world;
contributors include Aleksey Lim, Anders F Björklund, Bastian Eicher, Chris
Leick, Daniel Tschan, Dave Abrahams, Frank Richter, Mark Seaborn, Michel
Alexandre Salim, Pino Toscano, Rene Lopez, Thomas Leonard, Tim Cuthbertson and
Tim Diels.
</p><p>
More than one thousand packages are currently available and you can easily
<a href='packagers.html'>publish your own programs</a>. Zero Install itself
is available from the official repositories of most Linux distributions
(including Debian, Fedora, Gentoo, Mint, openSUSE and Ubuntu) as well as
MacPorts.
See the <a href='injector.html'>Downloads page</a> for details.
</p>
<h3>Overview of changes in 2.0</h3>
<p>
0install 2.0 brings many enhancements to the XML metadata syntax used to describe packages and their
dependencies, allowing a more precise specification of their requirements. Support for using distribution-provided
packages as dependencies was extended and now covers Arch Linux, Cygwin, Darwin, Debian, Fink, FreeBSD Ports, Gentoo, MacPorts, Mint, openSUSE, Red Hat, Slackware and Windows. The 0install software now supports <i>apps</i>, an easier way to manage 0install applications, improved diagnostics when no compatible versions can be selected, improved usability, and better support for use on headless servers.
</p>
<p>
<a href='http://www.ryppl.org/'>The Ryppl project</a> is using 0install as the package manager for a modular C++ build system, starting with a modularised C++ Boost library. This has driven many of the enhancements in 2.0, such as support compiling 0install packages on Windows. We hope that 0install will one day replace many of the language-specific packaging systems currently in use.
</p>
<h3>Extensions to the XML feed format</h3>
<p>The 2.0 feed format is 100% backwards compatible with the 1.0 format (all software distributed for 1.0 will also work with 2.0). The new features are:</p>
<dl>
<dt>Optional dependencies</dt>
<dd>We try to select the best available version of the dependency, but it's OK if nothing can be selected (this is useful if a dependency isn't available on all platforms):
<pre>&lt;<a href='interface-spec.html#dependencies'>requires</a> ... importance='optional'>...&lt;/requires></pre>
</dd>
<dt>OS-specific dependencies</dt>
<dd>For dependencies that are only needed on Windows, etc:
<pre>&lt;requires ... os='Windows'>...&lt;/requires></pre>
</dd>
<dt>Restrict-only dependencies</dt>
<dd>
These let you specify constraints/conflicts on the acceptable versions of another interface without requiring that interface to be selected at all:
<pre>&lt;<a href='interface-spec.html#dependencies'>restricts</a> interface='...' version='...'></pre>
</dd>
<dt>Dependencies for native packages</dt>
<dd>These are useful when a distribution package is only for a particular major version of another interface:
<pre>
&lt;<a href='interface-spec.html#package-implementation'>package-implementation</a> distributions="Debian" package="python3-gi">
&lt;restricts interface="http://repo.roscidus.com/python/python">
&lt;version not-before="3" before="4"/>
&lt;/restricts>
&lt;/package-implementation>
</pre>
</dd>
<dt>Restrictions on distribution type</dt>
<dd>Some native packages only work with other packages from the same distribution. For example, MacPorts Python libraries only work with the MacPorts Python:
<pre>&lt;restricts interface='...' distribution='MacPorts'></pre>
The value can be any <a href='distribution-integration.html'>valid distribution name</a> (e.g. 'RPM'), or '0install' to force a
0install implementation, not a package implementation.
</dd>
<dt>More flexible version syntax</dt>
<dd>
The new 'version' attribute provides a shorter and more flexible way to specify the compatible versions:
<pre>&lt;requires interface='...' version='2.6..!3 | 3.2..'></pre>
This allows any version from 2.6 up to (but excluding) 3, or version 3.2 or later.
However, the previous syntax using &lt;version> should be used where possible, since it works with all versions of 0install.
</dd>
<dt>Executable bindings</dt>
<dd>Two new bindings make it easy to depend on executable commands (not just on libraries). This is necessary on Windows, since it doesn't support #! lines, but it is also useful on other platforms. For example, if a program requires the "make" command in $PATH:
<pre>
&lt;requires interface='http://repo.roscidus.com/devel/make'>
&lt;<a href='interface-spec.html#executable'>executable-in-path</a> name='make'/>
&lt;/requires>
</pre>
Or, if it requires the make command in $MAKE:
<pre>
&lt;requires interface='http://repo.roscidus.com/devel/make'>
&lt;<a href='interface-spec.html#executable'>executable-in-var</a> name='MAKE'/>
&lt;/requires>
</pre>
As always, these declarations only affect the program being run (they do not
put "make" into /usr/bin, ~/bin or similar).
</dd>
<dt>Custom path separators in environment bindings</dt>
<dd>The path separator can now be specified in environment bindings (previously, it was either ":" or ";", depending on the platform):
<pre>&lt;<a href='interface-spec.html#environment'>environment</a> name='OPTIONS' value='foo' separator=','></pre>
</dd>
<dt>Replaced interfaces</dt>
<dd>Obsolete interfaces can be flagged as such. Various tools will warn about the use of obsolete interfaces, and 0install knows that interfaces conflict with their replacements. For example, the "openjdk-6-jre" interface was replaced by the more general "openjdk-jre" (which covers versions 6 and 7):
<pre>&lt;<a href='interface-spec.html#replaced-by'>replaced-by</a> interface="http://repo.roscidus.com/java/openjdk-jre"/></pre>
</dd>
<dt>Bindings inside &lt;command></dt>
<dd>This allows for bindings which are only needed when testing, etc.</dd>
<dt>New "POSIX" architecture</dt>
<dd>This matches everything except Windows.</dd>
<dt>New digest algorithm to avoid the "=" character</dt>
<dd>The new sha256new algorithm is the same as sha256, except that the digest is encoded with base 32 rather than base 16 (for shorter strings), and the separator is '_' rather than '=', since '=' causes problems for some programs (e.g. cmake) if it appears in pathnames.</dd>
<dt>Allow renaming files when unpacking</dt>
<dd><pre>
&lt;<a href='interface-spec.html#recipe'>recipe</a>>
&lt;archive href="..."/>
&lt;rename source="run.sh" dest="start.sh"/>
&lt;/recipe>
</pre></dd>
<dt>Expand environment variables to multiple arguments</dt>
<dd>This is useful for variables which contain e.g. a list of options:
<pre>
&lt;<a href='interface-spec.html#commands'>for-each</a> item-from="EXTRA_OPTIONS" separator=" ">
&lt;arg>-X&lt;/arg>
&lt;arg>${item}&lt;/arg>
&lt;/for-each>
</pre>
This is needed to support SWT on OS X with Java 7.</dd>
<dt>Hide elements from certain versions of 0install</dt>
<dd>
To avoid breaking older versions of 0install when adding new features,
any element in a feed can be tagged with a version expression, and only those
versions will look at it. For example, to add a requirement element that would
confuse current versions of 0install, you might one day write:
<pre>&lt;requires <a href='interface-spec.html#if-0install-version'>if-0install-version</a>="2.7.." .../></pre>
</dd>
</dl>
<h3>Distribution support</h3>
<p>
As well as being able to download and manage 0install packages, 0install also allows programs
to depend on <a href='distribution-integration.html'>native packages</a> from the user's distribution. Enhancements here include:
</p>
<ul>
<li>Improved support for detecting native Java packages (on Arch, Debian, openSUSE, Fedora, OS X and Windows).</li>
<li>Support for detecting .NET Framework installations on Windows.</li>
<li>Support for new distributions: Arch, Cygwin, Darwin, Fink and MacPorts.</li>
</ul>
<h3>Changes to the 0install tool</h3>
<dl>
<dt>App support</dt>
<dd>
<a href='user-guide-apps.html'>Apps</a> are a new system to replace
0install 1.0's aliases. The main difference between apps and
aliases is that apps store their current selections (in
~/.config/0install.net/apps/NAME/selections.xml). This means that they
start faster, because the solver isn't needed. They also store historical
selections, making it easy to roll-back to a previous set of selected versions.
The commands are:
<pre>
0install add NAME URI
0install run NAME
0install update NAME
0install show NAME
0install whatchanged NAME
0install destroy NAME
</pre>
</dd>
<dt>Specifying versions</dt>
<dd>
The new <a href='interface-spec.html#constraints'>range syntax</a> can be used on the command line with the new
--version attribute, e.g.
<pre>
$ 0install run --version=2.11 \
http://rox.sourceforge.net/2005/interfaces/ROX-Filer --version
ROX-Filer 2.11
</pre>
As "!" is often a shell special character, remember to quote it when
specifying ranges.
The new --version-for option allows you to constrain the version of
dependencies too, not just the root. e.g. to force the use of Python
2.6 with Edit:
<pre>
$ 0install select http://rox.sourceforge.net/2005/interfaces/Edit \
--version-for http://repo.roscidus.com/python/python '2.6..!2.7'
</pre>
<p>
When using "0install add" or "0install update" these restrictions are
saved for later. So you could, for example, make separate apps for
Edit with Python 2.6 and Python 2.7:
</p>
<pre>
$ 0install add edit-py26 http://rox.sourceforge.net/2005/interfaces/Edit \
--version-for http://repo.roscidus.com/python/python '2.6..!2.7'
$ 0install add edit-py27 http://rox.sourceforge.net/2005/interfaces/Edit \
--version-for http://repo.roscidus.com/python/python '2.7..!2.8'
</pre>
</dd>
<dt>Diagnostics</dt>
<dd>
0install 2.0 provides hugely improved <a href='injector-trouble.html'>diagnostics</a> when a
solve fails (or fails to select the expected version).
</dd>
<dt>Tab completion</dt>
<dd>There is now very complete support for <a href='http://thread.gmane.org/gmane.comp.file-systems.zero-install.devel/6627'>shell tab completion for the "0install" command</a>.</dd>
<dt>New --dry-run feature</dt>
<dd>This replaces the old broken one. Instead of
telling you the first URL it would have fetched, which isn't helpful,
it actually does the downloads and shows the changes that it would
have made to the system (saving things in the cache, trusting GPG
keys, creating short-cuts, etc), as an educational aid.
</dd>
<dt>Site-local packages</dt>
<dd>
This makes things easier for <a href='0compile.html'>0compile</a>: instead of putting builds in the cache
and registering them with the interface, 0compile can now just drop a build in
~/.local/share/0install.net/site-packages/URI/VERSION and 0install
will find it and add it automatically. The build can be removed by
simply deleting the directory.
</dd>
<dt>0install digest</dt>
<dd>This replaces "0store manifest", but has a saner syntax.
It can also be used directly on an archive.</dd>
<dt>0install man</dt>
<dd>This is similar to the old '0alias --manpage', but also copes with app
launchers. So, to make man(1) work with 0install launchers, do:
<pre>alias man="0install man --"</pre>
</dd>
<dt>0install update</dt>
<dd>
This now notifies the user if there is a newer unselected version, and
suggests turning on help_with_testing if that might help.
</dd>
<dt>Mirroring of archives</dt>
<dd>0install 1.0 can use a <a href='0mirror.html'>mirror service</a> as a
fallback to get the XML feeds; 0install 2.0 can also use the mirror
to get missing archives.
Note however that our default public mirror server does not actually mirror any
archives by default.
</dd>
<dt>Better headless use</dt>
<dd>
We used to assume that a GUI was available whenever $DISPLAY was set. However,
there could be other reasons why the GUI can't be used, such as missing Python
modules, which we now cope with. There are new split <a href='install-linux.html#debian'>Debian packages</a> for
headless servers, to avoid pulling in any GUI dependencies.
</dd>
<dt>Translations</dt>
<dd>There's a new German translation, and a <a href='https://www.transifex.com/projects/p/0install/'>Transifex project</a> to support new translations.</dd>
</dl>
<h3>Internals</h3>
<ul>
<li>Internally, 0install can now run with Python 2 or 3, with PyGTK or PyGObject, and with GTK 2 or GTK 3.</li>
<li>We batch up queries to PackageKit for better performance.</li>
<li>The GUI no longer slows to a crawl when showing download progress for a package with hundreds of dependencies.</li>
<li>We use threads, not processes, for downloads. This is slightly faster and
uses less memory. We also now limit the number of concurrent downloads from a
single site, as opening a large number of simultaneous connections causes
problems for some networks and servers.
</li>
</ul>
<h3>Updates to related tools</h3>
<dl>
<dt>0compile</dt>
<dd><a href='0compile.html'>0compile</a> now works on Windows, not just POSIX systems. It gained support for &lt;command name='compile'> to give the compile command, allowing the use of &lt;runner>. It also now allows you to provide a template for the binary's XML.</dd>
<dt>0downstream</dt>
<dd>The new <a href="https://github.com/gfxmonk/0downstream">0downstream</a> tool makes it easy to generate feeds and keep them up to date based on an existing upstream project.</dd>
<dt>0env</dt>
<dd>The new <a href="http://gfxmonk.net/dist/0install/0env.xml">0env</a> tool makes it easy to step into a shell session with a particular library available.</dd>
<dt>0install for Windows</dt>
<dd>The <a href='http://0install.de/'>Windows port</a> has also been very active; see the separate <a href='http://0install.de/news/?lang=en'>Windows version news page</a> for details.</dd>
<dt>Packaging guide</dt>
<dd>The <a href='injector-packagers.html'>Packaging guide</a> has been improved and a set of <a href='templates.html'>template projects</a> have been created to help developers learn to use 0install.</dd>
</dl>
</div>
</html>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.