[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] Opam Docker Permissions Issue?



On Mon, Nov 21, 2016 at 12:34 PM, Anil Madhavapeddy <anil@xxxxxxxxxx> wrote:
>
>> On 9 Nov 2016, at 12:29, Compos Min <composmin@xxxxxxxxxxxx> wrote:
>>
>> Hi Folks,
>> I've been reading about Mirage for quite a while now and would like to start 
>> making
>> some contributions (well as much as somebody that is just learning OCaml).
>>
>> Unfortunately I'm stuck on build problem with the simple Dockerfile listed 
>> on https://github.com/ocaml/opam-dockerfiles.
>>
>> FROM ocaml/opam:ubuntu-15.10_ocaml-4.02.3
>> RUN opam remote add dev git://github.com/mirage/mirage-dev
>> RUN opam depext -i mirage
>>
>> The error output is:
>> Fatal error:
>> # opam-version    1.2.2 (c968888614d3fdbac881d3b7b8ef32ee97839807)
>> # os              linux
>> opam: "open" failed on /home/opam/.opam/log/command-5-5a61c5.out: Permission 
>> denied

I believe this issue is
<https://github.com/docker/docker/issues/27298> and was fixed in
<https://github.com/docker/docker/pull/27705>. The fix will be
included in 1.13 a release candidate of which will be in the next
Docker for Mac beta.

Hope that helps,

David

> Hi Chris,
>
> I've still not fully documented those Dockerfiles are meant to be used as 
> base images, so my apologies for that [1].  I ran through yours and hit a few 
> issues, so I thought it might be useful to list out what I did while 
> debugging it.
>
> - Your Dockerfile uses Ubuntu 15.10 which is no longer maintained, and so the 
> OPAM repository in that image has not been successfully rebuilt since Jun16 
> [2].  This leads to an outdated opam-repository package set.  How did I 
> diagnose this?
>
>   - The symptom of an outdated opam-repository is that "opam depext mirage" 
> installed mirage.2.9.0 despite the mirage-dev remote being available.
>   - I changed the RUN line to "opam depext -ui mirage.dev~mirage" to force it 
> to explicitly install the development version.
>   - This resulted in an OPAM constraint error complaining that "topkg>=0.8.0" 
> was not a valid package.  Since that has been released in the past few 
> months, the missing package indicated that the repository was out of date.
>
> - I changed it to "ocaml/opam:ubuntu-16.04_ocaml-4.02.3" which is the LTS, 
> and reran it. This time the OPAM repository was up-to-date, but the 
> development version of Mirage now requires 4.03.0 and so compilation failed.
>   - Fixing it on 4.02 is fairly low hanging so I submitted a PR [3]
>   - We need to be consistent about our decision on the minimum OCaml version 
> [4]
>
> So recommendations right now for the Dockerfile are:
>
> FROM ocaml/opam:ubuntu-16.04_ocaml-4.03.0
> RUN opam remote add dev git://github.com/mirage/mirage-dev
> RUN cd /home/opam/opam-repository && git pull -u && opam update -uyv
> RUN opam depext -uivy mirage.dev~mirage
>
> This will update the OPAM repository, update the revisions to be the very 
> latest, and verbosely install external dependencies.  I'll work on 
> documenting this properly in [1] for release documentation.
>
> As for your original permissions issue -- I'm not sure :-)  Are you using 
> Docker for Mac by any chance?  That does UID rewriting for shared volumes, 
> but I'm otherwise not sure how root crept in here. Could you try adding a 
> "USER opam" beforehand to make sure this is working ok?
>
> [1] Dockerfile doc tracking issue: https://github.com/mirage/mirage/issues/697
> [2] How do we retire old distributions? 
> https://github.com/ocaml/infrastructure/issues/7
> [3] https://github.com/mirage/mirage/pull/695
> [4] https://github.com/mirage/mirage/issues/696
>
> regards,
> Anil
>
>
> _______________________________________________
> MirageOS-devel mailing list
> MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
> https://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel

_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.