]> git.pld-linux.org Git - packages/syslog-ng.git/blobdiff - syslog-ng.spec
- rel 2; rediff patches
[packages/syslog-ng.git] / syslog-ng.spec
index 0a233e3a81c491dd4f56e98f4fb80afa962eb377..8b76ee1f45c9b69d2fc2f62502e35cb6da340dde 100644 (file)
@@ -1,9 +1,5 @@
-# TODO:
-# - rdkafka >= 1.0.0
-# - switch to LTS version??? where???
-# - relies on libs in /usr which is wrong
-#   (well, for modules bringing additional functionality it's acceptable IMO --q)
-# - package python module
+# NOTE: only core functionality is available without /usr;
+#       some non-trivial extension modules rely in libraries/daemons existing in /usr.
 #
 # Conditional build:
 %bcond_with    dynamic                 # link dynamically with glib, eventlog, pcre (modules are always linked dynamically)
 %bcond_without redis                   # support for Redis destination
 %bcond_without smtp                    # support for logging into SMTP
 %bcond_without geoip2                  # support for GeoIP2
+%bcond_without kafka                   # support for Apache Kafka protocol
 %bcond_without riemann                 # support for Riemann monitoring system
 %bcond_without systemd                 # systemd (daemon and journal) support
 %bcond_without amqp                    # AMQP support
-%bcond_with    python                  # python module
+%bcond_without python                  # python module
 %bcond_with    java                    # java modules and support
 %bcond_without system_libivykis        # use system libivykis
 %bcond_without system_rabbitmq         # use system librabbitmq
 %endif
 
 # as in git submodule
-%define        libivykis_version 0.42.2
+%define        libivykis_version 0.42.4
 
-%define                glib2_ver       1:2.26.1
-%define                mver    3.27
+%define                glib2_ver       1:2.28
+%define                mver    3.29
 %define                docmver 3.12
 Summary:       Syslog-ng - new generation of the system logger
 Summary(pl.UTF-8):     Syslog-ng - systemowy demon logujący nowej generacji
 Summary(pt_BR.UTF-8):  Daemon de log nova geração
 Name:          syslog-ng
-Version:       3.27.1
-Release:       1
+Version:       3.29.1
+Release:       2
 License:       GPL v2+ with OpenSSL exception
 Group:         Daemons
-Source0:       https://github.com/balabit/syslog-ng/archive/%{name}-%{version}.tar.gz
-# Source0-md5: 8d836a470d9c43c5b51181bad238540b
+#Source0Download: https://github.com/syslog-ng/syslog-ng/releases
+Source0:       https://github.com/syslog-ng/syslog-ng/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 5bc0c28d37310a3487efe0a6d79db8ab
 Source1:       %{name}.init
 Source2:       %{name}.conf
 Source3:       %{name}.logrotate
 Source4:       http://www.balabit.com/support/documentation/syslog-ng-ose-%{docmver}-guides/en/syslog-ng-ose-v%{docmver}-guide-admin/pdf/%{name}-ose-v%{docmver}-guide-admin.pdf
 # Source4-md5: fce7075b03ba9501911b9812a553e680
 Source5:       %{name}-simple.conf
+%if 0
+# for git archives (release tarballs include ivykis)
+#Source6Download: https://github.com/buytenh/ivykis/releases
 Source6:       https://github.com/buytenh/ivykis/archive/v%{libivykis_version}/ivykis-%{libivykis_version}.tar.gz
-# Source6-md5: aeafef422d8dafb84e1fcd16f9f4822e
+# Source6-md5: e09caeb95a01a541ec40d3b757dada12
+%endif
 Source7:       syslog-ng.service
 Patch0:                %{name}-datadir.patch
-
+# https://github.com/syslog-ng/syslog-ng/commit/1d90d844a39eb25ac3423f663b0409f61a064330.patch
+# https://github.com/syslog-ng/syslog-ng/commit/46fa90bdd3adee5bcbb2687cf00c08925c504c07.patch
+Patch1:                %{name}-tests-fixes.patch
 Patch2:                %{name}-nolibs.patch
 Patch3:                %{name}-systemd.patch
 Patch4:                man-paths.patch
 Patch5:                %{name}-link.patch
 Patch6:                no_shared_ivykis.patch
