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