From 2a57573720c92c73ec690af442a95fccd8c397bc Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 2 Sep 2020 21:18:19 +0100 Subject: [PATCH 1/6] Bump release and rebuild. --- z3.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/z3.spec b/z3.spec index c425bb1..9f50e3d 100644 --- a/z3.spec +++ b/z3.spec @@ -1,6 +1,6 @@ Name: z3 Version: 4.8.8 -Release: 7%{?dist} +Release: 7%{?dist}.1 Summary: Satisfiability Modulo Theories (SMT) solver License: MIT @@ -216,6 +216,9 @@ rm -rf %{buildroot}%{_docdir}/Z3 %{python3_sitelib}/%{name}/ %changelog +* Wed Sep 02 2020 Richard W.M. Jones - 4.8.8-7.1 +- Bump release and rebuild. + * Tue Sep 01 2020 Richard W.M. Jones - 4.8.8-7 - OCaml 4.11.1 rebuild From a628da3ca40278e600568001b9d6e4ccf3623fe9 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 11 Sep 2020 10:11:15 -0600 Subject: [PATCH 2/6] Version 4.8.9. --- sources | 2 +- z3.spec | 25 +++++++++++++++++++------ 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/sources b/sources index a0be432..1e223dd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (z3-4.8.8.tar.gz) = a6823cadb7cdad11b8f0db1530676c0ec4853886dfb3c4dbc5b798c5dbd445afb0c61675f81cb7f99c1b1734d9cd0ec96a07c68a948da3c25801fc6767fea47f +SHA512 (z3-4.8.9.tar.gz) = a50da5c3f9e27d3e804c1b71f648a3dbd5a55223b7344d66f191a1b34a4d787810abd976840d3ab3878aaf5c96d89f5a517cac0781b82aa927a9d8d54836d54f diff --git a/z3.spec b/z3.spec index 9f50e3d..e7bbecd 100644 --- a/z3.spec +++ b/z3.spec @@ -1,6 +1,6 @@ Name: z3 -Version: 4.8.8 -Release: 7%{?dist}.1 +Version: 4.8.9 +Release: 1%{?dist} Summary: Satisfiability Modulo Theories (SMT) solver License: MIT @@ -12,6 +12,7 @@ BuildRequires: doxygen BuildRequires: gcc-c++ BuildRequires: gmp-devel BuildRequires: graphviz +BuildRequires: help2man BuildRequires: java-devel BuildRequires: javapackages-tools BuildRequires: ninja-build @@ -99,12 +100,15 @@ sed \ -i scripts/mk_util.py # Comply with the Java packaging guidelines -sed -e '/catch/s,\(System\.load\)Library("\(.*\)"),\1("%{_libdir}/z3/\2.so"),' \ +sed -e '/libz3java/s,\(System\.load\)Library("\(.*\)"),\1("%{_libdir}/z3/\2.so"),' \ -i scripts/update_api.py # Update an OCaml interface sed -i 's/Pervasives/Stdlib/' src/api/ml/z3.ml +# FIXME: For unknown reasons, cmake replaces the version with nothing at all +sed -i 's/@VERSION@/%{version}/' z3.pc.cmake.in + # Fix character encoding iconv -f iso8859-1 -t utf-8 RELEASE_NOTES > RELEASE_NOTES.utf8 touch -r RELEASE_NOTES RELEASE_NOTES.utf8 @@ -113,7 +117,7 @@ mv -f RELEASE_NOTES.utf8 RELEASE_NOTES %build export CXXFLAGS="$RPM_OPT_FLAGS" export LANG="C.UTF-8" -export PYTHON="%{__python3}" +export PYTHON="%{python3}" %cmake -G Ninja \ -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}/%{name} \ @@ -135,7 +139,7 @@ export PYTHON="%{__python3}" # Second, to prevent make from rebuilding the entire library, copy the # cmake-built library to where make expects it. -cp -dp %{__cmake_builddir}/libz3.so* build +cp -dp %{_vpath_builddir}/libz3.so* build # Third, make wants to rebuild libz3.so since its dependencies do not exist. # Do selective Makefile surgery to prevent this. @@ -168,6 +172,10 @@ popd # We handle the documentation files below rm -rf %{buildroot}%{_docdir}/Z3 +# Make a man page +mkdir -p %{buildroot}%{_mandir}/man1 +help2man -N -o %{buildroot}%{_mandir}/man1/%{name}.1 %{_vpath_builddir}/%{name} + #%%check # Some of the tests require more memory than the koji builders have available. # @@ -180,6 +188,7 @@ rm -rf %{buildroot}%{_docdir}/Z3 %files %doc README.md RELEASE_NOTES %{_bindir}/%{name} +%{_mandir}/man1/%{name}.1* %files libs %license LICENSE.txt @@ -189,9 +198,10 @@ rm -rf %{buildroot}%{_docdir}/Z3 %{_includedir}/%{name}/ %{_libdir}/lib%{name}.so %{_libdir}/cmake/%{name}/ +%{_libdir}/pkgconfig/%{name}.pc %files doc -%doc %{__cmake_builddir}/doc/api/html examples +%doc %{_vpath_builddir}/doc/api/html examples %license LICENSE.txt %files -n java-%{name} @@ -216,6 +226,9 @@ rm -rf %{buildroot}%{_docdir}/Z3 %{python3_sitelib}/%{name}/ %changelog +* Fri Sep 11 2020 Jerry James - 4.8.9-1 +- Version 4.8.9 + * Wed Sep 02 2020 Richard W.M. Jones - 4.8.8-7.1 - Bump release and rebuild. From 5ef0ea97d2c2d44bbaf2c8cc07d414ffc0043c36 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 25 Sep 2020 12:23:02 -0600 Subject: [PATCH 3/6] Rebuild for ocaml-zarith 1.10. --- z3.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/z3.spec b/z3.spec index e7bbecd..f1dc084 100644 --- a/z3.spec +++ b/z3.spec @@ -1,6 +1,6 @@ Name: z3 Version: 4.8.9 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Satisfiability Modulo Theories (SMT) solver License: MIT @@ -226,6 +226,9 @@ help2man -N -o %{buildroot}%{_mandir}/man1/%{name}.1 %{_vpath_builddir}/%{name} %{python3_sitelib}/%{name}/ %changelog +* Fri Sep 25 2020 Jerry James - 4.8.9-2 +- Rebuild for ocaml-zarith 1.10 + * Fri Sep 11 2020 Jerry James - 4.8.9-1 - Version 4.8.9 From 046bb852eaea4083ad673234b8f879b1bb730a29 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 9 Nov 2020 21:38:07 -0700 Subject: [PATCH 4/6] Explicitly BR make. --- z3.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/z3.spec b/z3.spec index f1dc084..bc78674 100644 --- a/z3.spec +++ b/z3.spec @@ -15,6 +15,7 @@ BuildRequires: graphviz BuildRequires: help2man BuildRequires: java-devel BuildRequires: javapackages-tools +BuildRequires: make BuildRequires: ninja-build BuildRequires: ocaml BuildRequires: ocaml-findlib From 7fc71e141cdf635e2791df2112b4af3581897fcd Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 16 Nov 2020 17:52:06 -0700 Subject: [PATCH 5/6] Rebuild for ocaml-zarith 1.11. --- z3.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/z3.spec b/z3.spec index bc78674..3e0dc73 100644 --- a/z3.spec +++ b/z3.spec @@ -1,6 +1,6 @@ Name: z3 Version: 4.8.9 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Satisfiability Modulo Theories (SMT) solver License: MIT @@ -227,6 +227,9 @@ help2man -N -o %{buildroot}%{_mandir}/man1/%{name}.1 %{_vpath_builddir}/%{name} %{python3_sitelib}/%{name}/ %changelog +* Mon Nov 16 2020 Jerry James - 4.8.9-3 +- Rebuild for ocaml-zarith 1.11 + * Fri Sep 25 2020 Jerry James - 4.8.9-2 - Rebuild for ocaml-zarith 1.10 From dc29bbe7e3063217beaf90dba7f607da152d7667 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Sat, 26 Dec 2020 07:44:31 -0700 Subject: [PATCH 6/6] Fix the python interface (bz 1910923). --- z3-python.patch | 21 +++++++++++++++++++++ z3.spec | 11 +++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 z3-python.patch diff --git a/z3-python.patch b/z3-python.patch new file mode 100644 index 0000000..c26dd68 --- /dev/null +++ b/z3-python.patch @@ -0,0 +1,21 @@ +--- a/scripts/update_api.py 2020-09-10 12:51:28.000000000 -0600 ++++ b/scripts/update_api.py 2020-12-25 17:03:00.196777823 -0700 +@@ -1755,15 +1755,15 @@ def write_core_py_preamble(core_py): + # Automatically generated file + import sys, os + import ctypes +-import pkg_resources ++import sysconfig + from .z3types import * + from .z3consts import * + +-_ext = 'dll' if sys.platform in ('win32', 'cygwin') else 'dylib' if sys.platform == 'darwin' else 'so' ++_ext = 'dll' if sys.platform in ('win32', 'cygwin') else 'dylib' if sys.platform == 'darwin' else 'so.@MAJVER@' + _lib = None + _default_dirs = ['.', + os.path.dirname(os.path.abspath(__file__)), +- pkg_resources.resource_filename('z3', 'lib'), ++ sysconfig.get_config_var('LIBDIR'), + os.path.join(sys.prefix, 'lib'), + None] + _all_dirs = [] diff --git a/z3.spec b/z3.spec index 3e0dc73..336c95c 100644 --- a/z3.spec +++ b/z3.spec @@ -1,11 +1,13 @@ Name: z3 Version: 4.8.9 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Satisfiability Modulo Theories (SMT) solver License: MIT URL: https://github.com/Z3Prover/z3 Source0: https://github.com/Z3Prover/z3/archive/%{name}-%{version}.tar.gz +# Change the way python finds the shared object; see bz 1910923 +Patch0: %{name}-python.patch BuildRequires: cmake BuildRequires: doxygen @@ -100,8 +102,10 @@ sed \ -e "s/OCAML_FLAGS = ''/OCAML_FLAGS = '-g'/" \ -i scripts/mk_util.py -# Comply with the Java packaging guidelines +# Comply with the Java packaging guidelines and fill in the version for python +majver=$(cut -d. -f-2 <<< %{version}) sed -e '/libz3java/s,\(System\.load\)Library("\(.*\)"),\1("%{_libdir}/z3/\2.so"),' \ + -e "s/@MAJVER@/$majver/" \ -i scripts/update_api.py # Update an OCaml interface @@ -227,6 +231,9 @@ help2man -N -o %{buildroot}%{_mandir}/man1/%{name}.1 %{_vpath_builddir}/%{name} %{python3_sitelib}/%{name}/ %changelog +* Fri Dec 25 2020 Jerry James - 4.8.9-4 +- Fix the python interface (bz 1910923) + * Mon Nov 16 2020 Jerry James - 4.8.9-3 - Rebuild for ocaml-zarith 1.11