Sophie

Sophie

distrib > Mageia > 8 > i586 > media > core-updates_testing-src > by-pkgid > 30904ee9988b644cfe4ae84db264678d > files > 14

syslog-ng-3.30.1-2.1.mga8.src.rpm

%define _disable_ld_no_undefined 1

%define major 3.30
%define libname %mklibname syslog-ng %{major}
%define develname %mklibname syslog-ng -d

%define secret_major 0
%define secret_libname %mklibname secret-storage %{secret_major}

%define journalcfgdir %{_sysconfdir}/systemd

Name:       syslog-ng
Version:    3.30.1
%define subrel 1
Release:    %mkrel 2
Summary:    Syslog-ng daemon
Group:      System/Kernel and hardware
License:    GPLv2 LGPLv2+
Url:        https://github.com/balabit/syslog-ng
Source0:    https://github.com/balabit/syslog-ng/releases/download/syslog-ng-%{version}/syslog-ng-%{version}.tar.gz
Source2:    syslog-ng.sysconfig
Source3:    syslog-ng.conf
Source4:    syslog-ng.logrotate
Source5:    syslog-ng.tmpfiles
# (eatdirt) script to switch on fwd to syslog in systemd journal
Source6:    syslog-ng_switchfwd
# no need for multi-instance complexity brought by upstream service file
Source7:    syslog-ng.service
Patch0:     syslog-ng-3.29.1-dont-install-libs-outside-destdir.patch
Patch1:     b5a060f2ebb8d794f508436a12e4d4163f94b1b8.patch
Patch2:     81a07263f1e522a376d3a30f96f51df3f2879f8a.patch
Patch3:     4b8dc56ca8eaeac4c8751a305eb7eeefab8dc89d.patch
Patch4:     73b5c300b8fde5e7a4824baa83a04931279abb37.patch
Patch5:     45f051239312e43bd4f92b9339fe67c6798a0321.patch
Patch6:     09f489c89c826293ff8cbd282cfc866ab56054c4.patch
Patch7:     8c6e2c1c41b0fcc5fbd464c35f4dac7102235396.patch
Patch8:     56f881c5eaa3d8c02c96607c4b9e4eaf959a044d.patch
BuildRequires:  flex
BuildRequires:  bison
BuildRequires:  xsltproc
BuildRequires:  net-devel >= 1.1.3
BuildRequires:  libesmtp-devel
BuildRequires:  libnet-snmp-devel
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(openssl)
BuildRequires:  pkgconfig(dbi)
BuildRequires:  pkgconfig(libcap)
BuildRequires:  pkgconfig(geoip)
BuildRequires:  pkgconfig(json-c)
BuildRequires:  pkgconfig(systemd)
BuildRequires:  pkgconfig(python3)
BuildRequires:  pkgconfig(libmongoc-1.0)
BuildRequires:  pkgconfig(libmaxminddb)
BuildRequires:  pkgconfig(librabbitmq)
BuildRequires:  pkgconfig(libcurl)
BuildRequires:  pkgconfig(hiredis)
BuildRequires:  pkgconfig(snappy)
BuildRequires:  pkgconfig(libpcre)
Provides:       syslog-daemon
Requires:       %{libname} = %{version}-%{release}
Requires(post):  systemd >= %{systemd_required_version}
Requires(post):  rpm-helper >= 0.24.8-1
Requires(preun): rpm-helper >= 0.24.8-1

%description
Syslog-ng is a flexible and highly scalable system logging application
that is ideal for creating centralized and trusted logging solutions.
Syslog-ng enables you to send the log messages of your hosts to remote
servers using the latest protocol standards : TCP, TLS, X.509 certificates.
Syslog-ng is able to store log messages in the most popular databases :
MySQL, PostgreSQL SQLite, Oracle and MSSQL. Syslog-ng can sort the incoming
log messages based on their content and various parameters like the source
host, application, and priority. Directories, files and database tables can
be created dynamically using macros. Complex filtering using regular
expressions and boolean operators offers almost unlimited flexibility to
forward only the important log messages to the selected destinations.

