From 02fc093f0b8cd119877660d663bd57c9d150a22f Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 14 Dec 2005 20:30:19 +0000 Subject: Fixed correct owner of lease file, #115554 thanks to Jan Spitalnik. (Portage version: 2.0.53) --- net-misc/dhcp/ChangeLog | 10 +- net-misc/dhcp/Manifest | 10 +- net-misc/dhcp/dhcp-3.0.3-r1.ebuild | 144 --------------------- net-misc/dhcp/dhcp-3.0.3-r2.ebuild | 144 +++++++++++++++++++++ net-misc/dhcp/dhcp-3.0.4_beta2-r1.ebuild | 172 +++++++++++++++++++++++++ net-misc/dhcp/dhcp-3.0.4_beta2.ebuild | 172 ------------------------- net-misc/dhcp/files/dhcp.init | 4 +- net-misc/dhcp/files/digest-dhcp-3.0.3-r1 | 1 - net-misc/dhcp/files/digest-dhcp-3.0.3-r2 | 1 + net-misc/dhcp/files/digest-dhcp-3.0.4_beta2 | 1 - net-misc/dhcp/files/digest-dhcp-3.0.4_beta2-r1 | 1 + 11 files changed, 334 insertions(+), 326 deletions(-) delete mode 100644 net-misc/dhcp/dhcp-3.0.3-r1.ebuild create mode 100644 net-misc/dhcp/dhcp-3.0.3-r2.ebuild create mode 100644 net-misc/dhcp/dhcp-3.0.4_beta2-r1.ebuild delete mode 100644 net-misc/dhcp/dhcp-3.0.4_beta2.ebuild delete mode 100644 net-misc/dhcp/files/digest-dhcp-3.0.3-r1 create mode 100644 net-misc/dhcp/files/digest-dhcp-3.0.3-r2 delete mode 100644 net-misc/dhcp/files/digest-dhcp-3.0.4_beta2 create mode 100644 net-misc/dhcp/files/digest-dhcp-3.0.4_beta2-r1 (limited to 'net-misc') diff --git a/net-misc/dhcp/ChangeLog b/net-misc/dhcp/ChangeLog index 948a26fc45f5..89343faea938 100644 --- a/net-misc/dhcp/ChangeLog +++ b/net-misc/dhcp/ChangeLog @@ -1,6 +1,14 @@ # 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.65 2005/12/09 14:13:30 uberlord Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.66 2005/12/14 20:30:19 uberlord Exp $ + +*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) diff --git a/net-misc/dhcp/Manifest b/net-misc/dhcp/Manifest index c7919e32cc9b..ea7b0ba98189 100644 --- a/net-misc/dhcp/Manifest +++ b/net-misc/dhcp/Manifest @@ -1,7 +1,7 @@ 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 490407e7b71b179f7690c72a328ea02d dhcp-3.0.3-r2.ebuild 3958 +MD5 fb5cd6b546990b644d1c20e6746af829 dhcp-3.0.4_beta2-r1.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 @@ -10,12 +10,12 @@ 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 +MD5 303ac853d6a54778bb88c27422486549 files/dhcp.init 1411 MD5 81b9256728a5daab31f0513ab55e8354 files/dhcp.rc6 1092 MD5 02ea0c813e6dae9194379a195fa56e0c files/dhcrelay.conf 564 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 c6df78cb1777bebada64f9c629b9f8eb files/digest-dhcp-3.0.3-r2 62 +MD5 be9ba2d7afab9b446197c45fe60d02bc files/digest-dhcp-3.0.4_beta2-r1 64 MD5 436163172942ee1a0bcfb47534a71cce metadata.xml 330 diff --git a/net-misc/dhcp/dhcp-3.0.3-r1.ebuild b/net-misc/dhcp/dhcp-3.0.3-r1.ebuild deleted file mode 100644 index 33f005d20a26..000000000000 --- a/net-misc/dhcp/dhcp-3.0.3-r1.ebuild +++ /dev/null @@ -1,144 +0,0 @@ -# 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.3-r1.ebuild,v 1.3 2005/12/09 13:58:09 uberlord Exp $ - -inherit eutils flag-o-matic multilib toolchain-funcs - -DESCRIPTION="ISC Dynamic Host Configuration Protocol" -HOMEPAGE="http://www.isc.org/products/DHCP" -SRC_URI="ftp://ftp.isc.org/isc/dhcp/${P}.tar.gz" - -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" - # Fix token ring compiling, #102473 - epatch "${FILESDIR}/${P}-tr.patch" - # Install libdst, #75544 - epatch "${FILESDIR}/${P}-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" - - # FreeBSD doesn't like -Werror that is forced on - sed -i -e 's:-Werror::' Makefile.conf -} - -src_compile() { - # 01/Mar/2003: Fix for bug #11960 by Jason Wever - [[ ${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" - echo -} - -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/dhcp-3.0.3-r2.ebuild b/net-misc/dhcp/dhcp-3.0.3-r2.ebuild new file mode 100644 index 000000000000..82e178512301 --- /dev/null +++ b/net-misc/dhcp/dhcp-3.0.3-r2.ebuild @@ -0,0 +1,144 @@ +# 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.3-r2.ebuild,v 1.1 2005/12/14 20:30:19 uberlord Exp $ + +inherit eutils flag-o-matic multilib toolchain-funcs + +DESCRIPTION="ISC Dynamic Host Configuration Protocol" +HOMEPAGE="http://www.isc.org/products/DHCP" +SRC_URI="ftp://ftp.isc.org/isc/dhcp/${P}.tar.gz" + +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" + # Fix token ring compiling, #102473 + epatch "${FILESDIR}/${P}-tr.patch" + # Install libdst, #75544 + epatch "${FILESDIR}/${P}-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" + + # FreeBSD doesn't like -Werror that is forced on + sed -i -e 's:-Werror::' Makefile.conf +} + +src_compile() { + # 01/Mar/2003: Fix for bug #11960 by Jason Wever + [[ ${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" + echo +} + +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/dhcp-3.0.4_beta2-r1.ebuild b/net-misc/dhcp/dhcp-3.0.4_beta2-r1.ebuild new file mode 100644 index 000000000000..8c9a03edbb76 --- /dev/null +++ b/net-misc/dhcp/dhcp-3.0.4_beta2-r1.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-r1.ebuild,v 1.1 2005/12/14 20:30:19 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 + [[ ${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/dhcp-3.0.4_beta2.ebuild b/net-misc/dhcp/dhcp-3.0.4_beta2.ebuild deleted file mode 100644 index 6cfba6d916f4..000000000000 --- a/net-misc/dhcp/dhcp-3.0.4_beta2.ebuild +++ /dev/null @@ -1,172 +0,0 @@ -# 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 - [[ ${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.init b/net-misc/dhcp/files/dhcp.init index fb3a705d7daf..0bae98099e47 100644 --- a/net-misc/dhcp/files/dhcp.init +++ b/net-misc/dhcp/files/dhcp.init @@ -1,7 +1,7 @@ #!/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/dhcp.init,v 1.2 2005/12/07 14:51:08 uberlord Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcp.init,v 1.3 2005/12/14 20:30:19 uberlord Exp $ depend() { need net @@ -24,7 +24,7 @@ start() { if [[ ! -f ${leasefile} ]] ; then ebegin "Creating ${leasefile}" touch "${leasefile}" - chown dcp:dhcp "${leasefile}" + chown dhcp:dhcp "${leasefile}" eend $? || return 1 fi diff --git a/net-misc/dhcp/files/digest-dhcp-3.0.3-r1 b/net-misc/dhcp/files/digest-dhcp-3.0.3-r1 deleted file mode 100644 index b5c6d4ce1238..000000000000 --- a/net-misc/dhcp/files/digest-dhcp-3.0.3-r1 +++ /dev/null @@ -1 +0,0 @@ -MD5 f91416a0b8ed3fd0601688cf0b7df58f dhcp-3.0.3.tar.gz 870240 diff --git a/net-misc/dhcp/files/digest-dhcp-3.0.3-r2 b/net-misc/dhcp/files/digest-dhcp-3.0.3-r2 new file mode 100644 index 000000000000..b5c6d4ce1238 --- /dev/null +++ b/net-misc/dhcp/files/digest-dhcp-3.0.3-r2 @@ -0,0 +1 @@ +MD5 f91416a0b8ed3fd0601688cf0b7df58f dhcp-3.0.3.tar.gz 870240 diff --git a/net-misc/dhcp/files/digest-dhcp-3.0.4_beta2 b/net-misc/dhcp/files/digest-dhcp-3.0.4_beta2 deleted file mode 100644 index 97c765371042..000000000000 --- a/net-misc/dhcp/files/digest-dhcp-3.0.4_beta2 +++ /dev/null @@ -1 +0,0 @@ -MD5 b82565e091832a4d16fb713c4ab48412 dhcp-3.0.4b2.tar.gz 879844 diff --git a/net-misc/dhcp/files/digest-dhcp-3.0.4_beta2-r1 b/net-misc/dhcp/files/digest-dhcp-3.0.4_beta2-r1 new file mode 100644 index 000000000000..97c765371042 --- /dev/null +++ b/net-misc/dhcp/files/digest-dhcp-3.0.4_beta2-r1 @@ -0,0 +1 @@ +MD5 b82565e091832a4d16fb713c4ab48412 dhcp-3.0.4b2.tar.gz 879844 -- cgit v1.2.3-65-gdbad