Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Sep 2025 02:05:05 GMT
From:      Colin Percival <cperciva@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 340e68fd7c0d - main - release: Pass ABI to pkgbase-stage.lua
Message-ID:  <202509140205.58E255br016940@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by cperciva:

URL: https://cgit.FreeBSD.org/src/commit/?id=340e68fd7c0d62cac1f0876b6475a89df5065db5

commit 340e68fd7c0d62cac1f0876b6475a89df5065db5
Author:     Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2025-09-14 02:01:26 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2025-09-14 02:01:26 +0000

    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
---
 release/Makefile                  | 2 +-
 release/scripts/pkgbase-stage.lua | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/release/Makefile b/release/Makefile
index b6a9aa42c2e2..6be29a425f0f 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -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 | \
diff --git a/release/scripts/pkgbase-stage.lua b/release/scripts/pkgbase-stage.lua
index 1b48b4faede3..a12ec372d1a9 100755
--- a/release/scripts/pkgbase-stage.lua
+++ b/release/scripts/pkgbase-stage.lua
@@ -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"))



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202509140205.58E255br016940>