%package -n %{libname}
Summary:        Libraries for %{name}
Group:          Development/C

%description -n %{libname}
The libraries for %{name}.

%package -n %{secret_libname}
Summary:        libsecret-storage library for %{name}
Group:          Development/C
Obsoletes:      %mklibname syslog-ng 3.14

%description -n %{secret_libname}
The libecret-storage library for %{name}.

%package -n %{develname}
Summary:        Development files for %{name}
Group:          Development/C
Provides:       %{name}-devel
Requires:       %{libname} = %{version}-%{release}

%description -n %{develname}
This package contains libraries and header files for
developing applications that use %{name}.

%package slog
Summary: secure logging support for %{name}
Requires: %{name} = %{version}-%{release}
	
%description slog
This module supports secure message transfer and storage (experimental).

%package libdbi
Summary: Libdbi support for %{name}
Requires: %{name} = %{version}-%{release}
	
%description libdbi
This module supports a large number of database systems via libdbi.
	
%package mongodb
Summary: MongoDB support for %{name}
Requires: %{name} = %{version}-%{release}
	
%description mongodb
This module supports the mongodb database via libmongo-client.
	
%package smtp
Summary: SMTP support for %{name}
Requires: %{name} = %{version}-%{release}
	
%description smtp
This module supports sending e-mail alerts through an smtp server.
	
%package geoip
Summary: GeoIP support for %{name}
Requires: %{name} = %{version}-%{release}
	
%description geoip
This template function returns the 2-letter country code of
any IPv4 address or host.
	
%package redis
Summary: Redis support for %{name}
Requires: %{name} = %{version}-%{release}
	
%description redis
This module supports the redis key-value store via hiredis.

%package http
Summary: HTTP support for %{name}
Requires: %{name} = %{version}-%{release}
	
%description http
This module supports the http destination.

%package amqp
Summary: AMQP support for %{name}
Requires: %{name} = %{version}-%{release}
	
%description amqp
This module supports the AMQP destination.

%package python
Summary: Python support for %{name}
Requires: %{name} = %{version}-%{release}
Requires: python3-%{name} = %{version}-%{release}
	
%description python
This module supports the Python destination.

%package -n python3-syslog-ng
Summary:        Python 3 bindings for %{name}
Group:          Development/Python

Obsoletes:      python-syslog-ng < 3.14.1-3
Provides:       python-syslog-ng = %{version}-%{release}

%description -n python3-syslog-ng
Python 3 bindings for %{name}.

%prep
%autosetup -p 1

# Remove bundled libraries
rm -rf modules/afamqp/rabbitmq-c
rm -rf modules/afmongodb/mongo-c-driver

# Fix python shebang
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" lib/merge-grammar.py

%build
autoreconf -fi
%configure \
    --prefix=%{_prefix} \
    --sysconfdir=%{_sysconfdir}/%{name} \
    --localstatedir=%{_localstatedir}/lib/%{name} \
    --datadir=%{_datadir}/%{name} \
    --with-module-dir=/%{_libdir}/%{name} \
    --with-pidfile-dir=/run/syslog-ng \
    --with-systemdsystemunitdir=%{_unitdir} \
    --with-mongoc=system \
    --with-embedded-crypto \
    --enable-manpages \
    --enable-ipv6 \
    --enable-spoof-source \
    --enable-linux-caps \
    --enable-sql \
    --enable-json \
    --enable-ssl \
    --enable-smtp \
    --enable-geoip \
    --enable-shared \
    --disable-static \
    --enable-dynamic-linking \
    --enable-systemd \
    --enable-redis \
    --enable-amqp \
    --enable-python \
    --with-python=3 \
    --disable-java \
    --disable-java-modules
%make_build

%install
%make_install

install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/syslog-ng/syslog-ng.conf
install -d -m 755 %{buildroot}%{_sysconfdir}/syslog-ng/conf.d
install -d -m 755 %{buildroot}%{_sysconfdir}/syslog-ng/patterndb.d

install -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/syslog-ng

install -D -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/syslog-ng

install -D -m 644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/%{name}.conf

install -d -m 755 %{buildroot}%{_localstatedir}/lib/syslog-ng

