Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/graylog/files/, app-admin/graylog/
Date: Mon, 02 Dec 2019 08:39:27
Message-Id: 1575275957.7812a333ffb5423ce132a5a70ac6d2ddfcac8d35.mgorny@gentoo
1 commit: 7812a333ffb5423ce132a5a70ac6d2ddfcac8d35
2 Author: Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Thu Nov 21 14:24:13 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 2 08:39:17 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7812a333
7
8 app-admin/graylog: add version 3.1.3
9
10 Package-Manager: Portage-2.3.79, Repoman-2.3.17
11 Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
12 Closes: https://github.com/gentoo/gentoo/pull/13727
13 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
14 [combined with moved app-admin/graylog2]
15 Closes: https://bugs.gentoo.org/701728
16 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
17
18 app-admin/graylog/Manifest | 1 +
19 app-admin/graylog/files/graylog.confd | 12 +++++
20 app-admin/graylog/files/graylog.initd | 30 ++++++++++++
21 app-admin/graylog/graylog-3.1.3.ebuild | 83 ++++++++++++++++++++++++++++++++++
22 app-admin/graylog/metadata.xml | 11 +++++
23 5 files changed, 137 insertions(+)
24
25 diff --git a/app-admin/graylog/Manifest b/app-admin/graylog/Manifest
26 index 43cea02cad9..b1ce2538044 100644
27 --- a/app-admin/graylog/Manifest
28 +++ b/app-admin/graylog/Manifest
29 @@ -1 +1,2 @@
30 DIST graylog-2.5.1.tgz 123878927 BLAKE2B d168579be4d20e3a8081d608247e7101fc5d99ddd2b5f063f94d7e91d4095c6bd016a4bc1be0f0e08b5043b771070312286404ece5eacc51e4a8730dfc13dab1 SHA512 44e2ca00e47a34708cea94b74fdc0f56f3a381f161d25633bdf7685fbcd989937163508f8b47b0869c7daacec6c8bd2c874f9381e196ffb3194eb6e3f96b3ce9
31 +DIST graylog-3.1.3.tgz 120983897 BLAKE2B 68e1dd7b8de7ab9fb12fd2035bcf6f0901d8d9f5083ff8efef09736819ccd70ae4dd6f466cf2fa1eaebb24b4098a26d72524f9b9a47e8dd62d0224bad189bb62 SHA512 8eec2339db474b89fc717e693ec23ca32d9a018f9bb924aab895d1a1f4e90afa9fe9547e432d13b9d0bf5831f8772763f19de41ac66f3e09ebf7e96ebd6cbccf
32
33 diff --git a/app-admin/graylog/files/graylog.confd b/app-admin/graylog/files/graylog.confd
34 new file mode 100644
35 index 00000000000..f9c2230c0a0
36 --- /dev/null
37 +++ b/app-admin/graylog/files/graylog.confd
38 @@ -0,0 +1,12 @@
39 +GRAYLOG_CONFIG_FILE="/etc/graylog/graylog.conf"
40 +GRAYLOG_DATA_DIR="/var/lib/graylog"
41 +GRAYLOG_GROUP="graylog"
42 +GRAYLOG_INSTALL_DIR="/usr/share/graylog"
43 +GRAYLOG_LOG_DIR="/var/log/graylog"
44 +GRAYLOG_OPTIONS=""
45 +GRAYLOG_USER="graylog"
46 +
47 +JAVA_OPTS="-Djava.library.path=$GRAYLOG_INSTALL_DIR/lib/sigar -Xms1g -Xmx1g -XX:NewRatio=1 -server -XX:+ResizeTLAB -XX:+UseConcMarkSweepGC -XX:+CMSConcurrentMTEnabled -XX:+CMSClassUnloadingEnabled -XX:-OmitStackTraceInFastThrow"
48 +
49 +# Please adjust according to your bind address
50 +rc_need="net.lo"
51
52 diff --git a/app-admin/graylog/files/graylog.initd b/app-admin/graylog/files/graylog.initd
53 new file mode 100644
54 index 00000000000..d17267e9df2
55 --- /dev/null
56 +++ b/app-admin/graylog/files/graylog.initd
57 @@ -0,0 +1,30 @@
58 +#!/sbin/openrc-run
59 +# Copyright 1999-2019 Gentoo Authors
60 +# Distributed under the terms of the GNU General Public License v2
61 +
62 +command="/usr/bin/java"
63 +command_args="${JAVA_OPTS} -jar ${GRAYLOG_INSTALL_DIR}/graylog.jar server -f ${GRAYLOG_CONFIG_FILE} --no-pid-file ${GRAYLOG_OPTIONS}"
64 +command_background="true"
65 +command_user="${GRAYLOG_USER}:${GRAYLOG_GROUP}"
66 +pidfile="/run/${RC_SVCNAME}.pid"
67 +
68 +output_log="${GRAYLOG_LOG_DIR}/graylog.stdout.log"
69 +error_log="${GRAYLOG_LOG_DIR}/graylog.stderr.log"
70 +directory="${GRAYLOG_INSTALL_DIR}"
71 +required_files="${GRAYLOG_CONFIG_FILE}"
72 +
73 +depend() {
74 + use dns
75 +}
76 +
77 +start_pre() {
78 + local d
79 + for d in \
80 + "${GRAYLOG_DATA_DIR}" \
81 + "${GRAYLOG_DATA_DIR}/data" \
82 + "${GRAYLOG_DATA_DIR}/data/journal" \
83 + "${GRAYLOG_LOG_DIR}"; do
84 +
85 + checkpath -d -o "${GRAYLOG_USER}":"${GRAYLOG_GROUP}" -m750 "${d}"
86 + done
87 +}
88
89 diff --git a/app-admin/graylog/graylog-3.1.3.ebuild b/app-admin/graylog/graylog-3.1.3.ebuild
90 new file mode 100644
91 index 00000000000..632bb8a67fb
92 --- /dev/null
93 +++ b/app-admin/graylog/graylog-3.1.3.ebuild
94 @@ -0,0 +1,83 @@
95 +# Copyright 1999-2019 Gentoo Authors
96 +# Distributed under the terms of the GNU General Public License v2
97 +
98 +EAPI=7
99 +
100 +DESCRIPTION="Free and open source log management"
101 +HOMEPAGE="https://www.graylog.org"
102 +SRC_URI="https://downloads.graylog.org/releases/graylog/${P}.tgz"
103 +
104 +LICENSE="GPL-3"
105 +SLOT="0"
106 +KEYWORDS="~amd64 ~ppc64 ~x86"
107 +RESTRICT="strip"
108 +
109 +RDEPEND="!app-admin/graylog2
110 + acct-group/graylog
111 + acct-user/graylog
112 + >=virtual/jdk-1.8"
113 +
114 +DOCS=(
115 + COPYING README.markdown UPGRADING.rst
116 +)
117 +
118 +GRAYLOG_DATA_DIR="/var/lib/graylog"
119 +GRAYLOG_INSTALL_DIR="/usr/share/graylog"
120 +QA_PREBUILT="${GRAYLOG_INSTALL_DIR}/lib/sigar/libsigar*"
121 +
122 +src_prepare() {
123 + default
124 +
125 + # Stick to architecture of build host
126 + if ! use amd64; then
127 + rm -r lib/sigar/libsigar-amd64-*.so || die "Failed in removing AMD64 support libraries"
128 + fi
129 + if ! use ppc64; then
130 + rm -r lib/sigar/libsigar-ppc64-*.so || die "Failed in removing PPC64 support libraries"
131 + fi
132 + if ! use x86; then
133 + rm -r lib/sigar/libsigar-x86-*.so || die "Failed in removing X86 support libraries"
134 + fi
135 + # Currently unsupported platforms
136 + # QA warning galore but testing/patches welcome
137 + rm lib/sigar/libsigar-*freebsd*so \
138 + lib/sigar/libsigar-*solaris*so \
139 + lib/sigar/libsigar-*hpux*.sl \
140 + lib/sigar/libsigar-*macosx*.dylib \
141 + lib/sigar/libsigar-ia64-*.so \
142 + lib/sigar/libsigar-ppc-*.so \
143 + lib/sigar/libsigar-s390x*.so \
144 + lib/sigar/*winnt* || die "Failed in removing unsupported platform libraries"
145 +
146 + # gentoo specific paths
147 + sed -i "s@\(node_id_file = \).*@\1${GRAYLOG_DATA_DIR}/node-id@g; \
148 + s@\(message_journal_dir = \).*@\1${GRAYLOG_DATA_DIR}/data/journal@g;" \
149 + graylog.conf.example || die
150 +}
151 +
152 +src_install() {
153 + default
154 +
155 + insinto /etc/graylog
156 + doins graylog.conf.example
157 +
158 + insinto "${GRAYLOG_INSTALL_DIR}"
159 + doins graylog.jar
160 + doins -r lib plugin
161 +
162 + keepdir "${GRAYLOG_DATA_DIR}"
163 +
164 + newconfd "${FILESDIR}/graylog.confd" graylog
165 + newinitd "${FILESDIR}/graylog.initd" graylog
166 +}
167 +
168 +pkg_postinst() {
169 + ewarn "Graylog does not depend on need.net any more (#439092)."
170 + ewarn
171 + ewarn "Please configure rc_need according to your binding address in:"
172 + ewarn "/etc/conf.d/graylog"
173 + ewarn
174 + ewarn "Graylog requires Java >= 8"
175 + ewarn "Elasticsearch 5.x or 6.x (does NOT work with 7.x)"
176 + ewarn "and MongoDB 3.6 or 4.0 (does NOT work with 4.2)"
177 +}
178
179 diff --git a/app-admin/graylog/metadata.xml b/app-admin/graylog/metadata.xml
180 index 5087760546f..84ba1f113f4 100644
181 --- a/app-admin/graylog/metadata.xml
182 +++ b/app-admin/graylog/metadata.xml
183 @@ -5,4 +5,15 @@
184 <email>chainsaw@g.o</email>
185 <name>Tony Vroon</name>
186 </maintainer>
187 + <maintainer type="person">
188 + <email>hydrapolic@×××××.com</email>
189 + <name>Tomáš Mózes</name>
190 + </maintainer>
191 + <maintainer type="project">
192 + <email>proxy-maint@g.o</email>
193 + <name>Proxy Maintainers</name>
194 + </maintainer>
195 + <upstream>
196 + <remote-id type="github">graylog2/graylog2-server</remote-id>
197 + </upstream>
198 </pkgmetadata>