Skip to content

Commit 649b8d9

Browse files
rnewsonnickva
authored andcommitted
add ubuntu noble numbat
1 parent b1bcf58 commit 649b8d9

File tree

4 files changed

+109
-32
lines changed

4 files changed

+109
-32
lines changed

bin/apt-dependencies.sh

Lines changed: 41 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4343
. ${SCRIPTPATH}/detect-arch.sh >/dev/null
4444
. ${SCRIPTPATH}/detect-os.sh >/dev/null
4545
debians='(bullseye|bookworm)'
46-
ubuntus='(focal|jammy)'
46+
ubuntus='(focal|jammy|noble)'
4747
echo "Detected Ubuntu/Debian version: ${VERSION_CODENAME} arch: ${ARCH}"
4848

4949
# ubuntu docker image seems to be missing /etc/timezone...
@@ -74,36 +74,41 @@ apt-get install --no-install-recommends -y apt-transport-https curl git pkg-conf
7474

7575

7676
# createrepo_c or createrepo, depending on packaging support
77-
if [ "${VERSION_CODENAME}" == "bullseye" ] || [ "${VERSION_CODENAME}" == "bookworm" ]; then
77+
if [ "${VERSION_CODENAME}" == "noble" ] || [ "${VERSION_CODENAME}" == "bullseye" ] || [ "${VERSION_CODENAME}" == "bookworm" ]; then
7878
apt-get install --no-install-recommends -y createrepo-c || true
7979
else
8080
# python 2 based; gone from focal / bullseye / bookworm. look for createrepo_c eventually
8181
# hopefully via: https://github.com/rpm-software-management/createrepo_c/issues/145
8282
apt-get install --no-install-recommends -y createrepo || true
8383
fi
8484

85-
# Node.js
86-
wget https://deb.nodesource.com/setup_${NODEVERSION}.x
87-
if /bin/bash setup_${NODEVERSION}.x; then
88-
apt-get install --no-install-recommends -y nodejs
89-
fi
90-
rm setup_${NODEVERSION}.x
91-
92-
# maybe install node from scratch if pkg install failed...
93-
if [ -z "$(which node)" ]; then
94-
apt-get purge -y nodejs || true
95-
# extracting the right version to dl is a pain :(
96-
if [ "${ARCH}" == "x86_64" ]; then
97-
NODEARCH=x64
98-
else
99-
NODEARCH=${ARCH}
100-
fi
101-
node_filename="$(curl -s https://nodejs.org/dist/latest-v${NODEVERSION}.x/SHASUMS256.txt | grep linux-${NODEARCH}.tar.gz | cut -d ' ' -f 3)"
102-
wget https://nodejs.org/dist/latest-v${NODEVERSION}.x/${node_filename}
103-
tar --directory=/usr --strip-components=1 -xzf ${node_filename}
104-
rm ${node_filename}
105-
# fake a package install
106-
cat << EOF > nodejs-control
85+
# Node.js (ubuntu noble has version 18, otherwise build a package)
86+
87+
if [ "${VERSION_CODENAME}" == "noble" ] && [ "${NODEVERSION}" == "18" ]; then
88+
echo "--- Ubuntu Noble (24.04) has NodeJS 18 so we just install it from there"
89+
apt-get install --no-install-recommends -y nodejs
90+
else
91+
wget https://deb.nodesource.com/setup_${NODEVERSION}.x
92+
if /bin/bash setup_${NODEVERSION}.x; then
93+
apt-get install --no-install-recommends -y nodejs
94+
fi
95+
rm setup_${NODEVERSION}.x
96+
97+
# maybe install node from scratch if pkg install failed...
98+
if [ -z "$(which node)" ]; then
99+
apt-get purge -y nodejs || true
100+
# extracting the right version to dl is a pain :(
101+
if [ "${ARCH}" == "x86_64" ]; then
102+
NODEARCH=x64
103+
else
104+
NODEARCH=${ARCH}
105+
fi
106+
node_filename="$(curl -s https://nodejs.org/dist/latest-v${NODEVERSION}.x/SHASUMS256.txt | grep linux-${NODEARCH}.tar.gz | cut -d ' ' -f 3)"
107+
wget https://nodejs.org/dist/latest-v${NODEVERSION}.x/${node_filename}
108+
tar --directory=/usr --strip-components=1 -xzf ${node_filename}
109+
rm ${node_filename}
110+
# fake a package install
111+
cat << EOF > nodejs-control
107112
Section: misc
108113
Priority: optional
109114
Standards-Version: 3.9.2
@@ -112,15 +117,16 @@ Provides: nodejs
112117
Version: ${NODEVERSION}.99.99
113118
Description: Fake nodejs package to appease package builder
114119
EOF
115-
equivs-build nodejs-control
116-
apt-get install --no-install-recommends -y ./nodejs*.deb
117-
rm nodejs-control nodejs*deb
120+
equivs-build nodejs-control
121+
apt-get install --no-install-recommends -y ./nodejs*.deb
122+
rm nodejs-control nodejs*deb
123+
fi
118124
fi
119125

