You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by uw...@apache.org on 2017/08/22 10:25:05 UTC
[arrow-dist] branch master updated: ARROW-1397: [C++] Use Docker
instead of Vagrant
This is an automated email from the ASF dual-hosted git repository.
uwe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-dist.git
The following commit(s) were added to refs/heads/master by this push:
new 3fb4e5e ARROW-1397: [C++] Use Docker instead of Vagrant
3fb4e5e is described below
commit 3fb4e5ed220f052fa9d818ddd8f6276a6719f09a
Author: Kouhei Sutou <ko...@cozmixng.org>
AuthorDate: Tue Aug 22 19:25:02 2017 +0900
ARROW-1397: [C++] Use Docker instead of Vagrant
---
cpp-linux/Rakefile | 130 +++++++++------------
cpp-linux/apt/Vagrantfile | 53 ---------
cpp-linux/apt/{build-deb.sh => build.sh} | 15 +--
.../Vagrantfile => apt/debian-stretch/Dockerfile} | 44 +++----
.../Vagrantfile => apt/ubuntu-16.04/Dockerfile} | 44 +++----
.../Vagrantfile => apt/ubuntu-17.04/Dockerfile} | 44 +++----
cpp-linux/debian/changelog | 6 +
cpp-linux/package-task.rb | 84 +++++++------
cpp-linux/yum/arrow.spec.in | 3 +
cpp-linux/yum/{build-rpm.sh => build.sh} | 30 +----
cpp-linux/yum/centos-6/Dockerfile | 57 +++++++++
cpp-linux/yum/{Vagrantfile => centos-7/Dockerfile} | 43 ++++---
12 files changed, 268 insertions(+), 285 deletions(-)
diff --git a/cpp-linux/Rakefile b/cpp-linux/Rakefile
index f96fd01..c0e5963 100644
--- a/cpp-linux/Rakefile
+++ b/cpp-linux/Rakefile
@@ -40,84 +40,70 @@ class ApacheArrowPackageTask < PackageTask
def define_archive_task
file @archive_name do
- cd(arrow_source_dir) do
- sh("git", "archive", "HEAD",
- "--prefix", "#{@archive_base_name}/",
- "--output", @archive_name)
- rm_f(@archive_base_name)
- sh("tar", "xf", @archive_name)
- rm_f(@archive_name)
-
- c_glib_tmp_dir = "c_glib_tmp"
- rm_rf(c_glib_tmp_dir)
- mkdir_p(c_glib_tmp_dir)
- cp_r(@archive_base_name, c_glib_tmp_dir)
- c_glib_dir = File.expand_path("#{@archive_base_name}/c_glib")
- rm_rf(c_glib_dir)
- cd("#{c_glib_tmp_dir}/#{@archive_base_name}") do
- build_type = "debug"
- cpp_dir = File.expand_path("cpp")
- cpp_build_dir = File.expand_path("cpp_build")
- mkdir_p(cpp_build_dir)
- cd(cpp_build_dir) do
- sh("cmake", cpp_dir,
- "-DCMAKE_BUILD_TYPE=#{build_type}",
- "-DARROW_BUILD_TESTS=no")
- sh("make", "-j8")
- end
- cd("c_glib") do
- sh("./autogen.sh")
- sh("./configure",
- "--with-arrow-cpp-build-dir=#{cpp_build_dir}",
- "--with-arrow-cpp-build-type=#{build_type}",
- "--enable-gtk-doc")
- sh({"LD_LIBRARY_PATH" => "#{cpp_build_dir}/#{build_type}"},
- "make", "-j8")
- sh("make", "dist")
- tar_gz = Dir.glob("*.tar.gz").first
- sh("tar", "xf", tar_gz)
- mv(File.basename(tar_gz, ".tar.gz"),
- c_glib_dir)
- end
- end
- rm_rf(c_glib_tmp_dir)
-
- sh("tar", "czf", @full_archive_name, @archive_base_name)
- rm_rf(@archive_base_name)
+ if /\A\d+\.\d+\.\d+\z/ =~ @version
+ download_archive
+ else
+ build_archive
end
end
end
- def rpm_depended_packages
- [
- "pkg-config",
- "cmake3",
- "boost-devel",
- "git",
- "jemalloc-devel",
- "python",
- "python-devel",
- "numpy",
- "gtk-doc",
- "gobject-introspection-devel",
- ]
+ def download_archive
+ mirror_base_url = "https://www.apache.org/dyn/closer.cgi/arrow"
+ mirror_list_url = "#{mirror_base_url}/arrow-#{@version}/#{@archive_name}"
+ open(mirror_list_url) do |response|
+ if /href="(.+?\/#{Regexp.escape(@archive_name)})"/ =~ response.read
+ download($1, ".")
+ end
+ end
end
- def deb_depended_packages
- [
- "debhelper",
- "pkg-config",
- "cmake",
- "git",
- "libboost-system-dev",
- "libboost-filesystem-dev",
- "libjemalloc-dev",
- "python3-dev",
- "python3-numpy",
- "libgirepository1.0-dev",
- "gtk-doc-tools",
- "libglib2.0-doc",
- ]
+ def build_archive
+ cd(arrow_source_dir) do
+ sh("git", "archive", "HEAD",
+ "--prefix", "#{@archive_base_name}/",
+ "--output", @archive_name)
+ rm_f(@archive_base_name)
+ sh("tar", "xf", @archive_name)
+ rm_f(@archive_name)
+
+ c_glib_tmp_dir = "c_glib_tmp"
+ rm_rf(c_glib_tmp_dir)
+ mkdir_p(c_glib_tmp_dir)
+ cp_r(@archive_base_name, c_glib_tmp_dir)
+ c_glib_dir = File.expand_path("#{@archive_base_name}/c_glib")
+ rm_rf(c_glib_dir)
+ cd("#{c_glib_tmp_dir}/#{@archive_base_name}") do
+ build_type = "debug"
+ cpp_dir = File.expand_path("cpp")
+ cpp_build_dir = File.expand_path("cpp_build")
+ mkdir_p(cpp_build_dir)
+ cd(cpp_build_dir) do
+ sh("cmake", cpp_dir,
+ "-DCMAKE_BUILD_TYPE=#{build_type}",
+ "-DARROW_BUILD_TESTS=no")
+ sh("make", "-j8")
+ end
+ cd("c_glib") do
+ sh("./autogen.sh")
+ sh("./configure",
+ "--with-arrow-cpp-build-dir=#{cpp_build_dir}",
+ "--with-arrow-cpp-build-type=#{build_type}",
+ "--enable-gtk-doc")
+ sh({"LD_LIBRARY_PATH" => "#{cpp_build_dir}/#{build_type}"},
+ "make", "-j8")
+ sh("make", "dist")
+ tar_gz = Dir.glob("*.tar.gz").first
+ sh("tar", "xf", tar_gz)
+ mv(File.basename(tar_gz, ".tar.gz"),
+ c_glib_dir)
+ end
+ end
+ rm_rf(c_glib_tmp_dir)
+
+ sh("tar", "czf", @full_archive_name, @archive_base_name)
+ rm_rf(@archive_base_name)
+ end
end
end
diff --git a/cpp-linux/apt/Vagrantfile b/cpp-linux/apt/Vagrantfile
deleted file mode 100644
index 4a792bb..0000000
--- a/cpp-linux/apt/Vagrantfile
+++ /dev/null
@@ -1,53 +0,0 @@
-# -*- ruby -*-
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
-VAGRANTFILE_API_VERSION = "2"
-
-Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
- vms = [
- {
- :id => "debian-stretch-amd64",
- :box => "bento/debian-9.0",
- },
- {
- :id => "ubuntu-16.04-i386",
- :box => "bento/ubuntu-16.04-i386",
- },
- {
- :id => "ubuntu-16.04-amd64",
- :box => "bento/ubuntu-16.04",
- },
- {
- :id => "ubuntu-17.04-i386",
- :box => "bento/ubuntu-17.04-i386",
- },
- {
- :id => "ubuntu-17.04-amd64",
- :box => "bento/ubuntu-17.04",
- },
- ]
-
- vms.each do |vm|
- config.vm.define(vm[:id]) do |node|
- node.vm.box = vm[:box]
- node.vm.provision(:shell, :privileged => false, :path => "build-deb.sh")
- end
- end
-end
diff --git a/cpp-linux/apt/build-deb.sh b/cpp-linux/apt/build.sh
similarity index 78%
rename from cpp-linux/apt/build-deb.sh
rename to cpp-linux/apt/build.sh
index a8f06a0..2b40e53 100755
--- a/cpp-linux/apt/build-deb.sh
+++ b/cpp-linux/apt/build.sh
@@ -1,4 +1,5 @@
#!/bin/sh
+# -*- sh-indentation: 2; sh-basic-offset: 2 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
@@ -28,10 +29,7 @@ run()
fi
}
-. /vagrant/env.sh
-
-run sudo apt-get update
-run sudo apt-get install -y lsb-release
+. /host/env.sh
distribution=$(lsb_release --id --short | tr 'A-Z' 'a-z')
code_name=$(lsb_release --codename --short)
@@ -44,21 +42,18 @@ case "${distribution}" in
;;
esac
-run sudo apt-get update
-run sudo apt-get install -V -y build-essential devscripts ${DEPENDED_PACKAGES}
-
run mkdir -p build
-run cp /vagrant/tmp/${PACKAGE}-${VERSION}.tar.gz \
+run cp /host/tmp/${PACKAGE}-${VERSION}.tar.gz \
build/${PACKAGE}_${VERSION}.orig.tar.gz
run cd build
run tar xfz ${PACKAGE}_${VERSION}.orig.tar.gz
run cd ${PACKAGE}-${VERSION}/
-run cp -rp /vagrant/tmp/debian debian
+run cp -rp /host/tmp/debian debian
# export DEB_BUILD_OPTIONS=noopt
run debuild -us -uc
run cd -
package_initial=$(echo "${PACKAGE}" | sed -e 's/\(.\).*/\1/')
-pool_dir="/vagrant/repositories/${distribution}/pool/${code_name}/${component}/${package_initial}/${PACKAGE}"
+pool_dir="/host/repositories/${distribution}/pool/${code_name}/${component}/${package_initial}/${PACKAGE}"
run mkdir -p "${pool_dir}/"
run cp *.tar.* *.dsc *.deb "${pool_dir}/"
diff --git a/cpp-linux/yum/Vagrantfile b/cpp-linux/apt/debian-stretch/Dockerfile
similarity index 60%
copy from cpp-linux/yum/Vagrantfile
copy to cpp-linux/apt/debian-stretch/Dockerfile
index 32d0f71..92364cf 100644
--- a/cpp-linux/yum/Vagrantfile
+++ b/cpp-linux/apt/debian-stretch/Dockerfile
@@ -1,5 +1,3 @@
-# -*- ruby -*-
-#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
@@ -17,25 +15,27 @@
# specific language governing permissions and limitations
# under the License.
-# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
-VAGRANTFILE_API_VERSION = "2"
+FROM debian:stretch
-Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
- vms = [
- {
- :id => "centos-6-x86_64",
- :box => "bento/centos-6.9",
- },
- {
- :id => "centos-7-x86_64",
- :box => "bento/centos-7.3",
- },
- ]
+ENV DEBIAN_FRONTEND noninteractive
- vms.each do |vm|
- config.vm.define(vm[:id]) do |node|
- node.vm.box = vm[:box]
- node.vm.provision(:shell, :path => "build-rpm.sh")
- end
- end
-end
+RUN \
+ apt update && \
+ apt install -y -V \
+ build-essential \
+ cmake \
+ debhelper\
+ devscripts \
+ git \
+ gtk-doc-tools \
+ libboost-filesystem-dev \
+ libboost-system-dev \
+ libgirepository1.0-dev \
+ libglib2.0-doc \
+ libjemalloc-dev \
+ lsb-release \
+ pkg-config \
+ python3-dev \
+ python3-numpy && \
+ apt clean && \
+ rm -rf /var/lib/apt/lists/*
diff --git a/cpp-linux/yum/Vagrantfile b/cpp-linux/apt/ubuntu-16.04/Dockerfile
similarity index 60%
copy from cpp-linux/yum/Vagrantfile
copy to cpp-linux/apt/ubuntu-16.04/Dockerfile
index 32d0f71..e365088 100644
--- a/cpp-linux/yum/Vagrantfile
+++ b/cpp-linux/apt/ubuntu-16.04/Dockerfile
@@ -1,5 +1,3 @@
-# -*- ruby -*-
-#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
@@ -17,25 +15,27 @@
# specific language governing permissions and limitations
# under the License.
-# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
-VAGRANTFILE_API_VERSION = "2"
+FROM ubuntu:16.04
-Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
- vms = [
- {
- :id => "centos-6-x86_64",
- :box => "bento/centos-6.9",
- },
- {
- :id => "centos-7-x86_64",
- :box => "bento/centos-7.3",
- },
- ]
+ENV DEBIAN_FRONTEND noninteractive
- vms.each do |vm|
- config.vm.define(vm[:id]) do |node|
- node.vm.box = vm[:box]
- node.vm.provision(:shell, :path => "build-rpm.sh")
- end
- end
-end
+RUN \
+ apt update && \
+ apt install -y -V \
+ build-essential \
+ cmake \
+ debhelper\
+ devscripts \
+ git \
+ gtk-doc-tools \
+ libboost-filesystem-dev \
+ libboost-system-dev \
+ libgirepository1.0-dev \
+ libglib2.0-doc \
+ libjemalloc-dev \
+ lsb-release \
+ pkg-config \
+ python3-dev \
+ python3-numpy && \
+ apt clean && \
+ rm -rf /var/lib/apt/lists/*
diff --git a/cpp-linux/yum/Vagrantfile b/cpp-linux/apt/ubuntu-17.04/Dockerfile
similarity index 60%
copy from cpp-linux/yum/Vagrantfile
copy to cpp-linux/apt/ubuntu-17.04/Dockerfile
index 32d0f71..8f63f9e 100644
--- a/cpp-linux/yum/Vagrantfile
+++ b/cpp-linux/apt/ubuntu-17.04/Dockerfile
@@ -1,5 +1,3 @@
-# -*- ruby -*-
-#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
@@ -17,25 +15,27 @@
# specific language governing permissions and limitations
# under the License.
-# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
-VAGRANTFILE_API_VERSION = "2"
+FROM ubuntu:17.04
-Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
- vms = [
- {
- :id => "centos-6-x86_64",
- :box => "bento/centos-6.9",
- },
- {
- :id => "centos-7-x86_64",
- :box => "bento/centos-7.3",
- },
- ]
+ENV DEBIAN_FRONTEND noninteractive
- vms.each do |vm|
- config.vm.define(vm[:id]) do |node|
- node.vm.box = vm[:box]
- node.vm.provision(:shell, :path => "build-rpm.sh")
- end
- end
-end
+RUN \
+ apt update && \
+ apt install -y -V \
+ build-essential \
+ cmake \
+ debhelper\
+ devscripts \
+ git \
+ gtk-doc-tools \
+ libboost-filesystem-dev \
+ libboost-system-dev \
+ libgirepository1.0-dev \
+ libglib2.0-doc \
+ libjemalloc-dev \
+ lsb-release \
+ pkg-config \
+ python3-dev \
+ python3-numpy && \
+ apt clean && \
+ rm -rf /var/lib/apt/lists/*
diff --git a/cpp-linux/debian/changelog b/cpp-linux/debian/changelog
index 7866716..7090bba 100644
--- a/cpp-linux/debian/changelog
+++ b/cpp-linux/debian/changelog
@@ -1,3 +1,9 @@
+apache-arrow (0.6.0-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Kouhei Sutou <ko...@clear-code.com> Fri, 11 Aug 2017 21:27:51 -0000
+
apache-arrow (0.6.0.20170802-1) unstable; urgency=low
* New upstream release.
diff --git a/cpp-linux/package-task.rb b/cpp-linux/package-task.rb
index 5268839..9741f1b 100644
--- a/cpp-linux/package-task.rb
+++ b/cpp-linux/package-task.rb
@@ -57,9 +57,36 @@ class PackageTask
end
end
- def run_vagrant(id)
- sh("vagrant", "up", id)
- sh("vagrant", "destroy", "--force", id)
+ def download(url, download_dir)
+ base_name = url.split("/").last
+ absolute_output_path = File.join(download_dir, base_name)
+
+ unless File.exist?(absolute_output_path)
+ mkdir_p(download_dir)
+ rake_output_message "Downloading... #{url}"
+ open(url) do |downloaded_file|
+ File.open(absolute_output_path, "wb") do |output_file|
+ output_file.print(downloaded_file.read)
+ end
+ end
+ end
+
+ absolute_output_path
+ end
+
+ def run_docker(id)
+ docker_tag = "#{@package}-#{id}"
+ sh("docker",
+ "build",
+ "--tag", docker_tag,
+ id)
+ sh("docker",
+ "run",
+ "--rm",
+ "--tty",
+ "--volume", "#{Dir.pwd}:/host:rw",
+ docker_tag,
+ "/host/build.sh")
end
def define_dist_task
@@ -89,7 +116,6 @@ class PackageTask
SOURCE_ARCHIVE=#{@archive_name}
PACKAGE=#{@rpm_package}
VERSION=#{@version}
-DEPENDED_PACKAGES="#{rpm_depended_packages.join("\n")}"
ENV
end
@@ -113,22 +139,19 @@ DEPENDED_PACKAGES="#{rpm_depended_packages.join("\n")}"
end
cd(yum_dir) do
- sh("vagrant", "destroy", "--force")
- distribution_versions = {
- "6" => ["x86_64"],
- "7" => ["x86_64"],
- }
+ distribution_versions = [
+ "6",
+ "7",
+ ]
threads = []
- distribution_versions.each do |ver, archs|
- archs.each do |arch|
- id = "#{distribution}-#{ver}-#{arch}"
- if parallel_build?
- threads << Thread.new(id) do |local_id|
- run_vagrant(local_id)
- end
- else
- run_vagrant(id)
+ distribution_versions.each do |version|
+ id = "#{distribution}-#{version}"
+ if parallel_build?
+ threads << Thread.new(id) do |local_id|
+ run_docker(local_id)
end
+ else
+ run_docker(id)
end
end
threads.each(&:join)
@@ -150,17 +173,13 @@ DEPENDED_PACKAGES="#{rpm_depended_packages.join("\n")}"
["ubuntu", "16.04"],
["ubuntu", "17.04"],
]
- architectures = [
- "i386",
- "amd64",
- ]
debian_dir = "debian"
apt_dir = "apt"
repositories_dir = "#{apt_dir}/repositories"
directory repositories_dir
- desc "Build DEB packages"
+ desc "Build deb packages"
task :build => [@archive_name, repositories_dir] do
tmp_dir = "#{apt_dir}/tmp"
rm_rf(tmp_dir)
@@ -173,26 +192,19 @@ DEPENDED_PACKAGES="#{rpm_depended_packages.join("\n")}"
file.puts(<<-ENV)
PACKAGE=#{@package}
VERSION=#{@version}
-DEPENDED_PACKAGES="#{deb_depended_packages.join("\n")}"
ENV
end
cd(apt_dir) do
- sh("vagrant", "destroy", "--force")
threads = []
code_names.each do |distribution, code_name|
- architectures.each do |arch|
- if arch == "i386"
- next unless code_name == "17.04"
- end
- id = "#{distribution}-#{code_name}-#{arch}"
- if parallel_build?
- threads << Thread.new(id) do |local_id|
- run_vagrant(local_id)
- end
- else
- run_vagrant(id)
+ id = "#{distribution}-#{code_name}"
+ if parallel_build?
+ threads << Thread.new(id) do |local_id|
+ run_docker(local_id)
end
+ else
+ run_docker(id)
end
end
threads.each(&:join)
diff --git a/cpp-linux/yum/arrow.spec.in b/cpp-linux/yum/arrow.spec.in
index e2a4a36..4dd4587 100644
--- a/cpp-linux/yum/arrow.spec.in
+++ b/cpp-linux/yum/arrow.spec.in
@@ -220,5 +220,8 @@ Documentation for Apache Arrow GLib.
%endif
%changelog
+* Fri Aug 11 2017 Kouhei Sutou <ko...@clear-code.com> - 0.6.0-1
+- New upstream release.
+
* Wed Aug 02 2017 Kouhei Sutou <ko...@clear-code.com> - 0.6.0.20170802-1
- New upstream release.
diff --git a/cpp-linux/yum/build-rpm.sh b/cpp-linux/yum/build.sh
similarity index 69%
rename from cpp-linux/yum/build-rpm.sh
rename to cpp-linux/yum/build.sh
index 9fdb50d..001caf7 100755
--- a/cpp-linux/yum/build-rpm.sh
+++ b/cpp-linux/yum/build.sh
@@ -29,7 +29,7 @@ run()
rpmbuild_options=
-. /vagrant/env.sh
+. /host/env.sh
distribution=$(cut -d " " -f 1 /etc/redhat-release | tr "A-Z" "a-z")
if grep -q Linux /etc/redhat-release; then
@@ -46,26 +46,6 @@ case "${architecture}" in
;;
esac
-run yum install -y epel-release
-run yum groupinstall -y "Development Tools"
-
-if [ "${distribution_version}" = 6 ]; then
- # libarchive-3 is required for cmake3
- srpm_download_url=http://vault.centos.org/7.3.1611/os/Source/SPackages
- libarchive_srpm_base=libarchive-3.1.2-10.el7_2.src.rpm
- run wget $srpm_download_url/$libarchive_srpm_base
- run yum install -y yum-utils autoconf268
- run yum-builddep -y --nogpgcheck $libarchive_srpm_base
- run env AUTOM4TE=autom4te268 rpmbuild --rebuild $libarchive_srpm_base
- run yum install -y ~/rpmbuild/RPMS/*/libarchive-3.*.rpm
- run rm -rf ~/rpmbuild/
-
- run yum install -y centos-release-scl
- run yum install -y devtoolset-6
-fi
-
-run yum install -y rpm-build rpmdevtools tar ${DEPENDED_PACKAGES}
-
if [ -x /usr/bin/rpmdev-setuptree ]; then
rm -rf .rpmmacros
run rpmdev-setuptree
@@ -80,7 +60,7 @@ EOM
run mkdir -p ~/rpmbuild/SRPMS
fi
-repository="/vagrant/repositories/${distribution}/${distribution_version}"
+repository="/host/repositories/${distribution}/${distribution_version}"
rpm_dir="${repository}/${architecture}/Packages"
srpm_dir="${repository}/source/SRPMS"
run mkdir -p "${rpm_dir}" "${srpm_dir}"
@@ -91,12 +71,12 @@ run mkdir -p "${rpm_dir}" "${srpm_dir}"
cd
if [ -n "${SOURCE_ARCHIVE}" ]; then
- run cp /vagrant/tmp/${SOURCE_ARCHIVE} rpmbuild/SOURCES/
+ run cp /host/tmp/${SOURCE_ARCHIVE} rpmbuild/SOURCES/
else
- run cp /vagrant/tmp/${PACKAGE}-${VERSION}.* rpmbuild/SOURCES/
+ run cp /host/tmp/${PACKAGE}-${VERSION}.* rpmbuild/SOURCES/
fi
run cp \
- /vagrant/tmp/${distribution}/${PACKAGE}.spec \
+ /host/tmp/${distribution}/${PACKAGE}.spec \
rpmbuild/SPECS/
cat <<BUILD > build.sh
diff --git a/cpp-linux/yum/centos-6/Dockerfile b/cpp-linux/yum/centos-6/Dockerfile
new file mode 100644
index 0000000..1ce5ded
--- /dev/null
+++ b/cpp-linux/yum/centos-6/Dockerfile
@@ -0,0 +1,57 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+FROM centos:6
+
+ENV \
+ SRPM_DOWNLOAD_URL=http://vault.centos.org/7.3.1611/os/Source/SPackages \
+ LIBARCHIVE_SRPM_BASE=libarchive-3.1.2-10.el7_2.src.rpm
+
+RUN \
+ yum update && \
+ yum install -y \
+ centos-release-scl \
+ epel-release && \
+ yum install -y \
+ autoconf268 \
+ wget \
+ yum-utils && \
+ yum groupinstall -y "Development Tools" && \
+ wget ${SRPM_DOWNLOAD_URL}/${LIBARCHIVE_SRPM_BASE} && \
+ yum-builddep -y --nogpgcheck ${LIBARCHIVE_SRPM_BASE} && \
+ rpm -i ${LIBARCHIVE_SRPM_BASE} && \
+ sed -i'' -e 's/^run_autotests$/:/g' ~/rpmbuild/SPECS/libarchive.spec && \
+ AUTOM4TE=autom4te268 rpmbuild -bb ~/rpmbuild/SPECS/libarchive.spec && \
+ yum install -y ~/rpmbuild/RPMS/*/libarchive-3.*.rpm && \
+ rm -rf ${LIBARCHIVE_SRPM_BASE} ~/rpmbuild/ && \
+ yum install -y \
+ boost-devel \
+ centos-release-scl \
+ cmake3 \
+ devtoolset-6 \
+ git \
+ gobject-introspection-devel \
+ gtk-doc \
+ jemalloc-devel \
+ numpy \
+ pkg-config \
+ python \
+ python-devel \
+ rpm-build \
+ rpmdevtools \
+ tar && \
+ yum clean all
diff --git a/cpp-linux/yum/Vagrantfile b/cpp-linux/yum/centos-7/Dockerfile
similarity index 60%
rename from cpp-linux/yum/Vagrantfile
rename to cpp-linux/yum/centos-7/Dockerfile
index 32d0f71..bd4e8f0 100644
--- a/cpp-linux/yum/Vagrantfile
+++ b/cpp-linux/yum/centos-7/Dockerfile
@@ -1,5 +1,3 @@
-# -*- ruby -*-
-#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
@@ -17,25 +15,24 @@
# specific language governing permissions and limitations
# under the License.
-# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
-VAGRANTFILE_API_VERSION = "2"
-
-Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
- vms = [
- {
- :id => "centos-6-x86_64",
- :box => "bento/centos-6.9",
- },
- {
- :id => "centos-7-x86_64",
- :box => "bento/centos-7.3",
- },
- ]
+FROM centos:7
- vms.each do |vm|
- config.vm.define(vm[:id]) do |node|
- node.vm.box = vm[:box]
- node.vm.provision(:shell, :path => "build-rpm.sh")
- end
- end
-end
+RUN \
+ yum update && \
+ yum install -y epel-release && \
+ yum groupinstall -y "Development Tools" && \
+ yum install -y \
+ boost-devel \
+ cmake3 \
+ git \
+ gobject-introspection-devel \
+ gtk-doc \
+ jemalloc-devel \
+ numpy \
+ pkg-config \
+ python \
+ python-devel \
+ rpm-build \
+ rpmdevtools \
+ tar && \
+ yum clean all
--
To stop receiving notification emails like this one, please contact
['"commits@arrow.apache.org" <co...@arrow.apache.org>'].