Skip to content

Commit 821b079

Browse files
committed
Fix support for couchbase on Ubuntu 24.04
1 parent a0edbac commit 821b079

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/scripts/extensions/couchbase.sh

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,27 @@ add_couchbase_clibs() {
77
else
88
release=$(get -s -n "" "$trunk"/latest | grep -Eo -m 1 "[0-9]+\.[0-9]+\.[0-9]+" | head -n 1)
99
fi
10-
[ "$VERSION_ID" = "22.04" ] && vid=20.04 || vid="$VERSION_ID"
11-
[ "$VERSION_CODENAME" = "jammy" ] && vcn=focal || vcn="$VERSION_CODENAME"
10+
[ "$VERSION_ID" = "24.04" ] && vid=22.04 || vid="$VERSION_ID"
11+
[ "$VERSION_CODENAME" = "noble" ] && vcn=jammy || vcn="$VERSION_CODENAME"
1212
deb_url="$trunk/download/$release/libcouchbase-${release}_ubuntu${vid/./}_${vcn}_amd64.tar"
1313
get -q -n /tmp/libcouchbase.tar "$deb_url"
14+
if ! [ -e /tmp/libcouchbase.tar ] || ! file /tmp/libcouchbase.tar | grep -q 'tar'; then
15+
deb_url="$trunk/download/$release/libcouchbase-${release}_ubuntu2004_focal_amd64.tar"
16+
get -q -n /tmp/libcouchbase.tar "$deb_url"
17+
add_old_libssl
18+
fi
1419
sudo tar -xf /tmp/libcouchbase.tar -C /tmp
1520
install_packages libev4 libevent-dev
1621
sudo dpkg -i /tmp/libcouchbase-*/*.deb
1722
}
1823

24+
add_old_libssl() {
25+
if [[ "$VERSION_ID" = "24.04" ]]; then
26+
get -q -n /tmp/libssl.deb http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.22_amd64.deb
27+
[ -e /tmp/libssl.deb ] && sudo dpkg -i /tmp/libssl.deb || add_extension_log "couchbase" "Could not install libssl1.1"
28+
fi
29+
}
30+
1931
add_couchbase_cxxlibs() {
2032
if [ "${runner:?}" = "self-hosted" ]; then
2133
add_list cmake https://apt.kitware.com/ubuntu/ https://apt.kitware.com/keys/kitware-archive-latest.asc "$VERSION_CODENAME" main
@@ -33,7 +45,7 @@ get_couchbase_version() {
3345
elif [ "${version:?}" = '7.3' ]; then
3446
echo couchbase-3.2.2
3547
elif [ "${version:?}" = '7.4' ]; then
36-
echo couchbase-4.1.0
48+
echo couchbase-4.1.1
3749
else
3850
echo couchbase
3951
fi

0 commit comments

Comments
 (0)