Skip to content

redis: declare gawk build dep (fixes 'awk: command not found') - #542

Merged
twitchyliquid64 merged 1 commit into
mainfrom
fix/redis-gawk-dep
Jul 30, 2026
Merged

redis: declare gawk build dep (fixes 'awk: command not found')#542
twitchyliquid64 merged 1 commit into
mainfrom
fix/redis-gawk-dep

Conversation

@bryan-minimal

@bryan-minimal bryan-minimal commented Jul 30, 2026

Copy link
Copy Markdown
Member

redis 8.8's build shells out to awk (via its bundled scripts/lib/manifest.sh, line 88, invoked from the build Makefile target), but packages/redis/build.ncl lists its build tools individually — bash, coreutils, grep, sed, make, binutils, gcc, linux_headers — and never declared gawk. None of those pull gawk in transitively, so redis has no awk in its sandbox and the build dies:

/build/scripts/lib/manifest.sh: line 88: awk: command not found
make: *** [Makefile:109: build] Error 127

Why it surfaced now (and not at the 8.8.1 bump)

This is a latent undeclared build-dep, not a regression. redis's cached artifact was evidently produced under conditions where awk was incidentally present (or the entry has since aged out of the res-server build cache), so cold rebuilds only started failing once one actually ran — here, on an unrelated PR's CI (#541, a syft bump, which does not touch redis). Declaring the dep explicitly is the correct fix regardless of the exact masking mechanism: the build genuinely needs awk, so it must be in build_deps.

Fix

Add gawk (the package base uses to provide awk) to redis's imports and build_deps.

Verification

Built redis locally arm64-native with a forced cold rebuild (novel-marker cache-bust) after the change: it now builds to completion — no awk: command not found, no Error 127 — and produces the redis-server / redis-cli binaries. gawk was the only missing dep; no cascade.

Unblocks unrelated PRs (e.g. #541) whose CI happens to cold-rebuild redis.

Summary by CodeRabbit

  • Chores
    • Added required build tooling to improve the reliability of the Redis package build process.

Co-Authored-By: Claude Opus <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The Redis build specification imports the gawk package and adds it to the build dependencies used by the Redis build script.

Changes

Redis build dependency

Layer / File(s) Summary
Wire gawk into the Redis build
packages/redis/build.ncl
The build spec imports gawk and includes it in build_deps.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the change: it adds gawk as a Redis build dependency to fix the awk not found error.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/redis-gawk-dep

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
packages/redis/build.ncl (1)

4-4: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Keep the import bindings alphabetized.

gawk is inserted correctly relative to grep, but the full lowercase import group is not alphabetized (binutils, gcc, and glibc appear later). Reorder the bindings so the new import complies with the repository rule.

As per coding guidelines, imports must be alphabetized within each identifier group.

Proposed ordering
 let { subsetOf, Attrs, BuildSpec, Local, OutputBin, Source, .. } = import "minimal.ncl" in
 let bash = import "../bash/build.ncl" in
+let binutils = import "../binutils/build.ncl" in
 let coreutils = import "../coreutils/build.ncl" in
 let gawk = import "../gawk/build.ncl" in
+let gcc = import "../gcc/build.ncl" in
+let glibc = import "../glibc/build.ncl" in
 let grep = import "../grep/build.ncl" in
+let linux_headers = import "../linux_headers/build.ncl" in
+let make = import "../make/build.ncl" in
+let sed = import "../sed/build.ncl" in
-let make = import "../make/build.ncl" in
-let sed = import "../sed/build.ncl" in
-let binutils = import "../binutils/build.ncl" in
-let gcc = import "../gcc/build.ncl" in
-let linux_headers = import "../linux_headers/build.ncl" in
-
-let glibc = import "../glibc/build.ncl" in
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/redis/build.ncl` at line 4, Alphabetize the lowercase import
bindings in the build definition, moving the gawk binding into its correct
position relative to binutils, gcc, glibc, and grep. Preserve the existing
import bindings and only adjust their ordering.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@packages/redis/build.ncl`:
- Line 4: Alphabetize the lowercase import bindings in the build definition,
moving the gawk binding into its correct position relative to binutils, gcc,
glibc, and grep. Preserve the existing import bindings and only adjust their
ordering.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 36cf98af-1d4d-40c8-a33a-1f20bbb5d5f3

📥 Commits

Reviewing files that changed from the base of the PR and between 02e5f82 and f0de529.

📒 Files selected for processing (1)
  • packages/redis/build.ncl

@twitchyliquid64
twitchyliquid64 added this pull request to the merge queue Jul 30, 2026
Merged via the queue into main with commit 3ca8575 Jul 30, 2026
10 checks passed
@twitchyliquid64
twitchyliquid64 deleted the fix/redis-gawk-dep branch July 30, 2026 21:33
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.

2 participants