From ee4adc67d7ada0f50f30233cb75abba99d99ebe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0abata?= Date: Thu, 15 Oct 2020 21:34:01 +0200 Subject: [PATCH] RHEL 9.0.0 Alpha bootstrap The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/ocaml-dune#6f162e464e2afd8775b983ce9185d434f105d8e5 --- .gitignore | 1 + ...697c9f6cd5848d2083faa84836b7dd8fbd4b.patch | 42 ++ README.md | 3 + ocaml-dune.rpmlintrc | 14 + ocaml-dune.spec | 401 ++++++++++++++++++ sources | 1 + 6 files changed, 462 insertions(+) create mode 100644 9749697c9f6cd5848d2083faa84836b7dd8fbd4b.patch create mode 100644 README.md create mode 100644 ocaml-dune.rpmlintrc create mode 100644 ocaml-dune.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..95c76fb 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/dune-*.tar.gz diff --git a/9749697c9f6cd5848d2083faa84836b7dd8fbd4b.patch b/9749697c9f6cd5848d2083faa84836b7dd8fbd4b.patch new file mode 100644 index 0000000..5f3c1df --- /dev/null +++ b/9749697c9f6cd5848d2083faa84836b7dd8fbd4b.patch @@ -0,0 +1,42 @@ +From 8a3d7f2f2015b71384caa07226d1a89dba9d6c25 Mon Sep 17 00:00:00 2001 +From: Mario Rodas +Date: Wed, 2 Sep 2020 20:00:00 -0500 +Subject: [PATCH] src/dune/setup.ml is now src/dune_rules/setup.ml + +src/dune/setup.ml was renamed in bebb7a9432b149fce95ac820757216372afb8f0f + +Signed-off-by: Mario Rodas +--- + Makefile | 2 +- + configure.ml | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 4ae969a9..52d5d20a 100644 +--- a/Makefile ++++ b/Makefile +@@ -103,7 +103,7 @@ clean: $(BIN) + rm -rf _boot dune.exe + + distclean: clean +- rm -f src/dune/setup.ml ++ rm -f src/dune_rules/setup.ml + + doc: + cd doc && sphinx-build . _build +diff --git a/configure.ml b/configure.ml +index f5366f17..c1fe8d30 100644 +--- a/configure.ml ++++ b/configure.ml +@@ -44,7 +44,7 @@ let () = + let anon s = bad "Don't know what to do with %s" s in + Arg.parse (Arg.align args) anon + "Usage: ocaml configure.ml [OPTRIONS]]\nOptions are:"; +- let oc = open_out "src/dune/setup.ml" in ++ let oc = open_out "src/dune_rules/setup.ml" in + let pr fmt = fprintf oc (fmt ^^ "\n") in + pr "let library_path = %s" (option (list string) !library_path); + pr "let library_destdir = %s" (option string !library_destdir); +-- +2.26.2 + diff --git a/README.md b/README.md new file mode 100644 index 0000000..f8ce716 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# ocaml-dune + +The ocaml-dune package \ No newline at end of file diff --git a/ocaml-dune.rpmlintrc b/ocaml-dune.rpmlintrc new file mode 100644 index 0000000..e72af52 --- /dev/null +++ b/ocaml-dune.rpmlintrc @@ -0,0 +1,14 @@ +# THIS FILE IS FOR WHITELISTING RPMLINT ERRORS AND WARNINGS IN TASKOTRON +# https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#Whitelisting_errors + +# The dictionary lacks some technical words +addFilter(r'W: spelling-error .* (composable|flymake)') + +# Caused by ocaml; this package cannot fix it +addFilter(r'ocaml-dune\.[^:]+: E: missing-call-to-chdir-with-chroot') + +# Documentation is in the main package +addFilter(r'ocaml-dune-.*\.[^:]+: W: no-documentation') + +# The configure script is not an autotools-generated script +addFilter(r'ocaml-dune\.spec:[^:]*: W: configure-without-libdir-spec') diff --git a/ocaml-dune.spec b/ocaml-dune.spec new file mode 100644 index 0000000..c87eb20 --- /dev/null +++ b/ocaml-dune.spec @@ -0,0 +1,401 @@ +%global libname dune + +# Since menhir now requires dune to build, but dune needs menhir only for the +# tests, build in bootstrap mode to skip the tests and the need for menhir. +%bcond_without menhir + +Name: ocaml-%{libname} +Version: 2.7.1 +Release: 2%{?dist} +Summary: A composable build system for OCaml + +# Dune itself is MIT. Some bundled libraries have a different license: +# ISC: +# - vendor/cmdliner +# LGPLv2: +# - vendor/incremental-cycles +# LGPLv2 with exceptions: +# - vendor/opam-file-format +# - vendor/re +License: MIT and LGPLv2 and LGPLv2 with exceptions and ISC + +URL: https://dune.build +Source0: https://github.com/ocaml/%{libname}/archive/%{version}/%{libname}-%{version}.tar.gz + +# Fix path to the configuration file +# https://github.com/ocaml/dune/pull/3757 +Patch0: 9749697c9f6cd5848d2083faa84836b7dd8fbd4b.patch + +BuildRequires: emacs +BuildRequires: ocaml >= 4.08 +BuildRequires: ocaml-csexp-devel +BuildRequires: ocaml-findlib +BuildRequires: %{py3_dist sphinx} +BuildRequires: %{py3_dist sphinx-rtd-theme} + +%if %{without menhir} +# Required by tests. +BuildRequires: ocaml-menhir +%endif + +# Dune has vendored deps (ugh): +# I'm not clear on how to unbundle them. +# It seems to be unsupported upstream; the bootstrap process for dune +# doesn't seem to be able to detect libraries installed systemwide. +# https://github.com/ocaml/dune/issues/220 +Provides: bundled(ocaml-build-path-prefix-map) = 0.2 +Provides: bundled(ocaml-opam-file-format) = 2.0.0 +Provides: bundled(ocaml-cmdliner) = 1.0.3 +Provides: bundled(ocaml-re) = 1.7.1 + +Provides: dune = %{version}-%{release} + +Provides: jbuilder = %{version}-%{release} +Obsoletes: jbuilder < 1.0.1-3 + +%description +Dune is a build system designed for OCaml/Reason projects only. It focuses +on providing the user with a consistent experience and takes care of most of +the low-level details of OCaml compilation. All you have to do is provide a +description of your project and Dune will do the rest. + +The scheme it implements is inspired from the one used inside Jane Street and +adapted to the open source world. It has matured over a long time and is used +daily by hundred of developers, which means that it is highly tested and +productive. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?isa} = %{version}-%{release} +Requires: ocaml-csexp-devel%{?_isa} + +%description devel +The %{name}-devel package contains libraries and +signature files for developing applications that use %{name}. + +%package doc +Summary: HTML documentation for %{name} +Requires: %{name} = %{version}-%{release} + +BuildArch: noarch + +%description doc +HTML documentation for dune, a composable build system for OCaml. + +%package emacs +Summary: Emacs support for %{name} +License: ISC +Requires: %{name} = %{version}-%{release} + +BuildArch: noarch + +%description emacs +The %{name}-devel package contains Emacs integration with the dune build +system, a mode to edit dune files, and flymake support for dune files. + +%prep +%autosetup -n %{libname}-%{version} -p1 + +%build +./configure --libdir %{_libdir}/ocaml --mandir %{_mandir} + +# This command fails, because ppx_bench, ppx_expect, and core_bench are missing. +# However, it is only tests that fail, not the actual build, so ignore the +# failures and continue. +%make_build release || : +./dune.exe build @install +%make_build doc + +# Relink the stublib. See https://github.com/ocaml/dune/issues/2977. +cd _build/default/src/stdune +ocamlmklib -g -ldopt "$RPM_LD_FLAGS" -o stdune_stubs fcntl_stubs.o +cd - + +%install +# "make install" only installs the binary. We want the libraries, too. +./dune.exe install --destdir %{buildroot} + +%ifarch %{ocaml_native_compiler} +# Add missing executable bits +find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod 0755 {} \+ +%endif + +# Byte compile the Emacs files +cd %{buildroot}%{_emacs_sitelispdir} +%_emacs_bytecompile dune.el dune-flymake.el +cd - + +# Install documentation by way of pkgdocdir. +rm -fr %{buildroot}%{_prefix}/doc +mkdir -p %{buildroot}%{_pkgdocdir}/ +cp -ar README.md CHANGES.md MIGRATION.md doc/_build/* %{buildroot}%{_pkgdocdir}/ + +%if %{without menhir} +%check +# These are the only tests we can run. The others require components that +# either depend on dune themselves or are not available in Fedora at all. +%{buildroot}%{_bindir}/dune runtest test/unit-tests +%endif + +%files +%license LICENSE.md +%doc %{_pkgdocdir}/README.md +%doc %{_pkgdocdir}/CHANGES.md +%doc %{_pkgdocdir}/MIGRATION.md +%{_bindir}/dune +%{_mandir}/man*/dune* +%dir %{_pkgdocdir}/ +%dir %{_libdir}/ocaml/dune/ +%dir %{_libdir}/ocaml/dune-action-plugin/ +%dir %{_libdir}/ocaml/dune-build-info/ +%dir %{_libdir}/ocaml/dune-configurator/ +%dir %{_libdir}/ocaml/dune-glob/ +%dir %{_libdir}/ocaml/dune-private-libs/ +%dir %{_libdir}/ocaml/dune-private-libs/dune-lang/ +%dir %{_libdir}/ocaml/dune-private-libs/dune_re/ +%dir %{_libdir}/ocaml/dune-private-libs/ocaml-config/ +%dir %{_libdir}/ocaml/dune-private-libs/stdune/ +%{_libdir}/ocaml/dune*/META +%{_libdir}/ocaml/dune*/*.cma +%{_libdir}/ocaml/dune*/*.cmi +%{_libdir}/ocaml/dune-configurator/.private/ +%{_libdir}/ocaml/dune-private-libs/*/*.cma +%{_libdir}/ocaml/dune-private-libs/*/*.cmi +%ifarch %{ocaml_native_compiler} +%{_libdir}/ocaml/dune*/*.cmxs +%{_libdir}/ocaml/dune-private-libs/*/*.cmxs +%{_libdir}/ocaml/stublibs/dllstdune_stubs.so +%endif + +%files devel +%{_libdir}/ocaml/dune*/dune-package +%{_libdir}/ocaml/dune*/opam +%{_libdir}/ocaml/dune*/*.cmt +%{_libdir}/ocaml/dune*/*.cmti +%{_libdir}/ocaml/dune*/*.ml +%{_libdir}/ocaml/dune*/*.mli +%{_libdir}/ocaml/dune-private-libs/*/*.cmt +%{_libdir}/ocaml/dune-private-libs/*/*.cmti +%{_libdir}/ocaml/dune-private-libs/*/*.ml +%{_libdir}/ocaml/dune-private-libs/*/*.mli +%ifarch %{ocaml_native_compiler} +%{_libdir}/ocaml/dune*/*.a +%{_libdir}/ocaml/dune*/*.cmx +%{_libdir}/ocaml/dune*/*.cmxa +%{_libdir}/ocaml/dune-private-libs/*/*.a +%{_libdir}/ocaml/dune-private-libs/*/*.cmx +%{_libdir}/ocaml/dune-private-libs/*/*.cmxa +%endif + +%files doc +%exclude %{_pkgdocdir}/README.md +%exclude %{_pkgdocdir}/CHANGES.md +%doc %{_pkgdocdir}/* + +%files emacs +%{_emacs_sitelispdir}/dune* + +%changelog +* Fri Sep 18 2020 Jerry James - 2.7.1-2 +- Add ocaml-csexp-devel R to the -devel subpackage + +* Mon Sep 14 2020 Jerry James - 2.7.1-1 +- Version 2.7.1 +- Csexp is no longer vendored in +- Drop upstreamed patches for issue 3736 and pull request 3739 +- Fix configuration with patch from pull request 3757 + +* Tue Sep 01 2020 Richard W.M. Jones - 2.7.0-6 +- OCaml 4.11.1 rebuild + +* Mon Aug 24 2020 Richard W.M. Jones - 2.7.0-5 +- Add fix for https://github.com/ocaml/dune/issues/3736 + +* Fri Aug 21 2020 Richard W.M. Jones - 2.7.0-2 +- OCaml 4.11.0 rebuild + +* Fri Aug 14 2020 Jerry James - 2.7.0-1 +- Version 2.7.0 +- Drop upstreamed patch for issue 3671 + +* Tue Aug 4 2020 Richard W.M. Jones - 2.6.2-2 +- Pass -g option when compiling ppx extensions. + https://github.com/ocaml/dune/pull/3671 + +* Mon Aug 3 2020 Jerry James - 2.6.2-1 +- New version 2.6.2 + +* Tue Jul 28 2020 Fedora Release Engineering - 2.6.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Thu Jul 2 2020 Jerry James - 2.6.1-1 +- New version 2.6.1 + +* Sat Jun 6 2020 Jerry James - 2.6.0-1 +- New version 2.6.0 + +* Mon May 04 2020 Richard W.M. Jones - 2.5.1-4 +- OCaml 4.11.0+dev2-2020-04-22 rebuild + +* Tue Apr 21 2020 Richard W.M. Jones - 2.5.1-3 +- OCaml 4.11.0 pre-release attempt 2 +- Rename cond "bootstrap" as "menhir". + +* Sun Apr 19 2020 Jerry James - 2.5.1-1 +- New version 2.5.1 + +* Sat Apr 18 2020 Richard W.M. Jones - 2.5.0-5 +- Bump release and rebuild. + +* Sat Apr 18 2020 Richard W.M. Jones - 2.5.0-4 +- Bump release and rebuild. + +* Fri Apr 17 2020 Richard W.M. Jones - 2.5.0-3 +- Bump release and rebuild. + +* Fri Apr 17 2020 Richard W.M. Jones - 2.5.0-2 +- OCaml 4.11.0 pre-release + +* Fri Apr 10 2020 Jerry James - 2.5.0-1 +- Version 2.5.0 + +* Thu Apr 02 2020 Richard W.M. Jones - 2.4.0-2 +- Update all OCaml dependencies for RPM 4.16. + +* Fri Mar 6 2020 Jerry James - 2.4.0-1 +- New version 2.4.0 +- Add bootstrap conditional for builds without ocaml-menhir + +* Wed Feb 26 2020 Richard W.M. Jones - 2.3.1-2 +- OCaml 4.10.0 final. + +* Thu Feb 20 2020 Jerry James - 2.3.1-1 +- New version 2.3.1 (bz 1805578) + +* Tue Feb 18 2020 Jerry James - 2.3.0-1 +- New version 2.3.0 (bz 1803374) + +* Fri Feb 7 2020 Jerry James - 2.2.0-1 +- New version 2.2.0 (bz 1742638) + +* Wed Jan 29 2020 Fedora Release Engineering - 2.1.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Sun Jan 19 2020 Richard W.M. Jones - 2.1.2-2 +- OCaml 4.10.0+beta1 rebuild. + +* Fri Jan 10 2020 Ben Rosser - 2.1.2-1 +- Update to latest upstream release, 2.1.2. +- Remove doc patches (as they were accepted upstream). + +* Sat Jan 4 2020 Jerry James - 2.1.0-1 +- New version 2.1.0 (bz 1742638) +- Invoke the configure script (bz 1740196) +- Add LGPLv2 to License due to incremental-cycles +- Add -emacs subpackage and byte compile the Emacs Lisp files +- Drop upstreamed 15c04b09a8c06871635d5fd98c3a37089bbde6d9.patch +- Add -doc-emphasis and -doc-scheme patches +- Run the unit tests in %%check + +* Fri Dec 06 2019 Richard W.M. Jones - 1.11.0-4 +- OCaml 4.09.0 (final) rebuild. + +* Fri Aug 16 2019 Richard W.M. Jones - 1.11.0-3 +- OCaml 4.08.1 (final) rebuild. + +* Fri Aug 09 2019 Richard W.M. Jones - 1.11.0-2 +- Work around nodynlink issue on armv7. + https://github.com/ocaml/dune/issues/2527 + +* Thu Aug 08 2019 Richard W.M. Jones - 1.11.0-1 +- New version 1.11.0 (also required for camomile 1.0.2). + +* Tue Aug 06 2019 Ben Rosser - 1.10.0-5 +- Install dune libraries. Add new ocaml-dune subpackage (rhbz#1737414). + +* Wed Jul 31 2019 Richard W.M. Jones - 1.10.0-4 +- OCaml 4.08.1 (rc2) rebuild. + +* Thu Jul 25 2019 Fedora Release Engineering - 1.10.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu Jun 27 2019 Richard W.M. Jones - 1.10.0-2 +- OCaml 4.08.0 (final) rebuild. + +* Sun Jun 16 2019 Andy Li - 1.10.0-1 +- Updated to latest upstream release (#1715394). + +* Thu May 16 2019 Andy Li - 1.9.3-1 +- Updated to latest upstream release (#1705660). + +* Tue Apr 30 2019 Richard W.M. Jones - 1.9.1-2 +- OCaml 4.08.0 (beta 3) rebuild. + +* Thu Apr 11 2019 Andy Li - 1.9.1-1 +- Updated to latest upstream release (#1698732). + +* Wed Apr 10 2019 Andy Li - 1.9.0-1 +- Updated to latest upstream release (#1698022). + +* Wed Mar 13 2019 Andy Li - 1.8.2-1 +- Updated to latest upstream release (#1686836). +- Add missing dependency on sphinx_rtd_theme. + +* Fri Mar 08 2019 Andy Li - 1.8.0-1 +- Updated to latest upstream release (#1686466). + +* Fri Mar 01 2019 Andy Li - 1.7.3-1 +- Renamed source package from jbuilder to ocaml-dune. +- Updated URLs and license according to upstream changes. +- Updated to latest upstream release (#1600105). +- Removed 1113.patch which has been applied upstream in eariler version. +- Removed rpm check section since the upstream tests depend on opam. + +* Fri Feb 01 2019 Fedora Release Engineering - 1.0.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Tue Aug 07 2018 Ben Rosser - 1.0.1-1 +- Updated to latest upstream release. +- Manpages have been renamed to 'dune'. A 'dune' binary is now provided as well. + +* Fri Jul 13 2018 Fedora Release Engineering - 1.0-0.12.beta20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed May 02 2018 Ben Rosser - 1.0-0.11.beta20 +- Updated to latest upstream release (#1537836). + +* Tue Mar 06 2018 Ben Rosser - 1.0-0.10.beta18 +- Updated to latest upstream release (#1537836). + +* Mon Feb 12 2018 Ben Rosser - 1.0-0.9.beta17 +- Update to upstream re-release of beta 17. + +* Wed Feb 07 2018 Fedora Release Engineering - 1.0-0.8.beta17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Tue Jan 30 2018 Ben Rosser - 1.0-0.7.beta18 +- Fix build failure on ppc64 by always using bytecode ocaml compiler to bootstrap. + +* Wed Jan 24 2018 Ben Rosser 1.0-0.6.beta17 +- Update to latest upstream release, beta17 (#1537836). +- Remove unit tests that require external deps (that themselves require jbuilder). + +* Tue Nov 14 2017 Ben Rosser 1.0-0.5.beta16 +- Update to latest upstream release, beta16 (#1509749). +- Add pre_tag version suffix to source flie name to avoid confusion. + +* Mon Oct 23 2017 Ben Rosser 1.0-0.4.beta14 +- Update to latest upstream release, beta14 (#1504414). + +* Mon Aug 28 2017 Ben Rosser 1.0-0.3.beta12 +- Update to latest upstream release, beta12. +- Fix typo in description. +- Use simpler github source URL. +- Use make_build macros when compiling. + +* Tue Aug 15 2017 Ben Rosser 1.0-0.2.beta11 +- Update to a git snapshot so opam can be built against. +- Modernize ocaml packaging. + +* Tue Aug 1 2017 Ben Rosser 1.0-0.1.beta11 +- Initial package. diff --git a/sources b/sources new file mode 100644 index 0000000..59bcf76 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (dune-2.7.1.tar.gz) = b77d0e207263107365e5a6e94423e8ab4ddbab1f920872d915e4014b7cc69915274b53fe946bb4b29dfe3de2bf5573ab3b2bffb4db8eb50b472e7dfb6cab88b7