From nobody Wed May 18 19:22:38 2022 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 B2BD31AD8160 for ; Wed, 18 May 2022 19:22:49 +0000 (UTC) (envelope-from list_freebsd@bluerosetech.com) Received: from echo.brtsvcs.net (echo.brtsvcs.net [IPv6:2607:f740:c::4ae]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4L3NDS6l2Cz3pxh; Wed, 18 May 2022 19:22:48 +0000 (UTC) (envelope-from list_freebsd@bluerosetech.com) Received: from chombo.houseloki.net (65-100-43-2.dia.static.qwest.net [65.100.43.2]) by echo.brtsvcs.net (Postfix) with ESMTPS id C582638D31; Wed, 18 May 2022 19:22:41 +0000 (UTC) Received: from [10.26.25.100] (ivy.pas.ds.pilgrimaccounting.com [10.26.25.100]) by chombo.houseloki.net (Postfix) with ESMTPSA id F360F4988; Wed, 18 May 2022 12:22:40 -0700 (PDT) Subject: Re: How to port a PHP application that uses Composer? To: Stefan Esser , Peter Beckman Cc: freebsd-ports@freebsd.org References: <130ec10a-219a-ac8b-06d9-80d31261dd39@bluerosetech.com> <6eaa632a-c56-f1fa-3ae2-b66e14b26ab7@angryox.com> <485d6ba0-abbe-628b-7bcf-9a808960e08e@bluerosetech.com> <35424a18-7483-766d-9d51-fa74825d4a72@FreeBSD.org> From: Mel Pilgrim Message-ID: <33fcfa0c-5e40-7e16-595d-9741677ec65c@bluerosetech.com> Date: Wed, 18 May 2022 12:22:38 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 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 In-Reply-To: <35424a18-7483-766d-9d51-fa74825d4a72@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4L3NDS6l2Cz3pxh X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of list_freebsd@bluerosetech.com designates 2607:f740:c::4ae as permitted sender) smtp.mailfrom=list_freebsd@bluerosetech.com X-Spamd-Result: default: False [-2.29 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[bluerosetech.com]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.989]; NEURAL_HAM_MEDIUM(-1.00)[-0.998]; MLMMJ_DEST(0.00)[freebsd-ports]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:36236, ipnet:2607:f740:c::/48, country:US]; SUBJECT_ENDS_QUESTION(1.00)[]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On 2022-05-17 9:09, Stefan Esser wrote: > Am 17.05.22 um 06:19 schrieb Mel Pilgrim: >> On 2022-05-16 20:14, Peter Beckman wrote: > [...] >>> Consider that it is something the installer needs to do, or build the >>> package as a deterministic set of packages already installed. >> >> Yes, that's exactly the point I'm stuck on.  The fetch-extract-fetch and >> toe-stepping problems mentioned in my original email came from me trying to >> solve this either way: >> >> "If I ran [composer] as part of the pkg building process, there's a >> fetch-extract race as it needs network access, but also a file extracted from >> the distfile. > > You can override the do-fetch target with a more complex sequence of commands. > Those have network access and you could extract the required json file to some > temporary location to let the composer do its job. WRKDIR doesn't exist until the extract phase, and with this approach Composer would need to do all of its work during the fetch phase. Is it okay to create WRKDIR early? Also, would doing this interfere with commands that batch-download distfiles, such as those used by poudriere?