+Patch7:                32bit.patch
 URL:           https://syslog-ng.org/
 BuildRequires: autoconf >= 2.59
 BuildRequires: automake
 BuildRequires: bison >= 2.4
 %if %{with tests}
-BuildRequires: criterion-devel >= 2.2.1
+BuildRequires: criterion-devel >= 2.3.3-5
 %endif
 %{?with_http:BuildRequires:    curl-devel}
-BuildRequires: docbook-style-xsl
+BuildRequires: docbook-style-xsl-nons
 BuildRequires: eventlog-devel >= 0.2.12
 BuildRequires: flex
 BuildRequires: glib2-devel >= %{glib2_ver}
@@ -86,6 +91,7 @@ BuildRequires:        libcap-devel
 %{?with_mongodb:BuildRequires: mongo-c-driver-devel >= 1.0.0}
 %{?with_geoip2:BuildRequires:  libmaxminddb-devel}
 BuildRequires: libnet-devel >= 1:1.1.2.1-3
+%{?with_kafka:BuildRequires:   librdkafka-devel >= 1.0.0}
 BuildRequires: libtool >= 2:2.0
 BuildRequires: libwrap-devel
 BuildRequires: libxslt-progs
@@ -102,9 +108,10 @@ BuildRequires:     which
 %if %{with tests}
 BuildRequires: GeoIP-db-Country
 BuildRequires: pylint
-BuildRequires: python
-BuildRequires: python-pep8
-BuildRequires: python-ply
+BuildRequires: python3
+%{?with_python:BuildRequires:  python3-devel >= 1:3.2}
+BuildRequires: python3-pep8
+BuildRequires: python3-ply
 BuildRequires: tzdata
 %endif
 %if %{without dynamic}
@@ -248,6 +255,32 @@ JSON formatting template function for syslog-ng.
 %description module-json-plugin -l pl.UTF-8
 Moduł sysloga-ng do obsługi szablonów z formatowaniem JSON.
 
+%package module-kafka
+Summary:       Apache Kafka destination support module for syslog-ng
+Summary(pl.UTF-8):     Moduł sysloga-ng do obsługi zapisu logów poprzez protokół Apache Kafka
+Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
+Requires:      librdkafka >= 1.0.0
+
+%description module-kafka
+Apache Kafka destination support module for syslog-ng.
+
+%description module-kafka -l pl.UTF-8
+Moduł sysloga-ng do obsługi zapisu logów poprzez protokół Apache
+Kafka.
+
+%package module-python
+Summary:       Python support module for syslog-ng
+Summary(pl.UTF-8):     Moduł obsługi Pythona dla sysloga-ng
+Group:         Librares
+Requires:      %{name} = %{version}-%{release}
+
+%description module-python
+Python support module for syslog-ng.
+
+%description module-python -l pl.UTF-8
+Moduł obsługi Pythona dla sysloga-ng.
+
 %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
@@ -282,7 +315,7 @@ Group:              Libraries
 %if %{with dynamic}
 Requires:      eventlog >= 0.2.12
 Requires:      glib2 >= %{glib2_ver}
-%{?with_system_libivykis:Requires:     libivykis >= 0.42}
+%{?with_system_libivykis:Requires:     libivykis >= %{libivykis_version}}
 Requires:      pcre >= 6.1
 %endif
 Conflicts:     syslog-ng < 3.3.1-3
@@ -301,7 +334,7 @@ Requires:   %{name}-libs = %{version}-%{release}
 %if %{with dynamic}
 Requires:      eventlog-devel >= 0.2.12
 Requires:      glib2-devel >= %{glib2_ver}
-%{?with_system_libivykis:Requires:     libivykis-devel >= 0.42}
+%{?with_system_libivykis:Requires:     libivykis-devel >= %{libivykis_version}}
 Requires:      pcre-devel >= 6.1
 %endif
 
