diff --git a/www/unit-wasm/Makefile b/www/unit-wasm/Makefile index fb3890528bc3..f919d9be0dc9 100644 --- a/www/unit-wasm/Makefile +++ b/www/unit-wasm/Makefile @@ -1,35 +1,35 @@ PKGNAMESUFFIX= -${UNIT_MODNAME} -PORTREVISION= 2 +PORTREVISION= 3 UNIT_MODNAME= wasm COMMENT= WASM module for NGINX Unit PLIST_FILES= libexec/unit/modules/${UNIT_MODNAME}.unit.so RUN_DEPENDS= unitd:www/unit LIB_DEPENDS= libwasmtime.so:devel/libwasmtime USE_RC_SUBR?= # reset to empty MASTERDIR= ${.CURDIR}/../unit post-configure: cd ${CONFIGURE_WRKSRC} && \ ${SETENV} ${CONFIGURE_ENV} ${CONFIGURE_CMD} wasm \ --module=${UNIT_MODNAME} \ --include-path=${PREFIX}/include \ --lib-path=${PREFIX}/lib do-build: cd ${CONFIGURE_WRKSRC} && \ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} \ ${MAKEFILE} ${MAKE_ARGS} ${UNIT_MODNAME} do-install: ${MKDIR} ${STAGEDIR}${PREFIX}/libexec/unit/modules/ ${INSTALL_LIB} ${WRKSRC}/build/lib/unit/modules/${UNIT_MODNAME}.unit.so \ ${STAGEDIR}${PREFIX}/libexec/unit/modules/ .include "${MASTERDIR}/Makefile" diff --git a/www/unit/files/patch-src_wasm_nxt__rt__wasmtime.c b/www/unit/files/patch-src_wasm_nxt__rt__wasmtime.c index efa08aa8e823..702c2f4fdda5 100644 --- a/www/unit/files/patch-src_wasm_nxt__rt__wasmtime.c +++ b/www/unit/files/patch-src_wasm_nxt__rt__wasmtime.c @@ -1,13 +1,13 @@ --- src/wasm/nxt_rt_wasmtime.c.orig 2024-11-22 14:57:14.033949000 -0500 +++ src/wasm/nxt_rt_wasmtime.c 2024-11-22 14:56:05.796918000 -0500 @@ -281,7 +281,9 @@ wasi_config_inherit_stderr(wasi_config); for (dir = ctx->dirs; dir != NULL && *dir != NULL; dir++) { - wasi_config_preopen_dir(wasi_config, *dir, *dir); + wasi_config_preopen_dir(wasi_config, *dir, *dir, -+ WASMTIME_WASI_DIR_PERMS_READ, -+ WASMTIME_WASI_FILE_PERMS_READ); ++ WASMTIME_WASI_DIR_PERMS_WRITE, ++ WASMTIME_WASI_FILE_PERMS_WRITE); } error = wasmtime_context_set_wasi(rt_ctx->ctx, wasi_config);