rootfs: don't use the Armbian repo when building rootfs from both GHA pipelines and CLI; fixes #7123

- Fixes: 71296430fa -- which only set `SKIP_ARMBIAN_REPO=yes` when `rootfs` cli shortcut used
  - GHA artifact pipelines are generic across all artifacts, and don't use the cli shortcuts
    - instead, they use the `artifact` shortcut, with the `WHAT=rootfs` parameter
    - so in GHA pipelines `SKIP_ARMBIAN_REPO=yes` was not taking effect
- rootfs artifact itself now enforces `SKIP_ARMBIAN_REPO` to be `yes` and makes it readonly
- also add `SKIP_ARMBIAN_REPO` to the general change-tracking for more clarity about configs and hooks etc
- add change tracking calls before/after generic artifact config adapter for even more clarity
This commit is contained in:
Ricardo Pardini
2024-09-30 13:08:28 +02:00
committed by Igor
parent ee4688952e
commit 55b87180b5
5 changed files with 15 additions and 4 deletions

View File

@@ -138,6 +138,13 @@ function artifact_rootfs_cli_adapter_config_prep() {
declare -g -r RELEASE="${RELEASE}" # make readonly for finding who tries to change it
declare -g -r NEEDS_BINFMT="yes" # make sure binfmts are installed during prepare_host_interactive
if [[ "${SKIP_ARMBIAN_REPO}" != "yes" ]]; then # if not set to yes, force it to yes.
declare -g SKIP_ARMBIAN_REPO="yes" # Using the repo during rootfs build causes insanity, so don't. Make readonly to ensure.
fi
declare -g -r SKIP_ARMBIAN_REPO # make it readonly to ensure sanity if hooks try to change it
track_general_config_variables "in artifact_rootfs_cli_adapter_config_prep"
# prep_conf_main_only_rootfs_ni is prep_conf_main_only_rootfs_ni() + mark_aggregation_required_in_default_build_start()
prep_conf_main_only_rootfs_ni < /dev/null # no stdin for this, so it bombs if tries to be interactive.

View File

@@ -32,9 +32,14 @@ function cli_artifact_run() {
display_alert "artifact" "${chosen_artifact}" "debug"
display_alert "artifact" "${chosen_artifact} :: ${chosen_artifact_impl}()" "debug"
track_general_config_variables "in cli_artifact_run before artifact_cli_adapter_config_prep"
declare -g artifact_version_requires_aggregation="no" # marker
artifact_cli_adapter_config_prep # only if in cli.
track_general_config_variables "in cli_artifact_run after artifact_cli_adapter_config_prep"
# if asked by _config_prep to aggregate, and HOSTRELEASE is not set, obtain it.
if [[ "${artifact_version_requires_aggregation}" == "yes" ]] && [[ -z "${HOSTRELEASE}" ]]; then
obtain_hostrelease_only # Sets HOSTRELEASE

View File

@@ -127,7 +127,7 @@ function armbian_register_commands() {
["rewrite-uboot-patches-needing-rebase"]="REWRITE_PATCHES='yes' REWRITE_PATCHES_NEEDING_REBASE='yes'"
# artifact shortcuts
["rootfs"]="WHAT='rootfs' SKIP_ARMBIAN_REPO='yes' ${common_cli_artifact_vars}"
["rootfs"]="WHAT='rootfs' ${common_cli_artifact_vars}"
["kernel"]="WHAT='kernel' ${common_cli_artifact_vars}"
["kernel-config"]="WHAT='kernel' KERNEL_CONFIGURE='yes' ${common_cli_artifact_interactive_vars} ${common_cli_artifact_vars}"

View File

@@ -45,5 +45,5 @@ function track_general_config_variables() {
array_values="yes" track_config_variables "${1}" KERNEL_DRIVERS_SKIP
track_config_variables "${1}" BOOTSOURCE BOOTSOURCEDIR BOOTBRANCH BOOTPATCHDIR BOOTDIR BOOTCONFIG BOOTBRANCH_BOARD BOOTPATCHDIR_BOARD
track_config_variables "${1}" ATFSOURCEDIR ATFDIR ATFBRANCH CRUSTSOURCEDIR CRUSTDIR CRUSTBRANCH LINUXSOURCEDIR
track_config_variables "${1}" NETWORKING_STACK
track_config_variables "${1}" NETWORKING_STACK SKIP_ARMBIAN_REPO
}

View File

@@ -132,5 +132,4 @@ function extract_rootfs_artifact() {
}
# This comment strategically introduced to force a rebuild of all rootfs, as this file's contents are hashed into all rootfs versions.
# There was a problem when generating cache. Packages were upgraded from our (beta) repository which lead into package downgrade error problem.
# Just a number to force rebuild 01
# Just a number to force rebuild 002