From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6A35F158CB7 for ; Thu, 19 Aug 2021 16:38:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BE333E078A; Thu, 19 Aug 2021 16:38:22 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9ADDCE078A for ; Thu, 19 Aug 2021 16:38:22 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 30582341538 for ; Thu, 19 Aug 2021 16:38:21 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3400A8CB for ; Thu, 19 Aug 2021 16:38:18 +0000 (UTC) From: "Alexys Jacob" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alexys Jacob" Message-ID: <1629391094.8fc9f41c5d7489794e250404fc25f92e644cca4b.ultrabug@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/mongodb/files/, dev-db/mongodb/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-db/mongodb/Manifest dev-db/mongodb/files/mongodb-5.0.3-fix-scons.patch dev-db/mongodb/files/mongodb-5.0.3-no-compass.patch dev-db/mongodb/files/mongodb-5.0.3-skip-no-exceptions.patch dev-db/mongodb/files/mongodb-5.0.3-skip-reqs-check.patch dev-db/mongodb/metadata.xml dev-db/mongodb/mongodb-5.0.2.ebuild X-VCS-Directories: dev-db/mongodb/ dev-db/mongodb/files/ X-VCS-Committer: ultrabug X-VCS-Committer-Name: Alexys Jacob X-VCS-Revision: 8fc9f41c5d7489794e250404fc25f92e644cca4b X-VCS-Branch: master Date: Thu, 19 Aug 2021 16:38:18 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 63b7dd4f-357b-4aef-85e7-a210a4e338b8 X-Archives-Hash: 10bbb5b7bb21aa4224faaf1caddc9f24 commit: 8fc9f41c5d7489794e250404fc25f92e644cca4b Author: Tomáš Mózes gmail com> AuthorDate: Sat Aug 7 08:28:54 2021 +0000 Commit: Alexys Jacob gentoo org> CommitDate: Thu Aug 19 16:38:14 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8fc9f41c dev-db/mongodb: bump to 5.0.2 - Optional dep on new mongosh - Skip tests as they now require new python packages Signed-off-by: Tomáš Mózes gmail.com> Signed-off-by: Alexys Jacob gentoo.org> dev-db/mongodb/Manifest | 1 + dev-db/mongodb/files/mongodb-5.0.3-fix-scons.patch | 32 ++++ .../mongodb/files/mongodb-5.0.3-no-compass.patch | 12 ++ .../files/mongodb-5.0.3-skip-no-exceptions.patch | 13 ++ .../files/mongodb-5.0.3-skip-reqs-check.patch | 24 +++ dev-db/mongodb/metadata.xml | 1 + dev-db/mongodb/mongodb-5.0.2.ebuild | 173 +++++++++++++++++++++ 7 files changed, 256 insertions(+) diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest index 543106b91b7..4d6584e3ab8 100644 --- a/dev-db/mongodb/Manifest +++ b/dev-db/mongodb/Manifest @@ -5,3 +5,4 @@ DIST mongodb-src-r4.4.1.tar.gz 49644743 BLAKE2B 7d84998c69b9b55164ebab04b49c38a4 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 DIST mongodb-src-r4.4.8.tar.gz 50492854 BLAKE2B 4776b17e88104879ea69468ff277b07dc317d936654bb26c69750e0aaf8f51bea73994e7fc4841228d8506db392e0454b5fd16257071b86a2e4ad34e90f33632 SHA512 9b0cd81c9c731255a6c079c040ed342a51a72e3ea72047d3ae959c0afde50b0cdb1fcfe7fcbea30c449a3618a09d213752277cee6eb9bc0a55915b9229543606 +DIST mongodb-src-r5.0.2.tar.gz 54527477 BLAKE2B f71102f4c2711074498c288817ee06156cb030ee647541f6604582b918fb75239cc5a551c08b745b6296a2693d2a1ac28d94c1365b86bc508257b9d42142612a SHA512 179d57a0a12c5c23e54208c262edff6976f509324be8ad68d6761997dc702534f618dea1a24568fdb2d716359762e64da54e2d152a685447b4e0450996bf2154 diff --git a/dev-db/mongodb/files/mongodb-5.0.3-fix-scons.patch b/dev-db/mongodb/files/mongodb-5.0.3-fix-scons.patch new file mode 100644 index 00000000000..2d1a2f9312b --- /dev/null +++ b/dev-db/mongodb/files/mongodb-5.0.3-fix-scons.patch @@ -0,0 +1,32 @@ +diff --git a/SConstruct b/SConstruct +index 115de78a..613110b7 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -2366,7 +2366,6 @@ if env.TargetOSIs('posix'): + + # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used. + env.Append( CCFLAGS=["-fasynchronous-unwind-tables", +- "-ggdb" if not env.TargetOSIs('emscripten') else "-g", + "-Wall", + "-Wsign-compare", + "-Wno-unknown-pragmas", +@@ -2422,6 +2421,8 @@ if env.TargetOSIs('posix'): + + # env.Append( " -Wconversion" ) TODO: this doesn't really work yet + env.Append( CXXFLAGS=["-Woverloaded-virtual"] ) ++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] ) ++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] ) + + # On OS X, clang doesn't want the pthread flag at link time, or it + # issues warnings which make it impossible for us to declare link +@@ -2473,8 +2474,8 @@ if env.TargetOSIs('posix'): + ], + ) + +- #make scons colorgcc friendly +- for key in ('HOME', 'TERM'): ++ #make scons colorgcc, distcc, ccache friendly ++ for key in ('HOME', 'PATH', 'TERM'): + try: + env['ENV'][key] = os.environ[key] + except KeyError: diff --git a/dev-db/mongodb/files/mongodb-5.0.3-no-compass.patch b/dev-db/mongodb/files/mongodb-5.0.3-no-compass.patch new file mode 100644 index 00000000000..77725157729 --- /dev/null +++ b/dev-db/mongodb/files/mongodb-5.0.3-no-compass.patch @@ -0,0 +1,12 @@ +diff --git a/src/mongo/installer/SConscript b/src/mongo/installer/SConscript +index 5bd89fe9..489e70ac 100644 +--- a/src/mongo/installer/SConscript ++++ b/src/mongo/installer/SConscript +@@ -7,7 +7,6 @@ env = env.Clone() + + env.SConscript( + dirs=[ +- 'compass', + 'msi', + ], + exports=[ diff --git a/dev-db/mongodb/files/mongodb-5.0.3-skip-no-exceptions.patch b/dev-db/mongodb/files/mongodb-5.0.3-skip-no-exceptions.patch new file mode 100644 index 00000000000..ae69befcea8 --- /dev/null +++ b/dev-db/mongodb/files/mongodb-5.0.3-skip-no-exceptions.patch @@ -0,0 +1,13 @@ +diff --git a/SConstruct b/SConstruct +index 613110b7..4987e24e 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -2958,7 +2958,7 @@ def doConfigure(myenv): + + # This warning was added in clang-5 and incorrectly flags our implementation of + # exceptionToStatus(). See https://bugs.llvm.org/show_bug.cgi?id=34804 +- AddToCCFLAGSIfSupported(myenv, "-Wno-exceptions") ++ #AddToCCFLAGSIfSupported(myenv, "-Wno-exceptions") + + # Enable sized deallocation support. + AddToCXXFLAGSIfSupported(myenv, '-fsized-deallocation') diff --git a/dev-db/mongodb/files/mongodb-5.0.3-skip-reqs-check.patch b/dev-db/mongodb/files/mongodb-5.0.3-skip-reqs-check.patch new file mode 100644 index 00000000000..823d481c208 --- /dev/null +++ b/dev-db/mongodb/files/mongodb-5.0.3-skip-reqs-check.patch @@ -0,0 +1,24 @@ +diff --git a/buildscripts/scons.py b/buildscripts/scons.py +index 534fca32..c38f64df 100755 +--- a/buildscripts/scons.py ++++ b/buildscripts/scons.py +@@ -19,13 +19,13 @@ SITE_TOOLS_DIR = os.path.join(MONGODB_ROOT, 'site_scons') + sys.path = [SCONS_DIR, SITE_TOOLS_DIR] + sys.path + + # pylint: disable=C0413 +-from mongo.pip_requirements import verify_requirements, MissingRequirements ++#from mongo.pip_requirements import verify_requirements, MissingRequirements + +-try: +- verify_requirements('etc/pip/compile-requirements.txt') +-except MissingRequirements as ex: +- print(ex) +- sys.exit(1) ++#try: ++# verify_requirements('etc/pip/compile-requirements.txt') ++#except MissingRequirements as ex: ++# print(ex) ++# sys.exit(1) + + try: + import SCons.Script diff --git a/dev-db/mongodb/metadata.xml b/dev-db/mongodb/metadata.xml index a12b5966959..77ae5030358 100644 --- a/dev-db/mongodb/metadata.xml +++ b/dev-db/mongodb/metadata.xml @@ -15,6 +15,7 @@ Adds support for link time optimization + Install the MongoDB shell from app-admin/mongosh-bin Install the MongoDB tools (mongoimport, mongodump...) from app-admin/mongo-tools diff --git a/dev-db/mongodb/mongodb-5.0.2.ebuild b/dev-db/mongodb/mongodb-5.0.2.ebuild new file mode 100644 index 00000000000..2976e876c8f --- /dev/null +++ b/dev-db/mongodb/mongodb-5.0.2.ebuild @@ -0,0 +1,173 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{8..9} ) + +SCONS_MIN_VERSION="3.3.1" +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 -riscv" +IUSE="debug kerberos lto mongosh ssl +tools" + +# https://github.com/mongodb/mongo/wiki/Test-The-Mongodb-Server +# resmoke needs python packages not yet present in Gentoo +RESTRICT="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(+),nls] + >=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 ' + >=dev-util/scons-3.1.1[${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=" + mongosh? ( app-admin/mongosh-bin ) + tools? ( >=app-admin/mongo-tools-100 ) +" + +PATCHES=( + "${FILESDIR}/${PN}-4.4.1-boost.patch" + "${FILESDIR}/${PN}-4.4.1-gcc11.patch" + "${FILESDIR}/${PN}-5.0.3-fix-scons.patch" + "${FILESDIR}/${PN}-5.0.3-no-compass.patch" + "${FILESDIR}/${PN}-5.0.3-skip-no-exceptions.patch" + "${FILESDIR}/${PN}-5.0.3-skip-reqs-check.patch" +) + +S="${WORKDIR}/${MY_P}" + +python_check_deps() { + 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.4; then + ewarn "To upgrade from a version earlier than the 4.4-series, you must" + ewarn "successively upgrade major releases until you have upgraded" + ewarn "to 4.4-series. Then upgrade to 5.0 series." + else + ewarn "Be sure to set featureCompatibilityVersion to 4.4 before upgrading." + fi + fi +} + +src_prepare() { + default + + # remove bundled libs + rm -r src/third_party/{boost,pcre-*,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 + --jobs="$(makeopts_jobs)" + --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() { + PREFIX="${EPREFIX}/usr" ./buildscripts/scons.py "${scons_opts[@]}" install-core || die +} + +src_install() { + dobin build/install/bin/{mongo,mongod,mongos} + + 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" +}