This is an automated email from the ASF dual-hosted git repository.
srowen pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.2 by this push:
new 37c27451a2d [SPARK-43395][BUILD] Exclude macOS tar extended metadata
in make-distribution.sh
37c27451a2d is described below
commit 37c27451a2dbb4668c2793c1fcae4759c845d3ad
Author: Cheng Pan <[email protected]>
AuthorDate: Sat May 6 09:37:44 2023 -0500
[SPARK-43395][BUILD] Exclude macOS tar extended metadata in
make-distribution.sh
### What changes were proposed in this pull request?
Add args `--no-mac-metadata --no-xattrs --no-fflags` to `tar` on macOS in
`dev/make-distribution.sh` to exclude macOS-specific extended metadata.
### Why are the changes needed?
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 (13.3.1)
```
➜ 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?
No, dev only.
### How was this patch tested?
Create binary tarball on macOS then unarchive on Linux, warnings disappear
after this change.
Closes #41074 from pan3793/SPARK-43395.
Authored-by: Cheng Pan <[email protected]>
Signed-off-by: Sean Owen <[email protected]>
(cherry picked from commit 2d0240df3c474902e263f67b93fb497ca13da00f)
Signed-off-by: Sean Owen <[email protected]>
---
dev/make-distribution.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dev/make-distribution.sh b/dev/make-distribution.sh
index 571059be6fd..e92f445f046 100755
--- a/dev/make-distribution.sh
+++ b/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"
+ fi
+ $TAR -czf "spark-$VERSION-bin-$NAME.tgz" -C "$SPARK_HOME" "$TARDIR_NAME"
rm -rf "$TARDIR"
fi
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]