[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#702195: unblock: syslog-ng/3.3.5-3



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: freeze-exception
thanks

Hi Release Team,

There are several important, RC bugfix over syslog-ng/3.3.5-2 in Wheezy.

First is virtual console differences between Linux and kFreeBSD[1]. It's
tty10 on the former and ttyva on the latter. Without fixing #697042 ,
syslog-ng would flood kFreeBSD logs with:
Error opening file for writing; filename='/dev/tty10', error='Operation not supported (45)'

The default syslog-ng configuration used wrong path for mail related
logs, as noted in #692056 [2].

Don't use symlinked systemd configuration files, as noted in
#690067 [3]. This caused all short of problems as dpkg doesn't support
it.

Last but not least the one which affects the DSA team is #702131 [4].
The fix is to handle EINVAL as well for eventfd2 errors.

The fixes are small and usually one liners. Debdiff is attached.

Thanks,
Laszlo/GCS
[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=697042
[2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=692056
[3] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=690067
[4] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702131
diff -Nru syslog-ng-3.3.5/debian/changelog syslog-ng-3.3.5/debian/changelog
--- syslog-ng-3.3.5/debian/changelog	2012-05-13 00:47:21.000000000 +0200
+++ syslog-ng-3.3.5/debian/changelog	2013-03-03 19:22:00.000000000 +0100
@@ -1,3 +1,22 @@
+syslog-ng (3.3.5-3) testing-proposed-updates; urgency=low
+
+  [ Gergely Nagy <algernon@madhouse-project.org> ]
+  * Don't mark systemd symlinks in /etc as conffiles.
+  * Instead of installing systemd service file symlinks, install a
+    conffile, that includes the real service file (closes: #690067).
+  * Do not forcibly remove the systemd service files, that code is not
+    needed anymore.
+  * Use the standard /var/log/mail.{info,err,warn} location for the various
+    mail-related logs (closes: #692056).
+  * Use /dev/ttyva on kFreeBSD as the target of the d_console_all
+    destination (closes: #697042).
+
+  [ Laszlo Boszormenyi (GCS) ]
+  * Fix ivykis fallback on eventfd2 errors with the addition of
+    ivykis_fallback_fix.patch (closes: #702131).
+
+ -- Laszlo Boszormenyi (GCS) <gcs@debian.hu>  Sun, 03 Mar 2013 17:57:00 +0100
+
 syslog-ng (3.3.5-2) unstable; urgency=low
 
   [ Gergely Nagy <algernon@madhouse-project.org> ]
diff -Nru syslog-ng-3.3.5/debian/patches/ivykis_fallback_fix.patch syslog-ng-3.3.5/debian/patches/ivykis_fallback_fix.patch
--- syslog-ng-3.3.5/debian/patches/ivykis_fallback_fix.patch	1970-01-01 01:00:00.000000000 +0100
+++ syslog-ng-3.3.5/debian/patches/ivykis_fallback_fix.patch	2013-03-03 17:53:25.000000000 +0100
@@ -0,0 +1,31 @@
+Description: make ivykis properly fallback on eventfd2 errors
+ The Linux glibc eventfd() wrapper function (around the SYS_eventfd{,2}
+ system calls) returns EINVAL if it is given a nonzero flags argument
+ and SYS_eventfd2 (which is the variant of SYS_eventfd that takes a flags
+ argument) isn't implemented, while iv_event_raw was expecting to get
+ either ENOSYS or success.
+ .
+ Instead of falling back on SYS_eventfd by calling the eventfd() wrapper
+ again with a zero flags argument and then setting the O_NONBLOCK and
+ O_CLOEXEC flags by hand, disable use of eventfd on systems that have
+ SYS_eventfd but not SYS_eventfd2 as a minimally invasive fix for the
+ stable branches.
+ Taken from: https://github.com/buytenh/ivykis/commit/89f67f97477aeba24aebfc58ae1a17e5bea69724.patch
+Author: Lennert Buytenhek <buytenh@wantstofly.org>
+Bug-Debian: http://bugs.debian.org/702131
+Forwarded: not-needed
+Last-Update: 2012-12-09
+
+---
+
+--- syslog-ng-3.3.5.orig/lib/ivykis/modules/iv_event_raw.c
++++ syslog-ng-3.3.5/lib/ivykis/modules/iv_event_raw.c
+@@ -91,7 +91,7 @@ int iv_event_raw_register(struct iv_even
+ 
+ 		ret = eventfd2(0, EFD_NONBLOCK | EFD_CLOEXEC);
+ 		if (ret < 0) {
+-			if (errno != ENOSYS) {
++			if (errno != ENOSYS && errno != EINVAL) {
+ 				perror("eventfd2");
+ 				return -1;
+ 			}
diff -Nru syslog-ng-3.3.5/debian/patches/series syslog-ng-3.3.5/debian/patches/series
--- syslog-ng-3.3.5/debian/patches/series	2012-05-03 10:25:19.000000000 +0200
+++ syslog-ng-3.3.5/debian/patches/series	2013-03-03 17:48:08.000000000 +0100
@@ -1 +1,2 @@
 no_make_in_debian.patch
+ivykis_fallback_fix.patch
diff -Nru syslog-ng-3.3.5/debian/rules syslog-ng-3.3.5/debian/rules
--- syslog-ng-3.3.5/debian/rules	2012-05-13 00:49:52.000000000 +0200
+++ syslog-ng-3.3.5/debian/rules	2013-03-03 18:52:18.000000000 +0100
@@ -26,7 +26,7 @@
 # to it.
 ##
 ifneq (,$(filter debug,$(DEB_BUILD_OPTIONS)))
-	EXTRA_CONFIGURE_OPTS += --enable-debug
+EXTRA_CONFIGURE_OPTS += --enable-debug
 endif
 
 DEFAULT_MODULES = affile,afprog,afsocket,afuser,afsql,basicfuncs,csvparser,dbparser,syslogformat
@@ -129,10 +129,6 @@
 override_dh_auto_install:
 	dh_auto_install
 	${MAKE} -C debian/build-tree/lib/ivykis install DESTDIR=$(CURDIR)/debian/tmp
-	ln -sf /lib/systemd/system/syslog-ng.service \
-	       debian/syslog-ng-core/etc/systemd/system/syslog.service
-	ln -sf /lib/systemd/system/syslog-ng.service \
-	       debian/syslog-ng-core/etc/systemd/system/multi-user.target.wants/
 	install -m 0644 contrib/systemd/syslog-ng.service \
 		debian/syslog-ng-core/lib/systemd/system/
 
@@ -142,17 +138,37 @@
 # Below are overrides for individual debhelper commands.
 ##
 
+# On kFreeBSD, d_console_all should log to /dev/ttyva, everywhere
+# else, to tty10. To keep the config as simple as possible, this is
+# accomplished by pulling the target device out of syslog-ng.conf,
+# into `scl-root`/system/tty10.conf.
+#
+# On kFreeBSD, this defines the `tty10` variable to /dev/ttyva,
+# everywhere else to /dev/tty10.
+#
+# It will be installed into the syslog-ng-core package by the
+# override_dh_install target.
+ifeq (${DEB_HOST_ARCH_OS},kfreebsd)
+TTY10_CONF = tty10.kfreebsd.conf
+else
+TTY10_CONF = tty10.linux.conf
+endif
+
 # Upstream installs the merge-grammar.pl as data, thus not
 # executable. Yet, it needs to be, since the Makefiles that upstream
 # also installs expect it so.
 #
-# So we simply flip a few bits after dh_install, and we're good to go!
+# We also want to install the systemd unit file into syslog-ng-core,
+# so do that here too, along with installing tty10.conf.
 override_dh_install:
 	dh_install
 ifneq (,$(filter libsyslog-ng-dev,$(shell dh_listpackages)))
 	chmod +x debian/libsyslog-ng-dev/usr/share/syslog-ng/tools/merge-grammar.pl
 endif
 
+	install -m 0644 debian/${TTY10_CONF} \
+		$(CURDIR)/debian/syslog-ng-core/usr/share/syslog-ng/include/scl/system/tty10.conf
+
 # Install the NEWS file as upstream changelog.
 # Rationale: the ChangeLog file is an old artifact from the Arch
 # times. It is not updated, and is obsolete.
diff -Nru syslog-ng-3.3.5/debian/syslog-ng.conf syslog-ng-3.3.5/debian/syslog-ng.conf
--- syslog-ng-3.3.5/debian/syslog-ng.conf	2011-11-18 10:32:38.000000000 +0100
+++ syslog-ng-3.3.5/debian/syslog-ng.conf	2013-02-13 21:31:56.000000000 +0100
@@ -1,5 +1,6 @@
 @version: 3.3
 @include "scl.conf"
+@include "`scl-root`/system/tty10.conf"
 
 # Syslog-ng configuration file, compatible with default Debian syslogd
 # installation.
@@ -43,9 +44,9 @@
 
 # This files are the log come from the mail subsystem.
 #
-destination d_mailinfo { file("/var/log/mail/mail.info"); };
-destination d_mailwarn { file("/var/log/mail/mail.warn"); };
-destination d_mailerr { file("/var/log/mail/mail.err"); };
+destination d_mailinfo { file("/var/log/mail.info"); };
+destination d_mailwarn { file("/var/log/mail.warn"); };
+destination d_mailerr { file("/var/log/mail.err"); };
 
 # Logging for INN news system
 #
@@ -65,7 +66,7 @@
 
 # Virtual console.
 #
-destination d_console_all { file("/dev/tty10"); };
+destination d_console_all { file(`tty10`); };
 
 # The named pipe /dev/xconsole is for the nsole' utility.  To use it,
 # you must invoke nsole' with the -file' option:
diff -Nru syslog-ng-3.3.5/debian/syslog-ng-core.conffiles syslog-ng-3.3.5/debian/syslog-ng-core.conffiles
--- syslog-ng-3.3.5/debian/syslog-ng-core.conffiles	2012-05-05 11:21:51.000000000 +0200
+++ syslog-ng-3.3.5/debian/syslog-ng-core.conffiles	1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-/etc/systemd/system/multi-user.target.wants/syslog-ng.service
-/etc/systemd/system/syslog.service
diff -Nru syslog-ng-3.3.5/debian/syslog-ng-core.install syslog-ng-3.3.5/debian/syslog-ng-core.install
--- syslog-ng-3.3.5/debian/syslog-ng-core.install	2012-05-05 11:22:46.000000000 +0200
+++ syslog-ng-3.3.5/debian/syslog-ng-core.install	2013-02-18 22:58:08.000000000 +0100
@@ -16,4 +16,6 @@
 usr/lib/syslog-ng/*/libsyslogformat.so
 usr/share/syslog-ng/include/scl/*
 usr/share/syslog-ng/xsd/*
-debian/syslog-ng.conf	/etc/syslog-ng/
+debian/syslog-ng.conf			/etc/syslog-ng/
+debian/systemd/syslog-ng.service	/etc/systemd/system/
+debian/systemd/syslog-ng.service	/etc/systemd/system/multi-user.target.wants/
diff -Nru syslog-ng-3.3.5/debian/systemd/syslog-ng.service syslog-ng-3.3.5/debian/systemd/syslog-ng.service
--- syslog-ng-3.3.5/debian/systemd/syslog-ng.service	1970-01-01 01:00:00.000000000 +0100
+++ syslog-ng-3.3.5/debian/systemd/syslog-ng.service	2013-02-18 22:56:36.000000000 +0100
@@ -0,0 +1 @@
+.include /lib/systemd/system/syslog-ng.service
diff -Nru syslog-ng-3.3.5/debian/tty10.kfreebsd.conf syslog-ng-3.3.5/debian/tty10.kfreebsd.conf
--- syslog-ng-3.3.5/debian/tty10.kfreebsd.conf	1970-01-01 01:00:00.000000000 +0100
+++ syslog-ng-3.3.5/debian/tty10.kfreebsd.conf	2013-02-13 21:31:56.000000000 +0100
@@ -0,0 +1 @@
+@define tty10 "/dev/ttyva"
diff -Nru syslog-ng-3.3.5/debian/tty10.linux.conf syslog-ng-3.3.5/debian/tty10.linux.conf
--- syslog-ng-3.3.5/debian/tty10.linux.conf	1970-01-01 01:00:00.000000000 +0100
+++ syslog-ng-3.3.5/debian/tty10.linux.conf	2013-02-13 21:31:56.000000000 +0100
@@ -0,0 +1 @@
+@define tty10 "/dev/tty10"

Reply to: