Skip to content

Pack the source release tarball with GNU tar in a Linux container, and check both release tarballs before signing - #208

Merged
wu-sheng merged 1 commit into
masterfrom
release-tar-in-linux
Nov 26, 2026
Merged

wu-sheng merged 1 commit into
masterfrom
release-tar-in-linux

Conversation

@wu-sheng

@wu-sheng wu-sheng commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Why

The 5.0.0 source tarball was packed on macOS: 117 of its 234 entries are AppleDouble ._* files, one beside every file. GNU tar on Linux unpacks them as stray files, and prints Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance' 117 times. Same cause as apache/skywalking#14271. The chart tarball comes from helm package and is clean.

On macOS, tar can store a file's extended attributes (such as com.apple.provenance) in two ways: as an AppleDouble ._* entry beside the file, unless COPYFILE_DISABLE=1 is set, and as extended (pax) headers. GNU tar on Linux unpacks each ._* entry as a stray file, and prints Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance' for each such header. Each of these repositories packed its release tarballs with its own tar command on the release manager's machine, so each earlier fix was a different set of host flags, and a release was only as clean as the flags its repository happened to have.

What changes

linux-tar.sh runs GNU tar in a pinned Linux image (debian:bookworm-slim, pinned by its multi-arch digest). The container does not see macOS attributes and GNU tar creates no ._* entries, so there is no host flag left to forget. Only tar runs in the container; builds, GPG signing and checksums stay on the release manager's machine. It has three commands:

  • check: Docker is installed and its daemon is running.
  • pack <dir> <tar arguments>: runs GNU tar with <dir> as its working directory.
  • verify <tarball>...: unpacks each tarball with GNU tar in a fresh container from the same image, the way a Linux user would, and fails on any tar warning or any ._* file.

In this repository:

  • make release-src packs with linux-tar.sh pack, with the same excludes and layout as before. GNU tar writes the archive to stdout and the host redirects it into $(TMPDIR), so the detour that keeps the archive out of itself is unchanged.
  • make release runs linux-tar.sh verify on the source and the chart tarball before signing either.
  • tools/releasing/release.sh preflight requires Docker with its daemon running.
  • docs/contributing/release.md shows the new recipes and explains them. docs/changes/changes.md has an entry under 5.1.0 Bugs.

How it was verified (macOS, Docker Desktop)

  • make release-src run for real, old and new, on the same clone. The old recipe reproduces the problem (126 ._* entries). The new tarball holds exactly the old entries minus the ._* files, plus the new tools/releasing/linux-tar.sh, with no extended-attribute headers.
  • make release, with gpg stubbed and a real helm package, produces all six files, and both tarballs pass the check.

The same change, with the same linux-tar.sh: apache/skywalking#14272, apache/skywalking-java#852, apache/skywalking-mcp#48, apache/skywalking-swck#240, apache/skywalking-client-js#202, apache/skywalking-nodejs#150.

…d check both release tarballs before signing

make release-src packs the source tarball with tools/releasing/linux-tar.sh, which runs GNU tar
in a pinned Linux image instead of the host's tar. The archive goes to stdout, so the $(TMPDIR)
detour that keeps it out of itself is unchanged. make release unpacks the source and the chart
tarball with GNU tar in that image before signing, stopping on any tar warning or any AppleDouble
`._*` file. Preflight requires Docker with its daemon running.

The 5.0.0 source tarball was packed on macOS, whose tar stored each file's extended attributes as
an AppleDouble `._*` entry beside it: 117 of its 234 entries. GNU tar on Linux unpacks them as
stray files and warns about their extended-attribute headers (apache/skywalking#14271). The
container does not see macOS attributes and GNU tar creates no `._*` entries.

linux-tar.sh is one file, kept identical in the release scripts of skywalking, skywalking-java,
skywalking-mcp, skywalking-swck, skywalking-helm, skywalking-client-js and skywalking-nodejs.
@wu-sheng
wu-sheng force-pushed the release-tar-in-linux branch from 9df1f57 to 10f681b Compare November 26, 2026 11:23
@wu-sheng wu-sheng changed the title Pack and check the release tarballs with GNU tar in a Linux container Pack the source release tarball with GNU tar in a Linux container, and check both release tarballs before signing Nov 26, 2026
@wu-sheng
wu-sheng merged commit 312cea0 into master Nov 26, 2026
6 checks passed
@wu-sheng
wu-sheng deleted the release-tar-in-linux branch November 26, 2026 12:53
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