1 |
commit: ecd83263ae515203b7bd3e04206e939d82821626 |
2 |
Author: Matt Jolly <Matt.Jolly <AT> footclan <DOT> ninja> |
3 |
AuthorDate: Fri Jun 3 08:20:07 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jun 4 02:19:17 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ecd83263 |
7 |
|
8 |
app-misc/elasticsearch: add 8.2.2 |
9 |
|
10 |
Signed-off-by: Matt Jolly <Matt.Jolly <AT> footclan.ninja> |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
app-misc/elasticsearch/Manifest | 1 + |
14 |
app-misc/elasticsearch/elasticsearch-8.2.2.ebuild | 94 +++++++++++++++++++++++ |
15 |
2 files changed, 95 insertions(+) |
16 |
|
17 |
diff --git a/app-misc/elasticsearch/Manifest b/app-misc/elasticsearch/Manifest |
18 |
index 07a9024d0448..daa1214bdc5d 100644 |
19 |
--- a/app-misc/elasticsearch/Manifest |
20 |
+++ b/app-misc/elasticsearch/Manifest |
21 |
@@ -1,4 +1,5 @@ |
22 |
DIST elasticsearch-6.8.23.tar.gz 149672445 BLAKE2B dd7b080f1496f3a20755c183befae74194eab05b04c6f77679e9dad6067eef5222a4c7ce43d6267f1233a7bf864c6f8b23d5caf52278e1fe5f48f465e6603113 SHA512 73258b400cd194768058105a74ca0e811962ccf81bed8c4d3a824d4e5b97a8178a31150e60602fa1e04c6764b139980eb45ae6f246864702120653b45120b597 |
23 |
DIST elasticsearch-7.17.3-no-jdk-linux-x86_64.tar.gz 167378547 BLAKE2B 4bacb075e94587351bb4638da15644ed372ec1ad2b72e1c9b84c511e84666f6b79ccc8519ce5fede119e6c134ac500a1209578f18a26fd8566646e870a17f9ba SHA512 f2d5953710adfe31f1e30a0fdf4c091c0493f613a83927ddec4bbc74d2eccb839e1ffa6d44636ad0ad9c07613915847cc7a68fc87e465a8a851c96e023917bf1 |
24 |
DIST elasticsearch-8.2.0-linux-x86_64.tar.gz 529729465 BLAKE2B e176a047e49b343673c6f20e45d6ff96650e4ebb6b0d9d09450e4fb435ac56e22527be32c4327b5667ce6b4dbd6824477fc445c1db3e78a42e9c6bd01a1f5934 SHA512 f5e48538a835d61b7321133158c988b536945451f783964a10f50a0208aa46c013c2e55b86a5f4ec06c7ac61700c0f41d47124c91e4bf93b24ad3f150933a77d |
25 |
+DIST elasticsearch-8.2.2-linux-x86_64.tar.gz 526116807 BLAKE2B bc30d3532bb62bee88fdfc8e3406d32884add3601363d5bf91f66c110e05241beb6b73cf7a2f8104a843628f4841a313ed5bdf3098030eb5e4567c98b69ac703 SHA512 78d1315a47ae9f082297e049320c5a9787aa9fe44cd2967f3ea37ae954ad34aaa29ca7b3210ac96955be2838d0233b7f86a3e0c66d82dda3724753a0c24c78e8 |
26 |
DIST elasticsearch-oss-6.8.23.tar.gz 68573265 BLAKE2B 80366fdc4eaaf45161a36da112397938a82d08d842d82dd5a9311abf63ca20afb93ecc06387c6852bbb1a861306382d6e7c2314e67635b6f2e75cdc183057ad8 SHA512 14dbb2809b06499373c3ec5035d829d62255c2c93103618fbfe3d7d03cecf8847f654e83c78f765f23224126ff18ed713b959857e8ecf435c475b11bcd143d3f |
27 |
|
28 |
diff --git a/app-misc/elasticsearch/elasticsearch-8.2.2.ebuild b/app-misc/elasticsearch/elasticsearch-8.2.2.ebuild |
29 |
new file mode 100644 |
30 |
index 000000000000..7ca705a24066 |
31 |
--- /dev/null |
32 |
+++ b/app-misc/elasticsearch/elasticsearch-8.2.2.ebuild |
33 |
@@ -0,0 +1,94 @@ |
34 |
+# Copyright 1999-2022 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=8 |
38 |
+ |
39 |
+inherit systemd tmpfiles |
40 |
+ |
41 |
+DESCRIPTION="Free and Open, Distributed, RESTful Search Engine" |
42 |
+HOMEPAGE="https://www.elastic.co/elasticsearch/" |
43 |
+SRC_URI="https://artifacts.elastic.co/downloads/${PN}/${P}-linux-x86_64.tar.gz" |
44 |
+LICENSE="Apache-2.0 BSD-2 Elastic-2.0 LGPL-3 MIT public-domain" |
45 |
+SLOT="0" |
46 |
+KEYWORDS="~amd64" |
47 |
+ |
48 |
+PATCHES=( |
49 |
+ "${FILESDIR}/${PN}-env.patch" |
50 |
+) |
51 |
+ |
52 |
+DEPEND="acct-group/elasticsearch |
53 |
+ acct-user/elasticsearch" |
54 |
+ |
55 |
+RDEPEND="acct-group/elasticsearch |
56 |
+ acct-user/elasticsearch |
57 |
+ sys-libs/zlib |
58 |
+ virtual/jre:17" |
59 |
+ |
60 |
+QA_PREBUILT="usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/\(bin\|lib\)/.*" |
61 |
+QA_PRESTRIPPED="usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/\(bin\|lib\)/.*" |
62 |
+ |
63 |
+src_prepare() { |
64 |
+ default |
65 |
+ rm -rf jdk || die |
66 |
+ sed -i -e "s:logs/:/var/log/${PN}/:g" config/jvm.options || die |
67 |
+ rm LICENSE.txt NOTICE.txt || die |
68 |
+ rmdir logs || die |
69 |
+} |
70 |
+ |
71 |
+src_install() { |
72 |
+ keepdir /etc/${PN} |
73 |
+ keepdir /etc/${PN}/scripts |
74 |
+ |
75 |
+ insinto /etc/${PN} |
76 |
+ doins -r config/. |
77 |
+ rm -r config || die |
78 |
+ |
79 |
+ fowners -R root:${PN} /etc/${PN} |
80 |
+ fperms -R 2750 /etc/${PN} |
81 |
+ |
82 |
+ insinto /usr/share/${PN} |
83 |
+ doins -r . |
84 |
+ |
85 |
+ keepdir /usr/share/${PN}/plugins |
86 |
+ |
87 |
+ exeinto /usr/share/${PN}/bin |
88 |
+ doexe ${FILESDIR}/elasticsearch-systemd-pre-exec |
89 |
+ |
90 |
+ fperms -R +x /usr/share/${PN}/bin |
91 |
+ fperms -R +x /usr/share/${PN}/modules/x-pack-ml/platform/linux-x86_64/bin |
92 |
+ |
93 |
+ keepdir /var/{lib,log}/${PN} |
94 |
+ fowners ${PN}:${PN} /var/{lib,log}/${PN} |
95 |
+ fperms 0750 /var/{lib,log}/${PN} |
96 |
+ |
97 |
+ insinto /etc/sysctl.d |
98 |
+ newins "${FILESDIR}/${PN}.sysctl.d" ${PN}.conf |
99 |
+ |
100 |
+ newconfd "${FILESDIR}/${PN}.conf.4" ${PN} |
101 |
+ newinitd "${FILESDIR}/${PN}.init.8" ${PN} |
102 |
+ |
103 |
+ systemd_install_serviced "${FILESDIR}/${PN}.service.conf" |
104 |
+ systemd_newunit "${FILESDIR}"/${PN}.service.4 ${PN}.service |
105 |
+ |
106 |
+ newtmpfiles "${FILESDIR}"/${PN}.tmpfiles.d ${PN}.conf |
107 |
+} |
108 |
+ |
109 |
+pkg_postinst() { |
110 |
+ # Elasticsearch will choke on our keep file and dodir will not preserve the empty dir |
111 |
+ rm /usr/share/${PN}/plugins/.keep* || die |
112 |
+ tmpfiles_process /usr/lib/tmpfiles.d/${PN}.conf |
113 |
+ if [ ! systemd_is_booted ]; then |
114 |
+ elog "You may create multiple instances of ${PN} by" |
115 |
+ elog "symlinking the init script:" |
116 |
+ elog "ln -sf /etc/init.d/${PN} /etc/init.d/${PN}.instance" |
117 |
+ elog |
118 |
+ elog "Please make sure you put elasticsearch.yml, log4j2.properties and scripts" |
119 |
+ elog "from /etc/${PN} into the configuration directory of the instance:" |
120 |
+ elog "/etc/${PN}/instance" |
121 |
+ elog |
122 |
+ fi |
123 |
+ ewarn "Please make sure you have proper permissions on /etc/${PN}" |
124 |
+ ewarn "prior to keystore generation or you may experience startup failures." |
125 |
+ ewarn "chown root:${PN} /etc/${PN} && chmod 2750 /etc/${PN}" |
126 |
+ ewarn "chown root:${PN} /etc/${PN}/${PN}.keystore && chmod 0660 /etc/${PN}/${PN}.keystore" |
127 |
+} |