@@ -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
4545debians=' (bullseye|bookworm)'
46- ubuntus=' (focal|jammy)'
46+ ubuntus=' (focal|jammy|noble )'
4747echo " 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
7979else
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
8383fi
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
107112Section: misc
108113Priority: optional
109114Standards-Version: 3.9.2
@@ -112,15 +117,16 @@ Provides: nodejs
112117Version: ${NODEVERSION} .99.99
113118Description: Fake nodejs package to appease package builder
114119EOF
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
118124fi
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
124130else
125131 pip3 --default-timeout=10000 install --upgrade sphinx_rtd_theme nose requests hypothesis==3.79.0
126132fi
144150# js packages, as long as we're not told to skip them
145151if [ " $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
0 commit comments