diff options
author | Max Kalika <max@gentoo.org> | 2004-12-20 18:54:23 +0000 |
---|---|---|
committer | Max Kalika <max@gentoo.org> | 2004-12-20 18:54:23 +0000 |
commit | de9be6ff4a6c7caf780ff85ac208fe88e72a3cad (patch) | |
tree | 8398b95ffb68a922b13efbed19ee1e6bb60c019f /net-misc | |
parent | Version bump. Removed old ebuilds. (diff) | |
download | historical-de9be6ff4a6c7caf780ff85ac208fe88e72a3cad.tar.gz historical-de9be6ff4a6c7caf780ff85ac208fe88e72a3cad.tar.bz2 historical-de9be6ff4a6c7caf780ff85ac208fe88e72a3cad.zip |
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.
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/dhcp/ChangeLog | 11 | ||||
-rw-r--r-- | net-misc/dhcp/Manifest | 19 | ||||
-rw-r--r-- | net-misc/dhcp/dhcp-3.0.1-r1.ebuild | 133 | ||||
-rw-r--r-- | net-misc/dhcp/files/conf.dhcpd | 10 | ||||
-rw-r--r-- | net-misc/dhcp/files/dhcp.conf | 5 | ||||
-rw-r--r-- | net-misc/dhcp/files/dhcp.rc6 | 4 | ||||
-rw-r--r-- | net-misc/dhcp/files/digest-dhcp-3.0.1-r1 | 1 |
7 files changed, 160 insertions, 23 deletions
diff --git a/net-misc/dhcp/ChangeLog b/net-misc/dhcp/ChangeLog index e7f053d30cea..be7f61d42f48 100644 --- a/net-misc/dhcp/ChangeLog +++ b/net-misc/dhcp/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for net-misc/dhcp # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.46 2004/11/10 07:24:38 lv Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.47 2004/12/20 18:54:23 max Exp $ + +*dhcp-3.0.1-r1 (20 Dec 2004) + + 20 Dec 2004; <max@gentoo.org> -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 <lv@gentoo.org> +files/dhcp-3.0.1-fix-invalid-attribute.patch, dhcp-3.0.1.ebuild: diff --git a/net-misc/dhcp/Manifest b/net-misc/dhcp/Manifest index bc8fdb69f4a1..45d558f633b9 100644 --- a/net-misc/dhcp/Manifest +++ b/net-misc/dhcp/Manifest @@ -1,12 +1,13 @@ -MD5 37dfb44d785e2277fd5a8859a311c424 ChangeLog 7597 -MD5 9384ae7ba3e9f56b8027ea92f607042d metadata.xml 215 MD5 7d50e4a39640d74b9a0bedf1c5b57705 dhcp-3.0.1.ebuild 3986 -MD5 a4fc0a5a40c8ec22f3301945fc744516 files/conf.dhcpd 381 -MD5 66becf9870e0293bbd35d1fba770751a files/dhcp-3.0+paranoia.patch 5366 -MD5 d909d81a4d4ea39ddfc9898d33488c73 files/dhcp-3.0pl2-fix-perms.patch 485 -MD5 0203f009ee3427c47c6962c1352e3de4 files/dhcp.conf 634 -MD5 6fac614e84b5c2856503f0a62d10c1fa files/dhcp.rc6 1100 -MD5 1a902e3332707119032d7bc229b91001 files/dhcrelay.conf 505 +MD5 5c70d7e7d70c93d7216fa62875c7339c dhcp-3.0.1-r1.ebuild 4024 +MD5 b0c9c321be7d49bd5b7164ccc09c6b6a ChangeLog 7983 +MD5 9384ae7ba3e9f56b8027ea92f607042d metadata.xml 215 +MD5 5cde0a8fdf363490c4212726dfd06a38 files/dhcp.conf 769 +MD5 ca45269300d74a3a8750e0e64e8d92ea files/dhcp-3.0.1-fix-invalid-attribute.patch 583 +MD5 7f1859e6517a23f87c8e83c68a15a537 files/digest-dhcp-3.0.1-r1 62 MD5 c2433edf6a800843b0d55c9086de1252 files/dhcrelay.rc6 564 +MD5 66becf9870e0293bbd35d1fba770751a files/dhcp-3.0+paranoia.patch 5366 MD5 7f1859e6517a23f87c8e83c68a15a537 files/digest-dhcp-3.0.1 62 -MD5 ca45269300d74a3a8750e0e64e8d92ea files/dhcp-3.0.1-fix-invalid-attribute.patch 583 +MD5 1a902e3332707119032d7bc229b91001 files/dhcrelay.conf 505 +MD5 81b9256728a5daab31f0513ab55e8354 files/dhcp.rc6 1092 +MD5 d909d81a4d4ea39ddfc9898d33488c73 files/dhcp-3.0pl2-fix-perms.patch 485 diff --git a/net-misc/dhcp/dhcp-3.0.1-r1.ebuild b/net-misc/dhcp/dhcp-3.0.1-r1.ebuild new file mode 100644 index 000000000000..31a4ad018d0f --- /dev/null +++ b/net-misc/dhcp/dhcp-3.0.1-r1.ebuild @@ -0,0 +1,133 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.0.1-r1.ebuild,v 1.1 2004/12/20 18:54:23 max Exp $ + +inherit eutils flag-o-matic 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}" + + epatch "${FILESDIR}/dhcp-3.0+paranoia.patch" + epatch "${FILESDIR}/dhcp-3.0pl2-fix-perms.patch" + epatch "${FILESDIR}/dhcp-3.0.1-fix-invalid-attribute.patch" + has noman ${FEATURES} && sed -i 's:nroff:echo:' */Makefile.dist +} + +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/lib + 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 + dosed "s:/etc/dhclient-script:/etc/dhcp/dhclient-script:" \ + /etc/dhcp/dhclient.conf.sample + mv "${D}/sbin/dhclient-script" "${D}/etc/dhcp/dhclient-script.sample" + + dodoc ANONCVS CHANGES README RELNOTES doc/* + newdoc client/dhclient.conf dhclient.conf.sample + newdoc client/scripts/linux dhclient-script.sample + newdoc server/dhcpd.conf dhcpd.conf.sample + + exeinto /etc/init.d + newexe "${FILESDIR}/dhcp.rc6" dhcp + newexe "${FILESDIR}/dhcrelay.rc6" 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 /bin/false /var/lib/dhcp dhcp +} + +pkg_postinst() { + chown dhcp:dhcp "${ROOT}/var/lib/dhcp" "${ROOT}/var/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 like to run dhcpd in chroot AND this is a new install OR" + einfo "your dhcpd doesn't already run in chroot, simply run:" + einfo " ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config" + einfo "Before running the above command you might want to change the chroot" + einfo "dir in /etc/conf.d/dhcp, otherwise /chroot/dhcp will be used." + echo +} + +pkg_config() { + CHROOT=`sed -n 's/^[[:blank:]]\?CHROOT="\([^"]\+\)"/\1/p' /etc/conf.d/dhcp 2>/dev/null` + + if [ ! -d "${CHROOT:=/chroot/dhcp}" ] ; then + ebegin "Setting up the chroot directory" + mkdir -m 0755 -p "${CHROOT}/"{dev,etc,var/lib,var/run/dhcp} + cp -R /etc/{localtime,dhcp} "${CHROOT}/etc/" + cp -R /var/lib/dhcp "${CHROOT}/var/lib" + chown -R dhcp:dhcp "${CHROOT}/var/lib" "${CHROOT}/var/run/dhcp" + eend + + if [ "`grep '^#[[:blank:]]\?CHROOT' /etc/conf.d/dhcp`" ] ; then + sed -e '/^#[[:blank:]]\?CHROOT/s/^#[[:blank:]]\?//' \ + -i /etc/conf.d/dhcp + fi + + einfo "To enable logging from the DHCP server, configure your" + einfo "logger (`best_version virtual/logger`) to listen on ${CHROOT}/dev/log" + else + eerror + eerror "${CHROOT} already exists. Quitting." + eerror + fi +} diff --git a/net-misc/dhcp/files/conf.dhcpd b/net-misc/dhcp/files/conf.dhcpd deleted file mode 100644 index 21558397fa3b..000000000000 --- a/net-misc/dhcp/files/conf.dhcpd +++ /dev/null @@ -1,10 +0,0 @@ -# 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/conf.dhcpd,v 1.6 2004/07/14 23:56:54 agriffis Exp $ - -#configure which interface or interfaces to for dhcp to listen on -#list all interfaces space separated. -IFACE="eth0" - -# Insert any other options needed -DHCPD_OPTS="" diff --git a/net-misc/dhcp/files/dhcp.conf b/net-misc/dhcp/files/dhcp.conf index ecc2db926b7a..7fce9043df79 100644 --- a/net-misc/dhcp/files/dhcp.conf +++ b/net-misc/dhcp/files/dhcp.conf @@ -1,6 +1,6 @@ # 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.conf,v 1.6 2004/08/28 02:55:40 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcp.conf,v 1.7 2004/12/20 18:54:23 max Exp $ # Configure which interface or interfaces to for dhcp to listen on # list all interfaces space separated. @@ -14,3 +14,6 @@ DHCPD_OPTS="-q" # and un-comment the following line. # You can specify a different chroot directory but MAKE SURE it's empty. #CHROOT="/chroot/dhcp" + +# If you need name resolution under a chroot, uncomment the following: +#export LD_PRELOAD="/usr/lib/libresolv.so /usr/lib/libnss_dns.so" diff --git a/net-misc/dhcp/files/dhcp.rc6 b/net-misc/dhcp/files/dhcp.rc6 index 9dfa89c95145..04bbbfab3ad8 100644 --- a/net-misc/dhcp/files/dhcp.rc6 +++ b/net-misc/dhcp/files/dhcp.rc6 @@ -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.rc6,v 1.12 2004/07/14 23:56:54 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcp.rc6,v 1.13 2004/12/20 18:54:23 max Exp $ depend() { need net @@ -30,7 +30,7 @@ start() { ebegin "Starting ${CHROOT:+chrooted }dhcpd" start-stop-daemon --start --quiet --exec /usr/sbin/dhcpd \ - -- -pf /var/run/dhcp/dhcpd.pid -q \ + -- -pf /var/run/dhcp/dhcpd.pid \ -user dhcp -group dhcp ${DHCPD_OPTS} \ ${CHROOT:+-chroot ${CHROOT}} ${IFACE} eend $? diff --git a/net-misc/dhcp/files/digest-dhcp-3.0.1-r1 b/net-misc/dhcp/files/digest-dhcp-3.0.1-r1 new file mode 100644 index 000000000000..161149e2312c --- /dev/null +++ b/net-misc/dhcp/files/digest-dhcp-3.0.1-r1 @@ -0,0 +1 @@ +MD5 44f72d16a12acc3fbe09703157aa42d2 dhcp-3.0.1.tar.gz 848296 |