From nobody Fri Jun 09 18:38:20 2023 X-Original-To: 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 4Qd8wr0hcxz4c60w for ; Fri, 9 Jun 2023 18:38:36 +0000 (UTC) (envelope-from pete@nomadlogic.org) Received: from mail.nomadlogic.org (mail.nomadlogic.org [66.165.241.226]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.nomadlogic.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qd8wp0Tzzz44r2 for ; Fri, 9 Jun 2023 18:38:33 +0000 (UTC) (envelope-from pete@nomadlogic.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=nomadlogic.org header.s=04242021 header.b=xu3DHaoC; spf=pass (mx1.freebsd.org: domain of pete@nomadlogic.org designates 66.165.241.226 as permitted sender) smtp.mailfrom=pete@nomadlogic.org; dmarc=pass (policy=quarantine) header.from=nomadlogic.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nomadlogic.org; s=04242021; t=1686335904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TBy9hnHS2rnMH8hUxWsESGIqWuJFJTRl4VL6U/5LOkI=; b=xu3DHaoCWlOs89/aMeFnWnxEgzQlL1YyyvQgMWhGS+ieCxlSxsgxKvCW7MaBdizMr1AnuV a9/dD7DqcWhuS7wv8KTnfsuwZweri4TzXEtaQ3LsqTvrSm4wOnL7oGnEe588bxQk4WoUE6 vPU9GfPbusCbPvBMicr5N0iXp/E+gzU= Received: from [192.168.1.160] (cpe-24-24-168-214.socal.res.rr.com [24.24.168.214]) by mail.nomadlogic.org (OpenSMTPD) with ESMTPSA id 71ebf060 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Fri, 9 Jun 2023 18:38:21 +0000 (UTC) Message-ID: <7dcd37f0-52a5-153b-1640-bb26f267cd3c@nomadlogic.org> Date: Fri, 9 Jun 2023 11:38:20 -0700 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.11.2 Subject: Re: Guidance on creating a port for an npm installed tool Content-Language: en-US To: ports@freebsd.org References: From: Pete Wright In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_HAM_SHORT(-1.00)[-0.999]; DMARC_POLICY_ALLOW(-0.50)[nomadlogic.org,quarantine]; R_DKIM_ALLOW(-0.20)[nomadlogic.org:s=04242021]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; BLOCKLISTDE_FAIL(0.00)[24.24.168.214:server fail,66.165.241.226:server fail]; ASN(0.00)[asn:29802, ipnet:66.165.240.0/22, country:US]; MLMMJ_DEST(0.00)[ports@freebsd.org]; DKIM_TRACE(0.00)[nomadlogic.org:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; TO_DN_NONE(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[ports@freebsd.org]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4Qd8wp0Tzzz44r2 X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N On 6/9/23 11:11, Patrick M. Hausen wrote: > Hi all, > > is there some general guide on how to go about creating a port > for anything implemented in node.js and using npm to download > all sorts of dependencies at build/install time? > > I'd like to see a port of this: > https://github.com/louislam/uptime-kuma > > Similarly a port of mineos would be awesome. > > Cloning from Github and running npm works and delivers a > functional installation in ${WRKSRC} ... > > What now? > > I did not find any detailled help in the handbook or by searching. > There seems to be a general method if all modules are available > in npm (they have a repository it seems). > > But what with products like these? > > For Go applications there are very convenient tools to get > all the dependencies into the port Makefile and do it in a clean way. > > Section 6.5.8 here: > https://docs.freebsd.org/en/books/porters-handbook/special/#building > > So any help with porting these would be greatly appreciated. i've had to build node/js code in the past internally and i've found that whole ecosystem is awkward at best to work with (ports or not). i did poke around the ports tree just now and found www/hedgedoc which makes use of yarn for building, it may be worth taking a look at that Makefile for inspiration.  for my internal pkgs i did something similar that is in the "do-build" section iirc. -pete -- Pete Wright pete@nomadlogic.org @nomadlogicLA