-
Notifications
You must be signed in to change notification settings - Fork 26
rpm-ostree module fails with "CONFIG_DIRECTORY: unbound variable" error #468
Description
Hello, I'm new to bug reports (and to Universal Blue!), so please forgive me if I'm totally reading this wrong. I'm using AI to help me write this context and bug report. I've had an error with building a custom BlueBuild and getting rpm-ostree to install. I've disabled all rpm-ostree functions for now, but want to mention this in case it's helpful.
[BUG] rpm-ostree module fails with "CONFIG_DIRECTORY: unbound variable" error
Bug Description
The rpm-ostree module fails during build with an unbound variable error for CONFIG_DIRECTORY, preventing any package installation when local rpm files are referenced in the recipe configuration.
Environment
- BlueBuild Version:
blue-build/github-action@v1.6 - Base Image:
ghcr.io/ublue-os/bluefin-dx:41 - Build Environment: GitHub Actions (ubuntu-latest)
- Affected Module:
rpm-ostree
Steps to Reproduce
- Create a BlueBuild recipe that uses the rpm-ostree module with any configuration:
name: test-recipe
base-image: ghcr.io/ublue-os/bluefin-dx
image-version: 41
modules:
- type: rpm-ostree
install:
- jq
- yq
- tree- Build using BlueBuild GitHub Action
- Build fails during rpm-ostree module execution
Expected Behavior
The rpm-ostree module should successfully install
Actual Behavior
Build fails with CONFIG_DIRECTORY: unbound variable error when the script reaches line 28 or 92 in the rpm-ostree module where ${CONFIG_DIRECTORY} is referenced.
Root Cause Analysis
Looking at the [rpm-ostree module source](https://raw.githubusercontent.com/blue-build/modules/main/modules/rpm-ostree/rpm-ostree.sh), the issue occurs on these lines:
Line 28:
elif [[ ! "${REPO}" =~ ^https?:\/\/.* ]] && [[ "${REPO}" == *".repo" ]] && [[ -f "${CONFIG_DIRECTORY}/rpm-ostree/${REPO}" ]]; thenLine 92:
elif [[ ! "${PKG}" =~ ^https?:\/\/.* ]] && [[ -f "${CONFIG_DIRECTORY}/rpm-ostree/${PKG}" ]]; thenThe CONFIG_DIRECTORY variable is referenced but never defined or passed to the module script. This affects both repository file handling and local package installation logic.
Impact
- Severity: High - It feels like this blocks rpm-ostree module usage
- Workaround: Currently I've disable rpm-ostree module entirely in my build
Suggested Fix
The CONFIG_DIRECTORY variable needs to be initialized. Based on BlueBuild architecture, I imagine this this would be:
- Set by the build framework before calling module scripts, or
- Default to a standard path like
/tmp/configor/tmp/fileswithin the module script
Potential fix in rpm-ostree.sh:
# Near the top of the script, add:
CONFIG_DIRECTORY="${CONFIG_DIRECTORY:-/tmp/config}"Or ensure the BlueBuild framework passes this variable consistently to all modules.
Additional Context
This appears to be a regression or an environment variable that's not being passed from the BlueBuild framework to the module scripts.
Test Case
To verify the fix, test with this minimal recipe:
name: test-config-directory-fix
base-image: ghcr.io/ublue-os/bluefin-dx
image-version: 41
modules:
- type: rpm-ostree
install:
- tree