From 0620d9b9937346e43890ecfb8c0dbe2ca52f4e86 Mon Sep 17 00:00:00 2001 From: Stuart Shelton Date: Wed, 14 Feb 2018 20:34:44 +0000 Subject: Add dev-db/mongodb-3.4.10 --- dev-db/mongodb/Manifest | 4 + dev-db/mongodb/files/mongodb-3.4.0-fix-scons.patch | 35 ++++ .../files/mongodb-3.4.7-no-boost-check.patch | 13 ++ dev-db/mongodb/mongodb-3.4.10.ebuild | 221 +++++++++++++++++++++ 4 files changed, 273 insertions(+) create mode 100644 dev-db/mongodb/files/mongodb-3.4.0-fix-scons.patch create mode 100644 dev-db/mongodb/files/mongodb-3.4.7-no-boost-check.patch create mode 100644 dev-db/mongodb/mongodb-3.4.10.ebuild (limited to 'dev-db') diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest index db6ac254..2e2531f4 100644 --- a/dev-db/mongodb/Manifest +++ b/dev-db/mongodb/Manifest @@ -4,7 +4,9 @@ AUX mongodb-3.2.0-fix-scons.patch 1738 SHA256 1f269f83a0c5c1a44749ef35dd803b8f43 AUX mongodb-3.2.10-boost-1.62.patch 702 SHA256 bf373d1514b7947dc4747e11babf87a4bd8e7d581781c6771a844e69c1c4d273 SHA512 79edfd1a6eaba597b31a82e54722dccab288d8b8840a53f79140b5fca221b5acd9fbc770d99e46ea9fa0da502cdf18dd35d982c95a4aa341806c3d8b61fc732f WHIRLPOOL 4c489e4a5f058873ec6b9215610fd20a73c733699856141b68e6c717977f9620f3723d2c40436cd4963b96ae49dadb6e0227b5368df5a08871cc70d9b12e60f5 AUX mongodb-3.2.16-Replace-string-with-explicit-std-string.patch 12636 SHA256 c55afdf1ba8d513b7e1ee68ce895c20d45e5eb20666c72cbc982a6fd997fc61d SHA512 43a610b0c37c74576ef3e3df3734c4d9d904271dd3853003ff439f61099666a356ed5d4f046573a753c652dfe1e1c1607b1abe041482b740fe828f543272646c WHIRLPOOL a65574dc682ab6399d7a8f43501a13546e8aaffce786434d18585f41e9a7820d5e1dd9d41325d7517e0ca49311770b4d4d0d981d29689769ee64928bf042d79d AUX mongodb-3.2.4-boost-1.60.patch 3352 SHA256 c473a461950dd1397b4fa22af8e2e779925847de56fd50e6d525f3bcfb8b3d75 SHA512 260c3edc3a04f3fae9f18fb73b3ae027709aa019751627d1a24b2ee40a72f91ef9de64606aff32c0890861fc56ae3c80341ba87cd16fffdd009b4fa5089c70db WHIRLPOOL d952fd59365a9b85e92774052fc5a9324f1c0e916cf9ad0fb1723da1e88772a3ec0d6f6eb15dd73527597502fb466b7424671e087943bb6bb13185bf3d0c468c +AUX mongodb-3.4.0-fix-scons.patch 1411 SHA256 d7f04f05dc540d992b355a0c4ea6e45a50116526af9e9d887120ce6027248958 SHA512 2e29c91a22663259d2f5413fbb2652702bceb122899e50a8969fb82d74a64a78649e79b005e20e6640740c089b1cee19080890eb8d9344c2ce355a977146b770 WHIRLPOOL 6619adf75585676a89c263d9f6964c9b37dbc9e22df1f49cb594e0ce8be3c5ff9f41437590549723f89cf5dd44624f4df73cb01cd5911b7ecf90208e8af93a06 AUX mongodb-3.4.6-sysmacros-include.patch 1419 SHA256 9ef54b5e58aab228b4ff97374815c8c508be06f6caaabaff295c3f9dc9fe148b SHA512 ab269ec003b74848f981021f5eb09e38216d75dd9d1b8a155068b2a335d9ec9d1f5f575028ae9b4b0d8745d15e464cb05b70aabc6c28c984115574c6747afc05 WHIRLPOOL eaa5a1ff6e4cccdfa20233a22da5ba3453d66bc16f86f370f2750453cdf5bd8ce81160e6c29abd972a95eb1d00f944408328653314b38000c78dd086d5e84e72 +AUX mongodb-3.4.7-no-boost-check.patch 641 SHA256 320763c670703418016b1f0cc176c51fdd28daff2eb7d5cf6f8de759f549fbde SHA512 812eaaadb6f265cfc904e8f3a7ae8276e42e3968529914179efab5e44f1951ab46ac3bbcfb259f924b20a8ca61d2ebcf72b7103ea9d5f25594ff8e9e3e85836b WHIRLPOOL bd3534095ac829466231bc256deca4ff57d27b53a49e1b4d74fce46518263e51bf11f956f8235c759f216c59f421d35b4f144c16b096e7ec4eb768cc2cd395ad AUX mongodb.conf-r2 698 SHA256 780fa095f5eacee59f3f683f225fe545c8ec93a27157894885d5f4656a6ae15a SHA512 15480651b5e7b1927b95d633193aee08def71e2f9ef6438f93972e359b2605e51ce6f071f5fd64b73b2bf4db58710a04634a36144db2c2e585588098d69b66fb WHIRLPOOL 2d2d2bf793ae5b1c7c27be227001c3eeb1a76cd620ce8e3882e7d43f10625df8c21d8452dabeef4b8cb750246436d57ad900f915aadd74dcc02c9341ab5d343b AUX mongodb.conf-r3 722 SHA256 b4009296b3e794fa1686aec0502b01431e94fc4754cb66d1f00bad64dcb24e72 SHA512 ef193bfed673477aa0e868114bd52be6675492c164f218c71ccd02c4a620b5c4799ea1d18df0c3f2b364027b9f25e60ac4475bb216b25e1dc10bfd00a9f5d45d WHIRLPOOL f536abc8102f20c94bf19c9691345a31eaed84768a413d508437b0aab5100e36cb29f193e0d90e1b76d13892789bd9a9bd815d0f76491df0db375315df7a135e AUX mongodb.confd-r2 553 SHA256 8c13285096a8f87dcdb31e5c324143f59caeb92dac4c704d5b597bf47ed1f013 SHA512 eeaec4e10c5a461dd392254243c7bbc57367e4a9bd683e8788e0bd8cfe6ccb4df2033a359d6aaa864f893d7851eed7af44ef9c46905e480e26702f8fdb08e35b WHIRLPOOL 80827a813915a8ebc62a08211ad34d16389efe80dc959d45c6a9e627d8021eb8c10fc88a626f3ecf605c22a0ae85fb0e024d4ece77db022297dd352fd34aada2 @@ -21,5 +23,7 @@ AUX mongos.initd-r3 426 SHA256 c8d87839a16174211519b0d52bf8a14c714294dcd80246494 DIST firefox-38.8.0esr.source.tar.bz2 181198635 SHA256 9475adcee29d590383c4885bc5f958093791d1db4302d694a5d2766698f59982 SHA512 fcd2497a60176b8403a1793d1ad0a1c96a0a60217c2d4d7acd0506abf6810892bd51fd113d8f952f92b20032efc539a6b1233d8d124c2eb72d726b0935c04d65 WHIRLPOOL cbc170093bbc1403a4112e5a1a73ceeda4d0ab86dc02697b4010097a612124652e8ad27ae33bca056a5d1f8450239a98b746ff983ab4a0db010e10c815781d8d DIST mongodb-src-r3.0.14.tar.gz 28093922 SHA256 ebbb758ca7ee53e8d25e2410bb7ef61640829566d094cde2487b55e73d0fd880 SHA512 477fab29ca0ad2a0f24b895e30dc4770af8d6a1a57f3c10a02a989b58dd22510db554da0418129d4e81958342ad169696eed4b86bf5aa73916c7cec879db1152 WHIRLPOOL 7fc02969c52954f0fd9b90ace9efd3677a9d6b8d3618b5dedb470343a3ba71789d451cc30a95742b2b9e61b21ffe0f1a23e239e388a497a327f2cc8ed1ed6aef DIST mongodb-src-r3.2.16.tar.gz 29293555 SHA256 7a8b1b16f3fa545af16f48aeef1f918f57d96a80e1ceb6e669cdb81fab6511d0 SHA512 ba57aae430959f7df036b7e19e1b7d81956184bededd35631616c6e3dc9423dc79a50ab3265bc48b06d198a7043bca902aee2ea75954e38151ebead5b5ab2db2 WHIRLPOOL 0ac7b7cfae8b8b3727dc722c616eb576b3ae3aced5340b9fbd9a995d9f55552411c0507cb43a7378fa35187cf940d72d86ee20d08762f87bb4ebcd13eb697f09 +DIST mongodb-src-r3.4.10.tar.gz 39959937 SHA256 443800ca4f52fa613b29052f5f76abc0ccc477451b55f3665b61819f28ace2f3 SHA512 6293dde40a8433477ba3b1cf77abbdb32b28ce58279cc616b488647c8ab71b5ab3eab2146058c4a74b9e00f0938f1415020e2f26ea01f2b29dd78a1a38d58c3a WHIRLPOOL 3cd03fecfc1fa077f55d9961e939d89e347ae5f41c815d81a50b88ddef9c8900f41faec6ae71b759f9f665c8a706fdd3000e96c3047711237f0d66478edbf35e EBUILD mongodb-3.0.14.ebuild 4886 SHA256 60b7037dc3f6634e481174efc1319e5324ac9c247ddc163a8b940de0af8e7bdd SHA512 5a8f632a5c0597d10abaf4044b89db063b3d32f24d766326a096bb0a39bc0b66eabb32b78fcca2929b6f5f839843e4c0e4e6fd7d31d546c9cf94a1498c552d62 WHIRLPOOL 1cce3832ad62aad4eb0ebf76fd7f2c402d100285f0b319cb07dba9c773ad720e16fa6680f417d3eb8bd512cfe2e59a863f48f65a1412c400fb33d0d174102376 EBUILD mongodb-3.2.16.ebuild 6208 SHA256 c91c839e07277b4e88652e2b789deb94b44a57367701b197e389fb6dcb15d7dc SHA512 0b197a4b091f171afb0ac6327cdde29e14208c73e346831f2bb77cd4ceb95a1b3ba1f49eac054cc4716695a69cf165b4209fea8db57d9eab8499962e9d62604e WHIRLPOOL 3c81a7bb0d853b2ba07a5252450a310700fb58a03cf613af371caf79383824517cf00654c1c081b105614a87ae0b69260ee5da58c17fa125cd2ee5752d03379b +EBUILD mongodb-3.4.10.ebuild 6265 SHA256 684f878a6315f74e59002df3651d3dddebe3bb202adbdd744689c84d839a3296 SHA512 c8a48590190a18e6d862dd0b19ec5ffeacf2396eba8ddd1eab2e9a4ff4f8e6aa3ca91820efd351b41744c0cc6e0c61e5b71b4ea04f81c22af924c26f44b94521 WHIRLPOOL dd03adc168776d5014cc70673ff1c2789eada2360246ba4b23d23e3d294c37dbc54b57cf4240bc02c6a34f58462e8bc6257269399d5abc65b90e109972f81566 diff --git a/dev-db/mongodb/files/mongodb-3.4.0-fix-scons.patch b/dev-db/mongodb/files/mongodb-3.4.0-fix-scons.patch new file mode 100644 index 00000000..2dd751fa --- /dev/null +++ b/dev-db/mongodb/files/mongodb-3.4.0-fix-scons.patch @@ -0,0 +1,35 @@ +--- a/SConstruct 2016-12-27 11:10:06.801949538 +0100 ++++ b/SConstruct 2016-12-27 11:12:40.426407713 +0100 +@@ -1557,7 +1557,6 @@ + # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used. + env.Append( CCFLAGS=["-fno-omit-frame-pointer", + "-fno-strict-aliasing", +- "-ggdb", + "-pthread", + "-Wall", + "-Wsign-compare", +@@ -1568,8 +1567,9 @@ + if not has_option("disable-warnings-as-errors"): + env.Append( CCFLAGS=["-Werror"] ) + +- env.Append( CXXFLAGS=["-Woverloaded-virtual"] ) + env.Append( LINKFLAGS=["-pthread"] ) ++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] ) ++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] ) + + # SERVER-9761: Ensure early detection of missing symbols in dependent libraries at program + # startup. +@@ -1579,10 +1579,10 @@ + env.Append( LINKFLAGS=["-Wl,-z,now"] ) + env.Append( LINKFLAGS=["-rdynamic"] ) + +- env.Append( LIBS=[] ) ++ env.Append( LIBS=['pcre', 'pcrecpp', 'snappy', 'yaml-cpp'] ) + +- #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-3.4.7-no-boost-check.patch b/dev-db/mongodb/files/mongodb-3.4.7-no-boost-check.patch new file mode 100644 index 00000000..1d908e73 --- /dev/null +++ b/dev-db/mongodb/files/mongodb-3.4.7-no-boost-check.patch @@ -0,0 +1,13 @@ +diff --git a/SConstruct b/SConstruct +index df92e41659..2c387d5a24 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -2831,8 +2831,6 @@ def doConfigure(myenv): + if use_system_version_of_library("boost"): + if not conf.CheckCXXHeader( "boost/filesystem/operations.hpp" ): + myenv.ConfError("can't find boost headers") +- if not conf.CheckBoostMinVersion(): +- myenv.ConfError("system's version of boost is too old. version 1.49 or better required") + + # Note that on Windows with using-system-boost builds, the following + # FindSysLibDep calls do nothing useful (but nothing problematic either) diff --git a/dev-db/mongodb/mongodb-3.4.10.ebuild b/dev-db/mongodb/mongodb-3.4.10.ebuild new file mode 100644 index 00000000..2b669f1b --- /dev/null +++ b/dev-db/mongodb/mongodb-3.4.10.ebuild @@ -0,0 +1,221 @@ +# 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.3.0" +CHECKREQS_DISK_BUILD="2400M" +CHECKREQS_DISK_USR="512M" # Less if stripped binaries are installed +CHECKREQS_MEMORY="640M" # Default 1024M, but builds on RPi with ~700M available... + +inherit eutils flag-o-matic multilib multiprocessing pax-utils python-any-r1 scons-utils systemd toolchain-funcs user versionator check-reqs + +MY_P=${PN}-src-r${PV/_rc/-rc} + +DESCRIPTION="A high-performance, open source, schema-free document-oriented database" +HOMEPAGE="http://www.mongodb.org" +SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz + arm? ( https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/38.8.0esr/source/firefox-38.8.0esr.source.tar.bz2 )" + +LICENSE="AGPL-3 Apache-2.0" +SLOT="0" +KEYWORDS="amd64 ~x86 ~arm" +IUSE="debug kerberos libressl mms-agent mongos ssl systemd 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.8:= + mms-agent? ( app-admin/mms-agent ) + ssl? ( + !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) + libressl? ( dev-libs/libressl:0= ) + )" +DEPEND="${RDEPEND} + =dev-lang/python-2* + =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 + )" +PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )" + +PATCHES=( + "${FILESDIR}/${PN}-3.2.10-boost-1.62.patch" + "${FILESDIR}/${PN}-3.4.0-fix-scons.patch" + "${FILESDIR}/${PN}-3.4.6-sysmacros-include.patch" + "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch" +) + +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" + ewarn "successively upgrade major releases until you have upgraded" + ewarn "to 3.2-series. Then upgrade to 3.4 series." + fi +} + +pkg_setup() { + enewgroup mongodb + enewuser mongodb -1 -1 /var/lib/${PN} mongodb + + # Maintainer notes + # + # --use-system-tcmalloc is strongly NOT recommended: + # https://www.mongodb.org/about/contributors/tutorial/build-mongodb-from-source/ + + 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 + ) + + # wiredtiger not supported on 32bit platforms #572166 + if use x86 || use arm; then + scons_opts+=( --wiredtiger=off --mmapv1=on ) + fi + + 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 + + if use ssl; then + scons_opts+=( --ssl ) + fi + + python-any-r1_pkg_setup +} + +src_prepare() { + if use arm; then + mv "${WORKDIR}"/mozilla-esr38 "${S}"/src/third_party/mozjs-38/mozilla-release || die + fi + + default +} + +src_compile() { + if use arm; then + pushd src/third_party/mozjs-38/ >/dev/null || die "chdir() to src/third_party/mozjs-38 failed: ${?}" + ./gen-config.sh arm linux || die "Configuration for ARM failed: ${?}" + popd >/dev/null + fi + + # respect mongoDB upstream's basic recommendations + # see bug #536688 and #526114 + if ! use debug; then + use arm || filter-flags '-m*' # ... but not on ARM, where flags such as -march/-mtune, -mfpu, + # and -mfloat-abi, etc. are *essential* in order to produce + # working code. + filter-flags '-O?' + fi + escons "${scons_opts[@]}" core tools || die +} + +src_install() { + escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr || die + + 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 + + use systemd && 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} + + if ! use mongos; then + rm "${ED}"/etc/mongos.conf "${ED}"/etc/init.d/mongos "${ED}"/usr/share/man/man1/mongos.1* "${ED}"/usr/bin/mongos || + die "Error removing mongo shard elements: ${?}" + fi +} + +pkg_preinst() { + # wrt bug #461466 + if [[ "$(get_libdir)" == "lib64" ]]; then + rmdir "${ED}"/usr/lib/ &>/dev/null + 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" +} -- cgit v1.2.3-65-gdbad