# install the ld.so conf file
install -d -m 755 %{buildroot}%{_sysconfdir}/ld.so.conf.d/
cat > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}.conf <<EOF
%{_libdir}/%{name}
EOF

# install vim files
install -d -m 755 %{buildroot}%{_datadir}/vim/syntax
install -m 644 contrib/syslog-ng.vim %{buildroot}%{_datadir}/vim/syntax

# (eatdirt)
%__install -D -p -m 755 %{SOURCE6} %{buildroot}%{_sbindir}/syslog-ng_switchfwd

rm -f %{buildroot}%{_libdir}/*.la
rm -f %{buildroot}%{_libdir}/*.a
rm -f %{buildroot}/%{_libdir}/pkgconfig/syslog-ng-test.pc
rm -f %{buildroot}/%{_libdir}/syslog-ng/libtest/libsyslog-ng-test.a

install -m 644 %{SOURCE7} %{buildroot}%{_unitdir}/syslog-ng.service
rm -f %{buildroot}%{_unitdir}/syslog-ng@.service

%post

#(eatdirt)
# switch ForwardToSyslog=yes in /etc/systemd/journald.conf + backup
%{_sbindir}/syslog-ng_switchfwd %{journalcfgdir} on
# restart systemd-journal
/bin/systemctl try-restart systemd-journald || :

%_tmpfilescreate %{name}
%_post_service %{name}
# (cg) Handle a quirk of syslog service installations
if [ -f %{_sysconfdir}/systemd/system/multi-user.target.wants/%{name}.service -a ! -f %{_sysconfdir}/systemd/system/syslog.service ]; then
  cp -a %{_sysconfdir}/systemd/system/multi-user.target.wants/%{name}.service %{_sysconfdir}/systemd/system/syslog.service
fi

%preun
%_preun_service %{name}

#(eatdirt)
#restore the previously saved /etc/systemd/journald.conf file
%{_sbindir}/syslog-ng_switchfwd %{journalcfgdir} off
# restart systemd-journal
/bin/systemctl try-restart systemd-journald || :

%files
%doc AUTHORS COPYING VERSION NEWS.md CONTRIBUTING.md
%doc doc/security doc/xsd
%dir %{_sysconfdir}/syslog-ng
%dir %{_sysconfdir}/syslog-ng/conf.d
%dir %{_sysconfdir}/syslog-ng/patterndb.d
%config(noreplace) %{_sysconfdir}/syslog-ng/syslog-ng.conf
%config(noreplace) %{_sysconfdir}/syslog-ng/scl.conf
%config(noreplace) %{_sysconfdir}/sysconfig/syslog-ng
%config(noreplace) %{_sysconfdir}/logrotate.d/syslog-ng
%{_unitdir}/syslog-ng.service
%{_tmpfilesdir}/%{name}.conf
%{_sysconfdir}/ld.so.conf.d/%{name}.conf
%{_sbindir}/syslog-ng
%{_sbindir}/syslog-ng-ctl
%{_sbindir}/syslog-ng-debun
# (eatdirt)
%{_sbindir}/syslog-ng_switchfwd
%{_libdir}/syslog-ng
%exclude %{_libdir}/syslog-ng/libsecure-logging.so
%exclude %{_libdir}/syslog-ng/libafamqp.so
%exclude %{_libdir}/syslog-ng/libafmongodb.so
%exclude %{_libdir}/syslog-ng/libafsmtp.so
%exclude %{_libdir}/syslog-ng/libafsql.so
%exclude %{_libdir}/syslog-ng/libgeoip2-plugin.so
%exclude %{_libdir}/syslog-ng/libhttp.so
%exclude %{_libdir}/syslog-ng/libmod-python.so
%exclude %{_libdir}/syslog-ng/libredis.so
%{_bindir}/loggen
%{_bindir}/pdbtool
%{_bindir}/dqtool
%{_bindir}/update-patterndb
%{_bindir}/persist-tool
%{_datadir}/syslog-ng
%{_datadir}/vim/syntax/syslog-ng.vim
%{_mandir}/man1/pdbtool.1*
%{_mandir}/man1/loggen.1*
%{_mandir}/man1/dqtool.1*
%{_mandir}/man1/persist-tool.1*
%{_mandir}/man1/syslog-ng-ctl.1*
%{_mandir}/man1/syslog-ng-debun.1*
%{_mandir}/man5/syslog-ng.conf.5*
%{_mandir}/man7/secure-logging.7*
%{_mandir}/man8/syslog-ng.8*
%{_localstatedir}/lib/syslog-ng

%files slog
%{_bindir}/slogencrypt
%{_bindir}/slogkey
%{_bindir}/slogverify
%{_libdir}/syslog-ng/libsecure-logging.so
%{_mandir}/man1/slogencrypt.1*
%{_mandir}/man1/slogkey.1*
%{_mandir}/man1/slogverify.1*

%files -n %{libname}
%{_libdir}/libsyslog-ng-%{major}.so.*
%{_libdir}/libevtlog-%{major}.so.*
%{_libdir}/libloggen_helper-%{major}.*
%{_libdir}/libloggen_plugin-%{major}.*

%files -n %{secret_libname}
%{_libdir}/libsecret-storage.so.*

%files -n %{develname}
%{_libdir}/libsyslog-ng.so
%{_libdir}/libevtlog.so
%{_libdir}/libloggen_helper.so
%{_libdir}/libloggen_plugin.so
%{_libdir}/libsecret-storage.so
%{_libdir}/pkgconfig/syslog-ng.pc
%{_libdir}/pkgconfig/syslog-ng-native-connector.pc
%{_includedir}/syslog-ng

%files libdbi
%{_libdir}/syslog-ng/libafsql.so
	
%files mongodb
%{_libdir}/syslog-ng/libafmongodb.so
	
%files redis
%{_libdir}/syslog-ng/libredis.so
	
%files smtp
%{_libdir}/syslog-ng/libafsmtp.so
	
%files geoip
%{_libdir}/syslog-ng/libgeoip2-plugin.so
 
%files http
%{_libdir}/syslog-ng/libhttp.so
	
%files amqp
%{_libdir}/syslog-ng/libafamqp.so
	
%files python
%{_libdir}/syslog-ng/libmod-python.so

%files -n python3-syslog-ng
%{python3_sitelib}/syslogng
%{python3_sitelib}/syslogng-1.0-py%{python3_version}.egg-info


%changelog
* Sun Feb 12 2023 guillomovitch <guillomovitch> 3.30.1-2.1.mga8
+ Revision: 1941098
- fix CVE-2022-38725 (#31517)

* Sun Nov 29 2020 luigiwalser <luigiwalser> 3.30.1-2.mga8
+ Revision: 1650348
- rebuild for json-c

* Tue Nov 24 2020 guillomovitch <guillomovitch> 3.30.1-1.mga8
+ Revision: 1649030
- new version 3.30.1

* Thu Nov 12 2020 guillomovitch <guillomovitch> 3.29.1-1.mga8
+ Revision: 1644890
- new version 3.29

* Tue Nov 03 2020 akien <akien> 3.28.1-2.mga8
+ Revision: 1642119
- Rebuild for new libnetsnmp

* Sun Aug 09 2020 guillomovitch <guillomovitch> 3.28.1-1.mga8
+ Revision: 1612144
- new version 3.28.1

* Fri Jun 19 2020 guillomovitch <guillomovitch> 3.27.1-1.mga8
+ Revision: 1597231
- new version 3.27.1
- drop administration guide, impossible to keep synchronized

* Sat Mar 21 2020 guillomovitch <guillomovitch> 3.26.1-1.mga8
+ Revision: 1558497
- new version 3.26.1

* Wed Feb 19 2020 daviddavid <daviddavid> 3.25.1-2.mga8
+ Revision: 1542342
- fix python shebangs
+ umeabot <umeabot>
- Mageia 8 Mass Rebuild
+ wally <wally>
- replace deprecated %%configure2_5x

* Sun Dec 15 2019 guillomovitch <guillomovitch> 3.25.1-1.mga8
+ Revision: 1468078
- new version 3.25.1

* Wed Oct 23 2019 guillomovitch <guillomovitch> 3.24.1-1.mga8
+ Revision: 1455376
- new version 3.24.1

* Sun Sep 15 2019 tv <tv> 3.23.1-2.mga8
+ Revision: 1441650
- rebuild for python-3.8

* Mon Sep 02 2019 guillomovitch <guillomovitch> 3.23.1-1.mga8
+ Revision: 1436451
- new version 3.23.1

* Thu Jul 04 2019 guillomovitch <guillomovitch> 3.22.1-1.mga8
+ Revision: 1418580
- new version 3.22.1
- use python 3 for bindings
- split some optional modules in subpackages to minimize dependencies

* Tue May 14 2019 guillomovitch <guillomovitch> 3.21.1-1.mga7
+ Revision: 1397714
- new version 3.21.1

* Sat Mar 16 2019 guillomovitch <guillomovitch> 3.20.1-1.mga7
+ Revision: 1377770
- new version 3.20.1

* Mon Dec 24 2018 guillomovitch <guillomovitch> 3.19.1-2.mga7
+ Revision: 1344810
- fix upgrade by splitting libsecret-storage into its own subpackage

* Sun Dec 23 2018 guillomovitch <guillomovitch> 3.19.1-1.mga7
+ Revision: 1344758
- new version 3.19.1

* Sun Sep 23 2018 umeabot <umeabot> 3.14.1-5.mga7
+ Revision: 1301290
- Mageia 7 Mass Rebuild

* Thu Jul 26 2018 daviddavid <daviddavid> 3.14.1-4.mga7
+ Revision: 1245362
- rebuild for new json-c 0.13.1

* Wed Jul 25 2018 daviddavid <daviddavid> 3.14.1-3.mga7
+ Revision: 1245256
- rename python-syslog-ng to python2-syslog-ng
- fix json-c BR

* Sun Mar 11 2018 guillomovitch <guillomovitch> 3.14.1-1.mga7
+ Revision: 1208113
- new version 3.14.1

* Fri Aug 04 2017 guillomovitch <guillomovitch> 3.11.1-1.mga7
+ Revision: 1134954
- new version 3.11

* Sat Jan 28 2017 guillomovitch <guillomovitch> 3.9.1-1.mga6
+ Revision: 1083764
- new version 3.9.1

* Sat Aug 27 2016 guillomovitch <guillomovitch> 3.8.1-1.mga6
+ Revision: 1049192
- new version 3.8.1

* Sun Jul 24 2016 guillomovitch <guillomovitch> 3.7.3-1.mga6
+ Revision: 1043530
- new version 3.7.3

* Thu Mar 03 2016 umeabot <umeabot> 3.7.1-3.mga6
+ Revision: 984452
- Rebuild for openssl

* Fri Feb 12 2016 umeabot <umeabot> 3.7.1-2.mga6
+ Revision: 958947
- Mageia 6 Mass Rebuild

* Sun Oct 11 2015 guillomovitch <guillomovitch> 3.7.1-1.mga6
+ Revision: 889636
- new version 3.7.1

* Mon Jun 22 2015 guillomovitch <guillomovitch> 3.6.3-1.mga6
+ Revision: 839393
- new version 3.6.3

* Wed Oct 15 2014 umeabot <umeabot> 3.5.6-6.mga5
+ Revision: 744678
- Second Mageia 5 Mass Rebuild

* Wed Oct 08 2014 eatdirt <eatdirt> 3.5.6-5.mga5
+ Revision: 737448
- Adding scriptlet to switch on fwd in systemd journal

* Fri Sep 26 2014 tv <tv> 3.5.6-4.mga5
+ Revision: 725240
- rebuild for bogus file deps

* Tue Sep 16 2014 umeabot <umeabot> 3.5.6-3.mga5
+ Revision: 689662
- Mageia 5 Mass Rebuild

* Thu Sep 04 2014 colin <colin> 3.5.6-2.mga5
+ Revision: 672035
- Rebuild for new systemd

* Thu Aug 07 2014 guillomovitch <guillomovitch> 3.5.6-1.mga5
+ Revision: 660358
- new version 3.5.6

* Tue Jul 29 2014 guillomovitch <guillomovitch> 3.5.5-1.mga5
+ Revision: 657854
- new version 3.5.5

* Sun Jul 06 2014 pterjan <pterjan> 3.5.4.1-2.mga5
+ Revision: 650059
- Fix build with recent json-c

* Thu Mar 20 2014 guillomovitch <guillomovitch> 3.5.4.1-1.mga5
+ Revision: 606038
- new version 3.5.4.1

* Thu Mar 13 2014 guillomovitch <guillomovitch> 3.5.4-1.mga5
+ Revision: 602772
- new version 3.5.4

* Tue Feb 04 2014 guillomovitch <guillomovitch> 3.5.3-1.mga5
+ Revision: 580718
- new version 3.5.3

* Thu Nov 07 2013 guillomovitch <guillomovitch> 3.4.5-1.mga4
+ Revision: 549904
- new version 3.4.5

* Sat Oct 19 2013 umeabot <umeabot> 3.4.3-2.mga4
+ Revision: 532259
- Mageia 4 Mass Rebuild

* Mon Aug 19 2013 guillomovitch <guillomovitch> 3.4.3-1.mga4
+ Revision: 467620
- new version

* Thu May 23 2013 guillomovitch <guillomovitch> 3.4.1-1.mga4
+ Revision: 424808
- new version

* Sat May 11 2013 guillomovitch <guillomovitch> 3.3.8-3.mga3
+ Revision: 413002
- use systemctl in logrotate, instead of sysinit script

* Sun Mar 24 2013 colin <colin> 3.3.8-2.mga3
+ Revision: 405136
- Use tmpfiles macros and add system version to requires (mga#9302)

* Thu Feb 07 2013 guillomovitch <guillomovitch> 3.3.8-1.mga3
+ Revision: 395116
- new version
- fix default configuration file, for systemd compatibility (8944)
- ship tmpfile configuration
- drop old and doubtful pm-utils scriptlet
- use /etc/syslog-ng/conf.d for additional configuration snippets, as fedora

* Mon Jan 14 2013 umeabot <umeabot> 3.3.7-4.mga3
+ Revision: 383952
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Tue Dec 04 2012 guillomovitch <guillomovitch> 3.3.7-3.mga3
+ Revision: 326660
- reformat default configuration file, and adapt to 3.3 syntax
- use regular installation prefix
- explicit systemd support

* Sat Dec 01 2012 fwang <fwang> 3.3.7-2.mga3
+ Revision: 323690
- rebuild for new pcre

* Thu Nov 29 2012 guillomovitch <guillomovitch> 3.3.7-1.mga3
+ Revision: 323119
- new version

* Fri Sep 14 2012 guillomovitch <guillomovitch> 3.3.6-1.mga3
+ Revision: 293884
- new version
- use /run instead of /var/run for PID file
- minor systemd service fixes

* Tue May 29 2012 guillomovitch <guillomovitch> 3.3.5-1.mga3
+ Revision: 249509
- new version
- drop sysinit support

* Sat Apr 28 2012 tmb <tmb> 3.3.4-3.mga2
+ Revision: 233870
- Require rpm-helper >= 0.24.8-1 for systemd support

* Sat Apr 21 2012 colin <colin> 3.3.4-2.mga2
+ Revision: 232391
- Ensure syslog-ng does the necessary post install magic to enable itself under systemd

* Sun Jan 22 2012 guillomovitch <guillomovitch> 3.3.4-1.mga2
+ Revision: 199666
- new version

* Tue Nov 29 2011 guillomovitch <guillomovitch> 3.3.3-1.mga2
+ Revision: 174076
- new version

* Tue Oct 11 2011 guillomovitch <guillomovitch> 3.3.1-1.mga2
+ Revision: 153982
- new version
- systemd support
+ rapsys <rapsys>
- Add missing directory creation rights

* Thu Jun 30 2011 rapsys <rapsys> 3.2.4-1.mga2
+ Revision: 116910
- Add syslog-ng sources
- Created package structure for syslog-ng.