1 |
commit: c563fa5f8d2bbb80c3c11b9627cf7501f4b8237a |
2 |
Author: Alexys Jacob <ultrabug <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 22 18:57:33 2019 +0000 |
4 |
Commit: Alexys Jacob <ultrabug <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 22 18:58:46 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c563fa5f |
7 |
|
8 |
dev-db/mongodb: version bump, fix #693282 |
9 |
|
10 |
Package-Manager: Portage-2.3.75, Repoman-2.3.17 |
11 |
Signed-off-by: Alexys Jacob <ultrabug <AT> gentoo.org> |
12 |
|
13 |
dev-db/mongodb/Manifest | 1 + |
14 |
.../mongodb-4.2.0-fix-scons-third-party.patch | 11 ++ |
15 |
dev-db/mongodb/files/mongodb-4.2.0-fix-scons.patch | 30 ++++ |
16 |
dev-db/mongodb/mongodb-4.2.0.ebuild | 168 +++++++++++++++++++++ |
17 |
4 files changed, 210 insertions(+) |
18 |
|
19 |
diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest |
20 |
index a80964813a5..e468012ed5c 100644 |
21 |
--- a/dev-db/mongodb/Manifest |
22 |
+++ b/dev-db/mongodb/Manifest |
23 |
@@ -2,3 +2,4 @@ DIST mongodb-src-r3.6.13.tar.gz 40853787 BLAKE2B de9621de4f570d569df5cfe026ea5da |
24 |
DIST mongodb-src-r3.6.8.tar.gz 40428295 BLAKE2B cc02f73cfb49fb38ccabaad5a02610ce73fc41895ce944e48669e254bcbc70c8872a1bd7f8e04371fae4fcd9af2466fd8550367dd1d1da5cee50b86fc5023bf2 SHA512 c981f3269be3bafb59aa89d36c39a801fd7007b60db6c09b4616a559aaf8e50b34cabbdac2b59f23552c0a5112913fba468f7e2ed9a5f4daa3702dcffdf34999 |
25 |
DIST mongodb-src-r4.0.10.tar.gz 49870574 BLAKE2B 1babbfa1a6d8fae390ec37042feff896c402772e832cc5b0b82fc4d531a6487ac2bd8d407c37ca75a76d78bc91cc665bfc3b7b223e6ceaaea2d921b337ef4d19 SHA512 891bfdc0d415515d7aa36aeb0618055ac6815c7d704537b88293226cecc1b677134db621fd90dee3913f4ff8174a888bcf68adee0a243d0f55ef6c0033a4f4b9 |
26 |
DIST mongodb-src-r4.0.12.tar.gz 49937644 BLAKE2B 81044a6d68be6420d30fb2d7386ff29871a696cad94ce5977c1aba60c2ce80e18ccb86492c1947a359ef124332ea82ac3cb0fb73a68f51904a008fdf911aa055 SHA512 802eaf57d56c5e8e217344f10104a201acb6f5abef0065fc1bb8e6ceef13fe489b7ae46ed0d55b5bad50fe3579860b1c1471d224b51b0f15f968278cb5f6a47a |
27 |
+DIST mongodb-src-r4.2.0.tar.gz 60781115 BLAKE2B 75531f69647c84f71127d4cdccf13bc21e50586240c767b4c1aa1efbf56cf008bf4f32b3a2011120ad9099da0f97be934375b8dd3d012670034327175c454f0e SHA512 be2f4e00364ac49b1a0490fa859640680a4d10d861252d200bd3db535c770a3b97cee9de6d2b0b6b3622502d055ba92b6c1d88cb1134d251aa2cf50a8951b64c |
28 |
|
29 |
diff --git a/dev-db/mongodb/files/mongodb-4.2.0-fix-scons-third-party.patch b/dev-db/mongodb/files/mongodb-4.2.0-fix-scons-third-party.patch |
30 |
new file mode 100644 |
31 |
index 00000000000..6afa0d75caf |
32 |
--- /dev/null |
33 |
+++ b/dev-db/mongodb/files/mongodb-4.2.0-fix-scons-third-party.patch |
34 |
@@ -0,0 +1,11 @@ |
35 |
+--- a/src/third_party/SConscript 2019-09-22 14:31:48.847382840 +0200 |
36 |
++++ b/src/third_party/SConscript 2019-09-22 14:32:56.858997243 +0200 |
37 |
+@@ -188,7 +188,7 @@ |
38 |
+ libraries = thisEnv.Flatten([libraries]) |
39 |
+ parts = thisEnv.Flatten([parts]) |
40 |
+ for lib in libraries: |
41 |
+- mods = thirdPartyEnvironmentModifications[lib] |
42 |
++ mods = thirdPartyEnvironmentModifications.get(lib, {}) |
43 |
+ if not parts: |
44 |
+ thisEnv.PrependUnique(**mods) |
45 |
+ else: |
46 |
|
47 |
diff --git a/dev-db/mongodb/files/mongodb-4.2.0-fix-scons.patch b/dev-db/mongodb/files/mongodb-4.2.0-fix-scons.patch |
48 |
new file mode 100644 |
49 |
index 00000000000..3c929df6f96 |
50 |
--- /dev/null |
51 |
+++ b/dev-db/mongodb/files/mongodb-4.2.0-fix-scons.patch |
52 |
@@ -0,0 +1,30 @@ |
53 |
+--- a/SConstruct 2019-08-21 09:25:00.980260318 +0200 |
54 |
++++ b/SConstruct 2019-08-21 09:27:53.653601283 +0200 |
55 |
+@@ -1858,7 +1858,6 @@ |
56 |
+ # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used. |
57 |
+ env.Append( CCFLAGS=["-fno-omit-frame-pointer", |
58 |
+ "-fno-strict-aliasing", |
59 |
+- "-ggdb" if not env.TargetOSIs('emscripten') else "-g", |
60 |
+ "-pthread", |
61 |
+ "-Wall", |
62 |
+ "-Wsign-compare", |
63 |
+@@ -1870,6 +1869,8 @@ |
64 |
+ env.Append( CCFLAGS=["-Werror"] ) |
65 |
+ |
66 |
+ env.Append( CXXFLAGS=["-Woverloaded-virtual"] ) |
67 |
++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] ) |
68 |
++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] ) |
69 |
+ if env.ToolchainIs('clang'): |
70 |
+ env.Append( CXXFLAGS=['-Werror=unused-result'] ) |
71 |
+ |
72 |
+@@ -1890,8 +1891,8 @@ |
73 |
+ |
74 |
+ env.Append( LIBS=[] ) |
75 |
+ |
76 |
+- #make scons colorgcc friendly |
77 |
+- for key in ('HOME', 'TERM'): |
78 |
++ #make scons colorgcc, distcc, ccache friendly |
79 |
++ for key in ('HOME', 'PATH', 'TERM'): |
80 |
+ try: |
81 |
+ env['ENV'][key] = os.environ[key] |
82 |
+ except KeyError: |
83 |
|
84 |
diff --git a/dev-db/mongodb/mongodb-4.2.0.ebuild b/dev-db/mongodb/mongodb-4.2.0.ebuild |
85 |
new file mode 100644 |
86 |
index 00000000000..932ef4e5405 |
87 |
--- /dev/null |
88 |
+++ b/dev-db/mongodb/mongodb-4.2.0.ebuild |
89 |
@@ -0,0 +1,168 @@ |
90 |
+# Copyright 1999-2019 Gentoo Authors |
91 |
+# Distributed under the terms of the GNU General Public License v2 |
92 |
+ |
93 |
+EAPI=7 |
94 |
+ |
95 |
+PYTHON_COMPAT=( python3_{5,6,7} ) |
96 |
+ |
97 |
+SCONS_MIN_VERSION="2.5.0" |
98 |
+CHECKREQS_DISK_BUILD="2400M" |
99 |
+CHECKREQS_DISK_USR="512M" |
100 |
+CHECKREQS_MEMORY="1024M" |
101 |
+ |
102 |
+inherit check-reqs flag-o-matic multiprocessing pax-utils python-any-r1 scons-utils systemd toolchain-funcs user |
103 |
+ |
104 |
+MY_P=${PN}-src-r${PV/_rc/-rc} |
105 |
+ |
106 |
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database" |
107 |
+HOMEPAGE="https://www.mongodb.com" |
108 |
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz" |
109 |
+ |
110 |
+LICENSE="Apache-2.0 SSPL-1" |
111 |
+SLOT="0" |
112 |
+KEYWORDS="~amd64" |
113 |
+IUSE="debug kerberos libressl lto mms-agent ssl test +tools" |
114 |
+ |
115 |
+RDEPEND=">=app-arch/snappy-1.1.3 |
116 |
+ >=dev-cpp/yaml-cpp-0.6.2:= |
117 |
+ >=dev-libs/boost-1.70:=[threads(+)] |
118 |
+ >=dev-libs/libpcre-8.42[cxx] |
119 |
+ app-arch/zstd |
120 |
+ dev-libs/snowball-stemmer |
121 |
+ net-libs/libpcap |
122 |
+ >=sys-libs/zlib-1.2.11:= |
123 |
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] ) |
124 |
+ mms-agent? ( app-admin/mms-agent ) |
125 |
+ ssl? ( |
126 |
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) |
127 |
+ libressl? ( dev-libs/libressl:0= ) |
128 |
+ )" |
129 |
+DEPEND="${RDEPEND} |
130 |
+ ${PYTHON_DEPS} |
131 |
+ $(python_gen_any_dep ' |
132 |
+ dev-python/cheetah3[${PYTHON_USEDEP}] |
133 |
+ dev-python/pyyaml[${PYTHON_USEDEP}] |
134 |
+ virtual/python-typing[${PYTHON_USEDEP}] |
135 |
+ ') |
136 |
+ sys-libs/ncurses:0= |
137 |
+ sys-libs/readline:0= |
138 |
+ debug? ( dev-util/valgrind ) |
139 |
+ test? ( |
140 |
+ $(python_gen_any_dep 'dev-python/pymongo[${PYTHON_USEDEP}]') |
141 |
+ )" |
142 |
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )" |
143 |
+ |
144 |
+PATCHES=( |
145 |
+ "${FILESDIR}/${PN}-4.2.0-fix-scons.patch" |
146 |
+ "${FILESDIR}/${PN}-4.2.0-fix-scons-third-party.patch" |
147 |
+ "${FILESDIR}/${PN}-4.0.0-no-compass.patch" |
148 |
+) |
149 |
+ |
150 |
+S="${WORKDIR}/${MY_P}" |
151 |
+ |
152 |
+pkg_pretend() { |
153 |
+ if [[ -n ${REPLACING_VERSIONS} ]]; then |
154 |
+ if ver_test "$REPLACING_VERSIONS" -lt 4.0; then |
155 |
+ ewarn "To upgrade from a version earlier than the 4.0-series, you must" |
156 |
+ ewarn "successively upgrade major releases until you have upgraded" |
157 |
+ ewarn "to 4.0-series. Then upgrade to 4.2 series." |
158 |
+ else |
159 |
+ ewarn "Be sure to set featureCompatibilityVersion to 4.0 before upgrading." |
160 |
+ fi |
161 |
+ fi |
162 |
+} |
163 |
+ |
164 |
+pkg_setup() { |
165 |
+ enewgroup mongodb |
166 |
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb |
167 |
+ |
168 |
+ python-any-r1_pkg_setup |
169 |
+} |
170 |
+ |
171 |
+src_prepare() { |
172 |
+ default |
173 |
+ |
174 |
+ # remove bundled libs |
175 |
+ rm -r src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*,zstandard-*} || die |
176 |
+ |
177 |
+ # remove compass |
178 |
+ rm -r src/mongo/installer/compass || die |
179 |
+} |
180 |
+ |
181 |
+src_configure() { |
182 |
+ # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source |
183 |
+ # --use-system-icu fails tests |
184 |
+ # --use-system-tcmalloc is strongly NOT recommended: |
185 |
+ scons_opts=( |
186 |
+ CC="$(tc-getCC)" |
187 |
+ CXX="$(tc-getCXX)" |
188 |
+ |
189 |
+ --disable-warnings-as-errors |
190 |
+ --use-system-boost |
191 |
+ --use-system-pcre |
192 |
+ --use-system-snappy |
193 |
+ --use-system-stemmer |
194 |
+ --use-system-yaml |
195 |
+ --use-system-zlib |
196 |
+ --use-system-zstd |
197 |
+ ) |
198 |
+ |
199 |
+ use debug && scons_opts+=( --dbg=on ) |
200 |
+ use kerberos && scons_opts+=( --use-sasl-client ) |
201 |
+ use lto && scons_opts+=( --lto=on ) |
202 |
+ use ssl && scons_opts+=( --ssl ) |
203 |
+ |
204 |
+ # respect mongoDB upstream's basic recommendations |
205 |
+ # see bug #536688 and #526114 |
206 |
+ if ! use debug; then |
207 |
+ filter-flags '-m*' |
208 |
+ filter-flags '-O?' |
209 |
+ fi |
210 |
+ |
211 |
+ default |
212 |
+} |
213 |
+ |
214 |
+src_compile() { |
215 |
+ escons "${scons_opts[@]}" core tools |
216 |
+} |
217 |
+ |
218 |
+# FEATURES="test -usersandbox" emerge dev-db/mongodb |
219 |
+src_test() { |
220 |
+ "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed" |
221 |
+} |
222 |
+ |
223 |
+src_install() { |
224 |
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr |
225 |
+ |
226 |
+ doman debian/mongo*.1 |
227 |
+ dodoc README docs/building.md |
228 |
+ |
229 |
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN} |
230 |
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN} |
231 |
+ newinitd "${FILESDIR}/mongos.initd-r3" mongos |
232 |
+ newconfd "${FILESDIR}/mongos.confd-r3" mongos |
233 |
+ |
234 |
+ insinto /etc |
235 |
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf |
236 |
+ newins "${FILESDIR}/mongos.conf-r2" mongos.conf |
237 |
+ |
238 |
+ systemd_dounit "${FILESDIR}/${PN}.service" |
239 |
+ |
240 |
+ insinto /etc/logrotate.d/ |
241 |
+ newins "${FILESDIR}/${PN}.logrotate" ${PN} |
242 |
+ |
243 |
+ # see bug #526114 |
244 |
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos} |
245 |
+ |
246 |
+ local x |
247 |
+ for x in /var/{lib,log}/${PN}; do |
248 |
+ diropts -m0750 -o mongodb -g mongodb |
249 |
+ keepdir "${x}" |
250 |
+ done |
251 |
+} |
252 |
+ |
253 |
+pkg_postinst() { |
254 |
+ ewarn "Make sure to read the release notes and follow the upgrade process:" |
255 |
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/" |
256 |
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/#upgrade-procedures" |
257 |
+} |