You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "pan3793 (via GitHub)" <gi...@apache.org> on 2023/05/07 07:22:47 UTC

[GitHub] [spark] pan3793 commented on a diff in pull request #41074: [SPARK-43395][BUILD] Exclude macOS tar extended metadata in make-distribution.sh

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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org