summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlison Felizzi <alison.felizzi@mongodb.com>2021-12-23 04:36:12 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-12-23 05:00:50 +0000
commit18acb5f4e0567a7263983a730fbc19b41d593198 (patch)
tree3002a46dcef8eaf721e9987dd88ea842efcd8109
parent0e0bdb41cf80cfa3e151b3aba3a5ebb77714c06e (diff)
downloadmongo-18acb5f4e0567a7263983a730fbc19b41d593198.tar.gz
Import wiredtiger: e29560bb0960e89d3edf62695257190a4e749f8f from branch mongodb-master
ref: a9197f1480..e29560bb09 for: 5.3.0 WT-8542 s_version generates CMake version config file
-rw-r--r--src/third_party/wiredtiger/cmake/configs/base.cmake11
-rw-r--r--src/third_party/wiredtiger/cmake/configs/version.cmake5
-rwxr-xr-xsrc/third_party/wiredtiger/dist/s_version95
-rw-r--r--src/third_party/wiredtiger/import.data2
4 files changed, 71 insertions, 42 deletions
diff --git a/src/third_party/wiredtiger/cmake/configs/base.cmake b/src/third_party/wiredtiger/cmake/configs/base.cmake
index 6f77ebcd632..10edeed27c0 100644
--- a/src/third_party/wiredtiger/cmake/configs/base.cmake
+++ b/src/third_party/wiredtiger/cmake/configs/base.cmake
@@ -7,6 +7,7 @@
#
include(cmake/helpers.cmake)
+include(cmake/configs/version.cmake)
# WiredTiger-related configuration options.
@@ -200,27 +201,25 @@ config_string(
config_string(
VERSION_MAJOR
"Major version number for WiredTiger"
- DEFAULT 10
+ DEFAULT ${WT_VERSION_MAJOR}
)
config_string(
VERSION_MINOR
"Minor version number for WiredTiger"
- DEFAULT 0
+ DEFAULT ${WT_VERSION_MINOR}
)
config_string(
VERSION_PATCH
"Path version number for WiredTiger"
- DEFAULT 1
+ DEFAULT ${WT_VERSION_PATCH}
)
-
-string(TIMESTAMP config_date "%Y-%m-%d")
config_string(
VERSION_STRING
"Version string for WiredTiger"
- DEFAULT "\"WiredTiger ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH} (${config_date})\""
+ DEFAULT "\"${WT_VERSION_STRING}\""
)
if(HAVE_DIAGNOSTIC AND (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Debug"))
diff --git a/src/third_party/wiredtiger/cmake/configs/version.cmake b/src/third_party/wiredtiger/cmake/configs/version.cmake
new file mode 100644
index 00000000000..714da8bb3de
--- /dev/null
+++ b/src/third_party/wiredtiger/cmake/configs/version.cmake
@@ -0,0 +1,5 @@
+# Generated by dist/s_version. Do not modify.
+set(WT_VERSION_MAJOR 10)
+set(WT_VERSION_MINOR 0)
+set(WT_VERSION_PATCH 2)
+set(WT_VERSION_STRING "WiredTiger 10.0.2: (December 21, 2021)")
diff --git a/src/third_party/wiredtiger/dist/s_version b/src/third_party/wiredtiger/dist/s_version
index a09aebd282a..a53995b18a3 100755
--- a/src/third_party/wiredtiger/dist/s_version
+++ b/src/third_party/wiredtiger/dist/s_version
@@ -6,6 +6,7 @@
m4dir=../build_posix/aclocal
rpmspec=./package/wiredtiger.spec
tmp_file=__tmp
+cmakedir=../cmake/configs
force=no
while :
@@ -18,42 +19,66 @@ while :
esac
done
-# If the version hasn't changed and we're not forcing the issue, we're done.
-if test "$force" = no -a \
- -f $m4dir/version.m4 -a \
- -f $m4dir/version-set.m4 ; then
- eval `grep '^VERSION_[A-Z]*=' $m4dir/version-set.m4`
- if test x${WIREDTIGER_VERSION_MAJOR} = x${VERSION_MAJOR} -a \
- x${WIREDTIGER_VERSION_MINOR} = x${VERSION_MINOR} -a \
- x${WIREDTIGER_VERSION_PATCH} = x${VERSION_PATCH} ; then
- exit 0
+GenAutoconfVersion(){
+ # If the version hasn't changed and we're not forcing the issue, we're done.
+ if test "$force" = no -a \
+ -f $m4dir/version.m4 -a \
+ -f $m4dir/version-set.m4 ; then
+ eval `grep '^VERSION_[A-Z]*=' $m4dir/version-set.m4`
+ if test x${WIREDTIGER_VERSION_MAJOR} = x${VERSION_MAJOR} -a \
+ x${WIREDTIGER_VERSION_MINOR} = x${VERSION_MINOR} -a \
+ x${WIREDTIGER_VERSION_PATCH} = x${VERSION_PATCH} ; then
+ return
+ fi
fi
-fi
-
-dotted_version=${WIREDTIGER_VERSION_MAJOR}.${WIREDTIGER_VERSION_MINOR}.${WIREDTIGER_VERSION_PATCH}
-echo "Building $m4dir/version.m4"
-cat <<EOF > $m4dir/version.m4
-dnl WiredTiger product version for AC_INIT. Maintained by dist/s_version
-${dotted_version}
-EOF
-
-echo "Building $m4dir/version-set.m4"
-cat <<EOF > $m4dir/version-set.m4
-dnl build by dist/s_version
-
-VERSION_MAJOR=${WIREDTIGER_VERSION_MAJOR}
-VERSION_MINOR=${WIREDTIGER_VERSION_MINOR}
-VERSION_PATCH=${WIREDTIGER_VERSION_PATCH}
-VERSION_STRING='"${WIREDTIGER_VERSION_STRING}"'
-
-AC_SUBST(VERSION_MAJOR)
-AC_SUBST(VERSION_MINOR)
-AC_SUBST(VERSION_PATCH)
-AC_SUBST(VERSION_STRING)
-
-VERSION_NOPATCH=${WIREDTIGER_VERSION_MAJOR}.${WIREDTIGER_VERSION_MINOR}
-AC_SUBST(VERSION_NOPATCH)
-EOF
+ dotted_version=${WIREDTIGER_VERSION_MAJOR}.${WIREDTIGER_VERSION_MINOR}.${WIREDTIGER_VERSION_PATCH}
+ echo "Building $m4dir/version.m4"
+ cat > $m4dir/version.m4 <<-END
+ dnl WiredTiger product version for AC_INIT. Maintained by dist/s_version
+ ${dotted_version}
+ END
+
+ echo "Building $m4dir/version-set.m4"
+ cat > $m4dir/version-set.m4 <<-END
+ dnl build by dist/s_version
+
+ VERSION_MAJOR=${WIREDTIGER_VERSION_MAJOR}
+ VERSION_MINOR=${WIREDTIGER_VERSION_MINOR}
+ VERSION_PATCH=${WIREDTIGER_VERSION_PATCH}
+ VERSION_STRING='"${WIREDTIGER_VERSION_STRING}"'
+
+ AC_SUBST(VERSION_MAJOR)
+ AC_SUBST(VERSION_MINOR)
+ AC_SUBST(VERSION_PATCH)
+ AC_SUBST(VERSION_STRING)
+
+ VERSION_NOPATCH=${WIREDTIGER_VERSION_MAJOR}.${WIREDTIGER_VERSION_MINOR}
+ AC_SUBST(VERSION_NOPATCH)
+ END
+}
+
+GenCmakeVersion(){
+ if test "$force" = no -a \
+ -f $cmakedir/version.cmake ; then
+ eval `sed -n -e 's/^set(\(WT_VERSION_[A-Z]*\) \([0-9]*\))$/\1=\2/p' $cmakedir/version.cmake`
+ if test x${WIREDTIGER_VERSION_MAJOR} = x${WT_VERSION_MAJOR} -a \
+ x${WIREDTIGER_VERSION_MINOR} = x${WT_VERSION_MINOR} -a \
+ x${WIREDTIGER_VERSION_PATCH} = x${WT_VERSION_PATCH} ; then
+ return
+ fi
+ fi
+ echo "Building $cmakedir/version.cmake"
+ cat > $cmakedir/version.cmake <<-END
+ # Generated by dist/s_version. Do not modify.
+ set(WT_VERSION_MAJOR ${WIREDTIGER_VERSION_MAJOR})
+ set(WT_VERSION_MINOR ${WIREDTIGER_VERSION_MINOR})
+ set(WT_VERSION_PATCH ${WIREDTIGER_VERSION_PATCH})
+ set(WT_VERSION_STRING "${WIREDTIGER_VERSION_STRING}")
+ END
+}
+
+GenAutoconfVersion
+GenCmakeVersion
echo "Building $rpmspec"
sed -e "s/Version: .*/Version: ${dotted_version}/" $rpmspec \
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index 838a603b228..9e4ad64fca3 100644
--- a/src/third_party/wiredtiger/import.data
+++ b/src/third_party/wiredtiger/import.data
@@ -2,5 +2,5 @@
"vendor": "wiredtiger",
"github": "wiredtiger/wiredtiger.git",
"branch": "mongodb-master",
- "commit": "a9197f1480f65355eaf9e16812e5fd7e8f591eab"
+ "commit": "e29560bb0960e89d3edf62695257190a4e749f8f"
}