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, 28 Sep 2018 07:53:52
Message-Id: 1538121212.17f45542f2d84871723d79f176fe5abbecab54d7.ultrabug@gentoo
1 commit: 17f45542f2d84871723d79f176fe5abbecab54d7
2 Author: Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Thu Sep 27 12:30:14 2018 +0000
4 Commit: Alexys Jacob <ultrabug <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 28 07:53:32 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17f45542
7
8 dev-db/mongodb: bump to 3.6.8
9
10 Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
11 Package-Manager: Portage-2.3.50, Repoman-2.3.11
12
13 dev-db/mongodb/Manifest | 1 +
14 dev-db/mongodb/mongodb-3.6.8.ebuild | 163 ++++++++++++++++++++++++++++++++++++
15 2 files changed, 164 insertions(+)
16
17 diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest
18 index b75326127cf..28611c60495 100644
19 --- a/dev-db/mongodb/Manifest
20 +++ b/dev-db/mongodb/Manifest
21 @@ -12,6 +12,7 @@ DIST mongodb-src-r3.6.4.tar.gz 40159916 BLAKE2B d3878d4e6bbf331de672768b2c92a4d7
22 DIST mongodb-src-r3.6.5.tar.gz 40310152 BLAKE2B 72110ae47b17ec8b1f60636a5ef8491b076e1cc019513fd872ea38b3bb8393efff4bddc7b795b3da711f258d21be9fa23e24d396a9429349c51ce05fff180a53 SHA512 6ecb3140ee4a7929fabe62d698f23e87cb5030cf31abefe7f82374f407fb87dc05f712089998f96bc40e23698836a86e7f3590892bde9d2d6f2c4bcc15cc3ebf
23 DIST mongodb-src-r3.6.6.tar.gz 40391572 BLAKE2B 1cee1ad5431d2941cf2f0ee31290b2b5bc1c628f2cb5041d4d5a1427d342ecc3bbfb123e540581d81a1c5b018464abb9dcd1ead8df0de6a01a1462ca0c258e83 SHA512 cd91979ba29538c9e1645fe81e03ac56101b0fa8980ea2bdf89a4987ee8f7f6ddc97e2b27495500548a4424f155a1847471c7a5715beabf75ff894edf05c546b
24 DIST mongodb-src-r3.6.7.tar.gz 40421164 BLAKE2B c447799f33de768fada7a8f44e692602bd827aec7087886b28d69830382db005a1a95e2596306e24f9d7a4555e1b3f8f6355ebad38a27d06234de15ec946dd04 SHA512 6d91785c5569f8b99ff7234fa94c7b87406489b1e04a9e1b44a2af6cbaf79e3685dbc361162935dc4b92bd07ed40bf024dba4ca85c1a4079dd22f1cdac91d594
25 +DIST mongodb-src-r3.6.8.tar.gz 40428295 BLAKE2B cc02f73cfb49fb38ccabaad5a02610ce73fc41895ce944e48669e254bcbc70c8872a1bd7f8e04371fae4fcd9af2466fd8550367dd1d1da5cee50b86fc5023bf2 SHA512 c981f3269be3bafb59aa89d36c39a801fd7007b60db6c09b4616a559aaf8e50b34cabbdac2b59f23552c0a5112913fba468f7e2ed9a5f4daa3702dcffdf34999
26 DIST mongodb-src-r4.0.0.tar.gz 49138467 BLAKE2B 616e267c737729103de544d82db60489e7a32c5f9847ffd2d643a9025c18aa867718216f5de9f18a93fb2a7930c3dbe9ec3850eef09dbec084570328a99f2865 SHA512 11d00cdde606cfea268471cffccedb6d003e421aeffda2303aff4d4126c386aaec50a1de733d7a1d5fb6605403cf9f2218dae50374c7b5e8625fa80317804589
27 DIST mongodb-src-r4.0.1.tar.gz 49175057 BLAKE2B 69cd8268964200534d61493018044372f2991cedb027454c02023f5f54a0616b31c421d611ff2e67dfca87b99727cef5266a4279445a8693f8c676d0803553b3 SHA512 cfb0ec3227d976999f366ca15ddaa9379f90433dbd02bd16d001f0a7f986e84df697cbbd43674988b5d41a0b85445dcd0c4717cb406e05c1fbcd544088c859ea
28 DIST mongodb-src-r4.0.2.tar.gz 49328232 BLAKE2B 0e56392de5b8cd59c49c38469ed427c52dbd91cd64b3c97da6809c0f849198f836896b8ef24a06e7ff84a65a7986b76df2ca4ffeafe76d8afe0e031ad25ecf5a SHA512 171422ee028ebc279bb2cf20c78a3ce89a6cc15abf0955ac20a6c67f1aae577bf99ca4363fc428dba6ae0250b97f95d2fc51ca7f4a4505e8c38c9a11ca249800
29
30 diff --git a/dev-db/mongodb/mongodb-3.6.8.ebuild b/dev-db/mongodb/mongodb-3.6.8.ebuild
31 new file mode 100644
32 index 00000000000..a96cd863789
33 --- /dev/null
34 +++ b/dev-db/mongodb/mongodb-3.6.8.ebuild
35 @@ -0,0 +1,163 @@
36 +# Copyright 1999-2018 Gentoo Authors
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.5.0"
44 +CHECKREQS_DISK_BUILD="2400M"
45 +CHECKREQS_DISK_USR="512M"
46 +CHECKREQS_MEMORY="1024M"
47 +
48 +inherit check-reqs eapi7-ver flag-o-matic multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user
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="https://www.mongodb.com"
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"
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 + kerberos? ( dev-libs/cyrus-sasl[kerberos] )
69 + mms-agent? ( app-admin/mms-agent )
70 + ssl? (
71 + !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
72 + libressl? ( dev-libs/libressl:0= )
73 + )"
74 +DEPEND="${RDEPEND}
75 + ${PYTHON_DEPS}
76 + dev-python/cheetah[${PYTHON_USEDEP}]
77 + dev-python/pyyaml[${PYTHON_USEDEP}]
78 + virtual/python-typing[${PYTHON_USEDEP}]
79 + sys-libs/ncurses:0=
80 + sys-libs/readline:0=
81 + debug? ( dev-util/valgrind )
82 + test? (
83 + dev-python/pymongo[${PYTHON_USEDEP}]
84 + )"
85 +PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
86 +
87 +PATCHES=(
88 + "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
89 + "${FILESDIR}/${PN}-3.6.1-fix-scons.patch"
90 + "${FILESDIR}/${PN}-3.6.1-no-compass.patch"
91 +)
92 +
93 +S=${WORKDIR}/${MY_P}
94 +
95 +pkg_pretend() {
96 + if [[ -n ${REPLACING_VERSIONS} ]]; then
97 + if ver_test "$REPLACING_VERSIONS" -lt 3.4; then
98 + ewarn "To upgrade from a version earlier than the 3.4-series, you must"
99 + ewarn "successively upgrade major releases until you have upgraded"
100 + ewarn "to 3.4-series. Then upgrade to 3.6 series."
101 + else
102 + ewarn "Be sure to set featureCompatibilityVersion to 3.4 before upgrading."
103 + fi
104 + fi
105 +}
106 +
107 +pkg_setup() {
108 + enewgroup mongodb
109 + enewuser mongodb -1 -1 /var/lib/${PN} mongodb
110 +
111 + python-single-r1_pkg_setup
112 +}
113 +
114 +src_prepare() {
115 + default
116 +
117 + # remove bundled libs
118 + rm -r src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
119 +
120 + # remove compass
121 + rm -r src/mongo/installer/compass || die
122 +}
123 +
124 +src_configure() {
125 + # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
126 + # --use-system-icu fails tests
127 + # --use-system-tcmalloc is strongly NOT recommended:
128 + scons_opts=(
129 + CC="$(tc-getCC)"
130 + CXX="$(tc-getCXX)"
131 +
132 + --disable-warnings-as-errors
133 + --use-system-boost
134 + --use-system-pcre
135 + --use-system-snappy
136 + --use-system-stemmer
137 + --use-system-yaml
138 + --use-system-zlib
139 + )
140 +
141 + use debug && scons_opts+=( --dbg=on )
142 + use kerberos && scons_opts+=( --use-sasl-client )
143 + use ssl && scons_opts+=( --ssl )
144 +
145 + # respect mongoDB upstream's basic recommendations
146 + # see bug #536688 and #526114
147 + if ! use debug; then
148 + filter-flags '-m*'
149 + filter-flags '-O?'
150 + fi
151 +
152 + default
153 +}
154 +
155 +src_compile() {
156 + escons "${scons_opts[@]}" core tools
157 +}
158 +
159 +# FEATURES="test -usersandbox" emerge dev-db/mongodb
160 +src_test() {
161 + "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
162 +}
163 +
164 +src_install() {
165 + escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
166 +
167 + doman debian/mongo*.1
168 + dodoc README docs/building.md
169 +
170 + newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
171 + newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
172 + newinitd "${FILESDIR}/mongos.initd-r3" mongos
173 + newconfd "${FILESDIR}/mongos.confd-r3" mongos
174 +
175 + insinto /etc
176 + newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
177 + newins "${FILESDIR}/mongos.conf-r2" mongos.conf
178 +
179 + systemd_dounit "${FILESDIR}/${PN}.service"
180 +
181 + insinto /etc/logrotate.d/
182 + newins "${FILESDIR}/${PN}.logrotate" ${PN}
183 +
184 + # see bug #526114
185 + pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
186 +
187 + local x
188 + for x in /var/{lib,log}/${PN}; do
189 + diropts -m0750 -o mongodb -g mongodb
190 + keepdir "${x}"
191 + done
192 +}
193 +
194 +pkg_postinst() {
195 + ewarn "Make sure to read the release notes and follow the upgrade process:"
196 + ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/"
197 + ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/#upgrade-procedures"
198 +}