pan3793 commented on code in PR #41074:
URL: https://github.com/apache/spark/pull/41074#discussion_r1186797768


##########
dev/make-distribution.sh:
##########
@@ -287,6 +287,10 @@ if [ "$MAKE_TGZ" == "true" ]; then
   TARDIR="$SPARK_HOME/$TARDIR_NAME"
   rm -rf "$TARDIR"
   cp -r "$DISTDIR" "$TARDIR"
-  tar czf "spark-$VERSION-bin-$NAME.tgz" -C "$SPARK_HOME" "$TARDIR_NAME"
+  TAR="tar"
+  if [ "$(uname -s)" = "Darwin" ]; then
+    TAR="tar --no-mac-metadata --no-xattrs --no-fflags"

Review Comment:
   Yes, it's required. `--no-mac-metadata` is for excluding AppleDouble files; 
`--no-xattrs` is for excluding xattrs like 
`LIBARCHIVE.xattr.com.apple.FinderInfo`; `--no-fflags` is for excluding fflags 
like `SCHILY.fflags`
   
   Reference from macOS `man tar`
   
   ```
        --no-fflags
                (c, r, u, x modes only) Do not archive or extract file 
attributes or file flags.  This is the reverse of --fflags and the default 
behavior if tar is run as non-root in x mode.
   
        --no-mac-metadata
                (x mode only) Mac OS X specific.  Do not archive or extract 
ACLs and extended file attributes using copyfile(3) in AppleDouble format.  
This is the reverse of --mac-metadata.  and the default behavior if tar is run 
as non-root in
                x mode.
   
        --no-xattrs
                (c, r, u, x modes only) Do not archive or extract extended file 
attributes.  This is the reverse of --xattrs and the default behavior if tar is 
run as non-root in x mode.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to