From nobody Thu Mar 02 07:50:13 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 4PS3DW5FmPz3w0pl; Thu, 2 Mar 2023 07:50:19 +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 4PS3DV36m5z3LmH; Thu, 2 Mar 2023 07:50:18 +0000 (UTC) (envelope-from list_freebsd@bluerosetech.com) Authentication-Results: mx1.freebsd.org; dkim=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; dmarc=none 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 074F338D01; Thu, 2 Mar 2023 07:50:15 +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 A100127475; Wed, 1 Mar 2023 23:50:14 -0800 (PST) To: ports@freebsd.org, questions@freebsd.org From: Mel Pilgrim Subject: How do I determine the ABI string used by pkg? Message-ID: <32d2e376-3f89-0588-316d-801d4cbf0b44@bluerosetech.com> Date: Wed, 1 Mar 2023 23:50:13 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 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; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-1.75 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_SHORT(-0.45)[-0.447]; R_SPF_ALLOW(-0.20)[+mx:relay3.brtsvcs.net]; MIME_GOOD(-0.10)[text/plain]; ASN(0.00)[asn:36236, ipnet:2607:f740:c::/48, country:US]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MLMMJ_DEST(0.00)[ports@freebsd.org,questions@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DMARC_NA(0.00)[bluerosetech.com]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; TO_DN_NONE(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4PS3DV36m5z3LmH X-Spamd-Bar: - X-ThisMailContainsUnwantedMimeParts: N I need to determine the ABI string pkg uses on a given system, and need to do so when there are no pkgs installed. I've read through libpkg/pkg_elf.c and I can see how it's reading ELF headers from well-known files. That's all easy enough to replicate, but I'm a bit stuck on how it's determining the arch string for x86. How/When does pkg decide to use FreeBSD:13:amd64 instead of FreeBSD:13:x86:64? Can I safely assume one or the other?