Re: Update Hombrew install instructions on the web site

Thomas Leonard <[email protected]>
Newsgroups gmane.comp.file-systems.zero-install.devel
Message-ID <CAG4opy9Udev9FVjzgDSeUTyb1+4m+zrpZBtbU6Lsy9Aj4KRXJw@mail.gmail.com>
On 1 August 2015 at 12:38, Anders F Björklund <[email protected]> wrote:
> Thomas Leonard wrote:
>
>>> I have updated the home page now: http://0install.net/install-osx.html
>>> Removed the references to the rejected formula and any future bottle.
>>
>> Looks like the recent sf.net storage issue lost these changes from the
>> live site. The shell just came back, so I've pushed your updates
>> again.
>
> Thank you!
>
> Haven't received _any_ feedback on it, so I'm assuming it's alright.
> Then again I thought the previous version was pretty decent already :-)
>
>>> Also modernized a bit, and added a "short version" for the impatient...
>>> (it is also quite faster, since using /usr/local enables prebuilt binaries)
>
> Apparently, to get 0install included as a bottle in homebrew
> we need to also include all the OPAM dependencies explicitly:
> (wonder if you can get opam to do this, with a small helper ?
> i.e. output all the URLs and SHAs, for the required +opam.tar.gz)
>
> https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md#specifying-gems-python-modules-go-projects-etc-as-dependencies
>
> https://github.com/Homebrew/homebrew/blob/master/Library/Formula/opam.rb

This might be quite easy, actually. You can clone the opam repository
(which just has the metadata) and then add it as a local repository to
opam. e.g.

git clone https://github.com/ocaml/opam-repository
opam remote add my-copy opam-repository

Then it will get the URLs and MD5 (!) hashes from that. If you can't
use opam, the data you need is in the "url" files. e.g.

$ cat opam-repository/packages/lwt/lwt.2.4.7/url
archive: "https://github.com/ocsigen/lwt/archive/2.4.7.tar.gz"
checksum: "c837ccc92a08b71a86a83d96c55e986f"

Of course, you'll want to delete all the unused packages and
versions... not sure if there's an easy way to do that.

> This means that we cannot just depend on the top OPAM modules,
> but need to resolve and provide every dependency explicitly. :-(
> Homebrew also doesn't handle dependencies and options very well,
> so we should make the GUI default (in order to ever get it built)
>
> And it seems like our Makefile doesn't support using a #{prefix} ?
> I just replaced the local section under /usr/local to make it work.
> And it crashed if doing "make install" without doing a "make" first...
> But other than these issues, the 0install formula seems to be working:
>
> https://github.com/afb/homebrew/blob/0install/Library/Formula/zero-install.rb
>
>   def install
>     system "make"
>     inreplace 'dist/install.sh', '"/usr/local"', prefix
>     inreplace 'dist/install.sh', '"${PREFIX}/man"', man
>     system "make", "install"
>   end
>
> Preferably this should be just `make install` with some ./configure ?
> The split installation between prefix and HOMEBREW_PREFIX is an issue.
>
> We would want Zero Install to go into Cellar/0install/2.8, but it should
> use the "regular" directories (well, global anyway) for #{etc} and #{var}.
>
> https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md#variables-for-directory-locations
>
> Then bin, man and lib are then symlinked from the Cellar into the prefix.
> Many software installations are confused by the concept of two prefixes...
>
> --anders
>
>
> PS.
> If you want to, you can also play with the formula using Linuxbrew:
> (maybe not so much for installing, but to help with OS X packaging)
>
> http://brew.sh/linuxbrew/
>
> At least this is easier than building OCaml/OPAM/GnuPG/GTK+ myself.
> Only downside is that it doesn't support older releases (like 10.6).
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Zero-install-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/zero-install-devel



-- 
Dr Thomas Leonard        http://roscidus.com/blog/
GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA

------------------------------------------------------------------------------
_______________________________________________
Zero-install-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/zero-install-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.