summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Vershilov <qnikst@gentoo.org>2012-12-25 20:01:33 +0000
committerAlexander Vershilov <qnikst@gentoo.org>2012-12-25 20:01:33 +0000
commitd41029a6d41e4c7796b79116dd0c7f90db90158b (patch)
treeb7d0370f0ba9e75348a25ecc2e07c1ec586e17ea /app-admin
parentCosmetic fixes reported by repoman. (diff)
downloadgentoo-2-d41029a6d41e4c7796b79116dd0c7f90db90158b.tar.gz
gentoo-2-d41029a6d41e4c7796b79116dd0c7f90db90158b.tar.bz2
gentoo-2-d41029a6d41e4c7796b79116dd0c7f90db90158b.zip
fix /var/run problem and init script #445694, thanks to flameeyes
(Portage version: 2.2.0_alpha149/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/sagan/ChangeLog8
-rw-r--r--app-admin/sagan/files/sagan.init24
-rw-r--r--app-admin/sagan/sagan-0.2.2_p2-r2.ebuild86
3 files changed, 102 insertions, 16 deletions
diff --git a/app-admin/sagan/ChangeLog b/app-admin/sagan/ChangeLog
index 6026fc87a8f7..cf2f748fdefa 100644
--- a/app-admin/sagan/ChangeLog
+++ b/app-admin/sagan/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for app-admin/sagan
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/sagan/ChangeLog,v 1.16 2012/11/20 20:41:17 ago Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/sagan/ChangeLog,v 1.17 2012/12/25 20:01:33 qnikst Exp $
+
+*sagan-0.2.2_p2-r2 (25 Dec 2012)
+
+ 25 Dec 2012; <qnikst@gentoo.org> +sagan-0.2.2_p2-r2.ebuild, files/sagan.init:
+ fix /var/run problem and init script #445694, thanks to flameeyes
20 Nov 2012; Agostino Sarubbo <ago@gentoo.org> sagan-0.2.1-r2.ebuild:
Stable for x86, wrt bug #441048
@@ -74,4 +79,3 @@
31 Aug 2011; Maxim Koltsov <maksbotan@gentoo.org> +sagan-0.2.0.ebuild,
+files/sagan.confd, +files/sagan.init, +metadata.xml:
Copy app-admin/sagan from rion-overlay, thanks to slepnoga. Bug 341461
-
diff --git a/app-admin/sagan/files/sagan.init b/app-admin/sagan/files/sagan.init
index 7f497d649814..62e973fd18c1 100644
--- a/app-admin/sagan/files/sagan.init
+++ b/app-admin/sagan/files/sagan.init
@@ -1,22 +1,18 @@
#!/sbin/runscript
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/sagan/files/sagan.init,v 1.1 2011/08/31 08:36:54 maksbotan Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/sagan/files/sagan.init,v 1.2 2012/12/25 20:01:33 qnikst Exp $
+pidfile="/var/run/sagan/sagan.pid"
+command="/usr/bin/sagan"
+command_args="-D \"${SAGAN_OPTS}\" -u \"${SAGAN_USER}\""
depend() {
- use logger mysql postgresql net
- need localmount
+ use logger mysql postgresql
+ need localmount
}
-start() {
- ebegin "Starting sagan"
- start-stop-daemon --start --pidfile /var/run/sagan/sagan.pid /usr/bin/sagan -- -D "${SAGAN_OPTS}" -u "${SAGAN_USER}"
- eend $?
-}
-
-stop() {
- ebegin " Stopping sagan"
- start-stop-daemon --stop --quiet --pidfile /var/run/sagan/sagan.pid
- eend $?
+start_pre() {
+ checkpath -d -o sagan /var/run/sagan
+ checkpath -p -o sagan -m 0644 /var/run/sagan/sagan.fifo
}
diff --git a/app-admin/sagan/sagan-0.2.2_p2-r2.ebuild b/app-admin/sagan/sagan-0.2.2_p2-r2.ebuild
new file mode 100644
index 000000000000..0f9ff00249a7
--- /dev/null
+++ b/app-admin/sagan/sagan-0.2.2_p2-r2.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/sagan/sagan-0.2.2_p2-r2.ebuild,v 1.1 2012/12/25 20:01:33 qnikst Exp $
+
+EAPI=4
+
+MY_PV="0.2.2-r2"
+inherit eutils autotools-utils user
+
+DESCRIPTION="Sagan is a multi-threaded, real time system and event log monitoring system"
+HOMEPAGE="http://sagan.softwink.com/"
+SRC_URI="http://sagan.softwink.com/download/${PN}-${MY_PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="smtp mysql postgres prelude snort +lognorm +libdnet +pcap"
+
+DEPEND="virtual/pkgconfig
+ ${RDEPEND}"
+
+RDEPEND="dev-libs/libpcre
+ app-admin/sagan-rules[lognorm?]
+ smtp? ( net-libs/libesmtp )
+ pcap? ( net-libs/libpcap )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql-base )
+ prelude? ( dev-libs/libprelude )
+ lognorm? ( dev-libs/liblognorm )
+ libdnet? ( dev-libs/libdnet )
+ snort? ( >=net-analyzer/snortsam-2.50 )
+ "
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+DOCS=(AUTHORS ChangeLog FAQ INSTALL README NEWS TODO)
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+pkg_setup() {
+ enewgroup sagan
+ enewuser sagan -1 -1 /dev/null sagan
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable mysql)
+ $(use_enable postgres postgresql)
+ $(use_enable smtp esmtp)
+ $(use_enable prelude )
+ $(use_enable lognorm)
+ $(use_enable libdnet)
+ $(use_enable pcap libpcap)
+ $(use_enable snort snortsam)
+ )
+
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ diropts -g sagan -o sagan -m 775
+
+ dodir /var/log/sagan
+
+ keepdir /var/log/sagan
+
+ touch "${ED}"/var/log/sagan/sagan.log
+ chown sagan.sagan "${ED}"/var/log/sagan/sagan.log
+
+ newinitd "${FILESDIR}"/sagan.init sagan
+ newconfd "${FILESDIR}"/sagan.confd sagan
+
+ insinto /usr/share/doc/${PF}/examples
+ doins -r extra/*
+}
+
+pkg_postinst() {
+ if use smtp; then
+ ewarn "You have enabled smtp use flag. If you plan on using Sagan with"
+ ewarn "email, create valid writable home directory for user 'sagan'"
+ ewarn "For security reasons it was created with /dev/null home directory"
+ fi
+
+ einfo "For configuration assistance see"
+ einfo "http://wiki.quadrantsec.com/bin/view/Main/SaganHOWTO"
+}