From 3d386be29bb9e8032e9acaec7c831133928fbeba Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 14 Jul 2024 09:52:10 -0700 Subject: [PATCH] [ci] [R-package] use --no-xattrs when re-tarring CRAN-style package (#6540) --- build-cran-package.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build-cran-package.sh b/build-cran-package.sh index 2ed2e6e9c4ca..90df29247b15 100755 --- a/build-cran-package.sh +++ b/build-cran-package.sh @@ -202,8 +202,12 @@ if ${BUILD_VIGNETTES} ; then rm -f ./lightgbm/src/utils/*.o echo "re-tarring ${TARBALL_NAME}" + # --no-xattrs is the default in GNU tar but not some distributions of BSD tar. + # Enable it here to avoid errors on macOS. + # ref: https://stackoverflow.com/a/74373784/3986677 tar \ -cz \ + --no-xattrs \ -f "${TARBALL_NAME}" \ lightgbm \ > /dev/null 2>&1