Skip to content

Apache DataFusion SQL Query Engine

ARROW-719: [GLib] Release source archive

Kouhei Sutoud6c063d33a5f
diff --git a/dev/release/02-source.sh b/dev/release/02-source.sh
old mode 100644
new mode 100755
index bdaa5cc934..924b94fd6c
--- a/dev/release/02-source.sh
+++ b/dev/release/02-source.sh
@@ -54,9 +54,46 @@ echo "Using commit $release_hash"
tarball=$tag.tar.gz
+extract_dir=tmp-apache-arrow
+rm -rf $extract_dir
# be conservative and use the release hash, even though git produces the same
# archive (identical hashes) using the scm tag
-git archive $release_hash --prefix $tag/ -o $tarball
+git archive $release_hash --prefix $extract_dir/ | tar xf -
+
+# build Apache Arrow C++ before building Apache Arrow GLib because
+# Apache Arrow GLib requires Apache Arrow C++.
+mkdir -p $extract_dir/cpp/build
+cpp_install_dir=$PWD/$extract_dir/cpp/install
+cd $extract_dir/cpp/build
+cmake .. \
+ -DCMAKE_INSTALL_PREFIX=$cpp_install_dir \
+ -DARROW_BUILD_TESTS=no
+make -j8
+make install
+cd -
+
+# build source archive for Apache Arrow GLib by "make dist".
+cd $extract_dir/c_glib
+./autogen.sh
+./configure \
+ PKG_CONFIG_PATH=$cpp_install_dir/lib/pkgconfig \
+ --enable-gtk-doc
+LD_LIBRARY_PATH=$cpp_install_dir/lib make -j8
+make dist
+tar xzf *.tar.gz
+rm *.tar.gz
+cd -
+rm -rf tmp-c_glib/
+mv $extract_dir/c_glib/apache-arrow-glib-* tmp-c_glib/
+rm -rf $extract_dir
+
+# replace c_glib/ by tar.gz generated by "make dist"
+rm -rf $tag
+git archive $release_hash --prefix $tag/ | tar xf -
+rm -rf $tag/c_glib
+mv tmp-c_glib $tag/c_glib
+tar czf $tarball $tag
+rm -rf $tag
${SOURCE_DIR}/run-rat.sh $tarball
diff --git a/dev/release/run-rat.sh b/dev/release/run-rat.sh
index e26dd58969..a3c12a0ce8 100755
--- a/dev/release/run-rat.sh
+++ b/dev/release/run-rat.sh
@@ -40,6 +40,25 @@ $RAT $1 \
-e __init__.pxd \
-e __init__.py \
-e requirements.txt \
+ -e version \
+ -e "*.m4" \
+ -e configure \
+ -e config.sub \
+ -e config.h.in \
+ -e compile \
+ -e missing \
+ -e install-sh \
+ -e config.guess \
+ -e depcomp \
+ -e ltmain.sh \
+ -e arrow-glib.types \
+ -e arrow-glib-sections.txt \
+ -e arrow-glib-overrides.txt \
+ -e gtk-doc.make \
+ -e "*.html" \
+ -e "*.css" \
+ -e "*.png" \
+ -e "*.devhelp2" \
> rat.txt
cat rat.txt
UNAPPROVED=`cat rat.txt | grep "Unknown Licenses" | head -n 1 | cut -d " " -f 1`