diff --git a/net-misc/dhcp/ChangeLog b/net-misc/dhcp/ChangeLog new file mode 100644 index 0000000..a1a3804 --- /dev/null +++ b/net-misc/dhcp/ChangeLog @@ -0,0 +1,723 @@ +# ChangeLog for net-misc/dhcp +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.154 2009/05/29 23:30:28 vapier Exp $ + +*dhcp-3.1.2 (07 Jul 2009) + + 07 Jul 2009; Mario Fetka + +files/dhcp-3.0.2-gmake.patch, +files/dhcp-3.0.3-dhclient-dbus.patch, + +files/dhcp-3.0.3-dhclient-hostname.patch, + +files/dhcp-3.0.3-dhclient-metric.patch, + +files/dhcp-3.0.3-dhclient-mtu.patch, + +files/dhcp-3.0.3-dhclient-no-down.patch, + +files/dhcp-3.0.3-dhclient-ntp.patch, + +files/dhcp-3.0.3-dhclient-resolvconf.patch, + +files/dhcp-3.0.3-libdst.patch, +files/dhcp-3.0.3-no_isc_blurb.patch, + +files/dhcp-3.0.4-dhclient-stdin-conf.patch, + +files/dhcp-3.0.5-bpf-nofallback.patch, +files/dhcp-3.0-fix-perms.patch, + +files/dhcp-3.0-paranoia.patch, +dhcp-3.1.2.ebuild, +dhcp-4.0.1.ebuild, + +files/dhcp-4.0.1-dhclient-stdin-conf.patch, + +files/dhcp-4.0-dhclient-metric.patch, +files/dhcp-4.0-dhclient-ntp.patch, + +files/dhcp-4.0-dhclient-resolvconf.patch, + +files/dhcp-4.0-dhclient-script-correct-operators.patch, + +files/dhcp-4.0-linux-ipv6-header.patch, + +files/dhcp-4.0-no_isc_blurb.patch, +files/dhcp-4.0-paranoia.patch, + +files/dhcpd.conf, +files/dhcpd.init, +files/dhcrelay.conf, + +files/dhcrelay.init, +metadata.xml: + add ldap patch + + 29 May 2009; Mike Frysinger -dhcp-3.0.3-r9.ebuild, + -dhcp-3.0.6.ebuild, -dhcp-3.1.0.ebuild: + Punt old packages vuln to GLSA 200808-05 #271748. + +*dhcp-4.0.1 (30 Mar 2009) + + 30 Mar 2009; + +files/dhcp-4.0.1-dhclient-stdin-conf.patch, -dhcp-4.0.0.ebuild, + +dhcp-4.0.1.ebuild: + Version bump to 4.0.1, stdin config support for dhclient has been rediffed + due to upstream changes. Still masked, deleting old ebuild. + + 26 Oct 2008; Mike Frysinger dhcp-4.0.0.ebuild: + Pull in app-vim/dhcpd-syntax with USE=vim-syntax #240192 by Dan Wallis. + +*dhcp-4.0.0 (04 Sep 2008) + + 04 Sep 2008; +files/dhcp-4.0-dhclient-metric.patch, + +files/dhcp-4.0-dhclient-ntp.patch, + +files/dhcp-4.0-dhclient-resolvconf.patch, + +files/dhcp-4.0-dhclient-script-correct-operators.patch, + +files/dhcp-4.0-dhclient-stdin-conf.patch, + +files/dhcp-4.0-linux-ipv6-header.patch, + +files/dhcp-4.0-no_isc_blurb.patch, +files/dhcp-4.0-paranoia.patch, + +dhcp-4.0.0.ebuild: + Version bump, closes bug #205214. Thanks to Roy "UberLord" Marples + for patching and patch porting. + + 29 Jun 2008; Tobias Klausmann dhcp-3.1.1.ebuild: + Stable on alpha, bug #227135 + + 29 Jun 2008; Friedrich Oslage dhcp-3.1.1.ebuild: + Stable on sparc, bug #227135 + + 28 Jun 2008; Jeroen Roovers dhcp-3.1.1.ebuild: + Stable for HPPA (bug #227135). + + 28 Jun 2008; Markus Meier dhcp-3.1.1.ebuild: + x86 stable, bug #227135 + + 27 Jun 2008; Brent Baude dhcp-3.1.1.ebuild: + Marking dhcp-3.1.1 ppc for bug 227135 + + 27 Jun 2008; Brent Baude dhcp-3.1.1.ebuild: + Marking dhcp-3.1.1 ppc64 for bug 227135 + + 27 Jun 2008; dhcp-3.1.1.ebuild: + Mark stable on AMD64 for security bug #227135. Tested on Core2 Duo & + Opteron 2218. + +*dhcp-3.1.1 (27 Jun 2008) + + 27 Jun 2008; +dhcp-3.1.1.ebuild: + Version bump for bug #227135. + + 29 Mar 2008; Mike Frysinger + files/dhcp-3.0.3-dhclient-ntp.patch, + files/dhcp-3.0.3-dhclient-resolvconf.patch, + files/dhcp-3.1.0a1-dhclient-resolvconf.patch: + Convert `echo -e` to `printf` #208558 by Davide Pesavento. + + 25 Dec 2007; Christian Heim metadata.xml: + Removing uberlord from metadata.xml as per #199318. + + 01 Oct 2007; Raúl Porcel dhcp-3.0.6.ebuild, + dhcp-3.1.0.ebuild: + sparc stable wrt #190775 + + 09 Sep 2007; Roy Marples dhcp-3.1.0.ebuild: + Stop installing a blank dhcpd.leases file, #191748 thanks to Kevin Pyle. + + 08 Sep 2007; Joseph Jezak dhcp-3.0.6.ebuild, + dhcp-3.1.0.ebuild: + Marked ppc/ppc64 stable for bug #190775. + + 06 Sep 2007; Roy Marples + -files/dhcp-3.1.0a1-x-option.patch, dhcp-3.1.0.ebuild: + Drop the extended option patch for 3.1.0 as we stopped using it. + + 02 Sep 2007; Joshua Kinard dhcp-3.0.6.ebuild, + dhcp-3.1.0.ebuild: + Stable on mips, per 190775. + + 02 Sep 2007; Christoph Mende dhcp-3.0.6.ebuild, + dhcp-3.1.0.ebuild: + Stable on amd64 wrt bug #190775 + + 02 Sep 2007; Raúl Porcel dhcp-3.0.6.ebuild, + dhcp-3.1.0.ebuild: + alpha stable wrt #190775, thanks to Tobias Klausmann for testing + + 30 Aug 2007; Jurek Bartuszek dhcp-3.0.6.ebuild, + dhcp-3.1.0.ebuild: + x86 stable (bug #190775) + + 30 Aug 2007; Jeroen Roovers dhcp-3.0.6.ebuild, + dhcp-3.1.0.ebuild: + Stable for HPPA (bug #190775). + +*dhcp-3.1.0 (20 Jul 2007) + + 20 Jul 2007; Roy Marples +dhcp-3.1.0.ebuild: + Bumpage. + +*dhcp-3.1.0_rc2 (19 Jul 2007) + + 19 Jul 2007; Roy Marples +dhcp-3.1.0_rc2.ebuild: + New upstream rc. May not work with NetworkManager as dhclient now has it's + own -x option which conflicts with one of the patches. + + 19 Jul 2007; Roy Marples + +files/dhcp-3.0-ddns-example.patch, dhcp-3.0.3-r9.ebuild, + dhcp-3.0.6.ebuild: + Add 'ddns-update-style ad-hoc;' to the example dhcpd.conf file, #170311 + thanks to Whit Blauvelt. + +*dhcp-3.0.6 (05 Jul 2007) + + 05 Jul 2007; Roy Marples +dhcp-3.0.6.ebuild: + Bump + +*dhcp-3.1.0_alpha3 (26 Apr 2007) + + 26 Apr 2007; Roy Marples +dhcp-3.1.0_alpha3.ebuild: + Bump, #176137 thanks to Attila Jecs. + + 22 Apr 2007; Roy Marples dhcp-3.0.3-r9.ebuild, + dhcp-3.0.5.ebuild, dhcp-3.0.5-r1.ebuild, dhcp-3.1.0_alpha2.ebuild: + newins -> newconfd, #174266. + + 22 Mar 2007; Roy Marples files/dhcrelay.init: + Remove bashisms from dhcrelay script, #171766 thanks to Natanael Copa. + +*dhcp-3.0.5-r1 (10 Mar 2007) + + 10 Mar 2007; Roy Marples files/dhcpd.init, + +dhcp-3.0.5-r1.ebuild: + Bump for a non bash init script for dhcpd, #170084 thanks to Natanael Copa. + + 20 Dec 2006; Roy Marples dhcp-3.0.5.ebuild, + dhcp-3.1.0_alpha2.ebuild: + Stop dhclient-script forcing bash, #158540 thanks to Nick Fortune. + +*dhcp-3.1.0_alpha2 (13 Dec 2006) + + 13 Dec 2006; Roy Marples +dhcp-3.1.0_alpha2.ebuild: + New upstream alpha. + +*dhcp-3.0.5 (06 Nov 2006) + + 06 Nov 2006; Roy Marples +dhcp-3.0.5.ebuild: + New upstream version. + + 17 Oct 2006; Roy Marples dhcp-3.0.5_rc2.ebuild, + dhcp-3.1.0_alpha1.ebuild: + Added ~sparc-fbsd keyword. + + 20 Sep 2006; Roy Marples + +files/dhcp-3.0.5-bpf-nofallback.patch, dhcp-3.0.5_rc2.ebuild, + dhcp-3.1.0_alpha1.ebuild: + Add a patch to stop using a fallback interface when using BPF. + This allows >1 instance of dhclient to run on BSD. + + 13 Sep 2006; Roy Marples dhcp-3.0.4-r2.ebuild, + dhcp-3.0.5_rc2.ebuild, dhcp-3.1.0_alpha1.ebuild: + Quiet the freebsd logger a little + + 08 Sep 2006; Roy Marples files/dhcrelay.conf: + dhcrelay should be configured for all interfaces used for listening and + sending, not just listening. Thanks to rmh3093 in the forums. + +*dhcp-3.1.0_alpha1 (07 Sep 2006) + + 07 Sep 2006; Roy Marples + +files/dhcp-3.1.0a1-dhclient-resolvconf.patch, + +files/dhcp-3.1.0a1-x-option.patch, +dhcp-3.1.0_alpha1.ebuild: + New alpha version. Has FQDN support, wooooo. + + 06 Sep 2006; Roy Marples dhcp-3.0.5_rc2.ebuild: + Just warn about Packet Socket instead of requiring linux sources + + 05 Sep 2006; Roy Marples dhcp-3.0.5_rc2.ebuild: + dhcp requires CONFIG_PACKET to work in linux. + +*dhcp-3.0.5_rc2 (03 Sep 2006) + + 03 Sep 2006; Roy Marples + +dhcp-3.0.5_rc2.ebuild: + Version bump. + + 11 Aug 2006; Thomas Cort dhcp-3.0.3-r9.ebuild: + Stable on alpha wrt Bug #137689. + +*dhcp-3.0.5_beta1 (27 Jul 2006) + + 27 Jul 2006; Roy Marples + files/dhcp-3.0.3-dhclient-hostname.patch, +dhcp-3.0.5_beta1.ebuild: + Version bump and fix hostname patch slightly. + + 09 Jul 2006; Joshua Kinard dhcp-3.0.3-r9.ebuild: + Marked stable on mips. + + 02 Jul 2006; Chris White metadata.xml: + Japanese metadata.xml translation. Thanks to Yoshino-san in bug #134840. + +*dhcp-3.0.4-r2 (28 Jun 2006) + + 28 Jun 2006; Roy Marples + +files/dhcp-3.0.4-64bit.patch, +dhcp-3.0.4-r2.ebuild: + Added patch to fix 64 bit DHCP servers, #133905. + + 25 Jun 2006; Marcus D. Hanwell dhcp-3.0.3-r9.ebuild: + Marked stable on amd64. bug 137689. + + 25 Jun 2006; Guy Martin dhcp-3.0.3-r9.ebuild: + Stable on hppa. + + 25 Jun 2006; Tobias Scherbaum + dhcp-3.0.3-r9.ebuild: + ppc stable, bug #137689 + + 23 Jun 2006; Markus Rothe dhcp-3.0.3-r9.ebuild: + Stable on ppc64; bug #137689 + + 23 Jun 2006; Chris Gianelloni dhcp-3.0.3-r9.ebuild: + Stable on x86 wrt bug #137689. + + 23 Jun 2006; Gustavo Zacarias dhcp-3.0.3-r9.ebuild: + Stable on sparc wrt #137689 + + 09 Jun 2006; -dhcp-3.0.4.ebuild, dhcp-3.0.3-r9.ebuild, + dhcp-3.0.4-r1.ebuild: + minimal USE flag stops the building of the DHCP server + doc USE flag installs the documentation + +*dhcp-3.0.3-r9 (23 May 2006) + + 23 May 2006; Roy Marples + files/dhcp-3.0.3-dhclient-resolvconf.patch, +dhcp-3.0.3-r9.ebuild: + dhclient-script now works with invalid, RFC violating but sometimes used + space seperated domain names, #134101 thanks to Jan Spitalnik. + +*dhcp-3.0.3-r8 (23 May 2006) + + 23 May 2006; Roy Marples +dhcp-3.0.3-r8.ebuild: + As 3.0.4 is a bust for 64-bit servers, push fixes downto 3.0.3-r8. + +*dhcp-3.0.4-r1 (11 May 2006) + + 11 May 2006; Roy Marples files/dhcpd.conf, + files/dhcpd.init, +dhcp-3.0.4-r1.ebuild: + Fixed typo in conf.d/dhcpd and fixed chroot pidfile, #133019 thanks to Hod. + + 10 May 2006; Roy Marples + files/dhcp-3.0.3-dhclient-metric.patch, + files/dhcp-3.0.3-dhclient-no-down.patch: + Tweak patches so that IF_METRIC is applied to the subnet route too. + + 09 May 2006; Roy Marples dhcp-3.0.4.ebuild: + Correct location for default dhclient conf and pid files. + +*dhcp-3.0.4 (05 May 2006) + + 05 May 2006; Roy Marples + +files/dhcp-3.0.4-dhclient-stdin-conf.patch, +dhcp-3.0.4.ebuild: + New upstream release. + +*dhcp-3.0.4_rc1 (21 Apr 2006) +*dhcp-3.0.3-r7 (21 Apr 2006) + + 21 Apr 2006; Roy Marples + +files/dhcp-3.0.3-dhclient-dbus.patch, +files/dhcp-3.0.3-x-option.patch, + +dhcp-3.0.3-r7.ebuild, +dhcp-3.0.4_rc1.ebuild: + New patches for dbus and eXtended option environment support + which should allow us to be used by NetworkManager. + + 20 Apr 2006; Roy Marples + files/dhcp-3.0.3-dhclient-hostname.patch, + files/dhcp-3.0.3-dhclient-metric.patch, + files/dhcp-3.0.3-dhclient-mtu.patch, + +files/dhcp-3.0.3-dhclient-no-down.patch, dhcp-3.0.3-r6.ebuild, + dhcp-3.0.4_beta3-r1.ebuild: + metric patch now applies to ifconfig on all OS's apart from Linux. + Split no down interface into seperate patch. + Make SEDMANPAGES instead of CATMANPAGES, #130251. + + 14 Apr 2006; Diego Pettenò dhcp-3.0.3-r6.ebuild, + dhcp-3.0.4_beta3-r1.ebuild: + Confirm man installation names and category, so that the installed copies on + non-Linux are the same as the ones on Linux. + + 31 Mar 2006; Diego Pettenò dhcp-3.0.3-r6.ebuild: + Add ~x86-fbsd keyword. + + 22 Mar 2006; Roy Marples + files/dhcp-3.0.3-dhclient-hostname.patch, + files/dhcp-3.0.3-dhclient-metric.patch, + files/dhcp-3.0.3-dhclient-mtu.patch, files/dhcp-3.0.3-dhclient-ntp.patch, + files/dhcp-3.0.3-dhclient-resolvconf.patch, dhcp-3.0.3-r6.ebuild, + dhcp-3.0.4_beta3-r1.ebuild: + Tweaked patchset to apply cleanly. + Support PEER_DNS and PEER_NTP options. + + 21 Mar 2006; Diego Pettenò dhcp-3.0.3-r6.ebuild, + dhcp-3.0.4_beta3-r1.ebuild: + Make net-tools a dependency only for linux kernel. + + 21 Mar 2006; Roy Marples + +files/dhcp-3.0.3-dhclient-hostname.patch, + files/dhcp-3.0.3-dhclient-metric.patch, + +files/dhcp-3.0.3-dhclient-mtu.patch, dhcp-3.0.3-r6.ebuild, + dhcp-3.0.4_beta3-r1.ebuild: + Added token ring patch back to 3.0.3-r6, #126971 + Fixed setting hostname on Linux kernels where it reports (none). + dhclient-script now supports interface mtu option. + +*dhcp-3.0.4_beta3-r1 (20 Mar 2006) +*dhcp-3.0.3-r6 (20 Mar 2006) + + 20 Mar 2006; Roy Marples + +files/dhcp-3.0.3-dhclient-metric.patch, + files/dhcp-3.0.3-dhclient-ntp.patch, + +files/dhcp-3.0.3-dhclient-resolvconf.patch, +dhcp-3.0.3-r6.ebuild, + +dhcp-3.0.4_beta3-r1.ebuild: + dhclient-script now supports resolvconf, creates ntp.conf files and uses the + env variable IF_METRIC to set a metric on default routes. + +*dhcp-3.0.4_beta3 (28 Feb 2006) + + 28 Feb 2006; Roy Marples +files/dhcpd.conf, + +files/dhcpd.init, +dhcp-3.0.4_beta3.ebuild: + Version bump. + 3.0.4_beta3 has had the init script and config renamed to dhcpd. + The config file has also changed slightly and the new init script can now be + fully multiplexed as a result. + You *have* to remove the old dhcp init script. + +*dhcp-3.0.4_beta2-r2 (24 Feb 2006) +*dhcp-3.0.3-r5 (24 Feb 2006) + + 24 Feb 2006; Roy Marples + +files/dhcp-3.0.3-dhclient-stdin-conf.patch, + +files/dhcp-3.0.4_beta2-dhclient-stdin-conf.patch, +dhcp-3.0.3-r5.ebuild, + +dhcp-3.0.4_beta2-r2.ebuild: + Added a patch to dhclient so it can read extra config from stdin. + Users won't use this, but baselayout-1.12.0_pre17 will. + +*dhcp-3.0.3-r4 (23 Feb 2006) + + 23 Feb 2006; Roy Marples files/dhcp.init, + +dhcp-3.0.3-r4.ebuild: + Bump for a new init script that fixes non chroots, #123813. + +*dhcp-3.0.3-r3 (23 Feb 2006) + + 23 Feb 2006; Roy Marples files/dhcp.init, + +dhcp-3.0.3-r3.ebuild: + Bump for new init script which fixes CHROOT handling, #122805. + + 18 Feb 2006; Simon Stelling ChangeLog: + stable on amd64 + + 17 Feb 2006; Markus Rothe dhcp-3.0.3-r2.ebuild: + Stable on ppc64; bug #89424 + + 17 Feb 2006; Joseph Jezak dhcp-3.0.3-r2.ebuild: + Marked ppc stable for bug #89424. + + 09 Feb 2006; Gustavo Zacarias dhcp-3.0.3-r2.ebuild: + Stable on sparc wrt #89424 + + 09 Feb 2006; Joshua Kinard dhcp-3.0.3-r2.ebuild: + Marked stable on mips. + + 08 Feb 2006; Mark Loeser dhcp-3.0.3-r2.ebuild: + Stable on x86; bug #89424 + + 07 Feb 2006; Aron Griffis dhcp-3.0.3-r2.ebuild: + Mark 3.0.3-r2 stable on alpha + + 28 Dec 2005; Guy Martin dhcp-3.0.3-r2.ebuild: + No more unaligned access on hppa. Marking stable. + + 22 Dec 2005; Roy Marples dhcp-3.0.4_beta2-r1.ebuild: + Remove script, host-name and domain-name options from the sample dhclient.conf + + 21 Dec 2005; Roy Marples dhcp-3.0.1-r1.ebuild, + dhcp-3.0.3-r2.ebuild, dhcp-3.0.4_beta2-r1.ebuild: + Updated post merge message to use emerge --config, #109482. + +*dhcp-3.0.4_beta2-r1 (14 Dec 2005) +*dhcp-3.0.3-r2 (14 Dec 2005) + + 14 Dec 2005; Roy Marples files/dhcp.init, + -dhcp-3.0.3-r1.ebuild, +dhcp-3.0.3-r2.ebuild, -dhcp-3.0.4_beta2.ebuild, + +dhcp-3.0.4_beta2-r1.ebuild: + Fixed correct owner of lease file, #115554 thanks to Jan Spitalnik. + +*dhcp-3.0.4_beta2 (09 Dec 2005) + + 09 Dec 2005; Roy Marples + +files/dhcp-3.0.3-no_isc_blurb.patch, +dhcp-3.0.4_beta2.ebuild: + New upstream beta release, fixes #101891. + Dropped token ring patch as a better fix has been made upstream. + Added patch to quiet the isc blurb if the -q option is given. + (patch nobbled from RedHat and adapted by me for dhclient and dhcrelay) + Install Japanese documentation if ja is in LINGUAS and en isn't. + Tart up the installed dhclient-script to add a comment saying + that they aren't used when using Gentoo baselayout net scripts. + Branded the binaries with Gentoo revision. + + 09 Dec 2005; Roy Marples dhcp-3.0.3-r1.ebuild: + multilib fixed. + + 07 Dec 2005; Roy Marples dhcp-3.0.3-r1.ebuild: + Fixed sandbox violation, #114753. + +*dhcp-3.0.3-r1 (07 Dec 2005) + + 07 Dec 2005; Roy Marples + +files/dhcp-3.0.3-libdst.patch, +files/dhcp-3.0-fix-perms.patch, + +files/dhcp-3.0-paranoia.patch, files/dhcp.conf, +files/dhcp.init, + files/dhcrelay.conf, +files/dhcrelay.init, metadata.xml, + -dhcp-3.0.2.ebuild, -dhcp-3.0.3.ebuild, +dhcp-3.0.3-r1.ebuild: + Split patches out into FILESDIR. + Stop installing dhclient-script.sample as baselayout has its own. + chroot creation no longer assumes a default directory. + We copy resolv.conf and localtime as a real files into the chroot now. + document resolv.conf in conf.d/dhcp for chroots, #113869. + init script now parses dhcpd.conf for pidfile and leasefile locations, #89428. + libdst.a gets installed now, #75544 thanks to Ron O'Hara. + + 04 Dec 2005; Tom Gall dhcp-3.0.1-r1.ebuild: + stable on ppc64 + +*dhcp-3.0.3 (12 Oct 2005) + + 12 Oct 2005; Roy Marples +files/dhcp-3.0.3-tr.patch, + +files/dhclient-ntp.patch, +dhcp-3.0.3.ebuild: + Version bump + Includes fixes for #102473 (tr.c not compiling, patch by Ed Catmur) + and dhclient ntp support #63868 + + 15 Sep 2005; Aron Griffis dhcp-3.0.1-r1.ebuild: + Mark 3.0.1-r1 stable on alpha + + 04 Sep 2005; Diego Pettenò + +files/dhcp-3.0.2-gmake.patch, dhcp-3.0.2.ebuild: + Added patch to fix wrong 'make' calls on Gentoo/FreeBSD. + + 04 Sep 2005; Diego Pettenò dhcp-3.0.2.ebuild: + Remove -Werror cflag that is passed when building on FreeBSD to fix + Gentoo/FreeBSD. + + 17 Jun 2005; Michael Hanselmann dhcp-3.0.1-r1.ebuild: + Stable on ppc. + + 20 May 2005; Rene Nussbaumer dhcp-3.0.1-r1.ebuild: + Stable on hppa + + 19 May 2005; Gustavo Zacarias dhcp-3.0.1-r1.ebuild: + Stable on sparc + + 17 May 2005; Jan Brinkmann dhcp-3.0.1-r1.ebuild: + stable on amd64 + +*dhcp-3.0.2 (16 May 2005) + + 16 May 2005; Seemant Kulleen + -files/dhcp-3.0.1-fix-invalid-attribute.patch, + -files/dhcp-3.0+paranoia.patch, -files/dhcp-3.0pl2-fix-perms.patch, + dhcp-3.0.1.ebuild, dhcp-3.0.1-r1.ebuild, +dhcp-3.0.2.ebuild: + Version bump thanks to: Bjarke Istrup Pedersen in + bug #88630. Additionally, moved the patches to a tarball on the mirrors. + Configs will probably follow + + 29 Dec 2004; Ciaran McCreesh : + Change encoding to UTF-8 for GLEP 31 compliance + + 20 Dec 2004; files/dhcrelay.conf, files/dhcrelay.rc6: + Fix dhcrelay startup script for proper commandline arguments and proper + shutdown pidfile. Fixes bug #48207. + +*dhcp-3.0.1-r1 (20 Dec 2004) + + 20 Dec 2004; -files/conf.dhcpd, files/dhcp.conf, + files/dhcp.rc6, +dhcp-3.0.1-r1.ebuild: + Removed unused conf.dhcpd file. Move the -q option out of rc6 script into + conf.d file for easier debugging. Add localtime to the chroot setup. Add + commented LD_PRELOAD variable for proper name resoluting inside chroot. Fixes + bug #41217. + + 10 Nov 2004; Travis Tilley + +files/dhcp-3.0.1-fix-invalid-attribute.patch, dhcp-3.0.1.ebuild: + fixed some invalid attributes in includes/dhcpd.h so that dhcp compiles + using gcc 3.4 again. closes bug 69555 + + 17 Oct 2004; Dylan Carlson dhcp-3.0.1.ebuild: + keywords ~amd64. + + 02 Oct 2004; Bryan Østergaard dhcp-3.0.1.ebuild: + Keyword ~alpha, bug 65840. + + 07 Sep 2004; Gustavo Zacarias dhcp-3.0.1.ebuild: + Stable on sparc + +*dhcp-3.0.1 (18 Jul 2004) + + 18 Jul 2004; Mike Frysinger + +files/dhcp-3.0+paranoia.patch, +dhcp-3.0.1.ebuild, dhcp-3.0_p2-r5.ebuild, + dhcp-3.0_p2-r6.ebuild: + Version bump #57347 by Martin Jackson. Also move paranoia patch out of + $DISTDIR and into $FILESDIR. + + 01 Jul 2004; Jon Hood dhcp-3.0_p2-r4.ebuild, + dhcp-3.0_p2-r5.ebuild, dhcp-3.0_p2-r6.ebuild: + change virtual/glibc to virtual/libc + + 27 Apr 2004; Aron Griffis dhcp-3.0_p2-r4.ebuild: + Add inherit eutils + + 06 Apr 2004; Joshua Brindle dhcp-3.0_p2-r4.ebuild, + dhcp-3.0_p2-r5.ebuild, dhcp-3.0_p2-r6.ebuild: + added selinux policy to rdepend + +*dhcp-3.0_p2-r6 (08 Mar 2004) +*dhcp-3.0_p2-r5 (08 Mar 2004) +*dhcp-3.0_p2-r4 (08 Mar 2004) + + 08 Mar 2004; Seemant Kulleen dhcp-3.0_p2-r2.ebuild, + dhcp-3.0_p2-r3.ebuild, dhcp-3.0_p2-r4.ebuild, dhcp-3.0_p2-r5.ebuild, + dhcp-3.0_p2-r6.ebuild, dhcp-3.0_p2.ebuild: + Forced a version bump on these ebuilds. Basically -r0 is now -r4, -r2 is now + -r5 and -r3 is now -r6. The reason for the revision bump was to make this + package PROVIDE virtual/dhcp. Closes a long-standing bloat-reduction request + made on gentoo-dev mailing list by: William Hubbs + at http://article.gmane.org/gmane.linux.gentoo.devel/11579 + + 09 Mar 2004; Bartosch Pixa dhcp-3.0_p2-r2.ebuild: + set ppc in keywords + + 04 Mar 2004; Gustavo Zacarias dhcp-3.0_p2-r3.ebuild: + stable on sparc + + 24 Feb 2004; Max Kalika dhcp-3.0_p2-r3.ebuild: + Bump to stable x86. + + 14 Jan 2004; Max Kalika dhcp-3.0_p2-r3.ebuild, + files/dhcp.rc6, files/dhcrelay.rc6: + Use proper pid file and directory. Fixes bug #35751. + + 14 Jan 2004; Max Kalika dhcp-3.0_p2-r3.ebuild, + files/dhcp.conf, files/dhcp.rc6, files/dhcrelay.conf, files/dhcrelay.rc6: + Add dhcrelay startup script. Contributed by Martin Jackson on bug #33895. + + 14 Jan 2004; Max Kalika dhcp-3.0_p2-r3.ebuild: + Readd the ebuild and chown patch to address bugs #27079 and #36869. + + 05 Jan 2004; Jason Wever dhcp-3.0_p2-r2.ebuild: + Marked stable on sparc. + + 31 Dec 2003; Guy Martin dhcp-3.0_p2-r2.ebuild: + Marked stable on hppa. + + 18 Nov 2003; Max Kalika dhcp-3.0_p2-r2.ebuild: + Some fixes from bug 31840. + + 07 Nov 2003; Max Kalika dhcp-3.0_p2-r3.ebuild, + files/dhcp-3.0pl2-fix-perms.patch: + Remove experimental version. The current stable works correctly. + Finally fixes bug 31840. + +*dhcp-3.0_p2-r3 (05 Nov 2003) + + 05 Nov 2003; Max Kalika dhcp-3.0_p2-r3.ebuild, + files/dhcp-3.0pl2-fix-perms.patch: + Experimental attempt to fix 31840. + + 05 Nov 2003; Max Kalika dhcp-3.0_p2-r2.ebuild, + files/dhcp.rc6: + Use a PID file for startup/shutdown. + + 24 Oct 2003; Max Kalika dhcp-3.0_p2-r2.ebuild: + Fix ownership as part of pkg_postinst(). Fixes bug 31840. + + 22 Oct 2003; Max Kalika dhcp-3.0_p2-r2.ebuild: + Use enewuser() from eutils.eclass. + + 21 Oct 2003; Max Kalika dhcp-3.0_p2-r1.ebuild, + dhcp-3.0_p2-r2.ebuild: + Bump latest to stable x86. + +*dhcp-3.0_p2-r2 (02 Oct 2003) + + 02 Oct 2003; Mike Frysinger : + Add patch to fix user options to dhclient #30049 and add USE=static + support #30026. + + 16 Sep 2003; Max Kalika dhcp-3.0_p2-r1.ebuild: + Set proper ownership on /var/lib/dhcp. + + 13 Aug 2003; Max Kalika dhcp-3.0_p2-r1.ebuild, + files/dhcp.rc6: + Move dhcpd.leases file creation to the startup script. Change "use named" to + "use dns". Other cleanups. + + 25 Jul 2003; lanius@gentoo.org files/dhcp.rc6, files/dhcp.rc7: + added "use named" to rc scripts (bug #25239) + +*dhcp-3.0_p2-r1 (23 Jul 2003) + + 23 Jul 2003; Max Kalika dhcp-3.0_p2-r1.ebuild, + files/dhcp.conf, files/dhcp.rc5, files/dhcp.rc6: + Add support for the dhcp-paranoia patch which allows to run the server + chrooted and under a different user/group id. Remove unused dhcp.rc5 file. + Create a new startup script and dub it dhcp.rc6 as that file isn't currently + used by anything. Other various cleanups. + + 17 Jan 2003; Daniel Ahlberg dhcp-3.0_p2.ebuild : + Unmasked, security update. + +*dhcp-3.0_p2 (15 Jan 2003) + + 01 Mar 2003; Jason Wever dhcp-3.0_p2.ebuild: + Applied fix for bug #11960 to omit -O flags so dhcp will no longer bus error + on sbus sparcs. + + 24 Feb 2003; Nicholas Wourms dhcp-3.0_p2.ebuild : + Added testing mips keyword to the ebuild. + + 15 Jan 2003; Brandon Low dhcp-3.0_p2.ebuild: + Version update, and update the ebuild to automatically assign + it's source name. + +*dhcp-3.0_p1 (29 Dec 2002) + + 24 Feb 2003; Nicholas Wourms dhcp-3.0_p1.ebuild : + Added testing mips keyword to the ebuild. + + 29 Dec 2002; Daniel Robbins : Renamed from 3.0-r4 to + reflect the version (3.0_pl1) of the sources being used. + + 06 Dec 2002; Rodney Rees : changed sparc ~sparc keywords + +*dhcp-3.0-r4 (21 Sep 2002) + + 21 Sep 2002; Mike Frysinger dhcp-3.0-r4.ebuild, dhclient.c-3.0-dw-cli-fix.patch, digest-dhcp-3.0-r4 + + Added a small patch per #8088 to fix the -nw bug (patch comes from upstream) + +*dhcp-3.0-r3 (16 Jun 2002) + + 03 Sep 2002; Brandon Low dhcp-3.0-r3.ebuild, files/conf.dhcp, + files/dhcp.rc7, digest-dhcp-3.0-r3: + + Update ebuild to touch dhcp.leases, fix config and init.d files + to work more sanely. + +*dhcp-3.0-r2 (16 Jun 2002) + + 21 Jul 2002; Owen Stampflee : + + Added PPC to KEYWORDS. + + + 6 Jul 2002; phoen][x : dhcp-3.0-r2.ebuild: + Added KEYWORDS. + + 16 Jun 2002; Brandon Low : dhcp-3.0-r2.ebuild: + + This moves the definition of which ethernet ports to listen on to + /etc/conf.d where it should be this is prettier now thank TrAns13nT + for making fix this bug. + +*dhcp-3.0-r1 (6 July 2002) + + 6 Jul 2002; phoen][x : dhcp-3.0-r1.ebuild: + Added KEYWORDS. + +*dhcp-3.0 (14 Feb 2002) + + 6 Jul 2002; phoen][x : dhcp-3.0.ebuild: + Added KEYWORDS, SLOTS. + + 14 Feb 2002; Daniel Robbins : New 3.0 release. + +*dhcp-3.0_rc12-r6 (1 Feb 2002) + + 1 Feb 2002; G.Bevin ChangeLog : + + Added initial ChangeLog which should be updated whenever the package is + updated in any way. This changelog is targetted to users. This means that the + comments should well explained and written in clean English. The details about + writing correct changelogs are explained in the skel.ChangeLog file which you + can find in the root directory of the portage repository. diff --git a/net-misc/dhcp/Manifest b/net-misc/dhcp/Manifest new file mode 100644 index 0000000..21ac3b5 --- /dev/null +++ b/net-misc/dhcp/Manifest @@ -0,0 +1,33 @@ +AUX dhcp-3.0-fix-perms.patch 485 RMD160 3857270dffed5feee95609aeb37d0c9ef8844945 SHA1 1217265a8a7f1416b781e9f79e8dfb8304268e6c SHA256 a805a60b36e148886887aebb797e80f642386b3e55ef4a0b5132f96a2877e018 +AUX dhcp-3.0-paranoia.patch 5366 RMD160 7c64e3dac5b07ff3859fcaa7a8b0e52a0c50446c SHA1 a30103c138e480766f84644fffb1d0897709c27d SHA256 a8db9eb98397a9c1b3a0de07fc107c39dc4f6a4a331d404fc6fcc4a8dbc7aeae +AUX dhcp-3.0.2-gmake.patch 1872 RMD160 d2d41c0a7e002103d68605d2492bfe716bb2889e SHA1 f60c89233f06ca8554cd5cc9ed0301b597a724f7 SHA256 b2bbfc1d1f5b4d03ff3f53b3974ec32731e5f626de8f8d127328591e4c721215 +AUX dhcp-3.0.3-dhclient-dbus.patch 2774 RMD160 250582d89894a58a297786c4a6884b54219c4b6f SHA1 74760ca00712ff529e6b97457408515098563f88 SHA256 d70292c5b61648ba5970ab436429ced33e807bd6f68ba06dcd2b9d4073b02ea4 +AUX dhcp-3.0.3-dhclient-hostname.patch 523 RMD160 38c20bcc417822ae858626eb5d0eaf7e669c1ca0 SHA1 5d2c3a1da74a1d151c9fbf08e01e4545e989078c SHA256 57c09edd2bf48cd65745e3b14499f7f3c26d529f60fd2ab122887ae968e26bbd +AUX dhcp-3.0.3-dhclient-metric.patch 7270 RMD160 04187868f66e03a62dafd31b4cdcdd2029283ce5 SHA1 1d726d1526ae97adbdf1b259bb55e05145060375 SHA256 7e5ace014ed55d7d4e90a6cdac7dec4842ea9d178bb19bf6cdccf295eba9da7d +AUX dhcp-3.0.3-dhclient-mtu.patch 6413 RMD160 2517c7fe58d7dca95bdbdc80e96b6260cc205e56 SHA1 da342800bafee86726570aa0a5e4e3c8bd5f1371 SHA256 0a4bff3c4c44252125f66a3a4423f677465592b84a8f7f500bad9ba4e3b5cb06 +AUX dhcp-3.0.3-dhclient-no-down.patch 2332 RMD160 26d0c88534b71070e81c86c12b76a2b4ec7c9c2c SHA1 b2a00d46754414e937dc6c3d63a28b63b3b57ac9 SHA256 a5a67de79f6435d9bc4eeea416aff7a904ab567e5e8d75ecf34495bc9f2c5a44 +AUX dhcp-3.0.3-dhclient-ntp.patch 5862 RMD160 73d001b7b2df36cf84aba9db76a1753c8d423a7d SHA1 cc3db6430f07f956c2ad25ed00e47d468eef2600 SHA256 80ab30eee75fb03c099416c25f031d03744011a582e8940c73077d5ee587c1ee +AUX dhcp-3.0.3-dhclient-resolvconf.patch 6659 RMD160 27e6d97ca0ca52fc85abeb4f21f4cea526cbffcb SHA1 d4808b4ba195a2fe1232136c2e36fb534a4c07c3 SHA256 3e2ec3758f6a56658aa1ef9c8ab29f655716015f0c75eba022fa6e1a5e28b1ac +AUX dhcp-3.0.3-libdst.patch 322 RMD160 5216c754a912cfcfc65683afcf44dbe1a7871212 SHA1 804bab67ae06269336c51183d5ff1e8ba45c20b5 SHA256 68e9a081739736980c0ad834dfa6197f940982f53d4d16054715c0346b5b9eca +AUX dhcp-3.0.3-no_isc_blurb.patch 3002 RMD160 d70f89e1763bfeb23ce8f09399426983df01f7c8 SHA1 99a9fe69988226d29ccc6c2dc745ffab9b66817c SHA256 09c451cd9667fc8effcecd640f4cbe8629d41f6abacf9d1f2f923aab1f6e0bbb +AUX dhcp-3.0.4-dhclient-stdin-conf.patch 2176 RMD160 fae08899f6b57da3ec7ab0068e288bbdf2fbf2ae SHA1 c10c35dcf4a94f45f4bc98147a70e9dcf3f01dd5 SHA256 80141fe71e52774f1c7b1a02f2cbd49bc646f19753ceefc1c3605104df0cae5f +AUX dhcp-3.0.5-bpf-nofallback.patch 1473 RMD160 1a5ece77cb481416935b0d2eea53e85dc4c4ee93 SHA1 d4cad638075a98606e07c633551c8a1d2f78f2e7 SHA256 b215c5ff4a282b475f28168250c05bbbc85e7c37e7af92616571d499b8c14da6 +AUX dhcp-4.0-dhclient-metric.patch 8100 RMD160 cd599d5523be30809024b8e0f81cd84e4d932317 SHA1 ba9ff19cc5274b0e3e8408eba4725e0546413954 SHA256 a1c5589ac1c57ba7fe66336646f4286ebd7112f05abf5ae59b69ff26e7409afc +AUX dhcp-4.0-dhclient-ntp.patch 7966 RMD160 d6dd1c3363f06712a82231eae1eb559f5a45bbb5 SHA1 3c1b373c6649c1ccb44f205fbee116c134514f4e SHA256 e93bda7f2baae9163f96ab0408bfbe885caa96a8698f9e566b8a9dc04de9359b +AUX dhcp-4.0-dhclient-resolvconf.patch 14516 RMD160 0a53cbb795c4d4989f5632b6314b69be5bd94611 SHA1 e1db8ecca4de1c45fcec7e93fb13d186931d74f6 SHA256 1cdbb9ed297426b2d44063ffb8642c9c5cdf54dc2f9c3c8f59100f4ab2c40986 +AUX dhcp-4.0-dhclient-script-correct-operators.patch 1382 RMD160 3a37a68c5e9ab44b6f885e1e644f6138557ba45c SHA1 c5459430398b9c92ce9585672860abc6d247c451 SHA256 f5f1a75e9873b141d4b0a0f4fde911e6dfdddf13985e28e1789029ef7a072dfb +AUX dhcp-4.0-linux-ipv6-header.patch 817 RMD160 cd395ba33c6e729862af7a3c869d412e91ad5b41 SHA1 1e268892009a58caa8b6030be192a25583a96dd5 SHA256 dbb6f22c99dcf31fd91f89061398dea194476d37a1e328736adaff6fe2f00c6d +AUX dhcp-4.0-no_isc_blurb.patch 2748 RMD160 f29d8705fab63320c18c6319dd5703a51acc1687 SHA1 d8af8f4567e4bdbfac5d8e5455dede87a188ad40 SHA256 603e9a6f28264e35513f40f987d10e4fdce6d5e4f8d48aa46f83b8687d57dff0 +AUX dhcp-4.0-paranoia.patch 4996 RMD160 2f8339e3d8af9164c91cc5a3bab7605ecd728295 SHA1 94db8a07b82b69d0a05645b08ef5d0ec0b99bd19 SHA256 14d328d400cdc1b4d7d6329d9c8e997b2c5e76e8f21330e267a75d6240799058 +AUX dhcp-4.0.1-dhclient-stdin-conf.patch 2965 RMD160 2c3dd3994f0a7f15f3fe51972dd04a2e6055613a SHA1 f4a9d51126ea489f75fcf29053ab432b68e5055d SHA256 0b25bc74ae258656dd1f0e6f4ffd6b4ef8b4ad56956624c0b6070941a180e57c +AUX dhcpd.conf 1092 RMD160 936bb112c7cdf8e669b695599252d1f6626be2f3 SHA1 cbabbcea73a0cbc9692462683b983c96d6f18b0c SHA256 b86d27e0560689057b01a352474582fceb3a398eaf3b17f901378ec56284c4d5 +AUX dhcpd.init 1989 RMD160 7f6b6858020100e47efa5d6a0809b2959e551249 SHA1 2c611adc6425fd095740aa56d09d8aafb4fea58a SHA256 916bfeb81dcb3423fd4239270ac2dce2e6dc105b28a06e03b352f6bf6b30ed1e +AUX dhcrelay.conf 421 RMD160 456edbc9bcc8d3a44db5bb6dbf0c3003c3e7419c SHA1 78ecdb000382893fb49d0052ced063955b0ad9cf SHA256 409b895ed489e75c1a08f72961b45d641b93fd9357f528abc78b1fd036b7f730 +AUX dhcrelay.init 736 RMD160 04566b87bd6dbb8bb754b26409ca30b878ef3ca3 SHA1 72742b308314b2e1476b27e94212fbf4d179adc4 SHA256 cfdaff3a723be3935d06c14e171d4008f2ad3329bd05ac2e49c19bc0e14bc59c +DIST dhcp-3.1.2.tar.gz 799626 RMD160 026ac48b176ec273397fafa8a834a21fd6331681 SHA1 a60cccec2402a35025ddaafc8ac896595188560e SHA256 80daba1e4ac220a0945778aa3c1c9eb7860c4426645660bebb8ed35a3231a2fb +DIST dhcp-4.0.1.tar.gz 1050570 RMD160 a9764a76d105778362fe4b58e77783331ee3448a SHA1 7d813740ab4a64e474f1c01b1395617987532ed1 SHA256 965d09a7759250eff7d6d06d37425ea085c14edb5b405f8357ef5ec72ded28ef +DIST ldap-for-dhcp-4.0.1-1.tar.gz 39164 RMD160 451edcf646e56cfbaec18303e9ad6f36e36f1e38 SHA1 19a4b7e5a33d298ec6948554623fdf96016f681f SHA256 0a2bc6d28f6c9f7b081ff1f832e8411d846a17e96b0493459f4ec9ab87a2ed36 +EBUILD dhcp-3.1.2.ebuild 7431 RMD160 ca3c7fb4df1e1963fd27d55fc98f6bec58ff7f96 SHA1 15a47aed16897223c8f71f46b4e99c4fcce188de SHA256 9742d2213eb1a07dcdb327288a5963cbc94e555a346b18a9f5f6766bdfd05810 +EBUILD dhcp-4.0.1.ebuild 7530 RMD160 4c35e387614c3f29caf3beabf9c9a0918bef5bc1 SHA1 2a969dab197ec446b350af5bbe1c4dba09efe806 SHA256 6a99c7d4604c0df7d0d034903a96296a70f5a3b3582ea79a3402526137650a8f +MISC ChangeLog 27273 RMD160 8377f2d70df0d413227658d5cca9c197cf5a345e SHA1 354c9cc8d07341e3ae3a9b3f1a38ffca625b9ec2 SHA256 9b7c91000bf3abbc2211873ca4f79c40d4a1dffafe80c443bfd6288ed68451ea +MISC metadata.xml 358 RMD160 97ecd4b6ee0a24352a71a66d5ad4fd82481156b4 SHA1 d80da2cf7c6892cdad6b681fda29e46472d68871 SHA256 8665f24cdfcc09576b595f8bd257333ff5f9ea7ee0ca2925ba6fb74d90e12415 diff --git a/net-misc/dhcp/dhcp-3.1.2.ebuild b/net-misc/dhcp/dhcp-3.1.2.ebuild new file mode 100644 index 0000000..4fbb41b --- /dev/null +++ b/net-misc/dhcp/dhcp-3.1.2.ebuild @@ -0,0 +1,238 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.1.1.ebuild,v 1.9 2008/11/05 00:41:46 vapier Exp $ + +inherit eutils flag-o-matic multilib toolchain-funcs + +MY_PV="${PV//_alpha/a}" +MY_PV="${MY_PV//_beta/b}" +MY_PV="${MY_PV//_rc/rc}" +MY_P="${PN}-${MY_PV}" +DESCRIPTION="ISC Dynamic Host Configuration Protocol" +HOMEPAGE="http://www.isc.org/products/DHCP" +SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz" + +LICENSE="isc-dhcp" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ~mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd" +IUSE="doc minimal static selinux kernel_linux" + +DEPEND="selinux? ( sec-policy/selinux-dhcp ) + kernel_linux? ( sys-apps/net-tools )" + +PROVIDE="virtual/dhcpc" + +S="${WORKDIR}/${MY_P}" + +src_unpack() { + unpack ${A} + cd "${S}" + + # Gentoo patches - these will probably never be accepted upstream + # Enable chroot support + epatch "${FILESDIR}/${PN}"-3.0-paranoia.patch + # Fix some permission issues + epatch "${FILESDIR}/${PN}"-3.0-fix-perms.patch + # Enable dhclient to equery NTP servers + epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-ntp.patch + # resolvconf support in dhclient-script + epatch "${FILESDIR}/${PN}"-3.1.0a1-dhclient-resolvconf.patch + # Fix setting hostnames on Linux + epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-hostname.patch + # Allow mtu settings + epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-mtu.patch + # Allow dhclient to use IF_METRIC to set route metrics + epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-metric.patch + # Stop downing the interface on Linux as that breaks link dameons + # such as wpa_supplicant and netplug + epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-no-down.patch + # Quiet the isc blurb + epatch "${FILESDIR}/${PN}"-3.0.3-no_isc_blurb.patch + # Enable dhclient to get extra configuration from stdin + epatch "${FILESDIR}/${PN}"-3.0.4-dhclient-stdin-conf.patch + # Disable fallback interfaces when using BPF + # This allows more than one dhclient instance on the BSD's + epatch "${FILESDIR}/${PN}"-3.0.5-bpf-nofallback.patch + + # General fixes which will probably be accepted upstream eventually + # Install libdst, #75544 + epatch "${FILESDIR}/${PN}"-3.0.3-libdst.patch + # Fix building on Gentoo/FreeBSD + epatch "${FILESDIR}/${PN}"-3.0.2-gmake.patch + + # NetworkManager support patches + # If they fail to apply to future versions they will be dropped + # Add dbus support to dhclient + epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch + + # Brand the version with Gentoo + # include revision if >0 + local newver="${MY_PV}-Gentoo" + [[ ${PR} != "r0" ]] && newver="${newver}-${PR}" + sed -i '/^#define DHCP_VERSION[ \t]\+/ s/'"${MY_PV}/${newver}/g" \ + includes/version.h || die + + # Change the hook script locations of the scripts + sed -i -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \ + -e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \ + client/scripts/* || die + + # No need for the linux script to force bash, #158540. + sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die + + # Quiet the freebsd logger a little + sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die + + # Remove these options from the sample config + sed -i -e "/\(script\|host-name\|domain-name\) / d" \ + client/dhclient.conf || die + + # Build sed man pages as we don't ever support BSD 4.4 and older, #130251. + local x= + for x in Makefile.dist $(ls */Makefile.dist) ; do + sed -i -e 's/$(CATMANPAGES)/$(SEDMANPAGES)/g' "${x}" || die + done + + # Only install different man pages if we don't have en + if [[ " ${LINGUAS} " != *" en "* ]]; then + # Install Japanese man pages + if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then + einfo "Installing Japanese documention" + cp doc/ja_JP.eucJP/dhclient* client + cp doc/ja_JP.eucJP/dhcp* common + fi + fi + + # Now remove the non-english docs so there are no errors later + [[ -d doc/ja_JP.eucJP ]] && rm -rf doc/ja_JP.eucJP +} + +src_compile() { + use static && append-ldflags -static + + cat <<-END >> includes/site.h + #define _PATH_DHCPD_CONF "/etc/dhcp/dhcpd.conf" + #define _PATH_DHCPD_PID "/var/run/dhcp/dhcpd.pid" + #define _PATH_DHCPD_DB "/var/lib/dhcp/dhcpd.leases" + #define _PATH_DHCLIENT_CONF "/etc/dhcp/dhclient.conf" + #define _PATH_DHCLIENT_DB "/var/lib/dhcp/dhclient.leases" + #define _PATH_DHCLIENT_PID "/var/run/dhcp/dhclient.pid" + #define DHCPD_LOG_FACILITY LOG_LOCAL1 + END + + cat <<-END > site.conf + CC = $(tc-getCC) + LFLAGS = ${LDFLAGS} + LIBDIR = /usr/$(get_libdir) + INCDIR = /usr/include + ETC = /etc/dhcp + VARDB = /var/lib/dhcp + VARRUN = /var/run/dhcp + 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 + END + + ./configure --copts "-DPARANOIA -DEARLY_CHROOT ${CFLAGS}" \ + || die "configure failed" + + # Remove server support from the Makefile + # We still install some extra crud though + if use minimal ; then + sed -i -e 's/\(server\|relay\|dhcpctl\)/ /g' work.*/Makefile || die + fi + emake || die "compile problem" +} + +src_install() { + make install DESTDIR="${D}" || die + use doc && dodoc README RELNOTES doc/* + + insinto /etc/dhcp + newins client/dhclient.conf dhclient.conf.sample + keepdir /var/{lib,run}/dhcp + + # Install our server files + if ! use minimal ; then + insinto /etc/dhcp + newins server/dhcpd.conf dhcpd.conf.sample + newinitd "${FILESDIR}"/dhcpd.init dhcpd + newinitd "${FILESDIR}"/dhcrelay.init dhcrelay + newconfd "${FILESDIR}"/dhcpd.conf dhcpd + newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay + + # We never want portage to own this file + rm -f "${D}"/var/lib/dhcp/dhcpd.leases + fi +} + +pkg_preinst() { + if ! use minimal ; then + enewgroup dhcp + enewuser dhcp -1 -1 /var/lib/dhcp dhcp + fi +} + +pkg_postinst() { + use minimal && return + + chown dhcp:dhcp "${ROOT}"/var/{lib,run}/dhcp + + if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then + ewarn + ewarn "WARNING: The dhcp init script has been renamed to dhcpd" + ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and" + ewarn "and dhcp should be removed from the default runlevel" + ewarn + fi + + einfo "You can edit /etc/conf.d/dhcpd to customize dhcp settings." + einfo + einfo "If you would like to run dhcpd in a chroot, simply configure the" + einfo "DHCPD_CHROOT directory in /etc/conf.d/dhcpd and then run:" + einfo " emerge --config =${PF}" +} + +pkg_config() { + if use minimal ; then + eerror "${PN} has not been compiled for server support" + eerror "emerge ${PN} without the minimal USE flag to use dhcp sever" + return 1 + fi + + local CHROOT="$( + sed -n -e 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \ + "${ROOT}"/etc/conf.d/dhcpd + )" + + if [[ -z ${CHROOT} ]]; then + eerror "CHROOT not defined in /etc/conf.d/dhcpd" + return 1 + fi + + CHROOT="${ROOT}/${CHROOT}" + + if [[ -d ${CHROOT} ]] ; then + ewarn "${CHROOT} already exists - aborting" + return 0 + fi + + ebegin "Setting up the chroot directory" + mkdir -m 0755 -p "${CHROOT}/"{dev,etc,var/lib,var/run/dhcp} + cp /etc/{localtime,resolv.conf} "${CHROOT}"/etc + cp -R /etc/dhcp "${CHROOT}"/etc + cp -R /var/lib/dhcp "${CHROOT}"/var/lib + ln -s ../../var/lib/dhcp "${CHROOT}"/etc/dhcp/lib + chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp + eend 0 + + local logger="$(best_version virtual/logger)" + einfo "To enable logging from the dhcpd server, configure your" + einfo "logger (${logger}) to listen on ${CHROOT}/dev/log" +} diff --git a/net-misc/dhcp/dhcp-4.0.1.ebuild b/net-misc/dhcp/dhcp-4.0.1.ebuild new file mode 100644 index 0000000..91a5c3a --- /dev/null +++ b/net-misc/dhcp/dhcp-4.0.1.ebuild @@ -0,0 +1,235 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.0.1.ebuild,v 1.1 2009/03/30 13:13:28 chainsaw Exp $ + +inherit eutils flag-o-matic autotools + +LDAP_PV="4.0.1-1" + +MY_PV="${PV//_alpha/a}" +MY_PV="${MY_PV//_beta/b}" +MY_PV="${MY_PV//_rc/rc}" +MY_P="${PN}-${MY_PV}" +MY_LDAP_PV="${LDAP_PV//-*/}" + +DESCRIPTION="ISC Dynamic Host Configuration Protocol" +HOMEPAGE="http://www.isc.org/products/DHCP" +SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz + http://dcantrel.fedorapeople.org/dhcp/ldap-patch/ldap-for-dhcp-${LDAP_PV}.tar.gz" + +LICENSE="isc-dhcp" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" +IUSE="doc ipv6 selinux kernel_linux vim-syntax ldap ssl" + +DEPEND="selinux? ( sec-policy/selinux-dhcp ) + kernel_linux? ( sys-apps/net-tools ) + vim-syntax? ( app-vim/dhcpd-syntax ) + ldap? ( net-nds/openldap ) + ssl? ( dev-libs/openssl )" + +PROVIDE="virtual/dhcpc" + +S="${WORKDIR}/${MY_P}" + +src_unpack() { + unpack ${A} + cd "${S}" + + # Gentoo patches - these will probably never be accepted upstream + # Enable chroot support + epatch "${FILESDIR}/${PN}"-4.0-paranoia.patch + # Fix some permission issues + epatch "${FILESDIR}/${PN}"-3.0-fix-perms.patch + # Enable dhclient to equery NTP servers + epatch "${FILESDIR}/${PN}"-4.0-dhclient-ntp.patch + # resolvconf support in dhclient-script + epatch "${FILESDIR}/${PN}"-4.0-dhclient-resolvconf.patch + # Fix setting hostnames on Linux + epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-hostname.patch + # Allow mtu settings + epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-mtu.patch + # Allow dhclient to use IF_METRIC to set route metrics + epatch "${FILESDIR}/${PN}"-4.0-dhclient-metric.patch + # Stop downing the interface on Linux as that breaks link daemons + # such as wpa_supplicant and netplug + epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-no-down.patch + # Quiet the isc blurb + epatch "${FILESDIR}/${PN}"-4.0-no_isc_blurb.patch + # Enable dhclient to get extra configuration from stdin + epatch "${FILESDIR}/${PN}"-4.0.1-dhclient-stdin-conf.patch + # Disable fallback interfaces when using BPF + # This allows more than one dhclient instance on the BSD's + epatch "${FILESDIR}/${PN}"-3.0.5-bpf-nofallback.patch + # This allows the software to actually compile on linux + epatch "${FILESDIR}/${PN}"-4.0-linux-ipv6-header.patch + # Consistent style for the if statements, also resolves + # unary operator expected warnings (new style is wrong). + epatch "${FILESDIR}/${PN}"-4.0-dhclient-script-correct-operators.patch + + # NetworkManager support patches + # If they fail to apply to future versions they will be dropped + # Add dbus support to dhclient + epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch + + # Ldap patch for dhcp + epatch "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}/dhcp-${MY_LDAP_PV}"-ldap.patch + + # Brand the version with Gentoo + # include revision if >0 + local newver="Gentoo" + [[ ${PR} != "r0" ]] && newver="${newver}-${PR}" + + sed -i "/AC_INIT/s/\(\[[0-9]\+\.[0-9]\+\.[0-9]\+\)/\1-${newver}/" \ + configure.ac || die + + # Change the hook script locations of the scripts + sed -i -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \ + -e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \ + client/scripts/* || die + + # No need for the linux script to force bash, #158540. + sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die + + # Quiet the freebsd logger a little + sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die + + # Remove these options from the sample config + sed -i -e "/\(script\|host-name\|domain-name\) / d" \ + client/dhclient.conf || die + + # Only install different man pages if we don't have en + if [[ " ${LINGUAS} " != *" en "* ]]; then + # Install Japanese man pages + if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then + einfo "Installing Japanese documention" + cp doc/ja_JP.eucJP/dhclient* client + cp doc/ja_JP.eucJP/dhcp* common + fi + fi + + # Now remove the non-english docs so there are no errors later + [[ -d doc/ja_JP.eucJP ]] && rm -rf doc/ja_JP.eucJP + + eautoreconf +} + +src_compile() { + econf \ + --enable-paranoia \ + --sysconfdir /etc/dhcp \ + --with-cli-pid-file=/var/run/dhcp/dhclient.pid \ + --with-cli-lease-file=/var/lib/dhcp/dhclient.leases \ + --with-srv-pid-file=/var/run/dhcp/dhcpd.pid \ + --with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \ + --with-relay-pid-file=/var/run/dhcp/dhcrelay.pid \ + $(use_enable ipv6 dhcpv6) \ + $(use_with ldap) \ + $(use_with ssl ldapcrypto) \ + || die + + emake || die "compile problem" +} + +src_install() { + for installdir in includes tests common minires dst omapip client dhcpctl relay server; do + cd "${S}/${installdir}" + if [ "${installdir}" == client ]; then + make install DESTDIR="${D}" exec_prefix="" || die + else + make install DESTDIR="${D}" exec_prefix="/usr" || die + fi + done + + cd "${S}" + + exeinto /sbin + if use kernel_linux; then + newexe "${S}"/client/scripts/linux dhclient-script + else + newexe "${S}"/client/scripts/freebsd dhclient-script + fi + + if use doc; then + dodoc README RELNOTES doc/* + use ldap && dodoc "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/README.ldap "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/draft-ietf-dhc-ldap-schema-01.txt + use ldap && newdoc "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/LICENSE LICENSE.ldap + fi + insinto /etc/dhcp + newins client/dhclient.conf dhclient.conf.sample + keepdir /var/{lib,run}/dhcp + + # Install our server files + insinto /etc/dhcp + newins server/dhcpd.conf dhcpd.conf.sample + newinitd "${FILESDIR}"/dhcpd.init dhcpd + newinitd "${FILESDIR}"/dhcrelay.init dhcrelay + newconfd "${FILESDIR}"/dhcpd.conf dhcpd + newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay + + # install ldap files + if use ldap; then + insinto /etc/openldap/schema + doins "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcp.schema + dosbin "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcpd-conf-to-ldap + fi + + + # We never want portage to own this file + rm -f "${D}"/var/lib/dhcp/dhcpd.leases +} + +pkg_preinst() { + enewgroup dhcp + enewuser dhcp -1 -1 /var/lib/dhcp dhcp +} + +pkg_postinst() { + chown dhcp:dhcp "${ROOT}"/var/{lib,run}/dhcp + + if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then + ewarn + ewarn "WARNING: The dhcp init script has been renamed to dhcpd" + ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and" + ewarn "and dhcp should be removed from the default runlevel" + ewarn + fi + + einfo "You can edit /etc/conf.d/dhcpd to customize dhcp settings." + einfo + einfo "If you would like to run dhcpd in a chroot, simply configure the" + einfo "DHCPD_CHROOT directory in /etc/conf.d/dhcpd and then run:" + einfo " emerge --config =${PF}" +} + +pkg_config() { + local CHROOT="$( + sed -n -e 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \ + "${ROOT}"/etc/conf.d/dhcpd + )" + + if [[ -z ${CHROOT} ]]; then + eerror "CHROOT not defined in /etc/conf.d/dhcpd" + return 1 + fi + + CHROOT="${ROOT}/${CHROOT}" + + if [[ -d ${CHROOT} ]] ; then + ewarn "${CHROOT} already exists - aborting" + return 0 + fi + + ebegin "Setting up the chroot directory" + mkdir -m 0755 -p "${CHROOT}/"{dev,etc,var/lib,var/run/dhcp} + cp /etc/{localtime,resolv.conf} "${CHROOT}"/etc + cp -R /etc/dhcp "${CHROOT}"/etc + cp -R /var/lib/dhcp "${CHROOT}"/var/lib + ln -s ../../var/lib/dhcp "${CHROOT}"/etc/dhcp/lib + chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp + eend 0 + + local logger="$(best_version virtual/logger)" + einfo "To enable logging from the dhcpd server, configure your" + einfo "logger (${logger}) to listen on ${CHROOT}/dev/log" +} diff --git a/net-misc/dhcp/files/dhcp-3.0-fix-perms.patch b/net-misc/dhcp/files/dhcp-3.0-fix-perms.patch new file mode 100644 index 0000000..13debb2 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-3.0-fix-perms.patch @@ -0,0 +1,15 @@ +--- server/dhcpd.c 2003-11-05 14:08:09.000000000 -0800 ++++ server/dhcpd.c 2003-11-05 14:15:32.000000000 -0800 +@@ -602,6 +602,12 @@ + if (lftest) + exit (0); + ++#if defined (PARANOIA) ++ /* Set proper permissions... */ ++ if (lchown (path_dhcpd_db, set_uid, set_gid)) ++ log_fatal ("lchown(%s, %d, %d): %m", path_dhcpd_db, (int) set_uid, (int) set_gid); ++#endif /* PARANOIA */ ++ + /* Discover all the network interfaces and initialize them. */ + discover_interfaces (DISCOVER_SERVER); + diff --git a/net-misc/dhcp/files/dhcp-3.0-paranoia.patch b/net-misc/dhcp/files/dhcp-3.0-paranoia.patch new file mode 100644 index 0000000..886f5cb --- /dev/null +++ b/net-misc/dhcp/files/dhcp-3.0-paranoia.patch @@ -0,0 +1,207 @@ + +paranoia (non-root/chroot) patch for ISC dhcp 3.0 +file to patch: dhcp-3.0/server/dhcpd.c + +update from paranoia patch for ISC dhcp 2.0 + +Adds 3 options: + + -user + -group + -chroot + +Notes: + -DPARANOIA must be passed as an argument to the --copts option + of configure. Otherwise, the paranoia code will not be compiled + in. Example: ./configure --copts -DPARANOIA + + The chroot() call has been delayed in order to allow /dev/log to + be reopened after the configuration file has been read. This is + beneficial for systems on which /dev/log is a unix domain socket. + The main side effect is that dhcpd.conf should be placed in /etc, + instead of /etc. + + If dhcpd is to be run on a sysV-style architecture (or, more + generally, if /dev/log is a character device), one may opt to + create the /dev/log character device and add + -DEARLY_CHROOT to the --copts option of configure (in addition to + -DPARANOIA). This will perform the chroot() call at the earliest + convenience (before reading the configuration file). + + If the -user option is used, the lease and pid file directories + should be writable to the server process after it drops + privileges. + + +ari edelkind (12/10/2001) +last modified 12/10/2001 + + +--- dhcp-3.0/server/dhcpd.c Thu Jun 21 22:12:58 2001 ++++ dhcp-3.0+paranoia/server/dhcpd.c Wed Oct 17 08:23:00 2001 +@@ -56,6 +56,16 @@ + #include "version.h" + #include + ++#if defined (PARANOIA) ++# include ++# include ++# include ++/* get around the ISC declaration of group */ ++# define group real_group ++# include ++# undef group ++#endif /* PARANOIA */ ++ + static void usage PROTO ((void)); + + TIME cur_time; +@@ -204,6 +214,22 @@ + omapi_object_dereference (&listener, MDL); + } + ++#if defined (PARANOIA) ++/* to be used in one of two possible scenarios */ ++static void setup_chroot (char *chroot_dir) { ++ if (geteuid()) ++ log_fatal ("you must be root to use chroot"); ++ ++ if (chroot(chroot_dir)) { ++ log_fatal ("chroot(\"%s\"): %m", chroot_dir); ++ } ++ if (chdir ("/")) { ++ /* probably permission denied */ ++ log_fatal ("chdir(\"/\"): %m"); ++ } ++} ++#endif /* PARANOIA */ ++ + int main (argc, argv, envp) + int argc; + char **argv, **envp; +@@ -236,6 +262,14 @@ + char *traceinfile = (char *)0; + char *traceoutfile = (char *)0; + #endif ++#if defined (PARANOIA) ++ char *set_user = 0; ++ char *set_group = 0; ++ char *set_chroot = 0; ++ ++ uid_t set_uid = 0; ++ gid_t set_gid = 0; ++#endif /* PARANOIA */ + + /* Make sure we have stdin, stdout and stderr. */ + status = open ("/dev/null", O_RDWR); +@@ -298,6 +332,20 @@ + if (++i == argc) + usage (); + server = argv [i]; ++#if defined (PARANOIA) ++ } else if (!strcmp (argv [i], "-user")) { ++ if (++i == argc) ++ usage (); ++ set_user = argv [i]; ++ } else if (!strcmp (argv [i], "-group")) { ++ if (++i == argc) ++ usage (); ++ set_group = argv [i]; ++ } else if (!strcmp (argv [i], "-chroot")) { ++ if (++i == argc) ++ usage (); ++ set_chroot = argv [i]; ++#endif /* PARANOIA */ + } else if (!strcmp (argv [i], "-cf")) { + if (++i == argc) + usage (); +@@ -397,6 +445,44 @@ + trace_seed_stop, MDL); + #endif + ++#if defined (PARANOIA) ++ /* get user and group info if those options were given */ ++ if (set_user) { ++ struct passwd *tmp_pwd; ++ ++ if (geteuid()) ++ log_fatal ("you must be root to set user"); ++ ++ if (!(tmp_pwd = getpwnam(set_user))) ++ log_fatal ("no such user: %s", set_user); ++ ++ set_uid = tmp_pwd->pw_uid; ++ ++ /* use the user's group as the default gid */ ++ if (!set_group) ++ set_gid = tmp_pwd->pw_gid; ++ } ++ ++ if (set_group) { ++/* get around the ISC declaration of group */ ++#define group real_group ++ struct group *tmp_grp; ++ ++ if (geteuid()) ++ log_fatal ("you must be root to set group"); ++ ++ if (!(tmp_grp = getgrnam(set_group))) ++ log_fatal ("no such group: %s", set_group); ++ ++ set_gid = tmp_grp->gr_gid; ++#undef group ++ } ++ ++# if defined (EARLY_CHROOT) ++ if (set_chroot) setup_chroot (set_chroot); ++# endif /* EARLY_CHROOT */ ++#endif /* PARANOIA */ ++ + /* Default to the DHCP/BOOTP port. */ + if (!local_port) + { +@@ -500,6 +586,10 @@ + + postconf_initialization (quiet); + ++#if defined (PARANOIA) && !defined (EARLY_CHROOT) ++ if (set_chroot) setup_chroot (set_chroot); ++#endif /* PARANOIA && !EARLY_CHROOT */ ++ + /* test option should cause an early exit */ + if (cftest && !lftest) + exit(0); +@@ -543,6 +633,22 @@ + exit (0); + } + ++#if defined (PARANOIA) ++ /* change uid to the specified one */ ++ ++ if (set_gid) { ++ if (setgroups (0, (void *)0)) ++ log_fatal ("setgroups: %m"); ++ if (setgid (set_gid)) ++ log_fatal ("setgid(%d): %m", (int) set_gid); ++ } ++ ++ if (set_uid) { ++ if (setuid (set_uid)) ++ log_fatal ("setuid(%d): %m", (int) set_uid); ++ } ++#endif /* PARANOIA */ ++ + /* Read previous pid file. */ + if ((i = open (path_dhcpd_pid, O_RDONLY)) >= 0) { + status = read (i, pbuf, (sizeof pbuf) - 1); +@@ -888,6 +994,10 @@ + + log_fatal ("Usage: dhcpd [-p ] [-d] [-f]%s%s%s%s", + "\n [-cf config-file] [-lf lease-file]", ++#if defined (PARANOIA) ++ /* meld into the following string */ ++ "\n [-user user] [-group group] [-chroot dir]" ++#endif /* PARANOIA */ + #if defined (TRACING) + "\n [-tf trace-output-file]", + "\n [-play trace-input-file]", diff --git a/net-misc/dhcp/files/dhcp-3.0.2-gmake.patch b/net-misc/dhcp/files/dhcp-3.0.2-gmake.patch new file mode 100644 index 0000000..4ab99a2 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-3.0.2-gmake.patch @@ -0,0 +1,66 @@ +Index: dhcp-3.0.2/Makefile +=================================================================== +--- dhcp-3.0.2.orig/Makefile ++++ dhcp-3.0.2/Makefile +@@ -33,7 +33,7 @@ all: + if [ ! -d work.$$sysname ]; then \ + echo No build directory for $$sysname - please run ./configure.; \ + else \ +- (cd work.$$sysname; make all); \ ++ (cd work.$$sysname; $(MAKE) all); \ + fi + + install: +@@ -41,7 +41,7 @@ install: + if [ ! -d work.$$sysname ]; then \ + echo No build directory for $$sysname - please run ./configure.; \ + else \ +- (cd work.$$sysname; make install); \ ++ (cd work.$$sysname; $(MAKE) install); \ + fi + + depend: +@@ -49,7 +49,7 @@ depend: + if [ ! -d work.$$sysname ]; then \ + echo No build directory for $$sysname - please run ./configure.; \ + else \ +- (cd work.$$sysname; make depend); \ ++ (cd work.$$sysname; $(MAKE) depend); \ + fi + + clean: +@@ -57,7 +57,7 @@ clean: + if [ ! -d work.$$sysname ]; then \ + echo No build directory for $$sysname - please run ./configure.; \ + else \ +- (cd work.$$sysname; make clean); \ ++ (cd work.$$sysname; $(MAKE) clean); \ + fi + + realclean: +@@ -65,7 +65,7 @@ realclean: + if [ ! -d work.$$sysname ]; then \ + echo No build directory for $$sysname - please run ./configure.; \ + else \ +- (cd work.$$sysname; make realclean); \ ++ (cd work.$$sysname; $(MAKE) realclean); \ + fi + + distclean: +@@ -73,7 +73,7 @@ distclean: + if [ ! -d work.$$sysname ]; then \ + echo No build directory for $$sysname - please run ./configure.; \ + else \ +- (cd work.$$sysname; make distclean); \ ++ (cd work.$$sysname; $(MAKE) distclean); \ + fi + + links: +@@ -81,6 +81,6 @@ links: + if [ ! -d work.$$sysname ]; then \ + echo No build directory for $$sysname - please run ./configure.; \ + else \ +- (cd work.$$sysname; make links); \ ++ (cd work.$$sysname; $(MAKE) links); \ + fi + diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-dbus.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-dbus.patch new file mode 100644 index 0000000..579d72f --- /dev/null +++ b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-dbus.patch @@ -0,0 +1,84 @@ +--- client/scripts/bsdos ++++ client/scripts/bsdos +@@ -47,6 +47,11 @@ + . /etc/dhcp/dhclient-exit-hooks + fi + # probably should do something with exit status of the local script ++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then ++ dbus-send --system --dest=com.redhat.dhcp \ ++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \ ++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`" ++ fi + exit $exit_status + } + +--- client/scripts/freebsd ++++ client/scripts/freebsd +@@ -57,6 +57,11 @@ + . /etc/dhcp/dhclient-exit-hooks + fi + # probably should do something with exit status of the local script ++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then ++ dbus-send --system --dest=com.redhat.dhcp \ ++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \ ++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`" ++ fi + exit $exit_status + } + +--- client/scripts/linux ++++ client/scripts/linux +@@ -69,6 +69,11 @@ + . /etc/dhcp/dhclient-exit-hooks + fi + # probably should do something with exit status of the local script ++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then ++ dbus-send --system --dest=com.redhat.dhcp \ ++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \ ++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`" ++ fi + exit $exit_status + } + +--- client/scripts/netbsd ++++ client/scripts/netbsd +@@ -47,6 +47,11 @@ + . /etc/dhcp/dhclient-exit-hooks + fi + # probably should do something with exit status of the local script ++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then ++ dbus-send --system --dest=com.redhat.dhcp \ ++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \ ++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`" ++ fi + exit $exit_status + } + +--- client/scripts/openbsd ++++ client/scripts/openbsd +@@ -47,6 +47,11 @@ + . /etc/dhcp/dhclient-exit-hooks + fi + # probably should do something with exit status of the local script ++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then ++ dbus-send --system --dest=com.redhat.dhcp \ ++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \ ++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`" ++ fi + exit $exit_status + } + +--- client/scripts/solaris ++++ client/scripts/solaris +@@ -47,6 +47,11 @@ + . /etc/dhcp/dhclient-exit-hooks + fi + # probably should do something with exit status of the local script ++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then ++ dbus-send --system --dest=com.redhat.dhcp \ ++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \ ++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`" ++ fi + exit $exit_status + } + diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-hostname.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-hostname.patch new file mode 100644 index 0000000..9a6e7b9 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-hostname.patch @@ -0,0 +1,16 @@ +--- client/scripts/linux ++++ client/scripts/linux +@@ -138,10 +138,12 @@ + [ x$reason = xREBIND ] || [ x$reason = xREBOOT ]; then + current_hostname=`hostname` + if [ x$current_hostname = x ] || \ ++ [ x$current_hostname = "x(none)" ] || \ ++ [ x$current_hostname = xlocalhost ] || \ + [ 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 ++ hostname "$new_host_name" + fi + fi + diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-metric.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-metric.patch new file mode 100644 index 0000000..040ef77 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-metric.patch @@ -0,0 +1,200 @@ +--- client/scripts/bsdos ++++ client/scripts/bsdos +@@ -84,6 +84,9 @@ + if [ x$new_interface_mtu != x ]; then + mtu_arg="mtu $new_interface_mtu" + fi ++if [ x$IF_METRIC != x ]; then ++ metric_arg="metric $IF_METRIC" ++fi + + if [ x$reason = xMEDIUM ]; then + eval "ifconfig $interface $medium" +@@ -141,7 +144,7 @@ + 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_netmask_arg \ +- $new_broadcast_arg $mtu_arg $medium" ++ $new_broadcast_arg $mtu_arg $metric_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 +@@ -198,7 +201,7 @@ + route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 + fi + eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ +- $new_broadcast_arg $mtu_arg $medium" ++ $new_broadcast_arg $mtu_arg $metric_arg $medium" + sleep 1 + if [ "$new_routers" != "" ]; then + set $new_routers +--- client/scripts/freebsd ++++ client/scripts/freebsd +@@ -94,6 +94,9 @@ + if [ x$new_interface_mtu != x ]; then + mtu_arg="mtu $new_interface_mtu" + fi ++if [ x$IF_METRIC != x ]; then ++ metric_arg="metric $IF_METRIC" ++fi + + if [ x$reason = xMEDIUM ]; then + eval "ifconfig $interface $medium" +@@ -151,7 +154,7 @@ + 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_netmask_arg \ +- $new_broadcast_arg $mtu_arg $medium" ++ $new_broadcast_arg $mtu_arg $metric_arg $medium" + $LOGGER "New IP Address ($interface): $new_ip_address" + $LOGGER "New Subnet Mask ($interface): $new_subnet_mask" + $LOGGER "New Broadcast Address ($interface): $new_broadcast_address" +@@ -215,7 +218,7 @@ + route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 + fi + eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ +- $new_broadcast_arg $mtu_arg $medium" ++ $new_broadcast_arg $mtu_arg $metric_arg $medium" + $LOGGER "New IP Address ($interface): $new_ip_address" + $LOGGER "New Subnet Mask ($interface): $new_subnet_mask" + $LOGGER "New Broadcast Address ($interface): $new_broadcast_address" +--- client/scripts/linux ++++ client/scripts/linux +@@ -83,11 +83,6 @@ + fi + fi + +-release=`uname -r` +-release=`expr $release : '\(.*\)\..*'` +-relminor=`echo $release |sed -e 's/[0-9]*\.\([0-9][0-9]*\)\(\..*\)*$/\1/'` +-relmajor=`echo $release |sed -e 's/\([0-9][0-9]*\)\..*$/\1/'` +- + if [ x$new_broadcast_address != x ]; then + new_broadcast_arg="broadcast $new_broadcast_address" + fi +@@ -106,6 +101,9 @@ + if [ x$new_interface_mtu != x ]; then + mtu_arg="mtu $new_interface_mtu" + fi ++if [ x$IF_METRIC != x ]; then ++ metric_arg="metric $IF_METRIC" ++fi + + if [ x$reason = xMEDIUM ]; then + # Linux doesn't do mediums (ok, ok, media). +@@ -117,15 +115,7 @@ + # Bring down alias interface. Its routes will disappear too. + ifconfig $interface:0- inet 0 + fi +- if [ $relmajor -lt 2 ] || ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ) +- then +- ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 \ +- broadcast 255.255.255.255 up +- # Add route to make broadcast work. Do not omit netmask. +- route add default dev $interface netmask 0.0.0.0 +- else +- ifconfig $interface 0 up +- fi ++ ifconfig $interface 0 up + + # We need to give the kernel some time to get the interface up. + sleep 1 +@@ -164,12 +154,14 @@ + ifconfig $interface inet $new_ip_address $new_subnet_arg \ + $new_broadcast_arg $mtu_arg + # Add a network route to the computed network address. +- if [ $relmajor -lt 2 ] || \ +- ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then +- route add -net $new_network_number $new_subnet_arg dev $interface ++ if [ x$IF_METRIC != x ] && [ x$IF_METRIC != x0 ]; then ++ route del -net $new_network_number $new_subnet_arg \ ++ dev $interface ++ route add -net $new_network_number $new_subnet_arg $metric_arg \ ++ dev $interface + fi + for router in $new_routers; do +- route add default gw $router ++ route add default gw $router $metric_arg dev $interface + done + fi + if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ]; +@@ -213,12 +205,15 @@ + ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg + route add -host $alias_ip_address dev $interface:0 + fi +- if [ $relmajor -lt 2 ] || \ +- ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then +- route add -net $new_network_number ++ # Add a network route to the computed network address. ++ if [ x$IF_METRIC != x ] && [ x$IF_METRIC != x0 ]; then ++ route del -net $new_network_number $new_subnet_arg \ ++ dev $interface ++ route add -net $new_network_number $new_subnet_arg $metric_arg \ ++ dev $interface + fi + for router in $new_routers; do +- route add default gw $router ++ route add default gw $router $metric_arg dev $interface + done + make_resolv_conf + exit_with_hooks 0 +--- client/scripts/netbsd ++++ client/scripts/netbsd +@@ -84,6 +84,9 @@ + if [ x$new_interface_mtu != x ]; then + mtu_arg="mtu $new_interface_mtu" + fi ++if [ x$IF_METRIC != x ]; then ++ metric_arg="metric $IF_METRIC" ++fi + + if [ x$reason = xMEDIUM ]; then + eval "ifconfig $interface $medium" +@@ -141,7 +144,7 @@ + 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_netmask_arg \ +- $new_broadcast_arg $mtu_arg $medium" ++ $new_broadcast_arg $mtu_arg $metric_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 +@@ -198,7 +201,7 @@ + route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 + fi + eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ +- $new_broadcast_arg $mtu_arg $medium" ++ $new_broadcast_arg $mtu_arg $metric_arg $medium" + sleep 1 + if [ "$new_routers" != "" ]; then + set $new_routers +--- client/scripts/solaris ++++ client/scripts/solaris +@@ -79,6 +79,9 @@ + if [ x$new_interface_mtu != x ]; then + mtu_arg="mtu $new_interface_mtu" + fi ++if [ x$IF_METRIC != x ]; then ++ metric_arg="metric $IF_METRIC" ++fi + + ifconfig=/sbin/ifconfig + +@@ -141,7 +144,7 @@ + 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_netmask_arg \ +- $new_broadcast_arg $mtu_arg $medium" ++ $new_broadcast_arg $mtu_arg $metric_arg $medium" + route add $new_ip_address 127.1 1 >/dev/null 2>&1 + for router in $new_routers; do + route add default $router 1 >/dev/null 2>&1 +@@ -182,7 +185,7 @@ + route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 + fi + eval "$ifconfig $interface inet $new_ip_address $new_netmask_arg \ +- $new_broadcast_arg $mtu_arg $medium" ++ $new_broadcast_arg $mtu_arg $metric_arg $medium" + sleep 1 + set $new_routers + if ping -s -n -I 1 $1 64 1; then diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-mtu.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-mtu.patch new file mode 100644 index 0000000..5ef4442 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-mtu.patch @@ -0,0 +1,180 @@ +--- client/scripts/bsdos ++++ client/scripts/bsdos +@@ -81,6 +81,9 @@ + if [ x$alias_subnet_mask != x ]; then + alias_subnet_arg="netmask $alias_subnet_mask" + fi ++if [ x$new_interface_mtu != x ]; then ++ mtu_arg="mtu $new_interface_mtu" ++fi + + if [ x$reason = xMEDIUM ]; then + eval "ifconfig $interface $medium" +@@ -138,7 +141,7 @@ + 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_netmask_arg \ +- $new_broadcast_arg $medium" ++ $new_broadcast_arg $mtu_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 +@@ -195,7 +198,7 @@ + route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 + fi + eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ +- $new_broadcast_arg $medium" ++ $new_broadcast_arg $mtu_arg $medium" + sleep 1 + if [ "$new_routers" != "" ]; then + set $new_routers +--- client/scripts/freebsd ++++ client/scripts/freebsd +@@ -91,6 +91,9 @@ + if [ x$alias_subnet_mask != x ]; then + alias_subnet_arg="netmask $alias_subnet_mask" + fi ++if [ x$new_interface_mtu != x ]; then ++ mtu_arg="mtu $new_interface_mtu" ++fi + + if [ x$reason = xMEDIUM ]; then + eval "ifconfig $interface $medium" +@@ -148,7 +151,7 @@ + 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_netmask_arg \ +- $new_broadcast_arg $medium" ++ $new_broadcast_arg $mtu_arg $medium" + $LOGGER "New IP Address ($interface): $new_ip_address" + $LOGGER "New Subnet Mask ($interface): $new_subnet_mask" + $LOGGER "New Broadcast Address ($interface): $new_broadcast_address" +@@ -212,7 +215,7 @@ + route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 + fi + eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ +- $new_broadcast_arg $medium" ++ $new_broadcast_arg $mtu_arg $medium" + $LOGGER "New IP Address ($interface): $new_ip_address" + $LOGGER "New Subnet Mask ($interface): $new_subnet_mask" + $LOGGER "New Broadcast Address ($interface): $new_broadcast_address" +--- client/scripts/linux ++++ client/scripts/linux +@@ -103,6 +103,9 @@ + if [ x$alias_subnet_mask != x ]; then + alias_subnet_arg="netmask $alias_subnet_mask" + fi ++if [ x$new_interface_mtu != x ]; then ++ mtu_arg="mtu $new_interface_mtu" ++fi + + if [ x$reason = xMEDIUM ]; then + # Linux doesn't do mediums (ok, ok, media). +@@ -159,7 +162,7 @@ + [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then + + ifconfig $interface inet $new_ip_address $new_subnet_arg \ +- $new_broadcast_arg ++ $new_broadcast_arg $mtu_arg + # Add a network route to the computed network address. + if [ $relmajor -lt 2 ] || \ + ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then +@@ -201,7 +204,7 @@ + ifconfig $interface:0- inet 0 + fi + ifconfig $interface inet $new_ip_address $new_subnet_arg \ +- $new_broadcast_arg ++ $new_broadcast_arg $mtu_arg + set $new_routers + ############## what is -w in ping? + if ping -q -c 1 $1; then +--- client/scripts/netbsd ++++ client/scripts/netbsd +@@ -81,6 +81,9 @@ + if [ x$alias_subnet_mask != x ]; then + alias_subnet_arg="netmask $alias_subnet_mask" + fi ++if [ x$new_interface_mtu != x ]; then ++ mtu_arg="mtu $new_interface_mtu" ++fi + + if [ x$reason = xMEDIUM ]; then + eval "ifconfig $interface $medium" +@@ -138,7 +141,7 @@ + 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_netmask_arg \ +- $new_broadcast_arg $medium" ++ $new_broadcast_arg $mtu_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 +@@ -195,7 +198,7 @@ + route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 + fi + eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ +- $new_broadcast_arg $medium" ++ $new_broadcast_arg $mtu_arg $medium" + sleep 1 + if [ "$new_routers" != "" ]; then + set $new_routers +--- client/scripts/openbsd ++++ client/scripts/openbsd +@@ -81,6 +81,9 @@ + if [ x$alias_subnet_mask != x ]; then + alias_subnet_arg="netmask $alias_subnet_mask" + fi ++if [ x$new_interface_mtu != x ]; then ++ mtu_arg="mtu $new_interface_mtu" ++fi + + if [ x$reason = xMEDIUM ]; then + eval "ifconfig $interface $medium" +@@ -138,7 +141,7 @@ + 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_netmask_arg \ +- $new_broadcast_arg $medium" ++ $new_broadcast_arg $mtu_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 +@@ -195,7 +198,7 @@ + route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 + fi + eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ +- $new_broadcast_arg $medium" ++ $new_broadcast_arg $mtu_arg $medium" + sleep 1 + if [ "$new_routers" != "" ]; then + set $new_routers +--- client/scripts/solaris ++++ client/scripts/solaris +@@ -76,6 +76,9 @@ + if [ x$alias_subnet_mask != x ]; then + alias_subnet_arg="netmask $alias_subnet_mask" + fi ++if [ x$new_interface_mtu != x ]; then ++ mtu_arg="mtu $new_interface_mtu" ++fi + + ifconfig=/sbin/ifconfig + +@@ -138,7 +141,7 @@ + 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_netmask_arg \ +- $new_broadcast_arg $medium" ++ $new_broadcast_arg $mtu_arg $medium" + route add $new_ip_address 127.1 1 >/dev/null 2>&1 + for router in $new_routers; do + route add default $router 1 >/dev/null 2>&1 +@@ -179,7 +182,7 @@ + route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 + fi + eval "$ifconfig $interface inet $new_ip_address $new_netmask_arg \ +- $new_broadcast_arg $medium" ++ $new_broadcast_arg $mtu_arg $medium" + sleep 1 + set $new_routers + if ping -s -n -I 1 $1 64 1; then diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-no-down.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-no-down.patch new file mode 100644 index 0000000..518efec --- /dev/null +++ b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-no-down.patch @@ -0,0 +1,70 @@ +--- client/scripts/linux ++++ client/scripts/linux +@@ -118,9 +118,9 @@ + if [ x$reason = xPREINIT ]; then + if [ x$alias_ip_address != x ]; then + # Bring down alias interface. Its routes will disappear too. +- ifconfig $interface:0- inet 0 ++ ifconfig $interface:0- inet 0.0.0.0 + fi +- ifconfig $interface 0 up ++ ifconfig $interface 0.0.0.0 up + + # We need to give the kernel some time to get the interface up. + sleep 1 +@@ -145,12 +145,12 @@ + if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \ + [ x$alias_ip_address != x$old_ip_address ]; then + # Possible new alias. Remove old alias. +- ifconfig $interface:0- inet 0 ++ ifconfig $interface:0- inet 0.0.0.0 + fi + if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]; then + # IP address changed. Bringing down the interface will delete all routes, + # and clear the ARP cache. +- ifconfig $interface inet 0 down ++ ifconfig $interface inet 0.0.0.0 + + fi + if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ +@@ -171,7 +171,7 @@ + fi + if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ]; + then +- ifconfig $interface:0- inet 0 ++ ifconfig $interface:0- inet 0.0.0.0 + ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg + route add -host $alias_ip_address $interface:0 + fi +@@ -183,11 +183,11 @@ + || [ x$reason = xSTOP ]; then + if [ x$alias_ip_address != x ]; then + # Turn off alias interface. +- ifconfig $interface:0- inet 0 ++ ifconfig $interface:0- inet 0.0.0.0 + fi + if [ x$old_ip_address != x ]; then + # Shut down interface, which will delete routes and clear arp cache. +- ifconfig $interface inet 0 down ++ ifconfig $interface inet 0.0.0.0 + fi + if [ x$alias_ip_address != x ]; then + ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg +@@ -198,7 +198,7 @@ + + if [ x$reason = xTIMEOUT ]; then + if [ x$alias_ip_address != x ]; then +- ifconfig $interface:0- inet 0 ++ ifconfig $interface:0- inet 0.0.0.0 + fi + ifconfig $interface inet $new_ip_address $new_subnet_arg \ + $new_broadcast_arg $mtu_arg +@@ -223,7 +223,7 @@ + make_resolv_conf + exit_with_hooks 0 + fi +- ifconfig $interface inet 0 down ++ ifconfig $interface inet 0.0.0.0 + exit_with_hooks 1 + fi + diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-ntp.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-ntp.patch new file mode 100644 index 0000000..d84e6f6 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-ntp.patch @@ -0,0 +1,186 @@ +--- client/clparse.c ++++ client/clparse.c +@@ -51,6 +51,7 @@ + DHO_DOMAIN_NAME, + DHO_DOMAIN_NAME_SERVERS, + DHO_HOST_NAME, ++ DHO_NTP_SERVERS, + 0 + }; + +--- client/scripts/bsdos ++++ client/scripts/bsdos +@@ -7,6 +7,26 @@ + echo nameserver $nameserver >>/etc/resolv.conf + done + fi ++ # If we're making confs, may as well make an ntp.conf too ++ make_ntp_conf ++} ++ ++make_ntp_conf() { ++ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then ++ if [ x$new_ntp_servers != x ]; then ++ conf="# Generated by dhclient for interface $interface\n" ++ conf="${conf}restrict default noquery notrust nomodify\n" ++ conf="${conf}restrict 127.0.0.1\n" ++ for ntpserver in $new_ntp_servers; do ++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" ++ conf="${conf}server $ntpserver\n" ++ done ++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" ++ conf="${conf}logfile /var/log/ntp.log\n" ++ printf "${conf}" > /etc/ntp.conf ++ chmod 644 /etc/ntp.conf ++ fi ++ fi + } + + # Must be used on exit. Invokes the local dhcp client exit hooks, if any. +--- client/scripts/freebsd ++++ client/scripts/freebsd +@@ -32,8 +32,28 @@ + done + fi + fi ++ # If we're making confs, may as well make an ntp.conf too ++ make_ntp_conf + } + ++make_ntp_conf() { ++ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then ++ if [ "x$new_ntp_servers" != x ]; then ++ conf="# Generated by dhclient for interface $interface\n" ++ conf="${conf}restrict default noquery notrust nomodify\n" ++ conf="${conf}restrict 127.0.0.1\n" ++ for ntpserver in $new_ntp_servers; do ++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" ++ conf="${conf}server $ntpserver\n" ++ done ++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" ++ conf="${conf}logfile /var/log/ntp.log\n" ++ printf "${conf}" > /etc/ntp.conf ++ chmod 644 /etc/ntp.conf ++ fi ++ fi ++} ++ + # Must be used on exit. Invokes the local dhcp client exit hooks, if any. + exit_with_hooks() { + exit_status=$1 +--- client/scripts/linux ++++ client/scripts/linux +@@ -30,6 +30,26 @@ + echo nameserver $nameserver >>/etc/resolv.conf + done + fi ++ # If we're making confs, may as well make an ntp.conf too ++ make_ntp_conf ++} ++ ++make_ntp_conf() { ++ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then ++ if [ "x$new_ntp_servers" != x ]; then ++ conf="# Generated by dhclient for interface $interface\n" ++ conf="${conf}restrict default noquery notrust nomodify\n" ++ conf="${conf}restrict 127.0.0.1\n" ++ for ntpserver in $new_ntp_servers; do ++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" ++ conf="${conf}server $ntpserver\n" ++ done ++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" ++ conf="${conf}logfile /var/log/ntp.log\n" ++ printf "${conf}" > /etc/ntp.conf ++ chmod 644 /etc/ntp.conf ++ fi ++ fi + } + + # Must be used on exit. Invokes the local dhcp client exit hooks, if any. +--- client/scripts/netbsd ++++ client/scripts/netbsd +@@ -7,6 +7,26 @@ + echo nameserver $nameserver >>/etc/resolv.conf + done + fi ++ # If we're making confs, may as well make an ntp.conf too ++ make_ntp_conf ++} ++ ++make_ntp_conf() { ++ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then ++ if [ "x$new_ntp_servers" != x ]; then ++ conf="# Generated by dhclient for interface $interface\n" ++ conf="${conf}restrict default noquery notrust nomodify\n" ++ conf="${conf}restrict 127.0.0.1\n" ++ for ntpserver in $new_ntp_servers; do ++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" ++ conf="${conf}server $ntpserver\n" ++ done ++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" ++ conf="${conf}logfile /var/log/ntp.log\n" ++ printf "${conf}" > /etc/ntp.conf ++ chmod 644 /etc/ntp.conf ++ fi ++ fi + } + + # Must be used on exit. Invokes the local dhcp client exit hooks, if any. +--- client/scripts/openbsd ++++ client/scripts/openbsd +@@ -7,6 +7,26 @@ + echo nameserver $nameserver >>/etc/resolv.conf + done + fi ++ # If we're making confs, may as well make an ntp.conf too ++ make_ntp_conf ++} ++ ++make_ntp_conf() { ++ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then ++ if [ "x$new_ntp_servers" != x ]; then ++ conf="# Generated by dhclient for interface $interface\n" ++ conf="${conf}restrict default noquery notrust nomodify\n" ++ conf="${conf}restrict 127.0.0.1\n" ++ for ntpserver in $new_ntp_servers; do ++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" ++ conf="${conf}server $ntpserver\n" ++ done ++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" ++ conf="${conf}logfile /var/log/ntp.log\n" ++ printf "${conf}" > /etc/ntp.conf ++ chmod 644 /etc/ntp.conf ++ fi ++ fi + } + + # Must be used on exit. Invokes the local dhcp client exit hooks, if any. +--- client/scripts/solaris ++++ client/scripts/solaris +@@ -7,6 +7,26 @@ + echo nameserver $nameserver >>/etc/resolv.conf + done + fi ++ # If we're making confs, may as well make an ntp.conf too ++ make_ntp_conf ++} ++ ++make_ntp_conf() { ++ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then ++ if [ "x$new_ntp_servers" != x ]; then ++ conf="# Generated by dhclient for interface $interface\n" ++ conf="${conf}restrict default noquery notrust nomodify\n" ++ conf="${conf}restrict 127.0.0.1\n" ++ for ntpserver in $new_ntp_servers; do ++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" ++ conf="${conf}server $ntpserver\n" ++ done ++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" ++ conf="${conf}logfile /var/log/ntp.log\n" ++ printf "${conf}" > /etc/ntp.conf ++ chmod 644 /etc/ntp.conf ++ fi ++ fi + } + + # Must be used on exit. Invokes the local dhcp client exit hooks, if any. diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-resolvconf.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-resolvconf.patch new file mode 100644 index 0000000..8e499fc --- /dev/null +++ b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-resolvconf.patch @@ -0,0 +1,191 @@ +--- client/scripts/bsdos ++++ client/scripts/bsdos +@@ -1,11 +1,22 @@ + #!/bin/sh + + make_resolv_conf() { +- if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then +- echo search $new_domain_name >/etc/resolv.conf +- for nameserver in $new_domain_name_servers; do +- echo nameserver $nameserver >>/etc/resolv.conf +- done ++ if [ x$PEER_DNS = x ] || [ x$PEER_DNS = xyes ]; then ++ if [ "x$new_domain_name" != x ] || [ "x$new_domain_name_servers" != x ]; then ++ conf="# Generated by dhclient for interface $interface\n" ++ if [ "x$new_domain_name" != x ]; then ++ conf="${conf}search $new_domain_name\n" ++ fi ++ for nameserver in $new_domain_name_servers; do ++ conf="${conf}nameserver $nameserver\n" ++ done ++ if [ -x /sbin/resolvconf ]; then ++ printf "$conf" | resolvconf -a "$interface" ++ else ++ printf "$conf" > /etc/resolv.conf ++ chmod 644 /etc/resolv.conf ++ fi ++ fi + fi + # If we're making confs, may as well make an ntp.conf too + make_ntp_conf +--- client/scripts/freebsd ++++ client/scripts/freebsd +@@ -11,25 +11,21 @@ + fi + + make_resolv_conf() { +- if [ x"$new_domain_name_servers" != x ]; then +- if [ "x$new_domain_name" != x ]; then +- ( echo search $new_domain_name >/etc/resolv.conf ) +- exit_status=$? +- else +- if [ -e /etc/resolv.conf ] ; then +- ( rm /etc/resolv.conf ) +- exit_status=$? +- else +- ( touch /etc/resolv.conf ) +- exit_status=$? ++ if [ x$PEER_DNS = x ] || [ x$PEER_DNS = xyes ]; then ++ if [ "x$new_domain_name" != x ] || [ "x$new_domain_name_servers" != x ]; then ++ conf="# Generated by dhclient for interface $interface\n" ++ if [ "x$new_domain_name" != x ]; then ++ conf="${conf}search $new_domain_name\n" + fi +- fi +- if [ $exit_status -ne 0 ]; then +- $LOGGER "WARNING: Unable to update resolv.conf: Error $exit_status" +- else + for nameserver in $new_domain_name_servers; do +- ( echo nameserver $nameserver >>/etc/resolv.conf ) ++ conf="${conf}nameserver $nameserver\n" + done ++ if [ -x /sbin/resolvconf ]; then ++ printf "$conf" | resolvconf -a "$interface" ++ else ++ printf "$conf" > /etc/resolv.conf ++ chmod 644 /etc/resolv.conf ++ fi + fi + fi + # If we're making confs, may as well make an ntp.conf too +--- client/scripts/linux ++++ client/scripts/linux +@@ -23,12 +23,22 @@ + # 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 ++ if [ x$PEER_DNS = x ] || [ x$PEER_DNS = xyes ]; then ++ if [ "x$new_domain_name" != x ] || [ "x$new_domain_name_servers" != x ]; then ++ conf="# Generated by dhclient for interface $interface\n" ++ if [ "x$new_domain_name" != x ]; then ++ conf="${conf}search $new_domain_name\n" ++ fi ++ for nameserver in $new_domain_name_servers; do ++ conf="${conf}nameserver $nameserver\n" ++ done ++ if [ -x /sbin/resolvconf ]; then ++ printf "$conf" | resolvconf -a "$interface" ++ else ++ printf "$conf" > /etc/resolv.conf ++ chmod 644 /etc/resolv.conf ++ fi ++ fi + fi + # If we're making confs, may as well make an ntp.conf too + make_ntp_conf +--- client/scripts/netbsd ++++ client/scripts/netbsd +@@ -1,11 +1,22 @@ + #!/bin/sh + + make_resolv_conf() { +- if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then +- echo search $new_domain_name >/etc/resolv.conf +- for nameserver in $new_domain_name_servers; do +- echo nameserver $nameserver >>/etc/resolv.conf +- done ++ if [ x$PEER_DNS = x ] || [ x$PEER_DNS = xyes ]; then ++ if [ "x$new_domain_name" != x ] || [ "x$new_domain_name_servers" != x ]; then ++ conf="# Generated by dhclient for interface $interface\n" ++ if [ "x$new_domain_name" != x ]; then ++ conf="${conf}search $new_domain_name\n" ++ fi ++ for nameserver in $new_domain_name_servers; do ++ conf="${conf}nameserver $nameserver\n" ++ done ++ if [ -x /sbin/resolvconf ]; then ++ printf "$conf" | resolvconf -a "$interface" ++ else ++ printf "$conf" > /etc/resolv.conf ++ chmod 644 /etc/resolv.conf ++ fi ++ fi + fi + # If we're making confs, may as well make an ntp.conf too + make_ntp_conf +--- client/scripts/openbsd ++++ client/scripts/openbsd +@@ -1,11 +1,22 @@ + #!/bin/sh + + make_resolv_conf() { +- if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then +- echo search $new_domain_name >/etc/resolv.conf +- for nameserver in $new_domain_name_servers; do +- echo nameserver $nameserver >>/etc/resolv.conf +- done ++ if [ x$PEER_DNS = x ] || [ x$PEER_DNS = xyes ]; then ++ if [ "x$new_domain_name" != x ] || [ "x$new_domain_name_servers" != x ]; then ++ conf="# Generated by dhclient for interface $interface\n" ++ if [ x$new_domain_name != x ]; then ++ conf="${conf}search $new_domain_name\n" ++ fi ++ for nameserver in $new_domain_name_servers; do ++ conf="${conf}nameserver $nameserver\n" ++ done ++ if [ -x /sbin/resolvconf ]; then ++ printf "$conf" | resolvconf -a "$interface" ++ else ++ printf "$conf" > /etc/resolv.conf ++ chmod 644 /etc/resolv.conf ++ fi ++ fi + fi + # If we're making confs, may as well make an ntp.conf too + make_ntp_conf +--- client/scripts/solaris ++++ client/scripts/solaris +@@ -1,11 +1,22 @@ + #!/bin/sh + + make_resolv_conf() { +- if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then +- echo search $new_domain_name >/etc/resolv.conf +- for nameserver in $new_domain_name_servers; do +- echo nameserver $nameserver >>/etc/resolv.conf +- done ++ if [ x$PEER_DNS = x ] || [ x$PEER_DNS = xyes ]; then ++ if [ "x$new_domain_name" != x ] || [ "x$new_domain_name_servers" != x ]; then ++ conf="# Generated by dhclient for interface $interface\n" ++ if [ "x$new_domain_name" != x ]; then ++ conf="${conf}search $new_domain_name\n" ++ fi ++ for nameserver in $new_domain_name_servers; do ++ conf="${conf}nameserver $nameserver\n" ++ done ++ if [ -x /sbin/resolvconf ]; then ++ printf "$conf" | resolvconf -a "$interface" ++ else ++ printf "$conf" > /etc/resolv.conf ++ chmod 644 /etc/resolv.conf ++ fi ++ fi + fi + # If we're making confs, may as well make an ntp.conf too + make_ntp_conf diff --git a/net-misc/dhcp/files/dhcp-3.0.3-libdst.patch b/net-misc/dhcp/files/dhcp-3.0.3-libdst.patch new file mode 100644 index 0000000..8e93ac9 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-3.0.3-libdst.patch @@ -0,0 +1,14 @@ +--- dst/Makefile.dist.old 2004-12-24 13:31:22.986061032 +0000 ++++ dst/Makefile.dist 2004-12-24 13:47:19.036913364 +0000 +@@ -31,6 +31,10 @@ + all: libdst.a + + install: ++ mkdir -p $(DESTDIR)$(LIBDIR) ++ $(INSTALL) libdst.a $(DESTDIR)$(LIBDIR) ++ $(CHMOD) 644 $(DESTDIR)$(LIBDIR)/libdst.a ++ + + libdst.a: $(OBJ) + rm -f dst.a + diff --git a/net-misc/dhcp/files/dhcp-3.0.3-no_isc_blurb.patch b/net-misc/dhcp/files/dhcp-3.0.3-no_isc_blurb.patch new file mode 100644 index 0000000..38f7713 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-3.0.3-no_isc_blurb.patch @@ -0,0 +1,105 @@ +Patch nobbled from RedHat, and adapted to work with dhclient and dhrelay +by Roy Marples + +--- dhcp-3.0.3/omapip/errwarn.c.no_isc_blurb 2004-09-30 16:38:32.000000000 -0400 ++++ dhcp-3.0.3/omapip/errwarn.c 2005-04-18 13:45:49.037158000 -0400 +@@ -45,6 +45,8 @@ + int log_perror = 1; + #endif + int log_priority; ++int log_isc_blurb=1; ++ + void (*log_cleanup) (void); + + #define CVT_BUF_MAX 1023 +@@ -76,7 +78,9 @@ + write (STDERR_FILENO, "\n", 1); + } + +-#if !defined (NOMINUM) ++#if !defined(NOMINUM) ++ if ( log_isc_blurb ) ++ { + log_error ("%s", ""); + log_error ("If you did not get this software from ftp.isc.org, please"); + log_error ("get the latest from ftp.isc.org and install that before"); +@@ -94,7 +98,12 @@ + log_error ("the README file."); + log_error ("%s", ""); + log_error ("exiting."); ++ }else ++ { ++ log_error ("exiting."); ++ } + #endif ++ + if (log_cleanup) + (*log_cleanup) (); + exit (1); +--- dhcp-3.0.3/client/dhclient.c.no_isc_blurb 2005-04-18 13:21:08.509169000 -0400 ++++ dhcp-3.0.3/client/dhclient.c 2005-04-18 13:49:27.574402000 -0400 +@@ -34,7 +34,7 @@ + static char ocopyright[] = + "$Id: dhcp-3.0.3-no_isc_blurb.patch,v 1.1 2005/12/09 14:13:30 uberlord Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n"; + #endif /* not lint */ +- ++ + #include "dhcpd.h" + #include "version.h" + +@@ -81,6 +81,8 @@ + + void do_release(struct client_state *); + ++extern int log_isc_blurb; ++ + int main (argc, argv, envp) + int argc; + char **argv, **envp; +@@ -176,6 +178,7 @@ + } else if (!strcmp (argv [i], "-q")) { + quiet = 1; + quiet_interface_discovery = 1; ++ log_isc_blurb = 0; + } else if (!strcmp (argv [i], "-s")) { + if (++i == argc) + usage (); +--- dhcp-3.0.3/server/dhcpd.c.no_isc_blurb 2005-12-08 10:01:40.000000000 +0000 ++++ dhcp-3.0.3/server/dhcpd.c 2005-12-08 10:05:55.000000000 +0000 +@@ -62,6 +62,9 @@ + struct iaddr server_identifier; + int server_identifier_matched; + ++ ++extern int log_isc_blurb; ++ + #if defined (NSUPDATE) + + /* This stuff is always executed to figure the default values for certain +@@ -368,6 +371,7 @@ + } else if (!strcmp (argv [i], "-q")) { + quiet = 1; + quiet_interface_discovery = 1; ++ log_isc_blurb = 0; + } else if (!strcmp (argv [i], "--version")) { + log_info ("isc-dhcpd-%s", DHCP_VERSION); + exit (0); +--- dhcp-3.0.3/relay/dhcrelay.c.no_isc_blurb 2005-12-08 10:21:00.000000000 +0000 ++++ dhcp-3.0.3/relay/dhcrelay.c 2005-12-08 10:21:50.000000000 +0000 +@@ -102,6 +102,8 @@ + static char message [] = "Internet Systems Consortium DHCP Relay Agent"; + static char url [] = "For info, please visit http://www.isc.org/sw/dhcp/"; + ++extern int log_isc_blurb; ++ + int main (argc, argv, envp) + int argc; + char **argv, **envp; +@@ -170,6 +172,7 @@ + } else if (!strcmp (argv [i], "-q")) { + quiet = 1; + quiet_interface_discovery = 1; ++ log_isc_blurb = 0; + } else if (!strcmp (argv [i], "-a")) { + add_agent_options = 1; + } else if (!strcmp (argv [i], "-c")) { diff --git a/net-misc/dhcp/files/dhcp-3.0.4-dhclient-stdin-conf.patch b/net-misc/dhcp/files/dhcp-3.0.4-dhclient-stdin-conf.patch new file mode 100644 index 0000000..3fedc7c --- /dev/null +++ b/net-misc/dhcp/files/dhcp-3.0.4-dhclient-stdin-conf.patch @@ -0,0 +1,83 @@ +--- common/conflex.c.orig 2006-02-21 16:21:45.000000000 +0000 ++++ common/conflex.c 2006-02-21 16:23:06.000000000 +0000 +@@ -90,7 +90,7 @@ + struct parse **cfile; + { + /* "Memory" config files have no file. */ +- if ((*cfile)->file != -1) ++ if ((*cfile)->file != -1 && (*cfile)->file != fileno(stdin)) + close((*cfile)->file); + + if ((*cfile)->bufsiz) +--- client/clparse.c.orig 2006-02-22 09:37:12.000000000 +0000 ++++ client/clparse.c 2006-02-22 09:38:26.000000000 +0000 +@@ -97,6 +97,11 @@ + status = read_client_conf_file (path_dhclient_conf, + (struct interface_info *)0, + &top_level_config); ++ ++ /* Read any extra configuration from stdin */ ++ read_client_conf_stdin ((struct interface_info *)0, ++ &top_level_config); ++ + if (status != ISC_R_SUCCESS) { + ; + #ifdef LATER +@@ -148,20 +153,17 @@ + return status; + } + +-int read_client_conf_file (const char *name, struct interface_info *ip, +- struct client_config *client) ++int read_client_conf_actual (int file, const char *name, ++ struct interface_info *ip, ++ struct client_config *client) + { +- int file; + struct parse *cfile; + const char *val; + int token; + isc_result_t status; + +- if ((file = open (name, O_RDONLY)) < 0) +- return uerr2isc (errno); +- + cfile = (struct parse *)0; +- new_parse (&cfile, file, (char *)0, 0, path_dhclient_conf, 0); ++ new_parse (&cfile, file, (char *)0, 0, name , 0); + + do { + token = peek_token (&val, (unsigned *)0, cfile); +@@ -177,6 +179,32 @@ + return status; + } + ++int read_client_conf_file (const char *name, struct interface_info *ip, ++ struct client_config *client) ++{ ++ int file; ++ isc_result_t status; ++ ++ if ((file = open (name, O_RDONLY)) < 0) ++ return uerr2isc (errno); ++ ++ status = read_client_conf_actual(file, name, ip, client); ++ ++ return status; ++} ++ ++ ++int read_client_conf_stdin (struct interface_info *ip, ++ struct client_config *client) ++{ ++ int file = fileno(stdin); ++ isc_result_t status; ++ ++ if (isatty(file)) return ISC_R_NOTFOUND; ++ status = read_client_conf_actual(file, "stdin", ip, client); ++ ++ return status; ++} + + /* lease-file :== client-lease-statements END_OF_FILE + client-lease-statements :== diff --git a/net-misc/dhcp/files/dhcp-3.0.5-bpf-nofallback.patch b/net-misc/dhcp/files/dhcp-3.0.5-bpf-nofallback.patch new file mode 100644 index 0000000..2fae6f2 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-3.0.5-bpf-nofallback.patch @@ -0,0 +1,44 @@ +diff -ur common.orig/bpf.c common/bpf.c +--- common.orig/bpf.c 2006-09-20 12:52:47 +0100 ++++ common/bpf.c 2006-09-20 12:53:22 +0100 +@@ -354,10 +354,6 @@ + int result; + int fudge; + +- if (!strcmp (interface -> name, "fallback")) +- return send_fallback (interface, packet, raw, +- len, from, to, hto); +- + /* Assemble the headers... */ + assemble_hw_header (interface, (unsigned char *)hw, &hbufp, hto); + assemble_udp_ip_header (interface, +@@ -531,17 +527,5 @@ + + void maybe_setup_fallback () + { +- isc_result_t status; +- struct interface_info *fbi = (struct interface_info *)0; +- if (setup_fallback (&fbi, MDL)) { +- if_register_fallback (fbi); +- status = omapi_register_io_object ((omapi_object_t *)fbi, +- if_readsocket, 0, +- fallback_discard, 0, 0); +- if (status != ISC_R_SUCCESS) +- log_fatal ("Can't register I/O handle for %s: %s", +- fbi -> name, isc_result_totext (status)); +- interface_dereference (&fbi, MDL); +- } + } + #endif +diff -ur includes.orig/osdep.h includes/osdep.h +--- includes.orig/osdep.h 2006-09-20 12:54:52 +0100 ++++ includes/osdep.h 2006-09-20 12:56:40 +0100 +@@ -190,7 +190,7 @@ + Currently, all low-level packet interfaces use BSD sockets as a + fallback. */ + +-#if defined (USE_BPF_SEND) || defined (USE_NIT_SEND) || \ ++#if defined (USE_NIT_SEND) || \ + defined (USE_DLPI_SEND) || defined (USE_UPF_SEND) || \ + defined (USE_LPF_SEND) || \ + (defined (USE_SOCKET_SEND) && defined (HAVE_SO_BINDTODEVICE)) diff --git a/net-misc/dhcp/files/dhcp-4.0-dhclient-metric.patch b/net-misc/dhcp/files/dhcp-4.0-dhclient-metric.patch new file mode 100644 index 0000000..cca3e2b --- /dev/null +++ b/net-misc/dhcp/files/dhcp-4.0-dhclient-metric.patch @@ -0,0 +1,205 @@ +diff -uNr dhcp-4.0.0.ORIG/client/scripts/bsdos dhcp-4.0.0/client/scripts/bsdos +--- dhcp-4.0.0.ORIG/client/scripts/bsdos 2008-09-01 13:22:40.000000000 +0100 ++++ dhcp-4.0.0/client/scripts/bsdos 2008-09-01 13:23:24.000000000 +0100 +@@ -95,6 +95,9 @@ + if [ x$new_interface_mtu != x ]; then + mtu_arg="mtu $new_interface_mtu" + fi ++if [ x$IF_METRIC != x ]; then ++ metric_arg="metric $IF_METRIC" ++fi + + if [ x$reason = xMEDIUM ]; then + eval "ifconfig $interface $medium" +@@ -156,7 +159,7 @@ + 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_netmask_arg \ +- $new_broadcast_arg $mtu_arg $medium" ++ $new_broadcast_arg $mtu_arg $metric_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 +@@ -213,7 +216,7 @@ + route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 + fi + eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ +- $new_broadcast_arg $mtu_arg $medium" ++ $new_broadcast_arg $mtu_arg $metric_arg $medium" + sleep 1 + if [ "$new_routers" != "" ]; then + set $new_routers +diff -uNr dhcp-4.0.0.ORIG/client/scripts/freebsd dhcp-4.0.0/client/scripts/freebsd +--- dhcp-4.0.0.ORIG/client/scripts/freebsd 2008-09-01 13:22:40.000000000 +0100 ++++ dhcp-4.0.0/client/scripts/freebsd 2008-09-01 13:23:24.000000000 +0100 +@@ -139,6 +139,9 @@ + if [ x$new_interface_mtu != x ]; then + mtu_arg="mtu $new_interface_mtu" + fi ++if [ x$IF_METRIC != x ]; then ++ metric_arg="metric $IF_METRIC" ++fi + + if [ x$reason = xMEDIUM ]; then + eval "ifconfig $interface $medium" +@@ -200,7 +203,7 @@ + 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_netmask_arg \ +- $new_broadcast_arg $mtu_arg $medium" ++ $new_broadcast_arg $mtu_arg $metric_arg $medium" + $LOGGER "New IP Address ($interface): $new_ip_address" + $LOGGER "New Subnet Mask ($interface): $new_subnet_mask" + $LOGGER "New Broadcast Address ($interface): $new_broadcast_address" +@@ -264,7 +267,7 @@ + route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 + fi + eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ +- $new_broadcast_arg $mtu_arg $medium" ++ $new_broadcast_arg $mtu_arg $metric_arg $medium" + $LOGGER "New IP Address ($interface): $new_ip_address" + $LOGGER "New Subnet Mask ($interface): $new_subnet_mask" + $LOGGER "New Broadcast Address ($interface): $new_broadcast_address" +diff -uNr dhcp-4.0.0.ORIG/client/scripts/linux dhcp-4.0.0/client/scripts/linux +--- dhcp-4.0.0.ORIG/client/scripts/linux 2008-09-01 13:22:40.000000000 +0100 ++++ dhcp-4.0.0/client/scripts/linux 2008-09-01 13:26:19.000000000 +0100 +@@ -98,11 +98,6 @@ + fi + fi + +-release=`uname -r` +-release=`expr $release : '\(.*\)\..*'` +-relminor=`echo $release |sed -e 's/[0-9]*\.\([0-9][0-9]*\)\(\..*\)*$/\1/'` +-relmajor=`echo $release |sed -e 's/\([0-9][0-9]*\)\..*$/\1/'` +- + ### + ### DHCPv4 Handlers + ### +@@ -125,6 +120,9 @@ + if [ x$new_interface_mtu != x ]; then + mtu_arg="mtu $new_interface_mtu" + fi ++if [ x$IF_METRIC != x ]; then ++ metric_arg="metric $IF_METRIC" ++fi + + if [ x$reason = xMEDIUM ]; then + # Linux doesn't do mediums (ok, ok, media). +@@ -136,15 +134,7 @@ + # Bring down alias interface. Its routes will disappear too. + ifconfig $interface:0- inet 0 + fi +- if [ $relmajor -lt 2 ] || ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ) +- then +- ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 \ +- broadcast 255.255.255.255 up +- # Add route to make broadcast work. Do not omit netmask. +- route add default dev $interface netmask 0.0.0.0 +- else +- ifconfig $interface 0 up +- fi ++ ifconfig $interface 0 up + + # We need to give the kernel some time to get the interface up. + sleep 1 +@@ -186,12 +176,14 @@ + ifconfig $interface inet $new_ip_address $new_subnet_arg \ + $new_broadcast_arg $mtu_arg + # Add a network route to the computed network address. +- if [ $relmajor -lt 2 ] || \ +- ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then +- route add -net $new_network_number $new_subnet_arg dev $interface ++ if [ x$IF_METRIC != x ] && [ x$IF_METRIC != x0 ]; then ++ route del -net $new_network_number $new_subnet_arg \ ++ dev $interface ++ route add -net $new_network_number $new_subnet_arg $metric_arg \ ++ dev $interface + fi + for router in $new_routers; do +- route add default gw $router ++ route add default gw $router $metric_arg dev $interface + done + fi + if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ]; +@@ -234,12 +226,15 @@ + ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg + route add -host $alias_ip_address dev $interface:0 + fi +- if [ $relmajor -lt 2 ] || \ +- ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then +- route add -net $new_network_number ++ # Add a network route to the computed network address. ++ if [ x$IF_METRIC != x ] && [ x$IF_METRIC != x0 ]; then ++ route del -net $new_network_number $new_subnet_arg \ ++ dev $interface ++ route add -net $new_network_number $new_subnet_arg $metric_arg \ ++ dev $interface + fi + for router in $new_routers; do +- route add default gw $router ++ route add default gw $router $metric_arg dev $interface + done + make_resolv_conf + exit_with_hooks 0 +diff -uNr dhcp-4.0.0.ORIG/client/scripts/netbsd dhcp-4.0.0/client/scripts/netbsd +--- dhcp-4.0.0.ORIG/client/scripts/netbsd 2008-09-01 13:22:40.000000000 +0100 ++++ dhcp-4.0.0/client/scripts/netbsd 2008-09-01 13:23:33.000000000 +0100 +@@ -95,6 +95,9 @@ + if [ x$new_interface_mtu != x ]; then + mtu_arg="mtu $new_interface_mtu" + fi ++if [ x$IF_METRIC != x ]; then ++ metric_arg="metric $IF_METRIC" ++fi + + if [ x$reason = xMEDIUM ]; then + eval "ifconfig $interface $medium" +@@ -156,7 +159,7 @@ + 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_netmask_arg \ +- $new_broadcast_arg $mtu_arg $medium" ++ $new_broadcast_arg $mtu_arg $metric_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 +@@ -213,7 +216,7 @@ + route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 + fi + eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ +- $new_broadcast_arg $mtu_arg $medium" ++ $new_broadcast_arg $mtu_arg $metric_arg $medium" + sleep 1 + if [ "$new_routers" != "" ]; then + set $new_routers +diff -uNr dhcp-4.0.0.ORIG/client/scripts/solaris dhcp-4.0.0/client/scripts/solaris +--- dhcp-4.0.0.ORIG/client/scripts/solaris 2008-09-01 13:22:40.000000000 +0100 ++++ dhcp-4.0.0/client/scripts/solaris 2008-09-01 13:23:33.000000000 +0100 +@@ -78,6 +78,9 @@ + if [ x$new_interface_mtu != x ]; then + mtu_arg="mtu $new_interface_mtu" + fi ++if [ x$IF_METRIC != x ]; then ++ metric_arg="metric $IF_METRIC" ++fi + + ifconfig=/sbin/ifconfig + +@@ -140,7 +143,7 @@ + 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_netmask_arg \ +- $new_broadcast_arg $mtu_arg $medium" ++ $new_broadcast_arg $mtu_arg $metric_arg $medium" + route add $new_ip_address 127.1 1 >/dev/null 2>&1 + for router in $new_routers; do + route add default $router 1 >/dev/null 2>&1 +@@ -181,7 +184,7 @@ + route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 + fi + eval "$ifconfig $interface inet $new_ip_address $new_netmask_arg \ +- $new_broadcast_arg $mtu_arg $medium" ++ $new_broadcast_arg $mtu_arg $metric_arg $medium" + sleep 1 + set $new_routers + if ping -s -n -I 1 $1 64 1; then diff --git a/net-misc/dhcp/files/dhcp-4.0-dhclient-ntp.patch b/net-misc/dhcp/files/dhcp-4.0-dhclient-ntp.patch new file mode 100644 index 0000000..d3f2971 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-4.0-dhclient-ntp.patch @@ -0,0 +1,216 @@ +diff -uNr dhcp-4.0.0.ORIG/client/clparse.c dhcp-4.0.0/client/clparse.c +--- dhcp-4.0.0.ORIG/client/clparse.c 2008-09-01 11:38:51.000000000 +0100 ++++ dhcp-4.0.0/client/clparse.c 2008-09-01 11:48:17.000000000 +0100 +@@ -37,7 +37,7 @@ + + struct client_config top_level_config; + +-#define NUM_DEFAULT_REQUESTED_OPTS 9 ++#define NUM_DEFAULT_REQUESTED_OPTS 10 + struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 1]; + + static void parse_client_default_duid(struct parse *cfile); +@@ -98,15 +98,20 @@ + dhcp_universe.code_hash, &code, 0, MDL); + + /* 8 */ +- code = D6O_NAME_SERVERS; ++ code = DHO_NTP_SERVERS; + option_code_hash_lookup(&default_requested_options[7], +- dhcpv6_universe.code_hash, &code, 0, MDL); ++ dhcp_universe.code_hash, &code, 0, MDL); + + /* 9 */ +- code = D6O_DOMAIN_SEARCH; ++ code = D6O_NAME_SERVERS; + option_code_hash_lookup(&default_requested_options[8], + dhcpv6_universe.code_hash, &code, 0, MDL); + ++ /* 10 */ ++ code = D6O_DOMAIN_SEARCH; ++ option_code_hash_lookup(&default_requested_options[9], ++ dhcpv6_universe.code_hash, &code, 0, MDL); ++ + for (code = 0 ; code < NUM_DEFAULT_REQUESTED_OPTS ; code++) { + if (default_requested_options[code] == NULL) + log_fatal("Unable to find option definition for " +diff -uNr dhcp-4.0.0.ORIG/client/scripts/bsdos dhcp-4.0.0/client/scripts/bsdos +--- dhcp-4.0.0.ORIG/client/scripts/bsdos 2008-09-01 11:38:51.000000000 +0100 ++++ dhcp-4.0.0/client/scripts/bsdos 2008-09-01 11:39:30.000000000 +0100 +@@ -29,6 +29,26 @@ + + mv /etc/resolv.conf.dhclient6 /etc/resolv.conf + fi ++ # If we're making confs, may as well make an ntp.conf too ++ make_ntp_conf ++} ++ ++make_ntp_conf() { ++ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then ++ if [ x$new_ntp_servers != x ]; then ++ conf="# Generated by dhclient for interface $interface\n" ++ conf="${conf}restrict default noquery notrust nomodify\n" ++ conf="${conf}restrict 127.0.0.1\n" ++ for ntpserver in $new_ntp_servers; do ++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" ++ conf="${conf}server $ntpserver\n" ++ done ++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" ++ conf="${conf}logfile /var/log/ntp.log\n" ++ printf "${conf}" > /etc/ntp.conf ++ chmod 644 /etc/ntp.conf ++ fi ++ fi + } + + # Must be used on exit. Invokes the local dhcp client exit hooks, if any. +diff -uNr dhcp-4.0.0.ORIG/client/scripts/freebsd dhcp-4.0.0/client/scripts/freebsd +--- dhcp-4.0.0.ORIG/client/scripts/freebsd 2008-09-01 11:38:51.000000000 +0100 ++++ dhcp-4.0.0/client/scripts/freebsd 2008-09-01 11:39:30.000000000 +0100 +@@ -73,6 +73,26 @@ + fi + fi + fi ++ # If we're making confs, may as well make an ntp.conf too ++ make_ntp_conf ++} ++ ++make_ntp_conf() { ++ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then ++ if [ "x$new_ntp_servers" != x ]; then ++ conf="# Generated by dhclient for interface $interface\n" ++ conf="${conf}restrict default noquery notrust nomodify\n" ++ conf="${conf}restrict 127.0.0.1\n" ++ for ntpserver in $new_ntp_servers; do ++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" ++ conf="${conf}server $ntpserver\n" ++ done ++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" ++ conf="${conf}logfile /var/log/ntp.log\n" ++ printf "${conf}" > /etc/ntp.conf ++ chmod 644 /etc/ntp.conf ++ fi ++ fi + } + + # Must be used on exit. Invokes the local dhcp client exit hooks, if any. +diff -uNr dhcp-4.0.0.ORIG/client/scripts/linux dhcp-4.0.0/client/scripts/linux +--- dhcp-4.0.0.ORIG/client/scripts/linux 2008-09-01 11:38:51.000000000 +0100 ++++ dhcp-4.0.0/client/scripts/linux 2008-09-01 11:39:30.000000000 +0100 +@@ -55,6 +55,26 @@ + + mv /etc/resolv.conf.dhclient6 /etc/resolv.conf + fi ++ # If we're making confs, may as well make an ntp.conf too ++ make_ntp_conf ++} ++ ++make_ntp_conf() { ++ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then ++ if [ "x$new_ntp_servers" != x ]; then ++ conf="# Generated by dhclient for interface $interface\n" ++ conf="${conf}restrict default noquery notrust nomodify\n" ++ conf="${conf}restrict 127.0.0.1\n" ++ for ntpserver in $new_ntp_servers; do ++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" ++ conf="${conf}server $ntpserver\n" ++ done ++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" ++ conf="${conf}logfile /var/log/ntp.log\n" ++ printf "${conf}" > /etc/ntp.conf ++ chmod 644 /etc/ntp.conf ++ fi ++ fi + } + + # Must be used on exit. Invokes the local dhcp client exit hooks, if any. +diff -uNr dhcp-4.0.0.ORIG/client/scripts/netbsd dhcp-4.0.0/client/scripts/netbsd +--- dhcp-4.0.0.ORIG/client/scripts/netbsd 2008-09-01 11:38:51.000000000 +0100 ++++ dhcp-4.0.0/client/scripts/netbsd 2008-09-01 11:39:30.000000000 +0100 +@@ -29,6 +29,26 @@ + + mv /etc/resolv.conf.dhclient6 /etc/resolv.conf + fi ++ # If we're making confs, may as well make an ntp.conf too ++ make_ntp_conf ++} ++ ++make_ntp_conf() { ++ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then ++ if [ "x$new_ntp_servers" != x ]; then ++ conf="# Generated by dhclient for interface $interface\n" ++ conf="${conf}restrict default noquery notrust nomodify\n" ++ conf="${conf}restrict 127.0.0.1\n" ++ for ntpserver in $new_ntp_servers; do ++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" ++ conf="${conf}server $ntpserver\n" ++ done ++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" ++ conf="${conf}logfile /var/log/ntp.log\n" ++ printf "${conf}" > /etc/ntp.conf ++ chmod 644 /etc/ntp.conf ++ fi ++ fi + } + + # Must be used on exit. Invokes the local dhcp client exit hooks, if any. +diff -uNr dhcp-4.0.0.ORIG/client/scripts/openbsd dhcp-4.0.0/client/scripts/openbsd +--- dhcp-4.0.0.ORIG/client/scripts/openbsd 2008-09-01 11:38:51.000000000 +0100 ++++ dhcp-4.0.0/client/scripts/openbsd 2008-09-01 11:39:30.000000000 +0100 +@@ -29,6 +29,26 @@ + + mv /etc/resolv.conf.dhclient6 /etc/resolv.conf + fi ++ # If we're making confs, may as well make an ntp.conf too ++ make_ntp_conf ++} ++ ++make_ntp_conf() { ++ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then ++ if [ "x$new_ntp_servers" != x ]; then ++ conf="# Generated by dhclient for interface $interface\n" ++ conf="${conf}restrict default noquery notrust nomodify\n" ++ conf="${conf}restrict 127.0.0.1\n" ++ for ntpserver in $new_ntp_servers; do ++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" ++ conf="${conf}server $ntpserver\n" ++ done ++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" ++ conf="${conf}logfile /var/log/ntp.log\n" ++ printf "${conf}" > /etc/ntp.conf ++ chmod 644 /etc/ntp.conf ++ fi ++ fi + } + + # Must be used on exit. Invokes the local dhcp client exit hooks, if any. +diff -uNr dhcp-4.0.0.ORIG/client/scripts/solaris dhcp-4.0.0/client/scripts/solaris +--- dhcp-4.0.0.ORIG/client/scripts/solaris 2008-09-01 11:38:51.000000000 +0100 ++++ dhcp-4.0.0/client/scripts/solaris 2008-09-01 11:39:30.000000000 +0100 +@@ -17,6 +17,26 @@ + + mv /etc/resolv.conf.dhclient /etc/resolv.conf + fi ++ # If we're making confs, may as well make an ntp.conf too ++ make_ntp_conf ++} ++ ++make_ntp_conf() { ++ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then ++ if [ "x$new_ntp_servers" != x ]; then ++ conf="# Generated by dhclient for interface $interface\n" ++ conf="${conf}restrict default noquery notrust nomodify\n" ++ conf="${conf}restrict 127.0.0.1\n" ++ for ntpserver in $new_ntp_servers; do ++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" ++ conf="${conf}server $ntpserver\n" ++ done ++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" ++ conf="${conf}logfile /var/log/ntp.log\n" ++ printf "${conf}" > /etc/ntp.conf ++ chmod 644 /etc/ntp.conf ++ fi ++ fi + } + + # Must be used on exit. Invokes the local dhcp client exit hooks, if any. diff --git a/net-misc/dhcp/files/dhcp-4.0-dhclient-resolvconf.patch b/net-misc/dhcp/files/dhcp-4.0-dhclient-resolvconf.patch new file mode 100644 index 0000000..063b8e3 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-4.0-dhclient-resolvconf.patch @@ -0,0 +1,390 @@ +diff -ur a/client/scripts/bsdos b/client/scripts/bsdos +--- a/client/scripts/bsdos 2008-09-01 14:41:00.000000000 +0100 ++++ b/client/scripts/bsdos 2008-09-01 14:57:33.000000000 +0100 +@@ -1,34 +1,41 @@ + #!/bin/sh + + make_resolv_conf() { ++ if [ x"$PEER_DNS" != x ] && [ x$"PEER_DNS" != xyes ]; then ++ return 0 ++ fi ++ local conf= + if [ x"$new_domain_name_servers" != x ]; then +- cat /dev/null > /etc/resolv.conf.dhclient + if [ "x$new_domain_search" != x ]; then +- echo search $new_domain_search >> /etc/resolv.conf.dhclient ++ conf="${conf}search ${new_domain_search}\n" + elif [ "x$new_domain_name" != x ]; then + # Note that the DHCP 'Domain Name Option' is really just a domain + # name, and that this practice of using the domain name option as + # a search path is both nonstandard and deprecated. +- echo search $new_domain_name >> /etc/resolv.conf.dhclient ++ conf="${conf}search ${new_domain_name}\n" + fi + for nameserver in $new_domain_name_servers; do +- echo nameserver $nameserver >> /etc/resolv.conf.dhclient ++ conf="${conf}nameserver ${nameserver}\n" + done +- +- mv /etc/resolv.conf.dhclient /etc/resolv.conf + elif [ "x${new_dhcp6_name_servers}" != x ] ; then +- cat /dev/null > /etc/resolv.conf.dhclient6 +- chmod 644 /etc/resolv.conf.dhclient6 +- + if [ "x${new_dhcp6_domain_search}" != x ] ; then +- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 ++ conf="${conf}search ${new_dhcp6_domain_search}\n" + fi + for nameserver in ${new_dhcp6_name_servers} ; do +- echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6 ++ conf="${conf}nameserver ${nameserver}\n" + done ++ fi + +- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf ++ if [ x"$conf" != x ]; then ++ conf="# Generated by dhclient or interface $interface\n${conf}" ++ if type resolvconf >/dev/null 2>&1; then ++ printf "${conf}" | resolvconf -a $interface ++ else ++ printf "${conf}" > /etc/resolv.conf ++ chmod 644 /etc/resolv.conf ++ fi + fi ++ + # If we're making confs, may as well make an ntp.conf too + make_ntp_conf + } +diff -ur a/client/scripts/freebsd b/client/scripts/freebsd +--- a/client/scripts/freebsd 2008-09-01 14:41:00.000000000 +0100 ++++ b/client/scripts/freebsd 2008-09-01 15:00:18.000000000 +0100 +@@ -11,68 +11,41 @@ + fi + + make_resolv_conf() { ++ if [ x"$PEER_DNS" != x ] && [ x$"PEER_DNS" != xyes ]; then ++ return 0 ++ fi ++ local conf= + if [ x"$new_domain_name_servers" != x ]; then +- ( cat /dev/null > /etc/resolv.conf.dhclient ) +- exit_status=$? +- if [ $exit_status -ne 0 ]; then +- $LOGGER "Unable to create /etc/resolv.conf.dhclient: Error $exit_status" +- else +- if [ "x$new_domain_search" != x ]; then +- ( echo search $new_domain_search >> /etc/resolv.conf.dhclient ) +- exit_status=$? +- elif [ "x$new_domain_name" != x ]; then +- # Note that the DHCP 'Domain Name Option' is really just a domain +- # name, and that this practice of using the domain name option as +- # a search path is both nonstandard and deprecated. +- ( echo search $new_domain_name >> /etc/resolv.conf.dhclient ) +- exit_status=$? +- fi +- for nameserver in $new_domain_name_servers; do +- if [ $exit_status -ne 0 ]; then +- break +- fi +- ( echo nameserver $nameserver >>/etc/resolv.conf.dhclient ) +- exit_status=$? +- done +- +- # If there were no errors, attempt to mv the new file into place. +- if [ $exit_status -eq 0 ]; then +- ( mv /etc/resolv.conf.dhclient /etc/resolv.conf ) +- exit_status=$? +- fi +- +- if [ $exit_status -ne 0 ]; then +- $LOGGER "Error while writing new /etc/resolv.conf." +- fi ++ if [ "x$new_domain_search" != x ]; then ++ conf="${conf}search ${new_domain_search}\n" ++ elif [ "x$new_domain_name" != x ]; then ++ # Note that the DHCP 'Domain Name Option' is really just a domain ++ # name, and that this practice of using the domain name option as ++ # a search path is both nonstandard and deprecated. ++ conf="${conf}search ${new_domain_name}\n" + fi ++ for nameserver in $new_domain_name_servers; do ++ conf="${conf}nameserver ${nameserver}\n" ++ done + elif [ "x${new_dhcp6_name_servers}" != x ] ; then +- ( cat /dev/null > /etc/resolv.conf.dhclient6 ) +- exit_status=$? +- if [ $exit_status -ne 0 ] ; then +- $LOGGER "Unable to create /etc/resolv.conf.dhclient6: Error $exit_status" +- else +- if [ "x${new_dhcp6_domain_search}" != x ] ; then +- ( echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 ) +- exit_status=$? +- fi +- for nameserver in ${new_dhcp6_name_servers} ; do +- if [ $exit_status -ne 0 ] ; then +- break +- fi +- ( echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6 ) +- exit_status=$? +- done +- +- if [ $exit_status -eq 0 ] ; then +- ( mv /etc/resolv.conf.dhclient6 /etc/resolv.conf ) +- exit_status=$? +- fi ++ if [ "x${new_dhcp6_domain_search}" != x ] ; then ++ conf="${conf}search ${new_dhcp6_domain_search}\n" ++ fi ++ for nameserver in ${new_dhcp6_name_servers} ; do ++ conf="${conf}nameserver ${nameserver}\n" ++ done ++ fi + +- if [ $exit_status -ne 0 ] ; then +- $LOGGER "Error while writing new /etc/resolv.conf." +- fi ++ if [ x"$conf" != x ]; then ++ conf="# Generated by dhclient or interface $interface\n${conf}" ++ if type resolvconf >/dev/null 2>&1; then ++ printf "${conf}" | resolvconf -a $interface ++ else ++ printf "${conf}" > /etc/resolv.conf ++ chmod 644 /etc/resolv.conf + fi + fi ++ + # If we're making confs, may as well make an ntp.conf too + make_ntp_conf + } +diff -ur a/client/scripts/linux b/client/scripts/linux +--- a/client/scripts/linux 2008-09-01 14:41:00.000000000 +0100 ++++ b/client/scripts/linux 2008-09-01 14:58:09.000000000 +0100 +@@ -26,35 +26,41 @@ + ip=/sbin/ip + + make_resolv_conf() { ++ if [ x"$PEER_DNS" != x ] && [ x$"PEER_DNS" != xyes ]; then ++ return 0 ++ fi ++ local conf= + if [ x"$new_domain_name_servers" != x ]; then +- cat /dev/null > /etc/resolv.conf.dhclient +- chmod 644 /etc/resolv.conf.dhclient +- if [ x"$new_domain_search" != x ]; then +- echo search $new_domain_search >> /etc/resolv.conf.dhclient +- elif [ x"$new_domain_name" != x ]; then ++ if [ "x$new_domain_search" != x ]; then ++ conf="${conf}search ${new_domain_search}\n" ++ elif [ "x$new_domain_name" != x ]; then + # Note that the DHCP 'Domain Name Option' is really just a domain + # name, and that this practice of using the domain name option as + # a search path is both nonstandard and deprecated. +- echo search $new_domain_name >> /etc/resolv.conf.dhclient ++ conf="${conf}search ${new_domain_name}\n" + fi + for nameserver in $new_domain_name_servers; do +- echo nameserver $nameserver >>/etc/resolv.conf.dhclient ++ conf="${conf}nameserver ${nameserver}\n" + done +- +- mv /etc/resolv.conf.dhclient /etc/resolv.conf + elif [ "x${new_dhcp6_name_servers}" != x ] ; then +- cat /dev/null > /etc/resolv.conf.dhclient6 +- chmod 644 /etc/resolv.conf.dhclient6 +- + if [ "x${new_dhcp6_domain_search}" != x ] ; then +- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 ++ conf="${conf}search ${new_dhcp6_domain_search}\n" + fi + for nameserver in ${new_dhcp6_name_servers} ; do +- echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6 ++ conf="${conf}nameserver ${nameserver}\n" + done ++ fi + +- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf ++ if [ x"$conf" != x ]; then ++ conf="# Generated by dhclient or interface $interface\n${conf}" ++ if type resolvconf >/dev/null 2>&1; then ++ printf "${conf}" | resolvconf -a $interface ++ else ++ printf "${conf}" > /etc/resolv.conf ++ chmod 644 /etc/resolv.conf ++ fi + fi ++ + # If we're making confs, may as well make an ntp.conf too + make_ntp_conf + } +diff -ur a/client/scripts/netbsd b/client/scripts/netbsd +--- a/client/scripts/netbsd 2008-09-01 14:41:00.000000000 +0100 ++++ b/client/scripts/netbsd 2008-09-01 14:58:40.000000000 +0100 +@@ -1,34 +1,41 @@ + #!/bin/sh + + make_resolv_conf() { +- if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then +- cat /dev/null > /etc/resolv.conf.dhclient +- if [ "x$new_domain_search != x ]; then +- echo search $new_domain_search >> /etc/resolv.conf.dhclient +- elif [ "x$new_domain_name != x ]; then ++ if [ x"$PEER_DNS" != x ] && [ x$"PEER_DNS" != xyes ]; then ++ return 0 ++ fi ++ local conf= ++ if [ x"$new_domain_name_servers" != x ]; then ++ if [ "x$new_domain_search" != x ]; then ++ conf="${conf}search ${new_domain_search}\n" ++ elif [ "x$new_domain_name" != x ]; then + # Note that the DHCP 'Domain Name Option' is really just a domain + # name, and that this practice of using the domain name option as + # a search path is both nonstandard and deprecated. +- echo search $new_domain_name >> /etc/resolv.conf.dhclient ++ conf="${conf}search ${new_domain_name}\n" + fi + for nameserver in $new_domain_name_servers; do +- echo nameserver $nameserver >>/etc/resolv.conf.dhclient ++ conf="${conf}nameserver ${nameserver}\n" + done +- +- mv /etc/resolv.conf.dhclient /etc/resolv.conf + elif [ "x${new_dhcp6_name_servers}" != x ] ; then +- cat /dev/null > /etc/resolv.conf.dhclient6 +- chmod 644 /etc/resolv.conf.dhclient6 +- + if [ "x${new_dhcp6_domain_search}" != x ] ; then +- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 ++ conf="${conf}search ${new_dhcp6_domain_search}\n" + fi + for nameserver in ${new_dhcp6_name_servers} ; do +- echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6 ++ conf="${conf}nameserver ${nameserver}\n" + done ++ fi + +- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf ++ if [ x"$conf" != x ]; then ++ conf="# Generated by dhclient or interface $interface\n${conf}" ++ if type resolvconf >/dev/null 2>&1; then ++ printf "${conf}" | resolvconf -a $interface ++ else ++ printf "${conf}" > /etc/resolv.conf ++ chmod 644 /etc/resolv.conf ++ fi + fi ++ + # If we're making confs, may as well make an ntp.conf too + make_ntp_conf + } +diff -ur a/client/scripts/openbsd b/client/scripts/openbsd +--- a/client/scripts/openbsd 2008-09-01 14:41:00.000000000 +0100 ++++ b/client/scripts/openbsd 2008-09-01 14:59:12.000000000 +0100 +@@ -1,34 +1,41 @@ + #!/bin/sh + + make_resolv_conf() { +- if x"$new_domain_name_servers" != x ]; then +- cat /dev/null > /etc/resolv.conf.dhclient +- if [ x"$new_domain_search" != x ]; then +- echo search $new_domain_search >> /etc/resolv.conf.dhclient +- elif [ x"$new_domain_name" != x ]; then ++ if [ x"$PEER_DNS" != x ] && [ x$"PEER_DNS" != xyes ]; then ++ return 0 ++ fi ++ local conf= ++ if [ x"$new_domain_name_servers" != x ]; then ++ if [ "x$new_domain_search" != x ]; then ++ conf="${conf}search ${new_domain_search}\n" ++ elif [ "x$new_domain_name" != x ]; then + # Note that the DHCP 'Domain Name Option' is really just a domain + # name, and that this practice of using the domain name option as + # a search path is both nonstandard and deprecated. +- echo search $new_domain_name >> /etc/resolv.conf.dhclient ++ conf="${conf}search ${new_domain_name}\n" + fi + for nameserver in $new_domain_name_servers; do +- echo nameserver $nameserver >>/etc/resolv.conf.dhclient ++ conf="${conf}nameserver ${nameserver}\n" + done +- +- mv /etc/ersolv.conf.dhclient /etc/resolv.conf + elif [ "x${new_dhcp6_name_servers}" != x ] ; then +- cat /dev/null > /etc/resolv.conf.dhclient6 +- chmod 644 /etc/resolv.conf.dhclient6 +- + if [ "x${new_dhcp6_domain_search}" != x ] ; then +- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 ++ conf="${conf}search ${new_dhcp6_domain_search}\n" + fi + for nameserver in ${new_dhcp6_name_servers} ; do +- echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6 ++ conf="${conf}nameserver ${nameserver}\n" + done ++ fi + +- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf ++ if [ x"$conf" != x ]; then ++ conf="# Generated by dhclient or interface $interface\n${conf}" ++ if type resolvconf >/dev/null 2>&1; then ++ printf "${conf}" | resolvconf -a $interface ++ else ++ printf "${conf}" > /etc/resolv.conf ++ chmod 644 /etc/resolv.conf ++ fi + fi ++ + # If we're making confs, may as well make an ntp.conf too + make_ntp_conf + } +diff -ur a/client/scripts/solaris b/client/scripts/solaris +--- a/client/scripts/solaris 2008-09-01 14:41:00.000000000 +0100 ++++ b/client/scripts/solaris 2008-09-01 14:59:27.000000000 +0100 +@@ -1,22 +1,41 @@ + #!/bin/sh + + make_resolv_conf() { ++ if [ x"$PEER_DNS" != x ] && [ x$"PEER_DNS" != xyes ]; then ++ return 0 ++ fi ++ local conf= + if [ x"$new_domain_name_servers" != x ]; then +- cat /dev/null > /etc/resolv.conf.dhclient +- if [ x"$new_domain_search" != x ]; then +- echo search $new_domain_search >> /etc/resolv.conf.dhclient +- elif [ x"$new_domain_name" != x ]; then ++ if [ "x$new_domain_search" != x ]; then ++ conf="${conf}search ${new_domain_search}\n" ++ elif [ "x$new_domain_name" != x ]; then + # Note that the DHCP 'Domain Name Option' is really just a domain + # name, and that this practice of using the domain name option as + # a search path is both nonstandard and deprecated. +- echo search $new_domain_name >> /etc/resolv.conf.dhclient ++ conf="${conf}search ${new_domain_name}\n" + fi + for nameserver in $new_domain_name_servers; do +- echo nameserver $nameserver >>/etc/resolv.conf.dhclient ++ conf="${conf}nameserver ${nameserver}\n" ++ done ++ elif [ "x${new_dhcp6_name_servers}" != x ] ; then ++ if [ "x${new_dhcp6_domain_search}" != x ] ; then ++ conf="${conf}search ${new_dhcp6_domain_search}\n" ++ fi ++ for nameserver in ${new_dhcp6_name_servers} ; do ++ conf="${conf}nameserver ${nameserver}\n" + done ++ fi + +- mv /etc/resolv.conf.dhclient /etc/resolv.conf ++ if [ x"$conf" != x ]; then ++ conf="# Generated by dhclient or interface $interface\n${conf}" ++ if type resolvconf >/dev/null 2>&1; then ++ printf "${conf}" | resolvconf -a $interface ++ else ++ printf "${conf}" > /etc/resolv.conf ++ chmod 644 /etc/resolv.conf ++ fi + fi ++ + # If we're making confs, may as well make an ntp.conf too + make_ntp_conf + } diff --git a/net-misc/dhcp/files/dhcp-4.0-dhclient-script-correct-operators.patch b/net-misc/dhcp/files/dhcp-4.0-dhclient-script-correct-operators.patch new file mode 100644 index 0000000..7cf0b24 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-4.0-dhclient-script-correct-operators.patch @@ -0,0 +1,48 @@ +diff -uNr dhcp-4.0.0.ORIG/client/scripts/linux dhcp-4.0.0/client/scripts/linux +--- dhcp-4.0.0.ORIG/client/scripts/linux 2008-09-03 00:52:41.000000000 +0100 ++++ dhcp-4.0.0/client/scripts/linux 2008-09-03 00:53:16.000000000 +0100 +@@ -258,7 +232,7 @@ + ### DHCPv6 Handlers + ### + +-if [ ${reason} = PREINIT6 ] ; then ++if [ x$reason = xPREINIT6 ] ; then + # Ensure interface is up. + ${ip} link set ${interface} up + +@@ -268,7 +242,7 @@ + exit_with_hooks 0 + fi + +-if [ ${reason} = BOUND6 ] ; then ++if [ x$reason = xBOUND6 ] ; then + if [ x${new_ip6_address} = x ] || [ x${new_ip6_prefixlen} = x ] ; then + exit_with_hooks 2; + fi +@@ -282,7 +256,7 @@ + exit_with_hooks 0 + fi + +-if [ ${reason} = RENEW6 ] || [ ${reason} = REBIND6 ] ; then ++if [ x$reason = xRENEW6 ] || [ x$reason} = xREBIND6 ] ; then + # Make sure nothing has moved around on us. + + # Nameservers/domains/etc. +@@ -294,7 +268,7 @@ + exit_with_hooks 0 + fi + +-if [ ${reason} = DEPREF6 ] ; then ++if [ x$reason = xDEPREF6 ] ; then + if [ x${new_ip6_prefixlen} = x ] ; then + exit_with_hooks 2; + fi +@@ -307,7 +281,7 @@ + exit_with_hooks 0 + fi + +-if [ ${reason} = EXPIRE6 -o ${reason} = RELEASE6 -o ${reason} = STOP6 ] ; then ++if [ x$reason = xEXPIRE6 -o x$reason = xRELEASE6 -o x$reason = xSTOP6 ] ; then + if [ x${old_ip6_address} = x ] || [ x${old_ip6_prefixlen} = x ] ; then + exit_with_hooks 2; + fi diff --git a/net-misc/dhcp/files/dhcp-4.0-linux-ipv6-header.patch b/net-misc/dhcp/files/dhcp-4.0-linux-ipv6-header.patch new file mode 100644 index 0000000..948bd87 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-4.0-linux-ipv6-header.patch @@ -0,0 +1,25 @@ +diff -uNr dhcp-4.0.0.ORIG/common/socket.c dhcp-4.0.0/common/socket.c +--- dhcp-4.0.0.ORIG/common/socket.c 2008-09-02 10:25:21.000000000 +0100 ++++ dhcp-4.0.0/common/socket.c 2008-09-02 10:27:29.000000000 +0100 +@@ -46,6 +46,10 @@ + #include + #include + ++#ifdef HAVE_LINUX_IPV6_H ++#include ++#endif ++ + #ifdef USE_SOCKET_FALLBACK + # if !defined (USE_SOCKET_SEND) + # define if_register_send if_register_fallback +diff -uNr dhcp-4.0.0.ORIG/configure.ac dhcp-4.0.0/configure.ac +--- dhcp-4.0.0.ORIG/configure.ac 2008-09-02 10:25:21.000000000 +0100 ++++ dhcp-4.0.0/configure.ac 2008-09-02 10:26:29.000000000 +0100 +@@ -37,6 +37,7 @@ + if test "$enable_dhcpv6" != "no"; then + AC_DEFINE([DHCPv6], [1], + [Define to 1 to include DHCPv6 support.]) ++ AC_CHECK_HEADERS(linux/ipv6.h) + fi + + ### diff --git a/net-misc/dhcp/files/dhcp-4.0-no_isc_blurb.patch b/net-misc/dhcp/files/dhcp-4.0-no_isc_blurb.patch new file mode 100644 index 0000000..ac37e95 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-4.0-no_isc_blurb.patch @@ -0,0 +1,96 @@ +diff -uNr dhcp-4.0.0.ORIG/client/dhclient.c dhcp-4.0.0/client/dhclient.c +--- dhcp-4.0.0.ORIG/client/dhclient.c 2008-09-01 13:38:38.000000000 +0100 ++++ dhcp-4.0.0/client/dhclient.c 2008-09-01 13:41:32.000000000 +0100 +@@ -80,6 +80,8 @@ + + static isc_result_t write_duid(struct data_string *duid); + ++extern int log_isc_blurb; ++ + int + main(int argc, char **argv) { + int fd; +@@ -323,6 +325,7 @@ + log_info ("%s", ""); + } else { + log_perror = 0; ++ log_isc_blurb = 0; + quiet_interface_discovery = 1; + } + +diff -uNr dhcp-4.0.0.ORIG/omapip/errwarn.c dhcp-4.0.0/omapip/errwarn.c +--- dhcp-4.0.0.ORIG/omapip/errwarn.c 2008-09-01 13:38:38.000000000 +0100 ++++ dhcp-4.0.0/omapip/errwarn.c 2008-09-01 13:39:17.000000000 +0100 +@@ -43,6 +43,8 @@ + int log_perror = 1; + #endif + int log_priority; ++int log_isc_blurb=1; ++ + void (*log_cleanup) (void); + + #define CVT_BUF_MAX 1023 +@@ -74,7 +76,9 @@ + write (STDERR_FILENO, "\n", 1); + } + +-#if !defined (NOMINUM) ++#if !defined(NOMINUM) ++ if ( log_isc_blurb ) ++ { + log_error ("%s", ""); + log_error ("If you did not get this software from ftp.isc.org, please"); + log_error ("get the latest from ftp.isc.org and install that before"); +@@ -92,7 +96,12 @@ + log_error ("the README file."); + log_error ("%s", ""); + log_error ("exiting."); ++ }else ++ { ++ log_error ("exiting."); ++ } + #endif ++ + if (log_cleanup) + (*log_cleanup) (); + exit (1); +diff -uNr dhcp-4.0.0.ORIG/relay/dhcrelay.c dhcp-4.0.0/relay/dhcrelay.c +--- dhcp-4.0.0.ORIG/relay/dhcrelay.c 2008-09-01 13:38:38.000000000 +0100 ++++ dhcp-4.0.0/relay/dhcrelay.c 2008-09-01 13:43:15.000000000 +0100 +@@ -97,6 +97,7 @@ + static char arr [] = "All rights reserved."; + static char message [] = "Internet Systems Consortium DHCP Relay Agent"; + static char url [] = "For info, please visit http://www.isc.org/sw/dhcp/"; ++extern int log_isc_blurb; + + int + main(int argc, char **argv) { +@@ -163,6 +164,7 @@ + } else if (!strcmp (argv [i], "-q")) { + quiet = 1; + quiet_interface_discovery = 1; ++ log_isc_blurb = 0; + } else if (!strcmp (argv [i], "-a")) { + add_agent_options = 1; + } else if (!strcmp (argv [i], "-c")) { +diff -uNr dhcp-4.0.0.ORIG/server/dhcpd.c dhcp-4.0.0/server/dhcpd.c +--- dhcp-4.0.0.ORIG/server/dhcpd.c 2008-09-01 13:38:38.000000000 +0100 ++++ dhcp-4.0.0/server/dhcpd.c 2008-09-01 13:42:37.000000000 +0100 +@@ -61,6 +61,9 @@ + struct iaddr server_identifier; + int server_identifier_matched; + ++ ++extern int log_isc_blurb; ++ + #if defined (NSUPDATE) + + /* This stuff is always executed to figure the default values for certain +@@ -359,6 +362,7 @@ + lftest = 1; + log_perror = -1; + } else if (!strcmp (argv [i], "-q")) { ++ log_isc_blurb = 0; + quiet = 1; + quiet_interface_discovery = 1; + #ifdef DHCPv6 diff --git a/net-misc/dhcp/files/dhcp-4.0-paranoia.patch b/net-misc/dhcp/files/dhcp-4.0-paranoia.patch new file mode 100644 index 0000000..4c3ce76 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-4.0-paranoia.patch @@ -0,0 +1,189 @@ +diff -uNr dhcp-4.0.0.ORIG/configure.ac dhcp-4.0.0/configure.ac +--- dhcp-4.0.0.ORIG/configure.ac 2008-09-02 10:57:37.000000000 +0100 ++++ dhcp-4.0.0/configure.ac 2008-09-02 11:00:27.000000000 +0100 +@@ -30,6 +30,17 @@ + [Define to BIG_ENDIAN for MSB (Motorola or SPARC CPUs) + or LITTLE_ENDIAN for LSB (Intel CPUs).]) + ++# Paranoia/early chrooting is off by default ++AC_ARG_ENABLE(paranoia, ++ AC_HELP_STRING([--enable-paranoia], ++ [enable support for early chroot (default is no)])) ++if test "$enable_paranoia" != "no"; then ++ AC_DEFINE([PARANOIA], [1], ++ [Define to enable paranoia.]) ++ AC_DEFINE([EARLY_CHROOT], [1], ++ [Define to 1 to chroot early.]) ++fi ++ + # DHCPv6 is off by default + AC_ARG_ENABLE(dhcpv6, + AC_HELP_STRING([--enable-dhcpv6], +diff -uNr dhcp-4.0.0.ORIG/server/dhcpd.c dhcp-4.0.0/server/dhcpd.c +--- dhcp-4.0.0.ORIG/server/dhcpd.c 2008-09-02 10:57:37.000000000 +0100 ++++ dhcp-4.0.0/server/dhcpd.c 2008-09-02 10:57:54.000000000 +0100 +@@ -46,6 +46,16 @@ + #include + #include + ++#if defined (PARANOIA) ++# include ++# include ++# include ++/* get around the ISC declaration of group */ ++# define group real_group ++# include ++# undef group ++#endif /* PARANOIA */ ++ + static void usage(void); + + struct iaddr server_identifier; +@@ -195,6 +205,21 @@ + omapi_object_dereference (&listener, MDL); + } + ++#if defined (PARANOIA) ++/* to be used in one of two possible scenarios */ ++static void setup_chroot (char *chroot_dir) { ++ if (geteuid()) ++ log_fatal ("you must be root to use chroot"); ++ if (chroot(chroot_dir)) { ++ log_fatal ("chroot(\"%s\"): %m", chroot_dir); ++ } ++ if (chdir ("/")) { ++ /* probably permission denied */ ++ log_fatal ("chdir(\"/\"): %m"); ++ } ++} ++#endif /* PARANOIA */ ++ + #ifndef UNIT_TEST + int + main(int argc, char **argv) { +@@ -224,6 +249,14 @@ + char *traceinfile = (char *)0; + char *traceoutfile = (char *)0; + #endif ++#if defined (PARANOIA) ++ char *set_user = 0; ++ char *set_group = 0; ++ char *set_chroot = 0; ++ ++ uid_t set_uid = 0; ++ gid_t set_gid = 0; ++#endif /* PARANOIA */ + + /* Make sure that file descriptors 0 (stdin), 1, (stdout), and + 2 (stderr) are open. To do this, we assume that when we +@@ -284,6 +317,20 @@ + if (++i == argc) + usage (); + server = argv [i]; ++#if defined (PARANOIA) ++ } else if (!strcmp (argv [i], "-user")) { ++ if (++i == argc) ++ usage (); ++ set_user = argv [i]; ++ } else if (!strcmp (argv [i], "-group")) { ++ if (++i == argc) ++ usage (); ++ set_group = argv [i]; ++ } else if (!strcmp (argv [i], "-chroot")) { ++ if (++i == argc) ++ usage (); ++ set_chroot = argv [i]; ++#endif /* PARANOIA */ + } else if (!strcmp (argv [i], "-cf")) { + if (++i == argc) + usage (); +@@ -438,6 +485,44 @@ + trace_seed_stop, MDL); + #endif + ++#if defined (PARANOIA) ++ /* get user and group info if those options were given */ ++ if (set_user) { ++ struct passwd *tmp_pwd; ++ ++ if (geteuid()) ++ log_fatal ("you must be root to set user"); ++ ++ if (!(tmp_pwd = getpwnam(set_user))) ++ log_fatal ("no such user: %s", set_user); ++ ++ set_uid = tmp_pwd->pw_uid; ++ ++ /* use the user's group as the default gid */ ++ if (!set_group) ++ set_gid = tmp_pwd->pw_gid; ++ } ++ ++ if (set_group) { ++/* get around the ISC declaration of group */ ++#define group real_group ++ struct group *tmp_grp; ++ ++ if (geteuid()) ++ log_fatal ("you must be root to set group"); ++ ++ if (!(tmp_grp = getgrnam(set_group))) ++ log_fatal ("no such group: %s", set_group); ++ ++ set_gid = tmp_grp->gr_gid; ++#undef group ++ } ++ ++# if defined (EARLY_CHROOT) ++ if (set_chroot) setup_chroot (set_chroot); ++# endif /* EARLY_CHROOT */ ++#endif /* PARANOIA */ ++ + /* Default to the DHCP/BOOTP port. */ + if (!local_port) + { +@@ -576,6 +661,10 @@ + + postconf_initialization (quiet); + ++#if defined (PARANOIA) && !defined (EARLY_CHROOT) ++ if (set_chroot) setup_chroot (set_chroot); ++#endif /* PARANOIA && !EARLY_CHROOT */ ++ + /* test option should cause an early exit */ + if (cftest && !lftest) + exit(0); +@@ -659,6 +748,22 @@ + exit (0); + } + ++#if defined (PARANOIA) ++ /* change uid to the specified one */ ++ ++ if (set_gid) { ++ if (setgroups (0, (void *)0)) ++ log_fatal ("setgroups: %m"); ++ if (setgid (set_gid)) ++ log_fatal ("setgid(%d): %m", (int) set_gid); ++ } ++ ++ if (set_uid) { ++ if (setuid (set_uid)) ++ log_fatal ("setuid(%d): %m", (int) set_uid); ++ } ++#endif /* PARANOIA */ ++ + /* Read previous pid file. */ + if ((i = open (path_dhcpd_pid, O_RDONLY)) >= 0) { + status = read(i, pbuf, (sizeof pbuf) - 1); +@@ -1039,6 +1144,10 @@ + #else /* !DHCPv6 */ + " [-cf config-file] [-lf lease-file]\n" + #endif /* DHCPv6 */ ++#if defined (PARANOIA) ++ /* meld into the following string */ ++ "\n [-user user] [-group group] [-chroot dir]" ++#endif /* PARANOIA */ + #if defined (TRACING) + " [-tf trace-output-file]\n" + " [-play trace-input-file]\n" diff --git a/net-misc/dhcp/files/dhcp-4.0.1-dhclient-stdin-conf.patch b/net-misc/dhcp/files/dhcp-4.0.1-dhclient-stdin-conf.patch new file mode 100644 index 0000000..ddbe4a3 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-4.0.1-dhclient-stdin-conf.patch @@ -0,0 +1,114 @@ +diff -uNr dhcp-4.0.1.ORIG/client/clparse.c dhcp-4.0.1/client/clparse.c +--- dhcp-4.0.1.ORIG/client/clparse.c 2009-03-30 13:54:47.000000000 +0100 ++++ dhcp-4.0.1/client/clparse.c 2009-03-30 13:58:02.000000000 +0100 +@@ -174,6 +174,10 @@ + #endif + } + ++ /* Read any extra configuration from stdin */ ++ read_client_conf_stdin ((struct interface_info *)0, ++ &top_level_config); ++ + /* Set up state and config structures for clients that don't + have per-interface configuration statements. */ + config = (struct client_config *)0; +@@ -203,23 +207,13 @@ + return status; + } + +-int read_client_conf_file (const char *name, struct interface_info *ip, ++int read_client_conf_actual (struct parse *cfile, struct interface_info *ip, + struct client_config *client) + { +- int file; +- struct parse *cfile; + const char *val; + int token; + isc_result_t status; + +- if ((file = open (name, O_RDONLY)) < 0) +- return uerr2isc (errno); +- +- cfile = NULL; +- status = new_parse(&cfile, file, NULL, 0, path_dhclient_conf, 0); +- if (status != ISC_R_SUCCESS || cfile == NULL) +- return status; +- + do { + token = peek_token (&val, (unsigned *)0, cfile); + if (token == END_OF_FILE) +@@ -230,10 +224,74 @@ + status = (cfile -> warnings_occurred + ? ISC_R_BADPARSE + : ISC_R_SUCCESS); ++ return status; ++} ++ ++int read_client_conf_file (const char *name, struct interface_info *ip, ++ struct client_config *client) ++{ ++ int file; ++ struct parse *cfile; ++ isc_result_t status; ++ ++ if ((file = open (name, O_RDONLY)) < 0) ++ return uerr2isc (errno); ++ ++ cfile = (struct parse *)0; ++ new_parse (&cfile, file, (char *)0, 0, path_dhclient_conf, 0); ++ status = read_client_conf_actual(cfile, ip, client); + end_parse (&cfile); + return status; + } + ++int read_client_conf_stdin (struct interface_info *ip, ++ struct client_config *client) ++{ ++ int file; ++ char *buffer = NULL, *p; ++ unsigned buflen, len = 0; ++ struct parse *cfile; ++ size_t bytes; ++ isc_result_t status; ++ ++ file = fileno(stdin); ++ if (isatty (file)) ++ return ISC_R_NOTFOUND; ++ if (fcntl (file, F_SETFL, O_NONBLOCK) < 0) ++ log_fatal ("could not set stdin to non blocking!"); ++ ++ buflen = BUFSIZ; ++ buffer = malloc (BUFSIZ + 1); ++ p = buffer; ++ do { ++ bytes = read (file, p, BUFSIZ); ++ if (bytes == 0) ++ break; ++ if (bytes == -1) ++ log_fatal ("failed to read stdin!"); ++ if (bytes >= BUFSIZ) { ++ buflen += BUFSIZ; ++ len += BUFSIZ; ++ buffer = realloc (buffer, buflen + 1); ++ if (!buffer) ++ log_fatal ("not enough buffer to read stdin!"); ++ p = buffer + len; ++ } else { ++ len += bytes; ++ break; ++ } ++ } while(1); ++ buffer[len] = '\0'; ++ ++ cfile = (struct parse *)0; ++ status = new_parse (&cfile, -1, buffer, len, "stdin", 0); ++ if (status == ISC_R_SUCCESS) { ++ status = read_client_conf_actual (cfile, ip, client); ++ end_parse (&cfile); ++ } ++ free(buffer); ++ return status; ++} + + /* lease-file :== client-lease-statements END_OF_FILE + client-lease-statements :== diff --git a/net-misc/dhcp/files/dhcpd.conf b/net-misc/dhcp/files/dhcpd.conf new file mode 100644 index 0000000..1672633 --- /dev/null +++ b/net-misc/dhcp/files/dhcpd.conf @@ -0,0 +1,29 @@ +# /etc/conf.d/dhcpd: config file for /etc/init.d/dhcpd + +# If you require more than one instance of dhcpd you can create symbolic +# links to dhcpd service like so +# cd /etc/init.d +# ln -s dhcpd dhcpd.foo +# cd ../conf.d +# cp dhcpd dhcpd.foo +# Now you can edit dhcpd.foo and specify a different configuration file. +# You'll also need to specify a pidfile in that dhcpd.conf file. +# See the pid-file-name option in the dhcpd.conf man page for details. + +# If you wish to run dhcpd in a chroot, uncomment the following line +# DHCPD_CHROOT="/chroot/dhcp" + +# Then run emerge dhcp --config +# All file paths below are relative to the chroot. +# You can specify a different chroot directory but MAKE SURE it's empty. + +# Specify a configuration file - the default is /etc/dhcp/dhcpd.conf +# DHCPD_CONF="/etc/dhcp/dhcpd.conf" + +# Configure which interface or interfaces to for dhcpd to listen on. +# List all interfaces space separated. If this is not specified then +# we listen on all interfaces. +# DHCPD_IFACE="" + +# Insert any other dhcpd options - see the man page for a full list. +# DHCPD_OPTS="" diff --git a/net-misc/dhcp/files/dhcpd.init b/net-misc/dhcp/files/dhcpd.init new file mode 100644 index 0000000..6c980fe --- /dev/null +++ b/net-misc/dhcp/files/dhcpd.init @@ -0,0 +1,71 @@ +#!/sbin/runscript +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcpd.init,v 1.5 2007/04/02 12:34:01 uberlord Exp $ + +DHCPD_CONF=${DHCPD_CONF:-/etc/dhcp/dhcpd.conf} + +depend() { + need net + use logger dns +} + +get_var() { + sed -n 's/^[[:blank:]]\?'"$1"' "*\([^#";]\+\).*/\1/p' \ + "${DHCPD_CHROOT}/${DHCPD_CONF}" +} + +start() { + # Work out our cffile if it's on our DHCPD_OPTS + case " ${DHCPD_OPTS} " in + *" -cf "*) + DHCPD_CONF=" ${DHCPD_OPTS} " + DHCPD_CONF="${DHCPD_CONF##* -cf }" + DHCPD_CONF="${DHCPD_CONF%% *}" + ;; + *) DHCPD_OPTS="${DHCPD_OPTS} -cf ${DHCPD_CONF}" + ;; + esac + + if [ ! -f "${DHCPD_CHROOT}/${DHCPD_CONF}" ] ; then + eerror "${DHCPD_CHROOT}/${DHCPD_CONF} does not exist" + return 1 + fi + + local leasefile="$(get_var lease-file-name)" + leasefile="${DHCPD_CHROOT}/${leasefile:-/var/lib/dhcp/dhcpd.leases}" + if [ ! -f "${leasefile}" ] ; then + ebegin "Creating ${leasefile}" + touch "${leasefile}" + chown dhcp:dhcp "${leasefile}" + eend $? || return 1 + fi + + # Setup LD_PRELOAD so name resolution works in our chroot. + if [ -n "${DHCPD_CHROOT}" ] ; then + LD_PRELOAD="${LD_PRELOAD} /usr/lib/libresolv.so" + export LD_PRELOAD="${LD_PRELOAD} /usr/lib/libnss_dns.so" + fi + + local pidfile="$(get_var pid-file-name)" + pidfile="${pidfile:-/var/run/dhcp/dhcpd.pid}" + + ebegin "Starting ${DHCPD_CHROOT:+chrooted }${SVCNAME}" + start-stop-daemon --start --exec /usr/sbin/dhcpd \ + --pidfile "${DHCPD_CHROOT}/${pidfile}" \ + -- ${DHCPD_OPTS} -q -pf "${pidfile}" \ + -user dhcp -group dhcp \ + ${DHCPD_CHROOT:+-chroot} ${DHCPD_CHROOT} ${DHCPD_IFACE} + eend $? \ + && save_options chroot "${DHCPD_CHROOT}" \ + && save_options pidfile "${pidfile}" +} + +stop() { + local chroot="$(get_options chroot)" + + ebegin "Stopping ${chroot:+chrooted }${SVCNAME}" + start-stop-daemon --stop --exec /usr/sbin/dhcpd \ + --pidfile "${chroot}/$(get_options pidfile)" + eend $? +} diff --git a/net-misc/dhcp/files/dhcrelay.conf b/net-misc/dhcp/files/dhcrelay.conf new file mode 100644 index 0000000..1102d3a --- /dev/null +++ b/net-misc/dhcp/files/dhcrelay.conf @@ -0,0 +1,13 @@ +# /etc/conf.d/dhcrelay: config file for /etc/init.d/dhcrelay + +# Configure which interface or interfaces to for dhcrelay to listen on +# and send to. +# List all interfaces space separated. If this is not specified then +# we use all interfaces. +#IFACE="" + +# Insert any other options needed. See dhcrelay(8) for details. +#DHCRELAY_OPTS="" + +# Space separated list of IPs to forward BOOTP/DHCP packets to. +DHCRELAY_SERVERS="" diff --git a/net-misc/dhcp/files/dhcrelay.init b/net-misc/dhcp/files/dhcrelay.init new file mode 100644 index 0000000..2f92956 --- /dev/null +++ b/net-misc/dhcp/files/dhcrelay.init @@ -0,0 +1,32 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcrelay.init,v 1.2 2007/03/22 15:36:59 uberlord Exp $ + +depend() { + need net + use logger +} + +start() { + if [ -z "${DHCRELAY_SERVERS}" ]; then + eerror "No DHCRELAY_SERVERS specified in /etc/conf.d/dhcrelay" + return 1 + fi + + local IFACES= i= + for i in ${IFACE} ; do + IFACES="${IFACES} -i ${i}" + done + + ebegin "Starting dhcrelay" + start-stop-daemon --start --exec /usr/sbin/dhcrelay \ + -- -q ${IFACES} ${DHCRELAY_OPTS} ${DHCRELAY_SERVERS} + eend $? +} + +stop() { + ebegin "Stopping dhcrelay" + start-stop-daemon --stop --pidfile /var/run/dhcrelay.pid + eend $? +} diff --git a/net-misc/dhcp/metadata.xml b/net-misc/dhcp/metadata.xml new file mode 100644 index 0000000..a0ffd5a --- /dev/null +++ b/net-misc/dhcp/metadata.xml @@ -0,0 +1,7 @@ + + + + base-system + The ISC DHCP client/server package. + ISC DHCP クライアント/サーバ・パッケージです。 +