[RFC] No opam, constrain package versions in unikernels#691
[RFC] No opam, constrain package versions in unikernels#691hannesm wants to merge 3 commits intomirage:masterfrom
Conversation
|
there's some stuff which now needs (in contrast to what I thought in #627) to be delayed until build time, such as nocrypto check (NB: the only user of OCamlfind.query/installed from Functoria, which can thus go away as well -- shouldn't be a concern to functoria)... at configuration time we cannot promise that all dependent packages are installed (thus calling out to ocamlfind is not very robust). I'd suggest to leave the fat and crunch at the configuration step for now (requires the user to have crunch/fat around when configuring the unikernel). This has at least the property that there are not more source files generated at build time (and mirage really needs to run only once). But stuff like pkg-config should be defered to later (into the makefile for when build is called). also, the depend target should be updated to do sth along the lines |
|
Version constraints of a unikernel: mirage configure emits automatically constraints into the opam file for If you like, you can also specify constraints in your very own Thus, Maybe |
|
First off, this is excellent and I really appreciate this PR. Thank you very much for putting this (very badly needed) set of patches together! I think there's some room for improvement in the user experience, though. On a fresh switch: I get a The automatic upper bound interacts poorly with pins that specify a high package number (coincidentally, anything pinned in a switch that knows about Basic
|
|
The pb with crunch/fat is that it is actually a configuration that you want to make available at deployment time (e.g. if you want to embed some secrets). So it makes sense that they don't fit very well in the refactoring, as we used to put together stuff which were supposed to happen a configuration/build/deployment time. Not sure how to solve that properly, maybe we need to had an other stage in the compilation pipeline, but we can see later. The current simplification is way better than it was before ;-) Maybe just generate the scripts to generate the fat/crunch images so that they can be run later? |
|
@yomimono thanks for your feedback. sorry for pushing an unfinished changeset which doesn't completely work yet (and all I tested was
|
|
I updated this PR:
This works pretty much for me. I don't have any clue whether something (and what and how) is supposed to call @yomimono if you have time and energy, this should be much smoother for testing. With BSD make, the |
|
and this lets me run |
| R.ok () | ||
|
|
||
| let unikernel_name target name = | ||
| let target = Fmt.strf "%a" Key.pp_target target in |
| (* XXX: use %%VERSION_NUM%% here instead of hardcoding a version? *) | ||
| package "lwt"; | ||
| package ~ocamlfind:[] "mirage-types-lwt"; | ||
| package ~sublibs:["lwt"] ~min:"3.0.0" "mirage-types"; |
There was a problem hiding this comment.
Both mirage-types-lwt and mirages-types.lwt ?
There was a problem hiding this comment.
yes. no. soon to be changed... atm there is mirage-types which provides V1 and V1_LWT in its lwt subpackage, and mirage-types-lwt is a virtual package which gathers all deps to get mirage-types.lwt. pretty insane atm, should be better soon...
|
The opam file generation should be in functoria directly. It's not mirage specific and it's not doing any extra work.
Yes++. You have all my support on that one. :D |
|
the ocamlfind code from functoria is already removed in functoria's PR... |
|
I don't know when to merge (rough times ahead), an example unikernel over at logs-syslog works https://travis-ci.org/hannesm/logs-syslog/jobs/177822764 ci-script: https://github.com/hannesm/logs-syslog/blob/dev/.travis-test.sh (basically unfortunately I won't be able to spend much time on this in the upcoming weeks, so please go ahead and do what is good. |
- instead of lists of packages and libraries, use lists of packages
|
There's a full travis build at https://travis-ci.org/hannesm/mirage-dev/builds/177981102 which has some changes:
Unix/Xen/virtio works fine, ~~~ukvm does not~~~ ukvm as well with additional patches good to go from my point of view! |
…to allow make depend without ukvm-configure)
|
update: travis is happy, see comment above |
|
I probably don't have time to review this properly today but I'm very excited to see it. Thanks a ton for this, @hannesm! :D |
|
Same here, this is great but still need to test and review it fully. Hopefully tomorrow, fingers crossed. Thanks @hannesm! |
|
Initial comments from a first try of this, using
which IMO makes it much harder to understand what is going on. |
|
thanks for testing and your feedback, @mato
but trying 3) out, it is unclear to me whether a second make in a ukvm target works atm. it does not really look like... FWIW removal of |
|
superseeded by #703 |
see mirage/functoria#82 ... very much WIP (but compiles + runs :)