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