Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.zip
.gz
.DS_Store
._*
.target
.idea/
!.idea/icon.png
Expand Down
4 changes: 2 additions & 2 deletions dolphinscheduler-dist/src/main/assembly/assembly-plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ done
# create symbolic link for standalone-server
cd $BIN_DIR/standalone-server && ln -s ../tools/sql/sql sql

# repack bin tar
# repack bin tar (exclude macOS junk so extraction on Linux is clean)
BIN_TAR_FILE_NAME=$(basename $BIN_TAR_FILE)
cd $DIST_DIR && tar -zcf $BIN_TAR_FILE_NAME apache-dolphinscheduler-*-bin
cd $DIST_DIR && tar -zcf $BIN_TAR_FILE_NAME --exclude='._*' --exclude='.DS_Store' apache-dolphinscheduler-*-bin
Comment on lines +80 to +82
Copy link
Member

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?

Copy link
Contributor Author

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?

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

OS X's tar uses the AppleDouble format to store extended attributes and ACLs. [...] You can tell tar to not include the metadata by setting COPYFILE_DISABLE to some value.

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).


echo "assembly-plugins.sh done"
22 changes: 22 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

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

We don't need to add this, we use fileSets to collect the file, we already exclude this

 <exclude>**/.DS_Store</exclude>
 <exclude>**/Thumbs.db</exclude>

</plugins>
</build>
<url>https://dolphinscheduler.apache.org</url>
Expand Down
Loading