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