mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 04:06:33 +02:00
WIP: Allow useflags for sysexts
This commit is contained in:
parent
5ff83ce754
commit
d4c96a9259
@ -2,4 +2,6 @@ EXTRA_SYSEXTS=(
|
||||
zfs:sys-fs/zfs
|
||||
podman:app-containers/podman,net-misc/passt
|
||||
python:dev-lang/python,dev-python/pip
|
||||
nvidia-drivers:x11-drivers/nvidia-drivers
|
||||
nvidia-drivers-open:x11-drivers/nvidia-drivers:kernel-open
|
||||
)
|
||||
|
||||
@ -215,9 +215,16 @@ create_prod_sysexts() {
|
||||
local image_name="$1"
|
||||
local image_sysext_base="${image_name%.bin}_sysext.squashfs"
|
||||
for sysext in "${EXTRA_SYSEXTS[@]}"; do
|
||||
local name="flatcar-${sysext%:*}"
|
||||
local pkgs="${sysext#*:}"
|
||||
local name="flatcar-${sysext%%:*}"
|
||||
local pkgs_and_useflags="${sysext#*:}"
|
||||
local pkgs="${pkgs_and_useflags%%:*}"
|
||||
local pkg_array=(${pkgs//,/ })
|
||||
local useflags=""
|
||||
if [[ "$pkgs_and_useflags" == *:* ]]; then
|
||||
useflags="${pkgs_and_useflags#*:}"
|
||||
fi
|
||||
local useflags_array=(${useflags//,/ })
|
||||
|
||||
local mangle_script="${BUILD_LIBRARY_DIR}/sysext_mangle_${name}"
|
||||
if [[ ! -x "${mangle_script}" ]]; then
|
||||
mangle_script=
|
||||
@ -225,8 +232,9 @@ create_prod_sysexts() {
|
||||
sudo rm -f "${BUILD_DIR}/${name}.raw" \
|
||||
"${BUILD_DIR}/flatcar-test-update-${name}.gz" \
|
||||
"${BUILD_DIR}/${name}_*"
|
||||
sudo "${SCRIPT_ROOT}/build_sysext" --board="${BOARD}" \
|
||||
--squashfs_base="${BUILD_DIR}/${image_sysext_base}" \
|
||||
# we use -E to pass the USE flags, but also MODULES_SIGN variables
|
||||
USE="${useflags_array[@]}" sudo -E "${SCRIPT_ROOT}/build_sysext" --board="${BOARD}" \
|
||||
--squashfs_base="${BUILD_DIR}/${image_sysext_base}" \
|
||||
--image_builddir="${BUILD_DIR}" \
|
||||
${mangle_script:+--manglefs_script=${mangle_script}} \
|
||||
"${name}" "${pkg_array[@]}"
|
||||
|
||||
11
build_sysext
11
build_sysext
@ -221,12 +221,19 @@ info "Building '${SYSEXTNAME}' squashfs with (meta-)packages '${@}' in '${BUILD_
|
||||
|
||||
for package; do
|
||||
echo "Installing package into sysext image: $package"
|
||||
FEATURES="-ebuild-locks" emerge \
|
||||
usepkg_flag="--usepkgonly"
|
||||
# if custom USE flags are set, disable using binary packages to force rebuild
|
||||
if [ ! -z "${USE:-}" ]; then
|
||||
usepkg_flag="--usepkg"
|
||||
echo "Disabling binary package install because custom USE flags are set: $USE "
|
||||
fi
|
||||
FEATURES="-ebuild-locks binpkg-multi-instance" emerge \
|
||||
--root="${BUILD_DIR}/install-root" \
|
||||
--config-root="/build/${FLAGS_board}" \
|
||||
--sysroot="/build/${FLAGS_board}" \
|
||||
--usepkgonly \
|
||||
--getbinpkg \
|
||||
--binpkg-respect-use=y \
|
||||
$usepkg_flag \
|
||||
--verbose \
|
||||
--jobs=${NUM_JOBS} \
|
||||
"${package}"
|
||||
|
||||
@ -40,6 +40,7 @@ RDEPEND="
|
||||
coreos-base/flatcar-eks
|
||||
net-misc/chrony
|
||||
sys-fs/zfs
|
||||
x11-drivers/nvidia-drivers
|
||||
app-containers/podman
|
||||
net-misc/passt
|
||||
dev-lang/python
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user