summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian McCarthy <brian.mccarthy@mongodb.com>2019-05-06 17:37:17 -0400
committerBrian McCarthy <brian.mccarthy@mongodb.com>2021-01-11 17:13:02 -0500
commitdd55f9ac7e8610dae975a8b48792a35448775275 (patch)
tree4e6fd8c63f393a0eed655107660ef402d86600e4
parent226949cc252af265483afbf859b446590b09b098 (diff)
downloadmongo-dd55f9ac7e8610dae975a8b48792a35448775275.tar.gz
BUILD-11420 Splunk custom build of 3.6.17 with BACKPORT-6439 and Go 1.13 MacOS
-rw-r--r--README-SPLUNK-MACOS42
-rw-r--r--etc/evergreen.yml61
-rwxr-xr-xsrc/mongo/gotools/src/github.com/mongodb/mongo-tools/set_goenv.sh6
3 files changed, 88 insertions, 21 deletions
diff --git a/README-SPLUNK-MACOS b/README-SPLUNK-MACOS
new file mode 100644
index 00000000000..f33a0498b80
--- /dev/null
+++ b/README-SPLUNK-MACOS
@@ -0,0 +1,42 @@
+Splunk Custom Build macOS
+=========================
+
+NOTE: We use 3 separate branches to build and test builds for Splunk: Linux, Windows, and MacOS.
+
+This is because signficant changes have to be made to build the tools on RHEL 5.5 Linux. We also need to make some code changes to account for features
+that are not available in the older OS.
+
+Finally, Splunk requires different versions of openssl (and a specific location requirement on macOS requiring its own distro in Evergreen)
+This would be hard to generalize in a single evergreen.yml in one branch.
+
+Current branches:
+
+splunk-linux-v3.6.17-BACKPORT-6439
+splunk-macos-v3.6.17-BACKPORT-6439
+splunk-windows-v3.6.17-BACKPORT-6439
+
+MacOS
+-----
+
+Note that a patch should only be run for MacOS on the macos-1012-splunk distro in Evergreen.
+
+Use this variant:
+
+```
+### SPLUNK
+ - name: osx-1010-ssl
+ display_name: SSL OS X 10.10 Splunk
+ run_on:
+- - macos-1012
+ ### SPLUNK
+ - macos-1012-splunk
+```
+
+ie.
+
+```
+evergreen patch -p "mongodb-mongo-v3.6" -t "compile" -d "BUILD-11420 Splunk MacOS v3.6.17 with golang 1.13" -v "osx-1010-ssl" -u -f -y
+```
+
+Here is the most recent full build
+https://spruce.mongodb.com/version/5ef4e6d3c9ec444db96433e8/tasks
diff --git a/etc/evergreen.yml b/etc/evergreen.yml
index c670a0a2e8f..d69570039d9 100644
--- a/etc/evergreen.yml
+++ b/etc/evergreen.yml
@@ -80,12 +80,15 @@ variables:
set -o verbose
# We get the raw version string (r1.2.3-45-gabcdef) from git
- MONGO_VERSION=$(git describe)
+ ### SPLUNK
+ ### MONGO_VERSION=$(git describe)
+ MONGO_VERSION=3.6.17-SERVER-42525-splunk
# If this is a patch build, we add the patch version id to the version string so we know
# this build was a patch, and which evergreen task it came from
- if [ "${is_patch|}" = "true" ]; then
- MONGO_VERSION="$MONGO_VERSION-patch-${version_id}"
- fi
+ ### SPLUNK
+ ### if [ "${is_patch|}" = "true" ]; then
+ ### MONGO_VERSION="$MONGO_VERSION-patch-${version_id}"
+ ### fi
# This script converts the generated version string into a sanitized version string for
# use by scons and uploading artifacts as well as information about for the scons cache.
@@ -257,7 +260,10 @@ functions:
${activate_virtualenv}
bin_ver=$($python -c "import yaml; print(yaml.safe_load(open('compile_expansions.yml'))['version']);" | tr -d '[ \r\n]')
# Due to SERVER-23810, we cannot use $mongo_binary --quiet --nodb --eval "version();"
- mongo_ver=$($mongo_binary --version | perl -pe '/version v(.*)$/; $_ = $1;' | tr -d '[ \r\n]')
+ ### SPLUNK
+ ### mongo_ver=$($mongo_binary --version | perl -pe '/version v(.*)$/; $_ = $1;' | tr -d '[ \r\n]')
+ mongo_ver=$(LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/opt/openssl/lib $mongo_binary --version | perl -pe '/version v(.*)$/; $_ = $1;' | tr -d '[ \r\n]')
+
# The versions must match
if [ "$bin_ver" != "$mongo_ver" ]; then
echo "The mongo version is $mongo_ver, expected version is $bin_ver"
@@ -723,6 +729,7 @@ functions:
extra_args="$extra_args --tagFile=etc/test_retrial.yml"
fi
+ ### SPLUNK Add ${ld_library_path} below
# The "resmoke_wrapper" expansion is used by the 'burn_in_tests' task to wrap the resmoke.py
# invocation. It doesn't set any environment variables and should therefore come last in
# this list of expansions.
@@ -734,6 +741,7 @@ functions:
${lang_environment} \
${san_options} \
${san_symbolizer} \
+ ${ld_library_path} \
${snmp_config_path} \
${resmoke_wrapper} \
$python buildscripts/evergreen_run_tests.py \
@@ -809,12 +817,15 @@ functions:
set -o verbose
# We get the raw version string (r1.2.3-45-gabcdef) from git
- MONGO_VERSION=$(git describe)
+ ### SPLUNK
+ ### MONGO_VERSION=$(git describe)
+ MONGO_VERSION=3.6.17-SERVER-42525-splunk
# If this is a patch build, we add the patch version id to the version string so we know
# this build was a patch, and which evergreen task it came from
- if [ "${is_patch|}" = "true" ]; then
- MONGO_VERSION="$MONGO_VERSION-patch-${version_id}"
- fi
+ ### SPLUNK
+ ### if [ "${is_patch|}" = "true" ]; then
+ ### MONGO_VERSION="$MONGO_VERSION-patch-${version_id}"
+ ### fi
# This script converts the generated version string into a sanitized version string for
# use by scons and uploading artifacts as well as information about for the scons cache.
@@ -1007,7 +1018,8 @@ functions:
${add_nodejs_to_path}
- npm run ${npm_command|jstestfuzz} -- ${jstestfuzz_vars} --branch ${branch_name}
+ ### SPLUNK
+ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/opt/openssl/lib npm run ${npm_command|jstestfuzz} -- ${jstestfuzz_vars} --branch ${branch_name}
- command: archive.targz_pack
params:
@@ -2404,7 +2416,9 @@ post:
${activate_virtualenv}
if [ -d "${scons_cache_path}" ]; then
- $python buildscripts/scons_cache_prune.py --cache-dir '${scons_cache_path}' --cache-size ${scons_cache_size|200} --prune-ratio ${scons_prune_ratio|0.8}
+ ### SPLUNK - force to use toolchain python
+ ### $python buildscripts/scons_cache_prune.py --cache-dir '${scons_cache_path}' --cache-size ${scons_cache_size|200} --prune-ratio ${scons_prune_ratio|0.8}
+ /opt/mongodbtoolchain/v2/bin/python2 buildscripts/scons_cache_prune.py --cache-dir '${scons_cache_path}' --cache-size ${scons_cache_size|200} --prune-ratio ${scons_prune_ratio|0.8}
fi
- func: "cleanup environment"
@@ -2510,7 +2524,8 @@ tasks:
- func: "git get project"
- func: "get buildnumber"
- func: "set up credentials"
- - func: "fetch and build OpenSSL"
+ ### SPLUNK - we want our own version of openssl
+ #- func: "fetch and build OpenSSL"
- func: "build new tools" # noop if ${newtools} is not "true"
- func: "generate compile expansions"
# Then we load the generated version data into the agent so we can use it in task definitions
@@ -2674,7 +2689,8 @@ tasks:
- func: "git get project"
- func: "get buildnumber"
- func: "set up credentials"
- - func: "fetch and build OpenSSL"
+ ### SPLUNK - we want our own version of openssl
+ #- func: "fetch and build OpenSSL"
- func: "build new tools" # noop if ${newtools} is not "true"
- func: "generate compile expansions"
# Then we load the generated version data into the agent so we can use it in task definitions.
@@ -2713,7 +2729,8 @@ tasks:
- func: "git get project"
- func: "get buildnumber"
- func: "set up credentials"
- - func: "fetch and build OpenSSL"
+ ### SPLUNK - we want our own version of openssl
+ #- func: "fetch and build OpenSSL"
- func: "generate compile expansions"
# Then we load the generated version data into the agent so we can use it in task definitions
- func: "apply compile expansions"
@@ -7203,10 +7220,13 @@ buildvariants:
# OSX buildvariants #
###########################################
+### SPLUNK
- name: osx-1010-ssl
- display_name: SSL OS X 10.10
+ display_name: SSL OS X 10.10 Splunk
run_on:
- - macos-1012
+ ### SPLUNK
+ ###- macos-1012
+ - macos-1012-splunk
batchtime: 1440 # 1 day
expansions:
test_flags: --excludeWithAnyTags=requires_ssl_mongo_tools
@@ -7215,11 +7235,16 @@ buildvariants:
push_name: osx-ssl
push_arch: x86_64
compile_env: DEVELOPER_DIR=/Applications/Xcode8.3.app
- compile_flags: --ssl -j$(sysctl -n hw.logicalcpu) --release --libc++ CCFLAGS="-mmacosx-version-min=10.10" LINKFLAGS="-mmacosx-version-min=10.10" LIBPATH="$PWD/openssl_install_dir/lib" CPPPATH="$PWD/openssl_install_dir/include"
+ ### SPLUNK
+ ### compile_flags: --ssl -j$(sysctl -n hw.logicalcpu) --release --libc++ CCFLAGS="-mmacosx-version-min=10.10" LINKFLAGS="-mmacosx-version-min=10.10" LIBPATH="$PWD/openssl_install_dir/lib" CPPPATH="$PWD/openssl_install_dir/include"
+ ld_library_path: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/opt/openssl/lib
+ compile_flags: --ssl -j$(sysctl -n hw.logicalcpu) --release --libc++ CCFLAGS="-mmacosx-version-min=10.10" LINKFLAGS="-mmacosx-version-min=10.10" LIBPATH="/usr/local/opt/openssl/lib" CPPPATH="/usr/local/opt/openssl/include /opt/mongodbtoolchain/v2/include" --disable-warnings-as-errors
+ #compile_flags: --ssl -j$(sysctl -n hw.logicalcpu) --release --libc++ CCFLAGS="-mmacosx-version-min=10.10" LINKFLAGS="-mmacosx-version-min=10.10" LIBPATH="/usr/local/opt/openssl/lib" CPPPATH="/usr/local/opt/openssl/include"
+ python: /opt/mongodbtoolchain/v2/bin/python2.7
multiversion_platform: osx-ssl
num_jobs_available: 1
tooltags: "ssl"
- build_mongoreplay: true
+ build_mongoreplay: false
build_openssl: true
openssl_config_flags: "-mmacosx-version-min=10.10"
openssl_make_flags: "-j$(sysctl -n hw.logicalcpu)"
diff --git a/src/mongo/gotools/src/github.com/mongodb/mongo-tools/set_goenv.sh b/src/mongo/gotools/src/github.com/mongodb/mongo-tools/set_goenv.sh
index c2c8ed99183..360238c1056 100755
--- a/src/mongo/gotools/src/github.com/mongodb/mongo-tools/set_goenv.sh
+++ b/src/mongo/gotools/src/github.com/mongodb/mongo-tools/set_goenv.sh
@@ -11,11 +11,11 @@ set_goenv() {
UNAME_S=$(PATH="/usr/bin:/bin" uname -s)
case $UNAME_S in
CYGWIN*)
- PREF_GOROOT="c:/golang/go1.11"
- PREF_PATH="/cygdrive/c/golang/go1.11/bin:/cygdrive/c/mingw-w64/x86_64-4.9.1-posix-seh-rt_v3-rev1/mingw64/bin:$PATH"
+ PREF_GOROOT="c:/golang/go1.13"
+ PREF_PATH="/cygdrive/c/golang/go1.13/bin:/cygdrive/c/mingw-w64/x86_64-4.9.1-posix-seh-rt_v3-rev1/mingw64/bin:$PATH"
;;
*)
- PREF_GOROOT="/opt/golang/go1.11"
+ PREF_GOROOT="/opt/golang/go1.13"
# XXX might not need mongodbtoolchain anymore
PREF_PATH="$PREF_GOROOT/bin:/opt/mongodbtoolchain/v3/bin/:$PATH"
;;