Skip to content

Commit f768192

Browse files
committed
qa: Added Alpine Linux support in ci/install.sh and friends
This is to enable masterfiles github CI to run bootstrap policy tests on the latest core by checking it out and building it there instead of using cf-remote --version master install. Ticket: CFE-4623 Changelog: none
1 parent e56ed82 commit f768192

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

ci/build.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,11 @@ set -ex
55
thisdir="$(dirname "$0")"
66
cd "$thisdir"/..
77

8-
make -j8 CFLAGS="-Werror -Wall"
8+
source /etc/os-release
9+
CFLAGS="-Wall"
10+
if [ "$ID" != "alpine" ]; then
11+
CFLAGS="$CFLAGS -Werror"
12+
# on alpine, with lib musl, there are not re-entrant random functions e.g. srand48_r, lrand48_r see CFE-4654
13+
fi
14+
export CFLAGS
15+
make -j8

ci/configure.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ thisdir="$(dirname "$0")"
66
cd "$thisdir"/..
77
OPTS="--enable-debug"
88

9-
if [ -n "$TERMUX_VERSION" ]; then
9+
source /etc/os-release
10+
if [ "$ID" = "alpine" ]; then
11+
OPTS="" # we don't want --enable-debug so that libpromises/dbm_test_api is not built due to lack of srand48_r() and friends on alpine linux libmusl
12+
fi
13+
14+
if [ -n "$TERMUX_VERSION" ] || [ "$ID" = "alpine" ]; then
1015
OPTS="$OPTS --without-pam"
1116
fi
1217

ci/dependencies.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ if [ -f /etc/os-release ]; then
7272
echo "Unsupported version of redhat for $0"
7373
exit 1
7474
fi
75+
elif [ "$ID" = "alpine" ]; then
76+
$GAINROOT apk update
77+
$GAINROOT apk add alpine-sdk lmdb-dev openssl-dev bison flex-dev acl-dev pcre2-dev autoconf automake libtool git python3 gdb librsync-dev
7578
elif [ "$ID" = "debian" ] || [[ "$ID_LIKE" =~ "debian" ]]; then
7679
$GAINROOT apt update --yes
7780
$GAINROOT apt install --yes build-essential git libtool autoconf automake bison flex libssl-dev libpcre2-dev libbison-dev libacl1 libacl1-dev lmdb-utils liblmdb-dev libpam0g-dev libtool libyaml-dev libxml2-dev librsync-dev

0 commit comments

Comments
 (0)