You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by bo...@apache.org on 2023/05/12 00:39:05 UTC

[kyuubi] branch master updated: [KYUUBI #4828] [BUILD] Exclude macOS tar extended metadata in build/dist

This is an automated email from the ASF dual-hosted git repository.

bowenliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git


The following commit(s) were added to refs/heads/master by this push:
     new 1e310a081 [KYUUBI #4828] [BUILD] Exclude macOS tar extended metadata in build/dist
1e310a081 is described below

commit 1e310a0818f23dd7b8f2d4afd17795794fed46ea
Author: Cheng Pan <ch...@apache.org>
AuthorDate: Fri May 12 08:38:26 2023 +0800

    [KYUUBI #4828] [BUILD] Exclude macOS tar extended metadata in build/dist
    
    ### _Why are the changes needed?_
    
    Add args `--no-mac-metadata --no-xattrs --no-fflags` to `tar` on macOS in `build/dist` to exclude macOS-specific extended metadata.
    
    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-kyuubi 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-kyuubi git:(master) build/dist --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 apache-kyuubi-1.8.0-SNAPSHOT-bin.tgz
    tar: Ignoring unknown extended header keyword `SCHILY.fflags'
    tar: Ignoring unknown extended header keyword `LIBARCHIVE.xattr.com.apple.FinderInfo'
    ```
    
    ### _How was this patch tested?_
    
    - [x] Manual tests
    
    Create binary tarball on macOS then unarchive on Linux, warnings disappear after this change.
    
    Closes #4828 from pan3793/dist.
    
    Closes #4828
    
    7bc49d847 [Cheng Pan] [BUILD] Exclude macOS tar extended metadata in build/dist
    
    Authored-by: Cheng Pan <ch...@apache.org>
    Signed-off-by: liangbowen <li...@gf.com.cn>
---
 build/dist | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/build/dist b/build/dist
index e0dae3479..33ef189c6 100755
--- a/build/dist
+++ b/build/dist
@@ -384,7 +384,11 @@ if [[ "$MAKE_TGZ" == "true" ]]; then
   TARDIR="$KYUUBI_HOME/$TARDIR_NAME"
   rm -rf "$TARDIR"
   cp -R "$DISTDIR" "$TARDIR"
-  tar czf "$TARDIR_NAME.tgz" -C "$KYUUBI_HOME" "$TARDIR_NAME"
+  TAR="tar"
+  if [ "$(uname -s)" = "Darwin" ]; then
+    TAR="tar --no-mac-metadata --no-xattrs --no-fflags"
+  fi
+  $TAR -czf "$TARDIR_NAME.tgz" -C "$KYUUBI_HOME" "$TARDIR_NAME"
   rm -rf "$TARDIR"
   echo "The Kyuubi tarball $TARDIR_NAME.tgz is successfully generated in $KYUUBI_HOME."
 fi