fi
}
+# Usage: package_workbench2
+package_workbench2() {
+ local pkgname=arvados-workbench2
+ local src=services/workbench2
+ local dst=/var/www/arvados-workbench2/workbench2
+ local description="Arvados Workbench 2"
+ local version="$(version_from_git)"
+ cd "$WORKSPACE/$src"
+ rm -rf ./build
+ NODE_ENV=production yarn install
+ VERSION="$VERSION" BUILD_NUMBER="$(default_iteration "$pkgname" "$version" yarn)" GIT_COMMIT="$(git rev-parse HEAD | head -c9)" yarn build
+ cd "$WORKSPACE/packages/$TARGET"
+ fpm_build "${WORKSPACE}/$src" "${WORKSPACE}/$src/build/=$dst" "$pkgname" dir "$version" \
+ --license="GNU Affero General Public License, version 3.0" \
+ --description="${description}" \
+ --config-files="/etc/arvados/$pkgname/workbench2.example.json" \
+ "$WORKSPACE/services/workbench2/etc/arvados/workbench2/workbench2.example.json=/etc/arvados/$pkgname/workbench2.example.json"
+}
+
calculate_go_package_version() {
# $__returnvar has the nameref attribute set, which means it is a reference
# to another variable that is passed in as the first argument to this function.
declare -A dd
dd[debian10]=buster
dd[debian11]=bullseye
+ dd[debian12]=bookworm
dd[ubuntu1804]=bionic
dd[ubuntu2004]=focal
+ dd[ubuntu2204]=jammy
D=${dd[$TARGET]}
if [ ${pkgname:0:3} = "lib" ]; then
repo_subdir=${pkgname:0:4}
rm -rf dist/*
- # Get the latest setuptools
- if ! $pip install $DASHQ_UNLESS_DEBUG $CACHE_FLAG -U 'setuptools<45'; then
+ # Get the latest setuptools.
+ #
+ # Note "pip3 install setuptools" fails on debian12 ("error:
+ # externally-managed-environment") even if that requirement is
+ # already satisfied, so we parse "pip3 list" output instead to check
+ # whether we need to do anything.
+ if [[ "$($pip list | grep -P -o '^setuptools\s+\K[0-9]+')" -ge 66 ]]; then
+ : # OK, already installed
+ elif ! $pip install $DASHQ_UNLESS_DEBUG $CACHE_FLAG -U 'setuptools>=66'; then
echo "Error, unable to upgrade setuptools with"
- echo " $pip install $DASHQ_UNLESS_DEBUG $CACHE_FLAG -U 'setuptools<45'"
+ echo " $pip install $DASHQ_UNLESS_DEBUG $CACHE_FLAG -U 'setuptools>=66'"
exit 1
fi
# filter a useless warning (when building the cwltest package) from the stderr output
}
# Build packages for everything
-fpm_build () {
+fpm_build() {
# Source dir where fpm-info.sh (if any) will be found.
SRC_DIR=$1
shift
FPM_RESULTS=$("${COMMAND_ARR[@]}")
FPM_EXIT_CODE=$?
+ echo "fpm: exit code $FPM_EXIT_CODE" >>$STDOUT_IF_DEBUG
+ echo "$FPM_RESULTS" >>$STDOUT_IF_DEBUG
fpm_verify $FPM_EXIT_CODE $FPM_RESULTS
FPM_RESULTS=$@
FPM_PACKAGE_NAME=''
- if [[ $FPM_RESULTS =~ ([A-Za-z0-9_\.-]*\.)(deb|rpm) ]]; then
+ if [[ $FPM_RESULTS =~ ([A-Za-z0-9_\.~-]*\.)(deb|rpm) ]]; then
FPM_PACKAGE_NAME=${BASH_REMATCH[1]}${BASH_REMATCH[2]}
fi