diff --git a/.gitignore b/.gitignore index 633bb71..9e37fe9 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,11 @@ findlib-1.2.5.tar.gz /findlib-1.7.3.tar.gz /findlib-1.8.0.tar.gz /findlib-1.8.1.tar.gz +/findlib-1.9.tar.gz +/findlib-1.9.1.tar.gz +/findlib-1.9.2.tar.gz +/findlib-1.9.3.tar.gz +/findlib-1.9.4.tar.gz +/findlib-1.9.5.tar.gz +/findlib-1.9.6.tar.gz +/findlib-1.9.8.tar.gz diff --git a/gating.yaml b/gating.yaml new file mode 100755 index 0000000..2c7ed80 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-* +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/ocaml-findlib-toolbox.patch b/ocaml-findlib-toolbox.patch new file mode 100644 index 0000000..76f762d --- /dev/null +++ b/ocaml-findlib-toolbox.patch @@ -0,0 +1,117 @@ +--- findlib-1.9.6/src/findlib-toolbox/Makefile.orig 2022-09-24 09:13:16.000000000 -0600 ++++ findlib-1.9.6/src/findlib-toolbox/Makefile 2023-06-16 08:46:01.965686356 -0600 +@@ -9,7 +9,7 @@ opt: + true + + make_wizard$(EXEC_SUFFIX): make_wizard.ml +- ocamlc -o make_wizard$(EXEC_SUFFIX) -I +unix -I +labltk -I ../findlib \ ++ ocamlc -o make_wizard$(EXEC_SUFFIX) -I +str -I +unix -I +labltk -I ../findlib \ + unix.cma str.cma labltk.cma findlib.cma make_wizard.ml + + install: +--- findlib-1.9.6/src/findlib-toolbox/make_wizard.ml.orig 2022-09-24 09:13:16.000000000 -0600 ++++ findlib-1.9.6/src/findlib-toolbox/make_wizard.ml 2023-06-16 08:50:49.066603769 -0600 +@@ -468,23 +468,23 @@ let makemake() = + mkquote(metaquote !wiz_package_description); + "byte_objects", + String.concat " " (List.map +- (fun m -> String.uncapitalize m ^ ".cmo") ++ (fun m -> String.uncapitalize_ascii m ^ ".cmo") + !wiz_objects); + "nat_objects", + String.concat " " (List.map +- (fun m -> String.uncapitalize m ^ ".cmx") ++ (fun m -> String.uncapitalize_ascii m ^ ".cmx") + !wiz_objects); + "byte_executables", + String.concat " " byte_execs; + "byte_exec_objects", + String.concat " " (List.map +- (fun m -> String.uncapitalize m ^ ".cmo") ++ (fun m -> String.uncapitalize_ascii m ^ ".cmo") + byte_exec_modules); + "nat_executables", + String.concat " " nat_execs; + "nat_exec_objects", + String.concat " " (List.map +- (fun m -> String.uncapitalize m ^ ".cmx") ++ (fun m -> String.uncapitalize_ascii m ^ ".cmx") + nat_exec_modules); + "prereqs", + String.concat " " required_packages; +@@ -526,7 +526,7 @@ let makemake() = + let deptargets = + String.concat " " (List.map + (fun m -> +- let m' = String.uncapitalize m in ++ let m' = String.uncapitalize_ascii m in + m' ^ ".ml " ^ m' ^ ".mli") + !modlist) in + write "makemake_exec" ( [ "switches", switches; +@@ -543,7 +543,7 @@ let makemake() = + if is_byte_exec execname then begin + let execobjs = + String.concat " " (List.map +- (fun m -> String.uncapitalize m ^ ".cmo") ++ (fun m -> String.uncapitalize_ascii m ^ ".cmo") + !modlist) in + write "byte_exec" ( ["execname", execname; + "execobjs", execobjs ] @ variables ) +@@ -555,7 +555,7 @@ let makemake() = + if not (is_byte_exec execname) then begin + let execobjs = + String.concat " " (List.map +- (fun m -> String.uncapitalize m ^ ".cmx") ++ (fun m -> String.uncapitalize_ascii m ^ ".cmx") + !modlist) in + write "nat_exec" ( ["execname", execname; + "execobjs", execobjs ] @ variables ) +@@ -1090,7 +1090,7 @@ let pkginfo lb row = (* when the user r + let files = Array.to_list(Sys.readdir dir) in + List.map + (fun name -> +- String.capitalize (Filename.chop_suffix name ".cmi")) ++ String.capitalize_ascii (Filename.chop_suffix name ".cmi")) + (List.filter + (fun name -> + Filename.check_suffix name ".cmi") +@@ -1128,7 +1128,7 @@ let preprocessor_scan_extensions() = + not (List.mem pkg plist) + ) + !wiz_camlp4_selected in +- List.sort Pervasives.compare (plist @ plist') ++ List.sort Stdlib.compare (plist @ plist') + ;; + + +@@ -1196,7 +1196,7 @@ add_screen preprocessor_screen;; + + let prerequisites_scan_packages() = + (* Find out all packages *) +- List.sort Pervasives.compare (Fl_package_base.list_packages()) ++ List.sort Stdlib.compare (Fl_package_base.list_packages()) + ;; + + +@@ -1255,10 +1255,10 @@ let buildlib_scan_modules() = + let files'' = + List.map + (fun f -> +- String.capitalize (Filename.chop_extension f) ++ String.capitalize_ascii (Filename.chop_extension f) + ) + files' in +- remove_dups (List.sort Pervasives.compare files'') ++ remove_dups (List.sort Stdlib.compare files'') + ;; + + +@@ -1353,7 +1353,7 @@ build any."; + end + else begin + wiz_executables := +- List.sort Pervasives.compare (name :: !wiz_executables); ++ List.sort Stdlib.compare (name :: !wiz_executables); + wiz_exec_objects := (name, ref []) :: !wiz_exec_objects; + wiz_exec_native := (name, ref false) :: !wiz_exec_native; + !update_listbox(); diff --git a/ocaml-findlib.spec b/ocaml-findlib.spec index 194acdb..bd818f1 100644 --- a/ocaml-findlib.spec +++ b/ocaml-findlib.spec @@ -1,24 +1,35 @@ +# OCaml packages not built on i686 since OCaml 5 / Fedora 39. +ExcludeArch: %{ix86} + +%ifnarch %{ocaml_native_compiler} +%global debug_package %{nil} +%endif + Name: ocaml-findlib -Version: 1.8.1 -Release: 2%{?dist} +Version: 1.9.8 +Release: 5%{?dist} Summary: Objective CAML package manager and build helper -License: BSD +License: MIT URL: http://projects.camlcity.org/projects/findlib.html +VCS: git:https://github.com/ocaml/ocamlfind.git Source0: http://download.camlcity.org/download/findlib-%{version}.tar.gz +# Fix the toolbox build with OCaml 5.x +Patch0: %{name}-toolbox.patch + BuildRequires: ocaml >= 4.02.0 -#BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-labltk-devel -BuildRequires: ocaml-ocamlbuild-devel -#BuildRequires: ocaml-num-devel +BuildRequires: ocaml-ocamlbuild BuildRequires: ocaml-compiler-libs BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-rpm-macros BuildRequires: m4, ncurses-devel -BuildRequires: gawk +BuildRequires: make Requires: ocaml -%global __ocaml_requires_opts -i Asttypes -i Parsetree +# Do not require ocaml-compiler-libs at runtime +%global __ocaml_requires_opts -i Asttypes -i Build_path_prefix_map -i Cmi_format -i Env -i Format_doc -i Ident -i Identifiable -i Load_path -i Location -i Longident -i Misc -i Oprint -i Outcometree -i Parsetree -i Path -i Primitive -i Shape -i Subst -i Topdirs -i Toploop -i Type_immediacy -i Types -i Unit_info -i Warnings %description @@ -27,7 +38,7 @@ Objective CAML package manager and build helper. %package devel Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} %description devel @@ -36,7 +47,21 @@ developing applications that use %{name}. %prep -%setup -q -n findlib-%{version} +%autosetup -p1 -n findlib-%{version} + +# Fix character encoding +iconv -f ISO8859-1 -t UTF-8 doc/README > doc/README.utf8 +touch -r doc/README doc/README.utf8 +mv doc/README.utf8 doc/README + +# Fix the OCaml core man directory +sed -i 's,/usr/local/man,%{_mandir},' configure + +# Build an executable that is not damaged by stripping +sed -i 's/\(custom=\)-custom/\1-output-complete-exe/' configure + +# Skip broken test for ocamlopt -g +sed -i '/^ocamlopt -g/d' configure %build @@ -45,60 +70,232 @@ ocamlc -where (cd tools/extract_args && make) tools/extract_args/extract_args -o src/findlib/ocaml_args.ml ocamlc ocamlcp ocamlmktop ocamlopt ocamldep ocamldoc ||: cat src/findlib/ocaml_args.ml -./configure -config %{_sysconfdir}/ocamlfind.conf \ +./configure -config %{_sysconfdir}/findlib.conf \ -bindir %{_bindir} \ -sitelib `ocamlc -where` \ -mandir %{_mandir} \ -with-toolbox -make all +%make_build all %ifarch %{ocaml_native_compiler} -make opt +%make_build opt %endif rm doc/guide-html/TIMESTAMP %install -# Grrr destdir grrrr -mkdir -p $RPM_BUILD_ROOT%{_bindir} -mkdir -p $RPM_BUILD_ROOT%{_mandir}/man{1,5} -make install \ - prefix=$RPM_BUILD_ROOT \ +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir} +%make_install \ OCAMLFIND_BIN=%{_bindir} \ + OCAMLFIND_CONF=%{_sysconfdir} \ OCAMLFIND_MAN=%{_mandir} +rmdir $RPM_BUILD_ROOT%{_mandir}/man3 + +%ocaml_files +sed -i '/etc/d' .ofiles -%files +%files -f .ofiles %doc LICENSE doc/README -%config(noreplace) %{_sysconfdir}/ocamlfind.conf -%{_bindir}/* -%{_mandir}/man1/* -%{_mandir}/man5/* -%{_libdir}/ocaml/*/META -%{_libdir}/ocaml/topfind -%{_libdir}/ocaml/findlib -%ifarch %{ocaml_native_compiler} -%exclude %{_libdir}/ocaml/findlib/*.a -%exclude %{_libdir}/ocaml/findlib/*.cmxa -%endif -%exclude %{_libdir}/ocaml/findlib/*.mli -%exclude %{_libdir}/ocaml/findlib/Makefile.config -%exclude %{_libdir}/ocaml/findlib/make_wizard -%exclude %{_libdir}/ocaml/findlib/make_wizard.pattern -# Had to disable this in OCaml 4.06, unclear why. -#%%{_libdir}/ocaml/num-top +%config(noreplace) %{_sysconfdir}/findlib.conf -%files devel +%files devel -f .ofiles-devel %doc LICENSE doc/README doc/guide-html -%ifarch %{ocaml_native_compiler} -%{_libdir}/ocaml/findlib/*.a -%{_libdir}/ocaml/findlib/*.cmxa -%endif -%{_libdir}/ocaml/findlib/*.mli -%{_libdir}/ocaml/findlib/Makefile.config %changelog +* Mon Oct 13 2025 Richard W.M. Jones - 1.9.8-5 +- OCaml 5.4.0 rebuild + +* Thu Jul 24 2025 Fedora Release Engineering - 1.9.8-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Fri Jul 11 2025 Jerry James - 1.9.8-3 +- Rebuild to fix OCaml dependencies + +* Fri Jan 17 2025 Fedora Release Engineering - 1.9.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Thu Jan 9 2025 Jerry James - 1.9.8-1 +- OCaml 5.3.0 rebuild for Fedora 42 +- Version 1.9.8 +- Drop workaround for upstream dynlink_subdir bug +- Change config name to findlib.conf to match upstream +- Update __ocaml_requires_opts for OCaml 5.3.0 + +* Thu Jul 18 2024 Fedora Release Engineering - 1.9.6-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Wed Jun 19 2024 Richard W.M. Jones - 1.9.6-13 +- OCaml 5.2.0 ppc64le fix + +* Wed May 29 2024 Richard W.M. Jones - 1.9.6-12 +- OCaml 5.2.0 for Fedora 41 + +* Mon Jan 29 2024 Richard W.M. Jones - 1.9.6-11 +- Bump and rebuild + +* Thu Jan 25 2024 Fedora Release Engineering - 1.9.6-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 1.9.6-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Dec 18 2023 Richard W.M. Jones - 1.9.6-8 +- OCaml 5.1.1 + s390x code gen fix for Fedora 40 + +* Tue Dec 12 2023 Richard W.M. Jones - 1.9.6-7 +- OCaml 5.1.1 rebuild for Fedora 40 + +* Thu Oct 05 2023 Richard W.M. Jones - 1.9.6-6 +- OCaml 5.1 rebuild for Fedora 40 + +* Wed Oct 4 2023 Jerry James - 1.9.6-5 +- Build an executable that is not damaged by stripping + +* Thu Jul 20 2023 Fedora Release Engineering - 1.9.6-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Jul 11 2023 Richard W.M. Jones - 1.9.6-4 +- OCaml 5.0 rebuild for Fedora 39 + +* Mon Jul 10 2023 Jerry James - 1.9.6-3 +- OCaml 5.0.0 rebuild +- Verify the License is valid SPDX +- Fix natdynlink detection +- Add patch to fix toolbox build for OCaml 5.x +- Convert README to UTF-8 +- Use new OCaml macros + +* Tue Jan 24 2023 Richard W.M. Jones - 1.9.6-2 +- Rebuild OCaml packages for F38 + +* Mon Jan 23 2023 Richard W.M. Jones - 1.9.6-1 +- New upstream version 1.9.6 + +* Thu Jan 19 2023 Fedora Release Engineering - 1.9.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jul 22 2022 Fedora Release Engineering - 1.9.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Sun Jun 19 2022 Richard W.M. Jones - 1.9.5-1 +- New upstream version 1.9.5 + +* Sat Jun 18 2022 Richard W.M. Jones - 1.9.4-2 +- OCaml 4.14.0 rebuild + +* Wed Jun 08 2022 Richard W.M. Jones - 1.9.4-1 +- Update to findlib 1.9.4 + +* Fri Feb 04 2022 Richard W.M. Jones - 1.9.3-2 +- OCaml 4.13.1 rebuild to remove package notes + +* Wed Jan 26 2022 Richard W.M. Jones - 1.9.3-1 +- Update to findlib 1.9.3 + +* Sat Jan 22 2022 Richard W.M. Jones - 1.9.2-1 +- Update to findlib 1.9.2 +- Remove patch which has been applied upstream. + +* Thu Jan 20 2022 Fedora Release Engineering - 1.9.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jan 7 2022 Jerry James - 1.9.1-4 +- Fix labltk detection +- Change license from BSD to MIT + +* Mon Oct 04 2021 Richard W.M. Jones - 1.9.1-3 +- Bump and rebuild for updated ocaml-labltk + +* Mon Oct 04 2021 Richard W.M. Jones - 1.9.1-2 +- OCaml 4.13.1 build + +* Mon Oct 04 2021 Richard W.M. Jones - 1.9.1-1 +- New upstream development version 1.9.1 + +* Tue Jul 27 2021 Richard W.M. Jones - 1.9-3 +- Rebuild for changed ocamlx(Dynlink) + +* Thu Jul 22 2021 Fedora Release Engineering - 1.9-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Mon Mar 15 2021 Richard W.M. Jones - 1.9-1 +- New upstream version 1.9. + +* Mon Mar 15 2021 Richard W.M. Jones - 1.8.1-26 +- Bump and rebuild for ELN broken deps. + +* Mon Mar 1 2021 Richard W.M. Jones - 1.8.1-25 +- Rebuild for updated ocaml-labltk + +* Mon Mar 1 09:37:08 GMT 2021 Richard W.M. Jones - 1.8.1-24 +- OCaml 4.12.0 build + +* Mon Feb 1 2021 Richard W.M. Jones - 1.8.1-23 +- Bump and rebuild for updated ocaml Dynlink dependency. + +* Tue Jan 26 2021 Fedora Release Engineering - 1.8.1-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Sep 01 2020 Richard W.M. Jones - 1.8.1-21 +- OCaml 4.11.1 rebuild + +* Fri Aug 21 2020 Richard W.M. Jones - 1.8.1-20 +- OCaml 4.11.0 rebuild + +* Mon Aug 03 2020 Richard W.M. Jones - 1.8.1-19 +- Bump and rebuild to fix Dynlink dependency. + +* Sat Aug 01 2020 Fedora Release Engineering - 1.8.1-18 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 1.8.1-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon May 04 2020 Richard W.M. Jones - 1.8.1-16 +- OCaml 4.11.0+dev2-2020-04-22 rebuild + +* Tue Apr 21 2020 Richard W.M. Jones - 1.8.1-15 +- OCaml 4.11.0 pre-release attempt 2 + +* Fri Apr 17 2020 Richard W.M. Jones - 1.8.1-14 +- OCaml 4.11.0 pre-release + +* Thu Apr 02 2020 Richard W.M. Jones - 1.8.1-13 +- Update all OCaml dependencies for RPM 4.16. + +* Wed Feb 26 2020 Richard W.M. Jones - 1.8.1-12 +- OCaml 4.10.0 final. + +* Wed Jan 29 2020 Fedora Release Engineering - 1.8.1-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Sun Jan 19 2020 Richard W.M. Jones - 1.8.1-10 +- OCaml 4.10.0+beta1 rebuild. + +* Thu Jan 09 2020 Richard W.M. Jones - 1.8.1-9 +- Bump release and rebuild. + +* Wed Jan 08 2020 Richard W.M. Jones - 1.8.1-8 +- OCaml 4.09.0 for riscv64 + +* Thu Dec 05 2019 Richard W.M. Jones - 1.8.1-7 +- Bump and rebuild for fixed ocaml(runtime) dependency. + +* Thu Dec 05 2019 Richard W.M. Jones - 1.8.1-6 +- OCaml 4.09.0 (final) rebuild. + +* Thu Dec 05 2019 Richard W.M. Jones - 1.8.1-5 +- Final removal of camlp4. + +* Mon Sep 02 2019 Richard W.M. Jones - 1.8.1-4 +- Rebuild with camlp4. + +* Fri Aug 16 2019 Richard W.M. Jones - 1.8.1-3 +- OCaml 4.08.1 (final) rebuild. + * Wed Jul 31 2019 Richard W.M. Jones - 1.8.1-2 - OCaml 4.08.1 (rc2) rebuild. diff --git a/sources b/sources index 4ed6529..d5baf22 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (findlib-1.8.1.tar.gz) = 0d8e1ff21217fcc6823aab3ac71282789691e4ae8c3607703d0393468247f93e2d084bd4e2a8795b523f2c7f193521d3aae4b8122c934ebf8b58c3185a5bc9c1 +SHA512 (findlib-1.9.8.tar.gz) = 64aa28ac27358e1bc5d118e283fb64757fb96329151860bb9c1e9352a9fa1728ebcb4320b8d2eeb57ed2eea83c9849ea89d06c0fa25e1884ececb431341f9f1a diff --git a/tests/basic-test.sh b/tests/basic-test.sh new file mode 100755 index 0000000..cf3c2e3 --- /dev/null +++ b/tests/basic-test.sh @@ -0,0 +1,7 @@ +#!/bin/bash - +set -e +set -x + +# There's not really any reason to test this as chain builds +# use findlib extensively. Just check the binary functions. +ocamlfind query findlib diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100755 index 0000000..49cfb7f --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,12 @@ +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + required_packages: + - ocaml + - ocaml-findlib + tests: + - simple: + dir: . + run: ./basic-test.sh