I was unable to do my usual update to my pkgbase based main-armv7 poudriere jail: "pkg: Repository FreeBSD has a wrong packagesite, . . ."

From: Mark Millard <marklmi_at_yahoo.com>
Date: Mon, 19 May 2025 05:09:13 UTC
[I'll note that my 14.2-RELEASE poudriere jail and 14.2-STABLE
armv7 poudriere jails had no such problems. Nor did any of the
3 aarch64 jails.]

I was unable to do the usual update to my main-armv7 poudriere jail:

# poudriere jail -j main-armv7 -u
[00:00:00] Upgrading using pkgbase
pkg: Setting ABI requires setting OSVERSION, guessing the OSVERSION as: 1500000
Updating FreeBSD repository catalogue...
pkg: Repository FreeBSD has a wrong packagesite, need to re-create database
Unable to update repository FreeBSD
Updating pkgbase repository catalogue...
Fetching data.pkg: 100%   35 KiB  36.1kB/s    00:01     Processing entries: 100%
pkgbase repository update completed. 367 packages processed.
Error updating repositories!
[00:00:03] Error: /usr/local/share/poudriere/jail.sh:update_jail:119:pkg update failed


So I eventually tried deleting, recreating, and then re-updating
the jail created. The last step had a new failure. (This is on a
Windows Dev Kit 2023 aarch64 system that supports armv7
user space code and so allows chroot and the like into
armv7 worlds.) The new failure did not have the line:

"pkg: Repository FreeBSD has a wrong packagesite, need to re-create database"

but still reported:

"Unable to update repository FreeBSD"

I then looked at FreeBSD.conf :

# more /usr/local/poudriere/jails/main-armv7/etc/pkg/FreeBSD.conf
#
# To disable this repository, instead of modifying or removing this file,
# create a /usr/local/etc/pkg/repos/FreeBSD.conf file:
#
#   mkdir -p /usr/local/etc/pkg/repos
#   echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf
#

FreeBSD: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/quarterly",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}

and found that the created jail is trying to use quarterly
with main [so: 15].

After hand editing that things were back to normal
for the newly created jail:

# poudriere jail -j main-armv7 -u
[00:00:00] Upgrading using pkgbase
pkg: Setting ABI requires setting OSVERSION, guessing the OSVERSION as: 1500000
Updating FreeBSD repository catalogue...
Fetching meta.conf: 100%    179 B   0.2kB/s    00:01     Fetching data.pkg: 100%    9 MiB   8.9MB/s    00:01     Processing entries: 100%
FreeBSD repository update completed. 30979 packages processed.
Updating pkgbase repository catalogue...
pkgbase repository is up to date.
All repositories are up to date.
pkg: Setting ABI requires setting OSVERSION, guessing the OSVERSION as: 1500000
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating pkgbase repository catalogue...
pkgbase repository is up to date.
All repositories are up to date.
Checking for upgrades (0 candidates): 100%
Processing candidates (0 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
[00:00:08] Recording filesystem state for clean... done


(Which is what I expected after the creation.)


For reference, details of that test sequence follow . . .

# poudriere jail -j main-armv7 -d
[00:00:00] Are you sure you want to delete the jail? [y/N] y
[00:00:02] Removing main-armv7 jail... done
[00:00:05] Cleaning main-armv7 data... done

# poudriere jail -c -jmain-armv7 -aarmv7 -U https://pkg.freebsd.org -mpkgbase=base_latest -v 15 -X
[00:00:00] Creating main-armv7 fs at /usr/local/poudriere/jails/main-armv7... done
[00:00:00] Installing 15 armv7 from https://pkg.freebsd.org ...pkg: Setting ABI requires setting OSVERSION, guessing the OSVERSION as: 1500000
Updating pkgbase repository catalogue...
Fetching meta.conf: 100%    179 B   0.2kB/s    00:01     Fetching data.pkg: 100%   35 KiB  36.1kB/s    00:01     Processing entries: 100%
pkgbase repository update completed. 367 packages processed.
All repositories are up to date.
pkg: Setting ABI requires setting OSVERSION, guessing the OSVERSION as: 1500000
Updating pkgbase repository catalogue...
pkgbase repository is up to date.
All repositories are up to date.
The following 168 package(s) will be affected (of 0 checked):
. . .
[168/168] Extracting FreeBSD-zoneinfo-15.snap20250401092219: 100%
pkg: Setting ABI requires setting OSVERSION, guessing the OSVERSION as: 1500000
Updating pkgbase repository catalogue...
pkgbase repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
FreeBSD-src-sys: 15.snap20250518182617

Number of packages to be installed: 1

The process will require 486 MiB more space.
87 MiB to be downloaded.
[1/1] Fetching FreeBSD-src-sys-15.snap20250518182617.pkg: 100%   87 MiB  18.2MB/s    00:05     Checking integrity... done (0 conflicting)
[1/1] Installing FreeBSD-src-sys-15.snap20250518182617...
[1/1] Extracting FreeBSD-src-sys-15.snap20250518182617: 100%
[00:02:07] Recording filesystem state for clean... done
[00:02:07] Jail main-armv7 15.0-CURRENT armv7 is ready to be used

# poudriere jail -j main-armv7 -u
[00:00:01] Upgrading using pkgbase
pkg: Setting ABI requires setting OSVERSION, guessing the OSVERSION as: 1500000
Updating FreeBSD repository catalogue...
Unable to update repository FreeBSD
Updating pkgbase repository catalogue...
pkgbase repository is up to date.
Error updating repositories!
[00:00:02] Error: /usr/local/share/poudriere/jail.sh:update_jail:119:pkg update failed


This sequence lost whatever had lead to:

"pkg: Repository FreeBSD has a wrong packagesite, need to re-create database"


===
Mark Millard
marklmi at yahoo.com