summaryrefslogtreecommitdiff
path: root/core/syslog-ng
diff options
context:
space:
mode:
authorroot <root@rshg047.dnsready.net>2011-06-30 23:11:47 +0000
committerroot <root@rshg047.dnsready.net>2011-06-30 23:11:47 +0000
commit64e72407414ce0badfb541782125cd8e3a25c12e (patch)
treeb77ce06374d43b1653bc517ebdbd10e1d0f2b328 /core/syslog-ng
parent5e8a6a470237711ad18f12dde87deea6f2b8b0e0 (diff)
Thu Jun 30 23:11:47 UTC 2011
Diffstat (limited to 'core/syslog-ng')
-rw-r--r--core/syslog-ng/PKGBUILD25
-rw-r--r--core/syslog-ng/non-blocking-systemd-fds.patch32
2 files changed, 51 insertions, 6 deletions
diff --git a/core/syslog-ng/PKGBUILD b/core/syslog-ng/PKGBUILD
index 3a25d87e4..c54007652 100644
--- a/core/syslog-ng/PKGBUILD
+++ b/core/syslog-ng/PKGBUILD
@@ -1,10 +1,11 @@
-# $Id: PKGBUILD 123085 2011-05-08 03:28:44Z eric $
+# $Id: PKGBUILD 129498 2011-06-28 13:40:42Z dreisner $
+# Maintainer: Dave Reisner <dreisner@archlinux.org>
# Maintainer: Eric BĂ©langer <eric@archlinux.org>
# Maintainer: Aaron Griffin <aaron@archlinux.org>
pkgname=syslog-ng
pkgver=3.2.4
-pkgrel=1
+pkgrel=2
pkgdesc="Next-generation syslogd with advanced networking and filtering capabilities"
arch=('i686' 'x86_64')
license=('GPL2')
@@ -17,14 +18,17 @@ provides=('logger')
options=('!libtool')
backup=('etc/syslog-ng/modules.conf' 'etc/syslog-ng/scl.conf' \
'etc/syslog-ng/syslog-ng.conf' 'etc/logrotate.d/syslog-ng')
-source=(http://www.balabit.com/downloads/files/syslog-ng/sources/${pkgver}/source/${pkgname}_${pkgver}.tar.gz \
+source=(http://www.balabit.com/downloads/files/syslog-ng/sources/${pkgver}/source/${pkgname}_${pkgver}.tar.gz
+ non-blocking-systemd-fds.patch
syslog-ng.conf syslog-ng.logrotate syslog-ng.rc cap_syslog.patch)
md5sums=('5995f7dad0053a478b60a63f6f754203'
+ '25e43afe51eb2223c25168e3c3e7aaf6'
'344dddfff946300f5576b13a7e8ea19f'
'735636090be4582885974542d2a75855'
'8b4441343d859c2f01c2cf799a7e6f98'
'46e5dcff71f820d497898331a3f608fe')
sha1sums=('ff732f7223bd2bd0424d4b9028b523cf62133af1'
+ '73b83deae9a8b945dfb13adf331e6bf6f119b83e'
'b9eb8c61f7cccda543fc5c97fe1d40a8d15e713f'
'ac997b25d7d8e69e66782d3771a0e12aff55ae7f'
'4481819762fd1b6f25903016a8878e63c0058fcb'
@@ -32,13 +36,21 @@ sha1sums=('ff732f7223bd2bd0424d4b9028b523cf62133af1'
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
-# fix #22555 for kernels >=2.6.38
- patch -p1 -i ../cap_syslog.patch
+
+ # fix #22555 for kernels >=2.6.38
+ patch -p1 -i ../cap_syslog.patch
+
+ # fix systemd blocking FD bug
+ # https://bugzilla.balabit.com/show_bug.cgi?id=125
+ patch -Np1 < "$srcdir/non-blocking-systemd-fds.patch"
+
./configure --prefix=/usr --sysconfdir=/etc/syslog-ng \
--libexecdir=/usr/lib --localstatedir=/var/lib/syslog-ng \
--enable-tcp-wrapper \
--with-pidfile-dir=/var/run \
- --disable-spoof-source
+ --disable-spoof-source \
+ --enable-systemd
+
make
}
@@ -49,4 +61,5 @@ package() {
install -Dm644 "${srcdir}/syslog-ng.conf" "${pkgdir}/etc/syslog-ng/syslog-ng.conf"
install -Dm644 "${srcdir}/syslog-ng.logrotate" "${pkgdir}/etc/logrotate.d/syslog-ng"
install -Dm755 "${srcdir}/syslog-ng.rc" "${pkgdir}/etc/rc.d/syslog-ng"
+ install -Dm644 "doc/examples/syslog-ng.service" "$pkgdir/lib/systemd/system/syslog-ng.service"
}
diff --git a/core/syslog-ng/non-blocking-systemd-fds.patch b/core/syslog-ng/non-blocking-systemd-fds.patch
new file mode 100644
index 000000000..bd056088b
--- /dev/null
+++ b/core/syslog-ng/non-blocking-systemd-fds.patch
@@ -0,0 +1,32 @@
+From 2f214c4f87d944aa28d53e331a67b1fd88d9840f Mon Sep 17 00:00:00 2001
+From: Balazs Scheidler <bazsi@balabit.hu>
+Date: Wed, 22 Jun 2011 12:50:53 +0200
+Subject: [PATCH] systemd: make sure the acquired fd is in non-blocking mode
+
+The fd acquired from systemd is in blocking mode, and syslog-ng
+didn't explicitly set it to non-blocking, causing syslog-ng
+to stall. This patch changes that, explicitly enables
+O_NONBLOCK and O_CLOEXEC on systemd acquired fds.
+
+Reported-By: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
+---
+ modules/afsocket/afunix.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/modules/afsocket/afunix.c b/modules/afsocket/afunix.c
+index cd9c205..9a4e37b 100644
+--- a/modules/afsocket/afunix.c
++++ b/modules/afsocket/afunix.c
+@@ -108,6 +108,8 @@ afunix_sd_acquire_socket(AFSocketSourceDriver *s, gint *result_fd)
+
+ if (*result_fd != -1)
+ {
++ g_fd_set_nonblock(*result_fd, TRUE);
++ g_fd_set_cloexec(*result_fd, TRUE);
+ msg_verbose("Acquired systemd socket",
+ evt_tag_str("filename", self->filename),
+ evt_tag_int("systemd-sock-fd", *result_fd),
+--
+1.7.5.4
+