Giter Club home page Giter Club logo

0install's Introduction

0install

Copyright Thomas Leonard and others, 2017

INTRODUCTION

Zero Install is a decentralised cross-distribution 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.

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.

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.

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.

See the 0install.net web-site for full details.

INSTALLATION

0install is written in OCaml. You will need the OCaml build tools and some OCaml libraries to compile 0install.

The easiest way to get the dependencies is using OPAM. You will need opam version 2 or later.

$ opam switch create 4.07.0
$ eval `opam config env`
$ opam install yojson xmlm ounit lwt_react ocurl obus lablgtk lwt_glib sha dune

Note: some of these are optional:

  • obus is used on Linux to add support for D-BUS notifications, installing native packages using PackageKit, and using NetworkManager to check the network status before doing background updates.
  • lablgtk and lwt_glib provide a GTK GUI.
  • ocurl selects the C-based libcurl backend for HTTP. You can instead install the packages cohttp-lwt-unix lwt_ssl to get a pure OCaml HTTP client.

Alternatively, you can use your distribution's packages if you prefer (and if they are new enough). For example, on Debian:

$ sudo apt-get install gettext ocaml-nox ocaml-findlib libyojson-ocaml-dev \
   libxmlm-ocaml-dev make liblwt-ocaml-dev libounit-ocaml-dev \
   libcurl-ocaml-dev libsha-ocaml-dev \
   libobus-ocaml-dev liblablgtk2-ocaml-dev liblwt-glib-ocaml-dev

On Fedora:

$ su -c 'yum install gettext ocaml ocaml-findlib ocaml-yojson-devel \
   ocaml-biniou-devel ocaml-easy-format-devel ocaml-xmlm-devel \
   ocaml-lwt-devel ocaml-ounit-devel ocaml-curl-devel \
   ocaml-obus-devel ocaml-lablgtk-devel openssl-devel'

Either way, build and install by running this command in the top-level directory:

$ make && sudo make install

