[ocaml-xml-light/f17] Update to latest version (subversion release 234).
Richard W.M. Jones
rjones at fedoraproject.org
Tue Aug 21 08:25:53 UTC 2012
commit b56786525af108a8b8c355ccf0c441b6f5b64a9f
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Tue Aug 21 09:11:45 2012 +0100
Update to latest version (subversion release 234).
- Includes fix for CVE-2012-3514 - moderate impact hash table collisions
(resolves: rhbz#787890).
- Clean up the spec file and bring up to modern standards.
- Add tests.
(cherry picked from commit aa340ae1b9466577913662b78e664e40f1b5970e)
.gitignore | 1 +
ocaml-xml-light.spec | 65 ++++++++++++++++++++++++++++++++++++--------------
sources | 2 +-
3 files changed, 49 insertions(+), 19 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 92e7623..a263d14 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
xml-light-2.2.cvs20070817.tar.gz
+/xml-light-234.tar.gz
diff --git a/ocaml-xml-light.spec b/ocaml-xml-light.spec
index f755b03..944c709 100644
--- a/ocaml-xml-light.spec
+++ b/ocaml-xml-light.spec
@@ -1,25 +1,37 @@
-%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
-%define debug_package %{nil}
+%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
+%global debug_package %{nil}
+
+%global svnrev 234
Name: ocaml-xml-light
-Version: 2.2.cvs20070817
-Release: 17%{?dist}
+Version: 2.3
+Release: 0.1.svn%{svnrev}%{?dist}
Summary: Minimal XML parser and printer for OCaml
Group: Development/Libraries
License: LGPLv2+
URL: http://tech.motion-twin.com/xmllight.html
-Source0: xml-light-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+# Upstream does not have releases (or rather, it did up to version 2.2
+# and then they stopped). Use the SVN repository here:
+# https://code.google.com/p/ocamllibs/source/checkout
+#
+# To prepare a source release:
+# (1) Adjust 'svnrev' above to the latest release.
+# (2) Check out the sources:
+# svn checkout http://ocamllibs.googlecode.com/svn/trunk/ ocamllibs
+# (3) Create a tarball:
+# cd ocamllibs/xml-light/
+# tar -zcf /tmp/xml-light-NNN.tar.gz --xform='s,^\.,xml-light-NNN,' .
+# (where NNN is the svnrev above)
+Source0: xml-light-%{svnrev}.tar.gz
+
ExcludeArch: sparc64 s390 s390x
BuildRequires: ocaml >= 3.10.1
BuildRequires: ocaml-findlib-devel, ocaml-ocamldoc
BuildRequires: gawk
-%define _use_internal_dependency_generator 0
-%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh
-%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh
%description
Xml-Light is a minimal XML parser & printer for OCaml. It provides
@@ -41,19 +53,35 @@ developing applications that use %{name}.
%prep
-%setup -c -q -n xml-light-%{version}
+%setup -n xml-light-%{svnrev}
%build
-make all doc
+# Build breaks if parallelized.
+unset MAKEFLAGS
+make all
+make doc
%if %opt
make opt
%endif
sed -e 's/@VERSION@/%{VERSION}/' < META.in > META
+%check
+./test.exe <<EOF
+<abc><123/></abc>
+
+EOF
+
+%if %opt
+./test_opt.exe <<EOF
+<abc><123/></abc>
+
+EOF
+%endif
+
+
%install
-rm -rf $RPM_BUILD_ROOT
export DESTDIR=$RPM_BUILD_ROOT
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
@@ -61,12 +89,7 @@ rm -f test.cmi
ocamlfind install xml-light META *.mli *.cmi *.cma *.a *.cmxa *.cmx
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-
%files
-%defattr(-,root,root,-)
%doc README
%{_libdir}/ocaml/xml-light
%if %opt
@@ -78,7 +101,6 @@ rm -rf $RPM_BUILD_ROOT
%files devel
-%defattr(-,root,root,-)
%doc README doc/*
%if %opt
%{_libdir}/ocaml/xml-light/*.a
@@ -89,6 +111,13 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Tue Aug 21 2012 Richard W.M. Jones <rjones at redhat.com> - 2.3-0.1.svn234
+- Update to latest version (subversion release 234).
+- Includes fix for CVE-2012-3514 - moderate impact hash table collisions
+ (resolves: rhbz#787890).
+- Clean up the spec file and bring up to modern standards.
+- Add tests.
+
* Fri Jan 06 2012 Richard W.M. Jones <rjones at redhat.com> - 2.2.cvs20070817-17
- Rebuild for OCaml 3.12.1.
diff --git a/sources b/sources
index 57840c2..26103fe 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-fcc8601743ff3ab9975b732bf5647295 xml-light-2.2.cvs20070817.tar.gz
+1c02254c9f78ef8894b769d47112816d xml-light-234.tar.gz
More information about the scm-commits
mailing list