Skip to content

Commit d44f1f4

Browse files
authored
Build fixes, inc. Rocky Linux 8 (RedisJSON#685)
* Build fixes, inc. Rocky Linux 8
1 parent 71a57ad commit d44f1f4

File tree

8 files changed

+49
-44
lines changed

8 files changed

+49
-44
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ workflows:
532532
context: common
533533
matrix:
534534
parameters:
535-
platform: [focal, bionic, xenial, ol8, centos7, bullseye]
535+
platform: [focal, bionic, xenial, rocky8, centos7, bullseye]
536536
- build-arm-platforms:
537537
<<: *on-integ-and-version-tags
538538
context: common

Makefile

-10
Original file line numberDiff line numberDiff line change
@@ -257,16 +257,6 @@ coverage:
257257

258258
#----------------------------------------------------------------------------------------------
259259

260-
docker:
261-
$(SHOW)make -C build/platforms build
262-
263-
docker_push:
264-
$(SHOW)make -C build/platforms publish
265-
266-
.PHONY: docker docker_push
267-
268-
#----------------------------------------------------------------------------------------------
269-
270260
docker:
271261
$(SHOW)$(MAKE) -C build/docker
272262
ifeq ($(PUBLISH),1)

deps/readies

Submodule readies updated 1 file

sbin/pack.sh

+33-21
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,37 @@
11
#!/bin/bash
22

3-
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
3+
# [[ $V == 1 || $VERBOSE == 1 ]] && set -x
4+
5+
PROGNAME="${BASH_SOURCE[0]}"
6+
HERE="$(cd "$(dirname "$PROGNAME")" &>/dev/null && pwd)"
47
ROOT=$(cd $HERE/.. && pwd)
58
export READIES=$ROOT/deps/readies
69
. $READIES/shibumi/defs
7-
8-
cd $ROOT
10+
SBIN=$ROOT/sbin
911

1012
export PYTHONWARNINGS=ignore
1113

14+
cd $ROOT
15+
1216
#----------------------------------------------------------------------------------------------
1317

14-
if [[ $1 == --help || $1 == help ]]; then
18+
if [[ $1 == --help || $1 == help || $HELP == 1 ]]; then
1519
cat <<-END
20+
Generate RedisJSON distribution packages.
21+
1622
[ARGVARS...] pack.sh [--help|help]
17-
23+
1824
Argument variables:
1925
MODULE=path Path of module .so
2026
2127
RAMP=1|0 Build RAMP file
2228
DEPS=0|1 Build dependencies file
2329
SYM=0|1 Build debug symbols file
2430
25-
VARIANT=name Build variant (default: empty)
2631
BRANCH=name Branch name for snapshot packages
27-
GITSHA=1 Append Git SHA to shapshot package names
32+
VERSION=ver Version for release packages
33+
WITH_GITSHA=1 Append Git SHA to shapshot package names
34+
VARIANT=name Build variant (default: empty)
2835
2936
ARTDIR=dir Directory in which packages are created (default: bin/artifacts)
3037
@@ -37,9 +44,6 @@ fi
3744

3845
#----------------------------------------------------------------------------------------------
3946

40-
[[ $IGNERR == 1 ]] || set -e
41-
[[ $V == 1 || $VERBOSE == 1 ]] && set -x
42-
4347
RAMP=${RAMP:-1}
4448
DEPS=${DEPS:-1}
4549
SYM=${SYM:-1}
@@ -48,21 +52,21 @@ SYM=${SYM:-1}
4852
mkdir -p $ARTDIR $ARTDIR/snapshots
4953
ARTDIR=$(cd $ARTDIR && pwd)
5054

51-
export ARCH=$($READIES/bin/platform --arch)
52-
export OS=$($READIES/bin/platform --os)
53-
export OSNICK=$($READIES/bin/platform --osnick)
54-
5555
# RLEC naming conventions
56+
57+
ARCH=$($READIES/bin/platform --arch)
5658
[[ $ARCH == x64 ]] && ARCH=x86_64
59+
OS=$($READIES/bin/platform --os)
5760
[[ $OS == linux ]] && OS=Linux
5861

62+
OSNICK=$($READIES/bin/platform --osnick)
5963
[[ $OSNICK == trusty ]] && OSNICK=ubuntu14.04
6064
[[ $OSNICK == xenial ]] && OSNICK=ubuntu16.04
6165
[[ $OSNICK == bionic ]] && OSNICK=ubuntu18.04
6266
[[ $OSNICK == focal ]] && OSNICK=ubuntu20.04
6367
[[ $OSNICK == centos7 ]] && OSNICK=rhel7
6468
[[ $OSNICK == centos8 ]] && OSNICK=rhel8
65-
[[ $OSNICK == ol8 ]] && OSNICK=rhel8
69+
[[ $OSNICK == rocky8 ]] && OSNICK=rhel8
6670

6771
export PRODUCT=rejson
6872
export PRODUCT_LIB=$PRODUCT.so
@@ -170,17 +174,25 @@ prepare_symbols_dep() {
170174

171175
#----------------------------------------------------------------------------------------------
172176

173-
export NUMVER=$(NUMERIC=1 $ROOT/sbin/getver)
174-
export SEMVER=$($ROOT/sbin/getver)
177+
NUMVER=$(NUMERIC=1 $SBIN/getver)
178+
SEMVER=$($SBIN/getver)
175179

176180
if [[ ! -z $VARIANT ]]; then
177181
VARIANT=-${VARIANT}
178182
fi
179183

180-
[[ -z $BRANCH ]] && BRANCH=${CIRCLE_BRANCH:-`git rev-parse --abbrev-ref HEAD`}
184+
#----------------------------------------------------------------------------------------------
185+
186+
if [[ -z $BRANCH ]]; then
187+
BRANCH=$(git rev-parse --abbrev-ref HEAD)
188+
# this happens of detached HEAD
189+
if [[ $BRANCH == HEAD ]]; then
190+
BRANCH="$SEMVER"
191+
fi
192+
fi
181193
BRANCH=${BRANCH//[^A-Za-z0-9._-]/_}
182-
if [[ $GITSHA == 1 ]]; then
183-
GIT_COMMIT=$(git describe --always --abbrev=7 --dirty="+" 2>/dev/null || git rev-parse --short HEAD)
194+
if [[ $WITH_GITSHA == 1 ]]; then
195+
GIT_COMMIT=$(git rev-parse --short HEAD)
184196
BRANCH="${BRANCH}-${GIT_COMMIT}"
185197
fi
186198
export BRANCH
@@ -198,7 +210,7 @@ fi
198210

199211
if [[ $RAMP == 1 ]]; then
200212
if ! command -v redis-server > /dev/null; then
201-
eprint "$0: Cannot find redis-server. Aborting."
213+
eprint "$PROGNAME: Cannot find redis-server. Aborting."
202214
exit 1
203215
fi
204216

sbin/upload-artifacts

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ OS=$($READIES/bin/platform --os)
4444
[[ $OSNICK == centos7 ]] && OSNICK=rhel7
4545
[[ $OSNICK == centos8 ]] && OSNICK=rhel8
4646
[[ $OSNICK == ol8 ]] && OSNICK=rhel8
47+
[[ $OSNICK == rocky8 ]] && OSNICK=rhel8
4748

4849
PLATFORM="$OS-$OSNICK-$ARCH"
4950

tests/pytest/requirements.txt

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
redis>=3.0.0
2-
redis-py-cluster>=2.1.0
3-
rltest==0.4.2
4-
six>=1.10.0
1+
redis >= 3.0.0
2+
redis-py-cluster >= 2.1.0
3+
RLTest ~= 0.4.2
4+
ramp-packer ~= 2.2.1
5+
six >= 1.10.0

tests/qa/RS_VERSIONS

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
6.2.10-24
1+
100.0.0-2721
22
6.0.8-32
33
6.0.12-58
44
6.0.20-101
55
6.2.4-54
6-
6.2.8-44
7-
100.0.0-2617
6+
6.2.8-53
7+
6.2.10-83
8+
6.2.12-11

tests/qa/qatests

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ RS_PLATFORMS = {
2828
'cenos7': {
2929
'platform': 'Linux-rhel7',
3030
'env': 'rhel7.7-amd64-aws' },
31-
'centos8': {
32-
'platform': 'Linux-rhel8',
33-
'env': 'rhel8.3-amd64-aws' }
34-
'ol8': {
31+
# 'centos8': {
32+
# 'platform': 'Linux-rhel8',
33+
# 'env': 'rhel8.3-amd64-aws' },
34+
'rocky8': {
3535
'platform': 'Linux-rhel8',
3636
'env': 'rhel8.3-amd64-aws' }
3737
}

0 commit comments

Comments
 (0)