Re: pkg bootstrap and chroot

From: Mark Millard <marklmi_at_yahoo.com>
Date: Sat, 16 Aug 2025 23:19:46 UTC
[Adding output from before the dependency reversal as well,
here for 14.3-STABLE .]

On Aug 16, 2025, at 15:32, Mark Millard <marklmi@yahoo.com> wrote:

> Lexi Winter <ivy_at_freebsd.org> wrote on
> Date: Sat, 16 Aug 2025 21:53:51 UTC :
> 
>> Graham Perrin:
>>> After chroot to /tmp/altroot:
>>> 
>>> * what is required for pkg bootstrap to succeed?
>>> [...] 
>>> Certificate verification failed for /C=US/O=Let's Encrypt/CN=E5
>>> 0820854BD01D0000:error:16000069:STORE routines:ossl_store_get0_loader_int:unregistered scheme:/home/pkgbuild/worktrees/releng/14.3/crypto/openssl/crypto/store/store_register.c:237:scheme=file
>>> 0820854BD01D0000:error:80000002:system library:file_open:No such file or directory:/home/pkgbuild/worktrees/releng/14.3/crypto/openssl/providers/implementations/storemgmt/file_store.c:267:calling stat(/etc/ssl/certs/4042bcee.0)
>> 
>> you probably need to install FreeBSD-caroot and FreeBSD-certctl in the
>> chroot. one of these depends on the other, but the dependency was
>> reversed recently and i can't remember which way around it is now,
>> so just install both.
> 
> # pkg info -d FreeBSD-caroot
> FreeBSD-caroot-15.snap20250808134017:
> FreeBSD-certctl-15.snap20250814211741
> 
> # pkg info -d FreeBSD-certctl
> FreeBSD-certctl-15.snap20250814211741:
> FreeBSD-openssl-15.snap20250814211741
> FreeBSD-clibs-15.snap20250815225742 (libc.so.7)
> FreeBSD-openssl-lib-15.snap20250814211741 (libcrypto.so.35)
> 
> 
> Context (pkgbase based boot kernel.GENERIC-NODEBUG and boot world):
> 
> # uname -apKU
> FreeBSD aarch64-main-pbase 15.0-PRERELEASE FreeBSD 15.0-PRERELEASE main-n279644-20f0996700a8 GENERIC-NODEBUG arm64 aarch64 1500060 1500060
> 

By contrast, 14.3-STABLE has:

# pkg info -d FreeBSD-caroot
FreeBSD-caroot-14.snap20250816004720:

# pkg info -d FreeBSD-certctl
FreeBSD-certctl-14.snap20250816004720:
	FreeBSD-caroot-14.snap20250816004720
	FreeBSD-openssl-14.snap20250816004720

This old dependency order might be part of why
there could be issues like:

. . .
[902/1013] Installing FreeBSD-certctl-14.snap20250816004720...
[902/1013] Extracting FreeBSD-certctl-14.snap20250816004720: 100%
pkg-static: Cannot runscript POST-INSTALL:No such file or directory
. . .


===
Mark Millard
marklmi at yahoo.com