1 |
commit: 2888da4e56bdd70a6fbbca59c8c1176edf1e3799 |
2 |
Author: Tomas Mozes <tmozes <AT> sygic <DOT> com> |
3 |
AuthorDate: Thu Jun 28 10:44:16 2018 +0000 |
4 |
Commit: Alexys Jacob <ultrabug <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jun 28 12:45:18 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2888da4e |
7 |
|
8 |
dev-db/mongodb: bump to 4.0.0 |
9 |
|
10 |
Package-Manager: Portage-2.3.40, Repoman-2.3.9 |
11 |
|
12 |
dev-db/mongodb/Manifest | 1 + |
13 |
.../mongodb/files/mongodb-4.0.0-no-compass.patch | 57 +++++++ |
14 |
dev-db/mongodb/mongodb-4.0.0.ebuild | 170 +++++++++++++++++++++ |
15 |
3 files changed, 228 insertions(+) |
16 |
|
17 |
diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest |
18 |
index d9824f06bd3..4fc4f86c8f1 100644 |
19 |
--- a/dev-db/mongodb/Manifest |
20 |
+++ b/dev-db/mongodb/Manifest |
21 |
@@ -9,3 +9,4 @@ DIST mongodb-src-r3.6.2.tar.gz 39999539 BLAKE2B 3e38917ebaf79b63bf054279fbb91a64 |
22 |
DIST mongodb-src-r3.6.3.tar.gz 40093607 BLAKE2B bb21bf0487661eec6140ade22526617b26b2499bd36e138d955d14a4b13a0685ec7308bccfc11ef17c785cd8a71c5b6cd9d154d461b8973410b03952b93953ec SHA512 94aa9955f99d5f6bbbe65dc3755583952525398308ca7cb9224b91d1fa403de5bb3abb63a651583815cbecaff58966b5cfe7334a36ef6583f73d8c213410ddbc |
23 |
DIST mongodb-src-r3.6.4.tar.gz 40159916 BLAKE2B d3878d4e6bbf331de672768b2c92a4d71f758232170432d757f7e61849e6e1ef3b190e6a089101c9ea23c4ce23087c684c86fc6ea0f32f6fe052ce322d47e438 SHA512 02c2a697af9fdcbb16d19792be17d987e18c684418a63ed4750471c7ec22eb2eabf84e93cb1d298f67898b7e23687f668bb333c50ffc4e1b8adf8859f856ad95 |
24 |
DIST mongodb-src-r3.6.5.tar.gz 40310152 BLAKE2B 72110ae47b17ec8b1f60636a5ef8491b076e1cc019513fd872ea38b3bb8393efff4bddc7b795b3da711f258d21be9fa23e24d396a9429349c51ce05fff180a53 SHA512 6ecb3140ee4a7929fabe62d698f23e87cb5030cf31abefe7f82374f407fb87dc05f712089998f96bc40e23698836a86e7f3590892bde9d2d6f2c4bcc15cc3ebf |
25 |
+DIST mongodb-src-r4.0.0.tar.gz 49138467 BLAKE2B 616e267c737729103de544d82db60489e7a32c5f9847ffd2d643a9025c18aa867718216f5de9f18a93fb2a7930c3dbe9ec3850eef09dbec084570328a99f2865 SHA512 11d00cdde606cfea268471cffccedb6d003e421aeffda2303aff4d4126c386aaec50a1de733d7a1d5fb6605403cf9f2218dae50374c7b5e8625fa80317804589 |
26 |
|
27 |
diff --git a/dev-db/mongodb/files/mongodb-4.0.0-no-compass.patch b/dev-db/mongodb/files/mongodb-4.0.0-no-compass.patch |
28 |
new file mode 100644 |
29 |
index 00000000000..35e9c172e9e |
30 |
--- /dev/null |
31 |
+++ b/dev-db/mongodb/files/mongodb-4.0.0-no-compass.patch |
32 |
@@ -0,0 +1,57 @@ |
33 |
+diff --git a/src/mongo/SConscript b/src/mongo/SConscript |
34 |
+index c8f925b7..0e4f99ad 100644 |
35 |
+--- a/src/mongo/SConscript |
36 |
++++ b/src/mongo/SConscript |
37 |
+@@ -671,44 +671,6 @@ for full_dir, archive_dir in env["ARCHIVE_ADDITION_DIR_MAP"].items(): |
38 |
+ for target in env["DIST_BINARIES"]: |
39 |
+ installBinary(env, "db/modules/" + target) |
40 |
+ |
41 |
+-# Set the download url to the right place |
42 |
+-compass_type = 'compass-community' |
43 |
+-if 'enterprise' in env['MONGO_MODULES']: |
44 |
+- compass_type = 'compass' |
45 |
+- |
46 |
+-compass_script = "install_compass" |
47 |
+-if env.TargetOSIs('windows'): |
48 |
+- # On windows the .in needs to be explicitly added to the file. |
49 |
+- compass_script = "Install-Compass.ps1.in" |
50 |
+- |
51 |
+-compass_python_interpreter = '/usr/bin/env python2' |
52 |
+-if env.TargetOSIs('darwin'): |
53 |
+- compass_python_interpreter = '/usr/bin/env python' |
54 |
+- |
55 |
+-compass_installer = env.Substfile('#/src/mongo/installer/compass/' + compass_script, |
56 |
+- SUBST_DICT=[ |
57 |
+- ('@compass_type@', compass_type), |
58 |
+- ('@python_interpreter@', compass_python_interpreter), |
59 |
+- ]) |
60 |
+-distBinaries.append(compass_installer) |
61 |
+- |
62 |
+-if not hygienic: |
63 |
+- compass_script_installer = env.Install("$INSTALL_DIR/bin", compass_installer) |
64 |
+-else: |
65 |
+- compass_script_installer = env.AutoInstall( |
66 |
+- 'bin', |
67 |
+- source=[ |
68 |
+- compass_installer, |
69 |
+- ], |
70 |
+- INSTALL_ALIAS=[ |
71 |
+- 'tools', |
72 |
+- ], |
73 |
+- ) |
74 |
+- |
75 |
+-if env.TargetOSIs('posix'): |
76 |
+- env.AddPostAction( compass_script_installer, 'chmod 755 $TARGET' ) |
77 |
+- env.AddPostAction( compass_installer, 'chmod 755 $TARGET' ) |
78 |
+- |
79 |
+ # "dist" target is valid only when --use-new-tools is specified |
80 |
+ # Attempts to build release artifacts without tools must fail |
81 |
+ if has_option("use-new-tools"): |
82 |
+@@ -726,7 +688,6 @@ if has_option("use-new-tools"): |
83 |
+ '--transform $BUILD_DIR/mongo=$SERVER_DIST_BASENAME/bin', |
84 |
+ '--transform $BUILD_DIR/mongo/stripped/src/mongo-tools=$SERVER_DIST_BASENAME/bin', |
85 |
+ '--transform src/mongo-tools=$SERVER_DIST_BASENAME/bin', |
86 |
+- '--transform src/mongo/installer/compass=$SERVER_DIST_BASENAME/bin', |
87 |
+ '${TEMPFILE(SOURCES[1:])}' |
88 |
+ ], |
89 |
+ ), |
90 |
|
91 |
diff --git a/dev-db/mongodb/mongodb-4.0.0.ebuild b/dev-db/mongodb/mongodb-4.0.0.ebuild |
92 |
new file mode 100644 |
93 |
index 00000000000..2b90de08741 |
94 |
--- /dev/null |
95 |
+++ b/dev-db/mongodb/mongodb-4.0.0.ebuild |
96 |
@@ -0,0 +1,170 @@ |
97 |
+# Copyright 1999-2018 Gentoo Foundation |
98 |
+# Distributed under the terms of the GNU General Public License v2 |
99 |
+ |
100 |
+EAPI=6 |
101 |
+ |
102 |
+PYTHON_COMPAT=( python2_7 ) |
103 |
+ |
104 |
+SCONS_MIN_VERSION="2.5.0" |
105 |
+CHECKREQS_DISK_BUILD="2400M" |
106 |
+CHECKREQS_DISK_USR="512M" |
107 |
+CHECKREQS_MEMORY="1024M" |
108 |
+ |
109 |
+inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user versionator |
110 |
+ |
111 |
+MY_P=${PN}-src-r${PV/_rc/-rc} |
112 |
+ |
113 |
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database" |
114 |
+HOMEPAGE="https://www.mongodb.com" |
115 |
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz" |
116 |
+ |
117 |
+LICENSE="AGPL-3 Apache-2.0" |
118 |
+SLOT="0" |
119 |
+KEYWORDS="~amd64" |
120 |
+IUSE="debug kerberos libressl mms-agent ssl test +tools" |
121 |
+ |
122 |
+RDEPEND=">=app-arch/snappy-1.1.3 |
123 |
+ >=dev-cpp/yaml-cpp-0.5.3 |
124 |
+ >=dev-libs/boost-1.60:=[threads(+)] |
125 |
+ >=dev-libs/libpcre-8.41[cxx] |
126 |
+ dev-libs/snowball-stemmer |
127 |
+ net-libs/libpcap |
128 |
+ >=sys-libs/zlib-1.2.11:= |
129 |
+ mms-agent? ( app-admin/mms-agent ) |
130 |
+ ssl? ( |
131 |
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) |
132 |
+ libressl? ( dev-libs/libressl:0= ) |
133 |
+ )" |
134 |
+DEPEND="${RDEPEND} |
135 |
+ ${PYTHON_DEPS} |
136 |
+ dev-python/cheetah[${PYTHON_USEDEP}] |
137 |
+ dev-python/pyyaml[${PYTHON_USEDEP}] |
138 |
+ dev-python/typing[${PYTHON_USEDEP}] |
139 |
+ <dev-util/scons-3 |
140 |
+ sys-libs/ncurses |
141 |
+ sys-libs/readline |
142 |
+ debug? ( dev-util/valgrind ) |
143 |
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] ) |
144 |
+ test? ( |
145 |
+ dev-python/pymongo[${PYTHON_USEDEP}] |
146 |
+ )" |
147 |
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )" |
148 |
+ |
149 |
+PATCHES=( |
150 |
+ "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch" |
151 |
+ "${FILESDIR}/${PN}-3.6.1-fix-scons.patch" |
152 |
+ "${FILESDIR}/${PN}-4.0.0-no-compass.patch" |
153 |
+) |
154 |
+ |
155 |
+S=${WORKDIR}/${MY_P} |
156 |
+ |
157 |
+pkg_pretend() { |
158 |
+ if [[ -n ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.6 ]]; then |
159 |
+ ewarn "To upgrade from a version earlier than the 3.6-series, you must" |
160 |
+ ewarn "successively upgrade major releases until you have upgraded" |
161 |
+ ewarn "to 3.6-series. Then upgrade to 4.0 series." |
162 |
+ elif [[ -n ${REPLACING_VERSIONS} ]]; then |
163 |
+ ewarn "Be sure to set featureCompatibilityVersion to 3.6 before upgrading." |
164 |
+ fi |
165 |
+} |
166 |
+ |
167 |
+pkg_setup() { |
168 |
+ enewgroup mongodb |
169 |
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb |
170 |
+ |
171 |
+ python-single-r1_pkg_setup |
172 |
+} |
173 |
+ |
174 |
+src_prepare() { |
175 |
+ default |
176 |
+ |
177 |
+ # remove bundled libs |
178 |
+ rm -r src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die |
179 |
+ |
180 |
+ # remove compass |
181 |
+ rm -r src/mongo/installer/compass || die |
182 |
+} |
183 |
+ |
184 |
+src_configure() { |
185 |
+ # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source |
186 |
+ # --use-system-icu fails tests |
187 |
+ # --use-system-tcmalloc is strongly NOT recommended: |
188 |
+ scons_opts=( |
189 |
+ CC="$(tc-getCC)" |
190 |
+ CXX="$(tc-getCXX)" |
191 |
+ |
192 |
+ --disable-warnings-as-errors |
193 |
+ --use-system-boost |
194 |
+ --use-system-pcre |
195 |
+ --use-system-snappy |
196 |
+ --use-system-stemmer |
197 |
+ --use-system-yaml |
198 |
+ --use-system-zlib |
199 |
+ ) |
200 |
+ |
201 |
+ use debug && scons_opts+=( --dbg=on ) |
202 |
+ use kerberos && scons_opts+=( --use-sasl-client ) |
203 |
+ use ssl && scons_opts+=( --ssl ) |
204 |
+ |
205 |
+ # respect mongoDB upstream's basic recommendations |
206 |
+ # see bug #536688 and #526114 |
207 |
+ if ! use debug; then |
208 |
+ filter-flags '-m*' |
209 |
+ filter-flags '-O?' |
210 |
+ fi |
211 |
+ |
212 |
+ default |
213 |
+} |
214 |
+ |
215 |
+src_compile() { |
216 |
+ escons "${scons_opts[@]}" core tools |
217 |
+} |
218 |
+ |
219 |
+# FEATURES="test -usersandbox" emerge dev-db/mongodb |
220 |
+src_test() { |
221 |
+ "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed" |
222 |
+} |
223 |
+ |
224 |
+src_install() { |
225 |
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr |
226 |
+ |
227 |
+ local x |
228 |
+ for x in /var/{lib,log}/${PN}; do |
229 |
+ keepdir "${x}" |
230 |
+ fowners mongodb:mongodb "${x}" |
231 |
+ fperms 0750 "${x}" |
232 |
+ done |
233 |
+ |
234 |
+ doman debian/mongo*.1 |
235 |
+ dodoc README docs/building.md |
236 |
+ |
237 |
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN} |
238 |
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN} |
239 |
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s} |
240 |
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s} |
241 |
+ |
242 |
+ insinto /etc |
243 |
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf |
244 |
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf |
245 |
+ |
246 |
+ systemd_dounit "${FILESDIR}/${PN}.service" |
247 |
+ |
248 |
+ insinto /etc/logrotate.d/ |
249 |
+ newins "${FILESDIR}/${PN}.logrotate" ${PN} |
250 |
+ |
251 |
+ # see bug #526114 |
252 |
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos} |
253 |
+} |
254 |
+ |
255 |
+pkg_preinst() { |
256 |
+ # wrt bug #461466 |
257 |
+ if [[ "$(get_libdir)" == "lib64" ]]; then |
258 |
+ rmdir "${ED}"/usr/lib/ &>/dev/null |
259 |
+ fi |
260 |
+} |
261 |
+ |
262 |
+pkg_postinst() { |
263 |
+ ewarn "Make sure to read the release notes and follow the upgrade process:" |
264 |
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/" |
265 |
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/#upgrade-procedures" |
266 |
+} |