[pkg-dhcp-commits] [SCM] ISC DHCP packaging for Debian branch, master, updated. debian/4.1.0-1-24-ga87e220

Andrew Pollock apollock at debian.org
Sun Aug 9 07:28:21 UTC 2009


The following commit has been merged in the master branch:
commit a87e220f8c18c9826cc02534fa629b357fe75fae
Author: Andrew Pollock <apollock at debian.org>
Date:   Sun Aug 9 00:27:43 2009 -0700

    This patch is no longer required as DHCP 4.1 builds fine on kFreeBSD (so I'm told)

diff --git a/debian/patches/kfreebsd.dpatch b/debian/patches/kfreebsd.dpatch
deleted file mode 100644
index 809de3f..0000000
--- a/debian/patches/kfreebsd.dpatch
+++ /dev/null
@@ -1,403 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## kfreebsd.dpatch by  <aurel32 at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
---- dhcp3-3.0.2.orig/Makefile.conf
-+++ dhcp3-3.0.2/Makefile.conf
-@@ -485,3 +485,22 @@
- #FFMANEXT = .5
- #MANINSTALL = install -i -m 444
- ##--hpux-gcc--
-+
-+## GNU/kFreeBSD
-+##--kfreebsd--
-+#CF = cf/kfreebsd.h
-+#COPTS = $(BINDDEF) $(CC_OPTIONS)
-+#ADMMANDIR = /usr/share/man/man8
-+#ADMMANEXT = .8
-+#FFMANDIR = /usr/share/man/man5
-+#FFMANEXT = .5
-+#LIBMANDIR = /usr/share/man/man3
-+#LIBMANEXT = .3
-+#USRMANDIR = /usr/share/man/man1
-+#USRMANEXT = .1
-+#MANCAT = man
-+#VARRUN = /var/run
-+#VARDB = /var/lib/dhcp
-+#SCRIPT=kfreebsd
-+##--kfreebsd--
-+
---- dhcp3-3.0.2.orig/configure
-+++ dhcp3-3.0.2/configure
-@@ -184,6 +184,8 @@
-       sysname=nextstep;;
-     UnixWare)
-       sysname=uw7;;
-+    GNU/kFreeBSD)
-+      sysname=kfreebsd;
-   esac
- fi
- 
-@@ -213,6 +215,7 @@
-     echo "   qnx		QNX 4.2 or higher"
-     echo "   NEXTSTEP     NeXTSTEP"
-     echo "   sco	SCO Open Server"
-+    echo "   kfreebsd		GNU/kFreeBSD"
-     exit 1;
-   fi
- fi
---- dhcp3-3.0.2.orig/common/bpf.c
-+++ dhcp3-3.0.2/common/bpf.c
-@@ -407,7 +407,7 @@
- 				       interface -> rbuf,
- 				       (size_t)interface -> rbuf_max);
- 			if (length <= 0) {
--#ifdef __FreeBSD__
-+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
- 				if (errno == ENXIO) {
- #else
- 				if (errno == EIO) {
---- dhcp3-3.0.2.orig/includes/osdep.h
-+++ dhcp3-3.0.2/includes/osdep.h
-@@ -133,6 +133,10 @@
- # endif
- #endif
- 
-+#if defined(__FreeBSD_kernel__) && defined(__GLIBC__)
-+#  include "cf/kfreebsd.h"
-+#endif
-+
- /* snprintf/vsnprintf hacks.  for systems with no libc versions only. */
- #ifdef NO_SNPRINTF
-   extern int isc_print_snprintf(char *, size_t, const char *, ...);
---- dhcp3-3.0.2.orig/includes/cf/kfreebsd.h
-+++ dhcp3-3.0.2/includes/cf/kfreebsd.h
-@@ -0,0 +1,148 @@
-+/* kfreebsd.h
-+
-+   System dependencies for GNU/kFreeBSD... */
-+
-+/*
-+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
-+ * Copyright (c) 1996-2003 by Internet Software Consortium
-+ *
-+ * Permission to use, copy, modify, and distribute this software for any
-+ * purpose with or without fee is hereby granted, provided that the above
-+ * copyright notice and this permission notice appear in all copies.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
-+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-+ * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
-+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
-+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-+ *
-+ *   Internet Systems Consortium, Inc.
-+ *   950 Charter Street
-+ *   Redwood City, CA 94063
-+ *   <info at isc.org>
-+ *   http://www.isc.org/
-+ *
-+ * This software has been written for Internet Systems Consortium
-+ * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
-+ * To learn more about Internet Systems Consortium, see
-+ * ``http://www.isc.org/''.  To learn more about Vixie Enterprises,
-+ * see ``http://www.vix.com''.   To learn more about Nominum, Inc., see
-+ * ``http://www.nominum.com''.
-+ */
-+
-+#include <features.h>
-+
-+typedef u_int8_t u8;
-+typedef u_int16_t u16;
-+typedef u_int32_t u32;
-+
-+#include <syslog.h>
-+#include <sys/types.h>
-+#include <string.h>
-+#include <paths.h>
-+#include <errno.h>
-+#include <unistd.h>
-+#include <sys/wait.h>
-+#include <signal.h>
-+#include <setjmp.h>
-+#include <limits.h>
-+
-+extern int h_errno;
-+
-+#include <net/if.h>
-+#include <net/if_dl.h>
-+#include <net/if_arp.h>
-+#include <net/route.h>
-+#if !defined (INADDR_LOOPBACK)
-+# define INADDR_LOOPBACK ((u_int32_t)0x7f000001)
-+#endif
-+
-+#include <sys/time.h>		/* gettimeofday()*/
-+
-+/* Databases go in /var/state/dhcp.   It would also be valid to put them
-+   in /var/state/misc - indeed, given that there's only one lease file, it
-+   would probably be better.   However, I have some ideas for optimizing
-+   the lease database that may result in a _lot_ of smaller files being
-+   created, so in that context it makes more sense to have a seperate
-+   directory. */
-+
-+#ifndef _PATH_DHCPD_DB
-+#define _PATH_DHCPD_DB		"/var/state/dhcp/dhcpd.leases"
-+#endif
-+
-+#ifndef _PATH_DHCLIENT_DB
-+#define _PATH_DHCLIENT_DB	"/var/state/dhcp/dhclient.leases"
-+#endif
-+
-+/* Varargs stuff... */
-+#include <stdarg.h>
-+#define VA_DOTDOTDOT ...
-+#define VA_start(list, last) va_start (list, last)
-+#define va_dcl
-+
-+#if defined(__alpha__) || defined(__amd64__) || defined(__ia64__) || \
-+	defined(__sparc64__)
-+# define PTRSIZE_64BIT
-+#endif
-+
-+#define VOIDPTR	void *
-+
-+#define EOL	'\n'
-+
-+/* Time stuff... */
-+
-+#include <time.h>
-+
-+#define TIME time_t
-+#define GET_TIME(x)	time ((x))
-+
-+#define HAVE_SA_LEN
-+
-+#if defined (USE_DEFAULT_NETWORK)
-+#  define USE_BPF
-+#endif
-+#define HAVE_MKSTEMP
-+#ifdef NEED_PRAND_CONF
-+#ifndef HAVE_DEV_RANDOM
-+ # define HAVE_DEV_RANDOM 1
-+ #endif /* HAVE_DEV_RANDOM */
-+
-+const char *cmds[] = {
-+	"/bin/ps -axlw 2>&1",
-+	"/sbin/arp -an 2>&1",
-+	"/bin/netstat -an 2>&1",
-+	"/bin/df  2>&1",
-+	"/usr/bin/dig com. soa +ti=1 +retry=0 2>&1",
-+	"/usr/bin/uptime  2>&1",
-+	"/usr/bin/netstat -an 2>&1",
-+	"/usr/bin/dig . soa +ti=1 +retry=0 2>&1",
-+	"/usr/bin/vmstat  2>&1",
-+	"/usr/bin/w  2>&1",
-+	NULL
-+};
-+
-+const char *dirs[] = {
-+	"/tmp",
-+	"/usr/tmp",
-+	".",
-+	"/",
-+	"/var/spool",
-+	"/dev",
-+	"/var/spool/mail",
-+	"/home",
-+	"/usr/home",
-+	NULL
-+};
-+
-+const char *files[] = {
-+	"/proc/stat",
-+	"/proc/meminfo",
-+	"/proc/self/status",
-+	"/var/log/messages",
-+	"/var/log/wtmp",
-+	"/var/log/lastlog",
-+	NULL
-+};
-+#endif /* NEED_PRAND_CONF */
---- dhcp3-3.0.2.orig/client/scripts/kfreebsd
-+++ dhcp3-3.0.2/client/scripts/kfreebsd
-@@ -0,0 +1,174 @@
-+#!/bin/bash
-+# dhclient-script for GNU/kFreeBSD. Aurelien Jarno, May, 2005.
-+# Based on Linux and FreeBSD scripts.
-+
-+make_resolv_conf() {
-+  if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
-+    echo search $new_domain_name >/etc/resolv.conf
-+    chmod 644 /etc/resolv.conf
-+    for nameserver in $new_domain_name_servers; do
-+      echo nameserver $nameserver >>/etc/resolv.conf
-+    done
-+  fi
-+}
-+
-+# Must be used on exit.   Invokes the local dhcp client exit hooks, if any.
-+exit_with_hooks() {
-+  exit_status=$1
-+  if [ -f /etc/dhclient-exit-hooks ]; then
-+    . /etc/dhclient-exit-hooks
-+  fi
-+# probably should do something with exit status of the local script
-+  exit $exit_status
-+}
-+
-+# Invoke the local dhcp client enter hooks, if they exist.
-+if [ -f /etc/dhclient-enter-hooks ]; then
-+  exit_status=0
-+  . /etc/dhclient-enter-hooks
-+  # allow the local script to abort processing of this state
-+  # local script must set exit_status variable to nonzero.
-+  if [ $exit_status -ne 0 ]; then
-+    exit $exit_status
-+  fi
-+fi
-+
-+if [ x$new_broadcast_address != x ]; then
-+  new_broadcast_arg="broadcast $new_broadcast_address"
-+fi
-+if [ x$old_broadcast_address != x ]; then
-+  old_broadcast_arg="broadcast $old_broadcast_address"
-+fi
-+if [ x$new_subnet_mask != x ]; then
-+  new_subnet_arg="netmask $new_subnet_mask"
-+fi
-+if [ x$old_subnet_mask != x ]; then
-+  old_subnet_arg="netmask $old_subnet_mask"
-+fi
-+if [ x$alias_subnet_mask != x ]; then
-+  alias_subnet_arg="netmask $alias_subnet_mask"
-+fi
-+
-+if [ x$reason = xMEDIUM ]; then
-+  eval "ifconfig $interface $medium"
-+  eval "ifconfig $interface inet -alias 0.0.0.0 $medium" >/dev/null 2>&1
-+  sleep 1
-+  exit_with_hooks 0
-+fi
-+
-+if [ x$reason = xPREINIT ]; then
-+  if [ x$alias_ip_address != x ]; then
-+    ifconfig $interface inet -alias $alias_ip_address > /dev/null 2>&1
-+    route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
-+  fi
-+  ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 \
-+		broadcast 255.255.255.255 up
-+  exit_with_hooks 0
-+fi
-+
-+if [ x$reason = xARPCHECK ] || [ x$reason = xARPSEND ]; then
-+  exit_with_hooks 0
-+fi
-+  
-+if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
-+   [ x$reason = xREBIND ] || [ x$reason = xREBOOT ]; then
-+  current_hostname=`hostname`
-+  if [ x$current_hostname = x ] || \
-+     [ x$current_hostname = x$old_host_name ]; then
-+    if [ x$current_hostname = x ] || \
-+       [ x$new_host_name != x$old_host_name ]; then
-+      hostname $new_host_name
-+    fi
-+  fi
-+
-+  if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \
-+		[ x$alias_ip_address != x$old_ip_address ]; then
-+    ifconfig $interface inet -alias $alias_ip_address > /dev/null 2>&1
-+    route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
-+  fi
-+  if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]; then
-+    eval "ifconfig $interface inet -alias $old_ip_address $medium"
-+    route delete $old_ip_address 127.1 >/dev/null 2>&1
-+    # IP address changed. Bringing down the interface will delete all other
-+    # routes, and clear the ARP cache.
-+    ifconfig $interface inet 0 down
-+  fi
-+  if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
-+     [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
-+    eval "ifconfig $interface inet $new_ip_address $new_subnet_arg \
-+					$new_broadcast_arg $medium"
-+    route add $new_ip_address 127.1 >/dev/null 2>&1
-+    for router in $new_routers; do
-+      route add default $router >/dev/null 2>&1
-+    done
-+    if [ -n "$new_static_routes" ]; then
-+      set -- $new_static_routes
-+      while [ $# -gt 1 ]; do
-+	route add $1 $2
-+	shift; shift
-+      done
-+    fi
-+  fi
-+  if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ];
-+   then
-+    ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
-+    route add $alias_ip_address 127.0.0.1
-+  fi
-+  make_resolv_conf
-+  exit_with_hooks 0
-+fi
-+
-+if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ] || [ x$reason = xRELEASE ] \
-+   || [ x$reason = xSTOP ]; then
-+  if [ x$alias_ip_address != x ]; then
-+    ifconfig $interface inet -alias $alias_ip_address > /dev/null 2>&1
-+    route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
-+  fi
-+  if [ x$old_ip_address != x ]; then
-+    eval "ifconfig $interface inet -alias $old_ip_address $medium"
-+    route delete $old_ip_address 127.1 >/dev/null 2>&1
-+    # Shut down interface, which will delete all other routes and clear arp cache.
-+    ifconfig $interface inet 0 down
-+  fi
-+  if [ x$alias_ip_address != x ]; then
-+    ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
-+    route add $alias_ip_address 127.0.0.1
-+  fi
-+  exit_with_hooks 0
-+fi
-+
-+if [ x$reason = xTIMEOUT ]; then
-+  if [ x$alias_ip_address != x ]; then
-+    ifconfig $interface inet -alias $alias_ip_address > /dev/null 2>&1
-+    route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
-+  fi
-+  eval "ifconfig $interface inet $new_ip_address $new_subnet_arg \
-+					$new_broadcast_arg $medium"
-+  sleep 1
-+  if [ -n "$new_routers" ]; then
-+    set -- $new_routers
-+    if ping -q -c 1 $1; then
-+      if [ x$new_ip_address != x$alias_ip_address ] && \
-+			[ x$alias_ip_address != x ]; then
-+	ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
-+	route add $alias_ip_address 127.0.0.1
-+      fi
-+      route add $new_ip_address 127.1 >/dev/null 2>&1
-+      for router in $new_routers; do
-+	route add default $router >/dev/null 2>&1
-+      done
-+      set -- $new_static_routes
-+      while [ $# -gt 1 ]; do
-+	route add $1 $2
-+	shift; shift
-+      done
-+      make_resolv_conf
-+      exit_with_hooks 0
-+    fi
-+  fi
-+  eval "ifconfig $interface inet -alias $new_ip_address $medium"
-+  ifconfig $interface inet 0
-+  exit_with_hooks 1
-+fi
-+
-+exit_with_hooks 0

-- 
ISC DHCP packaging for Debian



More information about the pkg-dhcp-commits mailing list