diff options
author | Roy Marples <uberlord@gentoo.org> | 2005-12-09 14:13:30 +0000 |
---|---|---|
committer | Roy Marples <uberlord@gentoo.org> | 2005-12-09 14:13:30 +0000 |
commit | d4a48853775462e25ee6b0e247a07a5d63a716b4 (patch) | |
tree | 44c43b1e80a709776c26ff8882b394332582a588 /net-misc | |
parent | mask net-misc/dhcp-3.0.4_beta* for testing (diff) | |
download | historical-d4a48853775462e25ee6b0e247a07a5d63a716b4.tar.gz historical-d4a48853775462e25ee6b0e247a07a5d63a716b4.tar.bz2 historical-d4a48853775462e25ee6b0e247a07a5d63a716b4.zip |
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.
Package-Manager: portage-2.0.53
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/dhcp/ChangeLog | 15 | ||||
-rw-r--r-- | net-misc/dhcp/Manifest | 5 | ||||
-rw-r--r-- | net-misc/dhcp/dhcp-3.0.4_beta2.ebuild | 172 | ||||
-rw-r--r-- | net-misc/dhcp/files/dhcp-3.0.3-no_isc_blurb.patch | 105 | ||||
-rw-r--r-- | net-misc/dhcp/files/digest-dhcp-3.0.4_beta2 | 1 |
5 files changed, 296 insertions, 2 deletions
diff --git a/net-misc/dhcp/ChangeLog b/net-misc/dhcp/ChangeLog index 9bac279bd45f..948a26fc45f5 100644 --- a/net-misc/dhcp/ChangeLog +++ b/net-misc/dhcp/ChangeLog @@ -1,6 +1,19 @@ # ChangeLog for net-misc/dhcp # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.64 2005/12/09 13:58:09 uberlord Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.65 2005/12/09 14:13:30 uberlord Exp $ + +*dhcp-3.0.4_beta2 (09 Dec 2005) + + 09 Dec 2005; Roy Marples <uberlord@gentoo.org> + +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 <uberlord@gentoo.org> dhcp-3.0.3-r1.ebuild: multilib fixed. diff --git a/net-misc/dhcp/Manifest b/net-misc/dhcp/Manifest index 3b9962f0585b..c7919e32cc9b 100644 --- a/net-misc/dhcp/Manifest +++ b/net-misc/dhcp/Manifest @@ -1,11 +1,13 @@ -MD5 31fe2b827f0f5437f7cc004b680d8301 ChangeLog 10866 +MD5 e9b0fa0cc4f4747c09d36eb7ae2924e0 ChangeLog 11506 MD5 d0fccd0835d770dcc875b77a3e8bd92f dhcp-3.0.1-r1.ebuild 3989 MD5 490407e7b71b179f7690c72a328ea02d dhcp-3.0.3-r1.ebuild 3958 +MD5 fb5cd6b546990b644d1c20e6746af829 dhcp-3.0.4_beta2.ebuild 4990 MD5 2421c68dfdeec65048f1a97cbee1f4ca files/dhclient-ntp.patch 168 MD5 d909d81a4d4ea39ddfc9898d33488c73 files/dhcp-3.0-fix-perms.patch 485 MD5 66becf9870e0293bbd35d1fba770751a files/dhcp-3.0-paranoia.patch 5366 MD5 d0f61288e81ce020573f3f6965af8489 files/dhcp-3.0.2-gmake.patch 1872 MD5 2bfa28477aff891d25c06a00677d261c files/dhcp-3.0.3-libdst.patch 322 +MD5 85a5d65a92d74e828c539b6642962463 files/dhcp-3.0.3-no_isc_blurb.patch 3002 MD5 ce6d18eef914ac8a39b0cb1bc4d63de2 files/dhcp-3.0.3-tr.patch 377 MD5 2a2635a76ada362d73f6c004a31199d0 files/dhcp.conf 952 MD5 f775722495bb9a24d6558956b654ab44 files/dhcp.init 1410 @@ -15,4 +17,5 @@ MD5 6e2bc3e08290c60d4f339ab9182fce07 files/dhcrelay.init 748 MD5 8a19dd005c33231e02c03659f0c658df files/dhcrelay.rc6 626 MD5 323228061719fcac86be97a1a25d23b6 files/digest-dhcp-3.0.1-r1 128 MD5 c6df78cb1777bebada64f9c629b9f8eb files/digest-dhcp-3.0.3-r1 62 +MD5 be9ba2d7afab9b446197c45fe60d02bc files/digest-dhcp-3.0.4_beta2 64 MD5 436163172942ee1a0bcfb47534a71cce metadata.xml 330 diff --git a/net-misc/dhcp/dhcp-3.0.4_beta2.ebuild b/net-misc/dhcp/dhcp-3.0.4_beta2.ebuild new file mode 100644 index 000000000000..6cfba6d916f4 --- /dev/null +++ b/net-misc/dhcp/dhcp-3.0.4_beta2.ebuild @@ -0,0 +1,172 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.0.4_beta2.ebuild,v 1.1 2005/12/09 14:13:30 uberlord Exp $ + +inherit eutils flag-o-matic multilib toolchain-funcs + +DESCRIPTION="ISC Dynamic Host Configuration Protocol" +HOMEPAGE="http://www.isc.org/products/DHCP" + +MY_PV="${PV//_beta/b}" +MY_P="${PN}-${MY_PV}" +SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}" + +LICENSE="isc-dhcp" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="static selinux" + +RDEPEND="virtual/libc + selinux? ( sec-policy/selinux-dhcp )" +DEPEND="${RDEPEND} + >=sys-apps/sed-4" + +PROVIDE="virtual/dhcpc" + +src_unpack() { + unpack "${A}" + cd "${S}" + + # Enable chroot + epatch "${FILESDIR}/${PN}-3.0-paranoia.patch" + # Fix some permission issues + epatch "${FILESDIR}/${PN}-3.0-fix-perms.patch" + # Install libdst, #75544 + epatch "${FILESDIR}/${PN}-3.0.3-libdst.patch" + # Fix building on Gentoo/FreeBSD + epatch "${FILESDIR}/${PN}-3.0.2-gmake.patch" + + # Enable dhclient to equery NTP servers, fixed #63868 + epatch "${FILESDIR}/dhclient-ntp.patch" + # Quiet the isc blurb + epatch "${FILESDIR}/dhcp-3.0.3-no_isc_blurb.patch" + + # Brand the version with Gentoo + # include revision if >0 + local newver="${MY_PV}-Gentoo" + [[ ${PR} != "r0" ]] && newver="${newver}-${PR}" + sed -i -e '/^#define DHCP_VERSION[ \t]\+/ s/'"${MY_PV}/${newver}/g" \ + includes/version.h + + # Tart up the scripts for Gentoo baselayout + local comment="# This script is not called by Gentoo net scripts\n" + comment="${comment}# and is inluded purely for reference.\n" + comment="${comment}# We do however call /etc/dhcp/dhclient-exit-hooks\n" + sed -i -e '1 a '"${comment}" \ + -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \ + client/scripts/* + + # 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() { + # 01/Mar/2003: Fix for bug #11960 by Jason Wever <weeve@gentoo.org> + [[ ${ARCH} == "sparc" ]] && filter-flags -O3 -O2 -O + + 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_DB "/var/lib/dhcp/dhclient.leases" + #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 + FFMANDIR = /usr/share/man/man5 + LIBMANDIR = /usr/share/man/man3 + USRMANDIR = /usr/share/man/man1 + END + + ./configure --copts "-DPARANOIA -DEARLY_CHROOT ${CFLAGS}" \ + || die "configure failed" + + emake || die "compile problem" +} + +src_install() { + make install DESTDIR="${D}" || die + + insinto /etc/dhcp + newins server/dhcpd.conf dhcpd.conf.sample + newins client/dhclient.conf dhclient.conf.sample + + dodoc README RELNOTES doc/* + newdoc client/dhclient.conf dhclient.conf.sample + newdoc client/scripts/linux dhclient-script.sample + newdoc server/dhcpd.conf dhcpd.conf.sample + + newinitd "${FILESDIR}/dhcp.init" dhcp + newinitd "${FILESDIR}/dhcrelay.init" dhcrelay + insinto /etc/conf.d + newins "${FILESDIR}/dhcp.conf" dhcp + newins "${FILESDIR}/dhcrelay.conf" dhcrelay + + keepdir /var/{lib,run}/dhcp +} + +pkg_preinst() { + enewgroup dhcp + enewuser dhcp -1 -1 /var/lib/dhcp dhcp +} + +pkg_postinst() { + chown dhcp:dhcp "${ROOT}"/var/{lib,run}/dhcp + + einfo "You can edit /etc/conf.d/dhcp to customize dhcp settings." + einfo + einfo "The DHCP ebuild now includes chroot support." + einfo "If you would like to run dhcpd in a chroot, simply configure the" + einfo "CHROOT directory in /etc/conf.d/dhcp and then run:" + einfo " ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config" +} + +pkg_config() { + CHROOT="$( + sed -n 's/^[[:blank:]]\?CHROOT="*\([^#"]\+\)"*/\1/p' \ + /etc/conf.d/dhcp + )" + + if [[ -z ${CHROOT} ]]; then + eerror "CHROOT not defined in /etc/conf.d/dhcp" + return 1 + fi + + 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" + chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp + eend + + local logger="$(best_version virtual/logger)" + einfo "To enable logging from the DHCP server, configure your" + einfo "logger (${logger}) to listen on ${CHROOT}/dev/log" +} 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 000000000000..38f7713f5c62 --- /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 <uberlord@gentoo.org> + +--- 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/digest-dhcp-3.0.4_beta2 b/net-misc/dhcp/files/digest-dhcp-3.0.4_beta2 new file mode 100644 index 000000000000..97c765371042 --- /dev/null +++ b/net-misc/dhcp/files/digest-dhcp-3.0.4_beta2 @@ -0,0 +1 @@ +MD5 b82565e091832a4d16fb713c4ab48412 dhcp-3.0.4b2.tar.gz 879844 |