Conversation
|
Detection maybe makes a little more sense now: The seeding package is pulled in iff any package needs (or is) The seeding library and the starting trigger are pulled in iff any library needs (or is) |
this makes sense, these will be replaced by a proper HTTPs combinator later. Regarding the patch: the only point which is not totally clear by reading the patch is when the call to I'll try to play with the patches tomorrow. |
|
First the presence of a package is detected through So I think you are right: On a clean installation, if a user declares If the opam succeeded, the call to If there is a way to make opam install Otherwise, yes, this is incorrect and the package detection might have to go via opam. Can we just ask it for immediate deps? |
|
Continuing the discussion of mirleft/ocaml-nocrypto#56 (comment) here to centralise stuff.
I don't really like the double compilation scheme, and this won't work very well with the current mirage tool implementation (could be changed though, but I'll try to minimise build time as much as possible). I think the simpler and not too hacki-ish solution is to always install |
|
The only problem with that scheme is that if the user:
but I think it's fine if it is properly documented and if the mirage tool warns the user that using |
|
I'm fine with that. mirage-entropy-xen is also rather lightweight and thus shouldn't harm too much to have compiled whenever someone chooses mirage on xen... |
Agreed. Some comments in the tool referencing why it's included by default (and possibly referencing this PR) would help us remember this whole discussion. |
|
An other approach is to add a virtual Would be better if it is tracked directly by opam though, pinging @AltGr to comment about the possibility of having ocaml/opam#2074 (comment) in opam 1.2.2 ... |
|
I was also toying with the idea of just unconditionally installing This is what the patch now does. Glad to squash the commits if your prefer that. |
|
Looks good to me. If we want to be extra careful we can also verify that the ocamlfind libraries that we are requiring are correctly installed on the system and if not print a warning about potentially missing initialisation function. Not sure it will happen in practice, but as we are providing the |
|
How would you add that? I'm a little reluctant to add early exits to functions that look like they are computing extra deps.. |
lib/mirage.ml
Outdated
There was a problem hiding this comment.
This could be let to_list = elements.
There was a problem hiding this comment.
Actually it doesn't seem to be used by the PR (also my suggestion would be in fact the reverse of the current to_list).
There was a problem hiding this comment.
Forgot about it, thanks!
|
I'd do it at the end of the configuration phase, before emitting the preamble code. |
|
Updated. Can still squash the commits. |
There was a problem hiding this comment.
should we be explicit about the version? (such as >=0.3.0)!? previous mirage-entropy-xen will not work...
There was a problem hiding this comment.
The idea was to handle that via opam in nocrypto?
There was a problem hiding this comment.
putting the constraint in nocrypto should be fine.
lib/mirage_version.ml
Outdated
|
Looks good to me. Ready to merge and release when the rest of libraries are ready. |
|
since we will have |
|
@samoht The rest has been merged and tagged, with a PR waiting in |
ENTROPYinterface.TLS_over_conduitthat depended on it.nocryptois found in the set of transitive dependencies, they are extended with its appropriate seeding module and the seeding process is triggered just before the application-side of the unikernel runs.I apologise for simply deleting tls+conduit, wasn't sure what to do with it. In general, anything that depends on
tlsshould just work now, so it should be a breeze to re-add.The detection code is horribly wonky. Since there is no clearly defined point when the variables
psandlsare consumed, and to avoid runningocamlfindseveral times, it uses a side-effect and a fragile assumption about the ordering of calls topackagesandlibraries. I could not figure out a non-intrusive way to extend the tool and make this clean at the same time.Another problem is in the detection logic: it scans for
nocryptoonly in the set of (opam-level) packages depended on, not in the set of (ocamlfind-level) libraries. The detection will fail if someone has, say,tlsinstalled and wants to use it, but forgets toadd_to_opam_packagesit. I wasn't sure what exactly to do here -- feedback appreciated.(Needed for this.)