Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/syslog-ng/files/3.12/, app-admin/syslog-ng/
Date: Sun, 03 Dec 2017 15:15:24
Message-Id: 1512314116.6224a15aebc6f09a22681a47e03d93114b9d910a.monsieurp@gentoo
1 commit: 6224a15aebc6f09a22681a47e03d93114b9d910a
2 Author: Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Fri Nov 24 07:17:15 2017 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 3 15:15:16 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6224a15a
7
8 app-admin/syslog-ng: version bump to 3.12.1.
9
10 Closes: https://bugs.gentoo.org/592920
11 Closes: https://github.com/gentoo/gentoo/pull/6275
12 Package-Manager: Portage-2.3.16, Repoman-2.3.6
13
14 app-admin/syslog-ng/Manifest | 3 +-
15 .../syslog-ng/files/3.12/syslog-ng.conf.gentoo | 36 +++++
16 .../files/3.12/syslog-ng.conf.gentoo.fbsd | 24 ++++
17 .../files/3.12/syslog-ng.conf.gentoo.hardened | 114 ++++++++++++++++
18 app-admin/syslog-ng/files/3.12/syslog-ng.confd | 42 ++++++
19 app-admin/syslog-ng/files/3.12/syslog-ng.rc | 58 ++++++++
20 app-admin/syslog-ng/metadata.xml | 5 +-
21 app-admin/syslog-ng/syslog-ng-3.12.1.ebuild | 149 +++++++++++++++++++++
22 8 files changed, 428 insertions(+), 3 deletions(-)
23
24 diff --git a/app-admin/syslog-ng/Manifest b/app-admin/syslog-ng/Manifest
25 index eb4f5c9341b..282ffeb2b72 100644
26 --- a/app-admin/syslog-ng/Manifest
27 +++ b/app-admin/syslog-ng/Manifest
28 @@ -1 +1,2 @@
29 -DIST syslog-ng-3.7.3.tar.gz 3511155 SHA256 49201dcfd59c8992936aa16c694f5e6593d505b44895f6c66b7d7f7895ce2c62 SHA512 e58d793bd1a8b48c5836090ee244f6e8b223f234f5a27fbf81f6a838b9b1e3e45f73a66dab2bc58a0bba230bd778a247ae22bf529a28fb2e9fee52b8181d304b WHIRLPOOL ee434b8919183a70f484e6c96246b020a53a42e4306b2dea3b8ec15de71a1ad5be5185f0f3df5da76f0ca68618ff8391806748c6bea4a6844648e0939a57e97a
30 +DIST syslog-ng-3.12.1.tar.gz 8905646 BLAKE2B abe273c561569047ef4ea0b21b08341d207ecc9a37ba88d1aa28f00de8a0c28cab2942b3d461b7b4fea940668b44ceda7f9c71b6f7c7583143f4bf65adb54036 SHA512 00370f8b090156c064d9fe932e2aafe3f78ffc01bc47b2bc2f0f3c6cbdf98ea8cc2084317b8c2b1a9755cce404646b20e131039ce55b87e24f4401a55b95ff7e
31 +DIST syslog-ng-3.7.3.tar.gz 3511155 BLAKE2B 25ba2ca241a5847c75792c78d39a4667f55cf1fcff46be5102256ee6a9d2f39e2042ac00fa0b1559f94e0df80a0853249692b443b565dd4f46f0354c453cacaf SHA512 e58d793bd1a8b48c5836090ee244f6e8b223f234f5a27fbf81f6a838b9b1e3e45f73a66dab2bc58a0bba230bd778a247ae22bf529a28fb2e9fee52b8181d304b
32
33 diff --git a/app-admin/syslog-ng/files/3.12/syslog-ng.conf.gentoo b/app-admin/syslog-ng/files/3.12/syslog-ng.conf.gentoo
34 new file mode 100644
35 index 00000000000..523a6804e14
36 --- /dev/null
37 +++ b/app-admin/syslog-ng/files/3.12/syslog-ng.conf.gentoo
38 @@ -0,0 +1,36 @@
39 +@version: 3.12
40 +#
41 +# Syslog-ng default configuration file for Gentoo Linux
42 +
43 +# https://bugs.gentoo.org/426814
44 +@include "scl.conf"
45 +
46 +options {
47 + threaded(yes);
48 + chain_hostnames(no);
49 +
50 + # The default action of syslog-ng is to log a STATS line
51 + # to the file every 10 minutes. That's pretty ugly after a while.
52 + # Change it to every 12 hours so you get a nice daily update of
53 + # how many messages syslog-ng missed (0).
54 + stats_freq(43200);
55 + # The default action of syslog-ng is to log a MARK line
56 + # to the file every 20 minutes. That's seems high for most
57 + # people so turn it down to once an hour. Set it to zero
58 + # if you don't want the functionality at all.
59 + mark_freq(3600);
60 +};
61 +
62 +source src { system(); internal(); };
63 +
64 +destination messages { file("/var/log/messages"); };
65 +
66 +# By default messages are logged to tty12...
67 +destination console_all { file("/dev/tty12"); };
68 +# ...if you intend to use /dev/console for programs like xconsole
69 +# you can comment out the destination line above that references /dev/tty12
70 +# and uncomment the line below.
71 +#destination console_all { file("/dev/console"); };
72 +
73 +log { source(src); destination(messages); };
74 +log { source(src); destination(console_all); };
75
76 diff --git a/app-admin/syslog-ng/files/3.12/syslog-ng.conf.gentoo.fbsd b/app-admin/syslog-ng/files/3.12/syslog-ng.conf.gentoo.fbsd
77 new file mode 100644
78 index 00000000000..a0f516c7a58
79 --- /dev/null
80 +++ b/app-admin/syslog-ng/files/3.12/syslog-ng.conf.gentoo.fbsd
81 @@ -0,0 +1,24 @@
82 +@version: 3.12
83 +#
84 +# Syslog-ng default configuration file for Gentoo FreeBSD
85 +#
86 +
87 +# https://bugs.gentoo.org/426814
88 +@include "scl.conf"
89 +
90 +options {
91 + threaded(yes);
92 + chain_hostnames(no);
93 +
94 + # The default action of syslog-ng is to log a STATS line
95 + # to the file every 10 minutes. That's pretty ugly after a while.
96 + # Change it to every 12 hours so you get a nice daily update of
97 + # how many messages syslog-ng missed (0).
98 + stats_freq(43200);
99 +};
100 +
101 +source src { system(); internal(); };
102 +
103 +destination messages { file("/var/log/messages"); };
104 +
105 +log { source(src); destination(messages); };
106
107 diff --git a/app-admin/syslog-ng/files/3.12/syslog-ng.conf.gentoo.hardened b/app-admin/syslog-ng/files/3.12/syslog-ng.conf.gentoo.hardened
108 new file mode 100644
109 index 00000000000..8497ad8a321
110 --- /dev/null
111 +++ b/app-admin/syslog-ng/files/3.12/syslog-ng.conf.gentoo.hardened
112 @@ -0,0 +1,114 @@
113 +@version: 3.12
114 +# Copyright 1999-2017 Gentoo Foundation
115 +# Distributed under the terms of the GNU General Public License v2
116 +
117 +# https://bugs.gentoo.org/426814
118 +@include "scl.conf"
119 +
120 +#
121 +# Syslog-ng configuration file, compatible with default hardened installations.
122 +#
123 +
124 +options {
125 + threaded(yes);
126 + chain_hostnames(no);
127 + stats_freq(43200);
128 +};
129 +
130 +source src {
131 + unix-dgram("/dev/log");
132 + internal();
133 +};
134 +source kernsrc {
135 + file("/proc/kmsg");
136 +};
137 +
138 +#source net { udp(); };
139 +#log { source(net); destination(net_logs); };
140 +#destination net_logs { file("/var/log/HOSTS/$HOST/$YEAR$MONTH$DAY.log"); };
141 +
142 +destination authlog { file("/var/log/auth.log"); };
143 +destination _syslog { file("/var/log/syslog"); };
144 +destination cron { file("/var/log/cron.log"); };
145 +destination daemon { file("/var/log/daemon.log"); };
146 +destination kern { file("/var/log/kern.log"); };
147 +destination lpr { file("/var/log/lpr.log"); };
148 +destination user { file("/var/log/user.log"); };
149 +destination uucp { file("/var/log/uucp.log"); };
150 +#destination ppp { file("/var/log/ppp.log"); };
151 +destination mail { file("/var/log/mail.log"); };
152 +
153 +destination avc { file("/var/log/avc.log"); };
154 +destination audit { file("/var/log/audit.log"); };
155 +destination pax { file("/var/log/pax.log"); };
156 +destination grsec { file("/var/log/grsec.log"); };
157 +
158 +destination mailinfo { file("/var/log/mail.info"); };
159 +destination mailwarn { file("/var/log/mail.warn"); };
160 +destination mailerr { file("/var/log/mail.err"); };
161 +
162 +destination newscrit { file("/var/log/news/news.crit"); };
163 +destination newserr { file("/var/log/news/news.err"); };
164 +destination newsnotice { file("/var/log/news/news.notice"); };
165 +
166 +destination debug { file("/var/log/debug"); };
167 +destination messages { file("/var/log/messages"); };
168 +destination console { usertty("root"); };
169 +destination console_all { file("/dev/tty12"); };
170 +#destination loghost { udp("loghost" port(999)); };
171 +
172 +destination xconsole { pipe("/dev/xconsole"); };
173 +
174 +filter f_auth { facility(auth); };
175 +filter f_authpriv { facility(auth, authpriv); };
176 +filter f_syslog { not facility(authpriv, mail); };
177 +filter f_cron { facility(cron); };
178 +filter f_daemon { facility(daemon); };
179 +filter f_kern { facility(kern); };
180 +filter f_lpr { facility(lpr); };
181 +filter f_mail { facility(mail); };
182 +filter f_user { facility(user); };
183 +filter f_uucp { facility(uucp); };
184 +#filter f_ppp { facility(ppp); };
185 +filter f_news { facility(news); };
186 +filter f_debug { not facility(auth, authpriv, news, mail); };
187 +filter f_messages { level(info..warn)
188 + and not facility(auth, authpriv, mail, news); };
189 +filter f_emergency { level(emerg); };
190 +
191 +filter f_info { level(info); };
192 +
193 +filter f_notice { level(notice); };
194 +filter f_warn { level(warn); };
195 +filter f_crit { level(crit); };
196 +filter f_err { level(err); };
197 +
198 +filter f_avc { message(".*avc: .*"); };
199 +filter f_audit { message("^(\\[.*\..*\] |)audit.*") and not message(".*avc: .*"); };
200 +filter f_pax { message("^(\\[.*\..*\] |)PAX:.*"); };
201 +filter f_grsec { message("^(\\[.*\..*\] |)grsec:.*"); };
202 +
203 +log { source(src); filter(f_authpriv); destination(authlog); };
204 +log { source(src); filter(f_syslog); destination(_syslog); };
205 +log { source(src); filter(f_cron); destination(cron); };
206 +log { source(src); filter(f_daemon); destination(daemon); };
207 +log { source(kernsrc); filter(f_kern); destination(kern); destination(console_all); };
208 +log { source(src); filter(f_lpr); destination(lpr); };
209 +log { source(src); filter(f_mail); destination(mail); };
210 +log { source(src); filter(f_user); destination(user); };
211 +log { source(src); filter(f_uucp); destination(uucp); };
212 +log { source(kernsrc); filter(f_pax); destination(pax); };
213 +log { source(kernsrc); filter(f_grsec); destination(grsec); };
214 +log { source(kernsrc); filter(f_audit); destination(audit); };
215 +log { source(kernsrc); filter(f_avc); destination(avc); };
216 +log { source(src); filter(f_mail); filter(f_info); destination(mailinfo); };
217 +log { source(src); filter(f_mail); filter(f_warn); destination(mailwarn); };
218 +log { source(src); filter(f_mail); filter(f_err); destination(mailerr); };
219 +log { source(src); filter(f_news); filter(f_crit); destination(newscrit); };
220 +log { source(src); filter(f_news); filter(f_err); destination(newserr); };
221 +log { source(src); filter(f_news); filter(f_notice); destination(newsnotice); };
222 +log { source(src); filter(f_debug); destination(debug); };
223 +log { source(src); filter(f_messages); destination(messages); };
224 +log { source(src); filter(f_emergency); destination(console); };
225 +#log { source(src); filter(f_ppp); destination(ppp); };
226 +log { source(src); destination(console_all); };
227
228 diff --git a/app-admin/syslog-ng/files/3.12/syslog-ng.confd b/app-admin/syslog-ng/files/3.12/syslog-ng.confd
229 new file mode 100644
230 index 00000000000..42fa26ab4cf
231 --- /dev/null
232 +++ b/app-admin/syslog-ng/files/3.12/syslog-ng.confd
233 @@ -0,0 +1,42 @@
234 +# Config file for /etc/init.d/syslog-ng
235 +
236 +# If you are not using network logging, this entire section should be
237 +# commented out. Otherwise, choose one of the settings below based on
238 +# how you are configuring your network.
239 +#
240 +# If you are using the net.* scripts to configure your network, you should
241 +# set rc_need to match the interface through which your logging server
242 +# can be reached.
243 +#rc_need="net.eth0"
244 +#
245 +# If you are using an interface manager like wicd, dhcpcd in standalone
246 +# mode, networkmanager, etc to control your interfaces, set rc_need to
247 +# the name of that service.
248 +# rc_need="dhcpcd"
249 +#rc_need="networkmanager"
250 +#
251 +# If you are using newnet and configuring your interface statically with
252 +# the network script, you should use this setting.
253 +#rc_need="network"
254 +#
255 +# You can use this setting, but I do not recommend relying on it.
256 +#rc_need="net"
257 +#
258 +# You may also want to uncomment the following if you are using network
259 +# logging.
260 +#rc_use="stunnel"
261 +
262 +# For very customized setups these variables can be adjusted as needed
263 +# but for most situations they should remain commented:
264 +# SYSLOG_NG_CONFIGFILE=/etc/syslog-ng/syslog-ng.conf
265 +# SYSLOG_NG_STATEFILE_DIR=/var/lib/syslog-ng
266 +# SYSLOG_NG_STATEFILE=${SYSLOG_NG_STATEFILE_DIR}/syslog-ng.persist
267 +# SYSLOG_NG_PIDFILE_DIR=/run
268 +# SYSLOG_NG_PIDFILE=${SYSLOG_NG_PIDFILE_DIR}/syslog-ng.pid
269 +# SYSLOG_NG_GROUP=root
270 +# SYSLOG_NG_USER=root
271 +
272 +# Put any additional options for syslog-ng here.
273 +# See syslog-ng(8) for more information.
274 +
275 +SYSLOG_NG_OPTS=""
276
277 diff --git a/app-admin/syslog-ng/files/3.12/syslog-ng.rc b/app-admin/syslog-ng/files/3.12/syslog-ng.rc
278 new file mode 100644
279 index 00000000000..09f969180b0
280 --- /dev/null
281 +++ b/app-admin/syslog-ng/files/3.12/syslog-ng.rc
282 @@ -0,0 +1,58 @@
283 +#!/sbin/openrc-run
284 +# Copyright 1999-2017 Gentoo Foundation
285 +# Distributed under the terms of the GNU General Public License v2
286 +
287 +: SYSLOG_NG_CONFIGFILE=${SYSLOG_NG_CONFIGFILE:-/etc/syslog-ng/${RC_SVCNAME}.conf}
288 +: SYSLOG_NG_STATEFILE_DIR=${SYSLOG_NG_STATEFILE_DIR:-/var/lib/syslog-ng}
289 +: SYSLOG_NG_STATEFILE=${SYSLOG_NG_STATEFILE:-${SYSLOG_NG_STATEFILE_DIR}/syslog-ng.persist}
290 +: SYSLOG_NG_PIDFILE_DIR=${SYSLOG_NG_PIDFILE_DIR:-/run}
291 +: SYSLOG_NG_PIDFILE=${SYSLOG_NG_PIDFILE:-${SYSLOG_NG_PIDFILE_DIR}/${RC_SVCNAME}.pid}
292 +
293 +: SYSLOG_NG_GROUP=${SYSLOG_NG_GROUP:-root}
294 +: SYSLOG_NG_USER=${SYSLOG_NG_USER:-root}
295 +
296 +command="/usr/sbin/syslog-ng"
297 +command_args="--persist-file \"${SYSLOG_NG_STATEFILE}\" --cfgfile \"${SYSLOG_NG_CONFIGFILE}\" --pidfile \"${SYSLOG_NG_PIDFILE}\" ${SYSLOG_NG_OPTS}"
298 +extra_commands="checkconfig"
299 +extra_started_commands="reload"
300 +pidfile="${SYSLOG_NG_PIDFILE}"
301 +start_stop_daemon_args="--user \"${SYSLOG_NG_USER}\":\"${SYSLOG_NG_GROUP}\""
302 +description="Syslog-ng is a syslog replacement with advanced filtering features."
303 +description_checkconfig="Check the configuration file that will be used by \"start\""
304 +description_reload="Reload the configuration without exiting"
305 +required_files="${SYSLOG_NG_CONFIGFILE}"
306 +required_dirs="${SYSLOG_NG_PIDFILE_DIR}"
307 +
308 +depend() {
309 + use clock
310 + need hostname localmount
311 + after bootmisc
312 + provide logger
313 +}
314 +
315 +checkconfig() {
316 + ebegin "Checking your configfile (${SYSLOG_NG_CONFIGFILE})"
317 + syslog-ng -s -f "${SYSLOG_NG_CONFIGFILE}"
318 + eend $? "Configuration error. Please fix your configfile (${SYSLOG_NG_CONFIGFILE})"
319 +}
320 +
321 +start_pre() {
322 + checkconfig || return 1
323 + checkpath \
324 + -d \
325 + --mode 0700 \
326 + --owner "${SYSLOG_NG_USER}:${SYSLOG_NG_GROUP}" \
327 + "${SYSLOG_NG_STATEFILE_DIR}"
328 +}
329 +
330 +stop_pre() {
331 + [[ "$RC_CMD" == "restart" ]] && sleep 1
332 + return 0
333 +}
334 +
335 +reload() {
336 + checkconfig || return 1
337 + ebegin "Reloading configuration and re-opening log files"
338 + start-stop-daemon --signal HUP --pidfile "${pidfile}"
339 + eend $?
340 +}
341
342 diff --git a/app-admin/syslog-ng/metadata.xml b/app-admin/syslog-ng/metadata.xml
343 index e4e0c1e1bed..90774e400b0 100644
344 --- a/app-admin/syslog-ng/metadata.xml
345 +++ b/app-admin/syslog-ng/metadata.xml
346 @@ -4,12 +4,13 @@
347 <!-- maintainer-needed -->
348 <use>
349 <flag name="amqp">Enable support for AMQP destinations</flag>
350 - <flag name="smtp">Enable support for SMTP destinations</flag>
351 - <flag name="spoof-source">Enable support for spoofed source addresses</flag>
352 + <flag name="http">Enable support for HTTP destinations</flag>
353 <flag name="json">Enable support for JSON template formatting via <pkg>dev-libs/json-c</pkg></flag>
354 <flag name="mongodb">Enable support for mongodb destinations</flag>
355 <flag name="pacct">Enable support for reading Process Accounting files (EXPERIMENTAL, Linux only)</flag>
356 <flag name="redis">Enable support for Redis destinations</flag>
357 + <flag name="smtp">Enable support for SMTP destinations</flag>
358 + <flag name="spoof-source">Enable support for spoofed source addresses</flag>
359 </use>
360 <upstream>
361 <remote-id type="github">balabit/syslog-ng</remote-id>
362
363 diff --git a/app-admin/syslog-ng/syslog-ng-3.12.1.ebuild b/app-admin/syslog-ng/syslog-ng-3.12.1.ebuild
364 new file mode 100644
365 index 00000000000..0b8222f6656
366 --- /dev/null
367 +++ b/app-admin/syslog-ng/syslog-ng-3.12.1.ebuild
368 @@ -0,0 +1,149 @@
369 +# Copyright 1999-2017 Gentoo Foundation
370 +# Distributed under the terms of the GNU General Public License v2
371 +
372 +EAPI=6
373 +PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
374 +
375 +inherit autotools python-single-r1 eutils multilib systemd versionator
376 +
377 +MY_PV=${PV/_/}
378 +MY_PV_MM=$(get_version_component_range 1-2)
379 +DESCRIPTION="syslog replacement with advanced filtering features"
380 +HOMEPAGE="http://www.balabit.com/network-security/syslog-ng"
381 +SRC_URI="https://github.com/balabit/syslog-ng/releases/download/${P}/${P}.tar.gz"
382 +
383 +LICENSE="GPL-2+ LGPL-2.1+"
384 +SLOT="0"
385 +KEYWORDS="~amd64 ~x86"
386 +IUSE="amqp caps dbi geoip http ipv6 json libressl mongodb pacct python redis smtp spoof-source systemd tcpd"
387 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
388 +RESTRICT="test"
389 +
390 +RDEPEND="
391 + amqp? ( >=net-libs/rabbitmq-c-0.8.0 )
392 + caps? ( sys-libs/libcap )
393 + dbi? ( >=dev-db/libdbi-0.9.0 )
394 + geoip? ( >=dev-libs/geoip-1.5.0 )
395 + http? ( net-misc/curl )
396 + json? ( >=dev-libs/json-c-0.9 )
397 + mongodb? ( >=dev-libs/mongo-c-driver-1.2.0 )
398 + python? ( ${PYTHON_DEPS} )
399 + redis? ( >=dev-libs/hiredis-0.11.0 )
400 + smtp? ( net-libs/libesmtp )
401 + spoof-source? ( net-libs/libnet:1.1 )
402 + systemd? ( sys-apps/systemd )
403 + tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
404 + >=dev-libs/libpcre-6.1
405 + !libressl? ( dev-libs/openssl:0= )
406 + libressl? ( dev-libs/libressl:0= )
407 + !dev-libs/eventlog
408 + >=dev-libs/glib-2.10.1:2"
409 +DEPEND="${RDEPEND}
410 + >=dev-libs/ivykis-0.36.1
411 + sys-devel/flex
412 + virtual/pkgconfig"
413 +
414 +S=${WORKDIR}/${PN}-${MY_PV}
415 +
416 +pkg_setup() {
417 + use python && python-single-r1_pkg_setup
418 +}
419 +
420 +src_prepare() {
421 + local f
422 +
423 + use python && python_fix_shebang .
424 +
425 + # remove bundled libs
426 + rm -rv lib/ivykis modules/afmongodb/mongo-c-driver modules/afamqp/rabbitmq-c || die
427 +
428 + if use !json ; then
429 + sed -i -e '/cim/d' scl/Makefile.am || die
430 + eautoreconf
431 + fi
432 +
433 + for f in "${FILESDIR}"/*logrotate*.in ; do
434 + local bn=$(basename "${f}")
435 +
436 + sed \
437 + -e "$(usex systemd \
438 + 's/@GENTOO_RESTART@/systemctl kill -s HUP syslog-ng/' \
439 + 's:@GENTOO_RESTART@:/etc/init.d/syslog-ng reload:')" \
440 + "${f}" > "${T}/${bn/.in/}" || die
441 + done
442 +
443 + default
444 +}
445 +
446 +src_configure() {
447 + econf \
448 + --disable-docs \
449 + --disable-java \
450 + --disable-java-modules \
451 + --disable-riemann \
452 + --enable-manpages \
453 + --localstatedir=/var/lib/syslog-ng \
454 + --sysconfdir=/etc/syslog-ng \
455 + --with-embedded-crypto \
456 + --with-ivykis=system \
457 + --with-module-dir=/usr/$(get_libdir)/syslog-ng \
458 + --with-pidfile-dir=/var/run \
459 + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
460 + $(use_enable amqp) \
461 + $(usex amqp --with-librabbitmq-client=system --without-librabbitmq-client) \
462 + $(use_enable caps linux-caps) \
463 + $(use_enable dbi sql) \
464 + $(use_enable geoip) \
465 + $(use_enable http) \
466 + $(use_enable ipv6) \
467 + $(use_enable json) \
468 + $(use_enable mongodb) \
469 + $(usex mongodb --with-mongoc=system "--without-mongoc --disable-legacy-mongodb-options") \
470 + $(use_enable pacct) \
471 + $(use_enable python) \
472 + $(use_enable redis) \
473 + $(use_enable smtp) \
474 + $(use_enable spoof-source) \
475 + $(use_enable systemd) \
476 + $(use_enable tcpd tcp-wrapper)
477 +}
478 +
479 +src_install() {
480 + emake DESTDIR="${D}" install
481 +
482 + dodoc AUTHORS NEWS.md CONTRIBUTING.md contrib/syslog-ng.conf* \
483 + contrib/syslog2ng "${FILESDIR}/${MY_PV_MM}/syslog-ng.conf.gentoo.hardened" \
484 + "${T}/syslog-ng.logrotate.hardened" "${FILESDIR}/README.hardened"
485 +
486 + # Install default configuration
487 + insinto /etc/syslog-ng
488 + if use userland_BSD ; then
489 + newins "${FILESDIR}/${MY_PV_MM}/syslog-ng.conf.gentoo.fbsd" syslog-ng.conf
490 + else
491 + newins "${FILESDIR}/${MY_PV_MM}/syslog-ng.conf.gentoo" syslog-ng.conf
492 + fi
493 +
494 + insinto /etc/logrotate.d
495 + newins "${T}/syslog-ng.logrotate" syslog-ng
496 +
497 + newinitd "${FILESDIR}/${MY_PV_MM}/syslog-ng.rc" syslog-ng
498 + newconfd "${FILESDIR}/${MY_PV_MM}/syslog-ng.confd" syslog-ng
499 + keepdir /etc/syslog-ng/patterndb.d /var/lib/syslog-ng
500 + prune_libtool_files --modules
501 +
502 + use python && python_optimize
503 +}
504 +
505 +pkg_postinst() {
506 + elog "For detailed documentation please see the upstream website:"
507 + elog "https://www.balabit.com/sites/default/files/documents/syslog-ng-ose-${MY_PV_MM}-guides/en/syslog-ng-ose-v${MY_PV_MM}-guide-admin/html/index.html"
508 +
509 + # bug #355257
510 + if ! has_version app-admin/logrotate ; then
511 + echo
512 + elog "It is highly recommended that app-admin/logrotate be emerged to"
513 + elog "manage the log files. ${PN} installs a file in /etc/logrotate.d"
514 + elog "for logrotate to use."
515 + echo
516 + fi
517 +}