summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-11-20 17:39:33 +0000
committerMike Frysinger <vapier@gentoo.org>2010-11-20 17:39:33 +0000
commit0d386e1a7ebddc4bf89ef21675146e161b2e1145 (patch)
tree4a2f74a78d3fd27f6584e67eff2be2f8897ffc15 /app-admin/sysklogd
parentMarked ~hppa ~ppc (bug #345605). (diff)
downloadgentoo-2-0d386e1a7ebddc4bf89ef21675146e161b2e1145.tar.gz
gentoo-2-0d386e1a7ebddc4bf89ef21675146e161b2e1145.tar.bz2
gentoo-2-0d386e1a7ebddc4bf89ef21675146e161b2e1145.zip
Update Debian patchset for #225847 by oRo and #337279 by Yuri Karaban, and add patch to avoid glibc syslog() collision #342601 by Dmitriy Matrosov.
(Portage version: 2.2.0_alpha4/cvs/Linux x86_64)
Diffstat (limited to 'app-admin/sysklogd')
-rw-r--r--app-admin/sysklogd/ChangeLog11
-rw-r--r--app-admin/sysklogd/files/sysklogd-1.5-syslog-func-collision.patch103
-rw-r--r--app-admin/sysklogd/sysklogd-1.5-r1.ebuild58
3 files changed, 170 insertions, 2 deletions
diff --git a/app-admin/sysklogd/ChangeLog b/app-admin/sysklogd/ChangeLog
index d4cae923ab71..d202bea33b95 100644
--- a/app-admin/sysklogd/ChangeLog
+++ b/app-admin/sysklogd/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-admin/sysklogd
-# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/sysklogd/ChangeLog,v 1.71 2008/06/07 16:24:09 vapier Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/sysklogd/ChangeLog,v 1.72 2010/11/20 17:39:33 vapier Exp $
+
+*sysklogd-1.5-r1 (20 Nov 2010)
+
+ 20 Nov 2010; Mike Frysinger <vapier@gentoo.org> +sysklogd-1.5-r1.ebuild,
+ +files/sysklogd-1.5-syslog-func-collision.patch:
+ Update Debian patchset for #225847 by oRo and #337279 by Yuri Karaban, and
+ add patch to avoid glibc syslog() collision #342601 by Dmitriy Matrosov.
*sysklogd-1.5 (07 Jun 2008)
diff --git a/app-admin/sysklogd/files/sysklogd-1.5-syslog-func-collision.patch b/app-admin/sysklogd/files/sysklogd-1.5-syslog-func-collision.patch
new file mode 100644
index 000000000000..76912a265565
--- /dev/null
+++ b/app-admin/sysklogd/files/sysklogd-1.5-syslog-func-collision.patch
@@ -0,0 +1,103 @@
+http://bugs.gentoo.org/342601
+
+rename local "syslog" and "vsyslog" functions to avoid conflicts with glibc's
+
+patch by Dmitriy Matrosov
+
+--- sysklogd-1.5/klogd.c
++++ sysklogd-1.5/klogd.c
+@@ -258,7 +262,6 @@
+ #if !defined(__GLIBC__)
+ #include <linux/time.h>
+ #endif /* __GLIBC__ */
+-#include <stdarg.h>
+ #include <paths.h>
+ #include <stdlib.h>
+ #include <pwd.h>
+@@ -637,7 +640,7 @@
+ }
+ argl += 3;
+ }
+- syslog(priority, fmt, argl);
++ syslog_own(priority, fmt, argl);
+ va_end(ap);
+ #ifdef TESTING
+ putchar('\n');
+@@ -646,7 +649,7 @@
+ }
+
+ va_start(ap, fmt);
+- vsyslog(priority, fmt, ap);
++ vsyslog_own(priority, fmt, ap);
+ va_end(ap);
+ #ifdef TESTING
+ printf ("\n");
+@@ -1205,7 +1208,7 @@
+ }
+
+ if (server_user && drop_root()) {
+- syslog(LOG_ALERT, "klogd: failed to drop root");
++ syslog_own(LOG_ALERT, "klogd: failed to drop root");
+ Terminate();
+ }
+
+--- sysklogd-1.5/klogd.h
++++ sysklogd-1.5/klogd.h
+@@ -24,6 +24,7 @@
+ #include <stdio.h>
+ #include <syslog.h>
+ #include <string.h>
++#include <stdarg.h>
+
+
+ /* Function prototypes. */
+@@ -38,3 +43,5 @@
+ extern char * ExpandKadds(char *, char *);
+ extern void SetParanoiaLevel(int);
+ extern void Syslog(int priority, char *fmt, ...);
++extern void syslog_own(int, const char *, ...);
++extern void vsyslog_own(int, const char *, va_list);
+--- sysklogd-1.5/ksym_mod.c
++++ sysklogd-1.5/ksym_mod.c
+@@ -95,7 +98,6 @@
+ #if !defined(__GLIBC__)
+ #include <linux/time.h>
+ #endif /* __GLIBC__ */
+-#include <stdarg.h>
+ #include <paths.h>
+ #include <linux/version.h>
+
+--- sysklogd-1.5/syslog.c
++++ sysklogd-1.5/syslog.c
+@@ -75,6 +79,10 @@
+
+ #define _PATH_LOGNAME "/dev/log"
+
++
++void syslog_own(int, const char *, ...);
++void vsyslog_own(int, const char *, va_list);
++
+ static int LogFile = -1; /* fd for log */
+ static int connected; /* have done connect */
+ static int LogStat = 0; /* status bits, set by openlog() */
+@@ -82,17 +90,17 @@
+ static int LogFacility = LOG_USER; /* default facility code */
+
+ void
+-syslog(int pri, const char *fmt, ...)
++syslog_own(int pri, const char *fmt, ...)
+ {
+ va_list ap;
+
+ va_start(ap, fmt);
+- vsyslog(pri, fmt, ap);
++ vsyslog_own(pri, fmt, ap);
+ va_end(ap);
+ }
+
+ void
+-vsyslog(pri, fmt, ap)
++vsyslog_own(pri, fmt, ap)
+ int pri;
+ const char *fmt;
+ va_list ap;
diff --git a/app-admin/sysklogd/sysklogd-1.5-r1.ebuild b/app-admin/sysklogd/sysklogd-1.5-r1.ebuild
new file mode 100644
index 000000000000..f05ed97ef362
--- /dev/null
+++ b/app-admin/sysklogd/sysklogd-1.5-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/sysklogd/sysklogd-1.5-r1.ebuild,v 1.1 2010/11/20 17:39:33 vapier Exp $
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DEB_VER="6"
+DESCRIPTION="Standard log daemons"
+HOMEPAGE="http://www.infodrom.org/projects/sysklogd/"
+SRC_URI="http://www.infodrom.org/projects/sysklogd/download/${P}.tar.gz
+ mirror://debian/pool/main/s/sysklogd/${PN}_${PV}-${DEB_VER}.diff.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE=""
+RESTRICT="test"
+
+DEPEND=""
+RDEPEND="dev-lang/perl
+ sys-apps/debianutils"
+PROVIDE="virtual/logger"
+
+src_unpack() {
+ unpack ${A}
+ epatch "${WORKDIR}"/${PN}_${PV}-${DEB_VER}.diff
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-debian-cron.patch
+ epatch "${FILESDIR}"/${P}-build.patch
+
+ # CAEN/OWL security patches
+ epatch "${FILESDIR}"/${PN}-1.4.2-caen-owl-syslogd-bind.diff
+ epatch "${FILESDIR}"/${PN}-1.4.2-caen-owl-syslogd-drop-root.diff
+ epatch "${FILESDIR}"/${PN}-1.4.2-caen-owl-klogd-drop-root.diff
+
+ epatch "${FILESDIR}"/${P}-syslog-func-collision.patch #342601
+
+ append-lfs-flags
+}
+
+src_compile() {
+ tc-export CC
+ emake || die
+}
+
+src_install() {
+ dosbin syslogd klogd debian/syslog-facility debian/syslogd-listfiles || die "dosbin"
+ doman *.[1-9] debian/syslogd-listfiles.8
+ insinto /etc
+ doins debian/syslog.conf || die
+ exeinto /etc/cron.daily
+ newexe debian/cron.daily syslog || die
+ exeinto /etc/cron.weekly
+ newexe debian/cron.weekly syslog || die
+ dodoc ANNOUNCE CHANGES NEWS README.1st README.linux
+ newinitd "${FILESDIR}"/sysklogd.rc6 sysklogd
+ newconfd "${FILESDIR}"/sysklogd.confd sysklogd
+}