From 4a93f7c5f154e8af46b653e8a6fb1c8540b140a9 Mon Sep 17 00:00:00 2001 From: Aaron Walker Date: Fri, 11 Mar 2005 10:46:08 +0000 Subject: Version bump for bug 56640; cleaned up ebuilds, respect CFLAGS, respect FEATURES=nostrip. Also added static support via USE=static for 2.0.5. (Portage version: 2.0.51.19) --- net-analyzer/p0f/ChangeLog | 9 ++++++- net-analyzer/p0f/Manifest | 17 ++++--------- net-analyzer/p0f/files/digest-p0f-2.0.5 | 1 + net-analyzer/p0f/files/p0f.initd | 37 +++++++++++++++++++++++++++ net-analyzer/p0f/p0f-2.0.3.ebuild | 28 ++++++++++---------- net-analyzer/p0f/p0f-2.0.5.ebuild | 45 +++++++++++++++++++++++++++++++++ 6 files changed, 110 insertions(+), 27 deletions(-) create mode 100644 net-analyzer/p0f/files/digest-p0f-2.0.5 create mode 100755 net-analyzer/p0f/files/p0f.initd create mode 100644 net-analyzer/p0f/p0f-2.0.5.ebuild (limited to 'net-analyzer/p0f') diff --git a/net-analyzer/p0f/ChangeLog b/net-analyzer/p0f/ChangeLog index 1a59f76f0ad6..21f4161f2c7e 100644 --- a/net-analyzer/p0f/ChangeLog +++ b/net-analyzer/p0f/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-analyzer/p0f # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/p0f/ChangeLog,v 1.18 2005/01/29 05:12:51 dragonheart Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/p0f/ChangeLog,v 1.19 2005/03/11 10:46:08 ka0ttic Exp $ + +*p0f-2.0.5 (11 Mar 2005) + + 11 Mar 2005; Aaron Walker +files/p0f.initd, + p0f-2.0.3.ebuild, +p0f-2.0.5.ebuild: + Version bump for bug 56640; cleaned up ebuilds, respect CFLAGS, respect + FEATURES=nostrip. Also added static support via USE=static for 2.0.5. 29 Jan 2005; Daniel Black p0f-2.0.3.ebuild: changed net-libs/libpcap depend to virtual/libcap diff --git a/net-analyzer/p0f/Manifest b/net-analyzer/p0f/Manifest index 5274eba3e40d..8f5fe8df33ad 100644 --- a/net-analyzer/p0f/Manifest +++ b/net-analyzer/p0f/Manifest @@ -1,16 +1,9 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -MD5 c9c66fdffaeeae718a2379b7525e0437 ChangeLog 2009 -MD5 341f35b78971d65e839655b8adcf7721 p0f-2.0.3.ebuild 838 +MD5 0bbcfa1ac0608559f9c616e06199ce10 p0f-2.0.3.ebuild 927 +MD5 c05f51069b774767d19176d912f36aae p0f-2.0.5.ebuild 1148 +MD5 ba4650a14ce2fe59c1dcc44b2d8fb568 ChangeLog 2288 MD5 a6504b2ab3f5f778d46643a087162f71 metadata.xml 250 MD5 f184953061e4a88dad985e15eb2b4f22 files/p0f-1.8.2-makefile.patch 377 MD5 aec7b9a8cf64ab5785008f4f5fc64095 files/p0f-1.8.2.rc 1274 MD5 d68117a6108bcd2769ac8128cec37896 files/digest-p0f-2.0.3 58 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.0 (GNU/Linux) - -iD8DBQFB+xtamdTrptrqvGERAss2AKCHYp/APBOXMVZImzfDqy3/RK/CqgCfT+vO -Gikw1BudJ25FPI2C3hzOMgQ= -=jsUB ------END PGP SIGNATURE----- +MD5 393eeebe57dc144d2d5c60ccb33f96e6 files/digest-p0f-2.0.5 58 +MD5 aec7b9a8cf64ab5785008f4f5fc64095 files/p0f.initd 1274 diff --git a/net-analyzer/p0f/files/digest-p0f-2.0.5 b/net-analyzer/p0f/files/digest-p0f-2.0.5 new file mode 100644 index 000000000000..07d6ee7ea1cd --- /dev/null +++ b/net-analyzer/p0f/files/digest-p0f-2.0.5 @@ -0,0 +1 @@ +MD5 78235749e8ada6ad2b16b40fe15081f6 p0f-2.0.5.tgz 130002 diff --git a/net-analyzer/p0f/files/p0f.initd b/net-analyzer/p0f/files/p0f.initd new file mode 100755 index 000000000000..09d1ce333b3d --- /dev/null +++ b/net-analyzer/p0f/files/p0f.initd @@ -0,0 +1,37 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/p0f/files/p0f.initd,v 1.1 2005/03/11 10:46:08 ka0ttic Exp $ + +start() { + ebegin "Starting p0f" + # The 'tcp and tcp[13] & 2 = 2' requires at least syn set. + # An alternative would be 'tcp and tcp[13] & 0x3f = 2', which + # is syn and no other major flags (but ECN enabled packets are OK) + if [ -z "$BpfFilter" ]; then + BpfFilter='tcp and tcp[13] & 2 = 2' + else + BpfFilter="$BpfFilter and tcp and tcp[13] & 2 = 2" + fi + + # The command in backticks returns all the local IP addresses on this machine. + for OneIP in `/sbin/ifconfig 2>/dev/null | grep 'inet addr' | sed -e 's/.*addr://' -e 's/ .*//'` ; do + BpfFilter="$BpfFilter and not src host $OneIP" + done + + # Create a lock file. + mkdir -p /var/lock/subsys + touch /var/lock/subsys/p0f + + # Start up p0f and filter out all packets originating from any of this machines IP's. + einfo "Logfile: ${P0FLOGFILE}" + start-stop-daemon --start --quiet --exec /usr/sbin/p0f -- -v "$BpfFilter" >>"/var/log/p0f" 2>&1 & + eend ${?} +} + +stop() { + ebegin "Stopping p0f" + start-stop-daemon --stop --quiet --exec /usr/sbin/p0f + rm -f /var/lock/subsys/p0f + eend ${?} +} diff --git a/net-analyzer/p0f/p0f-2.0.3.ebuild b/net-analyzer/p0f/p0f-2.0.3.ebuild index 87f7e7593719..2c4a5612d6b9 100644 --- a/net-analyzer/p0f/p0f-2.0.3.ebuild +++ b/net-analyzer/p0f/p0f-2.0.3.ebuild @@ -1,36 +1,36 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/p0f/p0f-2.0.3.ebuild,v 1.11 2005/01/29 05:12:51 dragonheart Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/p0f/p0f-2.0.3.ebuild,v 1.12 2005/03/11 10:46:08 ka0ttic Exp $ inherit eutils DESCRIPTION="p0f performs passive OS detection based on SYN packets." -# the p0f.tgz always resembles the latest version, trashing the digest md5sum then, discovered and fixed by gustavoz -SRC_URI="http://lcamtuf.coredump.cx/p0f/${P}.tgz" HOMEPAGE="http://lcamtuf.coredump.cx/p0f.shtml" -SLOT="0" +SRC_URI="http://lcamtuf.coredump.cx/p0f/${P}.tgz" + LICENSE="LGPL-2.1" +SLOT="0" KEYWORDS="x86 ~amd64 sparc ppc-macos" IUSE="" -S=${WORKDIR}/${PN} - DEPEND="virtual/libpcap" -src_compile() { - sed -e 's;#include ;;' -i p0f.c +S="${WORKDIR}/${PN}" - make || die +src_unpack() { + unpack ${A} && cd ${S} + sed -i 's;#include ;;' p0f.c || die "sed p0f.c failed" + sed -i -e 's|^\(all: $(FILE)\).*$|\1|' \ + -e "s|^\(CFLAGS.*=\).*$|\1${CFLAGS}|" mk/* || die "sed makefiles failed" } src_install () { - dosbin p0f p0frep + dosbin p0f p0frep || die insinto /etc/p0f doins p0f.fp p0fa.fp p0fr.fp - doman p0f.1 - - dodoc README + doman p0f.1 || die + cd doc + dodoc ChangeLog CREDITS KNOWN_BUGS README TODO } - diff --git a/net-analyzer/p0f/p0f-2.0.5.ebuild b/net-analyzer/p0f/p0f-2.0.5.ebuild new file mode 100644 index 000000000000..e74db3285f0b --- /dev/null +++ b/net-analyzer/p0f/p0f-2.0.5.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/p0f/p0f-2.0.5.ebuild,v 1.1 2005/03/11 10:46:08 ka0ttic Exp $ + +inherit eutils + +DESCRIPTION="p0f performs passive OS detection based on SYN packets." +HOMEPAGE="http://lcamtuf.coredump.cx/p0f.shtml" +SRC_URI="http://lcamtuf.coredump.cx/p0f/${P}.tgz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~x86 ~amd64 ~sparc ~ppc-macos" +IUSE="static" + +DEPEND="virtual/libpcap" + +S="${WORKDIR}/${PN}" + +src_unpack() { + unpack ${A} && cd ${S} + sed -i 's;#include ;;' p0f.c || die "sed p0f.c failed" + sed -i -e 's|^\(all: $(FILE)\).*$|\1|' \ + -e "s|^\(CFLAGS.*=\).*$|\1${CFLAGS}|" mk/* || die "sed makefiles failed" +} + +src_compile() { + local static + use static && static="static" + emake ${static} || die "emake ${static} failed" +} + +src_install () { + use static && mv p0f-static p0f + dosbin p0f p0frep || die + + insinto /etc/p0f + doins p0f.fp p0fa.fp p0fr.fp + + doman p0f.1 || die + cd doc + dodoc ChangeLog CREDITS KNOWN_BUGS README TODO + + newinitd ${FILESDIR}/${PN}.initd ${PN} || die "newinitd failed" +} -- cgit v1.2.3-65-gdbad