From nobody Wed Mar 08 00:35:51 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 4PWYJT2X6pz3wrxX for ; Wed, 8 Mar 2023 00:35:53 +0000 (UTC) (envelope-from list_freebsd@bluerosetech.com) Received: from echo.brtsvcs.net (echo.brtsvcs.net [208.111.40.118]) (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 4PWYJS52Vbz4MV7 for ; Wed, 8 Mar 2023 00:35:52 +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 208.111.40.118 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 7B8DD38D01; Wed, 8 Mar 2023 00:35:51 +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 20CDE2D47B; Tue, 7 Mar 2023 16:35:51 -0800 (PST) Subject: Re: How do I determine the ABI string used by pkg? To: Ian Smith , Dan Langille Cc: questions@freebsd.org References: <32d2e376-3f89-0588-316d-801d4cbf0b44@bluerosetech.com> <4DF870F0-89D5-45AA-B66C-93D2D1C0DD5E@nimnet.asn.au> From: Mel Pilgrim Message-ID: Date: Tue, 7 Mar 2023 16:35:51 -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 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-1.73 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999]; NEURAL_HAM_MEDIUM(-0.93)[-0.929]; NEURAL_HAM_SHORT(-0.50)[-0.501]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; MLMMJ_DEST(0.00)[questions@freebsd.org]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:36236, ipnet:208.111.40.0/24, country:US]; TO_MATCH_ENVRCPT_SOME(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_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4PWYJS52Vbz4MV7 X-Spamd-Bar: - X-ThisMailContainsUnwantedMimeParts: N On 2023-03-05 9:36, Ian Smith wrote: > On 6 March 2023 3:03:23 am AEDT, Dan Langille wrote: > > Ian Smith wrote on 3/5/23 12:09 AM: > > > 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. > > > > > > # pkg -N -vv | grep ABI > > > Will that install pkg "when there are no pkgs installed", the key > > requirement of the question? > > No; using 'pkg -N' when no packages are installed, /usr/sbin/pkg won't attempt to bootstrap (i.e. install pkg*.pkg as /usr/local/sbin/pkg) but -vv still prints, here: > > ABI = "FreeBSD:12:amd64"; > ALTABI = "FreeBSD:12:x86:64"; > > cheers, Ian (ports@ removed from ccs) On a fresh jail with just base installed: # which pkg /usr/sbin/pkg # pkg config ABI The package management tool is not yet installed on your system. Do you want to fetch and install it now? [y/N]: # pkg -N pkg: pkg is not installed # pkg -N -vv pkg: pkg is not installed The functionality you, Dan, et al are quoting is only available after bootstraping pkg. Yes, once it's bootstrapped getting the ABI string is easy. Maybe "when there are no pkgs installed" wasn't clear?