Thu, 15 Sep 2011 11:49:33 +0200
Resynchronize with upstream package maintainer version.
dhcpd/dhcpd.patch | file | annotate | diff | comparison | revisions | |
dhcpd/dhcpd.spec | file | annotate | diff | comparison | revisions | |
dhcpd/rc.dhcpd | file | annotate | diff | comparison | revisions |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dhcpd/dhcpd.patch Thu Sep 15 11:49:33 2011 +0200 1.3 @@ -0,0 +1,13 @@ 1.4 +Index: common/bpf.c 1.5 +--- common/bpf.c.orig 2009-11-20 02:48:59.000000000 +0100 1.6 ++++ common/bpf.c 2010-11-27 09:53:47.000000000 +0100 1.7 +@@ -580,6 +580,9 @@ 1.8 + */ 1.9 + switch (sa->sdl_type) { 1.10 + case IFT_ETHER: 1.11 ++#ifdef IFT_L2VLAN 1.12 ++ case IFT_L2VLAN: 1.13 ++#endif 1.14 + hw->hlen = sa->sdl_alen + 1; 1.15 + hw->hbuf[0] = HTYPE_ETHER; 1.16 + memcpy(&hw->hbuf[1], LLADDR(sa), sa->sdl_alen);
2.1 --- a/dhcpd/dhcpd.spec Thu Sep 15 11:03:52 2011 +0200 2.2 +++ b/dhcpd/dhcpd.spec Thu Sep 15 11:49:33 2011 +0200 2.3 @@ -1,6 +1,6 @@ 2.4 ## 2.5 ## dhcpd.spec -- OpenPKG RPM Package Specification 2.6 -## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/> 2.7 +## Copyright (c) 2000-2011 OpenPKG Foundation e.V. <http://openpkg.net/> 2.8 ## 2.9 ## Permission to use, copy, modify, and distribute this software for 2.10 ## any purpose with or without fee is hereby granted, provided that 2.11 @@ -21,6 +21,10 @@ 2.12 ## SUCH DAMAGE. 2.13 ## 2.14 2.15 +# package version 2.16 +%define V_opkg 4.2.1 2.17 +%define V_dist 4.2.1 2.18 + 2.19 # package information 2.20 Name: dhcpd 2.21 Summary: DHCP Daemon 2.22 @@ -31,23 +35,26 @@ 2.23 Class: BASE 2.24 Group: DHCP 2.25 License: ISC/BSD 2.26 -Version: 4.1.0 2.27 -Release: 20090105 2.28 +Version: %{V_opkg} 2.29 +Release: 20110424 2.30 2.31 # package options 2.32 %option with_fsl yes 2.33 2.34 # list of sources 2.35 -Source0: ftp://ftp.isc.org/isc/dhcp/dhcp-%{version}.tar.gz 2.36 +Source0: ftp://ftp.isc.org/isc/dhcp/dhcp-%{V_dist}.tar.gz 2.37 Source1: dhcpd.conf 2.38 Source2: rc.dhcpd 2.39 Source3: fsl.dhcpd 2.40 +Patch0: dhcpd.patch 2.41 2.42 # build information 2.43 Prefix: %{l_prefix} 2.44 BuildRoot: %{l_buildroot} 2.45 BuildPreReq: OpenPKG, openpkg >= 20060823 2.46 PreReq: OpenPKG, openpkg >= 20060823 2.47 +BuildPreReq: openssl 2.48 +PreReq: openssl 2.49 %if "%{with_fsl}" == "yes" 2.50 BuildPreReq: fsl 2.51 PreReq: fsl 2.52 @@ -60,13 +67,14 @@ 2.53 2.54 %track 2.55 prog dhcpd = { 2.56 - version = %{version} 2.57 + version = %{V_dist} 2.58 url = ftp://ftp.isc.org/isc/dhcp/ 2.59 regex = dhcp-(\d+\.\d+\.\d+)\.tar\.gz 2.60 } 2.61 2.62 %prep 2.63 - %setup -q -n dhcp-%{version} 2.64 + %setup -q -n dhcp-%{V_dist} 2.65 + %patch -p0 2.66 2.67 %build 2.68 # configure program 2.69 @@ -75,12 +83,6 @@ 2.70 -e 's;^[^#]*\(#define[^_]*_PATH_DHCPD_DB[^"]*\).*;\1 "%{l_prefix}/var/dhcpd/db/dhcpd.leases";' \ 2.71 -e 's;^[^#]*\(#define[^_]*_PATH_DHCPD_CONF[^"]*\).*;\1 "%{l_prefix}/etc/dhcpd/dhcpd.conf";' \ 2.72 includes/site.h 2.73 - %{l_shtool} subst \ 2.74 - -e 's;struct option\([, )]\);struct option_dhcpd\1;g' \ 2.75 - includes/*.h \ 2.76 - client/*.c \ 2.77 - common/*.c \ 2.78 - server/*.c 2.79 CC="%{l_cc}" \ 2.80 CFLAGS="%{l_cflags -O}" \ 2.81 CPPFLAGS="%{l_cppflags} -DNOMINUM" \ 2.82 @@ -91,19 +93,21 @@ 2.83 --mandir=%{l_prefix}/man \ 2.84 --sysconfdir=%{l_prefix}/etc/dhcpd \ 2.85 --localstatedir=%{l_prefix}/var/dhcpd \ 2.86 - --disable-dhcpv6 \ 2.87 --with-srv-lease-file=%{l_prefix}/var/dhcpd/db/dhcpd.leases \ 2.88 --with-cli-lease-file=%{l_prefix}/var/dhcpd/db/dhclient.leases \ 2.89 --with-srv-pid-file=%{l_prefix}/var/dhcpd/run/dhcpd.pid \ 2.90 --with-cli-pid-file=%{l_prefix}/var/dhcpd/run/dhclient.pid \ 2.91 - --with-relay-pid-file=%{l_prefix}/var/dhcpd/run/dhrelay.pid 2.92 + --with-relay-pid-file=%{l_prefix}/var/dhcpd/run/dhrelay.pid \ 2.93 + --disable-dhcpv6 2.94 2.95 # build program 2.96 %{l_make} %{l_mflags} 2.97 2.98 %install 2.99 + # clean up build cruft 2.100 + rm -rf $RPM_BUILD_ROOT 2.101 + 2.102 # install program 2.103 - rm -rf $RPM_BUILD_ROOT 2.104 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT 2.105 2.106 # install default configuration
3.1 --- a/dhcpd/rc.dhcpd Thu Sep 15 11:03:52 2011 +0200 3.2 +++ b/dhcpd/rc.dhcpd Thu Sep 15 11:49:33 2011 +0200 3.3 @@ -18,7 +18,8 @@ 3.4 dhcpd_pidfile="@l_prefix@/var/dhcpd/run/dhcpd.pid" 3.5 dhcpd_leases="@l_prefix@/var/dhcpd/db/dhcpd.leases" 3.6 dhcpd_signal () { 3.7 - [ -f $dhcpd_pidfile ] && kill -$1 `cat $dhcpd_pidfile` 3.8 + if [ ! -f $dhcpd_pidfile ]; then return 1; fi 3.9 + kill -$1 `cat $dhcpd_pidfile` 3.10 } 3.11 dhcpd_start () { 3.12 if [ ! -f $dhcpd_leases ]; then 3.13 @@ -27,6 +28,7 @@ 3.14 chown @l_susr@:@l_mgrp@ $dhcpd_leases 3.15 fi 3.16 local cmd="@l_prefix@/sbin/dhcpd" 3.17 + cmd="$cmd -f" 3.18 cmd="$cmd $dhcpd_flags" 3.19 echo ".$dhcpd_flags" | grep -- -p >/dev/null 2>&1 3.20 if [ $? -ne 0 -a ".$dhcpd_port" != . ]; then 3.21 @@ -35,14 +37,15 @@ 3.22 if [ $# -gt 0 ]; then 3.23 cmd="$cmd $@" 3.24 fi 3.25 - cmd="$cmd >/dev/null 2>&1" 3.26 - eval $cmd 3.27 + ( eval "nohup $cmd </dev/null >/dev/null 2>&1 &" 3.28 + echo $! >$dhcpd_pidfile 3.29 + ) >/dev/null 2>&1 3.30 } 3.31 3.32 %status -u @l_susr@ -o 3.33 dhcpd_usable="unknown" 3.34 dhcpd_active="no" 3.35 - dhcpd_start -q -t || dhcpd_usable="no" 3.36 + @l_prefix@/sbin/dhcpd -q -t || dhcpd_usable="no" 3.37 [ ".$dhcpd_if" = . ] && dhcpd_usable="no" 3.38 rcService dhcpd enable yes && \ 3.39 dhcpd_signal 0 && dhcpd_active="yes"