1 |
commit: 24525b6c33621b05f085d14300ade28f042ab860 |
2 |
Author: Tomas Mozes <hydrapolic <AT> gmail <DOT> com> |
3 |
AuthorDate: Sun Sep 9 19:57:45 2018 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 9 20:40:59 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24525b6c |
7 |
|
8 |
dev-db/mongodb: bump to 4.0.2 |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo/pull/9772 |
11 |
Package-Manager: Portage-2.3.48, Repoman-2.3.10 |
12 |
|
13 |
dev-db/mongodb/Manifest | 1 + |
14 |
dev-db/mongodb/mongodb-4.0.2.ebuild | 163 ++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 164 insertions(+) |
16 |
|
17 |
diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest |
18 |
index cc2c2bc96c3..b75326127cf 100644 |
19 |
--- a/dev-db/mongodb/Manifest |
20 |
+++ b/dev-db/mongodb/Manifest |
21 |
@@ -14,3 +14,4 @@ DIST mongodb-src-r3.6.6.tar.gz 40391572 BLAKE2B 1cee1ad5431d2941cf2f0ee31290b2b5 |
22 |
DIST mongodb-src-r3.6.7.tar.gz 40421164 BLAKE2B c447799f33de768fada7a8f44e692602bd827aec7087886b28d69830382db005a1a95e2596306e24f9d7a4555e1b3f8f6355ebad38a27d06234de15ec946dd04 SHA512 6d91785c5569f8b99ff7234fa94c7b87406489b1e04a9e1b44a2af6cbaf79e3685dbc361162935dc4b92bd07ed40bf024dba4ca85c1a4079dd22f1cdac91d594 |
23 |
DIST mongodb-src-r4.0.0.tar.gz 49138467 BLAKE2B 616e267c737729103de544d82db60489e7a32c5f9847ffd2d643a9025c18aa867718216f5de9f18a93fb2a7930c3dbe9ec3850eef09dbec084570328a99f2865 SHA512 11d00cdde606cfea268471cffccedb6d003e421aeffda2303aff4d4126c386aaec50a1de733d7a1d5fb6605403cf9f2218dae50374c7b5e8625fa80317804589 |
24 |
DIST mongodb-src-r4.0.1.tar.gz 49175057 BLAKE2B 69cd8268964200534d61493018044372f2991cedb027454c02023f5f54a0616b31c421d611ff2e67dfca87b99727cef5266a4279445a8693f8c676d0803553b3 SHA512 cfb0ec3227d976999f366ca15ddaa9379f90433dbd02bd16d001f0a7f986e84df697cbbd43674988b5d41a0b85445dcd0c4717cb406e05c1fbcd544088c859ea |
25 |
+DIST mongodb-src-r4.0.2.tar.gz 49328232 BLAKE2B 0e56392de5b8cd59c49c38469ed427c52dbd91cd64b3c97da6809c0f849198f836896b8ef24a06e7ff84a65a7986b76df2ca4ffeafe76d8afe0e031ad25ecf5a SHA512 171422ee028ebc279bb2cf20c78a3ce89a6cc15abf0955ac20a6c67f1aae577bf99ca4363fc428dba6ae0250b97f95d2fc51ca7f4a4505e8c38c9a11ca249800 |
26 |
|
27 |
diff --git a/dev-db/mongodb/mongodb-4.0.2.ebuild b/dev-db/mongodb/mongodb-4.0.2.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..d59daa0c283 |
30 |
--- /dev/null |
31 |
+++ b/dev-db/mongodb/mongodb-4.0.2.ebuild |
32 |
@@ -0,0 +1,163 @@ |
33 |
+# Copyright 1999-2018 Gentoo Foundation |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=6 |
37 |
+ |
38 |
+PYTHON_COMPAT=( python2_7 ) |
39 |
+ |
40 |
+SCONS_MIN_VERSION="2.5.0" |
41 |
+CHECKREQS_DISK_BUILD="2400M" |
42 |
+CHECKREQS_DISK_USR="512M" |
43 |
+CHECKREQS_MEMORY="1024M" |
44 |
+ |
45 |
+inherit check-reqs eapi7-ver flag-o-matic multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user |
46 |
+ |
47 |
+MY_P=${PN}-src-r${PV/_rc/-rc} |
48 |
+ |
49 |
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database" |
50 |
+HOMEPAGE="https://www.mongodb.com" |
51 |
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz" |
52 |
+ |
53 |
+LICENSE="AGPL-3 Apache-2.0" |
54 |
+SLOT="0" |
55 |
+KEYWORDS="~amd64" |
56 |
+IUSE="debug kerberos libressl mms-agent ssl test +tools" |
57 |
+ |
58 |
+RDEPEND=">=app-arch/snappy-1.1.3 |
59 |
+ >=dev-cpp/yaml-cpp-0.5.3 |
60 |
+ >=dev-libs/boost-1.60:=[threads(+)] |
61 |
+ >=dev-libs/libpcre-8.41[cxx] |
62 |
+ dev-libs/snowball-stemmer |
63 |
+ net-libs/libpcap |
64 |
+ >=sys-libs/zlib-1.2.11:= |
65 |
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] ) |
66 |
+ mms-agent? ( app-admin/mms-agent ) |
67 |
+ ssl? ( |
68 |
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) |
69 |
+ libressl? ( dev-libs/libressl:0= ) |
70 |
+ )" |
71 |
+DEPEND="${RDEPEND} |
72 |
+ ${PYTHON_DEPS} |
73 |
+ dev-python/cheetah[${PYTHON_USEDEP}] |
74 |
+ dev-python/pyyaml[${PYTHON_USEDEP}] |
75 |
+ virtual/python-typing[${PYTHON_USEDEP}] |
76 |
+ sys-libs/ncurses:0= |
77 |
+ sys-libs/readline:0= |
78 |
+ debug? ( dev-util/valgrind ) |
79 |
+ test? ( |
80 |
+ dev-python/pymongo[${PYTHON_USEDEP}] |
81 |
+ )" |
82 |
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )" |
83 |
+ |
84 |
+PATCHES=( |
85 |
+ "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch" |
86 |
+ "${FILESDIR}/${PN}-3.6.1-fix-scons.patch" |
87 |
+ "${FILESDIR}/${PN}-4.0.0-no-compass.patch" |
88 |
+) |
89 |
+ |
90 |
+S=${WORKDIR}/${MY_P} |
91 |
+ |
92 |
+pkg_pretend() { |
93 |
+ if [[ -n ${REPLACING_VERSIONS} ]]; then |
94 |
+ if ver_test "$REPLACING_VERSIONS" -lt 3.6; then |
95 |
+ ewarn "To upgrade from a version earlier than the 3.6-series, you must" |
96 |
+ ewarn "successively upgrade major releases until you have upgraded" |
97 |
+ ewarn "to 3.6-series. Then upgrade to 4.0 series." |
98 |
+ else |
99 |
+ ewarn "Be sure to set featureCompatibilityVersion to 3.6 before upgrading." |
100 |
+ fi |
101 |
+ fi |
102 |
+} |
103 |
+ |
104 |
+pkg_setup() { |
105 |
+ enewgroup mongodb |
106 |
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb |
107 |
+ |
108 |
+ python-single-r1_pkg_setup |
109 |
+} |
110 |
+ |
111 |
+src_prepare() { |
112 |
+ default |
113 |
+ |
114 |
+ # remove bundled libs |
115 |
+ rm -r src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die |
116 |
+ |
117 |
+ # remove compass |
118 |
+ rm -r src/mongo/installer/compass || die |
119 |
+} |
120 |
+ |
121 |
+src_configure() { |
122 |
+ # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source |
123 |
+ # --use-system-icu fails tests |
124 |
+ # --use-system-tcmalloc is strongly NOT recommended: |
125 |
+ scons_opts=( |
126 |
+ CC="$(tc-getCC)" |
127 |
+ CXX="$(tc-getCXX)" |
128 |
+ |
129 |
+ --disable-warnings-as-errors |
130 |
+ --use-system-boost |
131 |
+ --use-system-pcre |
132 |
+ --use-system-snappy |
133 |
+ --use-system-stemmer |
134 |
+ --use-system-yaml |
135 |
+ --use-system-zlib |
136 |
+ ) |
137 |
+ |
138 |
+ use debug && scons_opts+=( --dbg=on ) |
139 |
+ use kerberos && scons_opts+=( --use-sasl-client ) |
140 |
+ use ssl && scons_opts+=( --ssl ) |
141 |
+ |
142 |
+ # respect mongoDB upstream's basic recommendations |
143 |
+ # see bug #536688 and #526114 |
144 |
+ if ! use debug; then |
145 |
+ filter-flags '-m*' |
146 |
+ filter-flags '-O?' |
147 |
+ fi |
148 |
+ |
149 |
+ default |
150 |
+} |
151 |
+ |
152 |
+src_compile() { |
153 |
+ escons "${scons_opts[@]}" core tools |
154 |
+} |
155 |
+ |
156 |
+# FEATURES="test -usersandbox" emerge dev-db/mongodb |
157 |
+src_test() { |
158 |
+ "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed" |
159 |
+} |
160 |
+ |
161 |
+src_install() { |
162 |
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr |
163 |
+ |
164 |
+ doman debian/mongo*.1 |
165 |
+ dodoc README docs/building.md |
166 |
+ |
167 |
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN} |
168 |
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN} |
169 |
+ newinitd "${FILESDIR}/mongos.initd-r3" mongos |
170 |
+ newconfd "${FILESDIR}/mongos.confd-r3" mongos |
171 |
+ |
172 |
+ insinto /etc |
173 |
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf |
174 |
+ newins "${FILESDIR}/mongos.conf-r2" mongos.conf |
175 |
+ |
176 |
+ systemd_dounit "${FILESDIR}/${PN}.service" |
177 |
+ |
178 |
+ insinto /etc/logrotate.d/ |
179 |
+ newins "${FILESDIR}/${PN}.logrotate" ${PN} |
180 |
+ |
181 |
+ # see bug #526114 |
182 |
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos} |
183 |
+ |
184 |
+ local x |
185 |
+ for x in /var/{lib,log}/${PN}; do |
186 |
+ diropts -m0750 -o mongodb -g mongodb |
187 |
+ keepdir "${x}" |
188 |
+ done |
189 |
+} |
190 |
+ |
191 |
+pkg_postinst() { |
192 |
+ ewarn "Make sure to read the release notes and follow the upgrade process:" |
193 |
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/" |
194 |
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/#upgrade-procedures" |
195 |
+} |