release: Pass ABI to pkgbase-stage.lua

We then pass ABI from pkgbase-stage.lua to pkg(8); without this,
cross-building releases with PKGBASE enabled fails with

pkg: wrong architecture: ...
pkg: repository FreeBSD-base contains packages with wrong ABI: ...

MFC after:	1 minute
Discussed with:	emaste, jrtc27
Sponsored by:	https://www.patreon.com/c/cperciva
This commit is contained in:
Colin Percival committed 2025-09-13 19:01:26 -07:00
1 parent e75dda31c1
commit 340e68fd7c
2 files changed
+4 -1

No files matched your search

+1 -1
View File
@@ -213,7 +213,7 @@ disc1: ${PKGBASE_REPO}
${.CURDIR}/scripts/pkgbase-stage.lua disc \
${.OBJDIR}/pkgbase-repo/${PKG_ABI}/latest \
${.TARGET}/usr/freebsd-packages/offline \
"${_ALL_libcompats}"
"${_ALL_libcompats}" ${PKG_ABI}
cp ${.CURDIR}/scripts/FreeBSD-base-offline.conf \
${.TARGET}/usr/freebsd-packages/repos/
mtree -c -p ${.TARGET}/usr/freebsd-packages | \
+3
View File
@@ -115,6 +115,8 @@ local function main()
local target = assert(arg[3])
-- =hitespace separated list of all libcompat names (e.g. "32")
local all_libcompats = assert(arg[4])
-- ABI of repository
local ABI = assert(arg[5])
assert(os.execute("mkdir -p pkgbase-repo-conf"))
local f <close> = assert(io.open("pkgbase-repo-conf/FreeBSD-base.conf", "w"))
@@ -127,6 +129,7 @@ local function main()
assert(f:close())
local pkg = "pkg -o ASSUME_ALWAYS_YES=yes -o IGNORE_OSVERSION=yes " ..
"-o ABI=" .. ABI .. " " ..
"-o INSTALL_AS_USER=1 -o PKG_DBDIR=./pkgdb -R ./pkgbase-repo-conf "
assert(os.execute(pkg .. "update"))