diff options
| author | Colin Percival <cperciva@FreeBSD.org> | 2025-09-14 02:01:26 +0000 |
|---|---|---|
| committer | Colin Percival <cperciva@FreeBSD.org> | 2025-09-14 02:01:26 +0000 |
| commit | 340e68fd7c0d62cac1f0876b6475a89df5065db5 (patch) | |
| tree | 653612a16d7cb22ea2034bb12d93cff0fc2fed2d | |
| parent | e75dda31c1eead9ad40580bd8fec17f2bbf55a21 (diff) | |
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
| -rw-r--r-- | release/Makefile | 2 | ||||
| -rwxr-xr-x | release/scripts/pkgbase-stage.lua | 3 |
2 files changed, 4 insertions, 1 deletions
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")) |
