diff options
author | Tomáš Mózes <hydrapolic@gmail.com> | 2021-08-06 10:13:16 +0000 |
---|---|---|
committer | Alexys Jacob <ultrabug@gentoo.org> | 2021-08-19 18:38:08 +0200 |
commit | 51dcdf206ff594f3a741857f75c1ede89f7449a4 (patch) | |
tree | 027525e2e2d60cf6b37e0bb2dbf3f2455f9bea72 /dev-db/mongodb | |
parent | www-client/opera-beta: bump to 79.0.4143.3 (diff) | |
download | gentoo-51dcdf206ff594f3a741857f75c1ede89f7449a4.tar.gz gentoo-51dcdf206ff594f3a741857f75c1ede89f7449a4.tar.bz2 gentoo-51dcdf206ff594f3a741857f75c1ede89f7449a4.zip |
dev-db/mongodb: bump to 4.2.15
Signed-off-by: Tomáš Mózes <hydrapolic@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/21898
Signed-off-by: Alexys Jacob <ultrabug@gentoo.org>
Diffstat (limited to 'dev-db/mongodb')
-rw-r--r-- | dev-db/mongodb/Manifest | 1 | ||||
-rw-r--r-- | dev-db/mongodb/files/mongodb-4.2.15-no-compass.patch | 45 | ||||
-rw-r--r-- | dev-db/mongodb/mongodb-4.2.15.ebuild | 175 |
3 files changed, 221 insertions, 0 deletions
diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest index ca2d95a7d386..a06a609dbd71 100644 --- a/dev-db/mongodb/Manifest +++ b/dev-db/mongodb/Manifest @@ -1,5 +1,6 @@ DIST mongodb-src-r4.2.11.tar.gz 61829417 BLAKE2B cc989d6ea87a48b7402d119dda4678a966cf96cec0da5d00d792faf06ecb6fbe4bc426069e1a72548410adcbd26162038ec7201e76036ac599af5f53029c0e66 SHA512 ff398a9d3a012e0eb860c2139967e163b8b0ac045c1c47f2c0c5584ba7c60a1403bb423ce8c6e8b3900fdcad1164a84c6da79276f897fd640366e3f80cf54316 DIST mongodb-src-r4.2.12.tar.gz 61855596 BLAKE2B 2114c3b6e7a941c566cf631e06b0f850d4f10b12fb6367caef5d6f6e92ebbee04650b41b8ea9d90e9ba983012f812144be9c50caa77c9a68263b6a6a19d522b2 SHA512 9be714b6d8f51cfd36530b103cfb5e9b31493c6294b453d32fe2176dd06e9a2145a671bd15b1f97865944c88256fbaea63542a994f2c033df75ab7280e82a576 +DIST mongodb-src-r4.2.15.tar.gz 62187847 BLAKE2B eb9cbf52b5aeb95d3c6c6bd14da9731a85a24e2c3560163be999bddff1cd1ac90f9cf07b4c3fe22e35ffcdd174a6b2720a801fa179f574ff33150d1a4660ef9e SHA512 ee46a2dfb7ae23ad38da49bf126a2bc7932bded8f01d34516ad575d2aed5d6233c5ad620b2a4424a98afb9e80e26acf40c66982cdd0637c13f0f7aaae8b746a0 DIST mongodb-src-r4.4.1.tar.gz 49644743 BLAKE2B 7d84998c69b9b55164ebab04b49c38a4113a0f58d431612389ec37eb044fba1adf9284e9d4454bd40bb7a071fd042308a5cd350129d6d52480412cf6b868ec2b SHA512 16aa66995ea8cfe0cc47b96c1c5643a28ab47fc9f27bd93404cf572944ab30492df7c9255553f918b353cd7157a6ccde9ac6f58bfba322fb52c2d7409c6fb9b0 DIST mongodb-src-r4.4.2.tar.gz 49816559 BLAKE2B 0e51302e7e414de9fef74872e44c8de1f5682cb3cac0aa7a02e3c1ee3084669ea647d1e574e8a76a3b6b2f34aa4ef693c8d1f3fa025ec3072eff7b7c408b94e5 SHA512 bbf59ed97a8718576c469c696d5331c122f63528dad950fd415b00269c2fa5e6949b372c575e2504c2a58b145bae485172b25000000481662e6543bc3127252a DIST mongodb-src-r4.4.4.tar.gz 49942905 BLAKE2B 8aa9813e87e216899b3c609b413ce6915d6ddf30faea3c0ecda2a14476fc6b08024614fa7b20e1703b5908759459e88e5e302539c27525c2359233743aa7dcda SHA512 a999528a8a6bf4bf0b8ff8f5169b1aadb3c4dab9c7d936c59d66f238b864fad6e8fb6a1b9ec27f395fca95152ee020f96a8c1cf8960a48de3ce5141f8dda7d88 diff --git a/dev-db/mongodb/files/mongodb-4.2.15-no-compass.patch b/dev-db/mongodb/files/mongodb-4.2.15-no-compass.patch new file mode 100644 index 000000000000..de2eda82f213 --- /dev/null +++ b/dev-db/mongodb/files/mongodb-4.2.15-no-compass.patch @@ -0,0 +1,45 @@ +diff --git a/src/mongo/SConscript b/src/mongo/SConscript +index 0379fcb0..1aabddba 100644 +--- a/src/mongo/SConscript ++++ b/src/mongo/SConscript +@@ -808,32 +808,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_script = "install_compass" +-if env.TargetOSIs('windows'): +- # On windows the .in needs to be explicitly added to the file. +- compass_script = "Install-Compass.ps1" +- +-compass_installer = f"#/src/mongo/installer/compass/{compass_script}" +- +-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"): +@@ -851,7 +825,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.2.15.ebuild b/dev-db/mongodb/mongodb-4.2.15.ebuild new file mode 100644 index 000000000000..9d517a063d26 --- /dev/null +++ b/dev-db/mongodb/mongodb-4.2.15.ebuild @@ -0,0 +1,175 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7..9} ) + +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 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? ( + >=dev-libs/openssl-1.0.1g: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.4.1-gcc11.patch" + "${FILESDIR}/${PN}-4.2.15-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" +} |