-
Notifications
You must be signed in to change notification settings - Fork 32
Add an opatch command and use it instead of git apply
#154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Concerning the license, |
|
there's nothing against a binary (opatch) beimg part of the patch library. I thought there already is such a binary in the repository https://github.com/hannesm/patch/blob/main/src/patch_command.ml (but i don't know whether that's sufficient or what are @kit-ty-kate nice enhancements in opam (and/or here)). :) |
@hannesm: IIUC, that binary is very limited (patching exactly one file, in particular), to run some tests only.
@kit-ty-kate: so ISC would suit you (they seem fairly close to my non-lawyer eyes)? (I have a series of improvements in mind for |
yes |
|
The new version is here: hannesm/patch#35 |
|
opatch is released now, would you mind to finish this PR and add the opatch dependency? thanks |
Regenerate the patch series for OCaml 5.3.0 with: ``` git format-patch --no-binary --text ... ``` so that the modifications to `configure` use a plain text diff
|
I’ve updated this PR with the released |
|
@shym that's too bad. I can see some ways forward:
|
|
All 3 seems good to me! Option 1 could be used only as a last resort, if both other options get stuck for long and we really want that fix in a new OCaml/Solo5, I’d say. |
|
@shym great. To move forward with option 2, a review (+ testing) of that PR would be very welcome. |
|
We're close, there's now a fresh release ocaml/opam-repository#28854 |
|
Does opatch really need to be in the same repository as |
I honestly don't care much. If someone cares, please create a new repository and extract opatch, cut a release, and send a PR to the patch repository to remove opatch. |
Neither do I. I had exposed which pros I saw for the using just one repo in the PR, and I still think those are valid reasons, though. |
|
I marked this PR as ready: now that |
|
If everyone is happy with this PR, I'm ok to merge it. @hannesm, WDYT? |
|
thanks for your work. |
* Support OCaml 5.4.0 (@shym mirage/ocaml-solo5#155) * Add test of (host) ocaml-installed fmt in one example (@dinosaure mirage/ocaml-solo5#155) * Use plain text diffs, use opatch instead of git apply (@shym @dinosaure @hannesm mirage/ocaml-solo5#154) * Cleanup opam package dependencies (@shym mirage/ocaml-solo5#156)
This PR is a draft, in the sense that it’s probably not meant to be merged as is, as it is more of a prototype than a finished version. But it would address #151.
This PR adds an
opatchcommand that uses thepatchlibrary and is largely extracted from opam (so kudos to the original authors there!). I think it is of more general use than justocaml-solo5(at leastocaml-unikraftis of interest here :-)) so it might be nice to push it into another repository, maybepatchitself if the command is good enough. I’ve cut a few corners as not everything was actually useful for our use case (in particular to delete directories that end up empty after patching).As half of
opatchis extracted from opam, it inherits its LGPL license; if we want to relicense it under ISC likepatch, we would need the original authors’ agreement (applyis mostly @kit-ty-kate’s code, if I’m not mistaken;realpathhas more history) or rewrite them.