From nobody Mon Jul 1 18:42:47 2024 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 4WCZfc6hfyz5QM6D for ; Mon, 01 Jul 2024 18:42:48 +0000 (UTC) (envelope-from DutchDaemon@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WCZfc66Fjz4hc6 for ; Mon, 1 Jul 2024 18:42:48 +0000 (UTC) (envelope-from DutchDaemon@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719859368; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=1rRQ+BZ7hVPzJCA2v4vTRtZdxhbHYPs+Vt+kdR0oCD4=; b=hLgMfdGGEKQtzLiGfsMOZL5GOwsarlvA/YPCnhkmJCLA+ZR8Uixp+DtlKfxZ0CbQKZgiH5 u9h/xOb9stew7NZNP69ulw1uaf6kf7CKu/MHpfKg0AM1tvb3jQI46mOSmCv1iE/1/O8Eg+ 4UgOFuugPV8/2tQhmtuV94gy6MAzebnjnz21/Wb+fC032/OVyZiFco2VxGf9w0n+40uBSn KarzgU225TXTvc6fNNrT+ePf0e2bZuduBwPXBecd2zEvaBOH8O9ThQY32JmIEE71Hv22Hj 6rzNtQPRmRjAQKTUkEqIPXknOhwA5gwOmS4FVuinv2fg4iaxCvgCPyLEHYLNVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719859368; a=rsa-sha256; cv=none; b=X3Q1+7HLpfUr47pIkhvIpv5juZxlF3EQtqEGLAyR8/WZWG/fuMiBvMmYWqM2B50/trXbfZ Jj7YF4sNfYQHsmNjNwnoqQw5dXvLfhcAj1zvQM3OgszRGR2b8X59hQHJCAF+9AZq95m+RT vKMO1tMtNWZYU+xB5UPFdWrYGBakbbZFGJW/ar/Lw8JzdJ8a7QI9+tfR3QFgBFXzn4eKyi G6f+mLK62Npu1E63lz7IMFtVC+EzPye0AZfZGzU8WW2zQqEMElR4YVulXM3wRmP5PdH3Rp cn9Hs/R+cAuGt5GcHUJ3bzrpkLAT4Gddt5p3rwt8rYyXYrSCAtyATDh5momLiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719859368; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=1rRQ+BZ7hVPzJCA2v4vTRtZdxhbHYPs+Vt+kdR0oCD4=; b=BnPUY+o7MPTSQDgoPOrf9t6W5f32dndHNbqeMipcswn++ZjTmqIAq0C/jYxW85wECvemJt sWNH3NSO5wgc3icEEy0cxP7Z7NYrVam9Me4cJy48td29ZVyZqtKiY/wObyHvLrbMuDau7G YkYDAu2n/UkEqGgUfrMIVgmbX1yWqKr0+S2oehOi4sHeBS5BxAtGvyT3bZiJpy/kjJdexs F0nZERrhzSiXwN7KbmdXeox6fgzcCtnI1Kl1UN9xs3cll81VNb6O/WJDOk0Es9mjikk4lw d8a7YL3fcCQ0Udj/pE+Eod3imeyh3OVQScGljszA2KSMCDicZS3pzRz3Dp9OeQ== Received: from [192.168.178.243] (unknown [85.148.89.7]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) (Authenticated sender: dutchdaemon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WCZfc4SdBzTTg for ; Mon, 1 Jul 2024 18:42:48 +0000 (UTC) (envelope-from DutchDaemon@FreeBSD.org) Message-ID: <748eaf90-6c2d-41e3-8334-88458c21b7c3@FreeBSD.org> Date: Mon, 1 Jul 2024 20:42:47 +0200 List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-ports@freebsd.org Sender: owner-freebsd-ports@FreeBSD.org MIME-Version: 1.0 User-Agent: Betterbird (Windows) Subject: Re: Can `pkg prime-origins` be "trained" to pick up flavors? To: ports@freebsd.org References: <20240702022215.86f678352bf5d7c6bf3dea4d@dec.sakura.ne.jp> Content-Language: en-US From: DutchDaemon - FreeBSD Forums Administrator Autocrypt: addr=DutchDaemon@FreeBSD.org; keydata= xjMEZa5xHxYJKwYBBAHaRw8BAQdAfWZ69PhvjxSC5/RYQaU5TFyz+SENz3Oi0fkdJIISjGHN RER1dGNoRGFlbW9uIC0gRnJlZUJTRCBGb3J1bXMgQWRtaW5pc3RyYXRvciA8RHV0Y2hEYWVt b25ARnJlZUJTRC5vcmc+wokEExYIADEWIQSDIpfQllw48uFsWk/r4FMJZEPckQUCZa5xHwIb AwQLCQgHBRUICQoLBRYCAwEAAAoJEOvgUwlkQ9yRf7EBAMinyZF8zVzNuHpeKdGPHVZcNqBj 1H192nmduRSxejFnAP490W4kl7pwtdpMVrX7iJqkWanO2L0kWlig7csNIi5nAs44BGWucR8S CisGAQQBl1UBBQEBB0Ajr12wp47yOqDF5v8c+VC9pklim0qa1FrqxTMaA1kUJAMBCAfCeAQY FggAIBYhBIMil9CWXDjy4WxaT+vgUwlkQ9yRBQJlrnEfAhsMAAoJEOvgUwlkQ9yRsg0A/1UY CnRZEZOesZgnpCTuERpnJR5chIY9Y1bxUSxTerF7AP9x+CE28IZ7xFZfwHiss0VaDvQhNG08 NzNJHBSshFjtBQ== Organization: The FreeBSD Forums In-Reply-To: <20240702022215.86f678352bf5d7c6bf3dea4d@dec.sakura.ne.jp> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------R98uWw006MN2MhwsQ8pT93Fb" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------R98uWw006MN2MhwsQ8pT93Fb Content-Type: multipart/mixed; boundary="------------3M9H87J3oHWHN7zSiDV6hkI9"; protected-headers="v1" From: DutchDaemon - FreeBSD Forums Administrator To: ports@freebsd.org Message-ID: <748eaf90-6c2d-41e3-8334-88458c21b7c3@FreeBSD.org> Subject: Re: Can `pkg prime-origins` be "trained" to pick up flavors? References: <20240702022215.86f678352bf5d7c6bf3dea4d@dec.sakura.ne.jp> In-Reply-To: <20240702022215.86f678352bf5d7c6bf3dea4d@dec.sakura.ne.jp> --------------3M9H87J3oHWHN7zSiDV6hkI9 Content-Type: multipart/alternative; boundary="------------i8sWCidfIJDIsEFkMqnEe0qn" --------------i8sWCidfIJDIsEFkMqnEe0qn Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 T24gMS03LTIwMjQgMTk6MjIsIFRvbW9ha2kgQU9LSSB3cm90ZToNCj4gT24gTW9uLCAxIEp1 bCAyMDI0IDE1OjQ2OjE4ICswMjAwDQo+IER1dGNoRGFlbW9uIC0gRnJlZUJTRCBGb3J1bXMg QWRtaW5pc3RyYXRvcjxEdXRjaERhZW1vbkBGcmVlQlNELm9yZz4NCj4gd3JvdGU6DQo+DQo+ PiBIZXksDQo+Pg0KPj4gSSB1c2UgYHBrZyBwcmltZS1vcmlnaW5zYCBvbiBteSBzZXJ2ZXJz IHRvIHBpY2sgdXAgdGhlIHBvcnRzIHRoYXQNCj4+IFBvdWRyaWVyZSBuZWVkcyB0byBidWls ZCBmb3IgdGhhdCAoY2x1c3RlciBvZikgc2VydmVyKHMpLg0KPj4NCj4+IFRoaXMgZG9lc24n dCB3b3JrIGZvciBmbGF2b3JzLCBvciBJJ20g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mZsYXZvcj0kKCAvdXNyL2xvY2FsL3NiaW4vcGtnIGluZm8g LUEgIiR7cG9ydH0iIHwgL3Vzci9iaW4vZ3JlcCAiZmxhdm9yIiANCnwgL3Vzci9iaW4vYXdr ICd7cHJpbnQgJE5GfScgfCAvdXNyL2Jpbi9ncmVwIC12ICJkZWZhdWx0IiApDQpbICJ4JHtm bGF2b3J9IiA9ICJ4IiBdICYmIGVjaG8gIiR7cG9ydH0iIHx8IGVjaG8gIiR7cG9ydH1AJHtm bGF2b3J9Ig0KZG9uZQ0KDQpUaGF0IGdpdmVzIG1lIGV4YWN0bHkgdGhlIG91dHB1dCBJIG5l ZWQuDQoNClRoYW5rcyENCg0KREQNCg0K --------------i8sWCidfIJDIsEFkMqnEe0qn Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On 1-7-2024 19:22, Tomoaki AOKI wrote:=
On Mon, 1 Jul 2024 15:46:18 =
+0200
DutchDaemon - FreeBSD Forums Administrator <DutchDaemon@FreeBSD.org&=
gt;
wrote:

Hey,

I use `pkg prime-origins` on my servers to pick up the ports that=20
Poudriere needs to build for that (cluster of) server(s).

This doesn't work for flavors, or I'm missing a trick.

E.g.: I have installed the "guestagent" flavor of emulators/qemu=20
("qemu-guest-agent" in pkg terms), which gets built in Poudriere as=20
"emulators/qemu@guestagent".

All good and well.

But `pkg prime-origins` picks it up as "emulators/qemu", which, of=20
course, triggers Poudriere to build the whole thing,=20
"emulators/qemu@default".

Which I don't need.

So either pkg needs to be amended to be able to recognize and report a=20
flavor, or I have to put this in the jail's make.conf on Poudriere.

I'm not sure if there's a place for that in a generic make.conf for all=20
ports in that specific jail; you know, one that contains=20
all-encompassing lines like

DEFAULT_VERSIONS=3D php=3D82 apache=3D2.4 mysql=3D80 ssl=3Dopenssl python=
=3D3.9=20
python3=3D3.9

Anyone?
Hi.
pkg records informations about FLAVORs in annotations only.
You should search output from `pkg -A <packagename>` for each pkg.

Does the script on brew.bsd.cafe [1] help understanding/usable?

[1]
https://brew.bsd.cafe/TomAoki/sh=
_scripts/src/branch/main/poudlist-all

Regards.

That actually put me on a path forward, but I decided to sort of brute-force it, so I could run the script anywhere.=C2=A0

In fact, Ansible runs it on all servers (grouped by build jail names on Poudriere) and gathers/sorts the output to populate the build lists for Poudriere, which then fires up the jails and builds the associated repos.

for port in $( /usr/local/sbin/pkg prime-origins )
do
flavor=3D$( /usr/local/sbin/pkg info -A "${port}" | /usr/bin/grep= "flavor" | /usr/bin/awk '{print $NF}' | /usr/bin/grep -v "default" )
[ "x${flavor}" =3D "x" ] && echo "${port}" || echo "${port}@${flavor}"
done

That gives me exactly the output I need.

Thanks!

DD

--------------i8sWCidfIJDIsEFkMqnEe0qn-- --------------3M9H87J3oHWHN7zSiDV6hkI9-- --------------R98uWw006MN2MhwsQ8pT93Fb Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- wnsEABYIACMWIQSDIpfQllw48uFsWk/r4FMJZEPckQUCZoL4qAUDAAAAAAAKCRDr4FMJZEPckcFs AP0WlKLQ1LJZQ4YwDVAfycORiAl66F1HhT7muJtFmMm8XgEArVqq7uPdayRcqEQkrUvhivQMuu3c v6WhjRXfe3i9jg8= =RtdM -----END PGP SIGNATURE----- --------------R98uWw006MN2MhwsQ8pT93Fb--