[syslog-ng/f16] * Sync with rawhide

Jose Pedro Oliveira jpo at fedoraproject.org
Wed Dec 14 19:41:23 UTC 2011


commit 5d0d6c09cb12263b63e5e827b9c173cf9d6afa6e
Author: Jose Pedro Oliveira <jpo at di.uminho.pt>
Date:   Wed Dec 14 19:40:50 2011 +0000

     * Sync with rawhide

 .gitignore                                         |    1 +
 sources                                            |    2 +-
 syslog-ng-3.2.4-chain-hostnames-processing.patch   |   29 -------
 syslog-ng-3.2.4-disable-sql-and-ssl-tests.patch    |   19 ----
 syslog-ng-3.2.5-syslog-ng.service.patch            |   14 +++
 syslog-ng-3.3.4-afunix.c-diagnostic-messages.patch |   88 ++++++++++++++++++++
 syslog-ng.conf                                     |    2 +-
 syslog-ng.service                                  |   12 ---
 syslog-ng.spec                                     |   56 +++++++++----
 9 files changed, 146 insertions(+), 77 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index df63665..2e10c71 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@ syslog-ng_3.1.1.tar.gz
 /syslog-ng-3.2.3-20110424.tar.bz2
 /syslog-ng_3.2.3.tar.gz
 /syslog-ng_3.2.4.tar.gz
