Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 07 Mar 2023 15:23:04 -0500
From:      "Dan Langille" <dan@langille.org>
To:        "via questions" <questions@freebsd.org>
Subject:   Re: How do I determine the ABI string used by pkg?
Message-ID:  <3edcd50d-18de-4cd6-82e6-9d9014ab0aae@app.fastmail.com>
In-Reply-To: <61D4795C-9A44-4956-9D95-2114D1C9F5AD@nimnet.asn.au>
References:  <32d2e376-3f89-0588-316d-801d4cbf0b44@bluerosetech.com> <20230306075622.xfzs33fmflc2vmtb@aniel.nours.eu> <257260d9-1812-3ce5-5d9a-907e2b1ec13e@langille.org> <61D4795C-9A44-4956-9D95-2114D1C9F5AD@nimnet.asn.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Mar 7, 2023, at 3:03 PM, Ian Smith wrote:
> On 8 March 2023 4:09:51 am AEDT, Dan Langille <dan@langille.org> wrote:
>  > Baptiste Daroussin wrote on 3/6/23 2:56 AM:
>  > > On Wed, Mar 01, 2023 at 11:50:13PM -0800, 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 config ABI
>  > > pkg config ALTABI
>
>  > When run in a freshly-created jail:
>  > 
>  > [r730-01 dvl ~] % sudo jexec empty_tester
>  > root@:/ # pkg config ABI
>  > FreeBSD:13:amd64
>  > root@:/ # pkg config ALTABI
>  > freebsd:13:x86:64
>  > root@:/ #
>  > 
>  > Mel: I think this is what you wanted to get?
>
> Dan, could you confirm whether the first one also installed pkg(8), so 
> subsequent 'pkg info' would show (only) pkg?

Please ignore my testing. It was invalid and did not have the correct
configuration.

Sorry. I did not set 'path = ' in my jail - I think it was using the host.

The above mentioned commands all attempt to install pkg when run in 
a properly configured jail.

root@empty_tester:/ # hostname
empty_tester.int.unixathome.org
root@empty_tester:/ # pkg info -l
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: n
root@empty_tester:/ # 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]: n 
root@empty_tester:/ # 


> If so, would 'pkg -N config ABI' have done the same?  Or failed?  Or 
> shown the ABI?

root@empty_tester:/ # pkg -N config ABI
pkg: pkg is not installed
root@empty_tester:/ # c

>
> That is - given that pkg(7) must know $ABI to resolve url: in 
> Whatever.conf to install pkg(8) - is it necessary to bootstrap pkg to 
> determine ABI via pkg(7)?

Yes, I think it is, based on my testing so far.

-- 
  Dan Langille
  dan@langille.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3edcd50d-18de-4cd6-82e6-9d9014ab0aae>