public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Alexys Jacob" <ultrabug@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/mongodb/, dev-db/mongodb/files/
Date: Thu, 28 Jun 2018 12:45:44 +0000 (UTC)	[thread overview]
Message-ID: <1530189918.2888da4e56bdd70a6fbbca59c8c1176edf1e3799.ultrabug@gentoo> (raw)

commit:     2888da4e56bdd70a6fbbca59c8c1176edf1e3799
Author:     Tomas Mozes <tmozes <AT> sygic <DOT> com>
AuthorDate: Thu Jun 28 10:44:16 2018 +0000
Commit:     Alexys Jacob <ultrabug <AT> gentoo <DOT> org>
CommitDate: Thu Jun 28 12:45:18 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2888da4e

dev-db/mongodb: bump to 4.0.0

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 dev-db/mongodb/Manifest                            |   1 +
 .../mongodb/files/mongodb-4.0.0-no-compass.patch   |  57 +++++++
 dev-db/mongodb/mongodb-4.0.0.ebuild                | 170 +++++++++++++++++++++
 3 files changed, 228 insertions(+)

diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest
index d9824f06bd3..4fc4f86c8f1 100644
--- a/dev-db/mongodb/Manifest
+++ b/dev-db/mongodb/Manifest
@@ -9,3 +9,4 @@ DIST mongodb-src-r3.6.2.tar.gz 39999539 BLAKE2B 3e38917ebaf79b63bf054279fbb91a64
 DIST mongodb-src-r3.6.3.tar.gz 40093607 BLAKE2B bb21bf0487661eec6140ade22526617b26b2499bd36e138d955d14a4b13a0685ec7308bccfc11ef17c785cd8a71c5b6cd9d154d461b8973410b03952b93953ec SHA512 94aa9955f99d5f6bbbe65dc3755583952525398308ca7cb9224b91d1fa403de5bb3abb63a651583815cbecaff58966b5cfe7334a36ef6583f73d8c213410ddbc
 DIST mongodb-src-r3.6.4.tar.gz 40159916 BLAKE2B d3878d4e6bbf331de672768b2c92a4d71f758232170432d757f7e61849e6e1ef3b190e6a089101c9ea23c4ce23087c684c86fc6ea0f32f6fe052ce322d47e438 SHA512 02c2a697af9fdcbb16d19792be17d987e18c684418a63ed4750471c7ec22eb2eabf84e93cb1d298f67898b7e23687f668bb333c50ffc4e1b8adf8859f856ad95
 DIST mongodb-src-r3.6.5.tar.gz 40310152 BLAKE2B 72110ae47b17ec8b1f60636a5ef8491b076e1cc019513fd872ea38b3bb8393efff4bddc7b795b3da711f258d21be9fa23e24d396a9429349c51ce05fff180a53 SHA512 6ecb3140ee4a7929fabe62d698f23e87cb5030cf31abefe7f82374f407fb87dc05f712089998f96bc40e23698836a86e7f3590892bde9d2d6f2c4bcc15cc3ebf
+DIST mongodb-src-r4.0.0.tar.gz 49138467 BLAKE2B 616e267c737729103de544d82db60489e7a32c5f9847ffd2d643a9025c18aa867718216f5de9f18a93fb2a7930c3dbe9ec3850eef09dbec084570328a99f2865 SHA512 11d00cdde606cfea268471cffccedb6d003e421aeffda2303aff4d4126c386aaec50a1de733d7a1d5fb6605403cf9f2218dae50374c7b5e8625fa80317804589

