diff --git a/ocaml-cmxs.diff b/ocaml-cmxs.diff new file mode 100644 index 0000000..eb8926d --- /dev/null +++ b/ocaml-cmxs.diff @@ -0,0 +1,46 @@ +Update OCaml requires/provides to ignore cmxs + +OCaml cmxs files are static libraries, which can be loaded at runtime +via the Dynlink module. They apparently do not provide any useful +runtime dependency information to be stored into the packages +Provides/Requires list. Therefore just skip them. + +Adjust attr, remove extension and ELF magic +Adjust ocamldeps, do nothing with cmxs files. + +Fixes: a6fe37c39b39acbcbd014dd1e6d5653ff84254a1 + +Signed-off-by: Olaf Hering + +--- ./fileattrs/ocaml.attr.orig 2021-06-21 12:00:44.587611741 +0000 ++++ ./fileattrs/ocaml.attr 2021-12-22 13:54:20.384959876 +0000 +@@ -1,5 +1,5 @@ + %__ocaml_provides %{_rpmconfigdir}/ocamldeps.sh --provides + %__ocaml_requires %{_rpmconfigdir}/ocamldeps.sh --requires +-%__ocaml_magic ^(ELF|Objective caml|OCaml) .*$ +-%__ocaml_path .(cma|cmi|cmo|cmx|cmxa|cmxs)$ ++%__ocaml_magic ^(Objective caml|OCaml) .*$ ++%__ocaml_path .(cma|cmi|cmo|cmx|cmxa)$ + %__ocaml_flags magic_and_path +--- ./scripts/ocamldeps.sh.orig 2021-06-21 12:00:44.650612737 +0000 ++++ ./scripts/ocamldeps.sh 2021-12-22 13:54:20.384959876 +0000 +@@ -32,6 +32,10 @@ + # Implementations imported: + # HASH NAME_FROM_OTHER_MODULE + # ++# cmxs files are recoqnized, but need to be ignored. ++# They contain references of the interfaces and implementations ++# compiled into them. ++# + # The hash may contain just '-', in which case it is ignored. + # + # Output: +@@ -236,7 +240,7 @@ do + *.cmo) parse "${filename}" ;; + *.cmx) parse "${filename}" ;; + *.cmxa) parse "${filename}" ;; +- *.cmxs) parse "${filename}" ;; ++ *.cmxs) ;; + *) continue ;; + esac + done diff --git a/rpm.changes b/rpm.changes index 1b8734e..3c2d707 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Dec 22 14:57:27 CET 2021 - olaf@aepfle.de + +- Update OCaml requires/provides generators to ignore cmxs + new patch: ocaml-cmxs.diff + ------------------------------------------------------------------- Thu Oct 14 18:16:22 CEST 2021 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index 2d18fe5..8372ba5 100644 --- a/rpm.spec +++ b/rpm.spec @@ -117,6 +117,7 @@ Patch131: posttrans.diff Patch132: verbosearg.diff Patch133: zstdpool.diff Patch134: zstdthreaded.diff +Patch135: ocaml-cmxs.diff Patch200: finddebuginfo.diff Patch201: finddebuginfo-absolute-links.diff Patch202: debugsubpkg.diff @@ -245,6 +246,7 @@ rm -rf sqlite %patch -P 100 -P 102 -P 103 %patch -P 117 %patch -P 122 -P 123 -P 131 -P 132 -P 133 -P 134 +%patch -P 135 # debugedit patches pushd debugedit-5.0