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/files/, dev-db/mongodb/
Date: Mon,  9 Nov 2020 14:11:53 +0000 (UTC)	[thread overview]
Message-ID: <1604931104.d234144d542c40aece724cf986d407c1c004d1aa.ultrabug@gentoo> (raw)

commit:     d234144d542c40aece724cf986d407c1c004d1aa
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Mon Nov  9 13:49:07 2020 +0000
Commit:     Alexys Jacob <ultrabug <AT> gentoo <DOT> org>
CommitDate: Mon Nov  9 14:11:44 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d234144d

dev-db/mongodb: bump to 4.4.1

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Alexys Jacob <ultrabug <AT> gentoo.org>

 dev-db/mongodb/Manifest                            |   1 +
 dev-db/mongodb/files/mongodb-4.4.1-boost.patch     |  23 +++
 dev-db/mongodb/files/mongodb-4.4.1-fix-scons.patch |  33 ++++
 .../mongodb/files/mongodb-4.4.1-no-compass.patch   |  56 +++++++
 .../mongodb/files/mongodb-4.4.1-unwind-gcc10.patch |  12 ++
 dev-db/mongodb/mongodb-4.4.1.ebuild                | 177 +++++++++++++++++++++
 6 files changed, 302 insertions(+)

diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest
index 24e0bd844d7..346f6a154fc 100644
--- a/dev-db/mongodb/Manifest
+++ b/dev-db/mongodb/Manifest
@@ -4,3 +4,4 @@ DIST mongodb-src-r4.0.19.tar.gz 50126414 BLAKE2B 2691e2a9c8833ff9a086b28fd137bc8
 DIST mongodb-src-r4.0.20.tar.gz 50160192 BLAKE2B 3395399791b0620d3852b5d0a2ab2419f08127d909fac52035dd2624eb22660069401e71b036f449d8fd46be03b9e48ee548fb0c327b67c1eecc72a6ee9045b8 SHA512 dc18216d9096520b309ff769898fb65cf26f765eb74e5e0517617bdb0732c456620bbce351be5ad9f89bc72fea0b6d3afe13bd4cffe2c2b4ea06c9cb2b3b1696
 DIST mongodb-src-r4.2.10.tar.gz 61800545 BLAKE2B 773f3da589107d932808c30ee3bd09ec006b1c570884fbe6929ea4767581e951fd32b1771e9adf1e392ef97bd4c0e2b4ce5ce30c8bbbfbd63aa36b6ebaa8cbe4 SHA512 3947b2880bc0aaa958f26dfddfe79c7878f389eeeb8d0783360667124d3b253928ef746433c260bf395a219d650a6907bbf712ef61da6137ab85e4e1ba38fcbd
 DIST mongodb-src-r4.2.8.tar.gz 61730247 BLAKE2B f1d98b8ac8f62c0c7aff100ef663bb20345de0e77e0ff420817db0843fe735b58af8075578a7f8d83cc9dc4e597c95ae09f89ce7a21cf8146ff15bcb11eba924 SHA512 163fce480762bd377d6c78b661bfe51fc883223a5309a68f9556e1bafb99e26e476d81dbe6de825d90469e835442be097be630ca9678e54b9d09091e0b5d67c4
+DIST mongodb-src-r4.4.1.tar.gz 49644743 BLAKE2B 7d84998c69b9b55164ebab04b49c38a4113a0f58d431612389ec37eb044fba1adf9284e9d4454bd40bb7a071fd042308a5cd350129d6d52480412cf6b868ec2b SHA512 16aa66995ea8cfe0cc47b96c1c5643a28ab47fc9f27bd93404cf572944ab30492df7c9255553f918b353cd7157a6ccde9ac6f58bfba322fb52c2d7409c6fb9b0

