From nobody Sun Mar 05 05:09:57 2023 X-Original-To: questions@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 4PTqXZ3T3Sz3w1Vj for ; Sun, 5 Mar 2023 05:10:22 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from h1.out4.mxs.au (h1.out4.mxs.au [110.232.143.238]) (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 4PTqXW4Tyyz3phn for ; Sun, 5 Mar 2023 05:10:18 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=nimnet.asn.au header.s=default header.b=jKApggoE; spf=pass (mx1.freebsd.org: domain of smithi@nimnet.asn.au designates 110.232.143.238 as permitted sender) smtp.mailfrom=smithi@nimnet.asn.au; dmarc=none Received: from s121.syd3.hostingplatform.net.au (s121.syd3.hostingplatform.net.au [103.27.34.4]) by out4.mxs.au (Halon) with ESMTPS id fbaa60ea-bb13-11ed-9580-00163c87da3f; Sun, 05 Mar 2023 16:10:02 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nimnet.asn.au; s=default; h=Message-ID:From:CC:To:Subject: Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To: Date:Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=wPvuF8iWeqAprVaM2lAc0sS71dyOnMoW0KkWvcEuk2Y=; b=jKApggoEWK20vMpCT3wUj5Ukog Ki0vfOEB4s+C/EU3eLZhJ05wllE5wuZxknM2Au0fXiS8TouzNk7zXOecmWS5YhrORX0Zh8g4S4EfC ON/uw7l0eqeuA5n+nUZ7P6OQGGVlgx31PeG11nfHIZsGR4spS+zDVq2HKFdRf1PWC5TfrlXR22EcF i2Mitt9GLCipyXh1nm4+bBfKOm2vQyLbAVHU68d4yol0eVy7kXixofnVXn+qzqhoiPi0kz3qK0UoA xdLUihSAFQNKhxO5i7aCG1yI23P0xcLRhMkjKZotTxcvDf1NJYJreCNJ4qoapFgQFcXzOyVUkHVOU rYPMzLDA==; Received: from [1.144.249.53] (port=46256 helo=Galaxy-J5-Pro) by s121.syd3.hostingplatform.net.au with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1pYgdF-0014uJ-14; Sun, 05 Mar 2023 16:10:01 +1100 Date: Sun, 05 Mar 2023 16:09:57 +1100 User-Agent: K-9 Mail for Android In-Reply-To: <32d2e376-3f89-0588-316d-801d4cbf0b44@bluerosetech.com> References: <32d2e376-3f89-0588-316d-801d4cbf0b44@bluerosetech.com> List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: How do I determine the ABI string used by pkg? To: Mel Pilgrim CC: questions@freebsd.org,ports@freebsd.org From: Ian Smith Message-ID: <4DF870F0-89D5-45AA-B66C-93D2D1C0DD5E@nimnet.asn.au> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s121.syd3.hostingplatform.net.au X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - nimnet.asn.au X-Get-Message-Sender-Via: s121.syd3.hostingplatform.net.au: authenticated_id: smithi@nimnet.asn.au X-Authenticated-Sender: s121.syd3.hostingplatform.net.au: smithi@nimnet.asn.au X-Source: X-Source-Args: X-Source-Dir: X-Spamd-Result: default: False [-1.18 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_SPAM_SHORT(0.32)[0.323]; R_SPF_ALLOW(-0.20)[+ip4:110.232.143.0/24]; R_DKIM_ALLOW(-0.20)[nimnet.asn.au:s=default]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DMARC_NA(0.00)[nimnet.asn.au]; HAS_X_GMSV(0.00)[smithi@nimnet.asn.au]; ARC_NA(0.00)[]; HAS_X_AS(0.00)[smithi@nimnet.asn.au]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; HAS_X_SOURCE(0.00)[]; TO_DN_SOME(0.00)[]; MLMMJ_DEST(0.00)[questions@freebsd.org]; DKIM_TRACE(0.00)[nimnet.asn.au:+]; FROM_EQ_ENVFROM(0.00)[]; HAS_X_ANTIABUSE(0.00)[]; ASN(0.00)[asn:45638, ipnet:110.232.140.0/22, country:AU]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4PTqXW4Tyyz3phn X-Spamd-Bar: - X-ThisMailContainsUnwantedMimeParts: N On 2 March 2023 6:50:13 pm AEDT, Mel Pilgrim wrote: > I need to determine the ABI string pkg uses on a given system, and > need to do so when there are no pkgs installed=2E # pkg -N -vv | grep ABI gets you ABI and ALTABI; the former is the amd64 form, the latter x86:64 > I've read through libpkg/pkg_elf=2Ec and I can see how it's reading ELF >=20 > headers from well-known files=2E That's all easy enough to replicate, > but=20 > I'm a bit stuck on how it's determining the arch string for x86=2E I'm just running from a clue by bapt@ and what's on the release DVD, in wh= ich case the ALTABI form is a symlink: freebsd:12:x86:64 -> FreeBSD:12:amd64 and the All packages directory is packages/FreeBSD:12:amd64/All: total 2204897 > How/When does pkg decide to use FreeBSD:13:amd64 instead of=20 > FreeBSD:13:x86:64? Can I safely assume one or the other? You can safely assume the former, that's the usual form=2E The ALTABI for= m _might_ be safe but I've not tried using it=2E cheers, Ian (not subscribed to ports@)