1 |
commit: 948a8840faad422e932b4950ced1b2a8509e6107 |
2 |
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 20 08:54:09 2021 +0000 |
4 |
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 20 08:55:34 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=948a8840 |
7 |
|
8 |
Revert (partially) "dev-db/mongodb: Remove old" |
9 |
|
10 |
This partially reverts commit b61ebf04af42312a1b9ff746e5f2599d1398a826. |
11 |
|
12 |
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org> |
13 |
|
14 |
dev-db/mongodb/Manifest | 1 + |
15 |
dev-db/mongodb/mongodb-4.2.15-r1.ebuild | 176 ++++++++++++++++++++++++++++++++ |
16 |
2 files changed, 177 insertions(+) |
17 |
|
18 |
diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest |
19 |
index 687b1b9815e..8108b678df4 100644 |
20 |
--- a/dev-db/mongodb/Manifest |
21 |
+++ b/dev-db/mongodb/Manifest |
22 |
@@ -1,3 +1,4 @@ |
23 |
+DIST mongodb-src-r4.2.15.tar.gz 62187847 BLAKE2B eb9cbf52b5aeb95d3c6c6bd14da9731a85a24e2c3560163be999bddff1cd1ac90f9cf07b4c3fe22e35ffcdd174a6b2720a801fa179f574ff33150d1a4660ef9e SHA512 ee46a2dfb7ae23ad38da49bf126a2bc7932bded8f01d34516ad575d2aed5d6233c5ad620b2a4424a98afb9e80e26acf40c66982cdd0637c13f0f7aaae8b746a0 |
24 |
DIST mongodb-src-r4.4.1.tar.gz 49644743 BLAKE2B 7d84998c69b9b55164ebab04b49c38a4113a0f58d431612389ec37eb044fba1adf9284e9d4454bd40bb7a071fd042308a5cd350129d6d52480412cf6b868ec2b SHA512 16aa66995ea8cfe0cc47b96c1c5643a28ab47fc9f27bd93404cf572944ab30492df7c9255553f918b353cd7157a6ccde9ac6f58bfba322fb52c2d7409c6fb9b0 |
25 |
DIST mongodb-src-r4.4.4.tar.gz 49942905 BLAKE2B 8aa9813e87e216899b3c609b413ce6915d6ddf30faea3c0ecda2a14476fc6b08024614fa7b20e1703b5908759459e88e5e302539c27525c2359233743aa7dcda SHA512 a999528a8a6bf4bf0b8ff8f5169b1aadb3c4dab9c7d936c59d66f238b864fad6e8fb6a1b9ec27f395fca95152ee020f96a8c1cf8960a48de3ce5141f8dda7d88 |
26 |
DIST mongodb-src-r4.4.8.tar.gz 50492854 BLAKE2B 4776b17e88104879ea69468ff277b07dc317d936654bb26c69750e0aaf8f51bea73994e7fc4841228d8506db392e0454b5fd16257071b86a2e4ad34e90f33632 SHA512 9b0cd81c9c731255a6c079c040ed342a51a72e3ea72047d3ae959c0afde50b0cdb1fcfe7fcbea30c449a3618a09d213752277cee6eb9bc0a55915b9229543606 |
27 |
|
28 |
diff --git a/dev-db/mongodb/mongodb-4.2.15-r1.ebuild b/dev-db/mongodb/mongodb-4.2.15-r1.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000000..3002335b9c7 |
31 |
--- /dev/null |
32 |
+++ b/dev-db/mongodb/mongodb-4.2.15-r1.ebuild |
33 |
@@ -0,0 +1,176 @@ |
34 |
+# Copyright 1999-2021 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=7 |
38 |
+ |
39 |
+PYTHON_COMPAT=( python3_{7..9} ) |
40 |
+ |
41 |
+SCONS_MIN_VERSION="2.5.0" |
42 |
+CHECKREQS_DISK_BUILD="2400M" |
43 |
+CHECKREQS_DISK_USR="512M" |
44 |
+CHECKREQS_MEMORY="1024M" |
45 |
+ |
46 |
+inherit check-reqs flag-o-matic multiprocessing pax-utils python-any-r1 scons-utils systemd toolchain-funcs |
47 |
+ |
48 |
+MY_P=${PN}-src-r${PV/_rc/-rc} |
49 |
+ |
50 |
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database" |
51 |
+HOMEPAGE="https://www.mongodb.com" |
52 |
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz" |
53 |
+ |
54 |
+LICENSE="Apache-2.0 SSPL-1" |
55 |
+SLOT="0" |
56 |
+KEYWORDS="~amd64 ~arm64" |
57 |
+IUSE="debug kerberos lto ssl test +tools" |
58 |
+RESTRICT="!test? ( test )" |
59 |
+ |
60 |
+RDEPEND="acct-group/mongodb |
61 |
+ acct-user/mongodb |
62 |
+ >=app-arch/snappy-1.1.3:= |
63 |
+ >=dev-cpp/yaml-cpp-0.6.2:= |
64 |
+ >=dev-libs/boost-1.70:=[threads(+)] |
65 |
+ >=dev-libs/libpcre-8.42[cxx] |
66 |
+ app-arch/zstd:= |
67 |
+ dev-libs/snowball-stemmer:= |
68 |
+ net-libs/libpcap |
69 |
+ >=sys-libs/zlib-1.2.11:= |
70 |
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] ) |
71 |
+ ssl? ( |
72 |
+ >=dev-libs/openssl-1.0.1g:0= |
73 |
+ )" |
74 |
+DEPEND="${RDEPEND} |
75 |
+ ${PYTHON_DEPS} |
76 |
+ $(python_gen_any_dep ' |
77 |
+ test? ( dev-python/pymongo[${PYTHON_USEDEP}] dev-python/requests[${PYTHON_USEDEP}] ) |
78 |
+ >=dev-util/scons-2.5.0[${PYTHON_USEDEP}] |
79 |
+ dev-python/cheetah3[${PYTHON_USEDEP}] |
80 |
+ dev-python/psutil[${PYTHON_USEDEP}] |
81 |
+ dev-python/pyyaml[${PYTHON_USEDEP}] |
82 |
+ ') |
83 |
+ sys-libs/ncurses:0= |
84 |
+ sys-libs/readline:0= |
85 |
+ debug? ( dev-util/valgrind )" |
86 |
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )" |
87 |
+ |
88 |
+PATCHES=( |
89 |
+ "${FILESDIR}/${PN}-4.2.0-fix-scons.patch" |
90 |
+ "${FILESDIR}/${PN}-4.4.1-gcc11.patch" |
91 |
+ "${FILESDIR}/${PN}-4.2.15-no-compass.patch" |
92 |
+ "${FILESDIR}/${PN}-5.0.2-glibc-2.34.patch" |
93 |
+) |
94 |
+ |
95 |
+S="${WORKDIR}/${MY_P}" |
96 |
+ |
97 |
+python_check_deps() { |
98 |
+ if use test; then |
99 |
+ has_version "dev-python/pymongo[${PYTHON_USEDEP}]" || return 1 |
100 |
+ has_version "dev-python/requests[${PYTHON_USEDEP}]" || return 1 |
101 |
+ fi |
102 |
+ |
103 |
+ has_version ">=dev-util/scons-2.5.0[${PYTHON_USEDEP}]" && |
104 |
+ has_version "dev-python/cheetah3[${PYTHON_USEDEP}]" && |
105 |
+ has_version "dev-python/psutil[${PYTHON_USEDEP}]" && |
106 |
+ has_version "dev-python/pyyaml[${PYTHON_USEDEP}]" |
107 |
+} |
108 |
+ |
109 |
+pkg_pretend() { |
110 |
+ if [[ -n ${REPLACING_VERSIONS} ]]; then |
111 |
+ if ver_test "$REPLACING_VERSIONS" -lt 4.0; then |
112 |
+ ewarn "To upgrade from a version earlier than the 4.0-series, you must" |
113 |
+ ewarn "successively upgrade major releases until you have upgraded" |
114 |
+ ewarn "to 4.0-series. Then upgrade to 4.2 series." |
115 |
+ else |
116 |
+ ewarn "Be sure to set featureCompatibilityVersion to 4.0 before upgrading." |
117 |
+ fi |
118 |
+ fi |
119 |
+} |
120 |
+ |
121 |
+src_prepare() { |
122 |
+ default |
123 |
+ |
124 |
+ # remove bundled libs |
125 |
+ rm -r src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*,zstandard-*} || die |
126 |
+ |
127 |
+ # remove compass |
128 |
+ rm -r src/mongo/installer/compass || die |
129 |
+} |
130 |
+ |
131 |
+src_configure() { |
132 |
+ # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source |
133 |
+ # --use-system-icu fails tests |
134 |
+ # --use-system-tcmalloc is strongly NOT recommended: |
135 |
+ scons_opts=( |
136 |
+ CC="$(tc-getCC)" |
137 |
+ CXX="$(tc-getCXX)" |
138 |
+ |
139 |
+ --disable-warnings-as-errors |
140 |
+ --use-system-boost |
141 |
+ --use-system-pcre |
142 |
+ --use-system-snappy |
143 |
+ --use-system-stemmer |
144 |
+ --use-system-yaml |
145 |
+ --use-system-zlib |
146 |
+ --use-system-zstd |
147 |
+ ) |
148 |
+ |
149 |
+ use arm64 && scons_opts+=( --use-hardware-crc32=off ) # Bug 701300 |
150 |
+ use debug && scons_opts+=( --dbg=on ) |
151 |
+ use kerberos && scons_opts+=( --use-sasl-client ) |
152 |
+ use lto && scons_opts+=( --lto=on ) |
153 |
+ use ssl && scons_opts+=( --ssl ) |
154 |
+ |
155 |
+ # respect mongoDB upstream's basic recommendations |
156 |
+ # see bug #536688 and #526114 |
157 |
+ if ! use debug; then |
158 |
+ filter-flags '-m*' |
159 |
+ filter-flags '-O?' |
160 |
+ fi |
161 |
+ |
162 |
+ default |
163 |
+} |
164 |
+ |
165 |
+src_compile() { |
166 |
+ escons "${scons_opts[@]}" core tools |
167 |
+} |
168 |
+ |
169 |
+# FEATURES="test -usersandbox" emerge dev-db/mongodb |
170 |
+src_test() { |
171 |
+ ewarn "Tests may hang with FEATURES=usersandbox" |
172 |
+ "${EPYTHON}" ./buildscripts/resmoke.py run --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed with ${EPYTHON}" |
173 |
+} |
174 |
+ |
175 |
+src_install() { |
176 |
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr |
177 |
+ |
178 |
+ doman debian/mongo*.1 |
179 |
+ dodoc README docs/building.md |
180 |
+ |
181 |
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN} |
182 |
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN} |
183 |
+ newinitd "${FILESDIR}/mongos.initd-r3" mongos |
184 |
+ newconfd "${FILESDIR}/mongos.confd-r3" mongos |
185 |
+ |
186 |
+ insinto /etc |
187 |
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf |
188 |
+ newins "${FILESDIR}/mongos.conf-r2" mongos.conf |
189 |
+ |
190 |
+ systemd_dounit "${FILESDIR}/${PN}.service" |
191 |
+ |
192 |
+ insinto /etc/logrotate.d/ |
193 |
+ newins "${FILESDIR}/${PN}.logrotate" ${PN} |
194 |
+ |
195 |
+ # see bug #526114 |
196 |
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos} |
197 |
+ |
198 |
+ local x |
199 |
+ for x in /var/{lib,log}/${PN}; do |
200 |
+ diropts -m0750 -o mongodb -g mongodb |
201 |
+ keepdir "${x}" |
202 |
+ done |
203 |
+} |
204 |
+ |
205 |
+pkg_postinst() { |
206 |
+ ewarn "Make sure to read the release notes and follow the upgrade process:" |
207 |
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/" |
208 |
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/#upgrade-procedures" |
209 |
+} |