Skip to content
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

Nocrypto freebsd #12252

Merged
merged 1 commit into from
Jun 26, 2018
Merged

Nocrypto freebsd #12252

merged 1 commit into from
Jun 26, 2018

Conversation

hannesm
Copy link
Member

@hannesm hannesm commented Jun 26, 2018

#12062 added various patches for nocrypto to add another runtime dependency due to ppx_sexp_conv 0.11.0.

using a FreeBSD (or OpenBSD) system, this leads to a patched META file which contains the following line:
requires = "cstruct zarith sexplib PPX_SEXP_CONV_RUNTIME", which lets all dependencies fail to link against nocrypto.

this patch marks nocrypto 0.5.4-1 unavailable on these systems. /cc @copy @mseri @hcarty

when manually downloading the tarball from opam.ocaml.org and applying the patches, the following output can be seen (with 0005, the one renaming META to META.in) //cc @AltGr (this is opam 1.2.2 - i guess this can't be easily fixed, but maybe for 2.0)) :

[20:55 hannes@shell:nocrypto.0.5.4-1] patch -p1 < 0005-Auto-detect-ppx_sexp_conv-runtime-library.patch 
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|From 25e1206eb1b173acdfc7312d072e0583327c4ac0 Mon Sep 17 00:00:00 2001
|From: Jeremie Dimino <jeremie@dimino.org>
|Date: Fri, 11 May 2018 15:44:47 +0200
|Subject: [PATCH 5/6] Auto-detect ppx_sexp_conv runtime library
|
|---
| myocamlbuild.ml       | 25 ++++++++++++++++++++++---
| pkg/{META => META.in} |  2 +-
| 2 files changed, 23 insertions(+), 4 deletions(-)
| rename pkg/{META => META.in} (95%)
|
|diff --git a/myocamlbuild.ml b/myocamlbuild.ml
|index 2752315..7b29635 100644
|--- a/myocamlbuild.ml
|+++ b/myocamlbuild.ml
--------------------------
Patching file myocamlbuild.ml using Plan A...
Hunk #1 succeeded at 1.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/pkg/META b/pkg/META.in
|similarity index 95%
|rename from pkg/META
|rename to pkg/META.in
|index a7929c7..0b263d7 100644
|--- a/pkg/META
|+++ b/pkg/META.in
--------------------------
Patching file pkg/META using Plan A...
Hunk #1 succeeded at 1 with fuzz 1.
Hmm...  Ignoring the trailing garbage.
done

[20:56 hannes@shell:nocrypto.0.5.4-1] ls pkg/
pkg:
META       META.orig  pkg.ml*    

[20:55 hannes@shell:nocrypto.0.5.4-1] less pkg/META
version = "0.5.4"
description = "Simple crypto for the modern age"
requires = "cstruct zarith sexplib PPX_SEXP_CONV_RUNTIME"
archive(byte) = "nocrypto.cma"
archive(native) = "nocrypto.cmxa"
plugin(byte) = "nocrypto.cma"
plugin(native) = "nocrypto.cmxs"
xen_linkopts = "-lnocrypto_stubs+mirage-xen"
freestanding_linkopts = "-lnocrypto_stubs+mirage-freestanding"
exists_if = "nocrypto.cma"
..

@hannesm hannesm force-pushed the nocrypto-freebsd branch from 2b9303a to b78b518 Compare June 26, 2018 21:04
@hannesm hannesm force-pushed the nocrypto-freebsd branch from b78b518 to 5d671a7 Compare June 26, 2018 21:06
@camelus
Copy link
Contributor

camelus commented Jun 26, 2018

✅ All lint checks passed 5d671a7
  • These packages passed lint tests: nocrypto.0.5.4-1

✅ Installability check (9031 → 9031)

@mseri
Copy link
Member

mseri commented Jun 26, 2018

Thanks!merged, we should figure out how to fix it and update the patch

@mseri mseri merged commit ec21b93 into ocaml:master Jun 26, 2018
@copy
Copy link
Contributor

copy commented Jun 26, 2018

It looks like the patches contain a rename, which is a git extension that is supported by GNU patch but not by FreeBSD's patch. I'll see if I can produce patches without renames.

In general, opam should probably use git-am to apply patches (related).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants