1 |
commit: bc8b63573cd8ed98205502464d7340438ed4cf4c |
2 |
Author: Ultrabug <ultrabug <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Dec 27 16:59:13 2015 +0000 |
4 |
Commit: Alexys Jacob <ultrabug <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 27 16:59:27 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc8b6357 |
7 |
|
8 |
dev-db/mongodb: version bump fix #568322 thx to Tomáš Mózes and Bob Cochran |
9 |
|
10 |
Package-Manager: portage-2.2.25 |
11 |
|
12 |
dev-db/mongodb/Manifest | 1 + |
13 |
dev-db/mongodb/files/mongodb-3.2.0-fix-scons.patch | 30 ++++ |
14 |
dev-db/mongodb/mongodb-3.2.0.ebuild | 174 +++++++++++++++++++++ |
15 |
3 files changed, 205 insertions(+) |
16 |
|
17 |
diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest |
18 |
index d1d69ed..ebaaf21 100644 |
19 |
--- a/dev-db/mongodb/Manifest |
20 |
+++ b/dev-db/mongodb/Manifest |
21 |
@@ -7,3 +7,4 @@ DIST mongodb-src-r3.0.5.tar.gz 26332788 SHA256 05b16a7991aa65b1d396a3dc622107fba |
22 |
DIST mongodb-src-r3.0.6.tar.gz 26241944 SHA256 609f6bd416ed11898b49406332b8ff301de239ba72df0bdbf1603233229c822d SHA512 1990e9011ae586e30aef28be58f9fc6d8b7f45b787dbde9785c82eff6fb0a70ea45152e450c032a898e6464bbb9b1683082f2a072ba874f7532e167330658175 WHIRLPOOL 4090cfb5912f81e6329d3c3680009037f22cd406611f78dc0ddd6fc9a63ee5261c7751fe83c60add2d5917f57b2a3c2796c48abb6f633157a8811d0571793a35 |
23 |
DIST mongodb-src-r3.0.7.tar.gz 26261343 SHA256 2d25bae7c3bfb3c0e168fcad526dc212da72faaeae6d1573db631cacb172a7e7 SHA512 183691c5dc137ea4b86d53d24d2935fd66ed8de60fbf5eca0a0a39c159be1f29043cd655cde1a213a98a76b2b3e6369dbccf790b02a1cc4b622c067ad3c0c91b WHIRLPOOL 986d962e76122142ca810eb7fe13ef66c88c7e354f066292836fc1207fa64c8bbb7fc49d1392db503c8a594d2593e2a19d831d7367462fcfa43eea38768e6323 |
24 |
DIST mongodb-src-r3.0.8.tar.gz 26245612 SHA256 3574f2f577e212ff1876485e1502c91f70f996fbbcc5a4657fe440ac76bd97a5 SHA512 3b8578ed2a6196cda0867d219214e1dc9fe95ecaa8320cdee3766c9a8a78e9cf66013769a3fbbf03ccf9a35d97e02a1eaa5fe8fc7429a0d76dd78486db7520ac WHIRLPOOL ded0b84b940c66b8a7ef6b363f179a4b2c1ddc23a3077b9cadb01f76c2a90956f0a720e713d4806db6132ac96b1026b82c2bf966ec3869af095e12590ea04d0e |
25 |
+DIST mongodb-src-r3.2.0.tar.gz 26440220 SHA256 c6dd1d1670b86cbf02a531ddf7a7cda8f138d8733acce33766f174bd1e5ab2ee SHA512 4b321b582f5ec2613b869b003a02494c8a9e3b772b1f13898417b1e831c204468309a0e1785acd3b85c8a663cae91e55e44f53f8b74bd3a516b1e1471f606882 WHIRLPOOL c10639597303c122376d7387a4d5c9bdf6c44d9971f476fab72c85e78206ed256270d1a5e01e53aef4979127fdd03b3e5fbefa50ebf7639fa172723d6eee9737 |
26 |
|
27 |
diff --git a/dev-db/mongodb/files/mongodb-3.2.0-fix-scons.patch b/dev-db/mongodb/files/mongodb-3.2.0-fix-scons.patch |
28 |
new file mode 100644 |
29 |
index 0000000..1eb79d1 |
30 |
--- /dev/null |
31 |
+++ b/dev-db/mongodb/files/mongodb-3.2.0-fix-scons.patch |
32 |
@@ -0,0 +1,30 @@ |
33 |
+--- a/SConstruct 2015-12-02 20:01:34.000000000 +0100 |
34 |
++++ b/SConstruct 2015-12-27 17:06:45.563739544 +0100 |
35 |
+@@ -1371,7 +1371,6 @@ |
36 |
+ env.Append( CCFLAGS=["-fno-omit-frame-pointer", |
37 |
+ "-fPIC", |
38 |
+ "-fno-strict-aliasing", |
39 |
+- "-ggdb", |
40 |
+ "-pthread", |
41 |
+ "-Wall", |
42 |
+ "-Wsign-compare", |
43 |
+@@ -1382,8 +1381,9 @@ |
44 |
+ if not has_option("disable-warnings-as-errors"): |
45 |
+ env.Append( CCFLAGS=["-Werror"] ) |
46 |
+ |
47 |
+- env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] ) |
48 |
+ env.Append( LINKFLAGS=["-fPIC", "-pthread"] ) |
49 |
++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] ) |
50 |
++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] ) |
51 |
+ |
52 |
+ # SERVER-9761: Ensure early detection of missing symbols in dependent libraries at program |
53 |
+ # startup. |
54 |
+@@ -1398,7 +1398,7 @@ |
55 |
+ env.Append( SHLINKFLAGS=["-Wl,-z,now"] ) |
56 |
+ env.Append( LINKFLAGS=["-rdynamic"] ) |
57 |
+ |
58 |
+- env.Append( LIBS=[] ) |
59 |
++ env.Append( LIBS=['pcre', 'pcrecpp', 'snappy', 'yaml-cpp'] ) |
60 |
+ |
61 |
+ #make scons colorgcc friendly |
62 |
+ for key in ('HOME', 'TERM'): |
63 |
|
64 |
diff --git a/dev-db/mongodb/mongodb-3.2.0.ebuild b/dev-db/mongodb/mongodb-3.2.0.ebuild |
65 |
new file mode 100644 |
66 |
index 0000000..ab7952d |
67 |
--- /dev/null |
68 |
+++ b/dev-db/mongodb/mongodb-3.2.0.ebuild |
69 |
@@ -0,0 +1,174 @@ |
70 |
+# Copyright 1999-2015 Gentoo Foundation |
71 |
+# Distributed under the terms of the GNU General Public License v2 |
72 |
+# $Id$ |
73 |
+ |
74 |
+EAPI=5 |
75 |
+SCONS_MIN_VERSION="2.3.0" |
76 |
+CHECKREQS_DISK_BUILD="2400M" |
77 |
+CHECKREQS_DISK_USR="512M" |
78 |
+CHECKREQS_MEMORY="1024M" |
79 |
+ |
80 |
+inherit eutils flag-o-matic multilib pax-utils scons-utils systemd user versionator check-reqs |
81 |
+ |
82 |
+MY_P=${PN}-src-r${PV/_rc/-rc} |
83 |
+ |
84 |
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database" |
85 |
+HOMEPAGE="http://www.mongodb.org" |
86 |
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz" |
87 |
+ |
88 |
+LICENSE="AGPL-3 Apache-2.0" |
89 |
+SLOT="0" |
90 |
+KEYWORDS="~amd64 ~x86" |
91 |
+IUSE="debug kerberos libressl mms-agent ssl test +tools" |
92 |
+ |
93 |
+RDEPEND=">=app-arch/snappy-1.1.2 |
94 |
+ >=dev-cpp/yaml-cpp-0.5.1 |
95 |
+ >=dev-libs/boost-1.57[threads(+)] |
96 |
+ >=dev-libs/libpcre-8.37[cxx] |
97 |
+ dev-libs/snowball-stemmer |
98 |
+ net-libs/libpcap |
99 |
+ >=sys-libs/zlib-1.2.8 |
100 |
+ mms-agent? ( app-admin/mms-agent ) |
101 |
+ ssl? ( |
102 |
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) |
103 |
+ libressl? ( dev-libs/libressl:= ) |
104 |
+ )" |
105 |
+DEPEND="${RDEPEND} |
106 |
+ >=sys-devel/gcc-4.8.2:* |
107 |
+ sys-libs/ncurses |
108 |
+ sys-libs/readline |
109 |
+ debug? ( dev-util/valgrind ) |
110 |
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] ) |
111 |
+ test? ( |
112 |
+ dev-python/pymongo |
113 |
+ dev-python/pyyaml |
114 |
+ )" |
115 |
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )" |
116 |
+ |
117 |
+S=${WORKDIR}/${MY_P} |
118 |
+ |
119 |
+pkg_pretend() { |
120 |
+ if [[ ${REPLACING_VERSIONS} < 3.0 ]]; then |
121 |
+ ewarn "To upgrade an existing MongoDB deployment to 3.2, you must be" |
122 |
+ ewarn "running a 3.0-series release. Please update to the latest 3.0" |
123 |
+ ewarn "release before continuing if wish to keep your data." |
124 |
+ fi |
125 |
+} |
126 |
+ |
127 |
+pkg_setup() { |
128 |
+ enewgroup mongodb |
129 |
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb |
130 |
+ |
131 |
+ # Maintainer notes |
132 |
+ # |
133 |
+ # --use-system-tcmalloc is strongly NOT recommended: |
134 |
+ # https://www.mongodb.org/about/contributors/tutorial/build-mongodb-from-source/ |
135 |
+ |
136 |
+ scons_opts="--variant-dir=build --cc=$(tc-getCC) --cxx=$(tc-getCXX)" |
137 |
+ scons_opts+=" --disable-warnings-as-errors" |
138 |
+ scons_opts+=" --use-system-boost" |
139 |
+ scons_opts+=" --use-system-pcre" |
140 |
+ scons_opts+=" --use-system-snappy" |
141 |
+ scons_opts+=" --use-system-stemmer" |
142 |
+ scons_opts+=" --use-system-yaml" |
143 |
+ scons_opts+=" --use-system-zlib" |
144 |
+ |
145 |
+ if use debug; then |
146 |
+ scons_opts+=" --dbg=on" |
147 |
+ fi |
148 |
+ |
149 |
+ if use prefix; then |
150 |
+ scons_opts+=" --cpppath=${EPREFIX}/usr/include" |
151 |
+ scons_opts+=" --libpath=${EPREFIX}/usr/$(get_libdir)" |
152 |
+ fi |
153 |
+ |
154 |
+ if use kerberos; then |
155 |
+ scons_opts+=" --use-sasl-client" |
156 |
+ fi |
157 |
+ |
158 |
+ if use ssl; then |
159 |
+ scons_opts+=" --ssl" |
160 |
+ fi |
161 |
+} |
162 |
+ |
163 |
+src_prepare() { |
164 |
+ epatch "${FILESDIR}/${PN}-3.2.0-fix-scons.patch" |
165 |
+} |
166 |
+ |
167 |
+src_compile() { |
168 |
+ # respect mongoDB upstream's basic recommendations |
169 |
+ # see bug #536688 and #526114 |
170 |
+ if ! use debug; then |
171 |
+ filter-flags '-m*' |
172 |
+ filter-flags '-O?' |
173 |
+ fi |
174 |
+ escons ${scons_opts} core tools |
175 |
+} |
176 |
+ |
177 |
+src_install() { |
178 |
+ escons ${scons_opts} --nostrip install --prefix="${ED}"/usr |
179 |
+ |
180 |
+ for x in /var/{lib,log}/${PN}; do |
181 |
+ keepdir "${x}" |
182 |
+ fowners mongodb:mongodb "${x}" |
183 |
+ done |
184 |
+ |
185 |
+ doman debian/mongo*.1 |
186 |
+ dodoc README docs/building.md |
187 |
+ |
188 |
+ newinitd "${FILESDIR}/${PN}.initd-r2" ${PN} |
189 |
+ newconfd "${FILESDIR}/${PN}.confd-r2" ${PN} |
190 |
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r2" ${PN/db/s} |
191 |
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r2" ${PN/db/s} |
192 |
+ |
193 |
+ insinto /etc |
194 |
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf |
195 |
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf |
196 |
+ |
197 |
+ systemd_dounit "${FILESDIR}/${PN}.service" |
198 |
+ |
199 |
+ insinto /etc/logrotate.d/ |
200 |
+ newins "${FILESDIR}/${PN}.logrotate" ${PN} |
201 |
+ |
202 |
+ # see bug #526114 |
203 |
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos} |
204 |
+} |
205 |
+ |
206 |
+pkg_preinst() { |
207 |
+ # wrt bug #461466 |
208 |
+ if [[ "$(get_libdir)" == "lib64" ]]; then |
209 |
+ rmdir "${ED}"/usr/lib/ &>/dev/null |
210 |
+ fi |
211 |
+} |
212 |
+ |
213 |
+src_test() { |
214 |
+ # this one test fails |
215 |
+ rm jstests/core/repl_write_threads_start_param.js |
216 |
+ |
217 |
+ ./buildscripts/resmoke.py --dbpathPrefix=test --suites core || die "Tests failed" |
218 |
+} |
219 |
+ |
220 |
+pkg_postinst() { |
221 |
+ if [[ ${REPLACING_VERSIONS} < 3.0 ]]; then |
222 |
+ ewarn "!! IMPORTANT !!" |
223 |
+ ewarn " " |
224 |
+ ewarn "${PN} configuration files have changed !" |
225 |
+ ewarn " " |
226 |
+ ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf" |
227 |
+ ewarn " http://docs.mongodb.org/manual/reference/configuration-options/" |
228 |
+ ewarn " " |
229 |
+ ewarn "Make sure you also follow the upgrading process :" |
230 |
+ ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/" |
231 |
+ ewarn " " |
232 |
+ ewarn "MongoDB 3.0 introduces the WiredTiger storage engine." |
233 |
+ ewarn "WiredTiger is incompatible with MMAPv1 and you need to dump/reload your data if you want to use it." |
234 |
+ ewarn "Once you have your data dumped, you need to set storage.engine: wiredTiger in /etc/${PN}.conf" |
235 |
+ ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/#change-storage-engine-to-wiredtiger" |
236 |
+ fi |
237 |
+ |
238 |
+ ewarn "Make sure to read the release notes and follow the upgrade process:" |
239 |
+ ewarn " https://docs.mongodb.org/manual/release-notes/3.2/" |
240 |
+ ewarn " https://docs.mongodb.org/master/release-notes/3.2-upgrade/" |
241 |
+ ewarn |
242 |
+ ewarn " Starting in 3.2, MongoDB uses the WiredTiger as the default storage engine." |
243 |
+} |