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
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
# specific language governing permissions and limitations
# under the License.

arm64v8/debian:stretch
arm64v8/debian:buster
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

ARG FROM=debian:stretch
ARG FROM=debian:buster
FROM ${FROM}

COPY qemu-* /usr/bin/
Expand All @@ -29,23 +29,20 @@ RUN \
/etc/apt/apt.conf.d/disable-install-recommends

RUN sed -i'' -e 's/main$/main contrib non-free/g' /etc/apt/sources.list

RUN \
echo "deb http://deb.debian.org/debian stretch-backports main" > \
echo "deb http://deb.debian.org/debian buster-backports main" > \
/etc/apt/sources.list.d/backports.list
RUN \
echo "deb http://deb.debian.org/debian stretch-backports-sloppy main" > \
/etc/apt/sources.list.d/backports-sloppy.list

ARG DEBUG
RUN \
quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \
apt update ${quiet} && \
apt install -y -V ${quiet} \
build-essential \
clang-7 \
cmake \
debhelper \
devscripts \
fakeroot \
git \
gtk-doc-tools \
libboost-filesystem-dev \
Expand All @@ -57,33 +54,30 @@ RUN \
libcurl4-openssl-dev \
libgirepository1.0-dev \
libglib2.0-doc \
libgmock-dev \
libgoogle-glog-dev \
libgtest-dev \
liblz4-dev \
libre2-dev \
libsnappy-dev \
libssl-dev \
libthrift-dev \
libutf8proc-dev \
libzstd-dev \
llvm-7-dev \
lsb-release \
ninja-build \
pkg-config \
python3-dev \
python3-numpy \
python3-pip \
python3-setuptools \
python3-wheel \
rapidjson-dev \
tzdata \
zlib1g-dev && \
apt install -y -V -t stretch-backports-sloppy ${quiet} \
libarchive13 && \
apt install -y -V -t stretch-backports ${quiet} \
debhelper \
libgmock-dev \
libgtest-dev \
rapidjson-dev && \
apt install -y -V -t buster-backports ${quiet} \
clang-8 \
llvm-8-dev && \
if apt list | grep '^nvidia-cuda-toolkit/'; then \
apt install -y -V -t stretch-backports ${quiet} nvidia-cuda-toolkit; \
apt install -y -V ${quiet} nvidia-cuda-toolkit; \
fi && \
pip3 install --upgrade meson && \
ln -s /usr/local/bin/meson /usr/bin/ && \
Expand Down
2 changes: 1 addition & 1 deletion dev/tasks/linux-packages/github.linux.amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Set up Ruby
uses: actions/setup-ruby@master
uses: actions/setup-ruby@v1
- name: Checkout Arrow
run: |
git clone --no-checkout {{ arrow.remote }} arrow
Expand Down
50 changes: 25 additions & 25 deletions dev/tasks/linux-packages/package-task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -256,31 +256,29 @@ def apt_dir
"apt"
end

def apt_prepare_debian_dirs(tmp_dir)
apt_targets.each do |target|
source_debian_dir = nil
specific_debian_dir = "debian.#{target}"
distribution, code_name, _architecture = target.split("-", 3)
platform = [distribution, code_name].join("-")
platform_debian_dir = "debian.#{platform}"
if File.exist?(specific_debian_dir)
source_debian_dir = specific_debian_dir
elsif File.exist?(platform_debian_dir)
source_debian_dir = platform_debian_dir
else
source_debian_dir = "debian"
end
def apt_prepare_debian_dir(tmp_dir, target)
source_debian_dir = nil
specific_debian_dir = "debian.#{target}"
distribution, code_name, _architecture = target.split("-", 3)
platform = [distribution, code_name].join("-")
platform_debian_dir = "debian.#{platform}"
if File.exist?(specific_debian_dir)
source_debian_dir = specific_debian_dir
elsif File.exist?(platform_debian_dir)
source_debian_dir = platform_debian_dir
else
source_debian_dir = "debian"
end

prepared_debian_dir = "#{tmp_dir}/debian.#{target}"
cp_r(source_debian_dir, prepared_debian_dir)
control_in_path = "#{prepared_debian_dir}/control.in"
if File.exist?(control_in_path)
control_in = File.read(control_in_path)
rm_f(control_in_path)
File.open("#{prepared_debian_dir}/control", "w") do |control|
prepared_control = apt_prepare_debian_control(control_in, target)
control.print(prepared_control)
end
prepared_debian_dir = "#{tmp_dir}/debian.#{target}"
cp_r(source_debian_dir, prepared_debian_dir)
control_in_path = "#{prepared_debian_dir}/control.in"
if File.exist?(control_in_path)
control_in = File.read(control_in_path)
rm_f(control_in_path)
File.open("#{prepared_debian_dir}/control", "w") do |control|
prepared_control = apt_prepare_debian_control(control_in, target)
control.print(prepared_control)
end
end
end
Expand All @@ -296,7 +294,9 @@ def apt_build
mkdir_p(tmp_dir)
cp(deb_archive_name,
File.join(tmp_dir, deb_archive_name))
apt_prepare_debian_dirs(tmp_dir)
apt_targets.each do |target|
apt_prepare_debian_dir(tmp_dir, target)
end

env_sh = "#{apt_dir}/env.sh"
File.open(env_sh, "w") do |file|
Expand Down