You can also install just to your home directory (this doesn't require root access):

$ make && make install_home
$ export PATH=$HOME/bin:$PATH

Logging out and back in again will ensure $PATH and the Applications menu get updated correctly, on Ubuntu at least.

To try 0install without installing:

$ make
$ ./dist/files/0install --help

Windows installation

A C# Windows version of 0install is available at 0install.de. This uses some of the OCaml code internally, but adds its own user interface and has better Windows integration.

To compile the OCaml version on Windows (which is currently only really useful if you want to build it for use with the C# code):

  1. Install OPAM for Windows. I used the 64-bit graphical installer. Choose a mirror when prompted and select gnupg when prompted to select extra packages. When this completes, you will have OCaml and a package manager for installing OCaml libraries.

Run the newly installed Cygwin64 Terminal application and run these commands at the prompt:

opam install depext-cygwinports depext
opam depext 0install
opam pin -y add -k git 0install .

Notes:

  • The binary requires various DLLs to run. Use cygcheck 0install.exe to get a list of the ones you need and copy them from /usr/x86_64-w64-mingw32/sys-root/mingw/bin to the directory containing the 0install binary.

  • The tests don't currently pass on Windows.

  • The native OCaml code cannot currently cope with archives containing executable files (with the Unix X bit set) - you'll get the error Incorrect manifest -- archive is corrupted. When the OCaml version of 0install is run under the .NET version, the .NET version sets the environment variable %ZEROINSTALL_EXTERNAL_FETCHER% to a .NET helper process which does the unpacking correctly.

Patches to improve the situation are welcome.

TAB COMPLETION

A bash completion script is available in share/bash-completion. It can be sourced from your .bashrc or added under /usr/share/bash-completion. Note that you may have to install a separate "bash-completion" package on some systems.

For zsh users, copy the script in share/zsh/site-functions/ to a directory in your $fpath (e.g. /usr/local/share/zsh/site-functions).

For fish-shell users, add the full path to share/fish/completions to $fish_complete_path.

These completion scripts are installed automatically by "make install".

QUICK START

To install Edit and name it 'rox-edit':

$ 0install add rox-edit http://rox.sourceforge.net/2005/interfaces/Edit

To run it (use the name you chose above):

$ rox-edit

When you run it, 0install will check how long it has been since it checked for updates and will run a check in the background if it has been too long. To check for updates manually:

$ 0install update rox-edit
http://rox.sourceforge.net/2005/interfaces/ROX-Lib: 2.0.5 -> 2.0.6

This shows that ROX-Lib, a library rox-edit uses, was upgraded.

If an upgrade stops a program from working, use "0install whatchanged". This will tell you when the application was last upgraded and what changed, and tells you how to revert to the previous version:

$ 0install whatchanged rox-edit
Last checked    : Tue Sep 25 09:45:19 2012
Last update     : 2012-09-25
Previous update : 2012-08-25

http://rox.sourceforge.net/2005/interfaces/ROX-Lib: 2.0.5 -> 2.0.6

To run using the previous selections, use:
0install run /home/tal/.config/0install.net/apps/rox-edit/selections-2012-08-25.xml

To see where things have been stored:

$ 0install show rox-edit
- URI: http://rox.sourceforge.net/2005/interfaces/Edit
  Version: 2.2
  Path: /home/tal/.cache/0install.net/implementations/sha256=ba3b4953...c8ce3177f08c926bebafcf16b9
  - URI: http://rox.sourceforge.net/2005/interfaces/ROX-Lib
    Version: 2.0.6
    Path: /home/tal/.cache/0install.net/implementations/sha256=ccefa7b187...16b6d0ad67c4df6d0c06243e
  - URI: http://repo.roscidus.com/python/python
    Version: 2.7.3-4
    Path: (package:deb:python2.7:2.7.3-4:x86_64)

To view or change configuration settings:

$ 0install config

For more information, see the man-page for 0install and the 0install.net web-site.

CONDITIONS

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

BUG REPORTS

Please report any bugs to the mailing list.

0install's People

Contributors

afb avatar bartbes avatar bastianeicher avatar chrisleick avatar dabrahams avatar gasche avatar leonidas-from-xiv avatar michel-slm avatar mseaborn avatar pinotree avatar res2k avatar rgrinberg avatar talex5 avatar timbertson avatar ygrek avatar ysangkok avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

0install's Issues

how to "make" from source code only the command line tools, without installing the Gtk tools or dependencies

When i download 0install-2.8.tar.bz2 source from http://0install.net/install-source.html
and then "make" it then it depends upon gtk .
Can i somehow build only the commandline tools of 0install , without the gtk dependencies .

(In ubuntu-server sense, (say) I want to use "apt-get" command line tool, but not "Software Center" GUI; in the same way can I just build the 0install without GTK dependencies)

That will drastically reduce lots of dependencies of 0install binary (as seen by "ldd 0install" )


Hence, i should issue what target of makefile to build only non-gtk tools,as mentioned above

   make ????

Support caches on NTFS mounts on Linux

Background

Windows file systems such as NTFS do not store executable bits and do not allow non-Administators to create symlinks. The C# version of Zero Install handles this by recording the relevant files in .xbit and .symlink files alongside the .manifest file.
Side note: In the long run I intend to remove the .xbit and .symlink files and simply use the equivalent data already recorded in the .manifest file when verifying an implementation's digest.

When sharing an implementation cache between a Windows and a Linux installation by mounting an NTFS volume in Linux this causes problems. The OCaml version of Zero Install does not read the .xbit and .symlink files and therefore generates mismatching manifest digests.

C# solution

When running the C# version of Zero Install on Linux it uses a heuristic to determine whether the file system holding the cache supports executable bits and symlinks. If it does not, Zero Install switches to the Windows-like handling described above.

This makes it possible to share caches across OSes. Everything works fine as long as:

  • the NTFS mount on Linux is configured to mark all files as executable,
  • none of the applications in the cache mind additional files being marked executable and
  • none of the applications in the cache depend on symlinks being present.

I believe this is an acceptable compromise since it is defiantly better than cross-OS caches not working at all.

Suggested OCaml solution

I would suggest extended the OCaml version of Zero Install with similar functionality.

As a first step the manifest digest verification code could use the same heuristic to detect Windows mounts and ignore the file system's report of executable bits and symlinks and simply use the data from the .manifest file instead. The same heuristic could be used to reject any writes to caches on NTFS volumes for the time being.

As a next step the OCaml version could be extended to record executable bit and symlink data prior to extracting archives, like the C# version does. The write block on NTFS caches could then be removed again.

Summary

Rather than switching cache storage behavior based on the current OS Zero Install implementations should decide based on the underlying file system.

OS File system Storage of executable bits and symlinks
Windows NTFS Only in .manifest (and .xbit/.symlink)
Linux ext3, etc. In file system attribues
Linux NTFS Only in .manifest (and .xbit/.symlink)

This would result in any combination of Windows/Linux, C#/Ocaml 0install, NTFS/Unix-FS working.

Archives from launchpad.net download corrupted

When I try to download any files linked in 0install feed from launchpad.net, they download corrupted (the same files download ok in my web browser). Files linked from other servers are ok.

How to reproduce:
try to install from this feed: https://launchpad.net/cknsstatgen/0install/feed/+download/CkNSStatGen.xml (this is a feed I created for my small app using files from my hdd) - it will fail with an uncompression error.
or:

  1. run 0publish-gui, create a new xml file, add an archive
  2. paste a link to any file on launchpad.net and click download (e.g. this one: https://launchpad.net/cknsstatgen/trunk/1.1.3/+download/CkNSStatGen-1.1.3-linux64.tar.bz2 )
  3. you'll get an error about uncompression
  4. when you'll try to open the archive downloaded by 0publish with another archiver, it won't be able to open it

The error message:
Error fetching https://launchpad.net/cknsstatgen/0install/feed/+download/CkNSStatGen.xml 1.1.3: Failed to extract archive (using ['tar', '--bzip2', '-x', '--no-same-owner', '--no-same-permissions', u'CkNSStatGen-1.1.3-linux64']); exit code 2:
tar: CkNSStatGen-1.1.3-linux64: Archive not found
tar: Finished with errors

Affects 0install-injector versions 1.7 and 2.2 on openSUSE 12.2 64bit.

"Could not find part of the path" when trying to package Android NDK

I downloaded https://dl.google.com/android/repository/android-ndk-r20b-windows-x86_64.zip, then tried to run the following command, but got an error like below:

C:\prog\nnn>0install digest \dnload\nim-etc\android-ndk-r20b-windows-x86_64.zip
Extracting archive...
[====                ] IO error
Could not find part of the path โ€žC:\Users\Mateusz\AppData\Local\Temp\0install-qdnsicgu.lje\android-ndk-r20b\sources\cxx-stl\llvm-libc++\test\std\thread\thread.mutex\thread.mutex.requirements\thread.sharedtimedmutex.requirements\thread.sharedtimedmutex.class\try_lock_until_deadlock_bug.pass.cppโ€.

I suspect the issue behind this is probably similar as the one I encountered in 0publish-win when trying to package Go's zip archive; the other one seemed to be workable around with the .msi Go installer; is there a similar workaround that could let me have the NDK installed successfully with 0install?

Alternatively, if this is not a problem with the .zip but with accessing the Windows filesystem, I believe there are ways to manipulate paths over MAX_PATH characters on Windows.

FreeBSD support broken

The first hurdle can be overcome by using $(MAKE) (using the same make that was used by the user) instead of make in the root Makefile. But then ocaml/build-in.ml calls make, which defaults to the FreeBSD make, which runs ocaml/Makefile. In this file, the if syntax is GNU specific.

Installation error on Windows

Windows 7 x64

Descripciรณn:
Stopped working

Firma con problemas:
Nombre del evento de problema: CLR20r3
Firma del problema 01: zero-install.exe
Firma del problema 02: 2.13.3.0
Firma del problema 03: 5988845c
Firma del problema 04: System
Firma del problema 05: 2.0.0.0
Firma del problema 06: 506c18e6
Firma del problema 07: 21b6
Firma del problema 08: 18
Firma del problema 09: System.NotSupportedException
Versiรณn del sistema operativo: 6.1.7601.2.1.0.256.1
Id. de configuraciรณn regional: 3082

Offer a precompiled binary

I really like the ideas behind this tool, but I am having an impossible time actually installing it on an arch linux system.

It should be an abosolute requirement that this software is compiled to a statically linked binary with no dependencies. Having a tool that is supposed to make installation easy be itself difficult to install really hurts it.

Is this possible/easy in OCaml?

upcoming fedora 23 package of 0install is still 2.3

disclaimer: I know that this is not an issue with 0install project, but is an issue with fedora packaging. But I have already informed them, and as an upstream if you also send a communication to them, then probably it will be taken up promptly.

= = =

see https://apps.fedoraproject.org/packages/zeroinstall-injector
Fedora 23 which is to be released in october 2015, has still zeroinstall version 2.3
. Even there's "rawhide" (which is supposed to be the "raw latest imported code" from github repository of 0install) is still having version 2.3 of zeroinstall.
if nobody informs/take up this issue with fedora then they will continue to ship zeroinstall version 2.3 till the end of civilization. I have already raised with them. If being an upstream if you raise this issue with them, then the users of fedora upcoming versions will atleast have the taste of latest zeroinstall from their official repository.

= = =

compare this to debian where:
jessie has version 2.7.3
reference: https://packages.debian.org/jessie/zeroinstall-injector
debian-testing has version 2.8.1
reference: https://packages.debian.org/testing/zeroinstall-injector

ubuntu vivid (14.04) has 2.8.1
reference: http://packages.ubuntu.com/vivid/zeroinstall-injector

only fedora is still in love with zeroinstall version "2.3", if 0install upstream (that is core devs ) remind them then only they will take up this case of their totally stale official fedora repository for zeroinstall only.

Tutorial depends on broken 0publish-gui?

I tried starting out with this tutorial: http://0install.net/packaging-binaries.html#idp170048

When I got to the point of installing 0publish-gui with 0install add 0publish-gui http://0install.net/2007/interfaces/0publish-gui.xml, it froze trying to download readline6. After about 15 minutes, I just CTRL-C'd it, and re-ran the command. It does not even try to resume with readline6; rather it now freezes completely on ROX-Lib.

I was hoping to explore using 0install to function as a package distribution and modularization mechanism for my project (https://github.com/kestrelcomputer/kestrel), particularly to package development tools and the emulator components.

I'm running Ubuntu 15.04. Any help would be appreciated, but I suspect there's something wrong with the XML file behind 0publish-gui, and I'm not sure what I can do to fix things.

Windows proxy

Good day.
Windows client don't show any program in catalog.
Suggesting because of proxy server is installed on my net.
Setting http_proxy in shell enviroment did't help.

0install not following HTTP 302 redirects

The version of 0install in Ubuntu 18.04 does not seem to follow HTTP 302 redirects. For example:

$ 0install --version
0install (zero-install) 2.12.3

$ 0install download https://apps.0install.net/0install/0watch.xml
Downloaded archive has incorrect size.
URL: https://github.com/0install/0watch/releases/download/0.3.0/0watch-0.3.0.tar.gz
Expected: 1148 bytes
Received: 609 bytes
... downloading implementation https://apps.0install.net/0install/0watch.xml 0.3.0 (id=sha1new=fd6c7fc38284a7ccae1d2713db6844171718da3e)

$ curl -i https://github.com/0install/0watch/releases/download/0.3.0/0watch-0.3.0.tar.gz
HTTP/1.1 302 Found
[...]
location: https://github-production-release-asset-2e65be.s3.amazonaws.com/[...]
[...]

The latest generic binaries with cohttp, the old Python implementation and the Windows version all do follow redirects:

$ 0install run --version 2.15.1 http://0install.net/tools/0install.xml download https://apps.0install.net/0install/0watch.xml

$ 0install run http://0install.net/2007/interfaces/ZeroInstall.xml https://apps.0install.net/0install/0watch.xml

GitHub Releases seems to have started using HTTP 302 redirects recently, causing downloads of archives hosted on apps.0install.net to fail.

Issue running JRE in Mac OS X (10.10.3)

Include jre dependency in feed

<requires interface="http://repo.roscidus.com/java/openjdk-jre">
   <environment name="JAVA_HOME" insert="." mode="replace" />
 </requires>

Throws same exception when trying to run 0launch http://repo.roscidus.com/java/openjdk-jre

Can't find all required implementations:
- http://repo.roscidus.com/java/openjdk-jre -> (problem)
    No usable implementations:
      sha1new=6b7c9f98bd1d8bec5bbb5ddb41271c862c8e8529 (6.18-1.8.7-2): Not compatible with the requested OS type
      sha1new=3ede8dc4b83dd3d7705ee3a427b637a2cb98d789 (6.18-1.8.7-2): Not compatible with the requested OS type
      sha1new=6cc9f66b968d983904bce5050b2e328c3740462b (6.11-9.1-2): Not compatible with the requested OS type
      sha1new=042663897b1fce617d5bc8c98945adc64e4ef2a9 (6.11-9.1-2): Not compatible with the requested OS type

Seems like its redirecting to http://repo.roscidus.com/java/openjdk-6-jre for jre6 version.
How can I specify in my feed with jre 1.7?

Cannot delete 0install.net folder in Windows

HI,

I have a 0install.net folder under my c:\programdata folder and I cannot delete it.

0Install are not installed on the PC anymore and my antivirus reports malicious behavior from that folder so I want it deleted.

I have taken ownership of the folder, but I still cant delete it.

Plz help

/Kim

Document how to build and run tests

It seems that build/ocaml/tests/test.native needs to be built. The source of the Makefile says that making should suffice, but it does not generate this file.

Size of 0install installation window.

Oinstall installation window (where it first shows the dependencies) is wider than my screen by default (1080 wide, a portrait monitor). Even if I resize it, in the next package I install it returns to the same size as before. I can also move it to my other wider screen, but the next time it opens it will aways open in the narrower screen, regardless of where the main 0install applications window is. It is annoying.

Uninstall on OS X?

There seems to be no instructions on how to remove Zero Install after installing the bundle.

Mac OSX - cryptic error thrown due to existing gpg.conf

I started using 0install today by recommendation of the maintainer of the dispcalGUI project, and once I got 0install running and tried to open the dispcalGUI feed I was presented with the following error message:

Feed 'http://dispcalgui.hoech.net/0install/dispcalGUI.xml': No signatures found on feed >http://dispcalgui.hoech.net/0install/dispcalGUI.xml!
gpg: invalid item `BZIP2' in preference string
gpg: invalid default preferences

To me this suggested some problem with the .xml file being downloaded, but some searching in the dispcalGUI support forums turned up the following recommendation from Florian Hoech:

it seems that the version of GnuPG that Zero Install installs is compiled without BZip2 support and fails >to read configuration files written by versions of GnuPG that do have BZip2 support, and you happen to >use GPGTools. Try to remove/rename your ~/.gnupg/gpg.conf file.

After moving my existing gpg.conf out of the way, 0install was able to proceed with verification and download of the requested packages. I haven't had a chance to verify this 100%, but the only line in my gpg.conf that mentions BZIP2 is the following, in the final stanza - apparently "Options for GPGTools":

default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 >ZIP Uncompressed

It seems that, at least on Mac, 0install should either use a version of gnupg that supports the BZIP2 extension or alternatively detect an existing gpg.conf and either 1. use the existing gnupg install or 2. warn the user about this conflict and provide a workaround

When signing, include the key id in the drop down menu

Name and email address are not enough to differentiate the various GPG keys that I have available, so it's impossible to tell which key 0publish is going to try to use to sign my feed. The drop down menu should include the associated key ideas to disambiguate which key is being selected.

Environment variables for .NET and OCaml integration

The Python version of Zero Install used to detect two environment variables set by the .NET code:

ZEROINSTALL_EXTERNAL_STORE which points to a command that takes paths to archives to extract. Useful to support 0install store add DIGEST ARCHIVE on Windows.

ZEROINSTALL_EXTERNAL_FETCHER which points to a command that accepts an XML snippet on stdin to download and add to the cache. Useful to support 0install download|update|run URI on Windows.

It seems the OCaml version only supports ZEROINSTALL_EXTERNAL_FETCHER. Perhaps ZEROINSTALL_EXTERNAL_STORE should also be ported for completeness' sake?

Document runtime dependency on libcurl

I tried to bootstrap the current version of 0install (2.12.3) using the Ubuntu 16.04.4 LTS packaged version of 0install (2.10) and got an error:

$ 0install run http://0install.net/tools/0install.xml --version
.../.cache/0install.net/implementations/sha256new_KMBP7THWUG6NKNIWNRRV3OLUMQZIOQCMIY4F4ST537W4ROARATVQ/files/0install: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory

This was easily fixed with apt install libcurl3 but maybe it would be a good idea to document the runtime dependency on libcurl, since it seems to be the only lib missing for bootstrapping on a vanilla Ubuntu.

problem with libcurl (7.49.1)

I download 0install-2.11 and try them on an ArchLinux machine. Here is the error message

ldd 0install
./0install: /usr/lib/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by ./0install)

There is curl 7.49.1 on my system.

Is there some integration we could do with esy?

Hi,

I'm curious if there's some way we could leverage 0install for esy. One of the primary use cases is for distributing builds of applications that are build/developed with esy. One idea is that for esy projects, we could have an esy release-0install command which creates a cross platform binary package to be installed on any platform.

Would this require that consumers install 0install to install the package? Or does 0install have a mode where it generates totally dependency-free one-click installers?

Cannot install any packages on Manjaro

Attempting to install any packages (even ones I know should work) fail to:
"WARNING:0install:invalid literal for int() with base 10: '-'"
Here's a run with option -vvc...
`<~/0install-linux-x86_64-2.12.1 >>> 0launch -vvc http://0install.de/feeds/ZeroInstall_Tools.xml [1]
INFO:root:Running 0launch 2.0 ['http://0install.de/feeds/ZeroInstall_Tools.xml']; Python 3.6.5 (default, May 11 2018, 04:00:52)
[GCC 8.1.0]
INFO:0install:Loading configuration from /home/bobsal/.config/0install.net/injector/global
DEBUG:0install:Supported systems: '{'Linux': 1, 'POSIX': 2, None: 3}'
DEBUG:0install:Supported processors: '{'x86_64': 0, 'i686': 1, 'i586': 2, 'i486': 3, 'i386': 4, None: 5}'
DEBUG:0install:Initialising new interface object for http://0install.de/feeds/ZeroInstall_Tools.xml
DEBUG:0install:Processing feed http://0install.de/feeds/ZeroInstall_Tools.xml
INFO:0install:No run in http://0install.de/feeds/ZeroInstall_Tools.xml
DEBUG:0install:Processing feed http://0install.de/feeds/ZeroInstall_Tools.xml
INFO:0install:No run in http://0install.de/feeds/ZeroInstall_Tools.xml
INFO:0install:Scheduling new task: solve_and_download_impls
INFO:0install:Scheduling new task: quitter
DEBUG:0install:Entering mainloop, waiting for solve_and_download_impls
INFO:0install:Task 'quitter' stopping and waiting for '(Blocker:solve_and_download_impls,)'
INFO:0install:Scheduling new task: solve_with_downloads
INFO:0install:Task 'solve_and_download_impls' stopping and waiting for '(Blocker:solve_with_downloads,)'
DEBUG:0install:Processing feed http://0install.de/feeds/ZeroInstall_Tools.xml
INFO:0install:No run in http://0install.de/feeds/ZeroInstall_Tools.xml
DEBUG:0install:Processing feed http://0install.de/feeds/ZeroInstall_Tools.xml
INFO:0install:No run in http://0install.de/feeds/ZeroInstall_Tools.xml
DEBUG:0install:download_and_import_feed http://0install.de/feeds/ZeroInstall_Tools.xml
[http://0install.de/feeds/ZeroInstall_Tools.xml] INFO:0install:Scheduling new task: download_done_stats
INFO:0install:Scheduling new task: download
INFO:0install:Scheduling new task: fetch_feed http://0install.de/feeds/ZeroInstall_Tools.xml
INFO:0install:Scheduling new task: monitor feed downloads for http://0install.de/feeds/ZeroInstall_Tools.xml
INFO:0install:Task 'solve_with_downloads' stopping and waiting for 'dict_values([<Blocker:monitor feed downloads for http://0install.de/feeds/ZeroInstall_Tools.xml>])'
INFO:0install:Task 'fetch_feed http://0install.de/feeds/ZeroInstall_Tools.xml' stopping and waiting for '(Blocker:download,)'
INFO:0install:Task 'monitor feed downloads for http://0install.de/feeds/ZeroInstall_Tools.xml' stopping and waiting for '(<Blocker:fetch_feed http://0install.de/feeds/ZeroInstall_Tools.xml>, <Blocker:Mirror timeout>)'
INFO:0install:Task 'download_done_stats' stopping and waiting for '(Blocker:download,)'
INFO:0install:Scheduling new task: download
INFO:0install:Task 'download' stopping and waiting for '(Blocker:download,)'
INFO:0install:Task 'download' stopping and waiting for '(<Blocker:wait for thread http://0install.de/feeds/ZeroInstall_Tools.xml>, <Blocker:abort http://0install.de/feeds/ZeroInstall_Tools.xml>)'
[http://0install.de/feeds/ZeroInstall_Tools.xml] INFO:0install:Running {Task(download)} due to triggering of 'wait for thread http://0install.de/feeds/ZeroInstall_Tools.xml'
INFO:0install:Running {Task(download)} due to triggering of 'download'
INFO:0install:Running {Task(download_done_stats), Task(fetch_feed http://0install.de/feeds/ZeroInstall_Tools.xml)} due to triggering of 'download'
INFO:0install:Scheduling new task: download keys for http://0install.de/feeds/ZeroInstall_Tools.xml
INFO:0install:Task 'fetch_feed http://0install.de/feeds/ZeroInstall_Tools.xml' stopping and waiting for '(<Blocker:download keys for http://0install.de/feeds/ZeroInstall_Tools.xml>,)'
INFO:0install:Running download_done_stats
INFO:0install:Exception from 'download keys for http://0install.de/feeds/ZeroInstall_Tools.xml': invalid literal for int() with base 10: '-'
DEBUG:0install:Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/zeroinstall/support/tasks.py", line 254, in _resume
new_blockers = next(self.iterator)
File "/usr/lib/python3.6/site-packages/zeroinstall/injector/iface_cache.py", line 91, in download_keys
key_id = x.need_key()
File "/usr/lib/python3.6/site-packages/zeroinstall/injector/gpg.py", line 111, in need_key
rc = int(self.status[self.RC])
ValueError: invalid literal for int() with base 10: '-'

INFO:0install:Running {Task(fetch_feed http://0install.de/feeds/ZeroInstall_Tools.xml)} due to triggering of 'download keys for http://0install.de/feeds/ZeroInstall_Tools.xml'
INFO:0install:Exception from 'fetch_feed http://0install.de/feeds/ZeroInstall_Tools.xml': invalid literal for int() with base 10: '-'
DEBUG:0install:Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/zeroinstall/support/tasks.py", line 254, in _resume
new_blockers = next(self.iterator)
File "/usr/lib/python3.6/site-packages/zeroinstall/injector/fetch.py", line 334, in fetch_feed
tasks.check(keys_downloaded.finished)
File "/usr/lib/python3.6/site-packages/zeroinstall/support/tasks.py", line 66, in check
support.raise_with_traceback(ex[0], ex[1])
File "/usr/lib/python3.6/site-packages/zeroinstall/support/init.py", line 95, in raise_with_traceback
raise ex # Python 3
File "/usr/lib/python3.6/site-packages/zeroinstall/support/tasks.py", line 254, in _resume
new_blockers = next(self.iterator)
File "/usr/lib/python3.6/site-packages/zeroinstall/injector/iface_cache.py", line 91, in download_keys
key_id = x.need_key()
File "/usr/lib/python3.6/site-packages/zeroinstall/injector/gpg.py", line 111, in need_key
rc = int(self.status[self.RC])
ValueError: invalid literal for int() with base 10: '-'

INFO:0install:Running {Task(monitor feed downloads for http://0install.de/feeds/ZeroInstall_Tools.xml)} due to triggering of 'fetch_feed http://0install.de/feeds/ZeroInstall_Tools.xml'
INFO:0install:Exception from 'monitor feed downloads for http://0install.de/feeds/ZeroInstall_Tools.xml': invalid literal for int() with base 10: '-'
DEBUG:0install:Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/zeroinstall/support/tasks.py", line 254, in _resume
new_blockers = next(self.iterator)
File "/usr/lib/python3.6/site-packages/zeroinstall/injector/fetch.py", line 239, in wait_for_downloads
tasks.check(primary)
File "/usr/lib/python3.6/site-packages/zeroinstall/support/tasks.py", line 66, in check
support.raise_with_traceback(ex[0], ex[1])
File "/usr/lib/python3.6/site-packages/zeroinstall/support/init.py", line 95, in raise_with_traceback
raise ex # Python 3
File "/usr/lib/python3.6/site-packages/zeroinstall/support/tasks.py", line 254, in _resume
new_blockers = next(self.iterator)
File "/usr/lib/python3.6/site-packages/zeroinstall/injector/fetch.py", line 334, in fetch_feed
tasks.check(keys_downloaded.finished)
File "/usr/lib/python3.6/site-packages/zeroinstall/support/tasks.py", line 66, in check
support.raise_with_traceback(ex[0], ex[1])
File "/usr/lib/python3.6/site-packages/zeroinstall/support/init.py", line 95, in raise_with_traceback
raise ex # Python 3
File "/usr/lib/python3.6/site-packages/zeroinstall/support/tasks.py", line 254, in _resume
new_blockers = next(self.iterator)
File "/usr/lib/python3.6/site-packages/zeroinstall/injector/iface_cache.py", line 91, in download_keys
key_id = x.need_key()
File "/usr/lib/python3.6/site-packages/zeroinstall/injector/gpg.py", line 111, in need_key
rc = int(self.status[self.RC])
ValueError: invalid literal for int() with base 10: '-'

INFO:0install:Running {Task(solve_with_downloads)} due to triggering of 'monitor feed downloads for http://0install.de/feeds/ZeroInstall_Tools.xml'
WARNING:0install:invalid literal for int() with base 10: '-'
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/zeroinstall/support/tasks.py", line 254, in _resume
new_blockers = next(self.iterator)
File "/usr/lib/python3.6/site-packages/zeroinstall/injector/fetch.py", line 239, in wait_for_downloads
tasks.check(primary)
File "/usr/lib/python3.6/site-packages/zeroinstall/support/tasks.py", line 66, in check
support.raise_with_traceback(ex[0], ex[1])
File "/usr/lib/python3.6/site-packages/zeroinstall/support/init.py", line 95, in raise_with_traceback
raise ex # Python 3
File "/usr/lib/python3.6/site-packages/zeroinstall/support/tasks.py", line 254, in _resume
new_blockers = next(self.iterator)
File "/usr/lib/python3.6/site-packages/zeroinstall/injector/fetch.py", line 334, in fetch_feed
tasks.check(keys_downloaded.finished)
File "/usr/lib/python3.6/site-packages/zeroinstall/support/tasks.py", line 66, in check
support.raise_with_traceback(ex[0], ex[1])
File "/usr/lib/python3.6/site-packages/zeroinstall/support/init.py", line 95, in raise_with_traceback
raise ex # Python 3
File "/usr/lib/python3.6/site-packages/zeroinstall/support/tasks.py", line 254, in _resume
new_blockers = next(self.iterator)
File "/usr/lib/python3.6/site-packages/zeroinstall/injector/iface_cache.py", line 91, in download_keys
key_id = x.need_key()
File "/usr/lib/python3.6/site-packages/zeroinstall/injector/gpg.py", line 111, in need_key
rc = int(self.status[self.RC])
NoneType: None
DEBUG:0install:Processing feed http://0install.de/feeds/ZeroInstall_Tools.xml
INFO:0install:No run in http://0install.de/feeds/ZeroInstall_Tools.xml
DEBUG:0install:Processing feed http://0install.de/feeds/ZeroInstall_Tools.xml
INFO:0install:No run in http://0install.de/feeds/ZeroInstall_Tools.xml
INFO:0install:Running {Task(solve_and_download_impls)} due to triggering of 'solve_with_downloads'
INFO:0install:Exception from 'solve_and_download_impls': Can't find all required implementations:

  • http://0install.de/feeds/ZeroInstall_Tools.xml -> (problem)
    No known implementations at all
    DEBUG:0install:Traceback (most recent call last):
    File "/usr/lib/python3.6/site-packages/zeroinstall/support/tasks.py", line 254, in _resume
    new_blockers = next(self.iterator)
    File "/usr/lib/python3.6/site-packages/zeroinstall/injector/driver.py", line 158, in solve_and_download_impls
    raise self.solver.get_failure_reason()
    zeroinstall.SafeException: Can't find all required implementations:
  • http://0install.de/feeds/ZeroInstall_Tools.xml -> (problem)
    No known implementations at all

INFO:0install:Running {Task(quitter)} due to triggering of 'solve_and_download_impls'
Traceback (most recent call last):
File "/bin/0launch", line 14, in
cli.main(sys.argv[1:])
File "/usr/lib/python3.6/site-packages/zeroinstall/injector/cli.py", line 143, in main
run.handle(config, options, args)
File "/usr/lib/python3.6/site-packages/zeroinstall/cmd/run.py", line 48, in handle
test_callback = test_callback)
File "/usr/lib/python3.6/site-packages/zeroinstall/cmd/select.py", line 73, in get_selections
return get_selections_for(requirements, config, options, select_only, download_only, test_callback)
File "/usr/lib/python3.6/site-packages/zeroinstall/cmd/select.py", line 154, in get_selections_for
tasks.wait_for_blocker(downloaded)
File "/usr/lib/python3.6/site-packages/zeroinstall/support/tasks.py", line 373, in wait_for_blocker
check(blocker)
File "/usr/lib/python3.6/site-packages/zeroinstall/support/tasks.py", line 66, in check
support.raise_with_traceback(ex[0], ex[1])
File "/usr/lib/python3.6/site-packages/zeroinstall/support/init.py", line 95, in raise_with_traceback
raise ex # Python 3
File "/usr/lib/python3.6/site-packages/zeroinstall/support/tasks.py", line 254, in _resume
new_blockers = next(self.iterator)
File "/usr/lib/python3.6/site-packages/zeroinstall/injector/driver.py", line 158, in solve_and_download_impls
raise self.solver.get_failure_reason()
zeroinstall.SafeException: Can't find all required implementations:

I've no clue why, or how to fix this however...

Enfore URL casing on Windows

URLs are case-sensitive (except for hostnames). Cached feeds are stored as individual files named like the URL the came from (with some characters replaced). On Windows - with its case-insensitive file system - a scenario like this could be problematic:

0launch http://0install.net/app.xml
(URL is valid, feed now cached)
0launch http://0install.net/App.xml
(URL is invalid, but 0install now incorrectly thinks it is cached)

The .NET version tries to mitigate this problem by performing a case-sensitive file name comparison in addition to the operating system's "file exists" check. Maybe the Python and OCaml code could do the same?

Trying to install putty 0.63

[17:40:00] ERROR: An implementation's manifest hash does not match the expected value.
Expected value: sha256new_IYCPSMNOQ4MZC5C3P32XRU4LMCWYAE6C4XXR2AQCD567TNLCZRUA
Actual value: sha256new_XU5IIOPO3WFEU3IFANTFFCYDEI2XN2CMUXDQ4YIN5VFTV22FXWDA

Portable mode via environment variable

The Windows version of Zero Install supports a portable mode where

  • %appdata%\0install.net/$XDG_CONFIG_HOME/0install.net is replaced by $ZEROINSTALL_PORTABLE_BASE/config,
  • %localappdata%\0install.net/$XDG_DATA_HOME/0install.net is replaced by $ZEROINSTALL_PORTABLE_BASE/data and
  • %localappdata%\0install.net/$XDG_CACHE_HOME/0install.net is replaced by $ZEROINSTALL_PORTABLE_BASE/cache.

The portable mode is activated by placing a file named _portable in the installation directory. Zero Install for Windows then passes this "portable state" on to external processes by setting the environment variable ZEROINSTALL_PORTABLE_BASE to the installation directory.

Support for this environment variable would need to be added to the OCaml implementation so that it can be used as an external solver by the Windows implemnentation when running in portable mode.

TypeError: __details_cb() missing 5 required positional arguments

After upgrading to fedora 21, looks like the PackageKit dbus or python API has changed a bit. When I run the python version (http://0install.net/2007/interfaces/ZeroInstall.xml, v2.3.4), I get the following error printed to the console (but the process continues):

ERROR:dbus.connection:Exception in handler for D-Bus signal:
Traceback (most recent call last):
  File "/usr/lib64/python3.4/site-packages/dbus/connection.py", line 230, in maybe_handle_message
    self._handler(*args, **kwargs)
TypeError: __details_cb() missing 5 required positional arguments: 'licence', 'group', 'detail', 'url', and 'size'

Here is the output from dbus-monitor while I ran:

0install run --command=0install http://0install.net/2007/interfaces/ZeroInstall.xml select -rc http://gfxmonk.net/dist/0install/git.xml

PackageKit resolution seems to work fine with the ocaml version, so I guess it's an API change on python's side?

0install home page / video positioning

I think the video tutorial on the home page is good P.R./tutorial material.

http://0install.net/

I think it should be front and center, so users don't have to scroll down. Most web users are going to decide to leave the website before scrolling down for extra content.

0install fails on ArchLinux

There is no precompiled package for ArchLinux, so I tried to use 0install to install 0install (bootstrap). I downloaded the latest version of 0install and made sure that the default python version in PATH was python2. I added the files directory (that contains all the 0install binaries) to the PATH.

Then, I wanted to install 0install by:

0install -c add 0install http://0install.net/tools/0install.xml

I got:

[net/tools/0install.xml] [idus.com/lib/readline6] [idus.com/python/python] [/python/python-gobject] [on/python/upstream.xml] [dus.com/security/gnupg] 
Traceback (most recent call last):
  File "/home/mildred/.local/opt/0install-linux-x86_64-2.4-rc1/files/zeroinstall/cmd/slave.py", line 343, in handle_invoke
    response = do_get_package_impls(config, options, request[1:], xml)
  File "/home/mildred/.local/opt/0install-linux-x86_64-2.4-rc1/files/zeroinstall/cmd/slave.py", line 136, in do_get_package_impls
    feed = config.iface_cache.distro.get_feed(master_feed)
  File "/home/mildred/.local/opt/0install-linux-x86_64-2.4-rc1/files/zeroinstall/injector/distro.py", line 229, in get_feed
    self.get_package_info(package, factory)
  File "/home/mildred/.local/opt/0install-linux-x86_64-2.4-rc1/files/zeroinstall/injector/distro.py", line 891, in get_package_info
    name, version, build = entry.rsplit('-', 2)
ValueError: need more than 1 value to unpack
... solving for interface http://0install.net/tools/0install.xml

Debugging this, I found that it seems to be a problem with the native ArchLinux package manager. In the code (distro.py get_package_info):

self._packages_dir = "/var/lib/pacman/local"
entry = "ALPM_DB_VERSION"
result of entry.rsplit(...) = ['ALPM_DB_VERSION']

This is because in the directory /var/lib/pacman/local, beside all the installed package, there is a ALPM_DB_VERSION file. I think we should ignore files that cannot be split to three components.

My fix is:

--- /home/mildred/.local/opt/0install-linux-x86_64-2.4-rc1/files/zeroinstall/injector/distro.py.old	2017-05-17 10:27:25.029524901 +0200
+++ /home/mildred/.local/opt/0install-linux-x86_64-2.4-rc1/files/zeroinstall/injector/distro.py	2017-05-17 10:28:00.590517009 +0200
@@ -884,7 +884,10 @@
 		# Add installed versions...
 		"""@type package: str"""
 		for entry in os.listdir(self._packages_dir):
-			name, version, build = entry.rsplit('-', 2)
+			split = entry.rsplit('-', 2)
+			if len(split) != 3:
+				continue
+			name, version, build = split
 			if name == package:
 				gotarch = False
 				# (read in binary mode to avoid unicode errors in C locale)

On download page, also offer 0install compiled to a .jar using "Ocamljava"

OcamlJava ( http://www.ocamljava.org/ ) implements 100% of ocaml 4.0 in pure java , so a application written in ocaml can be compiled to java .jar using ocamljava
the homepage of ocamljava says " 100% OCaml, 100% Java. The compiler supports the whole OCaml language (version 4.01.0), and generates plain Java bytecode. Moreover, the runtime support library does not use native code. Produced jar files can thus be run on any 1.7+ JVM."


http://0install.net/injector.html and http://0install.net/install-linux.html gives separate "binary" compile downloads of 0install injector.

I propose that as 0install 2.0 has been written in ocaml , hence it may be compiled with ocamljava and turned into a .jar which can be run on any jvm. And now this 0install-injector.jar can be also given as "universal binary" which can run on any platform with JRE .

I am not asking that other downloads be removed for platform specific binary of 0install, but I am just saying that you can provide a universal .jar for those who are not speed-conscious ,butwant to deploy a same binary , and also if their platform bundles old version of 0install due to inactive package maintenance, then they will have atleast a fallback to try latest version of 0install-injector.jar, instead of old version of the packaged 0install-injector (native)

Build failure with ocaml 4.07.0

File "zeroinstall/command.ml", line 7, characters 0-19:
Warning 44: this open statement shadows the module identifier String (which is later used)
File "zeroinstall/command.ml", line 50, characters 43-63:
Error: Type [ `For_each ] Element.t is not a subtype of
         arg_parent = [ `Command | `For_each | `Runner ] Element.t
       The first variant type does not allow tag(s) `Command, `Runner
Command exited with code 2.
make[2]: *** [ocaml] Error 10
make[1]: *** [all] Error 2
make: *** [all] Error 2

Running macOS 10.14 with Opam 1.2.2, OCaml 4.07.0.

Signature check race condition on Windows

Running a command like 0install select --refresh http://0install.de/feeds/FileZilla.xml with the OCaml build on Windows sporadically fails with:

warning: Failed to clean up GnuPG temporary file '...\Temp\0installa87be1-gpg': Unix.Unix_error(Unix.EACCES, "unlink", "...\\Temp\\0installa87be1-gpg")
warning: Feed http://0install.de/feeds/FileZilla.xml: No signatures found on feed http://0install.de/feeds/cli/netfx.xml!
gpg: can't open `...\Temp\0installa87be1-gpg'
gpg: verify signatures failed: file open error

On my machine it fails roughly one out of five times.

Unfortunately activating --verbose mode seems to affect the timing and prevent the issue from occurring.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.