Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions dev/release/02-source-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ def test_symbolic_links
end

def test_glib_configure
unless ENV["ARROW_TEST_SOURCE_GLIB"] == "yes"
omit("This takes a long time. " +
"Set ARROW_TEST_SOURCE_GLIB=yes environment variable to test this.")
end
source("GLIB")
Dir.chdir("#{@tag_name}/c_glib") do
assert_equal([
Expand Down
26 changes: 11 additions & 15 deletions dev/release/02-source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,26 +61,22 @@ rm -rf ${tag}
git archive ${release_hash} --prefix ${tag}/) | \
tar xf -

# replace c_glib/ by tar.gz generated by "make dist"
# Replace c_glib/ after running c_glib/autogen.sh to create c_gilb/ source archive containing the configure script
if [ ${SOURCE_GLIB} -gt 0 ]; then
archive_name=tmp-apache-arrow
(cd "${SOURCE_TOP_DIR}" && \
git archive ${release_hash} --prefix ${archive_name}/) \
> ${archive_name}.tar
dist_c_glib_tar_gz=c_glib.tar.gz
docker_image_name=apache-arrow/release-source
DEBUG=yes docker build -t ${docker_image_name} "${SOURCE_DIR}/source"
docker \
run \
--rm \
--interactive \
--volume "$PWD":/host \
${docker_image_name} \
/build.sh ${archive_name} ${dist_c_glib_tar_gz}
rm -f ${archive_name}.tar
> "${SOURCE_TOP_DIR}/${archive_name}.tar"
c_glib_including_configure_tar_gz=c_glib.tar.gz
"${SOURCE_TOP_DIR}/dev/run_docker_compose.sh" \
release-source \
/arrow/dev/release/source/build.sh \
${archive_name} \
${c_glib_including_configure_tar_gz}
rm -f "${SOURCE_TOP_DIR}/${archive_name}.tar"
rm -rf ${tag}/c_glib
tar xf ${dist_c_glib_tar_gz} -C ${tag}
rm -f ${dist_c_glib_tar_gz}
tar xf "${SOURCE_TOP_DIR}/${c_glib_including_configure_tar_gz}" -C ${tag}
rm -f "${SOURCE_TOP_DIR}/${c_glib_including_configure_tar_gz}"
fi

# Resolve all hard and symbolic links
Expand Down
25 changes: 2 additions & 23 deletions dev/release/source/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,17 @@
# specific language governing permissions and limitations
# under the License.

FROM ubuntu:18.04
FROM debian:buster

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update -y -q && \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed the libraries for building Arrow C++, because just runs c_glib/autogen.sh.

apt-get install -y -q --no-install-recommends wget software-properties-common gpg-agent && \
wget --quiet -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
apt-add-repository -y "deb http://apt.llvm.org/bionic llvm-toolchain-bionic-7 main" && \
apt-get -y install clang-7

RUN apt update && \
apt install -y -V \
autoconf-archive \
bison \
cmake \
flex \
g++ \
gcc \
gtk-doc-tools \
libboost-filesystem-dev \
libboost-regex-dev \
libboost-system-dev \
libgirepository1.0-dev \
libglib2.0-doc \
libprotobuf-dev \
libprotoc-dev \
libtool \
lsb-release \
make \
pkg-config \
protobuf-compiler && \
pkg-config && \
apt clean && \
rm -rf /var/lib/apt/lists/*

COPY build.sh /build.sh
33 changes: 6 additions & 27 deletions dev/release/source/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,14 @@
set -e

archive_name=$1
dist_c_glib_tar_gz=$2
c_glib_including_configure_tar_gz=$2

tar xf /host/${archive_name}.tar
tar xf /arrow/${archive_name}.tar

# build Apache Arrow C++ before building Apache Arrow GLib because
# Apache Arrow GLib requires Apache Arrow C++.
mkdir -p ${archive_name}/cpp/build
cpp_install_dir=${PWD}/${archive_name}/cpp/install
cd ${archive_name}/cpp/build
cmake .. \
-DCMAKE_INSTALL_PREFIX=${cpp_install_dir} \
-DCMAKE_INSTALL_LIBDIR=lib \
-DARROW_PLASMA=yes \
-DARROW_GANDIVA=yes \
-DARROW_PARQUET=yes
make -j8
make install
cd -

# build source archive for Apache Arrow GLib by "make dist".
# Run autogen.sh to create c_glib/ source archive containing the configure script
cd ${archive_name}/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
rm -rf autom4te.cache
cd -
mv ${archive_name}/c_glib/apache-arrow-glib-* c_glib/
tar czf /host/${dist_c_glib_tar_gz} c_glib
mv ${archive_name}/c_glib/ c_glib/
tar czf /arrow/${c_glib_including_configure_tar_gz} c_glib
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,16 @@ services:

# TODO(kszucs): hive-integration

################################# Release ###################################

release-source:
image: arrow:release-source
build:
context: .
dockerfile: dev/release/source/Dockerfile
volumes:
- .:/arrow:delegated

######################## Verification Containers ############################

debian-stretch:
Expand Down