diff options
| -rw-r--r-- | recipes-containers/vcontainer/vcontainer-tarball.bb | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/recipes-containers/vcontainer/vcontainer-tarball.bb b/recipes-containers/vcontainer/vcontainer-tarball.bb index ed9b8e13..42a13527 100644 --- a/recipes-containers/vcontainer/vcontainer-tarball.bb +++ b/recipes-containers/vcontainer/vcontainer-tarball.bb | |||
| @@ -316,8 +316,9 @@ Quick Start: | |||
| 316 | Architectures included: ${ARCHITECTURES} | 316 | Architectures included: ${ARCHITECTURES} |
| 317 | 317 | ||
| 318 | Contents: | 318 | Contents: |
| 319 | init-env.sh - Environment setup script | 319 | init-env.sh - Environment setup script (interactive bash) |
| 320 | vdkr, vdkr-<arch> - Docker CLI wrapper | 320 | environment-setup-ci - CI environment (for yocto-autobuilder-helper) |
| 321 | vdkr, vdkr-<arch> - Docker CLI wrapper | ||
| 321 | vpdmn, vpdmn-<arch> - Podman CLI wrapper | 322 | vpdmn, vpdmn-<arch> - Podman CLI wrapper |
| 322 | vrunner.sh - Shared QEMU runner | 323 | vrunner.sh - Shared QEMU runner |
| 323 | vcontainer-common.sh - Shared CLI code | 324 | vcontainer-common.sh - Shared CLI code |
| @@ -408,6 +409,30 @@ ENVEOF | |||
| 408 | # Create init-env.sh symlink for convenience | 409 | # Create init-env.sh symlink for convenience |
| 409 | ln -sf environment-setup-${REAL_MULTIMACH_TARGET_SYS} ${SDK_OUTPUT}/${SDKPATH}/init-env.sh | 410 | ln -sf environment-setup-${REAL_MULTIMACH_TARGET_SYS} ${SDK_OUTPUT}/${SDKPATH}/init-env.sh |
| 410 | 411 | ||
| 412 | # ----------------------------------------------------------------------- | ||
| 413 | # CI/AutoBuilder environment script | ||
| 414 | # ----------------------------------------------------------------------- | ||
| 415 | # yocto-autobuilder-helper's enable_tools_tarball() parses environment | ||
| 416 | # scripts line-by-line in Python. It only honours lines starting with | ||
| 417 | # "export " at column 0, only substitutes $PATH, and treats "unset " at | ||
| 418 | # column 0 as a removal. It does NOT evaluate shell expressions like | ||
| 419 | # $(...) or variable references like $FOO. | ||
| 420 | # | ||
| 421 | # Rather than adding conditional logic to the interactive bash script, | ||
| 422 | # generate a separate flat file with baked-in absolute paths that the | ||
| 423 | # AB parser can consume directly. SDK relocation rewrites these paths | ||
| 424 | # at install time just like the primary environment-setup-* script. | ||
| 425 | ci_script=${SDK_OUTPUT}/${SDKPATH}/environment-setup-ci | ||
| 426 | cat > $ci_script <<CISCRIPT | ||
| 427 | # vcontainer CI environment — for yocto-autobuilder-helper | ||
| 428 | # Flat export lines with absolute paths; no shell logic. | ||
| 429 | # SDK relocation rewrites these paths at install time. | ||
| 430 | export VCONTAINER_DIR="${SDKPATH}" | ||
| 431 | export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}" | ||
| 432 | export PATH="${SDKPATH}:${SDKPATHNATIVE}/usr/bin:/usr/bin:/bin:\$PATH" | ||
| 433 | CISCRIPT | ||
| 434 | chmod 755 $ci_script | ||
| 435 | |||
| 411 | # Create version file | 436 | # Create version file |
| 412 | echo "vcontainer SDK version: ${PV}" > ${SDK_OUTPUT}/${SDKPATH}/version.txt | 437 | echo "vcontainer SDK version: ${PV}" > ${SDK_OUTPUT}/${SDKPATH}/version.txt |
| 413 | echo "Built: $(date)" >> ${SDK_OUTPUT}/${SDKPATH}/version.txt | 438 | echo "Built: $(date)" >> ${SDK_OUTPUT}/${SDKPATH}/version.txt |
