Skip to content

Commit f870183

Browse files
committed
ARROW-3578: [Release] Resolve all hard and symbolic links in tar.gz
They may cause some problems when we extract the archive on Windows and we run RAT against the archive. Author: Kouhei Sutou <kou@clear-code.com> Closes apache#4028 from kou/fix-rat and squashes the following commits: d7ab065 <Kouhei Sutou> Resolve all hard and symbolic links in tar.gz
1 parent a0b4a8c commit f870183

3 files changed

Lines changed: 13 additions & 9 deletions

File tree

ci/travis_release_audit.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,7 @@
2020
set -e
2121

2222
# Check licenses according to Apache policy
23-
git archive HEAD --prefix=apache-arrow/ --output=arrow-src.tar.gz
23+
git archive HEAD --prefix=apache-arrow-raw/ | tar xf -
24+
cp -r -L apache-arrow{-raw,}
25+
tar czf arrow-src.tar.gz apache-arrow
2426
./dev/release/run-rat.sh arrow-src.tar.gz

dev/release/02-source.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,14 @@ rm -rf ${tag}/c_glib
6868
tar xf ${dist_c_glib_tar_gz} -C ${tag}
6969
rm -f ${dist_c_glib_tar_gz}
7070

71+
# Resolve all hard and symbolic links
72+
rm -rf ${tag}.tmp
73+
mv ${tag} ${tag}.tmp
74+
cp -r -L ${tag}.tmp ${tag}
75+
rm -rf ${tag}.tmp
76+
7177
# Create new tarball from modified source directory
72-
tar czhf ${tarball} ${tag}
78+
tar czf ${tarball} ${tag}
7379
rm -rf ${tag}
7480

7581
${SOURCE_DIR}/run-rat.sh ${tarball}

dev/release/rat_exclude_files.txt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
*.json
99
*.snap
1010
.github/ISSUE_TEMPLATE.md
11-
cpp/examples/parquet/parquet-arrow/cmake_modules/FindArrow.cmake
1211
cpp/CHANGELOG_PARQUET.md
1312
cpp/src/arrow/io/mman.h
1413
cpp/src/arrow/util/random.h
@@ -19,13 +18,9 @@ cpp/build-support/asan_symbolize.py
1918
cpp/build-support/cpplint.py
2019
cpp/build-support/lint_exclusions.txt
2120
cpp/build-support/iwyu/*
22-
cpp/cmake_modules/BuildUtils.cmake
2321
cpp/cmake_modules/FindPythonLibsNew.cmake
24-
cpp/cmake_modules/FindNumPy.cmake
25-
cpp/cmake_modules/SetupCxxFlags.cmake
2622
cpp/cmake_modules/SnappyCMakeLists.txt
2723
cpp/cmake_modules/SnappyConfig.h
28-
cpp/cmake_modules/CompilerInfo.cmake
2924
cpp/src/parquet/.parquetcppversion
3025
cpp/src/plasma/thirdparty/ae/ae.c
3126
cpp/src/plasma/thirdparty/ae/ae.h
@@ -125,8 +120,9 @@ go/*.tmpldata
125120
go/*.s
126121
js/.npmignore
127122
js/closure-compiler-scripts/*
128-
python/cmake_modules
129-
python/cmake_modules/*
123+
python/cmake_modules/FindPythonLibsNew.cmake
124+
python/cmake_modules/SnappyCMakeLists.txt
125+
python/cmake_modules/SnappyConfig.h
130126
python/MANIFEST.in
131127
python/manylinux1/.dockerignore
132128
python/pyarrow/includes/__init__.pxd

0 commit comments

Comments
 (0)