Skip to content

Commit d6eb077

Browse files
HADOOP-17902. Fix Hadoop build on Debian 10 (#3408)
1 parent c9763a9 commit d6eb077

File tree

3 files changed

+50
-13
lines changed

3 files changed

+50
-13
lines changed

dev-support/docker/Dockerfile_debian_10

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,28 +29,25 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
2929
RUN echo APT::Install-Recommends "0"\; > /etc/apt/apt.conf.d/10disableextras
3030
RUN echo APT::Install-Suggests "0"\; >> /etc/apt/apt.conf.d/10disableextras
3131

32-
#####
33-
# For installing the latest packages
34-
#####
35-
RUN echo 'deb http://deb.debian.org/debian testing main' >> /etc/apt/sources.list
36-
3732
ENV DEBIAN_FRONTEND noninteractive
3833
ENV DEBCONF_TERSE true
3934

4035
######
4136
# Platform package dependency resolver
4237
######
4338
COPY pkg-resolver pkg-resolver
44-
RUN chmod a+x pkg-resolver/*.sh pkg-resolver/*.py \
45-
&& chmod a+r pkg-resolver/*.json
39+
RUN chmod a+x pkg-resolver/install-pkg-resolver.sh
40+
RUN pkg-resolver/install-pkg-resolver.sh debian:10
4641

4742
######
4843
# Install packages from apt
4944
######
5045
# hadolint ignore=DL3008,SC2046
5146
RUN apt-get -q update \
52-
&& apt-get -q install -y --no-install-recommends python3 \
5347
&& apt-get -q install -y --no-install-recommends $(pkg-resolver/resolve.py debian:10) \
48+
&& echo 'deb http://deb.debian.org/debian bullseye main' >> /etc/apt/sources.list \
49+
&& apt-get -q update \
50+
&& apt-get -q install -y --no-install-recommends -t bullseye $(pkg-resolver/resolve.py --release=bullseye debian:10) \
5451
&& apt-get clean \
5552
&& rm -rf /var/lib/apt/lists/*
5653

@@ -85,7 +82,6 @@ ENV HADOOP_SKIP_YETUS_VERIFICATION true
8582
####
8683
# Install packages
8784
####
88-
RUN pkg-resolver/install-common-pkgs.sh
8985
RUN pkg-resolver/install-spotbugs.sh debian:10
9086
RUN pkg-resolver/install-boost.sh debian:10
9187
RUN pkg-resolver/install-protobuf.sh debian:10
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/usr/bin/env bash
2+
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
19+
if [ $# -lt 1 ]; then
20+
echo "ERROR: No platform specified, please specify one"
21+
exit 1
22+
fi
23+
24+
chmod a+x pkg-resolver/*.sh pkg-resolver/*.py
25+
chmod a+r pkg-resolver/*.json
26+
27+
if [ "$1" == "debian:10" ]; then
28+
apt-get -q update
29+
apt-get -q install -y --no-install-recommends python3 \
30+
python3-pip \
31+
python3-pkg-resources \
32+
python3-setuptools \
33+
python3-wheel
34+
pip3 install pylint==2.6.0 python-dateutil==2.8.1
35+
else
36+
# Need to add the code for the rest of the platforms - HADOOP-17920
37+
echo "ERROR: The given platform $1 is not yet supported or is invalid"
38+
exit 1
39+
fi

dev-support/docker/pkg-resolver/packages.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,12 @@
122122
]
123123
},
124124
"gcc": {
125-
"debian:10": [
126-
"gcc",
127-
"g++"
128-
],
125+
"debian:10": {
126+
"bullseye": [
127+
"gcc",
128+
"g++"
129+
]
130+
},
129131
"ubuntu:focal": [
130132
"gcc",
131133
"g++"

0 commit comments

Comments
 (0)