diff --git a/dev-db/mongodb/files/mongodb-4.0.0-no-compass.patch b/dev-db/mongodb/files/mongodb-4.0.0-no-compass.patch
new file mode 100644
index 00000000000..35e9c172e9e
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-4.0.0-no-compass.patch
@@ -0,0 +1,57 @@
+diff --git a/src/mongo/SConscript b/src/mongo/SConscript
+index c8f925b7..0e4f99ad 100644
+--- a/src/mongo/SConscript
++++ b/src/mongo/SConscript
+@@ -671,44 +671,6 @@ for full_dir, archive_dir in env["ARCHIVE_ADDITION_DIR_MAP"].items():
+ for target in env["DIST_BINARIES"]:
+     installBinary(env, "db/modules/" + target)
+ 
+-# Set the download url to the right place
+-compass_type = 'compass-community'
+-if 'enterprise' in env['MONGO_MODULES']:
+-    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"):
+@@ -726,7 +688,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.0.ebuild b/dev-db/mongodb/mongodb-4.0.0.ebuild
new file mode 100644
index 00000000000..2b90de08741
--- /dev/null
+++ b/dev-db/mongodb/mongodb-4.0.0.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+SCONS_MIN_VERSION="2.5.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M"
+CHECKREQS_MEMORY="1024M"
+
+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="https://www.mongodb.com"
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug kerberos libressl mms-agent ssl test +tools"
+
+RDEPEND=">=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:=
+	mms-agent? ( app-admin/mms-agent )
+	ssl? (
+		!libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+		libressl? ( dev-libs/libressl:0= )
+	)"
+DEPEND="${RDEPEND}
+	${PYTHON_DEPS}
+	dev-python/cheetah[${PYTHON_USEDEP}]
+	dev-python/pyyaml[${PYTHON_USEDEP}]
+	dev-python/typing[${PYTHON_USEDEP}]
+	<dev-util/scons-3
+	sys-libs/ncurses
+	sys-libs/readline
+	debug? ( dev-util/valgrind )
+	kerberos? ( dev-libs/cyrus-sasl[kerberos] )
+	test? (
+		dev-python/pymongo[${PYTHON_USEDEP}]
+	)"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
+	"${FILESDIR}/${PN}-3.6.1-fix-scons.patch"
+	"${FILESDIR}/${PN}-4.0.0-no-compass.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+pkg_pretend() {
+	if [[ -n ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 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."
+	elif [[ -n ${REPLACING_VERSIONS} ]]; then
+		ewarn "Be sure to set featureCompatibilityVersion to 3.6 before upgrading."
+	fi
+}
+
+pkg_setup() {
+	enewgroup mongodb
+	enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+	python-single-r1_pkg_setup
+}
+
+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 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
+
+	local x
+	for x in /var/{lib,log}/${PN}; do
+		keepdir "${x}"
+		fowners mongodb:mongodb "${x}"
+		fperms 0750 "${x}"
+	done
+
+	doman debian/mongo*.1
+	dodoc README docs/building.md
+
+	newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
+	newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+	newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
+	newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
+
+	insinto /etc
+	newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+	newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.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}
+}
+
+pkg_preinst() {
+	# wrt bug #461466
+	if [[ "$(get_libdir)" == "lib64" ]]; then
+		rmdir "${ED}"/usr/lib/ &>/dev/null
+	fi
+}
+
+pkg_postinst() {
+	ewarn "Make sure to read the release notes and follow the upgrade process:"
+	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"
+}


             reply	other threads:[~2018-06-28 12:45 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-28 12:45 Alexys Jacob [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-07-15  4:22 [gentoo-commits] repo/gentoo:master commit in: dev-db/mongodb/, dev-db/mongodb/files/ Sam James
2024-05-30  6:46 Alexys Jacob
2024-05-28  1:45 Sam James
2023-05-23 13:32 Sam James
2023-05-16  7:53 Alexys Jacob
2022-12-30 20:22 Sam James
2022-06-18 17:17 Sam James
2022-05-14 21:50 Sam James
2022-05-14 21:27 Sam James
2021-08-19 16:38 Alexys Jacob
2019-09-21 21:22 David Seifert
2019-08-21  7:21 Alexys Jacob
2019-08-09  7:28 Alexys Jacob
2018-11-05 12:33 Alexys Jacob
2018-01-11 11:34 Alexys Jacob
2017-09-22  9:28 Patrice Clement
2017-09-21 19:50 Patrice Clement
2017-09-05  8:17 David Seifert
2017-07-26 22:17 Zac Medico
2017-01-11  7:43 Alexys Jacob
2016-01-03 12:27 Alexys Jacob
2016-01-01 10:36 Michał Górny
2015-12-27 16:59 Alexys Jacob

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1530189918.2888da4e56bdd70a6fbbca59c8c1176edf1e3799.ultrabug@gentoo \
    --to=ultrabug@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox