diff options
author | Tomáš Mózes <hydrapolic@gmail.com> | 2020-11-06 06:32:39 +0000 |
---|---|---|
committer | Alexys Jacob <ultrabug@gentoo.org> | 2020-11-09 15:11:41 +0100 |
commit | a6fdb3ca290f3fc0b1bd932da6a72a9e1ba5b606 (patch) | |
tree | 29a187cbf52afcc0a96e4e23bdfa01aeb48b4044 /dev-db/mongodb | |
parent | app-admin/mongo-tools: bump to 4.0.20/4.2.10 (diff) | |
download | gentoo-a6fdb3ca290f3fc0b1bd932da6a72a9e1ba5b606.tar.gz gentoo-a6fdb3ca290f3fc0b1bd932da6a72a9e1ba5b606.tar.bz2 gentoo-a6fdb3ca290f3fc0b1bd932da6a72a9e1ba5b606.zip |
dev-db/mongodb: bump to 4.0.20/4.2.10
Signed-off-by: Tomáš Mózes <hydrapolic@gmail.com>
Signed-off-by: Alexys Jacob <ultrabug@gentoo.org>
Diffstat (limited to 'dev-db/mongodb')
-rw-r--r-- | dev-db/mongodb/Manifest | 2 | ||||
-rw-r--r-- | dev-db/mongodb/files/mongodb-4.2.10-no-compass.patch | 54 | ||||
-rw-r--r-- | dev-db/mongodb/mongodb-4.0.20.ebuild | 173 | ||||
-rw-r--r-- | dev-db/mongodb/mongodb-4.2.10.ebuild | 175 |
4 files changed, 404 insertions, 0 deletions
diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest index 32c038e7f394..24e0bd844d75 100644 --- a/dev-db/mongodb/Manifest +++ b/dev-db/mongodb/Manifest @@ -1,4 +1,6 @@ DIST mongodb-src-r3.6.13.tar.gz 40853787 BLAKE2B de9621de4f570d569df5cfe026ea5da24641c97f1ac9f3e58a0706b1d0bd74757390a075c95c6d3acd12f3c5c7bcbeb9302ac997248c54a5b7910b582debdc82 SHA512 eb84fb22ff871b5ec620d6fc29a6a66072211656e914630ad0f53e4fcad55aa40a76a0e68e68bdbe8ef061bea09ce6ad6aea5d8d865ea8a8fdca0ed829555fcd DIST mongodb-src-r3.6.17.tar.gz 40932592 BLAKE2B 94bbb943fd929318a2b32344cb4574243ad234d1cd14ffef864d7fd2d60841866fd5a1966eae8f14266a9648deb62b7b55386d41338b515d5e6849e980143d42 SHA512 b4d9e9bfc7ff886532641058c99da29420d1aa472cb4cf2b254e0fd0af5ecc72ac8bf28dcd55ab738b799b00132ffacddd154dea37ccfbf459c7cc603c2582e0 DIST mongodb-src-r4.0.19.tar.gz 50126414 BLAKE2B 2691e2a9c8833ff9a086b28fd137bc8e8f10d58570117657c7cc01edbf61568ae62f58440d72e8711de98b9fc6868c1095b4ee88eb7b0eb63ea45ce19e842edd SHA512 57032a009ea7e79de4cac496a2d1266b83b99cc45eb9f1169be2fcdca1ed2003a659ceedf9eafbd4aa7fc5b3b0513066a5d712af7666cee5a897b2a2d7dd30cb +DIST mongodb-src-r4.0.20.tar.gz 50160192 BLAKE2B 3395399791b0620d3852b5d0a2ab2419f08127d909fac52035dd2624eb22660069401e71b036f449d8fd46be03b9e48ee548fb0c327b67c1eecc72a6ee9045b8 SHA512 dc18216d9096520b309ff769898fb65cf26f765eb74e5e0517617bdb0732c456620bbce351be5ad9f89bc72fea0b6d3afe13bd4cffe2c2b4ea06c9cb2b3b1696 +DIST mongodb-src-r4.2.10.tar.gz 61800545 BLAKE2B 773f3da589107d932808c30ee3bd09ec006b1c570884fbe6929ea4767581e951fd32b1771e9adf1e392ef97bd4c0e2b4ce5ce30c8bbbfbd63aa36b6ebaa8cbe4 SHA512 3947b2880bc0aaa958f26dfddfe79c7878f389eeeb8d0783360667124d3b253928ef746433c260bf395a219d650a6907bbf712ef61da6137ab85e4e1ba38fcbd DIST mongodb-src-r4.2.8.tar.gz 61730247 BLAKE2B f1d98b8ac8f62c0c7aff100ef663bb20345de0e77e0ff420817db0843fe735b58af8075578a7f8d83cc9dc4e597c95ae09f89ce7a21cf8146ff15bcb11eba924 SHA512 163fce480762bd377d6c78b661bfe51fc883223a5309a68f9556e1bafb99e26e476d81dbe6de825d90469e835442be097be630ca9678e54b9d09091e0b5d67c4 diff --git a/dev-db/mongodb/files/mongodb-4.2.10-no-compass.patch b/dev-db/mongodb/files/mongodb-4.2.10-no-compass.patch new file mode 100644 index 000000000000..e60cd827f490 --- /dev/null +++ b/dev-db/mongodb/files/mongodb-4.2.10-no-compass.patch @@ -0,0 +1,54 @@ +diff --git a/src/mongo/SConscript b/src/mongo/SConscript +index 6c78164c..b4b7c579 100644 +--- a/src/mongo/SConscript ++++ b/src/mongo/SConscript +@@ -805,41 +805,6 @@ for full_dir, archive_dir in list(env["ARCHIVE_ADDITION_DIR_MAP"].items()): + for target in env["DIST_BINARIES"]: + installBinary(env, "db/modules/" + target) + +-compass_type = 'compass' +- +-compass_script = "install_compass" +-if env.TargetOSIs('windows'): +- # On windows the .in needs to be explicitly added to the file. +- compass_script = "Install-Compass.ps1.in" +- +-compass_python_interpreter = '/usr/bin/env python2' +-if env.TargetOSIs('darwin'): +- compass_python_interpreter = '/usr/bin/env python' +- +-compass_installer = env.Substfile('#/src/mongo/installer/compass/' + compass_script, +- SUBST_DICT=[ +- ('@compass_type@', compass_type), +- ('@python_interpreter@', compass_python_interpreter), +- ]) +-distBinaries.append(compass_installer) +- +-if not hygienic: +- compass_script_installer = env.Install("$INSTALL_DIR/bin", compass_installer) +-else: +- compass_script_installer = env.AutoInstall( +- 'bin', +- source=[ +- compass_installer, +- ], +- INSTALL_ALIAS=[ +- 'tools', +- ], +- ) +- +-if env.TargetOSIs('posix'): +- env.AddPostAction( compass_script_installer, 'chmod 755 $TARGET' ) +- env.AddPostAction( compass_installer, 'chmod 755 $TARGET' ) +- + # "dist" target is valid only when --use-new-tools is specified + # Attempts to build release artifacts without tools must fail + if has_option("use-new-tools"): +@@ -857,7 +822,6 @@ if has_option("use-new-tools"): + '--transform $BUILD_DIR/mongo=$SERVER_DIST_BASENAME/bin', + '--transform $BUILD_DIR/mongo/stripped/src/mongo-tools=$SERVER_DIST_BASENAME/bin', + '--transform src/mongo-tools=$SERVER_DIST_BASENAME/bin', +- '--transform src/mongo/installer/compass=$SERVER_DIST_BASENAME/bin', + '${TEMPFILE(SOURCES[1:])}' + ], + ), diff --git a/dev-db/mongodb/mongodb-4.0.20.ebuild b/dev-db/mongodb/mongodb-4.0.20.ebuild new file mode 100644 index 000000000000..651219492475 --- /dev/null +++ b/dev-db/mongodb/mongodb-4.0.20.ebuild @@ -0,0 +1,173 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python2_7 ) + +SCONS_MIN_VERSION="2.5.0" +CHECKREQS_DISK_BUILD="2400M" +CHECKREQS_DISK_USR="512M" +CHECKREQS_MEMORY="1024M" + +inherit check-reqs flag-o-matic multiprocessing pax-utils python-any-r1 scons-utils systemd toolchain-funcs + +MY_P=${PN}-src-r${PV/_rc/-rc} + +DESCRIPTION="A high-performance, open source, schema-free document-oriented database" +HOMEPAGE="https://www.mongodb.com" +SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz" + +LICENSE="Apache-2.0 SSPL-1" +SLOT="0" +KEYWORDS="~amd64" +IUSE="debug kerberos libressl lto mms-agent ssl test +tools" +RESTRICT="!test? ( test )" + +RDEPEND="acct-group/mongodb + acct-user/mongodb + >=app-arch/snappy-1.1.3 + >=dev-cpp/yaml-cpp-0.5.3:= + >=dev-libs/boost-1.60:=[threads(+)] + >=dev-libs/libpcre-8.41[cxx] + dev-libs/snowball-stemmer + net-libs/libpcap + >=sys-libs/zlib-1.2.11:= + kerberos? ( dev-libs/cyrus-sasl[kerberos] ) + mms-agent? ( app-admin/mms-agent ) + ssl? ( + !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) + libressl? ( dev-libs/libressl:0= ) + )" +DEPEND="${RDEPEND} + ${PYTHON_DEPS} + $(python_gen_any_dep ' + test? ( dev-python/pymongo[${PYTHON_USEDEP}] ) + >=dev-util/scons-2.5.0[${PYTHON_USEDEP}] + dev-python/cheetah[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/typing[${PYTHON_USEDEP}] + ') + sys-libs/ncurses:0= + sys-libs/readline:0= + debug? ( dev-util/valgrind )" +PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )" + +PATCHES=( + "${FILESDIR}/${PN}-3.6.1-fix-scons.patch" + "${FILESDIR}/${PN}-4.0.0-no-compass.patch" + "${FILESDIR}/${PN}-4.0.12-boost-1.71-cxxabi-include.patch" +) + +S="${WORKDIR}/${MY_P}" + +pkg_pretend() { + if [[ -n ${REPLACING_VERSIONS} ]]; then + if ver_test "$REPLACING_VERSIONS" -lt 3.6; then + ewarn "To upgrade from a version earlier than the 3.6-series, you must" + ewarn "successively upgrade major releases until you have upgraded" + ewarn "to 3.6-series. Then upgrade to 4.0 series." + else + ewarn "Be sure to set featureCompatibilityVersion to 3.6 before upgrading." + fi + fi +} + +python_check_deps() { + if use test; then + has_version "dev-python/pymongo[${PYTHON_USEDEP}]" || + return 1 + fi + + has_version ">=dev-util/scons-2.5.0[${PYTHON_USEDEP}]" && + has_version "dev-python/cheetah[${PYTHON_USEDEP}]" && + has_version "dev-python/pyyaml[${PYTHON_USEDEP}]" && + has_version "dev-python/typing[${PYTHON_USEDEP}]" +} + +src_prepare() { + default + + # remove bundled libs + rm -r src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die + + # remove compass + rm -r src/mongo/installer/compass || die +} + +src_configure() { + # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source + # --use-system-icu fails tests + # --use-system-tcmalloc is strongly NOT recommended: + scons_opts=( + CC="$(tc-getCC)" + CXX="$(tc-getCXX)" + + --disable-warnings-as-errors + --use-system-boost + --use-system-pcre + --use-system-snappy + --use-system-stemmer + --use-system-yaml + --use-system-zlib + ) + + use debug && scons_opts+=( --dbg=on ) + use kerberos && scons_opts+=( --use-sasl-client ) + use lto && scons_opts+=( --lto=on ) + use ssl && scons_opts+=( --ssl ) + + # respect mongoDB upstream's basic recommendations + # see bug #536688 and #526114 + if ! use debug; then + filter-flags '-m*' + filter-flags '-O?' + fi + + default +} + +src_compile() { + escons "${scons_opts[@]}" core tools +} + +# FEATURES="test -usersandbox" emerge dev-db/mongodb +src_test() { + "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed" +} + +src_install() { + escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr + + doman debian/mongo*.1 + dodoc README docs/building.md + + newinitd "${FILESDIR}/${PN}.initd-r3" ${PN} + newconfd "${FILESDIR}/${PN}.confd-r3" ${PN} + newinitd "${FILESDIR}/mongos.initd-r3" mongos + newconfd "${FILESDIR}/mongos.confd-r3" mongos + + insinto /etc + newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf + newins "${FILESDIR}/mongos.conf-r2" mongos.conf + + systemd_dounit "${FILESDIR}/${PN}.service" + + insinto /etc/logrotate.d/ + newins "${FILESDIR}/${PN}.logrotate" ${PN} + + # see bug #526114 + pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos} + + local x + for x in /var/{lib,log}/${PN}; do + diropts -m0750 -o mongodb -g mongodb + keepdir "${x}" + done +} + +pkg_postinst() { + ewarn "Make sure to read the release notes and follow the upgrade process:" + ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/" + ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/#upgrade-procedures" +} diff --git a/dev-db/mongodb/mongodb-4.2.10.ebuild b/dev-db/mongodb/mongodb-4.2.10.ebuild new file mode 100644 index 000000000000..763bd774d5a7 --- /dev/null +++ b/dev-db/mongodb/mongodb-4.2.10.ebuild @@ -0,0 +1,175 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7} ) + +SCONS_MIN_VERSION="2.5.0" +CHECKREQS_DISK_BUILD="2400M" +CHECKREQS_DISK_USR="512M" +CHECKREQS_MEMORY="1024M" + +inherit check-reqs flag-o-matic multiprocessing pax-utils python-any-r1 scons-utils systemd toolchain-funcs + +MY_P=${PN}-src-r${PV/_rc/-rc} + +DESCRIPTION="A high-performance, open source, schema-free document-oriented database" +HOMEPAGE="https://www.mongodb.com" +SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz" + +LICENSE="Apache-2.0 SSPL-1" +SLOT="0" +KEYWORDS="~amd64 ~arm64" +IUSE="debug kerberos libressl lto ssl test +tools" +RESTRICT="!test? ( test )" + +RDEPEND="acct-group/mongodb + acct-user/mongodb + >=app-arch/snappy-1.1.3 + >=dev-cpp/yaml-cpp-0.6.2:= + >=dev-libs/boost-1.70:=[threads(+)] + >=dev-libs/libpcre-8.42[cxx] + app-arch/zstd + dev-libs/snowball-stemmer + net-libs/libpcap + >=sys-libs/zlib-1.2.11:= + kerberos? ( dev-libs/cyrus-sasl[kerberos] ) + ssl? ( + !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) + libressl? ( dev-libs/libressl:0= ) + )" +DEPEND="${RDEPEND} + ${PYTHON_DEPS} + $(python_gen_any_dep ' + test? ( dev-python/pymongo[${PYTHON_USEDEP}] dev-python/requests[${PYTHON_USEDEP}] ) + >=dev-util/scons-2.5.0[${PYTHON_USEDEP}] + dev-python/cheetah3[${PYTHON_USEDEP}] + dev-python/psutil[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + ') + sys-libs/ncurses:0= + sys-libs/readline:0= + debug? ( dev-util/valgrind )" +PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )" + +PATCHES=( + "${FILESDIR}/${PN}-4.2.0-fix-scons.patch" + "${FILESDIR}/${PN}-4.2.10-no-compass.patch" +) + +S="${WORKDIR}/${MY_P}" + +python_check_deps() { + if use test; then + has_version "dev-python/pymongo[${PYTHON_USEDEP}]" || return 1 + has_version "dev-python/requests[${PYTHON_USEDEP}]" || return 1 + fi + + has_version ">=dev-util/scons-2.5.0[${PYTHON_USEDEP}]" && + has_version "dev-python/cheetah3[${PYTHON_USEDEP}]" && + has_version "dev-python/psutil[${PYTHON_USEDEP}]" && + has_version "dev-python/pyyaml[${PYTHON_USEDEP}]" +} + +pkg_pretend() { + if [[ -n ${REPLACING_VERSIONS} ]]; then + if ver_test "$REPLACING_VERSIONS" -lt 4.0; then + ewarn "To upgrade from a version earlier than the 4.0-series, you must" + ewarn "successively upgrade major releases until you have upgraded" + ewarn "to 4.0-series. Then upgrade to 4.2 series." + else + ewarn "Be sure to set featureCompatibilityVersion to 4.0 before upgrading." + fi + fi +} + +src_prepare() { + default + + # remove bundled libs + rm -r src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*,zstandard-*} || die + + # remove compass + rm -r src/mongo/installer/compass || die +} + +src_configure() { + # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source + # --use-system-icu fails tests + # --use-system-tcmalloc is strongly NOT recommended: + scons_opts=( + CC="$(tc-getCC)" + CXX="$(tc-getCXX)" + + --disable-warnings-as-errors + --use-system-boost + --use-system-pcre + --use-system-snappy + --use-system-stemmer + --use-system-yaml + --use-system-zlib + --use-system-zstd + ) + + use arm64 && scons_opts+=( --use-hardware-crc32=off ) # Bug 701300 + use debug && scons_opts+=( --dbg=on ) + use kerberos && scons_opts+=( --use-sasl-client ) + use lto && scons_opts+=( --lto=on ) + use ssl && scons_opts+=( --ssl ) + + # respect mongoDB upstream's basic recommendations + # see bug #536688 and #526114 + if ! use debug; then + filter-flags '-m*' + filter-flags '-O?' + fi + + default +} + +src_compile() { + escons "${scons_opts[@]}" core tools +} + +# FEATURES="test -usersandbox" emerge dev-db/mongodb +src_test() { + ewarn "Tests may hang with FEATURES=usersandbox" + "${EPYTHON}" ./buildscripts/resmoke.py run --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed with ${EPYTHON}" +} + +src_install() { + escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr + + doman debian/mongo*.1 + dodoc README docs/building.md + + newinitd "${FILESDIR}/${PN}.initd-r3" ${PN} + newconfd "${FILESDIR}/${PN}.confd-r3" ${PN} + newinitd "${FILESDIR}/mongos.initd-r3" mongos + newconfd "${FILESDIR}/mongos.confd-r3" mongos + + insinto /etc + newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf + newins "${FILESDIR}/mongos.conf-r2" mongos.conf + + systemd_dounit "${FILESDIR}/${PN}.service" + + insinto /etc/logrotate.d/ + newins "${FILESDIR}/${PN}.logrotate" ${PN} + + # see bug #526114 + pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos} + + local x + for x in /var/{lib,log}/${PN}; do + diropts -m0750 -o mongodb -g mongodb + keepdir "${x}" + done +} + +pkg_postinst() { + ewarn "Make sure to read the release notes and follow the upgrade process:" + ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/" + ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/#upgrade-procedures" +} |