diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-analyzer/dhcp_probe | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-analyzer/dhcp_probe')
-rw-r--r-- | net-analyzer/dhcp_probe/Manifest | 1 | ||||
-rw-r--r-- | net-analyzer/dhcp_probe/dhcp_probe-1.3.0-r3.ebuild | 47 | ||||
-rw-r--r-- | net-analyzer/dhcp_probe/files/1.3.0/01_dhcp_probe.5.patch | 47 | ||||
-rw-r--r-- | net-analyzer/dhcp_probe/files/1.3.0/02_dhcp_probe.8.patch | 35 | ||||
-rw-r--r-- | net-analyzer/dhcp_probe/files/1.3.0/03_implicit_point_conv_bootp.c.patch | 21 | ||||
-rw-r--r-- | net-analyzer/dhcp_probe/files/1.3.0/04_linux_32_or_64bits.patch | 33 | ||||
-rw-r--r-- | net-analyzer/dhcp_probe/files/1.3.0/05-cleanup.patch | 29 | ||||
-rw-r--r-- | net-analyzer/dhcp_probe/files/1.3.0/06-return.patch | 11 | ||||
-rw-r--r-- | net-analyzer/dhcp_probe/files/1.3.0/07-comment.patch | 11 | ||||
-rw-r--r-- | net-analyzer/dhcp_probe/files/1.3.0/08-man8.patch | 20 | ||||
-rw-r--r-- | net-analyzer/dhcp_probe/files/dhcp_probe.confd | 10 | ||||
-rw-r--r-- | net-analyzer/dhcp_probe/files/dhcp_probe.initd | 48 | ||||
-rw-r--r-- | net-analyzer/dhcp_probe/files/dhcp_probe_mail | 23 | ||||
-rw-r--r-- | net-analyzer/dhcp_probe/metadata.xml | 13 |
14 files changed, 349 insertions, 0 deletions
diff --git a/net-analyzer/dhcp_probe/Manifest b/net-analyzer/dhcp_probe/Manifest new file mode 100644 index 000000000000..ff4980482ee1 --- /dev/null +++ b/net-analyzer/dhcp_probe/Manifest @@ -0,0 +1 @@ +DIST dhcp_probe-1.3.0.tar.gz 211613 RMD160 fb988165ced12e5baf95ffe030b72999b52d2624 SHA1 c25796bbf70ecffd285ce40ec8bb9956e4654ad1 SHA256 227cd6a82a7fa4d989994cb076f18092bc2c82592ceaeb31c4fdd09294b9265f diff --git a/net-analyzer/dhcp_probe/dhcp_probe-1.3.0-r3.ebuild b/net-analyzer/dhcp_probe/dhcp_probe-1.3.0-r3.ebuild new file mode 100644 index 000000000000..0aa037d03e46 --- /dev/null +++ b/net-analyzer/dhcp_probe/dhcp_probe-1.3.0-r3.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="2" + +inherit eutils flag-o-matic + +DESCRIPTION="dhcp_probe attempts to discover DHCP and BootP servers on a directly-attached Ethernet network" +HOMEPAGE="http://www.net.princeton.edu/software/dhcp_probe/" +SRC_URI="http://www.net.princeton.edu/software/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="" + +DEPEND=" + net-libs/libpcap + >=net-libs/libnet-1.1.2.1-r2 + " +RDEPEND="${DEPEND}" + +src_prepare() { + epatch "${FILESDIR}"/${PV}/*.patch +} + +src_configure() { + use amd64 && append-flags -D__ARCH__=64 + STRIP=true econf || die "econf failed" +} + +src_install() { + emake install DESTDIR="${D}" + + newinitd "${FILESDIR}/${PN}.initd" ${PN} + newconfd "${FILESDIR}/${PN}.confd" ${PN} + + dodoc \ + extras/dhcp_probe.cf.sample \ + NEWS \ + README \ + ChangeLog \ + AUTHORS \ + TODO \ + || die "dodoc failed" +} diff --git a/net-analyzer/dhcp_probe/files/1.3.0/01_dhcp_probe.5.patch b/net-analyzer/dhcp_probe/files/1.3.0/01_dhcp_probe.5.patch new file mode 100644 index 000000000000..2d5599c06224 --- /dev/null +++ b/net-analyzer/dhcp_probe/files/1.3.0/01_dhcp_probe.5.patch @@ -0,0 +1,47 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01_dhcp_probe.5.dpatch by Laurent Guignard <lguignard.debian@gmail.com> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Change a syntax problem in groff file for hyphenation problem +## Note: +## Submitted to upstream programmer Irwin Tillman<irwin@princeton.edu>. +## This patch will be applied in the next version of the upstream code. + + +@DPATCH@ +diff -urNad trunk~/doc/dhcp_probe.cf.5 trunk/doc/dhcp_probe.cf.5 +--- trunk~/doc/dhcp_probe.cf.5 2009-03-30 14:53:40.000000000 +0200 ++++ trunk/doc/dhcp_probe.cf.5 2009-03-30 14:57:05.000000000 +0200 +@@ -472,10 +472,10 @@ + .PP + .RS + .nf +--p the name of the calling program (e.g. dhcp_probe), +--I the name of the interface on which the unexpected response packet was received +--i the IP source address of the packet +--m Ethernet source address of the packet ++\-p the name of the calling program (e.g. dhcp_probe), ++\-I the name of the interface on which the unexpected response packet was received ++\-i the IP source address of the packet ++\-m Ethernet source address of the packet + .fi + .RE + .PP +@@ -483,7 +483,7 @@ + .PP + .RS + .nf +--y the non-zero yiaddr value from the packet, when it falls inside a "Lease Network of Concern" ++\-y the non-zero yiaddr value from the packet, when it falls inside a "Lease Network of Concern" + .fi + .RE + .PP +@@ -723,7 +723,7 @@ + # alert_program_name2 /absolute/path/name + # + # The program specified via 'alert_program_name2' will be called as follows: +-# /absolute/path/name -p name_of_calling_program -I name_of_interface_on_which_the_response_was_received -i IP_source_of_the_response -m ether_src_of_the_response [-y yiaddr_when_in_lease_networks_of_concern] ++# /absolute/path/name \-p name_of_calling_program \-I name_of_interface_on_which_the_response_was_received \-i IP_source_of_the_response \-m ether_src_of_the_response [\-y yiaddr_when_in_lease_networks_of_concern] + # The options may appear in any order. + # The program must silently ignore any options or arguments it does not recognize, + # so as to be forward-compatible with future enhancements to dhcp_probe. diff --git a/net-analyzer/dhcp_probe/files/1.3.0/02_dhcp_probe.8.patch b/net-analyzer/dhcp_probe/files/1.3.0/02_dhcp_probe.8.patch new file mode 100644 index 000000000000..d9d3d5aa898a --- /dev/null +++ b/net-analyzer/dhcp_probe/files/1.3.0/02_dhcp_probe.8.patch @@ -0,0 +1,35 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02_dhcp_probe.8.dpatch by Laurent Guignard <lguignard.debian@gmail.com> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Change a syntax problem in groff file for hyphenation problem +## Note: +## Submitted to upstream programmer Irwin Tillman<irwin@princeton.edu>. +## This patch will be applied in the next version of the upstream code. + + +@DPATCH@ +diff -urNad trunk~/doc/dhcp_probe.8 trunk/doc/dhcp_probe.8 +--- trunk~/doc/dhcp_probe.8 2009-03-30 14:53:40.000000000 +0200 ++++ trunk/doc/dhcp_probe.8 2009-03-30 15:18:09.000000000 +0200 +@@ -380,15 +380,15 @@ + file, + that program is executed, with the following required options: + .nf +- -p the name of the calling program (e.g. dhcp_probe) +- -I the name of the interface on which the unexpected response packet was received +- -i the IP source address of the packet +- -m and the Ethernet source address of the packet ++ \-p the name of the calling program (e.g. dhcp_probe) ++ \-I the name of the interface on which the unexpected response packet was received ++ \-i the IP source address of the packet ++ \-m and the Ethernet source address of the packet + .fi + If the response packet's yiaddr is non-zero and falls within a "Lease Networks of Concern", + the following optional options are also passed: + .nf +- -y the non-zero yiaddr value ++ \-y the non-zero yiaddr value + .fi + (We do not wait for the + .I alert_program_name2 diff --git a/net-analyzer/dhcp_probe/files/1.3.0/03_implicit_point_conv_bootp.c.patch b/net-analyzer/dhcp_probe/files/1.3.0/03_implicit_point_conv_bootp.c.patch new file mode 100644 index 000000000000..41af750416bf --- /dev/null +++ b/net-analyzer/dhcp_probe/files/1.3.0/03_implicit_point_conv_bootp.c.patch @@ -0,0 +1,21 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 03_implicit_point_conv_bootp.c.dpatch by Laurent Guignard <lguignard.debian@gmail.com> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix implicit Pointer Converstion in bootp.c file. +## Fix bug #529635 discovered by Dann Frazier <dannf@debian.org> +## + +@DPATCH@ +diff -urNad trunk~/src/bootp.c trunk/src/bootp.c +--- trunk~/src/bootp.c 2009-03-31 14:19:06.000000000 +0200 ++++ trunk/src/bootp.c 2009-05-21 09:51:26.000000000 +0200 +@@ -11,7 +11,7 @@ + #include "bootp.h" + #include "configfile.h" + #include "report.h" +- ++#include "utils.h" + + + diff --git a/net-analyzer/dhcp_probe/files/1.3.0/04_linux_32_or_64bits.patch b/net-analyzer/dhcp_probe/files/1.3.0/04_linux_32_or_64bits.patch new file mode 100644 index 000000000000..dcd79ffc58b2 --- /dev/null +++ b/net-analyzer/dhcp_probe/files/1.3.0/04_linux_32_or_64bits.patch @@ -0,0 +1,33 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 04_linux_32_or_64bits.dpatch by Laurent Guignard <lguignard.debian@gmail.com> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: A solution to solve the bug #535361 +## May be this will be a solution with the right method ??? + +@DPATCH@ +diff -urNad trunk~/src/get_myipaddr.c trunk/src/get_myipaddr.c +--- trunk~/src/get_myipaddr.c 2009-09-03 13:10:32.000000000 +0200 ++++ trunk/src/get_myipaddr.c 2009-09-03 13:15:39.671451172 +0200 +@@ -118,7 +118,21 @@ + #endif /* not STRUCT_SOCKADDR_HAS_SA_LEN */ + + /* increment ptr to next interface for next time through the loop */ ++#ifdef __ARCH__ /* Debian GNU/Linux behavior for packaging goal */ ++ switch(__ARCH__) { ++ case 32: /* 32 bits architectures */ ++ ptr += sizeof(ifr->ifr_name) + len; ++ break; ++ case 64: /* 64 bits architectures */ ++ ptr += sizeof(struct ifreq); ++ break; ++ default: /* Default dhcp_probe behavior */ ++ ptr += sizeof(ifr->ifr_name) + len; ++ break; ++ } ++#else /* Default dhcp_probe behavior */ + ptr += sizeof(ifr->ifr_name) + len; ++#endif + + if (strcmp(ifname, ifr->ifr_name) != 0 ) /* is this the interface we're looking for? */ + continue; diff --git a/net-analyzer/dhcp_probe/files/1.3.0/05-cleanup.patch b/net-analyzer/dhcp_probe/files/1.3.0/05-cleanup.patch new file mode 100644 index 000000000000..4151b461bbfd --- /dev/null +++ b/net-analyzer/dhcp_probe/files/1.3.0/05-cleanup.patch @@ -0,0 +1,29 @@ +--- dhcp_probe-1.3.0/src/dhcp_probe.c.orig 2009-03-09 21:17:47.000000000 +0100 ++++ dhcp_probe-1.3.0/src/dhcp_probe.c 2009-11-19 18:09:26.000000000 +0100 +@@ -84,7 +84,6 @@ + struct sigaction sa; + FILE *pid_fp; + char *cwd = CWD; +- int i; + + int write_packet_len; + int bytes_written; +@@ -98,9 +97,6 @@ + int linktype; + char pcap_errbuf[PCAP_ERRBUF_SIZE], pcap_errbuf2[PCAP_ERRBUF_SIZE]; + +- /* for libnet */ +- char libnet_errbuf[LIBNET_ERRBUF_SIZE]; +- + /* get progname = last component of argv[0] */ + prog = strrchr(argv[0], '/'); + if (prog) +@@ -987,8 +983,6 @@ + Must not be called until after initial configuration is complete. + */ + +- int i; +- + if (! read_configfile(config_file)) { + my_exit(1, 1, 1); + } diff --git a/net-analyzer/dhcp_probe/files/1.3.0/06-return.patch b/net-analyzer/dhcp_probe/files/1.3.0/06-return.patch new file mode 100644 index 000000000000..c27ad646e6c9 --- /dev/null +++ b/net-analyzer/dhcp_probe/files/1.3.0/06-return.patch @@ -0,0 +1,11 @@ +--- dhcp_probe-1.3.0/src/dhcp_probe.c.orig 2009-11-19 18:13:31.000000000 +0100 ++++ dhcp_probe-1.3.0/src/dhcp_probe.c 2009-11-19 18:13:59.000000000 +0100 +@@ -684,6 +684,8 @@ + pcap_close(pd_template); + + my_exit(0, 1, 1); ++ ++ return 0; /* will not be reached */ + } + + diff --git a/net-analyzer/dhcp_probe/files/1.3.0/07-comment.patch b/net-analyzer/dhcp_probe/files/1.3.0/07-comment.patch new file mode 100644 index 000000000000..c8184144a597 --- /dev/null +++ b/net-analyzer/dhcp_probe/files/1.3.0/07-comment.patch @@ -0,0 +1,11 @@ +--- dhcp_probe-1.3.0/src/configfile.c.orig 2009-03-09 21:17:47.000000000 +0100 ++++ dhcp_probe-1.3.0/src/configfile.c 2009-11-19 18:17:03.000000000 +0100 +@@ -55,7 +55,7 @@ + + /* parallel arrays of "lease networks of concern" (address & mask), and number of elems in arrays. + We also precompute a parallel array of 'addr & mask' to save computing these repeatedly later. +-/* If a response already identified as being from a rogue DHCP server contains a yiaddr field field ++ If a response already identified as being from a rogue DHCP server contains a yiaddr field field + that falls into one of these networks, it is reported as a matter of special concern. + */ + struct in_addr lease_networks_of_concern_addr[MAX_LEASE_NETWORKS_OF_CONCERN]; diff --git a/net-analyzer/dhcp_probe/files/1.3.0/08-man8.patch b/net-analyzer/dhcp_probe/files/1.3.0/08-man8.patch new file mode 100644 index 000000000000..56f8686eaebd --- /dev/null +++ b/net-analyzer/dhcp_probe/files/1.3.0/08-man8.patch @@ -0,0 +1,20 @@ +--- dhcp_probe-1.3.0/doc/dhcp_probe.8.orig 2009-11-19 18:27:47.000000000 +0100 ++++ dhcp_probe-1.3.0/doc/dhcp_probe.8 2009-11-19 18:28:50.000000000 +0100 +@@ -141,7 +141,7 @@ + libraries. + .SH OPTIONS + .TP +-.IB \-c \ config_file ++.BI \-c \ config_file + Specifies the configuration file. + If not specified, this defaults to + .BR /etc/dhcp_probe.cf . +@@ -253,7 +253,7 @@ + .B \-v + Display the program's version number, then exit. + .TP +-.IB \-w \ cwd ++.BI \-w \ cwd + Specifies the working directory; shortly after starting the + program changes its current working directory to this. + If not specified, this defaults to diff --git a/net-analyzer/dhcp_probe/files/dhcp_probe.confd b/net-analyzer/dhcp_probe/files/dhcp_probe.confd new file mode 100644 index 000000000000..59d405ff3c24 --- /dev/null +++ b/net-analyzer/dhcp_probe/files/dhcp_probe.confd @@ -0,0 +1,10 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# Config file for /etc/init.d/dhcp_probe + +# For more information, see dhcp_probe(8). + +DHCP_PROBE_OPTIONS="-d 1" + diff --git a/net-analyzer/dhcp_probe/files/dhcp_probe.initd b/net-analyzer/dhcp_probe/files/dhcp_probe.initd new file mode 100644 index 000000000000..4e1c9e7ca66b --- /dev/null +++ b/net-analyzer/dhcp_probe/files/dhcp_probe.initd @@ -0,0 +1,48 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +extra_commands="reload" + +DHCP_PROBE_BINARY="/usr/sbin/dhcp_probe" +DHCP_PROBE_CONFIG="/etc/dhcp_probe.cf" +DHCP_PROBE_PIDFILE="/var/run/${SVCNAME}.pid" +DHCP_PROBE_INTERFACE="${SVCNAME#*.}" + +depend() { + use logger + need net +} + +checkconfig() { + if [ ! -e ${DHCP_PROBE_CONFIG} ]; then + eerror "You need an ${DHCP_PROBE_CONFIG} to run dhcp_probe." + eerror "A sample file is available in /usr/share/doc/dhcp_probe*" + return 1 + elif [ ${SVCNAME} = dhcp_probe ]; then + eerror "Do not run this script directly! Instead, create symbolic links like so:" + eerror " # cd /etc/init.d" + eerror " # ln -s dhcp_probe dhcp_probe.[INTERFACE_NAME]" + eerror "for each interface that should be monitored" + return 1 + fi +} + +start() { + checkconfig + ebegin "Starting ${SVCNAME}" + ${DHCP_PROBE_BINARY} ${DHCP_PROBE_OPTIONS} -p ${DHCP_PROBE_PIDFILE} ${DHCP_PROBE_INTERFACE} + eend ${?} +} + +stop() { + if [ "${RC_CMD}" = "restart" ] ; then + checkconfig || return 1 + fi + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --signal 9 \ + --pidfile ${DHCP_PROBE_PIDFILE} + eend ${?} +} + diff --git a/net-analyzer/dhcp_probe/files/dhcp_probe_mail b/net-analyzer/dhcp_probe/files/dhcp_probe_mail new file mode 100644 index 000000000000..58b07766bbb3 --- /dev/null +++ b/net-analyzer/dhcp_probe/files/dhcp_probe_mail @@ -0,0 +1,23 @@ +#!/bin/bash +# Old style alert program: +# +# Syntax: +# alert_program_name /absolute/path/name +# +# The program specified via 'alert_program_name' will be called as follows: +# /absolute/path/name name_of_calling_program name_of_interface_on_which_the +#_response_was_received IP_source_of_the_response ether_src_of_the_response + +DHCP_PROBE_DOMAIN=$(dnsdomainname) + +sendmail root <<EOF +From: root@${DHCP_PROBE_DOMAIN} +Subject: $1 ALERT - $3 is acting as a DHCP server + +Called program: $0 +Calling program: $1 +Interface on which response was received: $2 +IP source of the response: $3 +Ethernet source of the response: $4 + +EOF diff --git a/net-analyzer/dhcp_probe/metadata.xml b/net-analyzer/dhcp_probe/metadata.xml new file mode 100644 index 000000000000..bfc69c95fdfb --- /dev/null +++ b/net-analyzer/dhcp_probe/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>netmon</herd> + <maintainer> + <email>jer@gentoo.org</email> + <name>Jeroen Roovers</name> + </maintainer> + <longdescription> + dchp_probe attempts to discover DHCP and BootP servers on a + directly-attached Ethernet network + </longdescription> +</pkgmetadata> |