@@ -324,26 +357,30 @@ Test helper package for syslog-ng modules.
 Pakiet pomocniczy do testowania modułów sysloga-ng.
 
 %prep
+%if 1
+# release tarball
+%setup -q
+%else
+# git archive
 %setup -q -n %{name}-%{name}-%{version} -a 6
 
 rmdir lib/ivykis
 %{__mv} ivykis-%{libivykis_version} lib/ivykis
+%endif
 
 %patch0 -p1
-
+%patch1 -p1
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
+%patch7 -p1
 cp -p %{SOURCE4} doc
 cp -p %{SOURCE5} contrib/syslog-ng.conf.simple
 
 %{__sed} -i -e 's|/usr/bin/awk|/bin/awk|' scl/syslogconf/convert-syslogconf.awk
-%{__sed} -i -e '1s,/usr/bin/env python$,%{__python},' lib/merge-grammar.py
-
-%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python(\s|$),#!%{__python}\1,' \
-      lib/merge-grammar.py
+%{__sed} -i -e '1s,/usr/bin/env python$,%{__python3},' lib/merge-grammar.py
 
 %build
 for i in . ; do
@@ -356,38 +393,33 @@ cd $i
 cd -
 done
 %configure \
+       PYTHON="%{__python3}" \
        --sysconfdir=%{_sysconfdir}/syslog-ng \
        --disable-silent-rules \
-       --with-default-modules=affile,afprog,afsocket,afuser,basicfuncs,csvparser,dbparser,syslogformat \
-       --with-docbook=%{xsl_stylesheets_dir}/manpages/docbook.xsl \
-       --enable-java%{!?with_java:=no} \
-       --enable-java-modules%{!?with_java:=no} \
-       --enable-python%{!?with_python:=no} \
-%if %{with mongodb}
-       --enable-mongodb \
-       --with-mongoc=system \
-%else
-       --disable-mongodb \
-%endif
-%if %{with system_libivykis}
-       --with-ivykis=system \
+       %{__enable_disable amqp} \
+%if %{with dynamic}
+       --enable-dynamic-linking \
 %else
-       --with-ivykis=internal \
+       --enable-mixed-linking \
 %endif
-       %{?with_system_rabbitmq:--with-librabbitmq-client=system} \
-       --with-module-dir=%{moduledir} \
-       --with-pidfile-dir=/var/run \
-       --with-systemdsystemunitdir=%{systemdunitdir} \
-       --with-timezone-dir=%{_datadir}/zoneinfo \
-       %{__enable_disable amqp} \
        %{__enable_disable geoip2} \
        --enable-http%{!?with_http:=no} \
        --enable-ipv6 \
+       --enable-java%{!?with_java:=no} \
+       --enable-java-modules%{!?with_java:=no} \
        --enable-json%{!?with_json:=no} \
        --enable-linux-caps \
+       --enable-kafka%{!?with_kafka:=no} \
        --enable-manpages \
+%if %{with mongodb}
+       --enable-mongodb \
+       --with-mongoc=system \
+%else
+       --disable-mongodb \
+%endif
        --enable-pacct \
        --enable-pcre \
+       --enable-python%{!?with_python:=no} \
        --enable-redis%{!?with_redis:=no} \
        --enable-riemann%{!?with_riemann:=no} \
        --enable-smtp%{!?with_smtp:=no} \
@@ -398,15 +430,21 @@ done
 %if %{with sql}
        --enable-sql \
 %endif
-%if %{with dynamic}
-       --enable-dynamic-linking
+       --with-default-modules=affile,afprog,afsocket,afuser,basicfuncs,csvparser,dbparser,syslogformat \
+       --with-docbook=%{xsl_stylesheets_dir}/manpages/docbook.xsl \
+%if %{with system_libivykis}
+       --with-ivykis=system \
 %else
-       --enable-mixed-linking
+       --with-ivykis=internal \
 %endif
+       %{?with_system_rabbitmq:--with-librabbitmq-client=system} \
+       --with-module-dir=%{moduledir} \
+       --with-pidfile-dir=/var/run \
+       --with-systemdsystemunitdir=%{systemdunitdir} \
+       --with-timezone-dir=%{_datadir}/zoneinfo
 
 %{__make}
 
