Skip to content

fix(install): silence awk escape warnings in RPM asset lookup - #4845

Open
ericcurtin wants to merge 2 commits into
NVIDIA:mainfrom
ericcurtin:fix/4768-install-awk-escape/ericcurtin
Open

ericcurtin wants to merge 2 commits into
NVIDIA:mainfrom
ericcurtin:fix/4768-install-awk-escape/ericcurtin

Conversation

@ericcurtin

Copy link
Copy Markdown
Contributor

Summary

Build the RPM fallback regex inside awk so gawk stops warning about \..

Related Issue

Closes #4768

Changes

  • Build the regex in awk instead of passing it through -v.
  • Merge the three duplicate case arms in find_rpm_asset.
  • Test the literal dot and empty stderr.

Testing

  • Checks appropriate to the affected code and behavior pass
  • Unit tests added/updated (if applicable)
  • E2E tests added/updated (if applicable)

Ran tasks/scripts/test-install-sh.sh. The new test fails without the fix.

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

Closes NVIDIA#4768

Signed-off-by: Eric Curtin <eric.curtin@docker.com>
@copy-pr-bot

copy-pr-bot Bot commented Oct 22, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@ericcurtin

Copy link
Copy Markdown
Contributor Author

@TaylorMutch @SDAChess could you please triage #4768 so the issue check can pass? PTAL, and /ok to test c0cb33d44b31c3db9d745fc46e0a710993abbeba if it looks good. Thank you!

@ericcurtin

Copy link
Copy Markdown
Contributor Author

@purp @drew PTAL, and could one of you triage #4768 so the issue check can pass? Thank you!

@ericcurtin

Copy link
Copy Markdown
Contributor Author

@mrunalp @pimlock PTAL when you get a chance, and could one of you triage #4768 so the issue check can pass? /ok to test c0cb33d44b31c3db9d745fc46e0a710993abbeba if it looks good. Thank you!

@vineethsai7

Copy link
Copy Markdown

Tested this branch (c0cb33d) on RHEL 9.8 x86_64 with gawk 5.1.0, installing OPENSHELL_VERSION=v0.1.6 through the RPM path as root.

  • install.sh from main (0e96e8e): exit 0, three awk: warning: escape sequence '\.' treated as plain '.' lines on stderr.
  • install.sh from this PR: exit 0, no awk warnings; the other stderr lines (download, checksum and install progress) are unchanged, and openshell, openshell-gateway and openshell-prover 0.1.6 are installed.
  • I also ran find_rpm_asset on its own against a checksum list that has a decoy entry openshell-0.1.6-1.fc44.x86_64Xrpm listed before the real openshell-0.1.6-1.fc44.x86_64.rpm. main picks the decoy, because the dot matches any character, and it prints the warning. This PR picks the real .rpm and prints nothing.

This is the issue I reported in #4768, and this PR fixes it for us. We ship this install.sh pinned by SHA-256 in DefenseClaw (cisco-ai-defense/defenseclaw#1222), and we'll move the pin once it's in a release.

@ericcurtin

Copy link
Copy Markdown
Contributor Author

Thank you @vineethsai7 for testing this.

@vineethsai7

Copy link
Copy Markdown

Thanks for this. I opened #5129 for the same issue without spotting your PR first, and I've closed it in favour of this one. One idea from mine, if it helps: run the RPM asset-selection test in the branch checks with gawk installed. gawk is the awk that prints the warning, so the regression stays covered on CI runners whose default awk is mawk.

Signed-off-by: Eric Curtin <eric.curtin@docker.com>
@ericcurtin

Copy link
Copy Markdown
Contributor Author

test-install-sh.sh now runs the RPM lookup with awk pointed at gawk when installed, so the escape warning is caught even if the default awk is mawk. Confirmed it fails against the old install.sh. The test is not in a branch-checks job today, so I left workflows alone.

@ericcurtin

Copy link
Copy Markdown
Contributor Author

Added gawk coverage to the test. @krishicks @alangou PTAL, and could one of you triage #4768 so the issue check can pass? /ok to test 02f5afad95f53d45341f9d68411e6c2f63bf70ec if it looks good. Thank you!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(install): install.sh prints gawk "escape sequence \. treated as plain ." warnings on RPM hosts

2 participants