diff options
author | Jeroen Roovers <jer@gentoo.org> | 2011-04-23 14:44:44 +0000 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2011-04-23 14:44:44 +0000 |
commit | 5b869a505788818dc5d06b24ebbe72e3bc02b4ff (patch) | |
tree | c69e97ee20ed61ccd625041f9220799cc95b99a8 /app-admin/sshguard | |
parent | This package was generated with too old xfce4-dev-tools and outcome of XDT_FE... (diff) | |
download | gentoo-2-5b869a505788818dc5d06b24ebbe72e3bc02b4ff.tar.gz gentoo-2-5b869a505788818dc5d06b24ebbe72e3bc02b4ff.tar.bz2 gentoo-2-5b869a505788818dc5d06b24ebbe72e3bc02b4ff.zip |
Version bump thanks to Johan Bergström and Roland Hopferwieser (bug #351665).
(Portage version: 2.2.0_alpha30/cvs/Linux i686)
Diffstat (limited to 'app-admin/sshguard')
-rw-r--r-- | app-admin/sshguard/ChangeLog | 11 | ||||
-rw-r--r-- | app-admin/sshguard/files/sshguard.confd | 14 | ||||
-rw-r--r-- | app-admin/sshguard/files/sshguard.initd | 30 | ||||
-rw-r--r-- | app-admin/sshguard/sshguard-1.5.ebuild | 49 |
4 files changed, 102 insertions, 2 deletions
diff --git a/app-admin/sshguard/ChangeLog b/app-admin/sshguard/ChangeLog index c975ca56a907..b27f4ce87055 100644 --- a/app-admin/sshguard/ChangeLog +++ b/app-admin/sshguard/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-admin/sshguard -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/sshguard/ChangeLog,v 1.11 2009/11/12 19:40:18 pva Exp $ +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/sshguard/ChangeLog,v 1.12 2011/04/23 14:44:44 jer Exp $ + +*sshguard-1.5 (23 Apr 2011) + + 23 Apr 2011; Jeroen Roovers <jer@gentoo.org> +sshguard-1.5.ebuild, + +files/sshguard.confd, +files/sshguard.initd: + Version bump thanks to Johan Bergström and Roland Hopferwieser (bug + #351665). *sshguard-1.4 (12 Nov 2009) diff --git a/app-admin/sshguard/files/sshguard.confd b/app-admin/sshguard/files/sshguard.confd new file mode 100644 index 000000000000..bfdd3fc135db --- /dev/null +++ b/app-admin/sshguard/files/sshguard.confd @@ -0,0 +1,14 @@ +# Config file for /etc/init.d/sshguard +# See SSHGUARD(8) for details. + +# Initial (empty) options. +SSHGUARD_OPTS="" + +# Files to monitor +# -l <source> +SSHGUARD_OPTS="${SSHGUARD_OPTS} -l /var/log/auth.log" + +# White listing +# -w <addr/host/block/file> +#SSHGUARD_OPTS="${SSHGUARD_OPTS} -w 192.168.0.0/24" + diff --git a/app-admin/sshguard/files/sshguard.initd b/app-admin/sshguard/files/sshguard.initd new file mode 100644 index 000000000000..1fa2e233b9e1 --- /dev/null +++ b/app-admin/sshguard/files/sshguard.initd @@ -0,0 +1,30 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/sshguard/files/sshguard.initd,v 1.1 2011/04/23 14:44:44 jer Exp $ + +: ${SSHGUARD_PIDFILE:='/var/run/sshguard.pid'} + +depend() { + after iptables + use logger +} + + +start() { + local LOGS= + for l in ${SSHGUARD_LOGFILES} ; do + LOGS="${LOGS} -l ${l}" + done + + ebegin "Starting sshguard" + start-stop-daemon --start --background --quiet --exec /usr/sbin/sshguard -- \ + -i ${SSHGUARD_PIDFILE} ${LOGS} + eend $? +} + +stop() { + ebegin "Stopping sshguard" + start-stop-daemon --stop -p ${SSHGUARD_PIDFILE} + eend $? +} diff --git a/app-admin/sshguard/sshguard-1.5.ebuild b/app-admin/sshguard/sshguard-1.5.ebuild new file mode 100644 index 000000000000..c8d81d88dc2a --- /dev/null +++ b/app-admin/sshguard/sshguard-1.5.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/sshguard/sshguard-1.5.ebuild,v 1.1 2011/04/23 14:44:44 jer Exp $ + +EAPI="2" + +inherit flag-o-matic + +DESCRIPTION="protects hosts from brute force attacks against ssh" +HOMEPAGE="http://sshguard.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~x86-fbsd" +IUSE="ipfilter kernel_FreeBSD kernel_linux" + +CDEPEND="kernel_linux? ( net-firewall/iptables ) + kernel_FreeBSD? ( !ipfilter? ( sys-freebsd/freebsd-pf ) )" +DEPEND="${CDEPEND} + sys-devel/flex" +RDEPEND="${CDEPEND} + virtual/logger" + +src_prepare() { + sed -i configure -e '/OPTIMIZER_CFLAGS=/d' || die +} + +src_configure() { + # Needed for usleep(3), see "nasty" in src/sshguard_logsuck.c + append-flags -D_BSD_SOURCE + + local myconf + if use kernel_linux; then + myconf="--with-firewall=iptables" + elif use kernel_FreeBSD; then + use ipfilter && myconf="--with-firewall=ipfw" \ + || myconf="--with-firewall=pf" + fi + + econf ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + newinitd "${FILESDIR}"/${PN}.initd ${PN} || die + newconfd "${FILESDIR}"/${PN}.confd ${PN} || die + dodoc README Changes scripts/sshguard_backendgen.sh examples/* || die +} |