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 4FCD31382C5 for ; Thu, 15 Feb 2018 15:02:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9A2E8E081E; Thu, 15 Feb 2018 15:02:06 +0000 (UTC) Received: from smtp.gentoo.org (dev.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 6C05FE081E for ; Thu, 15 Feb 2018 15:02:06 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 EC8C3335C39 for ; Thu, 15 Feb 2018 15:02:04 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 463451C5 for ; Thu, 15 Feb 2018 15:02:03 +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: <1518706909.1309205004f9e99a0cf1c2d30eb9688925fdb698.ultrabug@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/mongodb/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-db/mongodb/mongodb-3.4.13.ebuild X-VCS-Directories: dev-db/mongodb/ X-VCS-Committer: ultrabug X-VCS-Committer-Name: Alexys Jacob X-VCS-Revision: 1309205004f9e99a0cf1c2d30eb9688925fdb698 X-VCS-Branch: master Date: Thu, 15 Feb 2018 15:02:03 +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-Archives-Salt: 72a043df-3a16-4476-af70-c658a5e9f97b X-Archives-Hash: a84608e0e8ffea58053579ad8384881c commit: 1309205004f9e99a0cf1c2d30eb9688925fdb698 Author: Tomas Mozes gmail com> AuthorDate: Wed Feb 14 15:30:02 2018 +0000 Commit: Alexys Jacob gentoo org> CommitDate: Thu Feb 15 15:01:49 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13092050 dev-db/mongodb: improve ebuild Package-Manager: Portage-2.3.24, Repoman-2.3.6 Closes: https://github.com/gentoo/gentoo/pull/7184 dev-db/mongodb/mongodb-3.4.13.ebuild | 102 +++++++++++++---------------------- 1 file changed, 38 insertions(+), 64 deletions(-) diff --git a/dev-db/mongodb/mongodb-3.4.13.ebuild b/dev-db/mongodb/mongodb-3.4.13.ebuild index f13cbc11f44..3869755fe9f 100644 --- a/dev-db/mongodb/mongodb-3.4.13.ebuild +++ b/dev-db/mongodb/mongodb-3.4.13.ebuild @@ -10,12 +10,12 @@ CHECKREQS_DISK_BUILD="2400M" CHECKREQS_DISK_USR="512M" CHECKREQS_MEMORY="1024M" -inherit eutils flag-o-matic multilib multiprocessing pax-utils python-any-r1 scons-utils systemd toolchain-funcs user versionator check-reqs +inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user versionator MY_P=${PN}-src-r${PV/_rc/-rc} DESCRIPTION="A high-performance, open source, schema-free document-oriented database" -HOMEPAGE="http://www.mongodb.org" +HOMEPAGE="https://www.mongodb.com" SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz" LICENSE="AGPL-3 Apache-2.0" @@ -36,16 +36,15 @@ RDEPEND=">=app-arch/snappy-1.1.3 libressl? ( dev-libs/libressl:0= ) )" DEPEND="${RDEPEND} - =dev-lang/python-2* + ${PYTHON_DEPS} =sys-devel/gcc-5.3.0:* sys-libs/ncurses sys-libs/readline debug? ( dev-util/valgrind ) kerberos? ( dev-libs/cyrus-sasl[kerberos] ) test? ( - dev-python/pymongo - dev-python/pyyaml + dev-python/pymongo[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] )" PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )" @@ -58,8 +57,8 @@ PATCHES=( S=${WORKDIR}/${MY_P} pkg_pretend() { - if [[ ${REPLACING_VERSIONS} < 3.0 ]]; then - ewarn "To upgrade from a version earlier than the 3.0-series, you must" + if [[ -n ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.2 ]]; then + ewarn "To upgrade from a version earlier than the 3.2-series, you must" ewarn "successively upgrade major releases until you have upgraded" ewarn "to 3.2-series. Then upgrade to 3.4 series." fi @@ -69,10 +68,20 @@ pkg_setup() { enewgroup mongodb enewuser mongodb -1 -1 /var/lib/${PN} mongodb - # Maintainer notes - # + python-single-r1_pkg_setup +} + +src_prepare() { + default + + # remove bundled libs + rm -rv src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || 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: - # https://www.mongodb.org/about/contributors/tutorial/build-mongodb-from-source/ scons_opts=( CC="$(tc-getCC)" @@ -87,38 +96,32 @@ pkg_setup() { --use-system-zlib ) - if use debug; then - scons_opts+=( --dbg=on ) - fi - - if use prefix; then - scons_opts+=( - --cpppath="${EPREFIX}/usr/include" - --libpath="${EPREFIX}/usr/$(get_libdir)" - ) - fi - - if use kerberos; then - scons_opts+=( --use-sasl-client ) - fi + use debug && scons_opts+=( --dbg=on ) + use kerberos && scons_opts+=( --use-sasl-client ) + use ssl && scons_opts+=( --ssl ) - if use ssl; then - scons_opts+=( --ssl ) - fi - - python-any-r1_pkg_setup -} - -src_compile() { # 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() { + # this one test fails + rm jstests/core/jsHeapLimit.js || die + + "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed" +} + src_install() { escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr @@ -157,37 +160,8 @@ pkg_preinst() { fi } -# FEATURES="test -usersandbox" emerge dev-db/mongodb -src_test() { - # this one test fails - rm jstests/core/jsHeapLimit.js || die - - "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed" -} - pkg_postinst() { - local v - for v in ${REPLACING_VERSIONS}; do - if ! version_is_at_least 3.0 ${v}; then - ewarn "!! IMPORTANT !!" - ewarn " " - ewarn "${PN} configuration files have changed !" - ewarn " " - ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf" - ewarn " http://docs.mongodb.org/manual/reference/configuration-options/" - ewarn " " - ewarn "Make sure you also follow the upgrading process :" - ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/" - ewarn " " - ewarn "MongoDB 3.0 introduces the WiredTiger storage engine." - ewarn "WiredTiger is incompatible with MMAPv1 and you need to dump/reload your data if you want to use it." - ewarn "Once you have your data dumped, you need to set storage.engine: wiredTiger in /etc/${PN}.conf" - ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/#change-storage-engine-to-wiredtiger" - break - fi - done - ewarn "Make sure to read the release notes and follow the upgrade process:" - ewarn " https://docs.mongodb.org/manual/release-notes/3.4/" - ewarn " https://docs.mongodb.com/manual/release-notes/3.4/#upgrade-procedures" + ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/" + ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/#upgrade-procedures" }