From nobody Sun Jun 25 14:21:02 2023 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QptSN1K8zz4j0BQ for ; Sun, 25 Jun 2023 14:21:08 +0000 (UTC) (envelope-from SRS0=HVTs=CN=quip.cz=000.fbsd@elsa.codelab.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QptSM3Bt4z4J3J; Sun, 25 Jun 2023 14:21:07 +0000 (UTC) (envelope-from SRS0=HVTs=CN=quip.cz=000.fbsd@elsa.codelab.cz) Authentication-Results: mx1.freebsd.org; none Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id B1BFDD78A0; Sun, 25 Jun 2023 16:21:03 +0200 (CEST) Received: from [192.168.145.49] (ip-89-177-27-225.bb.vodafone.cz [89.177.27.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id C5BE9D7899; Sun, 25 Jun 2023 16:21:02 +0200 (CEST) Message-ID: Date: Sun, 25 Jun 2023 16:21:02 +0200 List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: Is it possible to build node package as single executable binary? Content-Language: cs-Cestina, en-US To: Hiroki Tagato , FreeBSD Ports References: <5be6c0d2-5d71-38c9-028a-8ce065102be9@FreeBSD.org> <898f8065-1544-e157-6139-4f1269ab6ddb@FreeBSD.org> From: Miroslav Lachman <000.fbsd@quip.cz> In-Reply-To: <898f8065-1544-e157-6139-4f1269ab6ddb@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4QptSM3Bt4z4J3J X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:42000, ipnet:94.124.104.0/21, country:CZ] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 25/06/2023 10:21, Hiroki Tagato wrote: > Hi, [..] >> Do you know why this packaged "bw" needs /tmp to be executable while >> "bw" installed by "npm install" works with noexec set on /tmp? > > It appears native node modules have to be written on the disk before > being executed. There is an explanatory comment at the following URL: > https://github.com/vercel/pkg/blob/main/prelude/bootstrap.js#L2208 > >> Is there a way to fix it? I really would like to keep /tmp noexec. > > The path the native module written to seems TMPDIR-aware. So one > workaround would be setting TMPDIR somewhere other than "/tmp". Thank you for the explanation, you are right. I tested it on Debian now at it failed the same way. I will remount /tmp or will try to push TMPDIR env in to scripts using "bw". Kind regards Miroslav Lachman