From 999ef4abb29fd4d02e09fc79441edc97b963166b Mon Sep 17 00:00:00 2001 From: rafie Date: Mon, 7 Mar 2022 14:47:52 +0200 Subject: [PATCH 1/2] Build fixes, inc. Rocky Linux 8 --- .circleci/config.yml | 2 +- Makefile | 10 -------- deps/readies | 2 +- sbin/pack.sh | 54 ++++++++++++++++++++++++++----------------- sbin/upload-artifacts | 1 + tests/qa/RS_VERSIONS | 7 +++--- tests/qa/qatests | 8 +++---- 7 files changed, 44 insertions(+), 40 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d4df7166e..1a7c8015f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -532,7 +532,7 @@ workflows: context: common matrix: parameters: - platform: [focal, bionic, xenial, ol8, centos7, bullseye] + platform: [focal, bionic, xenial, rocky8, centos7, bullseye] - build-arm-platforms: <<: *on-integ-and-version-tags context: common diff --git a/Makefile b/Makefile index c8b27cadf..f59a1aa7c 100644 --- a/Makefile +++ b/Makefile @@ -257,16 +257,6 @@ coverage: #---------------------------------------------------------------------------------------------- -docker: - $(SHOW)make -C build/platforms build - -docker_push: - $(SHOW)make -C build/platforms publish - -.PHONY: docker docker_push - -#---------------------------------------------------------------------------------------------- - docker: $(SHOW)$(MAKE) -C build/docker ifeq ($(PUBLISH),1) diff --git a/deps/readies b/deps/readies index 742d646fc..27d4effb1 160000 --- a/deps/readies +++ b/deps/readies @@ -1 +1 @@ -Subproject commit 742d646fcb03acb3b9825784aca764131e234c97 +Subproject commit 27d4effb110522ea828d71629d90e14d35992ea7 diff --git a/sbin/pack.sh b/sbin/pack.sh index 263d55394..8cebc3113 100755 --- a/sbin/pack.sh +++ b/sbin/pack.sh @@ -1,20 +1,26 @@ #!/bin/bash -HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +# [[ $V == 1 || $VERBOSE == 1 ]] && set -x + +PROGNAME="${BASH_SOURCE[0]}" +HERE="$(cd "$(dirname "$PROGNAME")" &>/dev/null && pwd)" ROOT=$(cd $HERE/.. && pwd) export READIES=$ROOT/deps/readies . $READIES/shibumi/defs - -cd $ROOT +SBIN=$ROOT/sbin export PYTHONWARNINGS=ignore +cd $ROOT + #---------------------------------------------------------------------------------------------- -if [[ $1 == --help || $1 == help ]]; then +if [[ $1 == --help || $1 == help || $HELP == 1 ]]; then cat <<-END + Generate RedisJSON distribution packages. + [ARGVARS...] pack.sh [--help|help] - + Argument variables: MODULE=path Path of module .so @@ -22,9 +28,10 @@ if [[ $1 == --help || $1 == help ]]; then DEPS=0|1 Build dependencies file SYM=0|1 Build debug symbols file - VARIANT=name Build variant (default: empty) BRANCH=name Branch name for snapshot packages - GITSHA=1 Append Git SHA to shapshot package names + VERSION=ver Version for release packages + WITH_GITSHA=1 Append Git SHA to shapshot package names + VARIANT=name Build variant (default: empty) ARTDIR=dir Directory in which packages are created (default: bin/artifacts) @@ -37,9 +44,6 @@ fi #---------------------------------------------------------------------------------------------- -[[ $IGNERR == 1 ]] || set -e -[[ $V == 1 || $VERBOSE == 1 ]] && set -x - RAMP=${RAMP:-1} DEPS=${DEPS:-1} SYM=${SYM:-1} @@ -48,21 +52,21 @@ SYM=${SYM:-1} mkdir -p $ARTDIR $ARTDIR/snapshots ARTDIR=$(cd $ARTDIR && pwd) -export ARCH=$($READIES/bin/platform --arch) -export OS=$($READIES/bin/platform --os) -export OSNICK=$($READIES/bin/platform --osnick) - # RLEC naming conventions + +ARCH=$($READIES/bin/platform --arch) [[ $ARCH == x64 ]] && ARCH=x86_64 +OS=$($READIES/bin/platform --os) [[ $OS == linux ]] && OS=Linux +OSNICK=$($READIES/bin/platform --osnick) [[ $OSNICK == trusty ]] && OSNICK=ubuntu14.04 [[ $OSNICK == xenial ]] && OSNICK=ubuntu16.04 [[ $OSNICK == bionic ]] && OSNICK=ubuntu18.04 [[ $OSNICK == focal ]] && OSNICK=ubuntu20.04 [[ $OSNICK == centos7 ]] && OSNICK=rhel7 [[ $OSNICK == centos8 ]] && OSNICK=rhel8 -[[ $OSNICK == ol8 ]] && OSNICK=rhel8 +[[ $OSNICK == rocky8 ]] && OSNICK=rhel8 export PRODUCT=rejson export PRODUCT_LIB=$PRODUCT.so @@ -170,17 +174,25 @@ prepare_symbols_dep() { #---------------------------------------------------------------------------------------------- -export NUMVER=$(NUMERIC=1 $ROOT/sbin/getver) -export SEMVER=$($ROOT/sbin/getver) +NUMVER=$(NUMERIC=1 $SBIN/getver) +SEMVER=$($SBIN/getver) if [[ ! -z $VARIANT ]]; then VARIANT=-${VARIANT} fi -[[ -z $BRANCH ]] && BRANCH=${CIRCLE_BRANCH:-`git rev-parse --abbrev-ref HEAD`} +#---------------------------------------------------------------------------------------------- + +if [[ -z $BRANCH ]]; then + BRANCH=$(git rev-parse --abbrev-ref HEAD) + # this happens of detached HEAD + if [[ $BRANCH == HEAD ]]; then + BRANCH="$SEMVER" + fi +fi BRANCH=${BRANCH//[^A-Za-z0-9._-]/_} -if [[ $GITSHA == 1 ]]; then - GIT_COMMIT=$(git describe --always --abbrev=7 --dirty="+" 2>/dev/null || git rev-parse --short HEAD) +if [[ $WITH_GITSHA == 1 ]]; then + GIT_COMMIT=$(git rev-parse --short HEAD) BRANCH="${BRANCH}-${GIT_COMMIT}" fi export BRANCH @@ -198,7 +210,7 @@ fi if [[ $RAMP == 1 ]]; then if ! command -v redis-server > /dev/null; then - eprint "$0: Cannot find redis-server. Aborting." + eprint "$PROGNAME: Cannot find redis-server. Aborting." exit 1 fi diff --git a/sbin/upload-artifacts b/sbin/upload-artifacts index 8b9c4bd5f..383d7f2bb 100755 --- a/sbin/upload-artifacts +++ b/sbin/upload-artifacts @@ -44,6 +44,7 @@ OS=$($READIES/bin/platform --os) [[ $OSNICK == centos7 ]] && OSNICK=rhel7 [[ $OSNICK == centos8 ]] && OSNICK=rhel8 [[ $OSNICK == ol8 ]] && OSNICK=rhel8 +[[ $OSNICK == rocky8 ]] && OSNICK=rhel8 PLATFORM="$OS-$OSNICK-$ARCH" diff --git a/tests/qa/RS_VERSIONS b/tests/qa/RS_VERSIONS index 29764f3f1..717eb1fdc 100644 --- a/tests/qa/RS_VERSIONS +++ b/tests/qa/RS_VERSIONS @@ -1,7 +1,8 @@ -6.2.10-24 +100.0.0-2721 6.0.8-32 6.0.12-58 6.0.20-101 6.2.4-54 -6.2.8-44 -100.0.0-2617 +6.2.8-53 +6.2.10-83 +6.2.12-11 diff --git a/tests/qa/qatests b/tests/qa/qatests index 0bc83ab57..07ae226bf 100755 --- a/tests/qa/qatests +++ b/tests/qa/qatests @@ -28,10 +28,10 @@ RS_PLATFORMS = { 'cenos7': { 'platform': 'Linux-rhel7', 'env': 'rhel7.7-amd64-aws' }, - 'centos8': { - 'platform': 'Linux-rhel8', - 'env': 'rhel8.3-amd64-aws' } - 'ol8': { +# 'centos8': { +# 'platform': 'Linux-rhel8', +# 'env': 'rhel8.3-amd64-aws' }, + 'rocky8': { 'platform': 'Linux-rhel8', 'env': 'rhel8.3-amd64-aws' } } From 4f65d0f0609ed8a58e492d6a8227ff319ec5cc6a Mon Sep 17 00:00:00 2001 From: rafie Date: Mon, 7 Mar 2022 16:36:33 +0200 Subject: [PATCH 2/2] fixes 1 --- tests/pytest/requirements.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/pytest/requirements.txt b/tests/pytest/requirements.txt index 3e53c02f2..7833330df 100644 --- a/tests/pytest/requirements.txt +++ b/tests/pytest/requirements.txt @@ -1,4 +1,5 @@ -redis>=3.0.0 -redis-py-cluster>=2.1.0 -rltest==0.4.2 -six>=1.10.0 +redis >= 3.0.0 +redis-py-cluster >= 2.1.0 +RLTest ~= 0.4.2 +ramp-packer ~= 2.2.1 +six >= 1.10.0