Summary(pt_BR.UTF-8): Daemon de log nova geração
Name: syslog-ng
Version: 4.2.0
-Release: 0.1
+Release: 1
License: GPL v2+ with OpenSSL exception
Group: Daemons
Source0: https://github.com/balabit/syslog-ng/archive/%{name}-%{version}.tar.gz
%{?with_tests:BuildRequires: findutils}
BuildRequires: flex
BuildRequires: glib2-devel >= %{glib2_ver}
-%{?with_redis:BuildRequires: hiredis-devel}
+%{?with_redis:BuildRequires: hiredis-devel >= 0.11.0}
+%{?with_java:BuildRequires: jdk >= 1.8}
%{?with_json:BuildRequires: json-c-devel >= 0.13}
+%{?with_java:BuildRequires: gradle >= 3.4}
%{?with_mongodb:BuildRequires: libbson-devel}
BuildRequires: libcap-devel
%{?with_sql:BuildRequires: libdbi-devel >= 0.9.0}
%{?with_mongodb:BuildRequires: mongo-c-driver-devel}
%{?with_geoip2:BuildRequires: libmaxminddb-devel}
BuildRequires: libnet-devel >= 1:1.1.2.1-3
+%{?with_java:BuildRequires: librdkafka-devel >= 1.1.0}
BuildRequires: libtool >= 2:2.0
BuildRequires: libwrap-devel
BuildRequires: libxslt-progs
%description module-http -l pl.UTF-8
Moduł sysloga-ng do obsługi zapisu logów poprzez HTTP (via libcurl).
+%package module-java
+Summary: Java destination support module for syslog-ng
+Summary(pl.UTF-8): Moduł sysloga-ng do obsługi zapisu logów przy pomocy Java
+Group: Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: librdkafka >= 1.1.0
+Requires: %{name}-module-json-plugin = %{version}-%{release}
+
+%description module-java
+Java destination support module for syslog-ng
+
+%description module-java -l pl.UTF-8
+Moduł sysloga-ng do obsługi zapisu logów przy pomocy Java
+
%package module-json-plugin
Summary: JSON formatting template function for syslog-ng
Summary(pl.UTF-8): Moduł sysloga-ng do obsługi szablonów z formatowaniem JSON
%description module-json-plugin -l pl.UTF-8
Moduł sysloga-ng do obsługi szablonów z formatowaniem JSON.
+%package module-python
+Summary: Python destination support module for syslog-ng
+Summary(pl.UTF-8): Moduł sysloga-ng do obsługi zapisu logów przy pomocy pythona
+Group: Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: python3
+
+%description module-python
+Python destination support module for syslog-ng
+
+%description module-python -l pl.UTF-8
+Moduł sysloga-ng do obsługi zapisu logów przy pomocy pythona
+
%package module-redis
Summary: Redis destination support module for syslog-ng
Summary(pl.UTF-8): Moduł sysloga-ng do obsługi zapisu logów w bazie Redis
--with-module-dir=%{moduledir} \
--with-pidfile-dir=/var/run \
--with-timezone-dir=%{_datadir}/zoneinfo \
+ --with-python-packages=none \
%{__enable_disable amqp} \
%{__enable_disable geoip2} \
--enable-http%{!?with_http:=no} \
--enable-ipv6 \
--enable-json%{!?with_json:=no} \
+ %{__enable_disable java kafka} \
--enable-linux-caps \
--enable-manpages \
--enable-pacct \
--enable-smtp%{!?with_smtp:=no} \
--enable-spoof-source \
--enable-ssl \
- --enable-systemd=no \
+ --disable-systemd \
--enable-tcp-wrapper \
%if %{with sql}
--enable-sql \
%{__make}
-
%if %{with tests}
LD_LIBRARY_PATH=$(find $PWD -name '*.so*' -printf "%h:")
PYTHONPATH=$(pwd)/tests/functional
%{__rm} $RPM_BUILD_ROOT%{moduledir}/*.la
%{__rm} $RPM_BUILD_ROOT%{moduledir}/loggen/*.la
+%if %{with python}
+%{__rm} -rf $RPM_BUILD_ROOT%{_sysconfdir}/syslog-ng/python
+%else
+%{__rm} $RPM_BUILD_ROOT%{_bindir}/syslog-ng-update-virtualenv
+%endif
+
+%if !%{with java}
+%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/syslog-ng/include/scl/{elasticsearch,hdfs,kafka}
+%endif
+
%clean
rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{moduledir}/libgeoip2-plugin.so
%endif
%attr(755,root,root) %{moduledir}/libgraphite.so
-%attr(755,root,root) %{moduledir}/libkafka.so
%attr(755,root,root) %{moduledir}/libhook-commands.so
%attr(755,root,root) %{moduledir}/libkvformat.so
%attr(755,root,root) %{moduledir}/liblinux-kmsg-format.so
%attr(755,root,root) %{_bindir}/slogkey
%attr(755,root,root) %{_bindir}/slogverify
%attr(755,root,root) %{_bindir}/update-patterndb
+%if %{with python}
%attr(755,root,root) %{_bindir}/syslog-ng-update-virtualenv
+%endif
%dir %{_datadir}/syslog-ng/include
%dir %{_datadir}/syslog-ng/include/scl
%{_datadir}/syslog-ng/include/scl/apache
%{_datadir}/syslog-ng/include/scl/checkpoint
-%{_datadir}/syslog-ng/include/scl/cee
%{_datadir}/syslog-ng/include/scl/cisco
%{_datadir}/syslog-ng/include/scl/collectd
%{_datadir}/syslog-ng/include/scl/default-network-drivers
-%{_datadir}/syslog-ng/include/scl/discord
%{_datadir}/syslog-ng/include/scl/fortigate
%{_datadir}/syslog-ng/include/scl/graphite
-%{_datadir}/syslog-ng/include/scl/hdfs
-%{_datadir}/syslog-ng/include/scl/kafka
-#%{_datadir}/syslog-ng/include/scl/kubernetes
%{_datadir}/syslog-ng/include/scl/iptables
%{_datadir}/syslog-ng/include/scl/junos
%{_datadir}/syslog-ng/include/scl/linux-audit
%{_datadir}/syslog-ng/include/scl/rewrite
%{_datadir}/syslog-ng/include/scl/snmptrap
%{_datadir}/syslog-ng/include/scl/solaris
-%{_datadir}/syslog-ng/include/scl/splunk
%{_datadir}/syslog-ng/include/scl/sudo
-%{_datadir}/syslog-ng/include/scl/sumologic
%{_datadir}/syslog-ng/include/scl/websense
%{_datadir}/syslog-ng/include/scl/windowseventlog
%dir %{_datadir}/syslog-ng/include/scl/syslogconf
%{_datadir}/syslog-ng/include/scl/telegram
%endif
+%if %{with java}
+%files module-java
+%defattr(644,root,root,755)
+%attr(755,root,root) %{moduledir}/libkafka.so
+%attr(755,root,root) %{moduledir}/libmod-java.so
+%{moduledir}/java-modules
+%{_datadir}/syslog-ng/include/scl/elasticsearch
+%{_datadir}/syslog-ng/include/scl/hdfs
+%{_datadir}/syslog-ng/include/scl/kafka
+%endif
+
%if %{with json}
%files module-json-plugin
%defattr(644,root,root,755)
%attr(755,root,root) %{moduledir}/libjson-plugin.so
+%{_datadir}/syslog-ng/include/scl/cee
%{_datadir}/syslog-ng/include/scl/cim
-%{_datadir}/syslog-ng/include/scl/elasticsearch
+%{_datadir}/syslog-ng/include/scl/discord
%{_datadir}/syslog-ng/include/scl/ewmm
%{_datadir}/syslog-ng/include/scl/graylog2
%{_datadir}/syslog-ng/include/scl/loggly
%{_datadir}/syslog-ng/include/scl/logmatic
%{_datadir}/syslog-ng/include/scl/netskope
%{_datadir}/syslog-ng/include/scl/slack
+%{_datadir}/syslog-ng/include/scl/splunk
+%{_datadir}/syslog-ng/include/scl/sumologic
+%endif
+
+%if %{with python}
+%files module-python
+%defattr(644,root,root,755)
+%attr(755,root,root) %{moduledir}/libmod-python.so
+%{moduledir}/python
%endif
%if %{with redis}