+/syslog-ng_3.2.5.tar.gz
diff --git a/sources b/sources
index 501145d..de5cbb7 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-5995f7dad0053a478b60a63f6f754203  syslog-ng_3.2.4.tar.gz
+60737452ce898f9dc7170dfdc9bfd732  syslog-ng_3.2.5.tar.gz
diff --git a/syslog-ng-3.2.5-syslog-ng.service.patch b/syslog-ng-3.2.5-syslog-ng.service.patch
new file mode 100644
index 0000000..f64ba98
--- /dev/null
+++ b/syslog-ng-3.2.5-syslog-ng.service.patch
@@ -0,0 +1,14 @@
+diff -ruN syslog-ng-3.2.5/contrib/systemd/syslog-ng.service syslog-ng-3.2.5-modified/contrib/systemd/syslog-ng.service
+--- syslog-ng-3.2.5/contrib/systemd/syslog-ng.service	2011-10-23 07:48:18.000000000 +0100
++++ syslog-ng-3.2.5-modified/contrib/systemd/syslog-ng.service	2011-11-01 19:30:09.446750825 +0000
+@@ -3,8 +3,9 @@
+ 
+ [Service]
+ Sockets=syslog.socket
++EnvironmentFile=-/etc/sysconfig/syslog-ng
+ ExecStartPre=/bin/systemctl stop systemd-kmsg-syslogd.service
+-ExecStart=/usr/sbin/syslog-ng -F
++ExecStart=/sbin/syslog-ng $SYSLOGNG_OPTIONS
+ ExecReload=/bin/kill -HUP $MAINPID
+ StandardOutput=null
+ 
diff --git a/syslog-ng-3.3.4-afunix.c-diagnostic-messages.patch b/syslog-ng-3.3.4-afunix.c-diagnostic-messages.patch
new file mode 100644
index 0000000..86e3b4d
--- /dev/null
+++ b/syslog-ng-3.3.4-afunix.c-diagnostic-messages.patch
@@ -0,0 +1,88 @@
+From: Balazs Scheidler <bazsi at balabit.hu>
+Date: Wed, 14 Dec 2011 14:21:05 +0000 (+0100)
+Subject: afunix: clarified error messages in case of a failure
+X-Git-Url: http://git.balabit.hu/?p=bazsi%2Fsyslog-ng-3.3.git;a=commitdiff_plain;h=606c8cc0b10aa4e877f70726b707402d100bb0f9
+
+afunix: clarified error messages in case of a failure
+
+On Fedora systems, syslog-ng was configured to use unix-stream() /dev/log
+whereas systemd supplied a unix-dgram() one, which caused difficult to
+diagnose problems.
+
+This patch adds further logging to this case and causes syslog-ng to fail
+with an error message if it finds that /dev/log is using an incorrect
+socket type.
+
+Reported-By: Michal Schmidt <mschmidt at redhat.com>
+Signed-off-by: Balazs Scheidler <bazsi at balabit.hu>
+---
+
+diff --git a/modules/afsocket/afunix.c b/modules/afsocket/afunix.c
+index cd86798..8145f1a 100644
+--- a/modules/afsocket/afunix.c
++++ b/modules/afsocket/afunix.c
+@@ -75,7 +75,7 @@ static gboolean
+ afunix_sd_acquire_socket(AFSocketSourceDriver *s, gint *result_fd)
+ {
+   AFUnixSourceDriver *self = (AFUnixSourceDriver *) s;
+-  gint fd, fds, t, r;
++  gint fd, fds;
+ 
+   *result_fd = -1;
+   fd = -1;
+@@ -100,13 +100,40 @@ afunix_sd_acquire_socket(AFSocketSourceDriver *s, gint *result_fd)
+     {
+       for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + fds; fd++)
+ 	{
+-	  t = (self->super.flags & AFSOCKET_STREAM) ? SOCK_STREAM : SOCK_DGRAM;
+-	  r = sd_is_socket_unix(fd, t, -1, self->filename, 0);
+-	  if (r == 1)
++	  /* check if any type is available */
++	  if (sd_is_socket_unix(fd, 0, -1, self->filename, 0))
+ 	    {
+-	      *result_fd = fd;
+-	      break;
+-	    }
++              int type = (self->super.flags & AFSOCKET_STREAM) ? SOCK_STREAM : SOCK_DGRAM;
++
++	      /* check if it matches our idea of the socket type */
++              if (sd_is_socket_unix(fd, type, -1, self->filename, 0))
++                {
++                  *result_fd = fd;
++                  break;
++                }
++              else
++                {
++                  msg_error("The systemd supplied UNIX domain socket is of a different type, check the configured driver and the matching systemd unit file",
++		            evt_tag_str("filename", self->filename),
++		            evt_tag_int("systemd-sock-fd", fd),
++                            evt_tag_str("expecting", type == SOCK_STREAM ? "unix-stream()" : "unix-dgram()"),
++                            NULL);
++                  return FALSE;
++                }
++            }
++          else
++            {
++
++              /* systemd passed an fd we didn't really care about. This is
++               * not an error, but might be worth mentioning it at the debug
++               * level.
++               */
++
++              msg_debug("Ignoring systemd supplied fd as it is not a UNIX domain socket",
++		        evt_tag_str("filename", self->filename),
++		        evt_tag_int("systemd-sock-fd", fd),
++		        NULL);
++            }
+ 	}
+     }
+   else
+@@ -123,7 +150,7 @@ afunix_sd_acquire_socket(AFSocketSourceDriver *s, gint *result_fd)
+     }
+   else
+     {
+-      msg_debug("Failed to acquire systemd socket, opening nevertheless",
++      msg_debug("Failed to acquire systemd socket, trying to open ourselves",
+ 		evt_tag_str("filename", self->filename),
+ 		NULL);
+     }
diff --git a/syslog-ng.conf b/syslog-ng.conf
index 28cbe68..a4f20a9 100644
--- a/syslog-ng.conf
+++ b/syslog-ng.conf
@@ -21,7 +21,7 @@ options {
 
 source s_sys {
 	file ("/proc/kmsg" program_override("kernel: "));
-	unix-stream ("/dev/log");
+	unix-dgram ("/dev/log");
 	internal();
 	# udp(ip(0.0.0.0) port(514));
 };
diff --git a/syslog-ng.spec b/syslog-ng.spec
index 5402f1b..8fca0de 100644
--- a/syslog-ng.spec
+++ b/syslog-ng.spec
@@ -4,8 +4,8 @@
 %global _libdir /%{_lib}
 
 Name: syslog-ng
-Version: 3.2.4
-Release: 8%{?dist}
+Version: 3.2.5
+Release: 2%{?dist}
 Summary: Next-generation syslog server
 
 Group: System Environment/Daemons
@@ -13,12 +13,13 @@ 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
 Source1: syslog-ng.conf
-Source2: syslog-ng.service
+#Source2: syslog-ng.service
 Source3: syslog-ng.sysconfig
 Source4: syslog-ng.logrotate
 
 Patch0: syslog-ng-3.2.4-disable-ssl-tests.patch
-Patch1: syslog-ng-3.2.4-chain-hostnames-processing.patch
+Patch1: syslog-ng-3.2.5-syslog-ng.service.patch
+Patch2: syslog-ng-3.3.4-afunix.c-diagnostic-messages.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -27,7 +28,7 @@ BuildRequires: pkgconfig
 BuildRequires: libtool
 BuildRequires: eventlog-devel >= %{evtlog_ver}
 BuildRequires: glib2-devel >= 2.10.1
-BuildRequires: libcap-devel
+#BuildRequires: libcap-devel
 BuildRequires: libdbi-devel
 BuildRequires: libnet-devel
 #BuildRequires: openssl-devel
@@ -83,6 +84,7 @@ developing applications that use %{name}.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 # fix perl path
 %{__sed} -i 's|^#!/usr/local/bin/perl|#!%{__perl}|' contrib/relogger.pl
@@ -104,11 +106,12 @@ developing applications that use %{name}.
     --localstatedir=%{_sharedstatedir}/%{name} \
     --datadir=%{_datadir}/%{name} \
     --with-module-dir=/%{_lib}/%{name} \
+    --with-systemdsystemunitdir=%{_unitdir} \
     --enable-ipv6 \
     --enable-tcp-wrapper \
     --enable-pcre \
     --enable-spoof-source \
-    --enable-linux-caps \
+    --disable-linux-caps \
     --enable-sql \
     --disable-ssl \
     --enable-shared \
@@ -130,10 +133,6 @@ make DESTDIR=%{buildroot} install
 #%{__install} -d -m 755 %{buildroot}%{_sysconfdir}/%{name}
 %{__install} -p -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/syslog-ng.conf
 
-# install the service script
-%{__install} -d -m 755 %{buildroot}%{_unitdir}
-%{__install} -p -m 644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.service
-
 %{__install} -d -m 755 %{buildroot}%{_sysconfdir}/sysconfig
 %{__install} -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
 
@@ -222,7 +221,6 @@ fi
 %defattr(-,root,root,-)
 %doc AUTHORS COPYING README ChangeLog NEWS
 %doc doc/security/*.txt
-%doc doc/examples/syslog-ng.conf.sample
 %doc contrib/{relogger.pl,syslog2ng,syslog-ng.conf.doc}
 
 %dir %{_sysconfdir}/%{name}
@@ -248,6 +246,9 @@ fi
 %{_datadir}/%{name}/syslog-ng.vim
 %ghost %{_datadir}/vim/
 
+# scl files
+%{_datadir}/%{name}/include/
+
 # uhm, some better places for those?
 %{_datadir}/%{name}/xsd/
 
@@ -264,13 +265,38 @@ fi
 %defattr(-,root,root,-)
 %{_libdir}/libsyslog-ng.so
 %{_includedir}/%{name}/
-# scl files
-%{_datadir}/%{name}/include/
 
 
 %changelog
-* Fri Sep 23 2011 Matthias Runge <mrunge at matthias-runge.de> - 3.2.4-8
-- version bump to fix #740772
+* Wed Dec 14 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.5-2
+- Fix the freeze problems caused by the /dev/log unix socket type mismatch (#742624)
+  + syslog-ng.conf: change /dev/log from unix-stream to unix-dgram
+  + upstream patch syslog-ng-3.3.4-afunix.c-diagnostic-messages.patch
+- Move the SCL files to the main RPM (#742624 comments >= 28)
+
+* Tue Nov  1 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.5-1
+- Update to 3.2.5
+
+* Tue Oct 25 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.4-11
+- New 3.2.5 pre-release tarball
+  https://lists.balabit.hu/pipermail/syslog-ng/2011-October/017491.html
+- Updated patch syslog-ng-3.2.5-syslog-ng.service.patch
+
+* Sat Oct 22 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.4-10
+- 3.2.5 pre-release: changelog and tarball from
+  https://lists.balabit.hu/pipermail/syslog-ng/2011-October/017462.html
+  Patches dropped:
+  syslog-ng-3.2.4-systemd-acquired-fd.patch
+  syslog-ng-3.2.4-chain-hostnames-processing.patch
+- New configure option: --with-systemdsystemunitdir
+- Patched the included syslog-ng.service file
+  syslog-ng-3.2.5-syslog-ng.service.patch
+
+* Mon Oct 10 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.4-9
+- Patch syslog-ng-3.2.4-systemd-acquired-fd.patch (see bug #742624)
+
+* Mon Oct 10 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.4-8
+- disable linux-caps support for the time being (see bug #718439)
 
 * Wed Aug 31 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.4-7
 - Fixed the syslog-ng.service configuration file:


More information about the scm-commits mailing list