Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/rsyslog/
Date: Wed, 28 Aug 2019 23:22:42
Message-Id: 1567034542.2ab3fa037beaec1ad6f6608ec13171e74f3b0434.whissi@gentoo
1 commit: 2ab3fa037beaec1ad6f6608ec13171e74f3b0434
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 28 23:00:29 2019 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 28 23:22:22 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ab3fa03
7
8 app-admin/rsyslog: bump to v8.1908.0
9
10 Package-Manager: Portage-2.3.73, Repoman-2.3.17
11 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
12
13 app-admin/rsyslog/Manifest | 2 +
14 app-admin/rsyslog/rsyslog-8.1908.0.ebuild | 462 ++++++++++++++++++++++++++++++
15 2 files changed, 464 insertions(+)
16
17 diff --git a/app-admin/rsyslog/Manifest b/app-admin/rsyslog/Manifest
18 index 31b25f54a46..9f3976a6187 100644
19 --- a/app-admin/rsyslog/Manifest
20 +++ b/app-admin/rsyslog/Manifest
21 @@ -1,4 +1,6 @@
22 DIST rsyslog-8.1904.0.tar.gz 2902708 BLAKE2B 515d5e32c2dc6cdd8dd51fc595ad775503438603f28828e9f1a427b184a5a61de32af2ee90334b7d56a9404106d74da47386a18a370278d5a16422a6bb09f556 SHA512 cccb48f06508d7e7c2dd788903f4d7ddb3020cdf6079aea1d52387c56b920f10b08957a79b5d420ccdb54cae50d1da6e5eb80cde9498bceaeda4f6ce37f694fd
23 DIST rsyslog-8.1907.0.tar.gz 2926855 BLAKE2B 65c674e53bfa960e3fe5c7f41a304cf8736fe72e2391895dde9fdc17fabeb2f92fccab48965d5e1689a5852136a43a3355f89c9fa9d1d1974335ce80204bb4ac SHA512 2aa3f6106e48fa63c6d4389f83e7a3212817c626d04881682236055792cf5c9d8a941638c9a508c470b6a24c934ef5cb0eda65ea25179d98831afbe2a27c1519
24 +DIST rsyslog-8.1908.0.tar.gz 2952939 BLAKE2B c6784753262a71f30f32fc35ad3e3e75fa2af271bdb0a62c2d4796d3d0413c7f619052a5e33c52c5f3b22aa474d14b7bb06e9c502944f914e708265835fd90ff SHA512 66b6755e1f5a610ed8ec3f8fad1ee227f8ff34618a8f2660a801e6f9aa734980190fbffd8144ac30d63f8297a06e86ada65ba838242d8a006bca8e30f56dce80
25 DIST rsyslog-doc-8.1904.0.tar.gz 8042650 BLAKE2B 585fe5c63eee1fb46f94dcd3d529045b3900e08c291e0e71ed9bf32a6200e6c7283820b262bd56e9aeb74cc227ecd518caafec5a8f87c1d8523d5d7fd95030aa SHA512 da0ff00fbe71756b3c27fd8b94e88611452c3ba611e583862556393faaaa596ca8f32f694ad40a3e1df67385d9f9ca80db6a58f5d2e336fe95639dd7cd0de828
26 DIST rsyslog-doc-8.1907.0.tar.gz 8071764 BLAKE2B 90c18a93bb2f2c9158a4696245c44c36ab4c40597d1eb8df8af257f57aa17e71436bd60792c4f982ebc15395abacd53281046e4ae6df65c306f815e6599fb8bc SHA512 72dcddef6e36a92d2bdcf54072fff7516b6c731f43a53ef8f5d4ebdbe46bc7aeb63bbc3e739a6e5897602ea7705c4bdd8f57aa10796955ed772a6c7cf552c5e5
27 +DIST rsyslog-doc-8.1908.0.tar.gz 8082984 BLAKE2B 7f102a215b0c51b961a4e44e97c8a3cd9966215dba44a194a5ff925b8a2b1ad3389461e2de3dae6dfb770bc36c9a31747298bdb7e975d6fa86ca209c9e314ac3 SHA512 d826013de671c895be7becd2a7c5ce1fb218149c6128d486116be6a01fc69099026f5a277b30fc57e626aeb4038e00b17abcad9a45ea3c9838e7041de9d991a5
28
29 diff --git a/app-admin/rsyslog/rsyslog-8.1908.0.ebuild b/app-admin/rsyslog/rsyslog-8.1908.0.ebuild
30 new file mode 100644
31 index 00000000000..09eed323e45
32 --- /dev/null
33 +++ b/app-admin/rsyslog/rsyslog-8.1908.0.ebuild
34 @@ -0,0 +1,462 @@
35 +# Copyright 1999-2019 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI="6"
39 +PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
40 +
41 +inherit autotools eutils linux-info python-any-r1 systemd
42 +
43 +DESCRIPTION="An enhanced multi-threaded syslogd with database support and more"
44 +HOMEPAGE="https://www.rsyslog.com/"
45 +
46 +if [[ ${PV} == "9999" ]]; then
47 + EGIT_REPO_URI="https://github.com/rsyslog/${PN}.git"
48 +
49 + DOC_REPO_URI="https://github.com/rsyslog/${PN}-doc.git"
50 +
51 + inherit git-r3
52 +else
53 + KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~x86"
54 +
55 + SRC_URI="
56 + https://www.rsyslog.com/files/download/${PN}/${P}.tar.gz
57 + doc? ( https://www.rsyslog.com/files/download/${PN}/${PN}-doc-${PV}.tar.gz )
58 + "
59 +fi
60 +
61 +LICENSE="GPL-3 LGPL-3 Apache-2.0"
62 +SLOT="0"
63 +IUSE="curl dbi debug doc elasticsearch +gcrypt gnutls jemalloc kafka kerberos kubernetes libressl mdblookup"
64 +IUSE+=" mongodb mysql normalize clickhouse omhttp omhttpfs omudpspoof openssl postgres"
65 +IUSE+=" rabbitmq redis relp rfc3195 rfc5424hmac snmp ssl systemd test usertools +uuid xxhash zeromq"
66 +RESTRICT="!test? ( test )"
67 +
68 +RDEPEND="
69 + >=dev-libs/libfastjson-0.99.8:=
70 + >=dev-libs/libestr-0.1.9
71 + >=sys-libs/zlib-1.2.5
72 + curl? ( >=net-misc/curl-7.35.0 )
73 + dbi? ( >=dev-db/libdbi-0.8.3 )
74 + elasticsearch? ( >=net-misc/curl-7.35.0 )
75 + gcrypt? ( >=dev-libs/libgcrypt-1.5.3:= )
76 + jemalloc? ( >=dev-libs/jemalloc-3.3.1:= )
77 + kafka? ( >=dev-libs/librdkafka-0.9.0.99:= )
78 + kerberos? ( virtual/krb5 )
79 + kubernetes? ( >=net-misc/curl-7.35.0 )
80 + mdblookup? ( dev-libs/libmaxminddb:= )
81 + mongodb? ( >=dev-libs/mongo-c-driver-1.1.10:= )
82 + mysql? ( dev-db/mysql-connector-c:= )
83 + normalize? (
84 + >=dev-libs/liblognorm-2.0.3:=
85 + )
86 + clickhouse? ( >=net-misc/curl-7.35.0 )
87 + omhttpfs? ( >=net-misc/curl-7.35.0 )
88 + omudpspoof? ( >=net-libs/libnet-1.1.6 )
89 + postgres? ( >=dev-db/postgresql-8.4.20:= )
90 + rabbitmq? ( >=net-libs/rabbitmq-c-0.3.0:= )
91 + redis? ( >=dev-libs/hiredis-0.11.0:= )
92 + relp? ( >=dev-libs/librelp-1.2.17:= )
93 + rfc3195? ( >=dev-libs/liblogging-1.0.1:=[rfc3195] )
94 + rfc5424hmac? (
95 + !libressl? ( >=dev-libs/openssl-0.9.8y:0= )
96 + libressl? ( dev-libs/libressl:= )
97 + )
98 + snmp? ( >=net-analyzer/net-snmp-5.7.2 )
99 + ssl? (
100 + gnutls? ( >=net-libs/gnutls-2.12.23:0= )
101 + openssl? (
102 + !libressl? ( dev-libs/openssl:0= )
103 + libressl? ( dev-libs/libressl:0= )
104 + )
105 + )
106 + systemd? ( >=sys-apps/systemd-234 )
107 + uuid? ( sys-apps/util-linux:0= )
108 + xxhash? ( dev-libs/xxhash:= )
109 + zeromq? (
110 + >=net-libs/czmq-3.0.2
111 + )"
112 +DEPEND="${RDEPEND}
113 + >=sys-devel/autoconf-archive-2015.02.24
114 + virtual/pkgconfig
115 + elibc_musl? ( sys-libs/queue-standalone )
116 + test? (
117 + >=dev-libs/liblogging-1.0.1[stdlog]
118 + jemalloc? ( <sys-libs/libfaketime-0.9.7 )
119 + !jemalloc? ( sys-libs/libfaketime )
120 + ${PYTHON_DEPS}
121 + )"
122 +
123 +REQUIRED_USE="
124 + kubernetes? ( normalize )
125 + ssl? ( || ( gnutls openssl ) )
126 +"
127 +
128 +if [[ ${PV} == "9999" ]]; then
129 + DEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )"
130 + DEPEND+=" >=sys-devel/flex-2.5.39-r1"
131 + DEPEND+=" >=sys-devel/bison-2.4.3"
132 + DEPEND+=" >=dev-python/docutils-0.12"
133 +fi
134 +
135 +CONFIG_CHECK="~INOTIFY_USER"
136 +WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"
137 +
138 +pkg_setup() {
139 + use test && python-any-r1_pkg_setup
140 +}
141 +
142 +src_unpack() {
143 + if [[ ${PV} == "9999" ]]; then
144 + git-r3_fetch
145 + git-r3_checkout
146 + else
147 + unpack ${P}.tar.gz
148 + fi
149 +
150 + if use doc; then
151 + if [[ ${PV} == "9999" ]]; then
152 + local _EGIT_BRANCH=
153 + if [[ -n "${EGIT_BRANCH}" ]]; then
154 + # Cannot use rsyslog commits/branches for documentation repository
155 + _EGIT_BRANCH=${EGIT_BRANCH}
156 + unset EGIT_BRANCH
157 + fi
158 +
159 + git-r3_fetch "${DOC_REPO_URI}"
160 + git-r3_checkout "${DOC_REPO_URI}" "${S}"/docs
161 +
162 + if [[ -n "${_EGIT_BRANCH}" ]]; then
163 + # Restore previous EGIT_BRANCH information
164 + EGIT_BRANCH=${_EGIT_BRANCH}
165 + fi
166 + else
167 + cd "${S}" || die "Cannot change dir into '${S}'"
168 + mkdir docs || die "Failed to create docs directory"
169 + cd docs || die "Failed to change dir into '${S}/docs'"
170 + unpack ${PN}-doc-${PV}.tar.gz
171 + fi
172 + fi
173 +}
174 +
175 +src_prepare() {
176 + default
177 +
178 + # https://github.com/rsyslog/rsyslog/issues/3626
179 + sed -i \
180 + -e '\|^#!/bin/bash$|a exit 77' \
181 + tests/mmkubernetes-cache-expir*.sh \
182 + || die "Failed to disabled known test failure mmkubernetes-cache-expir*.sh"
183 +
184 + eautoreconf
185 +}
186 +
187 +src_configure() {
188 + # Maintainer notes:
189 + # * Guardtime support is missing because libgt isn't yet available
190 + # in portage.
191 + # * Hadoop's HDFS file system output module is currently not
192 + # supported in Gentoo because nobody is able to test it
193 + # (JAVA dependency).
194 + # * dev-libs/hiredis doesn't provide pkg-config (see #504614,
195 + # upstream PR 129 and 136) so we need to export HIREDIS_*
196 + # variables because rsyslog's build system depends on pkg-config.
197 +
198 + if use redis; then
199 + export HIREDIS_LIBS="-L${EPREFIX}/usr/$(get_libdir) -lhiredis"
200 + export HIREDIS_CFLAGS="-I${EPREFIX}/usr/include"
201 + fi
202 +
203 + local myeconfargs=(
204 + --disable-debug-symbols
205 + --disable-generate-man-pages
206 + --without-valgrind-testbench
207 + --disable-liblogging-stdlog
208 + $(use_enable test testbench)
209 + $(use_enable test libfaketime)
210 + $(use_enable test extended-tests)
211 + # Input Plugins without depedencies
212 + --enable-imdiag
213 + --enable-imfile
214 + --enable-impstats
215 + --enable-imptcp
216 + # Message Modificiation Plugins without depedencies
217 + --enable-mmanon
218 + --enable-mmaudit
219 + --enable-mmcount
220 + --enable-mmfields
221 + --enable-mmjsonparse
222 + --enable-mmpstrucdata
223 + --enable-mmrm1stspace
224 + --enable-mmsequence
225 + --enable-mmutf8fix
226 + # Output Modification Plugins without dependencies
227 + --enable-mail
228 + --enable-omprog
229 + --enable-omruleset
230 + --enable-omstdout
231 + --enable-omuxsock
232 + # Misc
233 + --enable-fmhash
234 + $(use_enable xxhash fmhash-xxhash)
235 + --enable-pmaixforwardedfrom
236 + --enable-pmciscoios
237 + --enable-pmcisconames
238 + --enable-pmlastmsg
239 + $(use_enable normalize pmnormalize)
240 + --enable-pmnull
241 + --enable-pmpanngfw
242 + --enable-pmsnare
243 + # DB
244 + $(use_enable dbi libdbi)
245 + $(use_enable mongodb ommongodb)
246 + $(use_enable mysql)
247 + $(use_enable postgres pgsql)
248 + $(use_enable redis omhiredis)
249 + # Debug
250 + $(use_enable debug)
251 + $(use_enable debug diagtools)
252 + $(use_enable debug valgrind)
253 + # Misc
254 + $(use_enable clickhouse)
255 + $(use_enable curl fmhttp)
256 + $(use_enable elasticsearch)
257 + $(use_enable gcrypt libgcrypt)
258 + $(use_enable jemalloc)
259 + $(use_enable kafka imkafka)
260 + $(use_enable kafka omkafka)
261 + $(use_enable kerberos gssapi-krb5)
262 + $(use_enable kubernetes mmkubernetes)
263 + $(use_enable normalize mmnormalize)
264 + $(use_enable mdblookup mmdblookup)
265 + $(use_enable omhttp)
266 + $(use_enable omhttpfs)
267 + $(use_enable omudpspoof)
268 + $(use_enable rabbitmq omrabbitmq)
269 + $(use_enable relp)
270 + $(use_enable rfc3195)
271 + $(use_enable rfc5424hmac mmrfc5424addhmac)
272 + $(use_enable snmp)
273 + $(use_enable snmp mmsnmptrapd)
274 + $(use_enable gnutls)
275 + $(use_enable openssl)
276 + $(use_enable systemd imjournal)
277 + $(use_enable systemd omjournal)
278 + $(use_enable usertools)
279 + $(use_enable uuid)
280 + $(use_enable zeromq imczmq)
281 + $(use_enable zeromq omczmq)
282 + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
283 + )
284 +
285 + econf "${myeconfargs[@]}"
286 +}
287 +
288 +src_compile() {
289 + default
290 +
291 + if use doc && [[ "${PV}" == "9999" ]]; then
292 + einfo "Building documentation ..."
293 + local doc_dir="${S}/docs"
294 + cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!"
295 + sphinx-build -b html source build || die "Building documentation failed!"
296 + fi
297 +}
298 +
299 +src_test() {
300 + local _has_increased_ulimit=
301 +
302 + # Sometimes tests aren't executable (i.e. when added via patch)
303 + einfo "Adjusting permissions of test scripts ..."
304 + find "${S}"/tests -type f -name '*.sh' \! -perm -111 -exec chmod a+x '{}' \; || \
305 + die "Failed to adjust test scripts permission"
306 +
307 + if ulimit -n 3072; then
308 + _has_increased_ulimit="true"
309 + fi
310 +
311 + if ! emake --jobs 1 check; then
312 + eerror "Test suite failed! :("
313 +
314 + if [[ -z "${_has_increased_ulimit}" ]]; then
315 + eerror "Probably because open file limit couldn't be set to 3072."
316 + fi
317 +
318 + if has userpriv ${FEATURES}; then
319 + eerror "Please try to reproduce the test suite failure with FEATURES=-userpriv " \
320 + "before you submit a bug report."
321 + fi
322 +
323 + fi
324 +}
325 +
326 +src_install() {
327 + local DOCS=(
328 + AUTHORS
329 + ChangeLog
330 + "${FILESDIR}"/README.gentoo
331 + )
332 +
333 + use doc && local HTML_DOCS=( "${S}/docs/build/." )
334 +
335 + default
336 +
337 + newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
338 + newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
339 +
340 + keepdir /var/empty/dev
341 + keepdir /var/spool/${PN}
342 + keepdir /etc/ssl/${PN}
343 + keepdir /etc/${PN}.d
344 +
345 + insinto /etc
346 + newins "${FILESDIR}/${PN}.conf" ${PN}.conf
347 +
348 + insinto /etc/rsyslog.d/
349 + newins "${FILESDIR}/50-default-r1.conf" 50-default.conf
350 +
351 + insinto /etc/logrotate.d/
352 + newins "${FILESDIR}/${PN}-r1.logrotate" ${PN}
353 +
354 + if use mysql; then
355 + insinto /usr/share/doc/${PF}/scripts/mysql
356 + doins plugins/ommysql/createDB.sql
357 + fi
358 +
359 + if use postgres; then
360 + insinto /usr/share/doc/${PF}/scripts/pgsql
361 + doins plugins/ompgsql/createDB.sql
362 + fi
363 +
364 + prune_libtool_files --modules
365 +}
366 +
367 +pkg_postinst() {
368 + local advertise_readme=0
369 +
370 + if [[ -z "${REPLACING_VERSIONS}" ]]; then
371 + # This is a new installation
372 +
373 + advertise_readme=1
374 +
375 + if use mysql || use postgres; then
376 + echo
377 + elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:"
378 + elog " /usr/share/doc/${PF}/scripts"
379 + fi
380 +
381 + if use ssl; then
382 + echo
383 + elog "To create a default CA and certificates for your server and clients, run:"
384 + elog " emerge --config =${PF}"
385 + elog "on your logging server. You can run it several times,"
386 + elog "once for each logging client. The client certificates will be signed"
387 + elog "using the CA certificate generated during the first run."
388 + fi
389 + fi
390 +
391 + if [[ ${advertise_readme} -gt 0 ]]; then
392 + # We need to show the README file location
393 +
394 + echo ""
395 + elog "Please read"
396 + elog ""
397 + elog " ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*"
398 + elog ""
399 + elog "for more details."
400 + fi
401 +}
402 +
403 +pkg_config() {
404 + if ! use ssl ; then
405 + einfo "There is nothing to configure for rsyslog unless you"
406 + einfo "used USE=ssl to build it."
407 + return 0
408 + fi
409 +
410 + # Make sure the certificates directory exists
411 + local CERTDIR="${EROOT}/etc/ssl/${PN}"
412 + if [[ ! -d "${CERTDIR}" ]]; then
413 + mkdir "${CERTDIR}" || die
414 + fi
415 + einfo "Your certificates will be stored in ${CERTDIR}"
416 +
417 + # Create a default CA if needed
418 + if [[ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]]; then
419 + einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..."
420 + certtool --generate-privkey \
421 + --outfile "${CERTDIR}/${PN}_ca.privkey.pem" &>/dev/null
422 + chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
423 +
424 + cat > "${T}/${PF}.$$" <<- _EOF
425 + cn = Portage automated CA
426 + ca
427 + cert_signing_key
428 + expiration_days = 3650
429 + _EOF
430 +
431 + certtool --generate-self-signed \
432 + --load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
433 + --outfile "${CERTDIR}/${PN}_ca.cert.pem" \
434 + --template "${T}/${PF}.$$" &>/dev/null
435 + chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
436 +
437 + # Create the server certificate
438 + echo
439 + einfon "Please type the Common Name of the SERVER you wish to create a certificate for: "
440 + read -r CN
441 +
442 + einfo "Creating private key and certificate for server ${CN}..."
443 + certtool --generate-privkey \
444 + --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
445 + chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
446 +
447 + cat > "${T}/${PF}.$$" <<- _EOF
448 + cn = ${CN}
449 + tls_www_server
450 + dns_name = ${CN}
451 + expiration_days = 3650
452 + _EOF
453 +
454 + certtool --generate-certificate \
455 + --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
456 + --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
457 + --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
458 + --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
459 + --template "${T}/${PF}.$$" &>/dev/null
460 + chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
461 +
462 + else
463 + einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation."
464 + fi
465 +
466 + # Create a client certificate
467 + echo
468 + einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: "
469 + read -r CN
470 +
471 + einfo "Creating private key and certificate for client ${CN}..."
472 + certtool --generate-privkey \
473 + --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
474 + chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
475 +
476 + cat > "${T}/${PF}.$$" <<- _EOF
477 + cn = ${CN}
478 + tls_www_client
479 + dns_name = ${CN}
480 + expiration_days = 3650
481 + _EOF
482 +
483 + certtool --generate-certificate \
484 + --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
485 + --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
486 + --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
487 + --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
488 + --template "${T}/${PF}.$$" &>/dev/null
489 + chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
490 +
491 + rm -f "${T}/${PF}.$$"
492 +
493 + echo
494 + einfo "Here is the documentation on how to encrypt your log traffic:"
495 + einfo " https://www.rsyslog.com/doc/rsyslog_tls.html"
496 +}