From 70475958813ec596d18629e76927b632ac43e24e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Mon, 27 Nov 2023 11:58:02 +0100 Subject: [PATCH] Sync from SUSE:ALP:Source:Standard:1.0 ocaml-augeas revision a6c8c0bd2092b957ec925ac2b469438b --- .gitattributes | 23 +++++ ...-returns-const-value-pointer-in-OCam.patch | 35 +++++++ ocaml-augeas-0.6.tar.gz | 3 + ocaml-augeas-0.6.tar.gz.sig | 17 ++++ ocaml-augeas.changes | 8 ++ ocaml-augeas.rpmlintrc | 1 + ocaml-augeas.spec | 98 +++++++++++++++++++ 7 files changed, 185 insertions(+) create mode 100644 .gitattributes create mode 100644 caml_named_value-returns-const-value-pointer-in-OCam.patch create mode 100644 ocaml-augeas-0.6.tar.gz create mode 100644 ocaml-augeas-0.6.tar.gz.sig create mode 100644 ocaml-augeas.changes create mode 100644 ocaml-augeas.rpmlintrc create mode 100644 ocaml-augeas.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fecc750 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/caml_named_value-returns-const-value-pointer-in-OCam.patch b/caml_named_value-returns-const-value-pointer-in-OCam.patch new file mode 100644 index 0000000..22c5ed9 --- /dev/null +++ b/caml_named_value-returns-const-value-pointer-in-OCam.patch @@ -0,0 +1,35 @@ +From 1cf5aef99b26a46529ca797547c0b49627fffe78 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Sat, 7 Dec 2019 11:08:54 +0000 +Subject: [PATCH 2/2] caml_named_value returns const value pointer in OCaml + 4.09+ + +--- + augeas-c.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/augeas-c.c b/augeas-c.c +index 9217017..679bcb5 100644 +--- a/augeas-c.c ++++ b/augeas-c.c +@@ -86,7 +86,7 @@ static const int error_map_len = sizeof error_map / sizeof error_map[0]; + static void + raise_error_and_maybe_close (augeas_t t, const char *msg, bool close_handle) + { +- value *exn = caml_named_value ("Augeas.Error"); ++ const value *exn = caml_named_value ("Augeas.Error"); + value args[5]; + const int code = aug_error (t); + const char *aug_err_msg; +@@ -132,7 +132,7 @@ raise_error_and_maybe_close (augeas_t t, const char *msg, bool close_handle) + static void + raise_init_error (const char *msg) + { +- value *exn = caml_named_value ("Augeas.Error"); ++ const value *exn = caml_named_value ("Augeas.Error"); + value args[5]; + + args[0] = caml_alloc (1, 0); +-- +2.23.0 + diff --git a/ocaml-augeas-0.6.tar.gz b/ocaml-augeas-0.6.tar.gz new file mode 100644 index 0000000..fbc82a9 --- /dev/null +++ b/ocaml-augeas-0.6.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8aba99ddacd08768ebeef4a2138361d13b41a30317fce7503140cd86a1307611 +size 65180 diff --git a/ocaml-augeas-0.6.tar.gz.sig b/ocaml-augeas-0.6.tar.gz.sig new file mode 100644 index 0000000..ff6362f --- /dev/null +++ b/ocaml-augeas-0.6.tar.gz.sig @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- + +iQJFBAABCAAvFiEE93dPsa0HSn6Mh2fqkXOPc+G3aKAFAl1b/RIRHHJpY2hAYW5u +ZXhpYS5vcmcACgkQkXOPc+G3aKCWeA//bU7ozTCLmfRRJk0PpHeMjzLbtMF+2Yh3 +hY9Ey2q9Kt4yoRrneEL4QWL5y87PFjAoabNOtP7bJN36xZYQ66C/GGSmg2DjFPHL +Ol2FOU7O63auKFsiXt9mDQRO2Mh/Trv+ZJ4cSW/gTpEH4YsSp+70rsfvADQlEWhO +fYr7A0JPynxhVCM/cOsJ6Dvgtl2Iwb6CJ8a9kqACJQ8KvcFhkrsBiliAo5omlXev +YjZ/iX1EWIGxeCfOvPpkkP4jBWS28aQqvCQIJ/e3dOOO4W9R0bFz1Xi4I+C7oieV +Yxqn9DBmLuHw2ZCgxd626RZ5LApOnjH/kz4vkWBSmTrhbAhIcfsgq49iAtw8r14E +D1NjEIr2NrEkqswdO8ZU8UYv1AgXxIeyFfjcCj0+X3QRpvBzd22SVb+iTLdo//sp +xDJNCy7QHxKnWS+bAAcK5dHEeYPamqn+B1Veato7rRn0a0yxb328H4YVUv3U/DMN +UXKz+JKVBI5RjH13K4HWCiUb2shy08q/VnsILxaz4k/v6p0Wm6ub+pVoUFPl98n9 +3VB+ltoAJrI7AoPnkvHWTAm/tQ8ZHepF2fAU8cHMxoOx2HmGka+r3SsG2lepm7k6 +Kqd4K0SchBOSsMzbqoAaq5XIBm/Ieo0+6ZdlvUDfqQq5JLREXsvn4eqQ8a1EnJvV +d0suVCSUapM= +=cw0u +-----END PGP SIGNATURE----- diff --git a/ocaml-augeas.changes b/ocaml-augeas.changes new file mode 100644 index 0000000..79c66d4 --- /dev/null +++ b/ocaml-augeas.changes @@ -0,0 +1,8 @@ +------------------------------------------------------------------- +Thu Feb 9 14:11:01 MST 2023 - carnold@suse.com + +- Initial creation of the ocaml-augeas package. This code was + originally bundled in libguestfs. +- Initial version 0.6 + caml_named_value-returns-const-value-pointer-in-OCam.patch + diff --git a/ocaml-augeas.rpmlintrc b/ocaml-augeas.rpmlintrc new file mode 100644 index 0000000..ccdde55 --- /dev/null +++ b/ocaml-augeas.rpmlintrc @@ -0,0 +1 @@ +addFilter("static-library-without-debuginfo") diff --git a/ocaml-augeas.spec b/ocaml-augeas.spec new file mode 100644 index 0000000..7428275 --- /dev/null +++ b/ocaml-augeas.spec @@ -0,0 +1,98 @@ +# +# spec file for package ocaml-augeas +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: ocaml-augeas +Version: 0.6 +Release: 0 +Summary: OCaml bindings for Augeas configuration API +License: GPL-2.0-or-later +URL: http://people.redhat.com/~rjones/augeas/files/ +Source0: http://people.redhat.com/~rjones/augeas/files/%{name}-%{version}.tar.gz +Source1: %{name}-%{version}.tar.gz.sig +Source2: ocaml-augeas.rpmlintrc + +Patch1: caml_named_value-returns-const-value-pointer-in-OCam.patch + +BuildRequires: make +BuildRequires: ocaml >= 3.09.0 +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-ocamldoc +BuildRequires: augeas-devel >= 0.1.0 +BuildRequires: chrpath + +%description +Augeas is a unified system for editing arbitrary configuration +files. This provides complete OCaml bindings for Augeas. + + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + + +%prep +%autosetup -p1 + + +%build +%define _lto_cflags %{nil} + +%configure +make all +make doc + + +%check +make check + + +%install +export DESTDIR=$RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs + +ocamlfind install augeas META *.mli *.cmx *.cma *.cmxa *.a augeas.cmi *.so + +chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so + + +%files +%doc COPYING.LIB +%{_libdir}/ocaml/augeas +%exclude %{_libdir}/ocaml/augeas/*.a +%exclude %{_libdir}/ocaml/augeas/*.cmxa +%exclude %{_libdir}/ocaml/augeas/*.cmx +%exclude %{_libdir}/ocaml/augeas/*.mli +%{_libdir}/ocaml/stublibs/*.so +%{_libdir}/ocaml/stublibs/*.so.owner + + +%files devel +%doc html +%{_libdir}/ocaml/augeas/*.a +%{_libdir}/ocaml/augeas/*.cmxa +%{_libdir}/ocaml/augeas/*.cmx +%{_libdir}/ocaml/augeas/*.mli + + +%changelog