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