[syslog-ng] * Update to syslog-ng 3.3.7 RC2
Jose Pedro Oliveira
jpo at fedoraproject.org
Thu Oct 18 19:12:25 UTC 2012
commit 5bd56909aaeca83d0a610caef21fd6ce6de01302
Author: Jose Pedro Oliveira <jpo at di.uminho.pt>
Date: Thu Oct 18 21:11:59 2012 +0100
* Update to syslog-ng 3.3.7 RC2
.gitignore | 1 +
sources | 2 +-
syslog-ng-3.2.5-syslog-ng.service.patch | 13 ---
syslog-ng-3.2.5-tests-functional-sql-test.patch | 33 -------
syslog-ng-3.3.4-afunix.c-diagnostic-messages.patch | 88 ------------------
syslog-ng-3.3.6-syslog-ng.service.patch | 12 +++
syslog-ng-3.3.6-tests-functional-sql-test.patch | 12 +++
syslog-ng.conf | 33 ++++---
syslog-ng.spec | 95 +++++++++++++-------
9 files changed, 109 insertions(+), 180 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 1d143c6..a6cc477 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@ syslog-ng_3.1.1.tar.gz
/syslog-ng-3.2.4+20111022+0801.tar.gz
/syslog-ng-3.2.4+20111023+0856.tar.gz
/syslog-ng_3.2.5.tar.gz
+/syslog-ng-3.3.6.91-20121008-v3.3.6.91.tar.gz
diff --git a/sources b/sources
index de5cbb7..5140411 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-60737452ce898f9dc7170dfdc9bfd732 syslog-ng_3.2.5.tar.gz
+9c6d1576126028e78c533a3a4159f939 syslog-ng-3.3.6.91-20121008-v3.3.6.91.tar.gz
diff --git a/syslog-ng-3.3.6-syslog-ng.service.patch b/syslog-ng-3.3.6-syslog-ng.service.patch
new file mode 100644
index 0000000..f17cc97
--- /dev/null
+++ b/syslog-ng-3.3.6-syslog-ng.service.patch
@@ -0,0 +1,12 @@
+diff -ruN syslog-ng-3.3.5-orig/contrib/systemd/syslog-ng.service syslog-ng-3.3.5/contrib/systemd/syslog-ng.service
+--- syslog-ng-3.3.5-orig/contrib/systemd/syslog-ng.service 2012-06-27 01:15:11.000000000 +0100
++++ syslog-ng-3.3.5/contrib/systemd/syslog-ng.service 2012-06-28 01:16:02.587991449 +0100
+@@ -4,7 +4,7 @@
+
+ [Service]
+ Sockets=syslog.socket
+-ExecStart=/usr/sbin/syslog-ng -F
++ExecStart=/usr/sbin/syslog-ng -F -p /var/run/syslogd.pid
+ ExecReload=/bin/kill -HUP $MAINPID
+ StandardOutput=null
+
diff --git a/syslog-ng-3.3.6-tests-functional-sql-test.patch b/syslog-ng-3.3.6-tests-functional-sql-test.patch
new file mode 100644
index 0000000..8fa2764
--- /dev/null
+++ b/syslog-ng-3.3.6-tests-functional-sql-test.patch
@@ -0,0 +1,12 @@
+diff -ruN syslog-ng-3.3.3/tests/functional/globals.py syslog-ng-3.3.3-modified/tests/functional/globals.py
+--- syslog-ng-3.3.3/tests/functional/globals.py 2011-09-20 07:39:14.000000000 +0100
++++ syslog-ng-3.3.3-modified/tests/functional/globals.py 2012-01-16 01:39:24.206723249 +0000
+@@ -7,7 +7,7 @@
+ return False
+
+ def has_module(module):
+- avail_mods = os.popen('../../syslog-ng/syslog-ng -V | grep ^Available-Modules: ', 'r').read()
++ avail_mods = os.popen('../../syslog-ng/syslog-ng -V | grep ^Default-Modules: ', 'r').read()
+ if avail_mods.find(module) != -1:
+ return True
+ return False
diff --git a/syslog-ng.conf b/syslog-ng.conf
index a4f20a9..2ce866e 100644
--- a/syslog-ng.conf
+++ b/syslog-ng.conf
@@ -1,4 +1,4 @@
- at version:3.2
+ at version:3.3
# syslog-ng configuration file.
#
@@ -7,23 +7,25 @@
#
# See syslog-ng(8) and syslog-ng.conf(5) for more information.
#
+# Note: it also sources additional configuration files (*.conf)
+# located in /etc/syslog-ng/conf.d/
options {
- flush_lines (0);
- time_reopen (10);
- log_fifo_size (1000);
- long_hostnames (off);
- use_dns (no);
- use_fqdn (no);
- create_dirs (no);
- keep_hostname (yes);
+ flush_lines (0);
+ time_reopen (10);
+ log_fifo_size (1000);
+ chain_hostnames (off);
+ use_dns (no);
+ use_fqdn (no);
+ create_dirs (no);
+ keep_hostname (yes);
};
source s_sys {
- file ("/proc/kmsg" program_override("kernel: "));
- unix-dgram ("/dev/log");
- internal();
- # udp(ip(0.0.0.0) port(514));
+ file ("/proc/kmsg" program_override("kernel") flags(kernel));
+ unix-dgram ("/dev/log");
+ internal();
+ # udp(ip(0.0.0.0) port(514));
};
destination d_cons { file("/dev/console"); };
@@ -60,4 +62,9 @@ log { source(s_sys); filter(f_news); destination(d_spol); };
log { source(s_sys); filter(f_boot); destination(d_boot); };
log { source(s_sys); filter(f_cron); destination(d_cron); };
+
+# Source additional configuration files (.conf extension only)
+ at include "/etc/syslog-ng/conf.d/*.conf"
+
+
# vim:ft=syslog-ng:ai:si:ts=4:sw=4:et:
diff --git a/syslog-ng.spec b/syslog-ng.spec
index 285ca14..5af0827 100644
--- a/syslog-ng.spec
+++ b/syslog-ng.spec
@@ -1,30 +1,33 @@
%global evtlog_ver 0.2.12
+%global ivykis-ver 0.30.4
Name: syslog-ng
-Version: 3.2.5
-Release: 16%{?dist}
+Version: 3.3.7
+Release: 0.1.rc2%{?dist}
Summary: Next-generation syslog server
Group: System Environment/Daemons
License: GPLv2+
Url: http://www.balabit.com/network-security/syslog-ng
-Source0: http://www.balabit.com/downloads/files?path=/syslog-ng/sources/%{version}/source/%{name}_%{version}.tar.gz
+#Source0: http://www.balabit.com/downloads/files?path=/syslog-ng/sources/%{version}/source/%{name}_%{version}.tar.gz
+Source0: http://packages.madhouse-project.org/syslog-ng/3.3/3.3.6.91/syslog-ng-3.3.6.91-20121008-v3.3.6.91.tar.gz
Source1: syslog-ng.conf
Source2: syslog-ng.logrotate
-Patch0: syslog-ng-3.2.5-syslog-ng.service.patch
-Patch1: syslog-ng-3.3.4-afunix.c-diagnostic-messages.patch
-Patch2: syslog-ng-3.2.5-tests-functional-control.py.patch
-Patch3: syslog-ng-3.2.5-tests-functional-sql-test.patch
-
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch0: syslog-ng-3.3.6-syslog-ng.service.patch
+Patch1: syslog-ng-3.2.5-tests-functional-control.py.patch
+Patch2: syslog-ng-3.3.6-tests-functional-sql-test.patch
BuildRequires: systemd-units
BuildRequires: pkgconfig
BuildRequires: libtool
+BuildRequires: bison, flex
BuildRequires: eventlog-devel >= %{evtlog_ver}
BuildRequires: glib2-devel >= 2.10.1
-#BuildRequires: libcap-devel
+BuildRequires: ivykis-devel >= %{ivykis-ver}
+BuildRequires: json-c-devel
+#BuildRequires: json-glib-devel
+BuildRequires: libcap-devel
BuildRequires: libdbi-devel
BuildRequires: libnet-devel
BuildRequires: openssl-devel
@@ -37,6 +40,7 @@ BuildRequires: python
BuildRequires: libdbi-dbd-sqlite
Requires: logrotate
+Requires: ivykis >= %{ivykis-ver}
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
@@ -80,11 +84,10 @@ developing applications that use %{name}.
%prep
-%setup -q
+%setup -q -n %{name}-3.3.6.91
%patch0 -p1
%patch1 -p1
%patch2 -p1
-%patch3 -p1
# fix perl path
%{__sed} -i 's|^#!/usr/local/bin/perl|#!%{__perl}|' contrib/relogger.pl
@@ -96,6 +99,8 @@ developing applications that use %{name}.
/usr/bin/iconv -f iso8859-1 -t utf-8 AUTHORS > AUTHORS.conv && \
%{__mv} -f AUTHORS.conv AUTHORS
+# create an ld.so conf file
+echo %{_libdir}/%{name} > %{name}-%{_arch}.conf
%build
%configure \
@@ -105,12 +110,14 @@ developing applications that use %{name}.
--datadir=%{_datadir}/%{name} \
--with-module-dir=/%{_libdir}/%{name} \
--with-systemdsystemunitdir=%{_unitdir} \
+ --with-ivykis=system \
--enable-ipv6 \
--enable-tcp-wrapper \
--enable-pcre \
--enable-spoof-source \
- --disable-linux-caps \
+ --enable-linux-caps \
--enable-sql \
+ --enable-json \
--enable-ssl \
--enable-shared \
--disable-static \
@@ -125,10 +132,9 @@ make %{_smp_mflags}
%install
-%{__rm} -rf %{buildroot}
make DESTDIR=%{buildroot} install
-#%{__install} -d -m 755 %{buildroot}%{_sysconfdir}/%{name}
+%{__install} -d -m 755 %{buildroot}%{_sysconfdir}/%{name}/conf.d
%{__install} -p -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/syslog-ng.conf
%{__install} -d -m 755 %{buildroot}%{_sysconfdir}/logrotate.d
@@ -142,6 +148,10 @@ make DESTDIR=%{buildroot} install
%{__install} -p -m 644 config.h %{buildroot}%{_includedir}/%{name}
%{__install} -p -m 644 lib/*.h %{buildroot}%{_includedir}/%{name}
+# install the ld.so conf file
+%{__install} -d -m 755 %{buildroot}%{_sysconfdir}/ld.so.conf.d/
+%{__install} -p -m 644 %{name}-%{_arch}.conf %{buildroot}%{_sysconfdir}/ld.so.conf.d/
+
# install vim files
%{__install} -d -m 755 %{buildroot}%{_datadir}/%{name}
%{__install} -p -m 644 contrib/syslog-ng.vim %{buildroot}%{_datadir}/%{name}
@@ -159,29 +169,26 @@ find %{buildroot} -name "*.la" -exec rm -f {} \;
LD_LIBRARY_PATH=%{buildroot}/%{_libdir}:%{buildroot}/%{_libdir}/%{name} make check
-%clean
-rm -rf %{buildroot}
-
-
%post
-/sbin/ldconfig
-if [ $1 -eq 1 ] ; then
- # Initial installation
- /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+ldconfig
+if [ $1 -eq 1 ] ; then
+ # Initial installation
+ systemctl daemon-reload &>/dev/null || :
fi
%preun
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
- /bin/systemctl --no-reload disable %{name}.service >/dev/null 2>&1 || :
- /bin/systemctl stop %{name}.service >/dev/null 2>&1 || :
+ systemctl --no-reload disable %{name}.service &>/dev/null || :
+ systemctl stop %{name}.service &>/dev/null || :
fi
%postun
-/sbin/ldconfig
+ldconfig
+systemctl daemon-reload &>/dev/null || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
- /bin/systemctl condrestart %{name}.service >/dev/null 2>&1 || :
+ systemctl condrestart %{name}.service &>/dev/null || :
fi
@@ -213,17 +220,18 @@ fi
%files
-%defattr(-,root,root,-)
-%doc AUTHORS COPYING README ChangeLog NEWS
+%doc AUTHORS COPYING ChangeLog NEWS
%doc doc/security/*.txt
%doc contrib/{relogger.pl,syslog2ng,syslog-ng.conf.doc}
%dir %{_sysconfdir}/%{name}
+%dir %{_sysconfdir}/%{name}/conf.d
%dir %{_sysconfdir}/%{name}/patterndb.d
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
%config(noreplace) %{_sysconfdir}/%{name}/modules.conf
%config(noreplace) %{_sysconfdir}/%{name}/scl.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/syslog
+%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
%{_unitdir}/%{name}.service
%dir %{_sharedstatedir}/%{name}
@@ -232,7 +240,8 @@ fi
%{_bindir}/loggen
%{_bindir}/pdbtool
%{_bindir}/update-patterndb
-%{_libdir}/lib%{name}.so.*
+#{_libdir}/lib%{name}-%{version}.so
+%{_libdir}/lib%{name}-3.3.6.91.so
%{_libdir}/%{name}/*.so
%exclude %{_libdir}/%{name}/libafsql.so
@@ -253,16 +262,38 @@ fi
%{_mandir}/man8/syslog-ng.8*
%files libdbi
-%defattr(-,root,root,-)
%{_libdir}/%{name}/libafsql.so
%files devel
-%defattr(-,root,root,-)
%{_libdir}/libsyslog-ng.so
%{_includedir}/%{name}/
+%{_libdir}/pkgconfig/syslog-ng.pc
+%{_datadir}/%{name}/tools/
%changelog
+* Thu Oct 18 2012 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.3.7-0.1.rc2
+- Update to 3.3.7 RC2 (aka syslog-ng-3.3.6.91-20121008-v3.3.6.91.tar.gz)
+- Create and own the /etc/syslog-ng/conf.d directory
+- syslog-ng.conf: now sources additional configuration files located at
+ /etc/syslog-ng/conf.d ; these files must have a .conf extension
+- syslog-ng.conf: make the s_sys source more compliant with the one
+ generated by generate-system-source.sh
+- syslog-ng.conf: retab
+- Bump the minimal ivykis version requirement to 0.30.4
+
+* Mon Aug 27 2012 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.3.6-1
+- Update to 3.3.6
+- Now builds with an external (and unpatched) version of the ivykis library (>= 0.30.1)
+- Enable JSON support (BR json-c-devel).
+- Enable Linux caps (BR libcap-devel).
+- BR bison and flex
+- syslog-ng.conf: rename the now obsolete long_hostnames option to chain_hostnames
+- install a ld.so conf file so that the private shared library -
+ libsyslog-ng-crypto - can be found.
+- Unconditionally run "systemctl daemon-reload" on the %%postun scriptlet
+ (https://bugzilla.redhat.com/show_bug.cgi?id=700766#c25)
+
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.2.5-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
More information about the scm-commits
mailing list