diff options
author | Jeroen Roovers <jer@gentoo.org> | 2012-11-21 06:42:19 +0000 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2012-11-21 06:42:19 +0000 |
commit | 7de477a12a03fe988f1d234f38ab5431fe71488b (patch) | |
tree | c7552df84dc308e0720b33198745559e9aaf68e5 /net-firewall | |
parent | Stable for SPARC (bug #441420). (diff) | |
download | gentoo-2-7de477a12a03fe988f1d234f38ab5431fe71488b.tar.gz gentoo-2-7de477a12a03fe988f1d234f38ab5431fe71488b.tar.bz2 gentoo-2-7de477a12a03fe988f1d234f38ab5431fe71488b.zip |
Make netmon maintainer. Version bump (bug #439562). Respect CC, CFLAGS, LDFLAGS (bug #442486). Do not "fix" psad.conf (also fixes bug #349203). Do not ewarn/einfo/e.. users about configuration issues (RTFM). Add some more dependencies. Introduce some sanity in the build system (bug #340877 and a lot more). Replace keepdir /var/run using checkpath.
(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key A792A613)
Diffstat (limited to 'net-firewall')
-rw-r--r-- | net-firewall/psad/ChangeLog | 12 | ||||
-rw-r--r-- | net-firewall/psad/files/psad-2.2-var-run.patch | 10 | ||||
-rw-r--r-- | net-firewall/psad/metadata.xml | 6 | ||||
-rw-r--r-- | net-firewall/psad/psad-2.2.ebuild | 103 |
4 files changed, 125 insertions, 6 deletions
diff --git a/net-firewall/psad/ChangeLog b/net-firewall/psad/ChangeLog index 3239f6e2df62..d5f31e8e1a2e 100644 --- a/net-firewall/psad/ChangeLog +++ b/net-firewall/psad/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for net-firewall/psad # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-firewall/psad/ChangeLog,v 1.57 2012/11/11 15:00:31 blueness Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-firewall/psad/ChangeLog,v 1.58 2012/11/21 06:42:19 jer Exp $ + +*psad-2.2 (21 Nov 2012) + + 21 Nov 2012; Jeroen Roovers <jer@gentoo.org> +psad-2.2.ebuild, + +files/psad-2.2-var-run.patch, metadata.xml: + Make netmon maintainer. Version bump (bug #439562). Respect CC, CFLAGS, + LDFLAGS (bug #442486). Do not "fix" psad.conf (also fixes bug #349203). Do + not ewarn/einfo/e.. users about configuration issues (RTFM). Add some more + dependencies. Introduce some sanity in the build system (bug #340877 and a + lot more). Replace keepdir /var/run using checkpath. 11 Nov 2012; Anthony G. Basile <blueness@gentoo.org> metadata.xml: Dropping to maintainer-needed, not sure why it belonged to hardened diff --git a/net-firewall/psad/files/psad-2.2-var-run.patch b/net-firewall/psad/files/psad-2.2-var-run.patch new file mode 100644 index 000000000000..7760b9ea45d4 --- /dev/null +++ b/net-firewall/psad/files/psad-2.2-var-run.patch @@ -0,0 +1,10 @@ +--- a/init-scripts/psad-init.gentoo ++++ b/init-scripts/psad-init.gentoo +@@ -19,6 +19,7 @@ + + start() { + checkconfig || return 1 ++ checkpath -q -d -m 755 -o root:root /var/run/psad + + ebegin "Starting ${SVCNAME}" + start-stop-daemon \ diff --git a/net-firewall/psad/metadata.xml b/net-firewall/psad/metadata.xml index 06a1848be2ad..03aa50bab7e3 100644 --- a/net-firewall/psad/metadata.xml +++ b/net-firewall/psad/metadata.xml @@ -1,9 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer> - <email>maintainer-needed@gentoo.org</email> - <description>This package lacks a primary herd or maintainer.</description> - </maintainer> - <longdescription>PSAD provides port scanning attack detection and protection.</longdescription> +<herd>netmon</herd> </pkgmetadata> diff --git a/net-firewall/psad/psad-2.2.ebuild b/net-firewall/psad/psad-2.2.ebuild new file mode 100644 index 000000000000..31521185e094 --- /dev/null +++ b/net-firewall/psad/psad-2.2.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-firewall/psad/psad-2.2.ebuild,v 1.1 2012/11/21 06:42:19 jer Exp $ + +EAPI=4 +#PERL_EXPORT_PHASE_FUNCTIONS=no +inherit eutils perl-module toolchain-funcs + +DESCRIPTION="Port Scanning Attack Detection daemon" +SRC_URI="http://www.cipherdyne.org/psad/download/${P}.tar.bz2" +HOMEPAGE="http://www.cipherdyne.org/psad" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86" +IUSE="" + +DEPEND="virtual/perl-ExtUtils-MakeMaker" +RDEPEND=" + dev-perl/Bit-Vector + dev-perl/Date-Calc + dev-perl/NetAddr-IP + dev-perl/Unix-Syslog + net-firewall/iptables + net-misc/whois + virtual/logger + virtual/mailx + virtual/perl-Storable +" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-2.2-var-run.patch + + sed -i \ + -e 's|/usr/bin/gcc|$(CC)|g' \ + -e 's|-O|$(CFLAGS) $(LDFLAGS)|g' \ + Makefile || die + # Fix up default paths + sed -i \ + -e "s:/sbin/syslog-ng:/usr/sbin/syslog-ng:g" \ + -e "s:/sbin/syslogd:/usr/sbin/syslogd:g" \ + -e "s:/usr/bin/whois_psad:/usr/bin/whois:g" \ + psad.conf || die +} + +src_configure() { + default + + local deps_subdir + for deps_subdir in IPTables-Parse IPTables-ChainMgr; do + cd "${S}"/deps/${deps_subdir} || die + SRC_PREP="no" perl-module_src_configure + done +} + +src_compile() { + tc-export CC + default + + local deps_subdir + for deps_subdir in IPTables-Parse IPTables-ChainMgr; do + cd "${S}"/deps/${deps_subdir} || die + perl-module_src_compile + done +} + +src_install() { + newbin pscan psad-pscan + + insinto /usr + dosbin kmsgsd psad psadwatchd + newsbin fwcheck_psad.pl fwcheck_psad + + insinto /etc/psad + doins *.conf auto_dl icmp_types ip_options psad_* pf.os posf signatures + + newinitd init-scripts/psad-init.gentoo psad + + doman *.8 + + dodoc BENCHMARK CREDITS Change* FW_EXAMPLE_RULES README SCAN_LOG + + keepdir /var/lib/${PN} /var/log/${PN} + + dodir /etc/psad/snort_rules + insinto /etc/psad/snort_rules + doins deps/snort_rules/* + + local deps_subdir + for deps_subdir in IPTables-Parse IPTables-ChainMgr; do + cd "${S}"/deps/${deps_subdir} || die + perl-module_src_install + done +} + +pkg_postinst() { + if [ ! -p "${ROOT}"/var/lib/psad/psadfifo ] + then + ebegin "Creating syslog FIFO for PSAD" + mknod -m 600 "${ROOT}"/var/lib/psad/psadfifo p + eend $? + fi +} |