diff --git a/dev-db/mongodb/files/mongodb-4.4.1-boost.patch b/dev-db/mongodb/files/mongodb-4.4.1-boost.patch
new file mode 100644
index 00000000000..009ca6826a4
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-4.4.1-boost.patch
@@ -0,0 +1,23 @@
+diff --git a/SConstruct b/SConstruct
+index 89c044ab..0484e475 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -3511,17 +3511,11 @@ def doConfigure(myenv):
+             "BOOST_LOG_NO_SHORTHAND_NAMES",
+             "BOOST_LOG_USE_NATIVE_SYSLOG",
+             "BOOST_LOG_WITHOUT_THREAD_ATTR",
++            "BOOST_LOG_DYN_LINK",
+             "ABSL_FORCE_ALIGNED_ACCESS",
+         ]
+     )
+ 
+-    if link_model.startswith("dynamic") and not link_model == 'dynamic-sdk':
+-        conf.env.AppendUnique(
+-            CPPDEFINES=[
+-                "BOOST_LOG_DYN_LINK",
+-            ]
+-    )
+-
+     if use_system_version_of_library("boost"):
+         if not conf.CheckCXXHeader( "boost/filesystem/operations.hpp" ):
+             myenv.ConfError("can't find boost headers")

diff --git a/dev-db/mongodb/files/mongodb-4.4.1-fix-scons.patch b/dev-db/mongodb/files/mongodb-4.4.1-fix-scons.patch
new file mode 100644
index 00000000000..8b9d5d6d9fa
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-4.4.1-fix-scons.patch
@@ -0,0 +1,33 @@
+diff --git a/SConstruct b/SConstruct
+index 89c044ab..a6d02072 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -2064,7 +2064,6 @@ if env.TargetOSIs('posix'):
+     env.Append( CCFLAGS=["-fno-omit-frame-pointer",
+                          "-fno-strict-aliasing",
+                          "-fasynchronous-unwind-tables",
+-                         "-ggdb" if not env.TargetOSIs('emscripten') else "-g",
+                          "-pthread",
+                          "-Wall",
+                          "-Wsign-compare",
+@@ -2076,6 +2075,9 @@ if env.TargetOSIs('posix'):
+             env.Append( CCFLAGS=["-Werror"] )
+ 
+     env.Append( CXXFLAGS=["-Woverloaded-virtual"] )
++    env.Append( CXXFLAGS=os.environ['CXXFLAGS'] )
++    env.Append( LINKFLAGS=os.environ['LDFLAGS'] )
++
+     if env.ToolchainIs('clang'):
+         env.Append( CXXFLAGS=['-Werror=unused-result'] )
+ 
+@@ -2096,8 +2098,8 @@ if env.TargetOSIs('posix'):
+ 
+     env.Append( LIBS=[] )
+ 
+-    #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-4.4.1-no-compass.patch b/dev-db/mongodb/files/mongodb-4.4.1-no-compass.patch
new file mode 100644
index 00000000000..15a7f9534bc
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-4.4.1-no-compass.patch
@@ -0,0 +1,56 @@
+diff --git a/src/mongo/SConscript b/src/mongo/SConscript
+index 8acf5469..737c31d4 100644
+--- a/src/mongo/SConscript
++++ b/src/mongo/SConscript
+@@ -834,43 +834,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_type = 'compass'
+-
+-compass_script = "install_compass.in"
+-if env.TargetOSIs('windows'):
+-    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(
+-  target="$BUILD_DIR/mongo/installer/compass/" + compass_script[:-3],
+-  source='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("$DESTDIR/bin", compass_installer)
+-else:
+-    compass_script_installer = env.AutoInstall(
+-        target='$PREFIX_BINDIR',
+-        source=[
+-            compass_installer,
+-        ],
+-        AIB_COMPONENT='dist',
+-        AIB_ROLE='runtime',
+-    )
+-
+-if env.TargetOSIs('posix'):
+-    env.AddPostAction( compass_script_installer, 'chmod 755 $TARGET' )
+-    env.AddPostAction( compass_installer, 'chmod 755 $TARGET' )
+-
+ if not hygienic:
+     server_archive = env.Command(
+         target='#/${SERVER_ARCHIVE}',
+@@ -884,7 +847,6 @@ if not hygienic:
+                 '--transform $BUILD_DIR/mongo/stripped/db/modules/enterprise=$SERVER_DIST_BASENAME/bin',
+                 '--transform $BUILD_DIR/mongo/stripped=$SERVER_DIST_BASENAME/bin',
+                 '--transform $BUILD_DIR/mongo=$SERVER_DIST_BASENAME/bin',
+-                '--transform src/mongo/installer/compass=$SERVER_DIST_BASENAME/bin',
+                 '${TEMPFILE(SOURCES[1:])}'
+             ],
+         ),

diff --git a/dev-db/mongodb/files/mongodb-4.4.1-unwind-gcc10.patch b/dev-db/mongodb/files/mongodb-4.4.1-unwind-gcc10.patch
new file mode 100644
index 00000000000..a80f7e6474f
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-4.4.1-unwind-gcc10.patch
@@ -0,0 +1,12 @@
+diff --git a/src/third_party/unwind/SConscript b/src/third_party/unwind/SConscript
+index ed947c8e..7308956f 100644
+--- a/src/third_party/unwind/SConscript
++++ b/src/third_party/unwind/SConscript
+@@ -90,6 +90,7 @@ if env['TARGET_ARCH'] == 'aarch64':
+ 
+ env.Append(
+     CCFLAGS=[
++        '-fcommon',
+         '-fexceptions',
+         '-Wno-unused-result',
+         '-Wno-unused-value',

diff --git a/dev-db/mongodb/mongodb-4.4.1.ebuild b/dev-db/mongodb/mongodb-4.4.1.ebuild
new file mode 100644
index 00000000000..de14d8bf32c
--- /dev/null
+++ b/dev-db/mongodb/mongodb-4.4.1.ebuild
@@ -0,0 +1,177 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6..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"
+IUSE="debug kerberos libressl 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(+),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? (
+		!libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+		libressl? ( dev-libs/libressl:0= )
+	)"
+DEPEND="${RDEPEND}
+	${PYTHON_DEPS}
+	$(python_gen_any_dep '
+		test? ( dev-python/pymongo[${PYTHON_USEDEP}] dev-python/requests[${PYTHON_USEDEP}] )
+		>=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="tools? ( >=app-admin/mongo-tools-100 )"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-4.4.1-fix-scons.patch"
+	"${FILESDIR}/${PN}-4.4.1-no-compass.patch"
+	"${FILESDIR}/${PN}-4.4.1-unwind-gcc10.patch"
+	"${FILESDIR}/${PN}-4.4.1-boost.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.2; then
+			ewarn "To upgrade from a version earlier than the 4.2-series, you must"
+			ewarn "successively upgrade major releases until you have upgraded"
+			ewarn "to 4.2-series. Then upgrade to 4.4 series."
+		else
+			ewarn "Be sure to set featureCompatibilityVersion to 4.2 before upgrading."
+		fi
+	fi
+}
+
+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-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="${ED}"/usr escons "${scons_opts[@]}" --nostrip install-core
+}
+
+# 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() {
+	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"
+}


             reply	other threads:[~2020-11-09 14:11 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-09 14:11 Alexys Jacob [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-12-11  9:51 [gentoo-commits] repo/gentoo:master commit in: dev-db/mongodb/files/, dev-db/mongodb/ Sam James
2024-12-11  5:48 Sam James
2024-12-11  5:48 Sam James
2024-12-11  5:48 Sam James
2024-05-10 14:18 Alexys Jacob
2023-01-30  3:27 Sam James
2022-12-31 15:36 Sam James
2022-12-30 20:22 Sam James
2022-06-17 17:55 Sam James
2022-04-26 13:37 Alexys Jacob
2021-08-20 18:07 Alexys Jacob
2021-08-19 16:38 Alexys Jacob
2021-08-19 16:38 Alexys Jacob
2021-07-15 14:14 Thomas Deutschmann
2021-01-18 10:42 Alexys Jacob
2020-11-09 14:11 Alexys Jacob
2019-09-22 18:59 Alexys Jacob
2018-01-06 21:34 Alexys Jacob
2018-01-05 13:07 Alexys Jacob
2017-10-13  8:33 Alexys Jacob
2017-09-21 19:50 Patrice Clement
2017-07-31 12:14 Alexys Jacob
2016-10-21 18:50 David Seifert
2016-04-02 18:54 David Seifert
2015-12-31 14:07 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=1604931104.d234144d542c40aece724cf986d407c1c004d1aa.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