diff --git a/.gitignore b/.gitignore index 8fe9270..001651e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,3 @@ ocaml-fileutils-0.4.0.tar.gz /ocaml-fileutils-0.5.1.tar.gz /ocaml-fileutils-0.5.2.tar.gz /fileutils-0.6.4.tbz -/fileutils-0.6.6.tbz diff --git a/gating.yaml b/gating.yaml deleted file mode 100755 index 2c7ed80..0000000 --- a/gating.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- !Policy -product_versions: - - rhel-* -decision_context: osci_compose_gate -rules: - - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/ocaml-fileutils-0.6.4-cmp.patch b/ocaml-fileutils-0.6.4-cmp.patch new file mode 100644 index 0000000..a966e28 --- /dev/null +++ b/ocaml-fileutils-0.6.4-cmp.patch @@ -0,0 +1,18 @@ +--- fileutils-0.6.4/src/lib/fileutils/FileUtilCMP.ml.orig 2022-10-28 14:22:35.000000000 -0600 ++++ fileutils-0.6.4/src/lib/fileutils/FileUtilCMP.ml 2023-06-22 15:04:21.317130686 -0600 +@@ -48,11 +48,14 @@ let cmp ?(skip1 = 0) fln1 ?(skip2 = 0) f + let rec loop count s1 s2 = + match s1, s2 with + | Seq.Cons (v1, s1), Seq.Cons (v2, s2) when v1 = v2 -> loop (count + 1) (s1 ()) (s2 ()) ++ | Seq.Nil, Seq.Nil -> (-1) + | _ -> count + in + let count = loop 0 (stream1 ()) (stream2 ()) in + clean_fd (); +- Some count ++ match count with ++ | (-1) -> None ++ | x -> Some x + end else + Some (-1) + diff --git a/ocaml-fileutils-0.6.4-forward-compat.patch b/ocaml-fileutils-0.6.4-forward-compat.patch new file mode 100644 index 0000000..2b1e084 --- /dev/null +++ b/ocaml-fileutils-0.6.4-forward-compat.patch @@ -0,0 +1,27 @@ +--- fileutils-0.6.4/fileutils.opam.orig 2022-10-28 14:22:35.000000000 -0600 ++++ fileutils-0.6.4/fileutils.opam 2023-06-22 13:01:26.779533940 -0600 +@@ -16,8 +16,6 @@ build: [ + depends: [ + "ocaml" {>= "4.03"} + "base-unix" +- "stdlib-shims" +- "seq" + "dune" {>= "1.11.0"} + "ounit2" {with-test & >= "2.0.0"} + ] +--- fileutils-0.6.4/src/lib/fileutils/dune.orig 2022-10-28 14:22:35.000000000 -0600 ++++ fileutils-0.6.4/src/lib/fileutils/dune 2023-06-22 13:01:47.403222843 -0600 +@@ -30,4 +30,4 @@ + fileUtilWHICH + unixPath + win32Path) +- (libraries unix seq stdlib-shims)) ++ (libraries unix)) +--- fileutils-0.6.4/test/dune.orig 2022-10-28 14:22:35.000000000 -0600 ++++ fileutils-0.6.4/test/dune 2023-06-22 13:02:04.739961336 -0600 +@@ -6,4 +6,4 @@ + (test + (name test) + (modules test) +- (libraries fileutils fileutils_str ounit2 stdlib-shims)) ++ (libraries fileutils fileutils_str ounit2)) diff --git a/ocaml-fileutils.spec b/ocaml-fileutils.spec index a664cef..f5b75b4 100644 --- a/ocaml-fileutils.spec +++ b/ocaml-fileutils.spec @@ -5,21 +5,24 @@ ExcludeArch: %{ix86} %global debug_package %{nil} %endif -%global giturl https://github.com/gildor478/ocaml-fileutils - Name: ocaml-fileutils -Version: 0.6.6 -Release: 5%{?dist} +Version: 0.6.4 +Release: 8%{?dist} Summary: OCaml library for common file and filename operations License: LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception URL: https://gildor478.github.io/ocaml-fileutils/ -VCS: git:%{giturl}.git -Source0: %{giturl}/releases/download/v%{version}/fileutils-%{version}.tbz +Source0: https://github.com/gildor478/ocaml-fileutils/releases/download/v%{version}/fileutils-%{version}.tbz +# Fedora does not need the stdlib-shims or seq forward compatibility packages +Patch0: ocaml-fileutils-0.6.4-forward-compat.patch +# Given two distinct files with identical contents, the cmp function evaluates +# to "Some x", where x is the size of each file, instead of None. This breaks +# the ocaml-gettext tests, which expect None in that case. +Patch1: ocaml-fileutils-0.6.4-cmp.patch -BuildRequires: ocaml >= 4.14 -BuildRequires: ocaml-dune >= 2.9 -%if 0%{?fedora} +BuildRequires: ocaml >= 4.03.0 +BuildRequires: ocaml-dune >= 1.11.0 +%if 0%{?fedora} || 0%{?rhel} <= 6 BuildRequires: ocaml-ounit-devel >= 2.0.0 %endif @@ -74,32 +77,6 @@ developing applications that use %{name}. %changelog -* Tue Oct 14 2025 Richard W.M. Jones - 0.6.6-5 -- OCaml 5.4.0 rebuild - -* Thu Jul 24 2025 Fedora Release Engineering - 0.6.6-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Sat Jul 12 2025 Jerry James - 0.6.6-3 -- Rebuild to fix OCaml dependencies - -* Fri Jan 17 2025 Fedora Release Engineering - 0.6.6-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Thu Jan 9 2025 Jerry James - 0.6.6-1 -- OCaml 5.3.0 rebuild for Fedora 42 -- Version 0.6.6 -- All patches have been upstreamed - -* Thu Jul 18 2024 Fedora Release Engineering - 0.6.4-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Wed Jun 19 2024 Richard W.M. Jones - 0.6.4-10 -- OCaml 5.2.0 ppc64le fix - -* Wed May 29 2024 Richard W.M. Jones - 0.6.4-9 -- OCaml 5.2.0 for Fedora 41 - * Thu Jan 25 2024 Fedora Release Engineering - 0.6.4-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild diff --git a/sources b/sources index ee75ed3..565179f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (fileutils-0.6.6.tbz) = ecc38b1577ab108bd24d1e9f0e83596254e542eefb37020dedcff7ca0109e562411cbb9806fbc6f88f4166569bf061a444971388c26950ec02dfc48b35daed90 +SHA512 (fileutils-0.6.4.tbz) = 7053f8d92655d5631f1ec61ab7f9e3f6e3afedbe435038858dd9a026b9c769c6182afaa436491a398e7c4513b384a609e016718e030855996b2d9d54b461bd19 diff --git a/tests/basic-test.sh b/tests/basic-test.sh deleted file mode 100755 index 9c74e1c..0000000 --- a/tests/basic-test.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -set -e -set -x - -# Compile trivial fileutils program. -echo 'assert (FilePath.compare "/" "/" = 0)' > filetest.ml -ocamlfind ocamlopt -package fileutils filetest.ml -linkpkg -o filetest -./filetest diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100755 index 24edee1..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,13 +0,0 @@ -- hosts: localhost - roles: - - role: standard-test-basic - tags: - - classic - required_packages: - - ocaml - - ocaml-findlib - - ocaml-fileutils-devel - tests: - - simple: - dir: . - run: ./basic-test.sh