120126
# rest of python dependencies
121-
if [ "${VERSION_CODENAME}" == "bookworm" ]; then
122-
# On Debian bookworm, need the --break-system-package to into to default system location
123-
pip3 --default-timeout=10000 install --break-system-packages --upgrade sphinx_rtd_theme nose requests hypothesis==3.79.0
127+
if [ "${VERSION_CODENAME}" == "bookworm" -o "${VERSION_CODENAME}" == "noble" ]; then
128+
# On Debian bookworm and Ubuntu noble, need the --break-system-package to into to default system location
129+
apt-get -y --no-install-recommends install sphinx-rtd-theme-common python3-nose python3-requests python3-hypothesis
124130
else
125131
pip3 --default-timeout=10000 install --upgrade sphinx_rtd_theme nose requests hypothesis==3.79.0
126132
fi
@@ -144,7 +150,8 @@ fi
144150
# js packages, as long as we're not told to skip them
145151
if [ "$1" != "nojs" ]; then
146152
# older releases don't have libmozjs60+, and we provide 1.8.5
147-
if [ "${VERSION_CODENAME}" != "jammy" ] && \
153+
if [ "${VERSION_CODENAME}" != "noble" ] && \
154+
[ "${VERSION_CODENAME}" != "jammy" ] && \
148155
[ "${VERSION_CODENAME}" != "focal" ] && \
149156
[ "${VERSION_CODENAME}" != "bullseye" ] && \
150157
[ "${VERSION_CODENAME}" != "bookworm" ] && \
@@ -157,6 +164,9 @@ if [ "$1" != "nojs" ]; then
157164
apt-get install --no-install-recommends -y couch-libmozjs185-dev
158165
fi
159166
# newer releases have newer libmozjs
167+
if [ "${VERSION_CODENAME}" == "noble" ]; then
168+
apt-get install --no-install-recommends -y libmozjs-102-dev libmozjs-115-dev
169+
fi
160170
if [ "${VERSION_CODENAME}" == "focal" ]; then
161171
apt-get install --no-install-recommends -y libmozjs-68-dev
162172
fi

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4747
# script as well
4848
#
4949
DEBIANS="debian-bullseye debian-bookworm"
50-
UBUNTUS="ubuntu-focal ubuntu-jammy"
50+
UBUNTUS="ubuntu-focal ubuntu-jammy ubuntu-noble"
5151
CENTOSES="almalinux-8 almalinux-9"
5252

5353
PASSED_BUILDARGS="$buildargs"

dockerfiles/ubuntu-noble

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
17+
# NOTE: These are intended to be built using the arguments as
18+
# described in ../build.sh. See that script for more details.
19+
20+
FROM ubuntu:noble
21+
22+
# Install Java
23+
ENV JAVA_HOME=/opt/java/openjdk
24+
COPY --from=eclipse-temurin:21 $JAVA_HOME $JAVA_HOME
25+
ENV PATH="${JAVA_HOME}/bin:${PATH}"
26+
27+
# These are needed for the Clouseau integration
28+
ENV CLOUSEAU_JAVA_HOME=/opt/java/openjdk8
29+
COPY --from=ibm-semeru-runtimes:open-8-jre /opt/java/openjdk $CLOUSEAU_JAVA_HOME
30+
ENV PATH=/usr/local/lib/erlang/bin:"${PATH}"
31+
32+
# Choose whether to install SpiderMonkey 1.8.5, default yes
33+
ARG js=js
34+
# Choose whether to install Erlang, default yes
35+
ARG erlang=erlang
36+
# Select version of Node, Erlang and Elixir to install
37+
ARG erlangversion=25.3.2.15
38+
ARG elixirversion=v1.17.2
39+
ARG nodeversion=18
40+
41+
# Create Jenkins user and group
42+
RUN groupadd --gid 910 jenkins; \
43+
useradd --uid 910 --gid jenkins --create-home jenkins
44+
45+
# Copy couchdb-ci repo into root's home directory
46+
ADD --chown=root:root bin /root/couchdb-ci/bin/
47+
ADD --chown=root:root files /root/couchdb-ci/files/
48+
49+
# Jenkins builds in /usr/src/couchdb.
50+
RUN mkdir -p /usr/src/couchdb; \
51+
chown -R jenkins:jenkins /usr/src/couchdb
52+
53+
# Install all dependencies, and optionally SM 1.8.5
54+
# This allows us to use the same Dockerfile for building SM
55+
RUN ERLANGVERSION=$erlangversion \
56+
ELIXIRVERSION=$elixirversion \
57+
NODEVERSION=$nodeversion \
58+
/root/couchdb-ci/bin/install-dependencies.sh $js $erlang
59+
60+
# Allow Jenkins to sudo
61+
RUN echo "jenkins ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/jenkins
62+
63+
USER jenkins
64+
65+
# overwrite this with 'CMD []' in a dependent Dockerfile
66+
CMD ["/bin/bash"]

pull-all-couchdbdev-docker

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ couchdbci-debian:bookworm-erlang-26.2.5.4
99
couchdbci-debian:bookworm-erlang:27.1.1
1010
couchdbci-centos:9-erlang-25.3.2.15
1111
couchdbci-centos:8-erlang-25.3.2.15
12+
couchdbci-ubuntu:noble-erlang-25.3.2.15
1213
couchdbci-ubuntu:jammy-erlang-25.3.2.15
1314
couchdbci-ubuntu:focal-erlang-25.3.2.15
1415
)

0 commit comments

Comments
 (0)