-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
Before this change, the toolchain was installed when a jail is created. That approach modifies a root filesystem directory which a user might want to use for other purposes than Poudriere. Also, it doesn't use the latest available toolchain to build packages but a version available when creating the jail. In order to use the latest available toolchain and not disrupt the root filesystem directory, install the toolchain when starting a jail. This change also adds support to install the toolchain to build packages for both Arm Morello and CHERI-RISC-V when using Poudriere on CHERI-extended hardware or with the user mode.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,3 +68,31 @@ hybridset_list() { | |
|
||
(cd "${MASTER_DATADIR_ABS}" && find "hybridset" -type d -depth 2 | cut -d / -f 3 | sort -u) | ||
} | ||
|
||
hybridset_pkgcmd() { | ||
[ $# -ge 2 ] || eargs hybridset_pkgcmd rootdir pkgrootdir | ||
local rootdir="$1" | ||
local pkgrootdir="$2" | ||
shift 2 | ||
local host_abi | ||
local pkgcmd | ||
|
||
get_host_abi host_abi | ||
if [ "${host_abi}" = "purecap" ]; then | ||
pkgcmd="pkg64" | ||
abifile="/usr/sbin/pkg64" | ||
else | ||
pkgcmd="pkg" | ||
abifile="/usr/bin/uname" | ||
fi | ||
|
||
env ABI_FILE="${abifile}" \ | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jrtc27
Member
|
||
IGNORE_OSVERSION=yes \ | ||
PKG_DBDIR="${rootdir}${pkgrootdir}/var/db/pkg64" \ | ||
PKG_CACHEDIR="${rootdir}${pkgrootdir}/var/cache/pkg64" \ | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
kwitaszczyk
Author
Member
|
||
ASSUME_ALWAYS_YES=yes \ | ||
${pkgcmd} \ | ||
-R "${rootdir}/etc/pkg64" \ | ||
-r "${rootdir}${pkgrootdir}" \ | ||
"${@}" | ||
} |
This is missing a ${rootdir}, at least for the purecap case