commit:     948a8840faad422e932b4950ced1b2a8509e6107
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 20 08:54:09 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Mon Sep 20 08:55:34 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=948a8840

Revert (partially) "dev-db/mongodb: Remove old"

This partially reverts commit b61ebf04af42312a1b9ff746e5f2599d1398a826.

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 dev-db/mongodb/Manifest                 |   1 +
 dev-db/mongodb/mongodb-4.2.15-r1.ebuild | 176 ++++++++++++++++++++++++++++++++
 2 files changed, 177 insertions(+)

diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest
index 687b1b9815e..8108b678df4 100644
--- a/dev-db/mongodb/Manifest
+++ b/dev-db/mongodb/Manifest
@@ -1,3 +1,4 @@
+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.4.tar.gz 49942905 BLAKE2B 
8aa9813e87e216899b3c609b413ce6915d6ddf30faea3c0ecda2a14476fc6b08024614fa7b20e1703b5908759459e88e5e302539c27525c2359233743aa7dcda
 SHA512 
a999528a8a6bf4bf0b8ff8f5169b1aadb3c4dab9c7d936c59d66f238b864fad6e8fb6a1b9ec27f395fca95152ee020f96a8c1cf8960a48de3ce5141f8dda7d88
 DIST mongodb-src-r4.4.8.tar.gz 50492854 BLAKE2B 
4776b17e88104879ea69468ff277b07dc317d936654bb26c69750e0aaf8f51bea73994e7fc4841228d8506db392e0454b5fd16257071b86a2e4ad34e90f33632
 SHA512 
9b0cd81c9c731255a6c079c040ed342a51a72e3ea72047d3ae959c0afde50b0cdb1fcfe7fcbea30c449a3618a09d213752277cee6eb9bc0a55915b9229543606

diff --git a/dev-db/mongodb/mongodb-4.2.15-r1.ebuild 
b/dev-db/mongodb/mongodb-4.2.15-r1.ebuild
new file mode 100644
index 00000000000..3002335b9c7
--- /dev/null
+++ b/dev-db/mongodb/mongodb-4.2.15-r1.ebuild
@@ -0,0 +1,176 @@
+# 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"
+       "${FILESDIR}/${PN}-5.0.2-glibc-2.34.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"
+}

Reply via email to