-
 %if %{with tests}
 LD_LIBRARY_PATH=$(find $PWD -name '*.so*' -printf "%h:")
 PYTHONPATH=$(pwd)/tests/functional
@@ -443,7 +481,7 @@ ln -snf %{slibdir}/$(basename $RPM_BUILD_ROOT%{slibdir}/libsecret-storage.so.*.*
 %endif
 
 %{__sed} -e 's|@@SBINDIR@@|%{_sbindir}|g' %{SOURCE1} > $RPM_BUILD_ROOT/etc/rc.d/init.d/syslog-ng
-cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/syslog-ng/syslog-ng.conf
+sed -e 's,#VERSION#,%{mver},' < %{SOURCE2} > $RPM_BUILD_ROOT%{_sysconfdir}/syslog-ng/syslog-ng.conf
 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/syslog-ng
 cp -p %{SOURCE7} $RPM_BUILD_ROOT%{systemdunitdir}
 
@@ -585,7 +623,7 @@ exit 0
 %attr(755,root,root) %{_bindir}/loggen
 %attr(755,root,root) %{_bindir}/pdbtool
 %attr(755,root,root) %{_bindir}/persist-tool
-%attr(755,root,root) %{_bindir}/slogimport
+%attr(755,root,root) %{_bindir}/slogencrypt
 %attr(755,root,root) %{_bindir}/slogkey
 %attr(755,root,root) %{_bindir}/slogverify
 %attr(755,root,root) %{_bindir}/update-patterndb
@@ -611,6 +649,7 @@ exit 0
 %{_datadir}/syslog-ng/include/scl/nodejs
 %{_datadir}/syslog-ng/include/scl/osquery
 %{_datadir}/syslog-ng/include/scl/pacct
+%{_datadir}/syslog-ng/include/scl/paloalto
 %{_datadir}/syslog-ng/include/scl/rewrite
 %{_datadir}/syslog-ng/include/scl/snmptrap
 %{_datadir}/syslog-ng/include/scl/solaris
@@ -631,11 +670,12 @@ exit 0
 %{_mandir}/man1/loggen.1*
 %{_mandir}/man1/pdbtool.1*
 %{_mandir}/man1/persist-tool.1*
-%{_mandir}/man1/slogimport.1*
+%{_mandir}/man1/slogencrypt.1*
 %{_mandir}/man1/slogkey.1*
 %{_mandir}/man1/slogverify.1*
 %{_mandir}/man1/syslog-ng-ctl.1*
 %{_mandir}/man5/syslog-ng.conf.5*
+%{_mandir}/man7/secure-logging.7*
 %{_mandir}/man8/syslog-ng.8*
 
 %attr(640,root,logs) %ghost /var/log/cron
@@ -694,6 +734,19 @@ exit 0
 %{_datadir}/syslog-ng/include/scl/slack
 %endif
 
+%if %{with kafka}
+%files module-kafka
+%defattr(644,root,root,755)
+%attr(755,root,root) %{moduledir}/libkafka.so
+%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}
 %files module-redis
 %defattr(644,root,root,755)
@@ -735,7 +788,6 @@ exit 0
 %{_includedir}/syslog-ng/control
 %{_includedir}/syslog-ng/debugger
 %{_includedir}/syslog-ng/filter
-%{_includedir}/syslog-ng/http-auth
 %if %{without system_libivykis}
 %{_includedir}/syslog-ng/ivykis
 %endif
@@ -762,6 +814,7 @@ exit 0
 %defattr(644,root,root,755)
 %if "%{_libdir}/syslog-ng" != "{moduledir}"
 %dir %{_libdir}/syslog-ng
+%endif
 %dir %{_libdir}/syslog-ng/libtest
 %{_libdir}/syslog-ng/libtest/libsyslog-ng-test.a
 %{_includedir}/syslog-ng/libtest
This page took 0.040011 seconds and 4 git commands to generate.