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: Fri, 08 May 2020 22:49:27
Message-Id: 1588978142.1176e71fa0ee4bf5007957ffa77b570734e48398.whissi@gentoo
1 commit: 1176e71fa0ee4bf5007957ffa77b570734e48398
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Fri May 8 22:36:25 2020 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Fri May 8 22:49:02 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1176e71f
7
8 app-admin/rsyslog: drop old
9
10 Package-Manager: Portage-2.3.99, Repoman-2.3.22
11 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
12
13 app-admin/rsyslog/Manifest | 6 -
14 app-admin/rsyslog/rsyslog-8.1910.0-r1.ebuild | 462 ---------------------------
15 app-admin/rsyslog/rsyslog-8.2001.0.ebuild | 462 ---------------------------
16 app-admin/rsyslog/rsyslog-8.2002.0.ebuild | 462 ---------------------------
17 4 files changed, 1392 deletions(-)
18
19 diff --git a/app-admin/rsyslog/Manifest b/app-admin/rsyslog/Manifest
20 index 7e52759762b..2df48607821 100644
21 --- a/app-admin/rsyslog/Manifest
22 +++ b/app-admin/rsyslog/Manifest
23 @@ -1,10 +1,4 @@
24 -DIST rsyslog-8.1910.0.tar.gz 2957635 BLAKE2B ea350d3fb923c2f7d2799942fec6a77ef893fa12bc95a5b1428b8e280d96b562cd864469ebf13ee57e9ea89787765a4bb13d155460defc73a3a85b17ad6a5ab1 SHA512 85f5df91a6357ecb38708b4d569d26804a50ca28c928a636ac7749595f1a7105c3450fbd521835a436ebdfdcac33a33986e09a09026745ea4d1a2897406770d5
25 DIST rsyslog-8.1911.0.tar.gz 2967162 BLAKE2B 6c15436cf6751267de38662b2c5d524dc7f90add4ed1aa7102811d197c2d86847316b58ed626fe0ab2b731c445fbcfb328464a2b1b7c4c3afedccb103267f772 SHA512 8414901a5072cb2cc28d35802c9e22d0f9c88f2ae15985a087a86b0e4053471b02d43bcc95d0c466719105e0a5ee683927af3842b9487f27ddddc1ca00ed713a
26 -DIST rsyslog-8.2001.0.tar.gz 2999701 BLAKE2B 8b0b0af6a9f8ea53540cd4869ad9ccc6f1adfea3349c4785222d72028101d8e095a7bb0c0496b5026b4144a64cd5d42f547294f03c75a205fa5724e67675ff6e SHA512 a68053630c43bea813cc3191ebff04473031df49899a6be2d5c331ac18882f373fc54fd7fb45c397fcbbcb269f246eeba5e9126911edd1bfe1c52f60921740d2
27 -DIST rsyslog-8.2002.0.tar.gz 3000861 BLAKE2B b05081eefc9a9c7a2a5815b472ebecb0214b1855c87e2428d2114c6d390e0251a71dda6ed80e8c4c8368e9a327a1c5d36a906b1eabd485a64078f490ad09a115 SHA512 a01bb2f67d21ab6d96dd1302bc351b509892834ef44956983db912a63ba23201653ca1e6b176a574c47568665b4d92579bb8bb0fe6911646bc841a3754c2754f
28 DIST rsyslog-8.2004.0.tar.gz 3002704 BLAKE2B b5049448e0d09e048a45f067b5f8de453721ac5d63233f251e6e24fe2a722469cb19a91e83aa405ffc21245942b824e0a28ecd4e6df431517c8775e7a322bcd3 SHA512 1d7fac65cc97975a6765a55732d413e892502e53566c6fb7c1bfc0107b173eae77dd04c0c9a7471296dff998ceb2fd5a2374368a5a8528f8eb0a89d1915b0214
29 -DIST rsyslog-doc-8.1910.0.tar.gz 8158007 BLAKE2B 7a05cf7070ba350d0fb939350868ff0dd9d03be46ebd1b1261e54add70ab680afe0b356f563ea9e10148aed17667fc0b729e2fa8f7ff7cff3e4cec9d0da209a8 SHA512 e46f14e40ae690efbe3114a859c1c94c8f9573ca5ebdb533ad4b5ed76c3a930c887cc205e7279fcc546fda3ce624eae507ce08d5d10ee1eb167a957edd742bf2
30 DIST rsyslog-doc-8.1911.0.tar.gz 8183360 BLAKE2B f5681945fb30ddf9c21a60ebafaf99698f10ef4790e76c9f6f329763215d5a1d47918008ade3e8ff8b7d4fb3ce1220cfc6f307ebc1dbf85697c3d92f7b855023 SHA512 2326550a0db108db407b701ff0b7b8545f94d06c1979bfbea3496a9a652de2a22bf49e9b95d4b2e6256bbf1f9db6a1c9822557c6ebd6a56bc00f096a642b19df
31 -DIST rsyslog-doc-8.2001.0.tar.gz 8200594 BLAKE2B ad0fda200749083a56fd4d731b03982e25ff32a7c6b4ff10f996ee42a46c6985f11fc8265e6992d1d5c86973541d0b0cf15c014460792a4658f45a1a310aee4f SHA512 6d58a67914f65d75eb77411e760b9e49be3723fb6e4ab8951ce28bf83372e3ec7805fac5aef49158fa47c6c4a9109e887bcc46ed3ca0cdc53de4e9b66472be14
32 -DIST rsyslog-doc-8.2002.0.tar.gz 8330832 BLAKE2B 1d27326dadcf06b158b28bbd66498559e4eb5012f84e073c63ab880b411e838550350b43cb0879f67f7b05541f6fcb659e406eaf5baf1d4d4b601d06e581d2bf SHA512 5d6bd8fe09b49644f000416c87c8600cd3df3facb07845afd85012279df203a44b234e94a7be90ad83709d5f2ad1a2bf8cb51571c5c0cd76383f76f81455945e
33 DIST rsyslog-doc-8.2004.0.tar.gz 8323570 BLAKE2B 76b6acc7614f1cbe0a4f99a2a27ff44e2706d1a570afb7d92c628154d49bde5b00a7a4ae1c7d9639f67270f3080a6637cbebb14eaa43484655b322def11b367f SHA512 1a95b334bfe4c2a1d4844983cf32e44205ec6b7cabf1a6914a9ebb335d3d8f78655caf2a55a8cf444352af7d9ae92daa09e8fdf36e520554ed4807a4ed5fd393
34
35 diff --git a/app-admin/rsyslog/rsyslog-8.1910.0-r1.ebuild b/app-admin/rsyslog/rsyslog-8.1910.0-r1.ebuild
36 deleted file mode 100644
37 index 496ad740205..00000000000
38 --- a/app-admin/rsyslog/rsyslog-8.1910.0-r1.ebuild
39 +++ /dev/null
40 @@ -1,462 +0,0 @@
41 -# Copyright 1999-2020 Gentoo Authors
42 -# Distributed under the terms of the GNU General Public License v2
43 -
44 -EAPI="6"
45 -PYTHON_COMPAT=( python{3_6,3_7} )
46 -
47 -inherit autotools eutils linux-info ltprune python-any-r1 systemd
48 -
49 -DESCRIPTION="An enhanced multi-threaded syslogd with database support and more"
50 -HOMEPAGE="https://www.rsyslog.com/"
51 -
52 -if [[ ${PV} == "9999" ]]; then
53 - EGIT_REPO_URI="https://github.com/rsyslog/${PN}.git"
54 -
55 - DOC_REPO_URI="https://github.com/rsyslog/${PN}-doc.git"
56 -
57 - inherit git-r3
58 -else
59 - KEYWORDS="amd64 arm ~arm64 hppa x86"
60 -
61 - SRC_URI="
62 - https://www.rsyslog.com/files/download/${PN}/${P}.tar.gz
63 - doc? ( https://www.rsyslog.com/files/download/${PN}/${PN}-doc-${PV}.tar.gz )
64 - "
65 -fi
66 -
67 -LICENSE="GPL-3 LGPL-3 Apache-2.0"
68 -SLOT="0"
69 -IUSE="curl dbi debug doc elasticsearch +gcrypt gnutls jemalloc kafka kerberos kubernetes libressl mdblookup"
70 -IUSE+=" mongodb mysql normalize clickhouse omhttp omhttpfs omudpspoof openssl postgres"
71 -IUSE+=" rabbitmq redis relp rfc3195 rfc5424hmac snmp ssl systemd test usertools +uuid xxhash zeromq"
72 -RESTRICT="!test? ( test )"
73 -
74 -RDEPEND="
75 - >=dev-libs/libfastjson-0.99.8:=
76 - >=dev-libs/libestr-0.1.9
77 - >=sys-libs/zlib-1.2.5
78 - curl? ( >=net-misc/curl-7.35.0 )
79 - dbi? ( >=dev-db/libdbi-0.8.3 )
80 - elasticsearch? ( >=net-misc/curl-7.35.0 )
81 - gcrypt? ( >=dev-libs/libgcrypt-1.5.3:= )
82 - jemalloc? ( >=dev-libs/jemalloc-3.3.1:= )
83 - kafka? ( >=dev-libs/librdkafka-0.9.0.99:= )
84 - kerberos? ( virtual/krb5 )
85 - kubernetes? ( >=net-misc/curl-7.35.0 )
86 - mdblookup? ( dev-libs/libmaxminddb:= )
87 - mongodb? ( >=dev-libs/mongo-c-driver-1.1.10:= )
88 - mysql? ( dev-db/mysql-connector-c:= )
89 - normalize? (
90 - >=dev-libs/liblognorm-2.0.3:=
91 - )
92 - clickhouse? ( >=net-misc/curl-7.35.0 )
93 - omhttpfs? ( >=net-misc/curl-7.35.0 )
94 - omudpspoof? ( >=net-libs/libnet-1.1.6 )
95 - postgres? ( >=dev-db/postgresql-8.4.20:= )
96 - rabbitmq? ( >=net-libs/rabbitmq-c-0.3.0:= )
97 - redis? ( >=dev-libs/hiredis-0.11.0:= )
98 - relp? ( >=dev-libs/librelp-1.2.17:= )
99 - rfc3195? ( >=dev-libs/liblogging-1.0.1:=[rfc3195] )
100 - rfc5424hmac? (
101 - !libressl? ( >=dev-libs/openssl-0.9.8y:0= )
102 - libressl? ( dev-libs/libressl:= )
103 - )
104 - snmp? ( >=net-analyzer/net-snmp-5.7.2 )
105 - ssl? (
106 - gnutls? ( >=net-libs/gnutls-2.12.23:0= )
107 - openssl? (
108 - !libressl? ( dev-libs/openssl:0= )
109 - libressl? ( dev-libs/libressl:0= )
110 - )
111 - )
112 - systemd? ( >=sys-apps/systemd-234 )
113 - uuid? ( sys-apps/util-linux:0= )
114 - xxhash? ( dev-libs/xxhash:= )
115 - zeromq? (
116 - >=net-libs/czmq-3.0.2
117 - )"
118 -DEPEND="${RDEPEND}
119 - >=sys-devel/autoconf-archive-2015.02.24
120 - virtual/pkgconfig
121 - elibc_musl? ( sys-libs/queue-standalone )
122 - test? (
123 - >=dev-libs/liblogging-1.0.1[stdlog]
124 - jemalloc? ( <sys-libs/libfaketime-0.9.7 )
125 - !jemalloc? ( sys-libs/libfaketime )
126 - ${PYTHON_DEPS}
127 - )"
128 -
129 -REQUIRED_USE="
130 - kubernetes? ( normalize )
131 - ssl? ( || ( gnutls openssl ) )
132 -"
133 -
134 -if [[ ${PV} == "9999" ]]; then
135 - DEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )"
136 - DEPEND+=" >=sys-devel/flex-2.5.39-r1"
137 - DEPEND+=" >=sys-devel/bison-2.4.3"
138 - DEPEND+=" >=dev-python/docutils-0.12"
139 -fi
140 -
141 -CONFIG_CHECK="~INOTIFY_USER"
142 -WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"
143 -
144 -pkg_setup() {
145 - use test && python-any-r1_pkg_setup
146 -}
147 -
148 -src_unpack() {
149 - if [[ ${PV} == "9999" ]]; then
150 - git-r3_fetch
151 - git-r3_checkout
152 - else
153 - unpack ${P}.tar.gz
154 - fi
155 -
156 - if use doc; then
157 - if [[ ${PV} == "9999" ]]; then
158 - local _EGIT_BRANCH=
159 - if [[ -n "${EGIT_BRANCH}" ]]; then
160 - # Cannot use rsyslog commits/branches for documentation repository
161 - _EGIT_BRANCH=${EGIT_BRANCH}
162 - unset EGIT_BRANCH
163 - fi
164 -
165 - git-r3_fetch "${DOC_REPO_URI}"
166 - git-r3_checkout "${DOC_REPO_URI}" "${S}"/docs
167 -
168 - if [[ -n "${_EGIT_BRANCH}" ]]; then
169 - # Restore previous EGIT_BRANCH information
170 - EGIT_BRANCH=${_EGIT_BRANCH}
171 - fi
172 - else
173 - cd "${S}" || die "Cannot change dir into '${S}'"
174 - mkdir docs || die "Failed to create docs directory"
175 - cd docs || die "Failed to change dir into '${S}/docs'"
176 - unpack ${PN}-doc-${PV}.tar.gz
177 - fi
178 - fi
179 -}
180 -
181 -src_prepare() {
182 - default
183 -
184 - # https://github.com/rsyslog/rsyslog/issues/3626
185 - sed -i \
186 - -e '\|^#!/bin/bash$|a exit 77' \
187 - tests/mmkubernetes-cache-expir*.sh \
188 - || die "Failed to disabled known test failure mmkubernetes-cache-expir*.sh"
189 -
190 - eautoreconf
191 -}
192 -
193 -src_configure() {
194 - # Maintainer notes:
195 - # * Guardtime support is missing because libgt isn't yet available
196 - # in portage.
197 - # * Hadoop's HDFS file system output module is currently not
198 - # supported in Gentoo because nobody is able to test it
199 - # (JAVA dependency).
200 - # * dev-libs/hiredis doesn't provide pkg-config (see #504614,
201 - # upstream PR 129 and 136) so we need to export HIREDIS_*
202 - # variables because rsyslog's build system depends on pkg-config.
203 -
204 - if use redis; then
205 - export HIREDIS_LIBS="-L${EPREFIX}/usr/$(get_libdir) -lhiredis"
206 - export HIREDIS_CFLAGS="-I${EPREFIX}/usr/include"
207 - fi
208 -
209 - local myeconfargs=(
210 - --disable-debug-symbols
211 - --disable-generate-man-pages
212 - --without-valgrind-testbench
213 - --disable-liblogging-stdlog
214 - $(use_enable test testbench)
215 - $(use_enable test libfaketime)
216 - $(use_enable test extended-tests)
217 - # Input Plugins without depedencies
218 - --enable-imdiag
219 - --enable-imfile
220 - --enable-impstats
221 - --enable-imptcp
222 - # Message Modificiation Plugins without depedencies
223 - --enable-mmanon
224 - --enable-mmaudit
225 - --enable-mmcount
226 - --enable-mmfields
227 - --enable-mmjsonparse
228 - --enable-mmpstrucdata
229 - --enable-mmrm1stspace
230 - --enable-mmsequence
231 - --enable-mmutf8fix
232 - # Output Modification Plugins without dependencies
233 - --enable-mail
234 - --enable-omprog
235 - --enable-omruleset
236 - --enable-omstdout
237 - --enable-omuxsock
238 - # Misc
239 - --enable-fmhash
240 - $(use_enable xxhash fmhash-xxhash)
241 - --enable-pmaixforwardedfrom
242 - --enable-pmciscoios
243 - --enable-pmcisconames
244 - --enable-pmlastmsg
245 - $(use_enable normalize pmnormalize)
246 - --enable-pmnull
247 - --enable-pmpanngfw
248 - --enable-pmsnare
249 - # DB
250 - $(use_enable dbi libdbi)
251 - $(use_enable mongodb ommongodb)
252 - $(use_enable mysql)
253 - $(use_enable postgres pgsql)
254 - $(use_enable redis omhiredis)
255 - # Debug
256 - $(use_enable debug)
257 - $(use_enable debug diagtools)
258 - $(use_enable debug valgrind)
259 - # Misc
260 - $(use_enable clickhouse)
261 - $(use_enable curl fmhttp)
262 - $(use_enable elasticsearch)
263 - $(use_enable gcrypt libgcrypt)
264 - $(use_enable jemalloc)
265 - $(use_enable kafka imkafka)
266 - $(use_enable kafka omkafka)
267 - $(use_enable kerberos gssapi-krb5)
268 - $(use_enable kubernetes mmkubernetes)
269 - $(use_enable normalize mmnormalize)
270 - $(use_enable mdblookup mmdblookup)
271 - $(use_enable omhttp)
272 - $(use_enable omhttpfs)
273 - $(use_enable omudpspoof)
274 - $(use_enable rabbitmq omrabbitmq)
275 - $(use_enable relp)
276 - $(use_enable rfc3195)
277 - $(use_enable rfc5424hmac mmrfc5424addhmac)
278 - $(use_enable snmp)
279 - $(use_enable snmp mmsnmptrapd)
280 - $(use_enable gnutls)
281 - $(use_enable openssl)
282 - $(use_enable systemd imjournal)
283 - $(use_enable systemd omjournal)
284 - $(use_enable usertools)
285 - $(use_enable uuid)
286 - $(use_enable zeromq imczmq)
287 - $(use_enable zeromq omczmq)
288 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
289 - )
290 -
291 - econf "${myeconfargs[@]}"
292 -}
293 -
294 -src_compile() {
295 - default
296 -
297 - if use doc && [[ "${PV}" == "9999" ]]; then
298 - einfo "Building documentation ..."
299 - local doc_dir="${S}/docs"
300 - cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!"
301 - sphinx-build -b html source build || die "Building documentation failed!"
302 - fi
303 -}
304 -
305 -src_test() {
306 - local _has_increased_ulimit=
307 -
308 - # Sometimes tests aren't executable (i.e. when added via patch)
309 - einfo "Adjusting permissions of test scripts ..."
310 - find "${S}"/tests -type f -name '*.sh' \! -perm -111 -exec chmod a+x '{}' \; || \
311 - die "Failed to adjust test scripts permission"
312 -
313 - if ulimit -n 3072; then
314 - _has_increased_ulimit="true"
315 - fi
316 -
317 - if ! emake --jobs 1 check; then
318 - eerror "Test suite failed! :("
319 -
320 - if [[ -z "${_has_increased_ulimit}" ]]; then
321 - eerror "Probably because open file limit couldn't be set to 3072."
322 - fi
323 -
324 - if has userpriv ${FEATURES}; then
325 - eerror "Please try to reproduce the test suite failure with FEATURES=-userpriv " \
326 - "before you submit a bug report."
327 - fi
328 -
329 - fi
330 -}
331 -
332 -src_install() {
333 - local DOCS=(
334 - AUTHORS
335 - ChangeLog
336 - "${FILESDIR}"/README.gentoo
337 - )
338 -
339 - use doc && local HTML_DOCS=( "${S}/docs/build/." )
340 -
341 - default
342 -
343 - newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
344 - newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
345 -
346 - keepdir /var/empty/dev
347 - keepdir /var/spool/${PN}
348 - keepdir /etc/ssl/${PN}
349 - keepdir /etc/${PN}.d
350 -
351 - insinto /etc
352 - newins "${FILESDIR}/${PN}.conf" ${PN}.conf
353 -
354 - insinto /etc/rsyslog.d/
355 - newins "${FILESDIR}/50-default-r1.conf" 50-default.conf
356 -
357 - insinto /etc/logrotate.d/
358 - newins "${FILESDIR}/${PN}-r1.logrotate" ${PN}
359 -
360 - if use mysql; then
361 - insinto /usr/share/${PN}/scripts/mysql
362 - doins plugins/ommysql/createDB.sql
363 - fi
364 -
365 - if use postgres; then
366 - insinto /usr/share/${PN}/scripts/pgsql
367 - doins plugins/ompgsql/createDB.sql
368 - fi
369 -
370 - prune_libtool_files --modules
371 -}
372 -
373 -pkg_postinst() {
374 - local advertise_readme=0
375 -
376 - if [[ -z "${REPLACING_VERSIONS}" ]]; then
377 - # This is a new installation
378 -
379 - advertise_readme=1
380 -
381 - if use mysql || use postgres; then
382 - echo
383 - elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:"
384 - elog " /usr/share/doc/${PF}/scripts"
385 - fi
386 -
387 - if use ssl; then
388 - echo
389 - elog "To create a default CA and certificates for your server and clients, run:"
390 - elog " emerge --config =${PF}"
391 - elog "on your logging server. You can run it several times,"
392 - elog "once for each logging client. The client certificates will be signed"
393 - elog "using the CA certificate generated during the first run."
394 - fi
395 - fi
396 -
397 - if [[ ${advertise_readme} -gt 0 ]]; then
398 - # We need to show the README file location
399 -
400 - echo ""
401 - elog "Please read"
402 - elog ""
403 - elog " ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*"
404 - elog ""
405 - elog "for more details."
406 - fi
407 -}
408 -
409 -pkg_config() {
410 - if ! use ssl ; then
411 - einfo "There is nothing to configure for rsyslog unless you"
412 - einfo "used USE=ssl to build it."
413 - return 0
414 - fi
415 -
416 - # Make sure the certificates directory exists
417 - local CERTDIR="${EROOT}/etc/ssl/${PN}"
418 - if [[ ! -d "${CERTDIR}" ]]; then
419 - mkdir "${CERTDIR}" || die
420 - fi
421 - einfo "Your certificates will be stored in ${CERTDIR}"
422 -
423 - # Create a default CA if needed
424 - if [[ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]]; then
425 - einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..."
426 - certtool --generate-privkey \
427 - --outfile "${CERTDIR}/${PN}_ca.privkey.pem" &>/dev/null
428 - chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
429 -
430 - cat > "${T}/${PF}.$$" <<- _EOF
431 - cn = Portage automated CA
432 - ca
433 - cert_signing_key
434 - expiration_days = 3650
435 - _EOF
436 -
437 - certtool --generate-self-signed \
438 - --load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
439 - --outfile "${CERTDIR}/${PN}_ca.cert.pem" \
440 - --template "${T}/${PF}.$$" &>/dev/null
441 - chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
442 -
443 - # Create the server certificate
444 - echo
445 - einfon "Please type the Common Name of the SERVER you wish to create a certificate for: "
446 - read -r CN
447 -
448 - einfo "Creating private key and certificate for server ${CN}..."
449 - certtool --generate-privkey \
450 - --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
451 - chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
452 -
453 - cat > "${T}/${PF}.$$" <<- _EOF
454 - cn = ${CN}
455 - tls_www_server
456 - dns_name = ${CN}
457 - expiration_days = 3650
458 - _EOF
459 -
460 - certtool --generate-certificate \
461 - --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
462 - --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
463 - --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
464 - --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
465 - --template "${T}/${PF}.$$" &>/dev/null
466 - chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
467 -
468 - else
469 - einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation."
470 - fi
471 -
472 - # Create a client certificate
473 - echo
474 - einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: "
475 - read -r CN
476 -
477 - einfo "Creating private key and certificate for client ${CN}..."
478 - certtool --generate-privkey \
479 - --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
480 - chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
481 -
482 - cat > "${T}/${PF}.$$" <<- _EOF
483 - cn = ${CN}
484 - tls_www_client
485 - dns_name = ${CN}
486 - expiration_days = 3650
487 - _EOF
488 -
489 - certtool --generate-certificate \
490 - --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
491 - --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
492 - --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
493 - --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
494 - --template "${T}/${PF}.$$" &>/dev/null
495 - chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
496 -
497 - rm -f "${T}/${PF}.$$"
498 -
499 - echo
500 - einfo "Here is the documentation on how to encrypt your log traffic:"
501 - einfo " https://www.rsyslog.com/doc/rsyslog_tls.html"
502 -}
503
504 diff --git a/app-admin/rsyslog/rsyslog-8.2001.0.ebuild b/app-admin/rsyslog/rsyslog-8.2001.0.ebuild
505 deleted file mode 100644
506 index e3157ed0808..00000000000
507 --- a/app-admin/rsyslog/rsyslog-8.2001.0.ebuild
508 +++ /dev/null
509 @@ -1,462 +0,0 @@
510 -# Copyright 1999-2020 Gentoo Authors
511 -# Distributed under the terms of the GNU General Public License v2
512 -
513 -EAPI="6"
514 -PYTHON_COMPAT=( python{3_6,3_7,3_8} )
515 -
516 -inherit autotools eutils linux-info ltprune python-any-r1 systemd
517 -
518 -DESCRIPTION="An enhanced multi-threaded syslogd with database support and more"
519 -HOMEPAGE="https://www.rsyslog.com/"
520 -
521 -if [[ ${PV} == "9999" ]]; then
522 - EGIT_REPO_URI="https://github.com/rsyslog/${PN}.git"
523 -
524 - DOC_REPO_URI="https://github.com/rsyslog/${PN}-doc.git"
525 -
526 - inherit git-r3
527 -else
528 - KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~x86"
529 -
530 - SRC_URI="
531 - https://www.rsyslog.com/files/download/${PN}/${P}.tar.gz
532 - doc? ( https://www.rsyslog.com/files/download/${PN}/${PN}-doc-${PV}.tar.gz )
533 - "
534 -fi
535 -
536 -LICENSE="GPL-3 LGPL-3 Apache-2.0"
537 -SLOT="0"
538 -IUSE="curl dbi debug doc elasticsearch +gcrypt gnutls jemalloc kafka kerberos kubernetes libressl mdblookup"
539 -IUSE+=" mongodb mysql normalize clickhouse omhttp omhttpfs omudpspoof openssl postgres"
540 -IUSE+=" rabbitmq redis relp rfc3195 rfc5424hmac snmp ssl systemd test usertools +uuid xxhash zeromq"
541 -RESTRICT="!test? ( test )"
542 -
543 -RDEPEND="
544 - >=dev-libs/libfastjson-0.99.8:=
545 - >=dev-libs/libestr-0.1.9
546 - >=sys-libs/zlib-1.2.5
547 - curl? ( >=net-misc/curl-7.35.0 )
548 - dbi? ( >=dev-db/libdbi-0.8.3 )
549 - elasticsearch? ( >=net-misc/curl-7.35.0 )
550 - gcrypt? ( >=dev-libs/libgcrypt-1.5.3:= )
551 - jemalloc? ( >=dev-libs/jemalloc-3.3.1:= )
552 - kafka? ( >=dev-libs/librdkafka-0.9.0.99:= )
553 - kerberos? ( virtual/krb5 )
554 - kubernetes? ( >=net-misc/curl-7.35.0 )
555 - mdblookup? ( dev-libs/libmaxminddb:= )
556 - mongodb? ( >=dev-libs/mongo-c-driver-1.1.10:= )
557 - mysql? ( dev-db/mysql-connector-c:= )
558 - normalize? (
559 - >=dev-libs/liblognorm-2.0.3:=
560 - )
561 - clickhouse? ( >=net-misc/curl-7.35.0 )
562 - omhttpfs? ( >=net-misc/curl-7.35.0 )
563 - omudpspoof? ( >=net-libs/libnet-1.1.6 )
564 - postgres? ( >=dev-db/postgresql-8.4.20:= )
565 - rabbitmq? ( >=net-libs/rabbitmq-c-0.3.0:= )
566 - redis? ( >=dev-libs/hiredis-0.11.0:= )
567 - relp? ( >=dev-libs/librelp-1.2.17:= )
568 - rfc3195? ( >=dev-libs/liblogging-1.0.1:=[rfc3195] )
569 - rfc5424hmac? (
570 - !libressl? ( >=dev-libs/openssl-0.9.8y:0= )
571 - libressl? ( dev-libs/libressl:= )
572 - )
573 - snmp? ( >=net-analyzer/net-snmp-5.7.2 )
574 - ssl? (
575 - gnutls? ( >=net-libs/gnutls-2.12.23:0= )
576 - openssl? (
577 - !libressl? ( dev-libs/openssl:0= )
578 - libressl? ( dev-libs/libressl:0= )
579 - )
580 - )
581 - systemd? ( >=sys-apps/systemd-234 )
582 - uuid? ( sys-apps/util-linux:0= )
583 - xxhash? ( dev-libs/xxhash:= )
584 - zeromq? (
585 - >=net-libs/czmq-3.0.2
586 - )"
587 -DEPEND="${RDEPEND}
588 - >=sys-devel/autoconf-archive-2015.02.24
589 - virtual/pkgconfig
590 - elibc_musl? ( sys-libs/queue-standalone )
591 - test? (
592 - >=dev-libs/liblogging-1.0.1[stdlog]
593 - jemalloc? ( <sys-libs/libfaketime-0.9.7 )
594 - !jemalloc? ( sys-libs/libfaketime )
595 - ${PYTHON_DEPS}
596 - )"
597 -
598 -REQUIRED_USE="
599 - kubernetes? ( normalize )
600 - ssl? ( || ( gnutls openssl ) )
601 -"
602 -
603 -if [[ ${PV} == "9999" ]]; then
604 - DEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )"
605 - DEPEND+=" >=sys-devel/flex-2.5.39-r1"
606 - DEPEND+=" >=sys-devel/bison-2.4.3"
607 - DEPEND+=" >=dev-python/docutils-0.12"
608 -fi
609 -
610 -CONFIG_CHECK="~INOTIFY_USER"
611 -WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"
612 -
613 -pkg_setup() {
614 - use test && python-any-r1_pkg_setup
615 -}
616 -
617 -src_unpack() {
618 - if [[ ${PV} == "9999" ]]; then
619 - git-r3_fetch
620 - git-r3_checkout
621 - else
622 - unpack ${P}.tar.gz
623 - fi
624 -
625 - if use doc; then
626 - if [[ ${PV} == "9999" ]]; then
627 - local _EGIT_BRANCH=
628 - if [[ -n "${EGIT_BRANCH}" ]]; then
629 - # Cannot use rsyslog commits/branches for documentation repository
630 - _EGIT_BRANCH=${EGIT_BRANCH}
631 - unset EGIT_BRANCH
632 - fi
633 -
634 - git-r3_fetch "${DOC_REPO_URI}"
635 - git-r3_checkout "${DOC_REPO_URI}" "${S}"/docs
636 -
637 - if [[ -n "${_EGIT_BRANCH}" ]]; then
638 - # Restore previous EGIT_BRANCH information
639 - EGIT_BRANCH=${_EGIT_BRANCH}
640 - fi
641 - else
642 - cd "${S}" || die "Cannot change dir into '${S}'"
643 - mkdir docs || die "Failed to create docs directory"
644 - cd docs || die "Failed to change dir into '${S}/docs'"
645 - unpack ${PN}-doc-${PV}.tar.gz
646 - fi
647 - fi
648 -}
649 -
650 -src_prepare() {
651 - default
652 -
653 - # https://github.com/rsyslog/rsyslog/issues/3626
654 - sed -i \
655 - -e '\|^#!/bin/bash$|a exit 77' \
656 - tests/mmkubernetes-cache-expir*.sh \
657 - || die "Failed to disabled known test failure mmkubernetes-cache-expir*.sh"
658 -
659 - eautoreconf
660 -}
661 -
662 -src_configure() {
663 - # Maintainer notes:
664 - # * Guardtime support is missing because libgt isn't yet available
665 - # in portage.
666 - # * Hadoop's HDFS file system output module is currently not
667 - # supported in Gentoo because nobody is able to test it
668 - # (JAVA dependency).
669 - # * dev-libs/hiredis doesn't provide pkg-config (see #504614,
670 - # upstream PR 129 and 136) so we need to export HIREDIS_*
671 - # variables because rsyslog's build system depends on pkg-config.
672 -
673 - if use redis; then
674 - export HIREDIS_LIBS="-L${EPREFIX}/usr/$(get_libdir) -lhiredis"
675 - export HIREDIS_CFLAGS="-I${EPREFIX}/usr/include"
676 - fi
677 -
678 - local myeconfargs=(
679 - --disable-debug-symbols
680 - --disable-generate-man-pages
681 - --without-valgrind-testbench
682 - --disable-liblogging-stdlog
683 - $(use_enable test testbench)
684 - $(use_enable test libfaketime)
685 - $(use_enable test extended-tests)
686 - # Input Plugins without depedencies
687 - --enable-imdiag
688 - --enable-imfile
689 - --enable-impstats
690 - --enable-imptcp
691 - # Message Modificiation Plugins without depedencies
692 - --enable-mmanon
693 - --enable-mmaudit
694 - --enable-mmcount
695 - --enable-mmfields
696 - --enable-mmjsonparse
697 - --enable-mmpstrucdata
698 - --enable-mmrm1stspace
699 - --enable-mmsequence
700 - --enable-mmutf8fix
701 - # Output Modification Plugins without dependencies
702 - --enable-mail
703 - --enable-omprog
704 - --enable-omruleset
705 - --enable-omstdout
706 - --enable-omuxsock
707 - # Misc
708 - --enable-fmhash
709 - $(use_enable xxhash fmhash-xxhash)
710 - --enable-pmaixforwardedfrom
711 - --enable-pmciscoios
712 - --enable-pmcisconames
713 - --enable-pmlastmsg
714 - $(use_enable normalize pmnormalize)
715 - --enable-pmnull
716 - --enable-pmpanngfw
717 - --enable-pmsnare
718 - # DB
719 - $(use_enable dbi libdbi)
720 - $(use_enable mongodb ommongodb)
721 - $(use_enable mysql)
722 - $(use_enable postgres pgsql)
723 - $(use_enable redis omhiredis)
724 - # Debug
725 - $(use_enable debug)
726 - $(use_enable debug diagtools)
727 - $(use_enable debug valgrind)
728 - # Misc
729 - $(use_enable clickhouse)
730 - $(use_enable curl fmhttp)
731 - $(use_enable elasticsearch)
732 - $(use_enable gcrypt libgcrypt)
733 - $(use_enable jemalloc)
734 - $(use_enable kafka imkafka)
735 - $(use_enable kafka omkafka)
736 - $(use_enable kerberos gssapi-krb5)
737 - $(use_enable kubernetes mmkubernetes)
738 - $(use_enable normalize mmnormalize)
739 - $(use_enable mdblookup mmdblookup)
740 - $(use_enable omhttp)
741 - $(use_enable omhttpfs)
742 - $(use_enable omudpspoof)
743 - $(use_enable rabbitmq omrabbitmq)
744 - $(use_enable relp)
745 - $(use_enable rfc3195)
746 - $(use_enable rfc5424hmac mmrfc5424addhmac)
747 - $(use_enable snmp)
748 - $(use_enable snmp mmsnmptrapd)
749 - $(use_enable gnutls)
750 - $(use_enable openssl)
751 - $(use_enable systemd imjournal)
752 - $(use_enable systemd omjournal)
753 - $(use_enable usertools)
754 - $(use_enable uuid)
755 - $(use_enable zeromq imczmq)
756 - $(use_enable zeromq omczmq)
757 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
758 - )
759 -
760 - econf "${myeconfargs[@]}"
761 -}
762 -
763 -src_compile() {
764 - default
765 -
766 - if use doc && [[ "${PV}" == "9999" ]]; then
767 - einfo "Building documentation ..."
768 - local doc_dir="${S}/docs"
769 - cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!"
770 - sphinx-build -b html source build || die "Building documentation failed!"
771 - fi
772 -}
773 -
774 -src_test() {
775 - local _has_increased_ulimit=
776 -
777 - # Sometimes tests aren't executable (i.e. when added via patch)
778 - einfo "Adjusting permissions of test scripts ..."
779 - find "${S}"/tests -type f -name '*.sh' \! -perm -111 -exec chmod a+x '{}' \; || \
780 - die "Failed to adjust test scripts permission"
781 -
782 - if ulimit -n 3072; then
783 - _has_increased_ulimit="true"
784 - fi
785 -
786 - if ! emake --jobs 1 check; then
787 - eerror "Test suite failed! :("
788 -
789 - if [[ -z "${_has_increased_ulimit}" ]]; then
790 - eerror "Probably because open file limit couldn't be set to 3072."
791 - fi
792 -
793 - if has userpriv ${FEATURES}; then
794 - eerror "Please try to reproduce the test suite failure with FEATURES=-userpriv " \
795 - "before you submit a bug report."
796 - fi
797 -
798 - fi
799 -}
800 -
801 -src_install() {
802 - local DOCS=(
803 - AUTHORS
804 - ChangeLog
805 - "${FILESDIR}"/README.gentoo
806 - )
807 -
808 - use doc && local HTML_DOCS=( "${S}/docs/build/." )
809 -
810 - default
811 -
812 - newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
813 - newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
814 -
815 - keepdir /var/empty/dev
816 - keepdir /var/spool/${PN}
817 - keepdir /etc/ssl/${PN}
818 - keepdir /etc/${PN}.d
819 -
820 - insinto /etc
821 - newins "${FILESDIR}/${PN}.conf" ${PN}.conf
822 -
823 - insinto /etc/rsyslog.d/
824 - newins "${FILESDIR}/50-default-r1.conf" 50-default.conf
825 -
826 - insinto /etc/logrotate.d/
827 - newins "${FILESDIR}/${PN}-r1.logrotate" ${PN}
828 -
829 - if use mysql; then
830 - insinto /usr/share/${PN}/scripts/mysql
831 - doins plugins/ommysql/createDB.sql
832 - fi
833 -
834 - if use postgres; then
835 - insinto /usr/share/${PN}/scripts/pgsql
836 - doins plugins/ompgsql/createDB.sql
837 - fi
838 -
839 - prune_libtool_files --modules
840 -}
841 -
842 -pkg_postinst() {
843 - local advertise_readme=0
844 -
845 - if [[ -z "${REPLACING_VERSIONS}" ]]; then
846 - # This is a new installation
847 -
848 - advertise_readme=1
849 -
850 - if use mysql || use postgres; then
851 - echo
852 - elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:"
853 - elog " /usr/share/doc/${PF}/scripts"
854 - fi
855 -
856 - if use ssl; then
857 - echo
858 - elog "To create a default CA and certificates for your server and clients, run:"
859 - elog " emerge --config =${PF}"
860 - elog "on your logging server. You can run it several times,"
861 - elog "once for each logging client. The client certificates will be signed"
862 - elog "using the CA certificate generated during the first run."
863 - fi
864 - fi
865 -
866 - if [[ ${advertise_readme} -gt 0 ]]; then
867 - # We need to show the README file location
868 -
869 - echo ""
870 - elog "Please read"
871 - elog ""
872 - elog " ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*"
873 - elog ""
874 - elog "for more details."
875 - fi
876 -}
877 -
878 -pkg_config() {
879 - if ! use ssl ; then
880 - einfo "There is nothing to configure for rsyslog unless you"
881 - einfo "used USE=ssl to build it."
882 - return 0
883 - fi
884 -
885 - # Make sure the certificates directory exists
886 - local CERTDIR="${EROOT}/etc/ssl/${PN}"
887 - if [[ ! -d "${CERTDIR}" ]]; then
888 - mkdir "${CERTDIR}" || die
889 - fi
890 - einfo "Your certificates will be stored in ${CERTDIR}"
891 -
892 - # Create a default CA if needed
893 - if [[ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]]; then
894 - einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..."
895 - certtool --generate-privkey \
896 - --outfile "${CERTDIR}/${PN}_ca.privkey.pem" &>/dev/null
897 - chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
898 -
899 - cat > "${T}/${PF}.$$" <<- _EOF
900 - cn = Portage automated CA
901 - ca
902 - cert_signing_key
903 - expiration_days = 3650
904 - _EOF
905 -
906 - certtool --generate-self-signed \
907 - --load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
908 - --outfile "${CERTDIR}/${PN}_ca.cert.pem" \
909 - --template "${T}/${PF}.$$" &>/dev/null
910 - chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
911 -
912 - # Create the server certificate
913 - echo
914 - einfon "Please type the Common Name of the SERVER you wish to create a certificate for: "
915 - read -r CN
916 -
917 - einfo "Creating private key and certificate for server ${CN}..."
918 - certtool --generate-privkey \
919 - --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
920 - chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
921 -
922 - cat > "${T}/${PF}.$$" <<- _EOF
923 - cn = ${CN}
924 - tls_www_server
925 - dns_name = ${CN}
926 - expiration_days = 3650
927 - _EOF
928 -
929 - certtool --generate-certificate \
930 - --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
931 - --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
932 - --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
933 - --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
934 - --template "${T}/${PF}.$$" &>/dev/null
935 - chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
936 -
937 - else
938 - einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation."
939 - fi
940 -
941 - # Create a client certificate
942 - echo
943 - einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: "
944 - read -r CN
945 -
946 - einfo "Creating private key and certificate for client ${CN}..."
947 - certtool --generate-privkey \
948 - --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
949 - chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
950 -
951 - cat > "${T}/${PF}.$$" <<- _EOF
952 - cn = ${CN}
953 - tls_www_client
954 - dns_name = ${CN}
955 - expiration_days = 3650
956 - _EOF
957 -
958 - certtool --generate-certificate \
959 - --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
960 - --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
961 - --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
962 - --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
963 - --template "${T}/${PF}.$$" &>/dev/null
964 - chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
965 -
966 - rm -f "${T}/${PF}.$$"
967 -
968 - echo
969 - einfo "Here is the documentation on how to encrypt your log traffic:"
970 - einfo " https://www.rsyslog.com/doc/rsyslog_tls.html"
971 -}
972
973 diff --git a/app-admin/rsyslog/rsyslog-8.2002.0.ebuild b/app-admin/rsyslog/rsyslog-8.2002.0.ebuild
974 deleted file mode 100644
975 index e3157ed0808..00000000000
976 --- a/app-admin/rsyslog/rsyslog-8.2002.0.ebuild
977 +++ /dev/null
978 @@ -1,462 +0,0 @@
979 -# Copyright 1999-2020 Gentoo Authors
980 -# Distributed under the terms of the GNU General Public License v2
981 -
982 -EAPI="6"
983 -PYTHON_COMPAT=( python{3_6,3_7,3_8} )
984 -
985 -inherit autotools eutils linux-info ltprune python-any-r1 systemd
986 -
987 -DESCRIPTION="An enhanced multi-threaded syslogd with database support and more"
988 -HOMEPAGE="https://www.rsyslog.com/"
989 -
990 -if [[ ${PV} == "9999" ]]; then
991 - EGIT_REPO_URI="https://github.com/rsyslog/${PN}.git"
992 -
993 - DOC_REPO_URI="https://github.com/rsyslog/${PN}-doc.git"
994 -
995 - inherit git-r3
996 -else
997 - KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~x86"
998 -
999 - SRC_URI="
1000 - https://www.rsyslog.com/files/download/${PN}/${P}.tar.gz
1001 - doc? ( https://www.rsyslog.com/files/download/${PN}/${PN}-doc-${PV}.tar.gz )
1002 - "
1003 -fi
1004 -
1005 -LICENSE="GPL-3 LGPL-3 Apache-2.0"
1006 -SLOT="0"
1007 -IUSE="curl dbi debug doc elasticsearch +gcrypt gnutls jemalloc kafka kerberos kubernetes libressl mdblookup"
1008 -IUSE+=" mongodb mysql normalize clickhouse omhttp omhttpfs omudpspoof openssl postgres"
1009 -IUSE+=" rabbitmq redis relp rfc3195 rfc5424hmac snmp ssl systemd test usertools +uuid xxhash zeromq"
1010 -RESTRICT="!test? ( test )"
1011 -
1012 -RDEPEND="
1013 - >=dev-libs/libfastjson-0.99.8:=
1014 - >=dev-libs/libestr-0.1.9
1015 - >=sys-libs/zlib-1.2.5
1016 - curl? ( >=net-misc/curl-7.35.0 )
1017 - dbi? ( >=dev-db/libdbi-0.8.3 )
1018 - elasticsearch? ( >=net-misc/curl-7.35.0 )
1019 - gcrypt? ( >=dev-libs/libgcrypt-1.5.3:= )
1020 - jemalloc? ( >=dev-libs/jemalloc-3.3.1:= )
1021 - kafka? ( >=dev-libs/librdkafka-0.9.0.99:= )
1022 - kerberos? ( virtual/krb5 )
1023 - kubernetes? ( >=net-misc/curl-7.35.0 )
1024 - mdblookup? ( dev-libs/libmaxminddb:= )
1025 - mongodb? ( >=dev-libs/mongo-c-driver-1.1.10:= )
1026 - mysql? ( dev-db/mysql-connector-c:= )
1027 - normalize? (
1028 - >=dev-libs/liblognorm-2.0.3:=
1029 - )
1030 - clickhouse? ( >=net-misc/curl-7.35.0 )
1031 - omhttpfs? ( >=net-misc/curl-7.35.0 )
1032 - omudpspoof? ( >=net-libs/libnet-1.1.6 )
1033 - postgres? ( >=dev-db/postgresql-8.4.20:= )
1034 - rabbitmq? ( >=net-libs/rabbitmq-c-0.3.0:= )
1035 - redis? ( >=dev-libs/hiredis-0.11.0:= )
1036 - relp? ( >=dev-libs/librelp-1.2.17:= )
1037 - rfc3195? ( >=dev-libs/liblogging-1.0.1:=[rfc3195] )
1038 - rfc5424hmac? (
1039 - !libressl? ( >=dev-libs/openssl-0.9.8y:0= )
1040 - libressl? ( dev-libs/libressl:= )
1041 - )
1042 - snmp? ( >=net-analyzer/net-snmp-5.7.2 )
1043 - ssl? (
1044 - gnutls? ( >=net-libs/gnutls-2.12.23:0= )
1045 - openssl? (
1046 - !libressl? ( dev-libs/openssl:0= )
1047 - libressl? ( dev-libs/libressl:0= )
1048 - )
1049 - )
1050 - systemd? ( >=sys-apps/systemd-234 )
1051 - uuid? ( sys-apps/util-linux:0= )
1052 - xxhash? ( dev-libs/xxhash:= )
1053 - zeromq? (
1054 - >=net-libs/czmq-3.0.2
1055 - )"
1056 -DEPEND="${RDEPEND}
1057 - >=sys-devel/autoconf-archive-2015.02.24
1058 - virtual/pkgconfig
1059 - elibc_musl? ( sys-libs/queue-standalone )
1060 - test? (
1061 - >=dev-libs/liblogging-1.0.1[stdlog]
1062 - jemalloc? ( <sys-libs/libfaketime-0.9.7 )
1063 - !jemalloc? ( sys-libs/libfaketime )
1064 - ${PYTHON_DEPS}
1065 - )"
1066 -
1067 -REQUIRED_USE="
1068 - kubernetes? ( normalize )
1069 - ssl? ( || ( gnutls openssl ) )
1070 -"
1071 -
1072 -if [[ ${PV} == "9999" ]]; then
1073 - DEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )"
1074 - DEPEND+=" >=sys-devel/flex-2.5.39-r1"
1075 - DEPEND+=" >=sys-devel/bison-2.4.3"
1076 - DEPEND+=" >=dev-python/docutils-0.12"
1077 -fi
1078 -
1079 -CONFIG_CHECK="~INOTIFY_USER"
1080 -WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"
1081 -
1082 -pkg_setup() {
1083 - use test && python-any-r1_pkg_setup
1084 -}
1085 -
1086 -src_unpack() {
1087 - if [[ ${PV} == "9999" ]]; then
1088 - git-r3_fetch
1089 - git-r3_checkout
1090 - else
1091 - unpack ${P}.tar.gz
1092 - fi
1093 -
1094 - if use doc; then
1095 - if [[ ${PV} == "9999" ]]; then
1096 - local _EGIT_BRANCH=
1097 - if [[ -n "${EGIT_BRANCH}" ]]; then
1098 - # Cannot use rsyslog commits/branches for documentation repository
1099 - _EGIT_BRANCH=${EGIT_BRANCH}
1100 - unset EGIT_BRANCH
1101 - fi
1102 -
1103 - git-r3_fetch "${DOC_REPO_URI}"
1104 - git-r3_checkout "${DOC_REPO_URI}" "${S}"/docs
1105 -
1106 - if [[ -n "${_EGIT_BRANCH}" ]]; then
1107 - # Restore previous EGIT_BRANCH information
1108 - EGIT_BRANCH=${_EGIT_BRANCH}
1109 - fi
1110 - else
1111 - cd "${S}" || die "Cannot change dir into '${S}'"
1112 - mkdir docs || die "Failed to create docs directory"
1113 - cd docs || die "Failed to change dir into '${S}/docs'"
1114 - unpack ${PN}-doc-${PV}.tar.gz
1115 - fi
1116 - fi
1117 -}
1118 -
1119 -src_prepare() {
1120 - default
1121 -
1122 - # https://github.com/rsyslog/rsyslog/issues/3626
1123 - sed -i \
1124 - -e '\|^#!/bin/bash$|a exit 77' \
1125 - tests/mmkubernetes-cache-expir*.sh \
1126 - || die "Failed to disabled known test failure mmkubernetes-cache-expir*.sh"
1127 -
1128 - eautoreconf
1129 -}
1130 -
1131 -src_configure() {
1132 - # Maintainer notes:
1133 - # * Guardtime support is missing because libgt isn't yet available
1134 - # in portage.
1135 - # * Hadoop's HDFS file system output module is currently not
1136 - # supported in Gentoo because nobody is able to test it
1137 - # (JAVA dependency).
1138 - # * dev-libs/hiredis doesn't provide pkg-config (see #504614,
1139 - # upstream PR 129 and 136) so we need to export HIREDIS_*
1140 - # variables because rsyslog's build system depends on pkg-config.
1141 -
1142 - if use redis; then
1143 - export HIREDIS_LIBS="-L${EPREFIX}/usr/$(get_libdir) -lhiredis"
1144 - export HIREDIS_CFLAGS="-I${EPREFIX}/usr/include"
1145 - fi
1146 -
1147 - local myeconfargs=(
1148 - --disable-debug-symbols
1149 - --disable-generate-man-pages
1150 - --without-valgrind-testbench
1151 - --disable-liblogging-stdlog
1152 - $(use_enable test testbench)
1153 - $(use_enable test libfaketime)
1154 - $(use_enable test extended-tests)
1155 - # Input Plugins without depedencies
1156 - --enable-imdiag
1157 - --enable-imfile
1158 - --enable-impstats
1159 - --enable-imptcp
1160 - # Message Modificiation Plugins without depedencies
1161 - --enable-mmanon
1162 - --enable-mmaudit
1163 - --enable-mmcount
1164 - --enable-mmfields
1165 - --enable-mmjsonparse
1166 - --enable-mmpstrucdata
1167 - --enable-mmrm1stspace
1168 - --enable-mmsequence
1169 - --enable-mmutf8fix
1170 - # Output Modification Plugins without dependencies
1171 - --enable-mail
1172 - --enable-omprog
1173 - --enable-omruleset
1174 - --enable-omstdout
1175 - --enable-omuxsock
1176 - # Misc
1177 - --enable-fmhash
1178 - $(use_enable xxhash fmhash-xxhash)
1179 - --enable-pmaixforwardedfrom
1180 - --enable-pmciscoios
1181 - --enable-pmcisconames
1182 - --enable-pmlastmsg
1183 - $(use_enable normalize pmnormalize)
1184 - --enable-pmnull
1185 - --enable-pmpanngfw
1186 - --enable-pmsnare
1187 - # DB
1188 - $(use_enable dbi libdbi)
1189 - $(use_enable mongodb ommongodb)
1190 - $(use_enable mysql)
1191 - $(use_enable postgres pgsql)
1192 - $(use_enable redis omhiredis)
1193 - # Debug
1194 - $(use_enable debug)
1195 - $(use_enable debug diagtools)
1196 - $(use_enable debug valgrind)
1197 - # Misc
1198 - $(use_enable clickhouse)
1199 - $(use_enable curl fmhttp)
1200 - $(use_enable elasticsearch)
1201 - $(use_enable gcrypt libgcrypt)
1202 - $(use_enable jemalloc)
1203 - $(use_enable kafka imkafka)
1204 - $(use_enable kafka omkafka)
1205 - $(use_enable kerberos gssapi-krb5)
1206 - $(use_enable kubernetes mmkubernetes)
1207 - $(use_enable normalize mmnormalize)
1208 - $(use_enable mdblookup mmdblookup)
1209 - $(use_enable omhttp)
1210 - $(use_enable omhttpfs)
1211 - $(use_enable omudpspoof)
1212 - $(use_enable rabbitmq omrabbitmq)
1213 - $(use_enable relp)
1214 - $(use_enable rfc3195)
1215 - $(use_enable rfc5424hmac mmrfc5424addhmac)
1216 - $(use_enable snmp)
1217 - $(use_enable snmp mmsnmptrapd)
1218 - $(use_enable gnutls)
1219 - $(use_enable openssl)
1220 - $(use_enable systemd imjournal)
1221 - $(use_enable systemd omjournal)
1222 - $(use_enable usertools)
1223 - $(use_enable uuid)
1224 - $(use_enable zeromq imczmq)
1225 - $(use_enable zeromq omczmq)
1226 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
1227 - )
1228 -
1229 - econf "${myeconfargs[@]}"
1230 -}
1231 -
1232 -src_compile() {
1233 - default
1234 -
1235 - if use doc && [[ "${PV}" == "9999" ]]; then
1236 - einfo "Building documentation ..."
1237 - local doc_dir="${S}/docs"
1238 - cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!"
1239 - sphinx-build -b html source build || die "Building documentation failed!"
1240 - fi
1241 -}
1242 -
1243 -src_test() {
1244 - local _has_increased_ulimit=
1245 -
1246 - # Sometimes tests aren't executable (i.e. when added via patch)
1247 - einfo "Adjusting permissions of test scripts ..."
1248 - find "${S}"/tests -type f -name '*.sh' \! -perm -111 -exec chmod a+x '{}' \; || \
1249 - die "Failed to adjust test scripts permission"
1250 -
1251 - if ulimit -n 3072; then
1252 - _has_increased_ulimit="true"
1253 - fi
1254 -
1255 - if ! emake --jobs 1 check; then
1256 - eerror "Test suite failed! :("
1257 -
1258 - if [[ -z "${_has_increased_ulimit}" ]]; then
1259 - eerror "Probably because open file limit couldn't be set to 3072."
1260 - fi
1261 -
1262 - if has userpriv ${FEATURES}; then
1263 - eerror "Please try to reproduce the test suite failure with FEATURES=-userpriv " \
1264 - "before you submit a bug report."
1265 - fi
1266 -
1267 - fi
1268 -}
1269 -
1270 -src_install() {
1271 - local DOCS=(
1272 - AUTHORS
1273 - ChangeLog
1274 - "${FILESDIR}"/README.gentoo
1275 - )
1276 -
1277 - use doc && local HTML_DOCS=( "${S}/docs/build/." )
1278 -
1279 - default
1280 -
1281 - newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
1282 - newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
1283 -
1284 - keepdir /var/empty/dev
1285 - keepdir /var/spool/${PN}
1286 - keepdir /etc/ssl/${PN}
1287 - keepdir /etc/${PN}.d
1288 -
1289 - insinto /etc
1290 - newins "${FILESDIR}/${PN}.conf" ${PN}.conf
1291 -
1292 - insinto /etc/rsyslog.d/
1293 - newins "${FILESDIR}/50-default-r1.conf" 50-default.conf
1294 -
1295 - insinto /etc/logrotate.d/
1296 - newins "${FILESDIR}/${PN}-r1.logrotate" ${PN}
1297 -
1298 - if use mysql; then
1299 - insinto /usr/share/${PN}/scripts/mysql
1300 - doins plugins/ommysql/createDB.sql
1301 - fi
1302 -
1303 - if use postgres; then
1304 - insinto /usr/share/${PN}/scripts/pgsql
1305 - doins plugins/ompgsql/createDB.sql
1306 - fi
1307 -
1308 - prune_libtool_files --modules
1309 -}
1310 -
1311 -pkg_postinst() {
1312 - local advertise_readme=0
1313 -
1314 - if [[ -z "${REPLACING_VERSIONS}" ]]; then
1315 - # This is a new installation
1316 -
1317 - advertise_readme=1
1318 -
1319 - if use mysql || use postgres; then
1320 - echo
1321 - elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:"
1322 - elog " /usr/share/doc/${PF}/scripts"
1323 - fi
1324 -
1325 - if use ssl; then
1326 - echo
1327 - elog "To create a default CA and certificates for your server and clients, run:"
1328 - elog " emerge --config =${PF}"
1329 - elog "on your logging server. You can run it several times,"
1330 - elog "once for each logging client. The client certificates will be signed"
1331 - elog "using the CA certificate generated during the first run."
1332 - fi
1333 - fi
1334 -
1335 - if [[ ${advertise_readme} -gt 0 ]]; then
1336 - # We need to show the README file location
1337 -
1338 - echo ""
1339 - elog "Please read"
1340 - elog ""
1341 - elog " ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*"
1342 - elog ""
1343 - elog "for more details."
1344 - fi
1345 -}
1346 -
1347 -pkg_config() {
1348 - if ! use ssl ; then
1349 - einfo "There is nothing to configure for rsyslog unless you"
1350 - einfo "used USE=ssl to build it."
1351 - return 0
1352 - fi
1353 -
1354 - # Make sure the certificates directory exists
1355 - local CERTDIR="${EROOT}/etc/ssl/${PN}"
1356 - if [[ ! -d "${CERTDIR}" ]]; then
1357 - mkdir "${CERTDIR}" || die
1358 - fi
1359 - einfo "Your certificates will be stored in ${CERTDIR}"
1360 -
1361 - # Create a default CA if needed
1362 - if [[ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]]; then
1363 - einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..."
1364 - certtool --generate-privkey \
1365 - --outfile "${CERTDIR}/${PN}_ca.privkey.pem" &>/dev/null
1366 - chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
1367 -
1368 - cat > "${T}/${PF}.$$" <<- _EOF
1369 - cn = Portage automated CA
1370 - ca
1371 - cert_signing_key
1372 - expiration_days = 3650
1373 - _EOF
1374 -
1375 - certtool --generate-self-signed \
1376 - --load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
1377 - --outfile "${CERTDIR}/${PN}_ca.cert.pem" \
1378 - --template "${T}/${PF}.$$" &>/dev/null
1379 - chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
1380 -
1381 - # Create the server certificate
1382 - echo
1383 - einfon "Please type the Common Name of the SERVER you wish to create a certificate for: "
1384 - read -r CN
1385 -
1386 - einfo "Creating private key and certificate for server ${CN}..."
1387 - certtool --generate-privkey \
1388 - --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
1389 - chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
1390 -
1391 - cat > "${T}/${PF}.$$" <<- _EOF
1392 - cn = ${CN}
1393 - tls_www_server
1394 - dns_name = ${CN}
1395 - expiration_days = 3650
1396 - _EOF
1397 -
1398 - certtool --generate-certificate \
1399 - --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
1400 - --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
1401 - --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
1402 - --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
1403 - --template "${T}/${PF}.$$" &>/dev/null
1404 - chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
1405 -
1406 - else
1407 - einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation."
1408 - fi
1409 -
1410 - # Create a client certificate
1411 - echo
1412 - einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: "
1413 - read -r CN
1414 -
1415 - einfo "Creating private key and certificate for client ${CN}..."
1416 - certtool --generate-privkey \
1417 - --outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
1418 - chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
1419 -
1420 - cat > "${T}/${PF}.$$" <<- _EOF
1421 - cn = ${CN}
1422 - tls_www_client
1423 - dns_name = ${CN}
1424 - expiration_days = 3650
1425 - _EOF
1426 -
1427 - certtool --generate-certificate \
1428 - --outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
1429 - --load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
1430 - --load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
1431 - --load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
1432 - --template "${T}/${PF}.$$" &>/dev/null
1433 - chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
1434 -
1435 - rm -f "${T}/${PF}.$$"
1436 -
1437 - echo
1438 - einfo "Here is the documentation on how to encrypt your log traffic:"
1439 - einfo " https://www.rsyslog.com/doc/rsyslog_tls.html"
1440 -}