Gentoo Archives: gentoo-commits

From: Alexys Jacob <ultrabug@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/mongodb/
Date: Sun, 05 Nov 2017 17:11:37
Message-Id: 1509901866.f8e108a7d7d04636fd34c2efcc53defbc8523ddb.ultrabug@gentoo
1 commit: f8e108a7d7d04636fd34c2efcc53defbc8523ddb
2 Author: Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Thu Nov 2 10:24:29 2017 +0000
4 Commit: Alexys Jacob <ultrabug <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 5 17:11:06 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8e108a7
7
8 dev-db/mongodb: bump to 3.4.10
9
10 Package-Manager: Portage-2.3.13, Repoman-2.3.4
11 Closes: https://github.com/gentoo/gentoo/pull/6108
12
13 dev-db/mongodb/Manifest | 1 +
14 dev-db/mongodb/mongodb-3.4.10.ebuild | 195 +++++++++++++++++++++++++++++++++++
15 2 files changed, 196 insertions(+)
16
17 diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest
18 index 8357f757cfc..23c7ecb66a5 100644
19 --- a/dev-db/mongodb/Manifest
20 +++ b/dev-db/mongodb/Manifest
21 @@ -5,6 +5,7 @@ DIST mongodb-src-r3.0.15.tar.gz 28096395 SHA256 09ad76e06df007085520025c94a5e584
22 DIST mongodb-src-r3.2.12.tar.gz 29178424 SHA256 406ced873a9abe8a3f0f92939bf5374663bac86c72181c80bec144aedf6cd306 SHA512 0c4ddaaddf15d97957faff46dc4a3f79c545cacc8a56dbe1d063778117ba9b645323b0cb7fd054fae805d092b8372c411a82e3370244b7939bda20a65fdb951c WHIRLPOOL 67673788859ea99752f2e0d1d8c7feb40b004efc344a2a589553675be7f9020ed384cb4a9000bb7eee0059105af364a722f17890ea3f0d38508b8d045db7da75
23 DIST mongodb-src-r3.2.13.tar.gz 29273616 SHA256 31492b99d12d6363a6ebcbba32269ce9e97dadedda8c470cbff8c1af227e9753 SHA512 649b599da65fc205a6e18cde82da6153fb4c03a21cf679e18fb57f705ac168690a37f9520be1242278bc0fe441fda08f1c10c9924cabc636ba153c545d32f91d WHIRLPOOL f7ac6c5a14814650c4bbb52f25d710613ae3aa4011f2600f4727c0c81d83ec33c9be9ddac594e6a2d1ad4556bc6c9de71d3a11abfb3bd2883322ab85010ae905
24 DIST mongodb-src-r3.2.16.tar.gz 29293555 SHA256 7a8b1b16f3fa545af16f48aeef1f918f57d96a80e1ceb6e669cdb81fab6511d0 SHA512 ba57aae430959f7df036b7e19e1b7d81956184bededd35631616c6e3dc9423dc79a50ab3265bc48b06d198a7043bca902aee2ea75954e38151ebead5b5ab2db2 WHIRLPOOL 0ac7b7cfae8b8b3727dc722c616eb576b3ae3aced5340b9fbd9a995d9f55552411c0507cb43a7378fa35187cf940d72d86ee20d08762f87bb4ebcd13eb697f09
25 +DIST mongodb-src-r3.4.10.tar.gz 39959937 SHA256 443800ca4f52fa613b29052f5f76abc0ccc477451b55f3665b61819f28ace2f3 SHA512 6293dde40a8433477ba3b1cf77abbdb32b28ce58279cc616b488647c8ab71b5ab3eab2146058c4a74b9e00f0938f1415020e2f26ea01f2b29dd78a1a38d58c3a WHIRLPOOL 3cd03fecfc1fa077f55d9961e939d89e347ae5f41c815d81a50b88ddef9c8900f41faec6ae71b759f9f665c8a706fdd3000e96c3047711237f0d66478edbf35e
26 DIST mongodb-src-r3.4.3.tar.gz 39832718 SHA256 889d49312ed072130936cfa3281123a0e89228c04f3f8e992a0b92669b28d767 SHA512 e2fb5fc2f02e9dbca6c30d2e2aaf1569180ca15198226cdad46f47f44905293afe77763fe2e5c9add0b5bcbd62b7ce7905fb183068c0738cdeeae8d39f848cef WHIRLPOOL ba6fa864249cc80e5f65feaed685980b874b46bcf975142e15fa0eda3e474cc85388920e152474dc5527a30d215c309db6d471c716e6bbe374193ff6016ba22e
27 DIST mongodb-src-r3.4.4.tar.gz 39867133 SHA256 09e962bf3428474b9790bbd464cb6176817f9da6121c30e096240dbb4d51c9f6 SHA512 dbae89b49c363e7258021cd31385e4449bfdfdfd5adfcb1683e4431372731e58ec33bf8f7576d2d52659a52461bd6a32fbc67d5c6e36d52184ec1aabb345d940 WHIRLPOOL 5ad9f80c7f0f597982a32f95365df961fcd80ffa7c04183f9cb4952a52262a27ab09fee4d0115405c5197b6d3848ede56c9a4e5012ec1c358ea8c752164405c2
28 DIST mongodb-src-r3.4.6.tar.gz 39922209 SHA256 8170360f6dfede9c19c131f3d76831e952b3f1494925aa7e2a3a2f95b58ad901 SHA512 68da2f385a5e1d636f1699b13818e125af2b7f13c6ff74d5f6dc8f9e04025f9baaa23acfd386118d90ac0eb8b9b7dfbf5b00f1db580a1ea1fe2309361f46eae4 WHIRLPOOL 71b9f42a192b41c797763a02eb8b318488edbd7ffaa149497d3dea5c446c43ff078d24e48971ce4644d54767bcb848e1acaca3e17be9e8c50bbdd349e0d05fab
29
30 diff --git a/dev-db/mongodb/mongodb-3.4.10.ebuild b/dev-db/mongodb/mongodb-3.4.10.ebuild
31 new file mode 100644
32 index 00000000000..ea12e6d0ee7
33 --- /dev/null
34 +++ b/dev-db/mongodb/mongodb-3.4.10.ebuild
35 @@ -0,0 +1,195 @@
36 +# Copyright 1999-2017 Gentoo Foundation
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=6
40 +
41 +PYTHON_COMPAT=( python2_7 )
42 +
43 +SCONS_MIN_VERSION="2.3.0"
44 +CHECKREQS_DISK_BUILD="2400M"
45 +CHECKREQS_DISK_USR="512M"
46 +CHECKREQS_MEMORY="1024M"
47 +
48 +inherit eutils flag-o-matic multilib multiprocessing pax-utils python-any-r1 scons-utils systemd toolchain-funcs user versionator check-reqs
49 +
50 +MY_P=${PN}-src-r${PV/_rc/-rc}
51 +
52 +DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
53 +HOMEPAGE="http://www.mongodb.org"
54 +SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
55 +
56 +LICENSE="AGPL-3 Apache-2.0"
57 +SLOT="0"
58 +KEYWORDS="~amd64 ~x86"
59 +IUSE="debug kerberos libressl mms-agent ssl test +tools"
60 +
61 +RDEPEND=">=app-arch/snappy-1.1.3
62 + >=dev-cpp/yaml-cpp-0.5.3
63 + >=dev-libs/boost-1.60[threads(+)]
64 + >=dev-libs/libpcre-8.41[cxx]
65 + dev-libs/snowball-stemmer
66 + net-libs/libpcap
67 + >=sys-libs/zlib-1.2.8
68 + mms-agent? ( app-admin/mms-agent )
69 + ssl? (
70 + !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
71 + libressl? ( dev-libs/libressl:0= )
72 + )"
73 +DEPEND="${RDEPEND}
74 + =dev-lang/python-2*
75 + >=sys-devel/gcc-5.3.0:*
76 + sys-libs/ncurses
77 + sys-libs/readline
78 + debug? ( dev-util/valgrind )
79 + kerberos? ( dev-libs/cyrus-sasl[kerberos] )
80 + test? (
81 + dev-python/pymongo
82 + dev-python/pyyaml
83 + )"
84 +PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
85 +
86 +PATCHES=(
87 + "${FILESDIR}/${PN}-3.2.10-boost-1.62.patch"
88 + "${FILESDIR}/${PN}-3.4.0-fix-scons.patch"
89 + "${FILESDIR}/${PN}-3.4.6-sysmacros-include.patch"
90 + "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
91 +)
92 +
93 +S=${WORKDIR}/${MY_P}
94 +
95 +pkg_pretend() {
96 + if [[ ${REPLACING_VERSIONS} < 3.0 ]]; then
97 + ewarn "To upgrade from a version earlier than the 3.0-series, you must"
98 + ewarn "successively upgrade major releases until you have upgraded"
99 + ewarn "to 3.2-series. Then upgrade to 3.4 series."
100 + fi
101 +}
102 +
103 +pkg_setup() {
104 + enewgroup mongodb
105 + enewuser mongodb -1 -1 /var/lib/${PN} mongodb
106 +
107 + # Maintainer notes
108 + #
109 + # --use-system-tcmalloc is strongly NOT recommended:
110 + # https://www.mongodb.org/about/contributors/tutorial/build-mongodb-from-source/
111 +
112 + scons_opts=(
113 + CC="$(tc-getCC)"
114 + CXX="$(tc-getCXX)"
115 +
116 + --disable-warnings-as-errors
117 + --use-system-boost
118 + --use-system-pcre
119 + --use-system-snappy
120 + --use-system-stemmer
121 + --use-system-yaml
122 + --use-system-zlib
123 + )
124 +
125 + # wiredtiger not supported on 32bit platforms #572166
126 + use x86 && scons_opts+=( --wiredtiger=off )
127 +
128 + if use debug; then
129 + scons_opts+=( --dbg=on )
130 + fi
131 +
132 + if use prefix; then
133 + scons_opts+=(
134 + --cpppath="${EPREFIX}/usr/include"
135 + --libpath="${EPREFIX}/usr/$(get_libdir)"
136 + )
137 + fi
138 +
139 + if use kerberos; then
140 + scons_opts+=( --use-sasl-client )
141 + fi
142 +
143 + if use ssl; then
144 + scons_opts+=( --ssl )
145 + fi
146 +
147 + python-any-r1_pkg_setup
148 +}
149 +
150 +src_compile() {
151 + # respect mongoDB upstream's basic recommendations
152 + # see bug #536688 and #526114
153 + if ! use debug; then
154 + filter-flags '-m*'
155 + filter-flags '-O?'
156 + fi
157 + escons "${scons_opts[@]}" core tools
158 +}
159 +
160 +src_install() {
161 + escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
162 +
163 + local x
164 + for x in /var/{lib,log}/${PN}; do
165 + keepdir "${x}"
166 + fowners mongodb:mongodb "${x}"
167 + done
168 +
169 + doman debian/mongo*.1
170 + dodoc README docs/building.md
171 +
172 + newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
173 + newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
174 + newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
175 + newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
176 +
177 + insinto /etc
178 + newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
179 + newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
180 +
181 + systemd_dounit "${FILESDIR}/${PN}.service"
182 +
183 + insinto /etc/logrotate.d/
184 + newins "${FILESDIR}/${PN}.logrotate" ${PN}
185 +
186 + # see bug #526114
187 + pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
188 +}
189 +
190 +pkg_preinst() {
191 + # wrt bug #461466
192 + if [[ "$(get_libdir)" == "lib64" ]]; then
193 + rmdir "${ED}"/usr/lib/ &>/dev/null
194 + fi
195 +}
196 +
197 +# FEATURES="test -usersandbox" emerge dev-db/mongodb
198 +src_test() {
199 + # this one test fails
200 + rm jstests/core/jsHeapLimit.js || die
201 +
202 + "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
203 +}
204 +
205 +pkg_postinst() {
206 + local v
207 + for v in ${REPLACING_VERSIONS}; do
208 + if ! version_is_at_least 3.0 ${v}; then
209 + ewarn "!! IMPORTANT !!"
210 + ewarn " "
211 + ewarn "${PN} configuration files have changed !"
212 + ewarn " "
213 + ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
214 + ewarn " http://docs.mongodb.org/manual/reference/configuration-options/"
215 + ewarn " "
216 + ewarn "Make sure you also follow the upgrading process :"
217 + ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/"
218 + ewarn " "
219 + ewarn "MongoDB 3.0 introduces the WiredTiger storage engine."
220 + ewarn "WiredTiger is incompatible with MMAPv1 and you need to dump/reload your data if you want to use it."
221 + ewarn "Once you have your data dumped, you need to set storage.engine: wiredTiger in /etc/${PN}.conf"
222 + ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/#change-storage-engine-to-wiredtiger"
223 + break
224 + fi
225 + done
226 +
227 + ewarn "Make sure to read the release notes and follow the upgrade process:"
228 + ewarn " https://docs.mongodb.org/manual/release-notes/3.4/"
229 + ewarn " https://docs.mongodb.com/manual/release-notes/3.4/#upgrade-procedures"
230 +}