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/06 07:43:08 UTC

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

pan3793 opened a new pull request, #41074:
URL: https://github.com/apache/spark/pull/41074

   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
     8. If you want to add or modify an error type or message, please read the guideline first in
        'core/src/main/resources/error/README.md'.
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   Add args `--no-mac-metadata --no-xattrs` to `tar` on macOS in `dev/make-distribution.sh` to exclude macOS-specific extended metadata.
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   The binary tarball created on macOS includes extended macOS-specific metadata and xattrs, which causes warnings when unarchiving it on Linux.
   
   Step to reproduce
   
   1. create tarball on macOS
   ```
   ➜  apache-spark git:(master) tar --version
   bsdtar 3.5.3 - libarchive 3.5.3 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.8
   ```
   
   ```
   ➜  apache-spark git:(master) dev/make-distribution.sh --tgz
   ```
   
   2. unarchive the binary tarball on Linux (CentOS-7)
   
   ```
   ➜  ~ tar --version
   tar (GNU tar) 1.26
   Copyright (C) 2011 Free Software Foundation, Inc.
   License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
   This is free software: you are free to change and redistribute it.
   There is NO WARRANTY, to the extent permitted by law.
   
   Written by John Gilmore and Jay Fenlason.
   ```
   
   ```
   ➜  ~ tar -xzf spark-3.5.0-SNAPSHOT-bin-3.3.5.tgz
   tar: Ignoring unknown extended header keyword `SCHILY.fflags'
   tar: Ignoring unknown extended header keyword `LIBARCHIVE.xattr.com.apple.FinderInfo'
   ```
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   No, dev only.
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   If benchmark tests were added, please run the benchmarks in GitHub Actions for the consistent environment, and the instructions could accord to: https://spark.apache.org/developer-tools.html#github-workflow-benchmarks.
   -->
   Create binary tarball on macOS then unarchive on Linux, warnings disappear after this change.


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


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

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #41074:
URL: https://github.com/apache/spark/pull/41074#issuecomment-1537153689

   We don't need to apply this change to `release-build.sh` because it's only called inside the `spark-rm` container during the release procedure. Unless you want it to work on macOS too.


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


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

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on PR #41074:
URL: https://github.com/apache/spark/pull/41074#issuecomment-1537192564

   To @srowen , we released Apache Spark 3.2.4 as EOL release and `branch-3.2` is not considered maintained now.  It would be great if we don't touch EOL branches because it will cause confusion to the contributors.


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


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

Posted by "srowen (via GitHub)" <gi...@apache.org>.
srowen commented on PR #41074:
URL: https://github.com/apache/spark/pull/41074#issuecomment-1537155770

   Merged to master/3.4/3.3/3.2


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


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

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #41074:
URL: https://github.com/apache/spark/pull/41074#issuecomment-1537083034

   cc @srowen @LuciferYang 


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


[GitHub] [spark] srowen closed pull request #41074: [SPARK-43395][BUILD] Exclude macOS tar extended metadata in make-distribution.sh

Posted by "srowen (via GitHub)" <gi...@apache.org>.
srowen closed pull request #41074: [SPARK-43395][BUILD] Exclude macOS tar extended metadata in make-distribution.sh
URL: https://github.com/apache/spark/pull/41074


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


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

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on code in PR #41074:
URL: https://github.com/apache/spark/pull/41074#discussion_r1186804356


##########
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:
   Thanks!



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


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

Posted by "srowen (via GitHub)" <gi...@apache.org>.
srowen commented on PR #41074:
URL: https://github.com/apache/spark/pull/41074#issuecomment-1537144110

   Actually there is another tar command in release-build.sh ; do we need this change there too?


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


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

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on code in PR #41074:
URL: https://github.com/apache/spark/pull/41074#discussion_r1186727589


##########
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:
   `--no-xattrs --no-fflags` is required additionally, @pan3793 ?



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


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

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
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


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

Posted by "srowen (via GitHub)" <gi...@apache.org>.
srowen commented on PR #41074:
URL: https://github.com/apache/spark/pull/41074#issuecomment-1537199393

   Yeah it won't matter, likely. On the off chance we make one more release, this is a low-risk 'fix' to the release process


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