diff options
author | Michael Sterrett <mr_bones_@gentoo.org> | 2010-04-06 02:11:35 +0000 |
---|---|---|
committer | Michael Sterrett <mr_bones_@gentoo.org> | 2010-04-06 02:11:35 +0000 |
commit | d83cc100f783d0bb74b5196afc8116b6cd5e2da9 (patch) | |
tree | d86cafc2713a3f01e24c2cbbce0421e4b4296ce6 /app-admin | |
parent | Version bump. Thanks to David Abbott and others in bug 301119 (diff) | |
download | gentoo-2-d83cc100f783d0bb74b5196afc8116b6cd5e2da9.tar.gz gentoo-2-d83cc100f783d0bb74b5196afc8116b6cd5e2da9.tar.bz2 gentoo-2-d83cc100f783d0bb74b5196afc8116b6cd5e2da9.zip |
syslog-ng 3.x version bump; updated files/ to be generic for 3.x
(Portage version: 2.1.7.17/cvs/Linux i686)
Diffstat (limited to 'app-admin')
-rw-r--r-- | app-admin/syslog-ng/ChangeLog | 10 | ||||
-rw-r--r-- | app-admin/syslog-ng/files/syslog-ng.conf.gentoo.3 | 32 | ||||
-rw-r--r-- | app-admin/syslog-ng/files/syslog-ng.conf.gentoo.fbsd.3 | 24 | ||||
-rw-r--r-- | app-admin/syslog-ng/files/syslog-ng.rc6.3 | 60 | ||||
-rw-r--r-- | app-admin/syslog-ng/syslog-ng-3.0.5-r1.ebuild | 10 | ||||
-rw-r--r-- | app-admin/syslog-ng/syslog-ng-3.1.0.ebuild | 104 |
6 files changed, 234 insertions, 6 deletions
diff --git a/app-admin/syslog-ng/ChangeLog b/app-admin/syslog-ng/ChangeLog index 3cfaa358839f..29465740b55a 100644 --- a/app-admin/syslog-ng/ChangeLog +++ b/app-admin/syslog-ng/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for app-admin/syslog-ng # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/ChangeLog,v 1.228 2010/04/05 23:22:55 zorry Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/ChangeLog,v 1.229 2010/04/06 02:11:35 mr_bones_ Exp $ + +*syslog-ng-3.1.0 (06 Apr 2010) + + 06 Apr 2010; Michael Sterrett <mr_bones_@gentoo.org> + syslog-ng-3.0.5-r1.ebuild, +syslog-ng-3.1.0.ebuild, + +files/syslog-ng.conf.gentoo.3, +files/syslog-ng.conf.gentoo.fbsd.3, + +files/syslog-ng.rc6.3: + syslog-ng 3.x version bump; updated files/ to be generic for 3.x 06 Apr 2010; Magnus Granberg <zorry@gentoo.org> +syslog-ng-3.0.5-r1 syslog-ng.conf.gentoo.hardened diff --git a/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.3 b/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.3 new file mode 100644 index 000000000000..8cc5ff49963f --- /dev/null +++ b/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.3 @@ -0,0 +1,32 @@ +@version: 3.0 +# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.3,v 1.1 2010/04/06 02:11:35 mr_bones_ Exp $ +# +# Syslog-ng default configuration file for Gentoo Linux + +options { + chain_hostnames(no); + + # The default action of syslog-ng is to log a STATS line + # to the file every 10 minutes. That's pretty ugly after a while. + # Change it to every 12 hours so you get a nice daily update of + # how many messages syslog-ng missed (0). + stats_freq(43200); +}; + +source src { + unix-stream("/dev/log" max-connections(256)); + internal(); + file("/proc/kmsg"); +}; + +destination messages { file("/var/log/messages"); }; + +# By default messages are logged to tty12... +destination console_all { file("/dev/tty12"); }; +# ...if you intend to use /dev/console for programs like xconsole +# you can comment out the destination line above that references /dev/tty12 +# and uncomment the line below. +#destination console_all { file("/dev/console"); }; + +log { source(src); destination(messages); }; +log { source(src); destination(console_all); }; diff --git a/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.fbsd.3 b/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.fbsd.3 new file mode 100644 index 000000000000..0f708c149cee --- /dev/null +++ b/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.fbsd.3 @@ -0,0 +1,24 @@ +@version: 3.0 +# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.fbsd.3,v 1.1 2010/04/06 02:11:35 mr_bones_ Exp $ +# +# Syslog-ng default configuration file for Gentoo FreeBSD +# +options { + chain_hostnames(no); + + # The default action of syslog-ng is to log a STATS line + # to the file every 10 minutes. That's pretty ugly after a while. + # Change it to every 12 hours so you get a nice daily update of + # how many messages syslog-ng missed (0). + stats_freq(43200); +}; + +source src { + unix-dgram("/var/run/log"); + internal(); + file("/dev/klog"); +}; + +destination messages { file("/var/log/messages"); }; + +log { source(src); destination(messages); }; diff --git a/app-admin/syslog-ng/files/syslog-ng.rc6.3 b/app-admin/syslog-ng/files/syslog-ng.rc6.3 new file mode 100644 index 000000000000..7bd8120e469d --- /dev/null +++ b/app-admin/syslog-ng/files/syslog-ng.rc6.3 @@ -0,0 +1,60 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.rc6.3,v 1.1 2010/04/06 02:11:35 mr_bones_ Exp $ + +opts="checkconfig reload" + +depend() { + # Make networking dependency conditional on configuration + case $(sed 's/#.*//' /etc/syslog-ng/syslog-ng.conf) in + *source*tcp*|*source*udp*|*destination*tcp*|*destination*udp*) + need net + use stunnel ;; + esac + + config /etc/syslog-ng/syslog-ng.conf + use clock + need hostname localmount + provide logger +} + +checkconfig() { + if [ ! -e /etc/syslog-ng/syslog-ng.conf ] ; then + eerror "You need to create /etc/syslog-ng/syslog-ng.conf first." + eerror "An example can be found in /etc/syslog-ng/syslog-ng.conf.sample" + return 1 + fi + syslog-ng -s -f /etc/syslog-ng/syslog-ng.conf + + # the start and reload functions have their own eends so + # avoid calling this twice when there are no problems + [ $? -eq 0 ] || eend $? "Configuration error. Please fix your configfile (/etc/syslog-ng/syslog-ng.conf)" +} + +start() { + checkconfig || return 1 + ebegin "Starting syslog-ng" + [ -n "${SYSLOG_NG_OPTS}" ] && SYSLOG_NG_OPTS="-- ${SYSLOG_NG_OPTS}" + start-stop-daemon --start --pidfile /var/run/syslog-ng.pid --exec /usr/sbin/syslog-ng ${SYSLOG_NG_OPTS} + eend $? "Failed to start syslog-ng" +} + +stop() { + ebegin "Stopping syslog-ng" + start-stop-daemon --stop --pidfile /var/run/syslog-ng.pid + eend $? "Failed to stop syslog-ng" + sleep 1 # needed for syslog-ng to stop in case we're restarting +} + +reload() { + if [ ! -f /var/run/syslog-ng.pid ]; then + eerror "syslog-ng isn't running" + return 1 + fi + checkconfig || return 1 + ebegin "Reloading configuration and re-opening log files" + start-stop-daemon --stop --oknodo --signal HUP \ + --pidfile /var/run/syslog-ng.pid + eend $? +} diff --git a/app-admin/syslog-ng/syslog-ng-3.0.5-r1.ebuild b/app-admin/syslog-ng/syslog-ng-3.0.5-r1.ebuild index 64939c490ef3..6a24ed30bdba 100644 --- a/app-admin/syslog-ng/syslog-ng-3.0.5-r1.ebuild +++ b/app-admin/syslog-ng/syslog-ng-3.0.5-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/syslog-ng-3.0.5-r1.ebuild,v 1.1 2010/04/05 22:19:33 zorry Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/syslog-ng-3.0.5-r1.ebuild,v 1.2 2010/04/06 02:11:35 mr_bones_ Exp $ EAPI=2 inherit fixheadtails eutils @@ -76,11 +76,11 @@ src_install() { # Install default configuration insinto /etc/syslog-ng if use hardened || use selinux ; then - newins "${FILESDIR}/syslog-ng.conf.gentoo.hardened.${PV%.*}" syslog-ng.conf + newins "${FILESDIR}/syslog-ng.conf.gentoo.hardened.${PV%%.*}" syslog-ng.conf elif use userland_BSD ; then - newins "${FILESDIR}/syslog-ng.conf.gentoo.fbsd.${PV%.*}" syslog-ng.conf + newins "${FILESDIR}/syslog-ng.conf.gentoo.fbsd.${PV%%.*}" syslog-ng.conf else - newins "${FILESDIR}/syslog-ng.conf.gentoo.${PV%.*}" syslog-ng.conf + newins "${FILESDIR}/syslog-ng.conf.gentoo.${PV%%.*}" syslog-ng.conf fi insinto /etc/logrotate.d @@ -91,7 +91,7 @@ src_install() { newins "${FILESDIR}/syslog-ng.logrotate" syslog-ng fi - newinitd "${FILESDIR}/syslog-ng.rc6.${PV%.*}-r1" syslog-ng + newinitd "${FILESDIR}/syslog-ng.rc6.${PV%%.*}" syslog-ng newconfd "${FILESDIR}/syslog-ng.confd" syslog-ng } diff --git a/app-admin/syslog-ng/syslog-ng-3.1.0.ebuild b/app-admin/syslog-ng/syslog-ng-3.1.0.ebuild new file mode 100644 index 000000000000..c5a46f162a9f --- /dev/null +++ b/app-admin/syslog-ng/syslog-ng-3.1.0.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/syslog-ng-3.1.0.ebuild,v 1.1 2010/04/06 02:11:35 mr_bones_ Exp $ + +EAPI=2 +inherit fixheadtails eutils + +MY_PV=${PV/_/} +DESCRIPTION="syslog replacement with advanced filtering features" +HOMEPAGE="http://www.balabit.com/products/syslog_ng/" +SRC_URI="http://www.balabit.com/downloads/files/syslog-ng/sources/${PV}/source/syslog-ng_${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="caps hardened ipv6 pcre selinux spoof-source sql ssl static tcpd" +RESTRICT="test" + +LIBS_DEPEND=" + spoof-source? ( net-libs/libnet ) + ssl? ( dev-libs/openssl ) + tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) + >=dev-libs/eventlog-0.2 + >=dev-libs/glib-2.10.1:2 + caps? ( sys-libs/libcap ) + sql? ( >=dev-db/libdbi-0.8.3 )" +RDEPEND=" + !static? ( + pcre? ( dev-libs/libpcre ) + ${LIBS_DEPEND} + )" +DEPEND="${RDEPEND} + ${LIBS_DEPEND} + dev-util/pkgconfig + sys-devel/flex" +PROVIDE="virtual/logger" + +src_prepare() { + ht_fix_file configure +} + +src_configure() { + local myconf + + if use static ; then + myconf="${myconf} --enable-static-linking" + if use pcre ; then + ewarn "USE=pcre is incompatible with static linking" + myconf="${myconf} --disable-pcre" + fi + else + myconf="${myconf} --enable-dynamic-linking" + fi + econf \ + --disable-dependency-tracking \ + --sysconfdir=/etc/syslog-ng \ + --with-pidfile-dir=/var/run \ + $(use_enable caps linux-caps) \ + $(use_enable ipv6) \ + $(use_enable pcre) \ + $(use_enable spoof-source) \ + $(use_enable sql) \ + $(use_enable ssl) \ + $(use_enable tcpd tcp-wrapper) \ + ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + + dodoc AUTHORS ChangeLog NEWS README \ + doc/examples/{syslog-ng.conf.sample,syslog-ng.conf.solaris} \ + contrib/syslog-ng.conf* \ + contrib/syslog2ng "${FILESDIR}/syslog-ng.conf."* + + # Install default configuration + insinto /etc/syslog-ng + if use hardened || use selinux ; then + newins "${FILESDIR}/syslog-ng.conf.gentoo.hardened.${PV%%.*}" syslog-ng.conf + elif use userland_BSD ; then + newins "${FILESDIR}/syslog-ng.conf.gentoo.fbsd.${PV%%.*}" syslog-ng.conf + else + newins "${FILESDIR}/syslog-ng.conf.gentoo.${PV%%.*}" syslog-ng.conf + fi + + insinto /etc/logrotate.d + # Install snippet for logrotate, which may or may not be installed + if use hardened || use selinux ; then + newins "${FILESDIR}/syslog-ng.logrotate.hardened" syslog-ng + else + newins "${FILESDIR}/syslog-ng.logrotate" syslog-ng + fi + + newinitd "${FILESDIR}/syslog-ng.rc6.${PV%%.*}" syslog-ng + newconfd "${FILESDIR}/syslog-ng.confd" syslog-ng +} + +pkg_postinst() { + echo + elog "It is highly recommended that app-admin/logrotate be emerged to" + elog "manage the log files. ${PN} installs a file in /etc/logrotate.d" + elog "for logrotate to use." + echo +} |