FIX: don't let set -e abort on old bwrap/kernel version checks#13
Merged
Merged
Conversation
Stuart B. Wilkins (stuwilkins)
approved these changes
Jul 10, 2026
Commit c83d29a replaced the manual major/minor/patch comparisons in detect_bwrap_capabilities and detect_kernel_capabilities with a _version_ge helper, called as: _version_ge "${_bwrap_ver}" "0.6.3" && HAS_BIND_OVER_RO=1 Each such line is the last statement in its function. When _version_ge returns false — as it does on RHEL8's bubblewrap 0.4.0 (< 0.5.0 and < 0.6.3) and 4.18 kernel (< 5.14) — the function inherits that non-zero exit status. Under the wrappers' `set -euo pipefail`, the bare call to the detection function then aborts the whole script immediately, before any bwrap arguments are built. The result on RHEL8 is that bw* wrappers exit 1 with no output. On newer hosts every _version_ge returns true, so the last command exits 0 and the bug stays hidden. Convert the three capability lines to `if _version_ge ...; then VAR=1; fi`. The if form is set -e-safe and leaves the detection functions returning 0 regardless of the comparison result.
e2f191e to
470beec
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit c83d29a replaced the manual major/minor/patch comparisons in detect_bwrap_capabilities and detect_kernel_capabilities with a _version_ge helper, called as:
Each such line is the last statement in its function. When _version_ge returns false — as it does on RHEL8's bubblewrap 0.4.0 (< 0.5.0 and < 0.6.3) and 4.18 kernel (< 5.14) — the function inherits that non-zero exit status. Under the wrappers'
set -euo pipefail, the bare call to the detection function then aborts the whole script immediately, before any bwrap arguments are built. The result on RHEL8 is that bw* wrappers exit 1 with no output. On newer hosts every _version_ge returns true, so the last command exits 0 and the bug stays hidden.Convert the three capability lines to
if _version_ge ...; then VAR=1; fi. The if form is set -e-safe and leaves the detection functions returning 0 regardless of the comparison result.Summary
Replace this with a brief summary of what this PR accomplishes.
For example, what functionality is added/removed, and why.
Description
More details could be added here with background info,
explanation of design choices, open questions for reviewers, etc.
Testing
Summarize how these changes were tested and on which hosts.
Include or link to test output here.
DO NOT POST SENSITIVE INFORMATION HERE.
Checklist
pixi run -e dev lintlocally (or wait for CI) — see.github/workflows/lint.ymlrunansibledeployment)