Skip to content

Fix ci build #1390

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 50 commits into from
May 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
688f009
updated requirements
nedvedba Apr 14, 2025
cc2b299
updated requirements
nedvedba Apr 14, 2025
c21f317
updated protobuf submodule
nedvedba Apr 15, 2025
ebf6cc0
update unit test ci version
nedvedba Apr 15, 2025
b4adb09
updated protobuf version
nedvedba Apr 23, 2025
f3edce2
updated setuptools version
nedvedba Apr 23, 2025
d518f7c
fixed condition
nedvedba Apr 23, 2025
07f829d
changed where packages are installed
nedvedba Apr 23, 2025
2dc17c3
used python3.11 to create the virtual environment instead of latest
nedvedba Apr 23, 2025
1433d3a
reverted protobuf version
nedvedba Apr 23, 2025
d2289d4
testing specificying version
nedvedba Apr 23, 2025
fa22696
removed pyvenv in ci job for consistency
nedvedba Apr 23, 2025
75bcc68
installed python3.11 in dependencies docker file
nedvedba Apr 23, 2025
50efdf7
added missing -y flag
nedvedba Apr 23, 2025
3cf06a9
removed unification of install scripts
nedvedba Apr 23, 2025
877b90a
added missing python3.11 install
nedvedba Apr 23, 2025
513001f
updated ci job to install python3.11
nedvedba Apr 23, 2025
86170b0
changed installed python version to 3.9 since protobuf does not offic…
nedvedba Apr 24, 2025
670a110
changed installed python version to 3.9 since protobuf does not offic…
nedvedba Apr 24, 2025
91dee39
missed version
nedvedba Apr 24, 2025
115b097
updated includes for newer gcc versions
nedvedba Apr 24, 2025
4465cf2
updated versions
nedvedba Apr 28, 2025
60f98ea
updated nlohmann json
nedvedba Apr 28, 2025
e51dc19
updated json schema version
nedvedba Apr 28, 2025
3ff1a0f
changed library search path
nedvedba Apr 28, 2025
fa5c652
hopefully fixed json dep issues
nedvedba May 1, 2025
35aa9e7
updating function signature to match newer version of base class
nedvedba May 1, 2025
577ef4c
updated protobuf
nedvedba May 1, 2025
e49ff4b
updated protobuf and cmake
nedvedba May 1, 2025
43e76de
downgraded cmake
nedvedba May 1, 2025
cfd361d
fixed protobuf version
nedvedba May 4, 2025
3b84a99
fixed protobuf version
nedvedba May 4, 2025
a758cdb
1398 pin python version (#1405)
JoshuaSBrown May 5, 2025
4c9c658
fixed incorrect path
nedvedba May 5, 2025
70d3bc9
Switch to using .tar file install of libsodium (#1414)
JoshuaSBrown May 6, 2025
d2dca92
1413 libsodium build refactor (#1415)
JoshuaSBrown May 6, 2025
9884f55
Update scripts/dependency_install_functions.sh
JoshuaSBrown May 6, 2025
ae6f10b
Update scripts/dependency_install_functions.sh
JoshuaSBrown May 6, 2025
d5cf838
Update dependency_install_functions.sh
JoshuaSBrown May 6, 2025
abae923
Update dependency_install_functions.sh
JoshuaSBrown May 6, 2025
99b3982
cleaned up comments
nedvedba May 7, 2025
0867a29
Update scripts/dependency_install_functions.sh
nedvedba May 7, 2025
c5db48b
Update cmake/JSONSchema.cmake
nedvedba May 7, 2025
bb408c0
Update scripts/dependency_install_functions.sh
nedvedba May 7, 2025
d4d7402
Update cmake/JSONSchema.cmake
nedvedba May 7, 2025
eda0711
add changes from review
nedvedba May 7, 2025
bd7fc86
Merge branch 'fix-ci-build' of https://github.com/ORNL/DataFed into f…
nedvedba May 7, 2025
1b54248
Merge branch 'devel' into fix-ci-build
nedvedba May 8, 2025
b5d6508
Changed install scripts to be consistent with new python installation…
nedvedba May 12, 2025
873f6ca
add apt sources check
nedvedba May 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,22 @@ name: Unit-Testing
on: push
jobs:
unit-test:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
if: ${{ always() }}
steps:
- uses: actions/checkout@v2
- name: Update ubuntu
run: sudo apt-get update
- name: Install software-properties-common
run: sudo apt install software-properties-common
- name: Add deadsnakes apt repository
run: sudo add-apt-repository ppa:deadsnakes/ppa
- name: Update to bring in deadsnakes packages
run: sudo apt update
- name: Install Python 3.9
run: sudo apt install python3.9 python3.9-dev python3.9-venv python3.9-distutils
- name: Ensure pip is installed
run: python3.9 -m ensurepip
- name: Install dependencies
run: |
./scripts/generate_datafed.sh
Expand Down
2 changes: 2 additions & 0 deletions .gitlab/stage_provision_client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ provision-client:
needs: ["signal"]
variables:
GIT_STRATEGY: clone
DATAFED_PYTHON_DEPENDENCIES_DIR: /opt/datafed/dependencies/python
stage: provision-client
tags:
- ci-datafed-client
before_script:
- export PATH=/opt/datafed/dependencies/bin:$PATH
- rm -rf $DATAFED_PYTHON_DEPENDENCIES_DIR
script:
- ./scripts/generate_datafed.sh
- ./scripts/install_client_dependencies.sh
Expand Down
5 changes: 2 additions & 3 deletions cmake/JSON.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ function(find_json_library)
set(JSON_LIBRARY_PATH "" )

if(EXISTS ${DEPENDENCY_INSTALL_PATH})
set(JSON_LIB_CMAKE_DIR "${DEPENDENCY_INSTALL_PATH}/lib/cmake")
set(JSON_LIB_CMAKE_DIR "${DEPENDENCY_INSTALL_PATH}/share/cmake ${DEPENDENCY_INSTALL_PATH}/lib/cmake")
set(JSON_INCLUDE_DIR "${DEPENDENCY_INSTALL_PATH}/include")
set(JSON_LIB_DIR "${DEPENDENCY_INSTALL_PATH}/lib")
endif()


find_package(nlohmann_json CONFIG REQUIRED PATHS "${JSON_LIB_CMAKE_DIR}")
find_package(nlohmann_json REQUIRED PATHS "${JSON_LIB_CMAKE_DIR}")

# NOTE interfaces do not have a physical location associated with the library
get_target_property(JSON_INCLUDE_PATH nlohmann_json::nlohmann_json INTERFACE_INCLUDE_DIRECTORIES )
Expand Down
15 changes: 9 additions & 6 deletions cmake/JSONSchema.cmake
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@

function(find_json_schema_library)

set(JSON_SCHEMA_INCLUDE_DIR "" )
set(JSON_SCHEMA_LIB_DIR "" )
set(JSON_SCHEMA_LIB_CMAKE_DIR "" )
set(JSON_SCHEMA_LIBRARY_PATH "" )

if(EXISTS ${DEPENDENCY_INSTALL_PATH})
set(JSON_SCHEMA_LIB_CMAKE_DIR "${DEPENDENCY_INSTALL_PATH}/lib/cmake")
set(JSON_SCHEMA_INCLUDE_DIR "${DEPENDENCY_INSTALL_PATH}/include")
set(JSON_SCHEMA_LIB_DIR "${DEPENDENCY_INSTALL_PATH}/lib")
endif()

find_package(nlohmann_json_schema_validator CONFIG REQUIRED VERSION "${JSON_SCHEMA_VALIDATOR_VERSION}" PATHS "${JSON_SCHEMA_LIB_CMAKE_DIR}")
# Specifying the VERSION with find_package commands since updating the json schema version from
# version "2.1.0" to "2.3.0" is no longer supported.
find_package(nlohmann_json_schema_validator REQUIRED PATHS "${JSON_SCHEMA_LIB_CMAKE_DIR}")

# NOTE interfaces do not have a physical location associated with the library
get_target_property(JSON_SCHEMA_INCLUDE_PATH nlohmann_json_schema_validator INTERFACE_INCLUDE_DIRECTORIES)
get_target_property(JSON_SCHEMA_LIBRARY_PATH nlohmann_json_schema_validator IMPORTED_LOCATION_NOCONFIG)
get_target_property(JSON_SCHEMA_INCLUDE_PATH nlohmann_json_schema_validator::validator INTERFACE_INCLUDE_DIRECTORIES)
get_target_property(JSON_SCHEMA_LIBRARY_PATH nlohmann_json_schema_validator::validator LOCATION)

if(NOT "${JSON_SCHEMA_VALIDATOR_VERSION}" STREQUAL "${nlohmann_json_schema_validator_VERSION}")
message(FATAL_ERROR "REQUIRED Nlohmann JSON Schema Validator version ${JSON_SCHEMA_VALIDATOR_VERSION}, not satisfied. Found version ${nlohmann_json_schema_validator_VERSION}")
endif()

set(DATAFED_JSON_SCHEMA_INCLUDE_PATH "${JSON_SCHEMA_INCLUDE_PATH}" PARENT_SCOPE)
set(DATAFED_JSON_SCHEMA_LIBRARY_PATH "${JSON_SCHEMA_LIBRARY_PATH}" PARENT_SCOPE)
Expand Down
1 change: 1 addition & 0 deletions common/include/common/IMessageMapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

// Standard includes
#include <string>
#include <cstdint>

namespace SDMS {

Expand Down
1 change: 1 addition & 0 deletions common/include/common/ProtoBufMap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// Standard includes
#include <map>
#include <unordered_map>
#include <cstdint>

namespace SDMS {

Expand Down
1 change: 1 addition & 0 deletions common/include/common/SocketOptions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// Standard includes
#include <optional>
#include <string>
#include <cstdint>

namespace SDMS {

Expand Down
1 change: 1 addition & 0 deletions common/include/common/Util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include <string>
#include <vector>
#include <cstdint>

std::string exec(const char *cmd);

Expand Down
2 changes: 1 addition & 1 deletion core/server/ClientWorker.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ class ClientWorker : public nlohmann::json_schema::basic_error_handler {
void schemaLoader(const nlohmann::json_uri &a_uri, nlohmann::json &a_value,
LogContext log_context);

void error(const nlohmann::json_pointer<nlohmann::basic_json<>> &a_ptr,
void error(const nlohmann::json::json_pointer &a_ptr,
const nlohmann::json &a_inst,
const std::string &a_err_msg) override {
(void)a_ptr;
Expand Down
2 changes: 1 addition & 1 deletion external/protobuf
Submodule protobuf updated 157 files
2 changes: 1 addition & 1 deletion repository/docker/Dockerfile.gcs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ COPY ./scripts/install_authz_dependencies.sh ${BUILD_DIR}/scripts/
COPY ./scripts/copy_dependency.sh ${BUILD_DIR}/scripts/

RUN ${BUILD_DIR}/scripts/generate_datafed.sh
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC ${BUILD_DIR}/scripts/install_authz_dependencies.sh unify
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC ${BUILD_DIR}/scripts/install_authz_dependencies.sh
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nedvedba why this change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we weren't installing any of the dependencies with the 'unify' option.


COPY --chown=datafed:root ./scripts/dependency_versions.sh ${BUILD_DIR}/scripts/
COPY --chown=datafed:root ./scripts/generate_authz_config.sh ${BUILD_DIR}/scripts/generate_authz_config.sh
Expand Down
4 changes: 3 additions & 1 deletion repository/docker/entrypoint_authz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,16 @@ fi
su -m -c "${BUILD_DIR}/scripts/globus/setup_globus.sh" datafed

source "${DATAFED_PYTHON_ENV}/bin/activate"
source "${BUILD_DIR}/scripts/dependency_versions.sh"

# Must be passed in directly
GCS_CLI_ENDPOINT_ID="$GCS_CLI_ENDPOINT_ID" \
DATAFED_GCS_COLLECTION_BASE_PATH="$DATAFED_GCS_COLLECTION_BASE_PATH" \
DATAFED_GCS_URL="$DATAFED_GCS_URL" \
GCS_CLI_CLIENT_ID="$GCS_CLI_CLIENT_ID" \
GCS_CLI_CLIENT_SECRET="$GCS_CLI_CLIENT_SECRET" \
DATAFED_REPO_USER="$DATAFED_REPO_USER" \
python3 "${BUILD_DIR}/scripts/globus/create_guest_collection.py"
"python${DATAFED_PYTHON_VERSION}" "${BUILD_DIR}/scripts/globus/create_guest_collection.py"

"${BUILD_DIR}/scripts/globus/generate_repo_form.sh" -j -s

Expand Down
4 changes: 3 additions & 1 deletion scripts/compose_cleanup_globus_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ SCRIPT=$(realpath "$0")
SOURCE=$(dirname "$SCRIPT")
PROJECT_ROOT=$(realpath "${SOURCE}/..")

source "${SOURCE}/dependency_versions.sh"

# This script should be run after generating the .env file as it will pull
# values from the .env file
Help()
Expand Down Expand Up @@ -70,4 +72,4 @@ fi
sudo globus-connect-server node cleanup

DATAFED_GCS_ROOT_NAME="$DATAFED_GCS_ROOT_NAME" \
python3 "${PROJECT_ROOT}/scripts/globus/globus_cleanup.py"
"python${DATAFED_PYTHON_VERSION}" "${PROJECT_ROOT}/scripts/globus/globus_cleanup.py"
4 changes: 3 additions & 1 deletion scripts/compose_generate_globus_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ SCRIPT=$(realpath "$0")
SOURCE=$(dirname "$SCRIPT")
PROJECT_ROOT=$(realpath "${SOURCE}/..")

source "${SOURCE}/dependency_versions.sh"

# This script should be run after generating the .env file as it will pull
# values from the .env file
Help()
Expand Down Expand Up @@ -89,4 +91,4 @@ DATAFED_GLOBUS_CRED_FILE_PATH="$DATAFED_HOST_CRED_FILE_PATH" \
DATAFED_GLOBUS_CONTROL_PORT="$DATAFED_GLOBUS_CONTROL_PORT" \
DATAFED_GLOBUS_SUBSCRIPTION="$DATAFED_GLOBUS_SUBSCRIPTION" \
DATAFED_GCS_ROOT_NAME="$DATAFED_GCS_ROOT_NAME" \
python3 "${PROJECT_ROOT}/scripts/globus/initialize_globus_endpoint.py"
"python${DATAFED_PYTHON_VERSION}" "${PROJECT_ROOT}/scripts/globus/initialize_globus_endpoint.py"
58 changes: 38 additions & 20 deletions scripts/dependency_install_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,22 @@ else
fi
fi

install_python() {
if [ ! -e "${DATAFED_DEPENDENCIES_INSTALL_PATH}/.python_installed-${DATAFED_PYTHON_VERSION}" ]; then
# Check if the deadsnakes repository has already been added to avoid issues with gpg
if ! grep -qr '^deb .\+deadsnakes' /etc/apt/sources.list.d/; then
"$SUDO_CMD" apt update
"$SUDO_CMD" apt install -y software-properties-common
"$SUDO_CMD" add-apt-repository -y ppa:deadsnakes/ppa
"$SUDO_CMD" apt update
fi

"$SUDO_CMD" apt install -y "python${DATAFED_PYTHON_VERSION}" "python${DATAFED_PYTHON_VERSION}-dev" "python${DATAFED_PYTHON_VERSION}-venv" "python${DATAFED_PYTHON_VERSION}-distutils"

touch "${DATAFED_DEPENDENCIES_INSTALL_PATH}/.python_installed-${DATAFED_PYTHON_VERSION}"
fi
}

Comment on lines +67 to +82
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably need a way to install all dependencies that is not distro specific, I really don't like using apt for this it makes things brittle.

init_python() {

if [[ ! -v DATAFED_PYTHON_DEPENDENCIES_DIR ]]; then
Expand All @@ -79,19 +95,23 @@ init_python() {
if [ ! -e "$DATAFED_DEPENDENCIES_INSTALL_PATH" ] || [ ! -d "$DATAFED_PYTHON_DEPENDENCIES_DIR" ]; then
mkdir -p "$DATAFED_PYTHON_DEPENDENCIES_DIR"
fi
python3 -m venv "${DATAFED_PYTHON_ENV}"
"python${DATAFED_PYTHON_VERSION}" -m venv "${DATAFED_PYTHON_ENV}"
# Make sure that pip is installed and upgraded
"python${DATAFED_PYTHON_VERSION}" -m ensurepip --upgrade
}

install_cmake() {
if [ ! -e "${DATAFED_DEPENDENCIES_INSTALL_PATH}/.cmake_installed-${DATAFED_CMAKE_VERSION}" ]; then
wget https://github.com/Kitware/CMake/releases/download/v${DATAFED_CMAKE_VERSION}/cmake-${DATAFED_CMAKE_VERSION}-Linux-x86_64.tar.gz
tar -xzvf "cmake-${DATAFED_CMAKE_VERSION}-Linux-x86_64.tar.gz" >/dev/null 2>&1
cp -r "cmake-${DATAFED_CMAKE_VERSION}-Linux-x86_64/bin" "${DATAFED_DEPENDENCIES_INSTALL_PATH}"
cp -r "cmake-${DATAFED_CMAKE_VERSION}-Linux-x86_64/share" "${DATAFED_DEPENDENCIES_INSTALL_PATH}"
# Version 3.20 of cmake and onwards starting using all lower case in the package names, previos versions use a
# a capital L in the name.
wget https://github.com/Kitware/CMake/releases/download/v${DATAFED_CMAKE_VERSION}/cmake-${DATAFED_CMAKE_VERSION}-linux-x86_64.tar.gz
tar -xzvf "cmake-${DATAFED_CMAKE_VERSION}-linux-x86_64.tar.gz" >/dev/null 2>&1
cp -r "cmake-${DATAFED_CMAKE_VERSION}-linux-x86_64/bin" "${DATAFED_DEPENDENCIES_INSTALL_PATH}"
cp -r "cmake-${DATAFED_CMAKE_VERSION}-linux-x86_64/share" "${DATAFED_DEPENDENCIES_INSTALL_PATH}"

# Cleanup
rm -rf "cmake-${DATAFED_CMAKE_VERSION}-Linux-x86_64"
rm -rf "cmake-${DATAFED_CMAKE_VERSION}-Linux-x86_64.tar.gz"
rm -rf "cmake-${DATAFED_CMAKE_VERSION}-linux-x86_64"
rm -rf "cmake-${DATAFED_CMAKE_VERSION}-linux-x86_64.tar.gz"

# Mark cmake as installed
touch "${DATAFED_DEPENDENCIES_INSTALL_PATH}/.cmake_installed-${DATAFED_CMAKE_VERSION}"
Expand Down Expand Up @@ -149,12 +169,12 @@ install_protobuf() {
cd python
init_python
source "${DATAFED_PYTHON_ENV}/bin/activate"
LD_LIBRARY_PATH="$LD_LIBRARY_PATH" PATH="$PATH" python3 -m pip install numpy tzdata
LD_LIBRARY_PATH="$LD_LIBRARY_PATH" PATH="$PATH" python3 setup.py build
LD_LIBRARY_PATH="$LD_LIBRARY_PATH" PATH="$PATH" python3 setup.py test
LD_LIBRARY_PATH="$LD_LIBRARY_PATH" PATH="$PATH" python${DATAFED_PYTHON_VERSION} -m pip install numpy
LD_LIBRARY_PATH="$LD_LIBRARY_PATH" PATH="$PATH" python${DATAFED_PYTHON_VERSION} setup.py build
LD_LIBRARY_PATH="$LD_LIBRARY_PATH" PATH="$PATH" python${DATAFED_PYTHON_VERSION} setup.py test
# Because we have activaited a venv we don't want to use the --user flag
# with the install command
LD_LIBRARY_PATH="$LD_LIBRARY_PATH" PATH="$PATH" python3 setup.py install
LD_LIBRARY_PATH="$LD_LIBRARY_PATH" PATH="$PATH" "python${DATAFED_PYTHON_VERSION}" setup.py install
cd ../
# Cleanup build file with root ownership
if [ -f build/install_manifest.txt ]
Expand All @@ -177,14 +197,12 @@ install_libsodium() {
# sudo required because of egg file
"$SUDO_CMD" rm -rf "${PROJECT_ROOT}/external/libsodium"
fi
# Here we are using clone instead of submodule update, because submodule
# requires the .git folder exist and the current folder be considered a repo
# this creates problems in docker because each time a commit is made the
# .git folder contents are changed causing a fresh rebuild of all containers
git clone https://github.com/jedisct1/libsodium.git "${PROJECT_ROOT}/external/libsodium"
cd "${PROJECT_ROOT}/external/libsodium"
git checkout "$DATAFED_LIBSODIUM_VERSION"
./autogen.sh
# Official documentation for libsodium indicates this is the preferred way to build libsodium.
# Using the git repo directly results in build instability because of additional network calls when running
# autogen.sh.
wget "https://download.libsodium.org/libsodium/releases/libsodium-${DATAFED_LIBSODIUM_VERSION}.tar.gz" -P "${PROJECT_ROOT}/external"
tar -xvzf "${PROJECT_ROOT}/external/libsodium-${DATAFED_LIBSODIUM_VERSION}.tar.gz" -C "${PROJECT_ROOT}/external/"
cd "${PROJECT_ROOT}/external/libsodium-${DATAFED_LIBSODIUM_VERSION}"
# Build static ONLY!!!!
# Note if zmq detects a shared sodium library it will grab it no matter what
# --enable-shared=no must be set here
Expand All @@ -196,7 +214,7 @@ install_libsodium() {
else
"$SUDO_CMD" make install
fi

# Mark libsodium as installed
touch "${DATAFED_DEPENDENCIES_INSTALL_PATH}/.libsodium_installed-${DATAFED_LIBSODIUM_VERSION}"
cd "$original_dir"
Expand Down
13 changes: 7 additions & 6 deletions scripts/dependency_versions.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

# Versions
DATAFED_CMAKE_VERSION="3.17.5"
DATAFED_CMAKE_VERSION="3.31.6"
DATAFED_GLOBUS_VERSION="6.0.31-1"
DATAFED_JSON_SCHEMA_VALIDATOR_VERSION="2.1.0"
DATAFED_NLOHMANN_JSON_VERSION="3.10.2"
DATAFED_JSON_SCHEMA_VALIDATOR_VERSION="2.3.0"
DATAFED_NLOHMANN_JSON_VERSION="3.12.0"
DATAFED_LIBSODIUM_VERSION="1.0.18"
# this version is different from above due to the fact libsodium names its shared library diffrently than the actual api version
DATAFED_LIB_LIBSODIUM_VERSION="23.3.0"
Expand All @@ -14,12 +14,13 @@ DATAFED_LIB_ZMQCPP_VERSION="4.10.0"
DATAFED_NVM_VERSION="v0.39.7"
DATAFED_NODE_VERSION="v14.21.3"
DATAFED_NVM_VERSION="v0.39.7"
DATAFED_PYTHON_VERSION="3.9"
# Git tag
DATAFED_PROTOBUF_VERSION="25.2"
DATAFED_PROTOBUF_VERSION="25.7"
# Dynamic library extension .so.{DATAFED_FULL_PROTOBUF_VERSION}
DATAFED_DYNAMIC_LIBRARY_PROTOBUF_VERSION="25.2.0"
DATAFED_DYNAMIC_LIBRARY_PROTOBUF_VERSION="25.7.0"
# Full version
DATAFED_FULL_PROTOBUF_VERSION="4.25.2"
DATAFED_FULL_PROTOBUF_VERSION="4.25.7"
DATAFED_LIBCURL="8.11.0"
DATAFED_LIBCURL_URL="https://github.com/curl/curl/releases/download/curl-8_11_0/curl-8.11.0.tar.gz"
DATAFED_OPENSSL="1.1.1"
Expand Down
9 changes: 5 additions & 4 deletions scripts/install_authz_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ source "${PROJECT_ROOT}/scripts/utils.sh"
source "${PROJECT_ROOT}/scripts/dependency_install_functions.sh"

packages=("host" "libtool" "build-essential" "g++" "gcc" "autoconf"
"automake" "make" "git" "python3-pkg-resources" "python3-pip" "pkg-config"
"libglobus-common-dev" "wget" "jq" "sudo" "libboost-all-dev" "python3-venv" "libgssapi-krb5-2")
"automake" "make" "git" "pkg-config"
"libglobus-common-dev" "wget" "jq" "sudo" "libboost-all-dev" "python${DATAFED_PYTHON_VERSION}" "python${DATAFED_PYTHON_VERSION}-venv" "libgssapi-krb5-2")
pip_packages=("setuptools" "distro" "jwt" "globus_sdk")
externals=("cmake" "protobuf" "libsodium" "libzmq" )

install_python

local_UNIFY=false

if [ $# -eq 1 ]; then
Expand Down Expand Up @@ -47,8 +49,7 @@ if [[ $local_UNIFY = false ]]; then
"$SUDO_CMD" apt-get install -y "${packages[@]}"
init_python
source "${DATAFED_PYTHON_ENV}/bin/activate"
python3 -m pip install --upgrade pip
python3 -m pip install "${pip_packages[@]}"
"python${DATAFED_PYTHON_VERSION}" -m pip install "${pip_packages[@]}"

for ext in "${externals[@]}"; do
install_dep_by_name "$ext"
Expand Down
8 changes: 6 additions & 2 deletions scripts/install_client_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ PROJECT_ROOT=$(realpath "${SOURCE}/..")
source "${PROJECT_ROOT}/scripts/utils.sh"
source "${PROJECT_ROOT}/scripts/dependency_install_functions.sh"

packages=("python3-pkg-resources" "python3-pip" "pkg-config" "python3-venv")
packages=("pkg-config" "python${DATAFED_PYTHON_VERSION}" "python${DATAFED_PYTHON_VERSION}-venv")
pip_packages=("setuptools")

install_python

sudo_command
# This script will install all of the dependencies needed by DataFed 1.0
Expand All @@ -20,7 +23,8 @@ sudo_command

init_python
source "${DATAFED_PYTHON_ENV}/bin/activate"
python3 -m pip install -r "${PROJECT_ROOT}/python/datafed_pkg/requirements.txt"
"python${DATAFED_PYTHON_VERSION}" -m pip install "${pip_packages[@]}"
"python${DATAFED_PYTHON_VERSION}" -m pip install -r "${PROJECT_ROOT}/python/datafed_pkg/requirements.txt"

install_protobuf
cd ~
Expand Down
8 changes: 5 additions & 3 deletions scripts/install_core_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ PROJECT_ROOT=$(realpath ${SOURCE}/..)
source "${PROJECT_ROOT}/scripts/utils.sh"
source "${PROJECT_ROOT}/scripts/dependency_install_functions.sh"

packages=("libtool" "build-essential" "g++" "gcc" "make" "libboost-all-dev" "pkg-config" "autoconf" "automake" "unzip" "wget" "rapidjson-dev" "libkrb5-dev" "git" "python3-pkg-resources" "python3-pip" "python3-venv")
packages=("libtool" "build-essential" "g++" "gcc" "make" "libboost-all-dev" "pkg-config" "autoconf" "automake" "unzip" "wget" "rapidjson-dev" "libkrb5-dev" "git" "python${DATAFED_PYTHON_VERSION}" "python${DATAFED_PYTHON_VERSION}-venv")
pip_packages=("setuptools")
# NOTE the order matters here
externals=("cmake" "nlohmann_json" "json_schema_validator" "protobuf"
"libsodium" "libzmq" "libopenssl" "zlib" "libcurl")

install_python

local_UNIFY=false

if [ $# -eq 1 ]; then
Expand Down Expand Up @@ -46,8 +48,8 @@ if [[ $local_UNIFY = false ]]; then
"$SUDO_CMD" apt-get install -y "${packages[@]}"
init_python
source "${DATAFED_PYTHON_ENV}/bin/activate"
python3 -m pip install --upgrade pip
python3 -m pip install "${pip_packages[@]}"
"python${DATAFED_PYTHON_VERSION}" -m pip install --upgrade pip
"python${DATAFED_PYTHON_VERSION}" -m pip install "${pip_packages[@]}"

for ext in "${externals[@]}"; do
install_dep_by_name "$ext"
Expand Down
Loading