Repository navigation
Pack and check the source release tarball with GNU tar in a Linux container - #202
Merged
Merged
Conversation
This was referenced Nov 26, 2026
Merged
wu-sheng
force-pushed
the
release-tar-in-linux
branch
from
November 26, 2026 10:51
d0fb36c to
6ca3916
Compare
wankai123
previously approved these changes
Nov 26, 2026
…tainer make release-src packs the tarball with tools/releasing/linux-tar.sh, which runs GNU tar in a pinned Linux image instead of the host's tar, and unpacks it with GNU tar in that image before signing, stopping on any tar warning or any AppleDouble `._*` file. Packing needs Docker running. The 1.1.0 source tarball was packed on macOS, whose tar stored file extended attributes as AppleDouble `._*` entries: 68 of its 147 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. GNU tar does not match `--exclude .git/` and `--exclude .idea/` against those directories, as macOS tar did, so the patterns lose the trailing slash. The archive is created before tar runs, because GNU tar fails with "file changed as we read it" when the directory it packs gains a file. 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
force-pushed
the
release-tar-in-linux
branch
from
November 26, 2026 11:23
6ca3916 to
823a95c
Compare
wankai123
approved these changes
Nov 26, 2026
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.
Why
The 1.1.0 source tarball was packed on macOS: 68 of its 147 entries are AppleDouble
._*files. GNU tar on Linux unpacks them as stray files and warns about their extended-attribute headers. Same cause as apache/skywalking#14271.On macOS,
tarcan store a file's extended attributes (such ascom.apple.provenance) in two ways: as an AppleDouble._*entry beside the file, unlessCOPYFILE_DISABLE=1is set, and as extended (pax) headers. GNU tar on Linux unpacks each._*entry as a stray file, and printsIgnoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance'for each such header. Each of these repositories packed its release tarballs with its owntarcommand 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.shruns 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. Onlytarruns 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-srcpacks withlinux-tar.sh pack, and runslinux-tar.sh verifybefore signing.tar, both found by running the recipe:--exclude .git/against the.gitdirectory, so.gitwould have shipped in the source tarball..git/and.idea/lose the trailing slash.file changed as we read itwhen that directory gains a file. The recipe creates the archive first, asskywalking-nodejsalready does.release.mdsays packing needs Docker running, and describes the check.CHANGES.mdis written when the next release is prepared, asrelease.mddescribes, so it has no entry here.How it was verified (macOS, Docker Desktop)
make release-srcrun for real (gpg stubbed), old and new, on the same clone. The old recipe reproduces the problem (79._*entries). The new tarball holds exactly the old entries minus the._*files, plustools/,tools/releasing/andtools/releasing/linux-tar.sh, which are new in the tree, with no extended-attribute headers. The check passes.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-helm#208, apache/skywalking-nodejs#150.