summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephanie J. Lockwood-Childs <wormo@gentoo.org>2009-08-12 07:06:13 +0000
committerStephanie J. Lockwood-Childs <wormo@gentoo.org>2009-08-12 07:06:13 +0000
commit7f9a5cab6d43d21d007b3984f45ca626ba351799 (patch)
treede6422e58cd14c5347b69448c21a0192d4f0396b /app-admin
parentVersion bump. (bug #279250) (diff)
downloadgentoo-2-7f9a5cab6d43d21d007b3984f45ca626ba351799.tar.gz
gentoo-2-7f9a5cab6d43d21d007b3984f45ca626ba351799.tar.bz2
gentoo-2-7f9a5cab6d43d21d007b3984f45ca626ba351799.zip
Install logrotate file (thanks to Christian Bricart),
add SYSLOG module to default config (thanks to Dean Hall, bug #235842), make sure ulogd user is able to read ulogd.conf (Portage version: 2.1.6.13/cvs/Linux x86_64)
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/ulogd/ChangeLog10
-rw-r--r--app-admin/ulogd/files/ulogd-1.24-syslog-and-logrotate.patch34
-rw-r--r--app-admin/ulogd/ulogd-1.24-r2.ebuild106
3 files changed, 149 insertions, 1 deletions
diff --git a/app-admin/ulogd/ChangeLog b/app-admin/ulogd/ChangeLog
index 43d4c51e19b3..4b83bab08030 100644
--- a/app-admin/ulogd/ChangeLog
+++ b/app-admin/ulogd/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for app-admin/ulogd
# Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/ulogd/ChangeLog,v 1.58 2009/08/11 06:35:14 wormo Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/ulogd/ChangeLog,v 1.59 2009/08/12 07:06:13 wormo Exp $
+
+*ulogd-1.24-r2 (12 Aug 2009)
+
+ 12 Aug 2009; Stephanie Lockwood-Childs <wormo@gentoo.org>
+ +files/ulogd-1.24-syslog-and-logrotate.patch, +ulogd-1.24-r2.ebuild:
+ Install logrotate file (thanks to Christian Bricart),
+ add SYSLOG module to default config (thanks to Dean Hall, bug #235842),
+ make sure ulogd user is able to read ulogd.conf
11 Aug 2009; Stephanie Lockwood-Childs <wormo@gentoo.org>
ulogd-1.24-r1.ebuild, ulogd-2.0.0_beta3.ebuild:
diff --git a/app-admin/ulogd/files/ulogd-1.24-syslog-and-logrotate.patch b/app-admin/ulogd/files/ulogd-1.24-syslog-and-logrotate.patch
new file mode 100644
index 000000000000..b3410f6f936e
--- /dev/null
+++ b/app-admin/ulogd/files/ulogd-1.24-syslog-and-logrotate.patch
@@ -0,0 +1,34 @@
+diff -u ulogd-1.24.orig/ulogd.conf.in ulogd-1.24/ulogd.conf.in
+--- ulogd-1.24.orig/ulogd.conf.in 2009-08-11 22:56:31.000000000 -0700
++++ ulogd-1.24/ulogd.conf.in 2009-08-11 23:07:35.000000000 -0700
+@@ -50,7 +50,10 @@
+ #plugin="@libdir@/ulogd_PGSQL.so"
+ #plugin="@libdir@/ulogd_SQLITE3.so"
+ #plugin="@libdir@/ulogd_PCAP.so"
++#plugin="@libdir@/ulogd_SYSLOG.so"
+
++## Note: if you change the paths of log files from defaults, you probably
++## will want to update paths in /etc/logrotate.d/ulogd to match
+
+ [LOGEMU]
+ file="/var/log/ulogd/ulogd.syslogemu"
+@@ -83,3 +86,6 @@
+ file="/var/log/ulogd/ulogd.pcap"
+ sync=1
+
++[SYSLOG]
++facility=LOG_DAEMON
++level=LOG_INFO
+diff -u ulogd-1.24.orig/ulogd.logrotate ulogd-1.24/ulogd.logrotate
+--- ulogd-1.24.orig/ulogd.logrotate 2009-08-11 22:56:32.000000000 -0700
++++ ulogd-1.24/ulogd.logrotate 2009-08-11 23:06:26.000000000 -0700
+@@ -1,6 +1,8 @@
+-/var/log/ulogd.log /var/log/ulogd.syslogemu /var/log/ulogd.pktlog /var/log/ulogd.pcap {
++/var/log/ulogd/ulogd.log /var/log/ulogd/ulogd.syslogemu /var/log/ulogd/ulogd.pktlog /var/log/ulogd/ulogd.pcap {
+ missingok
+ sharedscripts
++ weekly
++ compress
+ postrotate
+ /bin/killall -HUP ulogd 2> /dev/null || true
+ endscript
diff --git a/app-admin/ulogd/ulogd-1.24-r2.ebuild b/app-admin/ulogd/ulogd-1.24-r2.ebuild
new file mode 100644
index 000000000000..7daf4bc8df1b
--- /dev/null
+++ b/app-admin/ulogd/ulogd-1.24-r2.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/ulogd/ulogd-1.24-r2.ebuild,v 1.1 2009/08/12 07:06:13 wormo Exp $
+
+EAPI="1"
+
+inherit eutils flag-o-matic autotools
+
+DESCRIPTION="A userspace logging daemon for netfilter/iptables related logging"
+HOMEPAGE="http://netfilter.org/projects/ulogd/index.html"
+SRC_URI="http://ftp.netfilter.org/pub/ulogd/${P}.tar.bz2
+ mirror://gentoo/${PN}-glsa-200805.patch.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~ppc -sparc ~x86"
+IUSE="mysql postgres sqlite"
+
+DEPEND="net-firewall/iptables
+ mysql? ( virtual/mysql )
+ postgres? ( virtual/postgresql-base )
+ sqlite? ( dev-db/sqlite:3 )"
+RDEPEND="${DEPEND}
+ net-libs/libpcap"
+
+pkg_setup() {
+ enewgroup ulogd
+ enewuser ulogd -1 -1 /var/log/ulogd ulogd
+}
+
+src_unpack() {
+ unpack ${A} || die "unpack failed"
+ cd "${S}" || die "dir ${S} not found"
+
+ # enables logfiles over 2G (#74924)
+ append-lfs-flags
+
+ epatch "${DISTDIR}/${PN}-glsa-200805.patch.bz2"
+
+ # add syslog example to ulogd.conf,
+ # make logrotate config match default paths in ulogd.conf
+ epatch "${FILESDIR}/${P}-syslog-and-logrotate.patch"
+
+ # switch plugin makefiles to use $(CC) instead of $(LD) for linking
+ # (prevents build from choking on stuff like "LDFLAGS=-Wl,O1")
+ for p in pgsql sqlite3 extensions mysql pcap ; do
+ f=$p/Makefile.in
+ sed -i -e 's/$(LD)/$(CC) -nostartfiles/' $f || die "failed to update $f"
+ done
+
+ ewarn "Regenerating build system (this may take a bit)..."
+ eautoconf || die "Autoreconf failed"
+ econf \
+ $(use_with mysql) \
+ $(use_with postgres pgsql) \
+ $(use_with sqlite sqlite3) \
+ || die "configure failed"
+
+ # Configure uses incorrect syntax for ld
+ use mysql && sed -i -e "s:-Wl,::g;s:-rdynamic::g" Rules.make
+}
+
+src_compile() {
+ # not parallel make safe: bug #128976
+ emake -j1 || die "make failed"
+}
+
+src_install() {
+ # the Makefile seems to be "broken" -
+ # it relies on the existance of /usr, /etc ..
+ dodir /usr/sbin
+
+ make DESTDIR="${D}" install || die "install failed"
+
+ # make sure ulogd.conf is readable by ulogd user
+ fowners root:ulogd /etc/ulogd.conf
+ fperms 640 /etc/ulogd.conf
+
+ newinitd "${FILESDIR}"/ulogd-0.98 ulogd
+ local UsedServices="use"
+ use mysql && UsedServices+=" mysql"
+ use postgres && UsedServices+=" postgresql"
+ if [[ ${UsedServices} = "use" ]]; then
+ UsedServices=""
+ fi
+ sed -i -e "s:use mysql:${UsedServices}:g" "${D}/etc/init.d/ulogd" || die "sed failed"
+
+ # install logrotate config
+ insinto /etc/logrotate.d
+ newins ulogd.logrotate ulogd || die "logrotate config failed"
+
+ dodoc README AUTHORS Changes
+ cd doc/
+ dodoc ulogd.txt ulogd.a4.ps
+
+ use mysql && dodoc mysql.table mysql.table.ipaddr-as-string
+ use postgres && dodoc pgsql.table
+ use sqlite && dodoc sqlite3.table
+
+ dohtml ulogd.html
+}
+
+pkg_postinst() {
+ chown root:ulogd /etc/ulogd.conf
+ chmod 640 /etc/ulogd.conf
+}