diff options
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/contrib/src/wasi-sysroot/Makefile | 1 | ||||
-rw-r--r-- | pkg/contrib/src/wasi-sysroot/SHA512SUMS | 2 | ||||
-rw-r--r-- | pkg/contrib/src/wasi-sysroot/version | 2 | ||||
-rw-r--r-- | pkg/contrib/src/wasmtime/Makefile | 13 | ||||
-rw-r--r-- | pkg/contrib/src/wasmtime/SHA512SUMS | 2 | ||||
-rw-r--r-- | pkg/contrib/src/wasmtime/version | 2 | ||||
-rw-r--r-- | pkg/deb/Makefile.wasm | 18 | ||||
-rw-r--r-- | pkg/rpm/Makefile.wasm | 22 |
8 files changed, 41 insertions, 21 deletions
diff --git a/pkg/contrib/src/wasi-sysroot/Makefile b/pkg/contrib/src/wasi-sysroot/Makefile index fcfb8df3..a02a6591 100644 --- a/pkg/contrib/src/wasi-sysroot/Makefile +++ b/pkg/contrib/src/wasi-sysroot/Makefile @@ -12,6 +12,7 @@ $(TARBALLS)/wasi-sysroot-$(WASI_SYSROOT_VERSION_MAJOR).$(WASI_SYSROOT_VERSION_MI wasi-sysroot: wasi-sysroot-$(WASI_SYSROOT_VERSION_MAJOR).$(WASI_SYSROOT_VERSION_MINOR).tar.gz .sum-wasi-sysroot $(UNPACK) + $(MOVE) .wasi-sysroot: wasi-sysroot touch $@ diff --git a/pkg/contrib/src/wasi-sysroot/SHA512SUMS b/pkg/contrib/src/wasi-sysroot/SHA512SUMS index a1e71fff..ffb6e23f 100644 --- a/pkg/contrib/src/wasi-sysroot/SHA512SUMS +++ b/pkg/contrib/src/wasi-sysroot/SHA512SUMS @@ -1 +1 @@ -ad4ad629d02f01f3d2eb977dd0bc43091b0f11ed1b5dd9fdb3580e4cf49c132f6cb4982ae80eabf638f0d08d0c4c7df40cceb2be8f9d2c29abc35b8564ffda42 wasi-sysroot-20.0.tar.gz +6bf138fc90feccc0cfa2683d164a0c8cfb973b5105675ff53b87628d8775676a8eb383d225ca4b55d6f0f800d167a605ee569978a2048b3dab8d01672a408d7a wasi-sysroot-24.0.tar.gz diff --git a/pkg/contrib/src/wasi-sysroot/version b/pkg/contrib/src/wasi-sysroot/version index 919c7098..ed18dd4b 100644 --- a/pkg/contrib/src/wasi-sysroot/version +++ b/pkg/contrib/src/wasi-sysroot/version @@ -1,2 +1,2 @@ -WASI_SYSROOT_VERSION_MAJOR := 20 +WASI_SYSROOT_VERSION_MAJOR := 24 WASI_SYSROOT_VERSION_MINOR := 0 diff --git a/pkg/contrib/src/wasmtime/Makefile b/pkg/contrib/src/wasmtime/Makefile index 11797fee..2a6e8abf 100644 --- a/pkg/contrib/src/wasmtime/Makefile +++ b/pkg/contrib/src/wasmtime/Makefile @@ -11,10 +11,6 @@ else CARGO = $(error Cargo (Rust package manager) not found) endif -ifeq ($(shell uname -s),Linux) -WASMTIME_ARGS=-Clink-arg=-Wl,-soname,libwasmtime.so -endif - $(TARBALLS)/wasmtime-v$(WASMTIME_VERSION)-src.tar.gz: $(call download_pkg,$(WASMTIME_URL),wasmtime) @@ -25,6 +21,11 @@ wasmtime: wasmtime-v$(WASMTIME_VERSION)-src.tar.gz .sum-wasmtime $(MOVE) .wasmtime: wasmtime - cd $< && $(CARGO) rustc --release -p wasmtime-c-api -- $(WASMTIME_ARGS) - cp $</crates/c-api/wasm-c-api/include/wasm.h $</crates/c-api/include/ + cd $< && cmake \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -S crates/c-api \ + -B target/c-api \ + --install-prefix "$(TOPSRC)/wasmtime/artifacts" + cd $< && cmake --build target/c-api + cd $< && cmake --install target/c-api touch $@ diff --git a/pkg/contrib/src/wasmtime/SHA512SUMS b/pkg/contrib/src/wasmtime/SHA512SUMS index 35e0e47f..fc1ba863 100644 --- a/pkg/contrib/src/wasmtime/SHA512SUMS +++ b/pkg/contrib/src/wasmtime/SHA512SUMS @@ -1 +1 @@ -4b67ba0742da0558efffe1dbde5512dc5f0201fad25f1027d277758e76778b2add11528dbe3f5b7759f2386859b52aea3a0526abaa481c2ed91eb56c5a531b49 wasmtime-v11.0.1-src.tar.gz +2ce3979f772176350a2c4694cfd24c241c426d453d99f8620424b25ef1373ea5be06370c8199f3bd5a46f0ba1a4cd4b702a359efc969d5eaf1e9e78543c5900a wasmtime-v24.0.0-src.tar.gz diff --git a/pkg/contrib/src/wasmtime/version b/pkg/contrib/src/wasmtime/version index 1debf1ff..d418b456 100644 --- a/pkg/contrib/src/wasmtime/version +++ b/pkg/contrib/src/wasmtime/version @@ -1 +1 @@ -WASMTIME_VERSION := 11.0.1 +WASMTIME_VERSION := 24.0.0 diff --git a/pkg/deb/Makefile.wasm b/pkg/deb/Makefile.wasm index 8f3fdc67..de89841e 100644 --- a/pkg/deb/Makefile.wasm +++ b/pkg/deb/Makefile.wasm @@ -6,14 +6,19 @@ MODULE_SUMMARY_wasm= WASM module for NGINX Unit MODULE_VERSION_wasm= $(VERSION) MODULE_RELEASE_wasm= 1 -MODULE_CONFARGS_wasm= wasm --include-path=\$$(CURDIR)/pkg/contrib/wasmtime/crates/c-api/include --lib-path=\$$(CURDIR)/pkg/contrib/wasmtime/target/release \&\& ./configure wasm-wasi-component -MODULE_MAKEARGS_wasm= wasm wasm-wasi-component CFLAGS=\"\$$(shell grep ^CFLAGS \$$(BUILDDIR_\$$*)/build/Makefile | cut -d' ' -f 3-) -Wno-missing-prototypes\" -MODULE_INSTARGS_wasm= wasm-install wasm-wasi-component-install +MODULE_CONFARGS_wasm= wasm-wasi-component +MODULE_MAKEARGS_wasm= wasm-wasi-component CFLAGS=\"\$$(shell grep ^CFLAGS \$$(BUILDDIR_\$$*)/build/Makefile | cut -d' ' -f 3-) -Wno-missing-prototypes\" +MODULE_INSTARGS_wasm= wasm-wasi-component-install + +ifeq (,$(findstring $(CODENAME),bullseye focal)) +MODULE_CONFARGS_wasm+= \&\& ./configure wasm --include-path=\$$(CURDIR)/pkg/contrib/wasmtime/artifacts/include --lib-path=\$$(CURDIR)/pkg/contrib/wasmtime/artifacts/lib +MODULE_MAKEARGS_wasm+= wasm +MODULE_INSTARGS_wasm+= wasm-install MODULE_SOURCES_wasm= -BUILD_DEPENDS_wasm= -MODULE_BUILD_DEPENDS_wasm= +BUILD_DEPENDS_wasm= cmake +MODULE_BUILD_DEPENDS_wasm=,cmake MODULE_DEPENDS_wasm= BUILD_DEPENDS+= $(BUILD_DEPENDS_wasm) @@ -29,9 +34,10 @@ export MODULE_PREINSTALL_wasm define MODULE_POSTINSTALL_wasm mkdir -p debian/unit-wasm/usr/lib/\$$(dpkg-architecture -q DEB_HOST_MULTIARCH)/ - install -m 755 -p pkg/contrib/wasmtime/target/release/libwasmtime.so debian/unit-wasm/usr/lib/\$$(dpkg-architecture -q DEB_HOST_MULTIARCH)/ + install -m 755 -p pkg/contrib/wasmtime/artifacts/lib/libwasmtime.so debian/unit-wasm/usr/lib/\$$(dpkg-architecture -q DEB_HOST_MULTIARCH)/ endef export MODULE_POSTINSTALL_wasm +endif define MODULE_POST_wasm cat <<BANNER diff --git a/pkg/rpm/Makefile.wasm b/pkg/rpm/Makefile.wasm index cb2ad35a..fe5c6808 100644 --- a/pkg/rpm/Makefile.wasm +++ b/pkg/rpm/Makefile.wasm @@ -6,13 +6,18 @@ MODULE_SUMMARY_wasm= WASM module for NGINX Unit MODULE_VERSION_wasm= $(VERSION) MODULE_RELEASE_wasm= 1 -MODULE_CONFARGS_wasm= wasm --include-path=\`pwd\`/pkg/contrib/wasmtime/crates/c-api/include --lib-path=\`pwd\`/pkg/contrib/wasmtime/target/release \&\& ./configure wasm-wasi-component -MODULE_MAKEARGS_wasm= wasm wasm-wasi-component CFLAGS=\"\$$(grep ^CFLAGS build/Makefile | cut -d' ' -f 3-) -Wno-missing-prototypes\" -MODULE_INSTARGS_wasm= wasm-install wasm-wasi-component-install +MODULE_CONFARGS_wasm= wasm-wasi-component +MODULE_MAKEARGS_wasm= wasm-wasi-component CFLAGS=\"\$$(grep ^CFLAGS build/Makefile | cut -d' ' -f 3-) -Wno-missing-prototypes\" +MODULE_INSTARGS_wasm= wasm-wasi-component-install + +ifeq (,$(findstring $(OSVER),amazonlinux2)) +MODULE_CONFARGS_wasm+= \&\& ./configure wasm --include-path=\`pwd\`/pkg/contrib/wasmtime/artifacts/include --lib-path=\`pwd\`/pkg/contrib/wasmtime/artifacts/lib +MODULE_MAKEARGS_wasm+= wasm +MODULE_INSTARGS_wasm+= wasm-install MODULE_SOURCES_wasm= -BUILD_DEPENDS_wasm= +BUILD_DEPENDS_wasm= cmake BUILD_DEPENDS+= $(BUILD_DEPENDS_wasm) @@ -22,16 +27,23 @@ endef export MODULE_PREBUILD_wasm define MODULE_PREINSTALL_wasm +\# brp-mangle-shebangs parses all executable files for a shebang +\# this fails on a vendored code that somehow ships with exec bit enabled +find pkg/contrib/wasmtime/ -type f -executable -name "*.rs" | xargs chmod -x endef export MODULE_PREINSTALL_wasm define MODULE_POSTINSTALL_wasm -%{__install} -m 755 -p pkg/contrib/wasmtime/target/release/libwasmtime.so %{buildroot}%{_libdir}/ +%{__install} -m 755 -p pkg/contrib/wasmtime/artifacts/lib/libwasmtime.so %{buildroot}%{_libdir}/ endef export MODULE_POSTINSTALL_wasm +endif define MODULE_FILES_wasm +%if 0%{?amzn2} +%else %{_libdir}/libwasmtime.so +%endif %{_libdir}/unit/modules/* %{_libdir}/unit/debug-modules/* endef |