diff options
author | Michael Sterrett <mr_bones_@gentoo.org> | 2009-12-22 03:54:39 +0000 |
---|---|---|
committer | Michael Sterrett <mr_bones_@gentoo.org> | 2009-12-22 03:54:39 +0000 |
commit | 445471815215ab9c737a9c9e0e0d96c5237a84c6 (patch) | |
tree | ecdb696b7edde7368316e8ba980a056928d5fc62 /app-admin/syslog-ng | |
parent | mask newest syslog-ng for testing (diff) | |
download | gentoo-2-445471815215ab9c737a9c9e0e0d96c5237a84c6.tar.gz gentoo-2-445471815215ab9c737a9c9e0e0d96c5237a84c6.tar.bz2 gentoo-2-445471815215ab9c737a9c9e0e0d96c5237a84c6.zip |
version bump; also addresses bug #293126
(Portage version: 2.1.6.13/cvs/Linux i686)
Diffstat (limited to 'app-admin/syslog-ng')
-rw-r--r-- | app-admin/syslog-ng/ChangeLog | 8 | ||||
-rw-r--r-- | app-admin/syslog-ng/files/syslog-ng.rc6.3.0-r1 | 59 | ||||
-rw-r--r-- | app-admin/syslog-ng/syslog-ng-3.0.5.ebuild | 105 |
3 files changed, 171 insertions, 1 deletions
diff --git a/app-admin/syslog-ng/ChangeLog b/app-admin/syslog-ng/ChangeLog index 9de06c832b7c..15dafca6c4d2 100644 --- a/app-admin/syslog-ng/ChangeLog +++ b/app-admin/syslog-ng/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-admin/syslog-ng # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/ChangeLog,v 1.224 2009/12/02 17:37:09 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/ChangeLog,v 1.225 2009/12/22 03:54:39 mr_bones_ Exp $ + +*syslog-ng-3.0.5 (22 Dec 2009) + + 22 Dec 2009; Michael Sterrett <mr_bones_@gentoo.org> + +syslog-ng-3.0.5.ebuild, +files/syslog-ng.rc6.3.0-r1: + version bump; also addresses bug #293126 02 Dec 2009; Raúl Porcel <armin76@gentoo.org> syslog-ng-3.0.4.ebuild: ia64/s390/sh/sparc stable wrt #289960 diff --git a/app-admin/syslog-ng/files/syslog-ng.rc6.3.0-r1 b/app-admin/syslog-ng/files/syslog-ng.rc6.3.0-r1 new file mode 100644 index 000000000000..a30ef250cb48 --- /dev/null +++ b/app-admin/syslog-ng/files/syslog-ng.rc6.3.0-r1 @@ -0,0 +1,59 @@ +#!/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.0-r1,v 1.1 2009/12/22 03:54:39 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 + + 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 --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.ebuild b/app-admin/syslog-ng/syslog-ng-3.0.5.ebuild new file mode 100644 index 000000000000..e43406467bf8 --- /dev/null +++ b/app-admin/syslog-ng/syslog-ng-3.0.5.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2009 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.ebuild,v 1.1 2009/12/22 03:54:39 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."* + dohtml doc/reference/syslog-ng.html/* + + # 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%.*}-r1" 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 +} |