-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Rocky8, Rocky9, Ubuntu build (#61)
* Add dependency install scripts and include docs - Support CentOS, Rocky8, Rocky9 - Install all deps automatically in docker env - Update README * Use python3 explicitly * Don't install dependencies in build.sh These deps are now installed via scripts/dependencies/install.sh * Add Ubuntu dependency script * Only build RPMs if OS is centos or rocky * Dont build DSSD libucore * Add missing libboost-filesystem-dev package * Add additional includes needed for gcc 10+ - need to explicitly import string - need boost/cstdint.hpp for uint64_t * Add Ubuntu 22.04 as supported OS * Update dependencies and enhance docker build - use env var to determine docker optimizations - set env var in dockerfile - fix missing && before rm dependencies dir - set vault yum repos for centos (EOL) - remove unneeded redhat-lsb dep from cent * Install CentOS deps after sed yum vault * Streamline rhel deps - merge centos and rocky - use symlink from centos to rocky * Download sonar-scanner from env var * Determine sonar scanner dir name from zip - Sonar is not consistent so I can't derive the dir name any other way * Correct var name in comments * Fix host compile issues with GCC 10+ * Improve README - minor formatting improvements - add submodule instructions - add build script instructions * Minor formatting fix for consistency * Add docker build instructions to README * Add workdir to dockerfiles - update docs to streamline use of workdir for the sake of clarity
- Loading branch information
Showing
21 changed files
with
437 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#! /usr/bin/env bash | ||
# shellcheck source=/dev/null | ||
set -e | ||
|
||
# Path variables | ||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
|
||
if [[ -e /etc/os-release ]]; then | ||
source /etc/os-release | ||
else | ||
ID=unknown | ||
fi | ||
|
||
# Default paths in case they are not exported automatically | ||
export PATH=$PATH:/usr/local/bin:/usr/local/sbin | ||
|
||
for id in $ID $ID_LIKE; do | ||
if [[ -e $SCRIPT_DIR/os/$id.sh ]]; then | ||
echo "os: $id" | ||
source "$SCRIPT_DIR/os/$id.sh" | ||
source "$SCRIPT_DIR/os/common.sh" | ||
exit 0 | ||
fi | ||
done | ||
|
||
printf "Non-supported distribution detected: %s\n" "$ID" >&2 | ||
echo "Aborting!" | ||
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rocky.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#! /usr/bin/env bash | ||
set -e | ||
|
||
# Path variables | ||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
REQUIREMENTS=$(realpath "$SCRIPT_DIR/../python/requirements.txt") | ||
|
||
# Upgrade python3 pip to latest | ||
python3 -m pip install pip --upgrade | ||
|
||
# Install python modules from requirements.txt | ||
PIP_ARGS=() | ||
PIP_ARGS+=("-r") | ||
PIP_ARGS+=("$REQUIREMENTS") | ||
|
||
# Optimizations for Docker build | ||
if [[ $DOCKER ]] | ||
then | ||
PIP_ARGS+=("--no-cache-dir") | ||
fi | ||
|
||
# Install python modules from requirements.txt via pip | ||
INSTALL_STRING="python3 -m pip install ${PIP_ARGS[*]}" | ||
echo "executing command: $INSTALL_STRING" | ||
eval "$INSTALL_STRING" | ||
|
||
# Set git config if not already set | ||
for CONFIG in name email | ||
do | ||
if git config --list | grep "user.$CONFIG" | ||
then | ||
echo "git user.$CONFIG is configured." | ||
else | ||
echo "WARNING: git user.$CONFIG is not configured. Setting a temporary user.$CONFIG." | ||
echo "You should set a proper git "user.$CONFIG" with command: git config --global user.$CONFIG <<your-details>>" | ||
git config --global user.$CONFIG "[email protected]" | ||
fi | ||
done | ||
|
||
# Set git safe.directory globally if docker | ||
if [[ $DOCKER ]] | ||
then | ||
git config --global --add safe.directory '*' | ||
fi |
Oops, something went wrong.