# HG changeset patch # User Michael Schloh von Bennewitz # Date 1316080173 -7200 # Node ID 4ca17af53013941748329e4d570b22b7c3d2c3f5 # Parent 198005e4aad2aefd3cb05f0300bec50a2e257262 Resynchronize with upstream package maintainer version. diff -r 198005e4aad2 -r 4ca17af53013 dhcpd/dhcpd.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dhcpd/dhcpd.patch Thu Sep 15 11:49:33 2011 +0200 @@ -0,0 +1,13 @@ +Index: common/bpf.c +--- common/bpf.c.orig 2009-11-20 02:48:59.000000000 +0100 ++++ common/bpf.c 2010-11-27 09:53:47.000000000 +0100 +@@ -580,6 +580,9 @@ + */ + switch (sa->sdl_type) { + case IFT_ETHER: ++#ifdef IFT_L2VLAN ++ case IFT_L2VLAN: ++#endif + hw->hlen = sa->sdl_alen + 1; + hw->hbuf[0] = HTYPE_ETHER; + memcpy(&hw->hbuf[1], LLADDR(sa), sa->sdl_alen); diff -r 198005e4aad2 -r 4ca17af53013 dhcpd/dhcpd.spec --- a/dhcpd/dhcpd.spec Thu Sep 15 11:03:52 2011 +0200 +++ b/dhcpd/dhcpd.spec Thu Sep 15 11:49:33 2011 +0200 @@ -1,6 +1,6 @@ ## ## dhcpd.spec -- OpenPKG RPM Package Specification -## Copyright (c) 2000-2008 OpenPKG Foundation e.V. +## Copyright (c) 2000-2011 OpenPKG Foundation e.V. ## ## Permission to use, copy, modify, and distribute this software for ## any purpose with or without fee is hereby granted, provided that @@ -21,6 +21,10 @@ ## SUCH DAMAGE. ## +# package version +%define V_opkg 4.2.1 +%define V_dist 4.2.1 + # package information Name: dhcpd Summary: DHCP Daemon @@ -31,23 +35,26 @@ Class: BASE Group: DHCP License: ISC/BSD -Version: 4.1.0 -Release: 20090105 +Version: %{V_opkg} +Release: 20110424 # package options %option with_fsl yes # list of sources -Source0: ftp://ftp.isc.org/isc/dhcp/dhcp-%{version}.tar.gz +Source0: ftp://ftp.isc.org/isc/dhcp/dhcp-%{V_dist}.tar.gz Source1: dhcpd.conf Source2: rc.dhcpd Source3: fsl.dhcpd +Patch0: dhcpd.patch # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} BuildPreReq: OpenPKG, openpkg >= 20060823 PreReq: OpenPKG, openpkg >= 20060823 +BuildPreReq: openssl +PreReq: openssl %if "%{with_fsl}" == "yes" BuildPreReq: fsl PreReq: fsl @@ -60,13 +67,14 @@ %track prog dhcpd = { - version = %{version} + version = %{V_dist} url = ftp://ftp.isc.org/isc/dhcp/ regex = dhcp-(\d+\.\d+\.\d+)\.tar\.gz } %prep - %setup -q -n dhcp-%{version} + %setup -q -n dhcp-%{V_dist} + %patch -p0 %build # configure program @@ -75,12 +83,6 @@ -e 's;^[^#]*\(#define[^_]*_PATH_DHCPD_DB[^"]*\).*;\1 "%{l_prefix}/var/dhcpd/db/dhcpd.leases";' \ -e 's;^[^#]*\(#define[^_]*_PATH_DHCPD_CONF[^"]*\).*;\1 "%{l_prefix}/etc/dhcpd/dhcpd.conf";' \ includes/site.h - %{l_shtool} subst \ - -e 's;struct option\([, )]\);struct option_dhcpd\1;g' \ - includes/*.h \ - client/*.c \ - common/*.c \ - server/*.c CC="%{l_cc}" \ CFLAGS="%{l_cflags -O}" \ CPPFLAGS="%{l_cppflags} -DNOMINUM" \ @@ -91,19 +93,21 @@ --mandir=%{l_prefix}/man \ --sysconfdir=%{l_prefix}/etc/dhcpd \ --localstatedir=%{l_prefix}/var/dhcpd \ - --disable-dhcpv6 \ --with-srv-lease-file=%{l_prefix}/var/dhcpd/db/dhcpd.leases \ --with-cli-lease-file=%{l_prefix}/var/dhcpd/db/dhclient.leases \ --with-srv-pid-file=%{l_prefix}/var/dhcpd/run/dhcpd.pid \ --with-cli-pid-file=%{l_prefix}/var/dhcpd/run/dhclient.pid \ - --with-relay-pid-file=%{l_prefix}/var/dhcpd/run/dhrelay.pid + --with-relay-pid-file=%{l_prefix}/var/dhcpd/run/dhrelay.pid \ + --disable-dhcpv6 # build program %{l_make} %{l_mflags} %install + # clean up build cruft + rm -rf $RPM_BUILD_ROOT + # install program - rm -rf $RPM_BUILD_ROOT %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT # install default configuration diff -r 198005e4aad2 -r 4ca17af53013 dhcpd/rc.dhcpd --- a/dhcpd/rc.dhcpd Thu Sep 15 11:03:52 2011 +0200 +++ b/dhcpd/rc.dhcpd Thu Sep 15 11:49:33 2011 +0200 @@ -18,7 +18,8 @@ dhcpd_pidfile="@l_prefix@/var/dhcpd/run/dhcpd.pid" dhcpd_leases="@l_prefix@/var/dhcpd/db/dhcpd.leases" dhcpd_signal () { - [ -f $dhcpd_pidfile ] && kill -$1 `cat $dhcpd_pidfile` + if [ ! -f $dhcpd_pidfile ]; then return 1; fi + kill -$1 `cat $dhcpd_pidfile` } dhcpd_start () { if [ ! -f $dhcpd_leases ]; then @@ -27,6 +28,7 @@ chown @l_susr@:@l_mgrp@ $dhcpd_leases fi local cmd="@l_prefix@/sbin/dhcpd" + cmd="$cmd -f" cmd="$cmd $dhcpd_flags" echo ".$dhcpd_flags" | grep -- -p >/dev/null 2>&1 if [ $? -ne 0 -a ".$dhcpd_port" != . ]; then @@ -35,14 +37,15 @@ if [ $# -gt 0 ]; then cmd="$cmd $@" fi - cmd="$cmd >/dev/null 2>&1" - eval $cmd + ( eval "nohup $cmd /dev/null 2>&1 &" + echo $! >$dhcpd_pidfile + ) >/dev/null 2>&1 } %status -u @l_susr@ -o dhcpd_usable="unknown" dhcpd_active="no" - dhcpd_start -q -t || dhcpd_usable="no" + @l_prefix@/sbin/dhcpd -q -t || dhcpd_usable="no" [ ".$dhcpd_if" = . ] && dhcpd_usable="no" rcService dhcpd enable yes && \ dhcpd_signal 0 && dhcpd_active="yes"