-
Notifications
You must be signed in to change notification settings - Fork 5k
[Improvement-18035][dist] Exclude macOS junk from bin tar.gz for clean Linux extraction #18036
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
+25
−2
Closed
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
9cc4f6f
fix(dist): exclude macOS junk from bin tar.gz for Linux extraction
7c0a55c
fix(dist): exclude macOS junk in assembly and .gitignore per review
52bee7f
fix(dist): use tar --exclude instead of find/xattr per review
23118d7
fix(dist): move macOS junk cleanup to each module per review
9aaa12f
Merge branch 'dev' into fix/dist-macos-tar-linux-extraction
SbloodyS c988d2f
Merge branch 'dev' into fix/dist-macos-tar-linux-extraction
macdoor 365c4e4
Merge branch 'dev' into fix/dist-macos-tar-linux-extraction
macdoor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ | |
| .zip | ||
| .gz | ||
| .DS_Store | ||
| ._* | ||
| .target | ||
| .idea/ | ||
| !.idea/icon.png | ||
|
|
||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -797,6 +797,28 @@ | |
| <artifactId>maven-dependency-plugin</artifactId> | ||
| <version>${maven-dependency-plugin.version}</version> | ||
| </plugin> | ||
| <!-- Remove macOS junk from each module's target so assembly picks up clean output --> | ||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-antrun-plugin</artifactId> | ||
| <version>3.1.0</version> | ||
| <executions> | ||
| <execution> | ||
| <id>clean-macos-junk</id> | ||
| <phase>package</phase> | ||
| <goals> | ||
| <goal>run</goal> | ||
| </goals> | ||
| <configuration> | ||
| <target> | ||
| <delete failonerror="false"> | ||
| <fileset dir="${project.build.directory}" includes="**/._*, **/.DS_Store, ._*, .DS_Store" /> | ||
| </delete> | ||
| </target> | ||
| </configuration> | ||
| </execution> | ||
| </executions> | ||
| </plugin> | ||
|
Comment on lines
+800
to
+821
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't need to add this, we use |
||
| </plugins> | ||
| </build> | ||
| <url>https://dolphinscheduler.apache.org</url> | ||
|
|
||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is caused by you open the directory by finder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ruanwenjun,
The root cause of this issue is macOS
tar(bsdtar) behavior — it automatically embeds._*(AppleDouble) entries and extended attribute headers into the archive when creating a tarball, even if no._*files exist on disk. This is a well-known cross-platform issue:https://superuser.com/questions/61185/why-do-i-get-files-like-foo-in-my-tarball-on-os-x
So it's not caused by opening the directory in Finder — it happens whenever macOS bsdtar packs any file that has extended attributes (which macOS adds silently, e.g.
com.apple.provenance).