From nobody Thu Nov 24 14:44:20 2022 X-Original-To: freebsd-current@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 4NJ13X5ZQVz4hLg9 for ; Thu, 24 Nov 2022 14:44:24 +0000 (UTC) (envelope-from yuri@aetern.org) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (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 4NJ13X3SlFz4Mtw; Thu, 24 Nov 2022 14:44:24 +0000 (UTC) (envelope-from yuri@aetern.org) Authentication-Results: mx1.freebsd.org; none Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 02B815C0226; Thu, 24 Nov 2022 09:44:23 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 24 Nov 2022 09:44:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aetern.org; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1669301062; x= 1669387462; bh=rCDvtJYKzJ3WiW3lADpECNTxiIkDbpbEgKi79VPRjRU=; b=O 6TNX7bnnOW7SklBwPAXepjoyiuWvBwCztnjeQqa19ibv6nAsDt44MJFpBHeugJDF XKRYpzZr04rcvJ+kHobGuvBpBvR79cHaEwg9pPDGOAxyMEve3HhHlf6+y5kkDC4K XGbKuejpoKeqKBVPg9mecyYmu2C3d7ou+ooAOy4CW6URH5qY6+DCIHwMAo6QXwIP 5G3PgD1h1XP+egSpG4k2LCIHSwU66M5pCBfa+mn7p/xefH4rJG2aYW/IIfDpOdUH OCu5nPnYPiecSew8O6bSv7xuz8NRbp3dRynY+DKmm2dPt7dv6L33TFXQH/dXwUFl DhGaEVG2aztQqThh+zrBg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1669301062; x= 1669387462; bh=rCDvtJYKzJ3WiW3lADpECNTxiIkDbpbEgKi79VPRjRU=; b=V RY12vs4DmgyVls5d9jhh8lGzgYRP3RQSi4ETunFVlgdJYqt6MX67tsdK7PgG6D16 JSsXZOqXT4E1OUBTJ4spzrZG41lIzjk1Jolxq98lMPU5w3k/hQdlf31opK+uBe3U QKtAbX+9ab89XOaaMYNOyQ4JMP1sE7K+HRoKAF6VCXqam69xr991qhJEh8LWWJab 2QJRo7OPp8/VL/6ezTJTWZyBHFaTLqQjRYpGbrWYxfY1bNAcpvzoa1JONX2z9jDu xbOjajGrq6rPf+QRsZe4MqgGzsQV4v1Alg7/2KWjf35OwNO8iNOZVYFG1Mrxqncf 3Jb7HZOXiZ2SQphoGKdaQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrieefgdeikecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtke ertddtfeejnecuhfhrohhmpegjuhhrihcuoeihuhhrihesrggvthgvrhhnrdhorhhgqeen ucggtffrrghtthgvrhhnpedufeejkeevveevtddvleejhfeftdektdeghefgheeihfduff dthedtkeetuedtieenucffohhmrghinhepphhorhhtrdhmkhdpshhusgguihhrrdhmkhen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpeihuhhrih esrggvthgvrhhnrdhorhhg X-ME-Proxy: Feedback-ID: i0d79475b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 24 Nov 2022 09:44:22 -0500 (EST) Message-ID: <0d99e994-4f37-f4b5-22b2-ed4418faa239@aetern.org> Date: Thu, 24 Nov 2022 15:44:20 +0100 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: buildkernel doesn't respect PORTSDIR with PORTS_MODULES Content-Language: en-US To: Juraj Lutter , garyj@gmx.de Cc: freebsd-current@freebsd.org References: <20221124150532.1a231863@ernst.home> <1F9E0B41-A7A8-4D81-9777-2AB4FC1F5E8F@FreeBSD.org> From: Yuri In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4NJ13X3SlFz4Mtw X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:19151, ipnet:66.111.4.0/24, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N Juraj Lutter wrote: > > >> On 24 Nov 2022, at 15:16, Juraj Lutter wrote: >>> >>> bsd.port.mk and bsd.port.subdir.mk use _PORTSDIR. You could try adding >>> that to your list. >>> >> >> PORTS_MODULES are being built from within kern.post.mk. I’d put PORTSDIR into src-env.conf instead of /etc/src.conf, for that purpose. > > Fingers are quicker than the brain: I’d put PORTSDIR into /etc/src.conf instead of /etc/make.conf for that purpose. Does it work for you? I have tried putting it in all of the /etc/src.conf, /etc/src-env.conf, and /etc/make.conf; still /usr/ports is being used. Looks like the expansion does not happen properly (for me, at least) in kern.post.mk and the following seems to help (with PORTSDIR specified in one of those 3 conf files or in environment): diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index d08dfe30d7d..7b208510483 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -133,7 +133,7 @@ PORTSMODULESENV=\ all: .for __i in ${PORTS_MODULES} @${ECHO} "===> Ports module ${__i} (all)" - cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B clean build + cd ${PORTSDIR:U/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B clean build .endfor .for __target in install reinstall clean @@ -141,7 +141,7 @@ ${__target}: ports-${__target} ports-${__target}: .for __i in ${PORTS_MODULES} @${ECHO} "===> Ports module ${__i} (${__target})" - cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/(re)?install/deinstall reinstall/} + cd ${PORTSDIR:U/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/(re)?install/deinstall reinstall/} .endfor .endfor .endif