diff --git a/.gitignore b/.gitignore index ed7fbe6..c6f4ac3 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,6 @@ /wabt-testsuite-2a2099d.tar.gz /wabt-1.0.12.tar.gz /wabt-testsuite-a4a48e8.tar.gz +/wabt-1.0.13.tar.gz +/wabt-testsuite-c7225cc.tar.gz +/wabt-wasm-c-api-d9a8009.tar.gz diff --git a/sources b/sources index 9f445fc..be2483f 100644 --- a/sources +++ b/sources @@ -1,2 +1,3 @@ -SHA512 (wabt-1.0.12.tar.gz) = 48ab1819efbfe0151d9b1a66c2155fd11d6d3841761a949cc26329a1b51ebcc91ba07e9f18c5fd9df8bef28e7b56e1564b82398bdee19dda730019f74d2a8ec0 -SHA512 (wabt-testsuite-a4a48e8.tar.gz) = c30d672121dd82698850f5e971ede3adddf20aee72fb60e2ca73884a1635d3bdb0d78ba340e42409389c48534a88a13af8cefa2e782c91382d114d7cb55d809c +SHA512 (wabt-1.0.13.tar.gz) = b051e7254877ccef131d6f8b26ab5587ac9c72e0cafb60e160889c7e8731f35dbb2a3488fd57f878c68006695d635eccc186738a23a6bc9747993daf3e17a6d7 +SHA512 (wabt-testsuite-c7225cc.tar.gz) = 687ef3984d6e06a06e358e8d6eea602c48da4c7b6a4e5cb7f04c110997a222f7d3a7bbe188ccd8263e20fe2af8b6ffd82a6366b8c6ef09fcba84ab49e9bc9d78 +SHA512 (wabt-wasm-c-api-d9a8009.tar.gz) = b6ee7d2d83a3ca7b3cb3ee110282f7d32eada1d9020cadd3fdec58f40478879fd9ac9fada526021d8f6e8a26e1df7353df313d4149be2ffe4aea3a28f856fd89 diff --git a/wabt-nogit.patch b/wabt-nogit.patch new file mode 100644 index 0000000..b81032c --- /dev/null +++ b/wabt-nogit.patch @@ -0,0 +1,26 @@ +diff -up wabt-1.0.13/CMakeLists.txt.nogit wabt-1.0.13/CMakeLists.txt +--- wabt-1.0.13/CMakeLists.txt.nogit 2020-01-16 23:53:11.000000000 +0100 ++++ wabt-1.0.13/CMakeLists.txt 2020-03-20 19:20:38.298804283 +0100 +@@ -69,21 +69,7 @@ include(CheckTypeSize) + check_type_size(ssize_t SSIZE_T) + check_type_size(size_t SIZEOF_SIZE_T) + +-FIND_PACKAGE(Git QUIET REQUIRED) +-EXECUTE_PROCESS(COMMAND +- "${GIT_EXECUTABLE}" --git-dir=${CMAKE_CURRENT_SOURCE_DIR}/.git describe --tags +- RESULT_VARIABLE +- GIT_HASH_RESULT +- OUTPUT_VARIABLE +- GIT_HASH +- OUTPUT_STRIP_TRAILING_WHITESPACE) +- +-IF(${GIT_HASH_RESULT} EQUAL 0) +- SET(WABT_VERSION_INFO "${GIT_HASH}") +-ELSE() +- MESSAGE(WARNING "Error running git describe to determine version") +- SET(WABT_VERSION_INFO "(unable to determine version)") +-ENDIF() ++SET(WABT_VERSION_INFO "1.0.13") + + configure_file( + ${WABT_SOURCE_DIR}/src/config.h.in diff --git a/wabt-python.patch b/wabt-python.patch deleted file mode 100644 index 6f8a640..0000000 --- a/wabt-python.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up wabt-1.0.10/CMakeLists.txt.orig wabt-1.0.10/CMakeLists.txt ---- wabt-1.0.10/CMakeLists.txt.orig 2019-03-15 12:53:00.645283108 +0100 -+++ wabt-1.0.10/CMakeLists.txt 2019-03-15 12:55:50.734311159 +0100 -@@ -425,7 +425,7 @@ if (NOT EMSCRIPTEN) - endif () - - # test running -- find_package(PythonInterp 2.7 REQUIRED) -+ find_package(Python COMPONENTS Interpreter REQUIRED) - set(RUN_TESTS_PY ${WABT_SOURCE_DIR}/test/run-tests.py) - add_custom_target(run-tests - COMMAND ${CMAKE_BINARY_DIR}/wabt-unittests -diff -up wabt-1.0.12/test/run-spec-wasm2c.py.orig wabt-1.0.12/test/run-spec-wasm2c.py ---- wabt-1.0.12/test/run-spec-wasm2c.py.orig 2019-09-25 23:04:14.000000000 +0200 -+++ wabt-1.0.12/test/run-spec-wasm2c.py 2019-10-09 10:14:41.905966919 +0200 -@@ -98,6 +98,8 @@ def MangleName(s): - result = 'Z_' - for c in s.encode('utf-8'): - # NOTE(binji): Z is not allowed. -+ if type(c) == int: -+ c=chr(c) - if c in '_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXY0123456789': - result += c - else: diff --git a/wabt.spec b/wabt.spec index 33b6cd1..22764cf 100644 --- a/wabt.spec +++ b/wabt.spec @@ -1,17 +1,19 @@ %bcond_without check -%global ts_commit a4a48e88108d555fed8a0a5e7564814468efe1b7 +%global ts_commit c7225cc210e9a089e7ce87ecac053334eb4af0aa %global ts_shortcommit %(c=%{ts_commit}; echo ${c:0:7}) +%global wc_commit d9a80099d496b5cdba6f3fe8fc77586e0e505ddc +%global wc_shortcommit %(c=%{wc_commit}; echo ${c:0:7}) Summary: The WebAssembly Binary Toolkit Name: wabt -Version: 1.0.12 +Version: 1.0.13 Release: 1%{?dist} URL: https://github.com/WebAssembly/wabt Source0: https://github.com/WebAssembly/wabt/archive/%{version}/%{name}-%{version}.tar.gz Source1: https://github.com/WebAssembly/testsuite/archive/%{ts_commit}/%{name}-testsuite-%{ts_shortcommit}.tar.gz -# Fix python detection and port to python3 -# https://github.com/WebAssembly/wabt/issues/1181 -Patch2: wabt-python.patch +Source2: https://github.com/WebAssembly/wasm-c-api/archive/%{wc_commit}/%{name}-wasm-c-api-%{wc_shortcommit}.tar.gz +# hard-code version instead of using git for release tarball +Patch0: wabt-nogit.patch License: ASL 2.0 BuildRequires: cmake BuildRequires: gcc-c++ @@ -20,6 +22,8 @@ BuildRequires: gtest-devel BuildRequires: python3-ply BuildRequires: %{_bindir}/pathfix.py %endif +# wasm.h from https://github.com/WebAssembly/wasm-c-api/ is used for build +Provides: bundled(wasm-c-api) = %{wc_commit} %description WABT (we pronounce it "wabbit") is a suite of tools for WebAssembly. These tools @@ -33,17 +37,23 @@ with the spec (e.g. 1:1 round-trips with no changes to instructions). %prep %setup -q -%patch2 -p1 +%patch0 -p1 %if %{with check} -rmdir third_party/testsuite +rmdir third_party/{testsuite,wasm-c-api} tar xzf %{S:1} -C third_party mv third_party/testsuite{-%{ts_commit},} +tar xzf %{S:2} -C third_party +mv third_party/wasm-c-api{-%{wc_commit},} pathfix.py -i "%{__python3} -Es" -p test/*.py pushd test # https://github.com/WebAssembly/wabt/issues/1044 # https://github.com/WebAssembly/wabt/issues/1045 # https://github.com/WebAssembly/wabt/issues/1063 pushd wasm2c/spec +# https://github.com/WebAssembly/wabt/issues/1365 +%ifarch armv7hl +rm skip-stack-guard-page.txt +%endif %ifarch i686 ppc64 ppc64le rm conversions.txt %endif @@ -60,8 +70,6 @@ popd rm spec/{conversions.txt,nontrapping-float-to-int-conversions/conversions.txt} rm wasm2c/spec/f{32,64}.txt %endif -# https://github.com/WebAssembly/wabt/issues/1180 -rm regress/regress-30.txt popd %endif @@ -80,7 +88,7 @@ cd build # ~250 tests fail on big-endian arches %ifnarch ppc64 s390x %check -test/run-tests.py -v --timeout=20 %{?_smp_mflags} +test/run-tests.py -v --timeout=40 %{?_smp_mflags} %endif %endif @@ -88,6 +96,7 @@ test/run-tests.py -v --timeout=20 %{?_smp_mflags} %license LICENSE %doc README.md %{_bindir}/spectest-interp +%{_bindir}/wasm-decompile %{_bindir}/wasm-interp %{_bindir}/wasm-objdump %{_bindir}/wasm-opcodecnt @@ -99,6 +108,7 @@ test/run-tests.py -v --timeout=20 %{?_smp_mflags} %{_bindir}/wat-desugar %{_bindir}/wat2wasm %{_mandir}/man1/spectest-interp.1* +%{_mandir}/man1/wasm-decompile.1* %{_mandir}/man1/wasm-interp.1* %{_mandir}/man1/wasm-objdump.1* %{_mandir}/man1/wasm-opcodecnt.1* @@ -111,6 +121,12 @@ test/run-tests.py -v --timeout=20 %{?_smp_mflags} %{_mandir}/man1/wat2wasm.1* %changelog +* Fri Mar 20 2020 Dominik Mierzejewski 1.0.13-1 +- update to 1.0.13 (#1792557) +- drop obsolete patch and work-arounds +- bundle wasm-c-api (only wasm.h used for build) +- double test timeout again to prevent failures on armv7hl + * Sat Sep 28 2019 Dominik Mierzejewski 1.0.12-1 - update to 1.0.12 (#1755644) - drop obsolete patch