Re: zero install json api

"Bastian Eicher" <[email protected]> Wed, 20 Jul 2016 20:11:33 +0200
Newsgroups gmane.comp.file-systems.zero-install.devel
Message-ID <[email protected]>
Hello Sanketh, 

maybe you do not even need to use the API. Zero Install automatically checks for updates when you run an application. This happens in the background every 7 days. You can change this interval like this:
0install config freshness SECONDS-BETWEEN-UPDATE-CHECKS

If you still want to trigger update checks yourself, I recommend using the normal command-line arguments instead of the JSON API, since this is much easier. For example, you can check for and download updates in the background like this:
0install-win update --background --batch http://myserver/myfeed.xml

Regarding your other questions:

1. You can configure Zero Install to use an alternative feed mirror like this:
0install config feed_mirror http://myserver/0mirror
You could then need create intranet copies like this:
http://0install.de/feeds/ZeroInstall.xml -> http://myserver/0mirror/feeds/http/0install.de/feeds%23ZeroInstall.xml/latest.xml
http://0install.de/files/hosted/ZeroInstall-2.11.7.tar.gz -> http://myserver/0mirror/archives/http/0install.de/files%23hosted%23ZeroInstall-2.11.7.tar.gz
Please note that Zero Install first tries to connect to the real server and if that fails (e.g., due to a firewall) it falls back to the mirror.

3. Package implementations are mainly intended for Linux package managers (DEB, RPM, etc.). For Windows there is currently hardcoded support for detecting .NET and Java installations. In the future integration with the OneGet package management system is planned.
Simply triggering an external EXE is intentionally not supported, since this goes against the idea of having no side effects. When possible, the dependencies should also be distributed as Zero Install feeds.

4. Zero Install does not have a concept of "installed" versions. There can be multiple versions of an application in the local cache at the same time. Users can select different versions at any time like this:
0install run --version=1.0 http://myserver/myfeed.xml
This means there is no support for "post-install scripts".

5. What kind of customization of the stability values do you want to perform?
The available values are "developer", "testing", "stable" and "buggy". It is not possible to define other stability values.
A user can locally override the stability values set in a feed like this:
0install select --customize http://myserver/myfeed.xml

6. Catalog XML files contain links to a list of feeds. You can create a catalog for a set of feed files like this:
0install run --command=0publish http://0install.de/feeds/ZeroInstall_Tools.xml C:\MyFeeds\*.xml --catalog=C:\catalog.xml
A more complicated but also more powerful way to manage feeds and catalogs is 0repo: https://github.com/0install/0repo
You can register a catalog in Zero Install like this:
0install catalog add http://myserver/catalog.xml

Regards
Bastian


-----Original Message-----
From: Sanketh [mailto:[email protected]] 
Sent: Mittwoch, 20. Juli 2016 10:47
To: Bastian Eicher <[email protected]>
Subject: Re: zero install json api

Hello Bastian,

Thank you for your response. The use case was to integrate zero install with a Java application to check for updates and trigger 0install to perform update. I am able to launch slave command now.

Meanwhile I explored 0install and I have few queries, I kindly request you to clarify the same. I am currently evaluating zero install for the organisation I work for.

1. Is it possible to host Zero Install tools within our intranet and strictly no internet connection.

2. Can the bootstrap exe provided by you be customised to use zero install from intranet 

3. What is package implementation? I went through the documents but couldn't understand. I have our own installer which manages dependencies etc., zero install should just trigger that exe, could you share any examples for this?

4. How to make zero install identify that a particular version is already installed and additional steps are required to install a new version?

5. Can the stability values be customised?

Thanks in advance,
Sanketh


On Wednesday, July 13, 2016, Bastian Eicher <mailto:[email protected]> wrote:
Hi Sanketh,

welcome to the Zero Install community. :)

There are currently three implementations of Zero Install:

1. Python. This implementation is mostly obsolete, but still provides a convenient Python API for other apps to build on.

2. OCaml. Mainly intended for use on Linux and MacOS. It does work on Windows as well, but with some limitations and no GUI. This is the version that provides the JSON API.

3. C#. Mainly intended for use on Windows. It does work on Linux, but again with some limitations and no GUI. This version provides .NET/NuGet libraries. This is the version you are currently using.

The C# version internally uses the OCaml version and its JSON API for solving complex dependency graphs.
You can also instruct your installed version of Zero Install to fetch and run the OCaml version like this:
0install run http://0install.net/tools/0install.xml slave 2.11

Note: http://0install.net seems to be down at the moment, which may prevent this from working right now.

I'd be curious to know what kind of API integration you are interested in.

Regards
Bastian


-----Original Message-----
From: Sanketh [mailto:javascript:;]
Sent: Montag, 11. Juli 2016 17:15
To: javascript:;
Subject: [Zero-install-devel] zero install json api

Hello All,
I am new to zero install, in the below document i found that JSON API is available to be used with other applications.
http://0install.net/json-api.html
I tried using it on windows machine by executing command "0install slave 2.11", 0install says that command 'Slave' in unknown. Is this supported on Windows or am i doing something wrong?
Thanks in advance.


--
Best regards

Sanketh P B,


-- 
Best regards

Sanketh P B,
Mob: +91-9740301989



------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev