Skip to content

Commit

Permalink
SERVER-54 - support running the server on Debian 12.
Browse files Browse the repository at this point in the history
Co-authored-by: Kevin Porter <[email protected]>
  • Loading branch information
marknaero and kportertx authored Jul 7, 2023
1 parent 8d25cf7 commit 440fe50
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 18 deletions.
2 changes: 2 additions & 0 deletions .build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ container:
- docker.qe.aerospike.com/build/aerospike-server:arm-rhel-8
- docker.qe.aerospike.com/build/aerospike-server:arm-rhel-9
- docker.qe.aerospike.com/build/aerospike-server:arm-debian-11
- docker.qe.aerospike.com/build/aerospike-server:arm-debian-12
- docker.qe.aerospike.com/build/aerospike-server:arm-ubuntu-20.04
- docker.qe.aerospike.com/build/aerospike-server:arm-ubuntu-22.04
- docker.qe.aerospike.com/build/aerospike-server:arm-amazonlinux-2023
Expand All @@ -25,6 +26,7 @@ container:
- docker.qe.aerospike.com/build/aerospike-server:x86-rhel-9
- docker.qe.aerospike.com/build/aerospike-server:x86-debian-10
- docker.qe.aerospike.com/build/aerospike-server:x86-debian-11
- docker.qe.aerospike.com/build/aerospike-server:x86-debian-12
- docker.qe.aerospike.com/build/aerospike-server:x86-ubuntu-20.04
- docker.qe.aerospike.com/build/aerospike-server:x86-ubuntu-22.04
- docker.qe.aerospike.com/build/aerospike-server:x86-amazonlinux-2023
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ information. The full Telemetry data collection agent source code may be found
## Build Prerequisites

The Aerospike Database Server can be built and deployed on various
current 64-bit GNU/Linux platform versions, such as Centos 7, Red Hat Enterprise Linux 8/9, Debian 10 or later, and Ubuntu 20.04 or later.
current 64-bit GNU/Linux platform versions, such as Centos 7, Red Hat Enterprise Linux 8/9, Amazon Linux 2023,
Debian 10 or later, and Ubuntu 20.04 or later.

### Dependencies

Expand Down Expand Up @@ -55,7 +56,7 @@ feature and its dependency, Google's S2 Geometry Library (both written in C++.)

* The required CentOS 7 & Red Hat Enterprise Linux 8/9 package to install is: `gcc-c++`.

* The required Debian 10/11 and Ubuntu 20/22 package to install is: `g++`.
* The required Debian 10/11/12 and Ubuntu 20/22 package to install is: `g++`.

#### OpenSSL

Expand All @@ -64,7 +65,7 @@ OpenSSL 0.9.8b or later is required for cryptographic hash functions

* The CentOS 7 & Red Hat Enterprise Linux 8/9 OpenSSL package to install: `openssl-devel`

* The Debian 10/11 and Ubuntu 20/22 OpenSSL packages to install: `libssl-dev`.
* The Debian 10/11/12 and Ubuntu 20/22 OpenSSL packages to install: `libssl-dev`.

#### Lua 5.1

Expand All @@ -80,7 +81,7 @@ by the build environment. In that case:
* The CentOS 7 & Red Hat Enterprise Linux 8/9 Lua package to install is: `lua`, and also
`lua-devel` and `lua-static` on CentOS 7.

* The Debian 10/11 and Ubuntu 20/22 Lua packages to install are:
* The Debian 10/11/12 and Ubuntu 20/22 Lua packages to install are:
`lua5.1` and `liblua5.1-dev`.

* Build by passing the `USE_LUAJIT=0` option to `make`.
Expand All @@ -89,7 +90,7 @@ by the build environment. In that case:

* The CentOS 7 & Red Hat Enterprise Linux 8/9 requires `zlib-devel`

* The Debian 10/11 and Ubuntu 20/22 requiresi `zlib1g-dev`.
* The Debian 10/11/12 and Ubuntu 20/22 requiresi `zlib1g-dev`.

#### Python 3 or 2

Expand Down
4 changes: 2 additions & 2 deletions as/src/base/service.c
Original file line number Diff line number Diff line change
Expand Up @@ -761,9 +761,9 @@ stop_service(thread_ctx* ctx)
cf_poll_destroy(ctx->poll);
cf_epoll_queue_destroy(&ctx->trans_q);

cf_free(ctx);

cf_detail(AS_SERVICE, "stopped ctx %p", ctx);

cf_free(ctx);
}

static void
Expand Down
28 changes: 17 additions & 11 deletions build/os_version
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# ------------------------------------------------------------------------------
# Copyright 2012-2019 Aerospike, Inc.
# Copyright 2012-2023 Aerospike, Inc.
#
# Portions may be licensed to Aerospike, Inc. under one or more contributor
# license agreements.
Expand All @@ -20,7 +20,7 @@ OPT_LONG=0

if [ "$1" = "-long" ]
then
OPT_LONG=1
OPT_LONG=1
fi

error() {
Expand All @@ -36,7 +36,7 @@ main() {
local distro_short=''

# Make sure this script is running on Linux
# The script is not designed to work on non-Linux
# The script is not designed to work on non-Linux
# operating systems.
kernel=$(uname -s | tr '[:upper:]' '[:lower:]')
if [ "$kernel" != 'linux' ]
Expand Down Expand Up @@ -97,16 +97,22 @@ main() {
# Second chance for pre-release versions.
if [ -z "$distro_version" ]
then
case "$distro_id" in
'debian' )
case "$distro_id" in
'debian' )
debian_version=$(cat /etc/debian_version | tr '[:upper:]' '[:lower:]')
if [[ "$debian_version" = "buster"* ]]
then
debian_version=10
fi
if [[ "$debian_version" = "bullseye"* ]]
elif [[ "$debian_version" = "bullseye"* ]]
then
debian_version=11
elif [[ "$debian_version" = "bookworm"* ]]
then
debian_version=12
fi
if [[ "$debian_version" = "bookworm"* ]]
then
debian_version=12
fi
distro_version=${debian_version%%.*}
;;
Expand All @@ -118,10 +124,10 @@ main() {
distro_long="${distro_id}${distro_version%%.*}"
distro_short="el${distro_version%%.*}"
;;
'rhel' | 'redhat' | 'red hat' )
distro_long="${distro_id}${distro_version%%.*}"
distro_short="el${distro_version%%.*}"
;;
'rhel' | 'redhat' | 'red hat' )
distro_long="${distro_id}${distro_version%%.*}"
distro_short="el${distro_version%%.*}"
;;
'fedora' )
distro_long="${distro_id}${distro_version}"
distro_short="fc${distro_version}"
Expand Down

0 comments on commit 440fe50

Please sign in to comment.