Skip to content

feat(shell): add gnutar so GNU-tar install scripts work#61

Merged
CharlesB2 merged 1 commit into
mainfrom
feat/shell-add-gnutar
Jun 24, 2026
Merged

feat(shell): add gnutar so GNU-tar install scripts work#61
CharlesB2 merged 1 commit into
mainfrom
feat/shell-add-gnutar

Conversation

@CharlesB2

Copy link
Copy Markdown
Member

What

Add the gnutar package to the shell image, providing /usr/bin/tar as GNU tar (shadowing the busybox tar applet).

Why

The image only shipped busybox tar. Many curl | bash installers pass an empty-string argument to tar that GNU tar tolerates but busybox does not. Concretely, Railway's official installer (railway.com/install.sh) runs:

flags=$(test -n)                      # always evaluates to ""
${sudo} tar "${flags}" -xzf "${archive}" -C "${bin_dir}"   # -> tar "" -xzf ...

With busybox tar that fails at extraction:

tar: : not found in archive

This is the second blocker (after #60 added getconf) preventing the shell image from running the public Railway installer in CI.

Verification (linux/amd64)

Replicating the post-merge image (posix-libc-utils + gnutar) in wolfi-base:

$ apk add -q bash curl ca-certificates-bundle posix-libc-utils gnutar wget
$ tar --version | head -1
tar (GNU tar) 1.35.90
$ RAILWAY_VERSION=5.20.0 curl -fsSL https://railway.com/install.sh | bash -s -- -f
$ ~/.railway/bin/railway --version
railway 5.20.0

Before (busybox tar): tar: : not found in archive.

🤖 Generated with Claude Code

The shell image only shipped busybox tar, which aborts on the empty-string
argument that common `curl | bash` installers pass to tar. Railway's
install.sh, for example, runs `tar "${flags}" -xzf ...` where `flags` comes
from `flags=$(test -n)` and is always empty — so it executes `tar "" -xzf`.
GNU tar ignores the empty arg; busybox tar treats it as a missing archive
member and fails with `tar: : not found in archive`.

Adding `gnutar` provides `/usr/bin/tar` as GNU tar (shadowing the busybox
applet), unblocking those installers.

Verified on linux/amd64: `wolfi-base` + `posix-libc-utils` + `gnutar` runs
`curl -fsSL https://railway.com/install.sh | bash` to completion
(`railway 5.20.0`), whereas with busybox tar it failed at extraction.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@CharlesB2 CharlesB2 self-assigned this Jun 24, 2026
@CharlesB2 CharlesB2 requested a review from ggrosseveurgg June 24, 2026 10:19
@CharlesB2 CharlesB2 merged commit c723b1b into main Jun 24, 2026
7 checks passed
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