* dhcp updated to 4.1.0p1. This seems to fix my problems with

wpa_supplicant (i.e. the dhclient-script no longer brings down the
  wlan0 interface).  The patches no longer seem needed.

svn path=/nixpkgs/trunk/; revision=16449
This commit is contained in:
Eelco Dolstra 2009-07-23 23:57:11 +00:00
parent c100551503
commit 869c2efec0
5 changed files with 20 additions and 88 deletions

View File

@ -1,24 +0,0 @@
source $stdenv/setup
# Hack to prevent dhclient from overriding the PATH specified with
# '-e' on the command-line.
makeFlagsArray=(CLIENT_PATH='\"FAKE_PATH=/nothing\"' \
USERBINDIR=$out/bin BINDIR=$out/sbin CLIENTBINDIR=$out/sbin \
ADMMANDIR=$out/share/man/man8 FFMANDIR=$out/share/man/man5 \
LIBMANDIR=$out/share/man/man3 USRMANDIR=$out/share/man/man1 \
LIBDIR=$out/lib INCDIR=$out/include VARDB=$OUT/var/run \
)
configurePhase() {
# Patch the header that contains absolute paths to the tools.
sed -i "includes/dhcpd.h" \
-"es|^ *#define \+_PATH_DHCLIENT_SCRIPT.*$|#define _PATH_DHCLIENT_SCRIPT \"$out/sbin/dhclient-script\"|g"
./configure
}
preBuild() {
substituteInPlace client/scripts/linux --replace /bin/bash $shell
}
genericBuild

View File

@ -1,22 +1,28 @@
{ stdenv, fetchurl, groff, nettools, coreutils, iputils, gnused,
bash, makeWrapper }:
{ stdenv, fetchurl, nettools, iputils, iproute, makeWrapper }:
stdenv.mkDerivation {
name = "dhcp-3.0.6";
builder = ./builder.sh;
stdenv.mkDerivation rec {
name = "dhcp-4.1.0p1";
src = fetchurl {
url = http://ftp.isc.org/isc/dhcp/dhcp-3.0.6.tar.gz;
sha256 = "0k8gy3ab9kzs4qcc9apgnxi982lhggha41fkw9w1bmvmz7mv0xwz";
url = "http://ftp.isc.org/isc/dhcp/${name}.tar.gz";
sha256 = "0il966bcls7nfd93qfqrgvd2apkm0kv7pk35lnl1nvbm7fyrik7z";
};
buildInputs = [ groff nettools coreutils makeWrapper ];
# Fixes "socket.c:591: error: invalid application of 'sizeof' to
# incomplete type 'struct in6_pktinfo'". See
# http://www.mail-archive.com/blfs-book@linuxfromscratch.org/msg13013.html
NIX_CFLAGS_COMPILE = "-D_GNU_SOURCE";
patches = [ ./resolv-without-domain.patch ./no-mkdir-var-run.patch ];
buildInputs = [makeWrapper];
postInstall = ''
wrapProgram "$out/sbin/dhclient-script" --prefix PATH : \
"${nettools}/bin:${nettools}/sbin:${coreutils}/bin:${gnused}/bin"
'';
postInstall =
''
cp client/scripts/linux $out/sbin/dhclient-script
substituteInPlace $out/sbin/dhclient-script \
--replace /sbin/ip ${iproute}/sbin/ip
wrapProgram "$out/sbin/dhclient-script" --prefix PATH : \
"${nettools}/bin:${nettools}/sbin:${iputils}/bin"
'';
meta = {
description = "Dynamic Host Configuration Protocol (DHCP) tools";

View File

@ -1,22 +0,0 @@
--- dhcp-3.0.6/client/Makefile.dist 2008-03-14 14:36:04.000000000 +0100
+++ dhcp-3.0.6/client/Makefile.dist 2008-03-14 14:36:06.000000000 +0100
@@ -38,7 +38,7 @@ CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUD
all: $(PROG) $(CATMANPAGES)
install: all
- for dir in $(CLIENTBINDIR) $(ETC) $(FFMANDIR) $(ADMMANDIR) $(VARDB); \
+ for dir in $(CLIENTBINDIR) $(ETC) $(FFMANDIR) $(ADMMANDIR); \
do \
foo=""; \
for bar in `echo $(DESTDIR)$${dir} |tr / ' '`; do \
--- dhcp-3.0.6/server/Makefile.dist 2008-03-14 14:37:05.000000000 +0100
+++ dhcp-3.0.6/server/Makefile.dist 2008-03-14 14:37:13.000000000 +0100
@@ -38,7 +38,7 @@ CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUD
all: $(PROG) $(CATMANPAGES)
install: all
- for dir in $(BINDIR) $(ADMMANDIR) $(FFMANDIR) $(VARDB); do \
+ for dir in $(BINDIR) $(ADMMANDIR) $(FFMANDIR); do \
foo=""; \
for bar in `echo $(DESTDIR)$${dir} |tr / ' '`; do \
foo=$${foo}/$$bar; \

View File

@ -1,27 +0,0 @@
diff -rc dhcp-3.0.5-orig/client/scripts/linux dhcp-3.0.5/client/scripts/linux
*** dhcp-3.0.5-orig/client/scripts/linux Fri Nov 15 02:09:09 2002
--- dhcp-3.0.5/client/scripts/linux Tue Feb 20 15:02:34 2007
***************
*** 23,31 ****
# of the $1 in its args.
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
--- 23,34 ----
# of the $1 in its args.
make_resolv_conf() {
! if [ x"$new_domain_name_servers" != x ]; then
! echo -n >/etc/resolv.conf
chmod 644 /etc/resolv.conf
+ if [ "x$new_domain_name" != x ]; then
+ echo search $new_domain_name >>/etc/resolv.conf
+ fi
for nameserver in $new_domain_name_servers; do
echo nameserver $nameserver >>/etc/resolv.conf
done

View File

@ -604,8 +604,7 @@ let
};
dhcp = import ../tools/networking/dhcp {
inherit fetchurl stdenv groff nettools coreutils iputils gnused
bash makeWrapper;
inherit fetchurl stdenv nettools iputils iproute makeWrapper;
};
dhcpcd = import ../tools/networking/dhcpcd {