-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
The hybrid ABI package manager should be bootstrapped when a jail is started to provide it to both poudriere bulk and poudriere jail -s operations. Having it available for poudriere jail -s, we can manually build CheriABI packages using hybrid ABI utilities to debug building issues.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3207,6 +3207,7 @@ jail_start() { | |
|
||
if [ "${os}" = "CheriBSD" ]; then | ||
download_toolchain_from_repo | ||
download_hybridset_pkg_from_repo | ||
fi | ||
|
||
msg "Starting jail ${MASTERNAME}" | ||
|
@@ -3769,6 +3770,31 @@ download_toolchain_from_repo() { | |
hybridset_pkgcmd "${MASTERMNT}" "/toolchain" clean -aq | ||
} | ||
|
||
download_hybridset_pkg_from_repo() { | ||
local arch host_abi pkgabi pkgcmd | ||
|
||
msg "Bootstrapping hybrid ABI pkg." | ||
|
||
hybridset_pkgcmd "${MASTERMNT}" "/" install -q pkg | ||
hybridset_pkgcmd "${MASTERMNT}" "/" update -q | ||
|
||
get_host_abi host_abi | ||
if [ "${host_abi}" = "purecap" ]; then | ||
pkgcmd="pkg64" | ||
else | ||
pkgcmd="pkg" | ||
fi | ||
|
||
pkgabi=$(${pkgcmd} config ABI) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jrtc27
Member
|
||
if [ -z "${pkgabi}" ]; then | ||
err 1 "Failure looking up host pkg ABI" | ||
fi | ||
|
||
# Update pkg.conf to use the host ABI for hybrid ABI packages. | ||
sed -i '' "s/^#ABI = .*$/ABI=${pkgabi}/" \ | ||
"${MASTERMNT}/usr/local64/etc/pkg.conf" | ||
} | ||
|
||
download_hybridset_from_repo() { | ||
local oldpkgname pkgname | ||
|
||
|
This gets the ABI of the host system not the jail, so you get the wrong package set in the jail if the two are different (e.g. building 22.12 packages on a dev host)