From eaab68ba6a05bc57d98ca12032440835ef905326 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 3 Feb 2018 08:30:30 +0000 Subject: gentoo resync : 03.02.2018 --- net-misc/dhcp/Manifest | 5 +- net-misc/dhcp/dhcp-4.3.6.ebuild | 262 -------------------- net-misc/dhcp/dhcp-4.4.0.ebuild | 264 +++++++++++++++++++++ .../dhcp/files/dhcp-4.4.0-always-accept-4.patch | 29 +++ net-misc/dhcp/files/dhcp-4.4.0-bind-disable.patch | 22 ++ 5 files changed, 319 insertions(+), 263 deletions(-) delete mode 100644 net-misc/dhcp/dhcp-4.3.6.ebuild create mode 100644 net-misc/dhcp/dhcp-4.4.0.ebuild create mode 100644 net-misc/dhcp/files/dhcp-4.4.0-always-accept-4.patch create mode 100644 net-misc/dhcp/files/dhcp-4.4.0-bind-disable.patch (limited to 'net-misc/dhcp') diff --git a/net-misc/dhcp/Manifest b/net-misc/dhcp/Manifest index bdcc8a4faed8..abb48c7e23ba 100644 --- a/net-misc/dhcp/Manifest +++ b/net-misc/dhcp/Manifest @@ -18,6 +18,8 @@ AUX dhcp-4.3.6-iproute2-path.patch 451 BLAKE2B dcb948428326f7ca198061b1956f25981 AUX dhcp-4.3.6-lmdb-removal.patch 569 BLAKE2B dfc88697db8ce607a6b9934276b2df43f8eb3058eb14f349a95e18918d9256ea01930d492089e014744d10663166739b3f4ec9234e4b3b3ede80b7923be01fb4 SHA512 802be48012a627fb83114fee9cd0d2ec7f161955f19aa9ec0d51279208c4e8dd99f2a24d5132631cc5f45c17732971f7abd3f6d292b6c4e865645a3469a5c08a AUX dhcp-4.3.6-nogateway.patch 1904 BLAKE2B 9cb4c4a491e590958ed0654f0b1d7006e310ff5e40b3872bdcb17de45f7fb023d3d08b2433b25a362f13da89c0b818d88bb5f2d9737b3a00528c581a297f65f5 SHA512 571320f652ba5b24813ce9707f333f1d44d09c046c6371c86d011bd9d1c3c1288918851df336a881a62c6c095b6ac3bd9699f022e6f30dbb2542157b10ec20f7 AUX dhcp-4.3.6-quieter-ping.patch 2622 BLAKE2B fc9c49f60419d39f81d097c70ee61db879578225c4d6c90eb9828852bd1c3fb5daf8de5651b0d75a020767bb7e8b7917355d7e68cc7f8fc3052e010e96115be1 SHA512 4338ca0fd733676ed6ecc790cd5305b9eca468a9be206f0a1d195d024974aabdb7def81d2181261d3b6033fd4e9b5461c07adfb3b16d1df1dc2e5f819c90ba47 +AUX dhcp-4.4.0-always-accept-4.patch 889 BLAKE2B ce7ddd45c924f31c37294eb091476ec1aae4a658beadfd1481e2b0a2044f2d1a5be6798eac3c8f677c223eadf9be043ff3e38bfaec14305a0ad823ec3b2930b8 SHA512 2801de50402443196c412d2c578c74cc040869b7dd59f6e7ae9e66e69edb1fd567de7acbc2b2612b46b5cddca08f984401fefc4f81c26ea630b193f0e0f1884e +AUX dhcp-4.4.0-bind-disable.patch 774 BLAKE2B 32f09258aeaa3aa299de1f53008cfb4d4e6d994ee2034904bd7ab80d85189a2179e05acdcf43746349b9906df67c1a967c6371f49a07f1f01c892706c0db5160 SHA512 dee1b6dd62528c8c761fea4a61ddf0057a2f594746bf698b2cc31c5de211614c5b8cb5bab69190f0bdad4d1ec781946e91889fb5fa85ca7370d4357cb9d92dd5 AUX dhcpd.conf2 1068 BLAKE2B abbe4f73517fba252398da00b9aa801d0ea411ac639b219cad4a64700b74cc14322af131e0053af948f1f1b35c5a3556af75092ea5565e01d7c0d1a602ea7c40 SHA512 7b7a77b7826b475a4113ebeee54501ce417cc56e85754301a82a185d88b4713d198f615a366e63e0e2b0aef988c8137dcd1e18c4036d993378257079da17693d AUX dhcpd.init5 2882 BLAKE2B 9ce56c4aef62641508b8f4d366672725dd277c18846f9a001de8d244ca03720aba2c52ca7bd34ac63b08db082489d915c23bd1c685c37699034373bde1a7c37f SHA512 0cf238f3e79ee5d1ba059331664fd092d025ecb8fdb3f1d428713d7cd81ad4efe10ad7ad4ef48146aa6c9763293c1641057a257480e58a639fc6cc20e623f4c1 AUX dhcpd.tmpfiles 75 BLAKE2B 8e4ddbccb162c620df175dbb39621659f9905c54ba2dc46d3863438e030dee3a04bb4b528bb7ee91a1cb47564081e48ac6937a6aee4ea026adcdb1887e643152 SHA512 0c34ab0ef8618e6792ba8bda797877ce2e6c4fa433b4944dbc03cc4fc69efe26ce4b5e4dec661fbb2b7ae4173d908de02f4e86f8539364789a23f36cfd8edacb @@ -33,8 +35,9 @@ AUX dhcrelay6.service.conf 220 BLAKE2B 936c3f0b4e6cfb4e8160dbf01c12d8ceafe62d6c9 DIST dhcp-4.3.4.tar.gz 9302513 BLAKE2B eb7fb7d7d46d5a706b4f22b4add98619709f7ac1ecf8244564f043fd56adb6e2f54a0e01b573abcd7e054a82f74279c8134802380ee2d02c1cab1118d48a4965 SHA512 411c3f0e1effedb2a95f00539d13164530a56b50830008eb78906b3c8bf4070c331cf54a431770aed5d1b6ba214840446964210060674f746781cc97842ad706 DIST dhcp-4.3.5.tar.gz 10075147 BLAKE2B ffce896cfafe17a412030d0a1cb4a92323be175ecbb35061fe0538ed13a9f91d604daed89b5f282c92ef161944e9f18557545d95c9fbbd29e1f6a31485ef3b11 SHA512 aba0e1d361eb9e7ed33fc48c0b0b9288057af9ec51775e40e27feb9ababc182506706fcf39079236ce36b0f7ded391e107474dc29de2e60ed45d37753505e1f0 DIST dhcp-4.3.6.tar.gz 10182593 BLAKE2B 2b6324c63446a5cbded9a7cdd4455b6c880aabd282dfd19d44fe2fafe684a991b4afa87ec04ee3fc131437c8efdddbe2777d70586c2e8b2b4319e786325dc398 SHA512 de4962dc2aa174df17a3a1456719a777a42d238c3d6ad1771ccc460fa70c9e9cefcce52c7437f7acde61b9c3a2e84e9d49fd2dc33c7e9243053ceed5b247be03 +DIST dhcp-4.4.0.tar.gz 11158069 BLAKE2B c554e15f549bdf6342bfa4337ab54f2a259a1c212700a69b56d795b1c91230759e254b050087ad09cf065d9dcc380e6110a95d63c3d2ba982c567dd381889d3e SHA512 0dcddfe803db0cea49204f71c9fbc3b1a55496acc83e344d9147893410bbb5f96874ff6457037ee9f759d701cea4bab98dc51ad5d7b23926254e25e5e421eabd EBUILD dhcp-4.3.4.ebuild 7914 BLAKE2B f6f94a7af0aa70428d5fa6e51ab8ac79f25fc25f094694d0ab278398c52c6021d8efe5fa1e524751ba8eb3db214e97660146175ab6e2d91bbaa234a619266087 SHA512 434a6523ec0e3f56889c71be0ab919c4282f3843badc4c8a08aba6634175eabfa4b9921602dfce7147a44f5dc215060fe335b7bec1435364cafe159a6e23bc95 EBUILD dhcp-4.3.5.ebuild 7884 BLAKE2B 6ef306e4226389e05c904c74866918952ef16cf1caa2f4d23030aadcdbd259b8bbccb33df10daffce498fae9a189f1f8a6821a8746333d315bd2273c0cca6ed3 SHA512 d52d3ec0e9b046c29994af0af0cbd5bdc63cf040c7a4f8920d5f9f59d82223882df2cc6fa319d00a40d6b28b1938656587d9066942470fe0fdb812e732137a78 EBUILD dhcp-4.3.6-r1.ebuild 7823 BLAKE2B a28cef0d32954b13e1f6a963e419616c656f1c8cc97451db95d922a13a86eec908cef6858f9b6a080ad94c437211ef639fb016d4d52e040f5fdd9e5bd3868bab SHA512 f9e6247ba9ec67c5f8a93f8eae87dbfde8e9754bf621eb48d7641fb42d0ca6bffa66ae7d36bd984c168bab7293e3d73b7d119b96e1d0889181cf2c64b912d522 -EBUILD dhcp-4.3.6.ebuild 7769 BLAKE2B fec6e2187a943c89717d9b1f9f2e4fcdd310c220d2be00c49debd1e84a23789604a2cb13b9fd3df30ea488c2774628eaed33190e5aaa3fba21e266262dc722c9 SHA512 3a30e5b8cd1268648000174ff264f70c88c566459ccbbb4cb79057b4836725ba7cf4bfd7be39e8bb4a2328dedd1cc3eea18211ef09836610c237e0f3ad3570e0 +EBUILD dhcp-4.4.0.ebuild 7912 BLAKE2B b2a76698b695a6ca5013307bb00302e1ce5f904d886bff25b27231c3e85b5dc18d162cd92a081eb1c2c0b0c6313f3d793e3424136bb521c037104503dd63e6b5 SHA512 4e6fbd25bd5cd1c3a0e4fffe253b45e08df2e281026476d8cdfa55d8b1ed353ac3458ab91eef119cedb84d6adb74f69d6f6406acb4f7c5317c1717a7b28698d0 MISC metadata.xml 669 BLAKE2B 27f8b039b9fdca5cb487c31d12bdfe550efff35a3705ba3fd20e6a783c70e48d4d6ca26fdb966230517bb0f3182da2df3d565396e2ced70f6fd94b15a1d4f601 SHA512 854b5b781642506f45df585d2072a79164620ec16e2b59abe2ef55e474f229d676f69f4820b4db1f6dce04df55bc5e3a20bcff959a34b3cc41bf61cce31f1efd diff --git a/net-misc/dhcp/dhcp-4.3.6.ebuild b/net-misc/dhcp/dhcp-4.3.6.ebuild deleted file mode 100644 index 469f240e286d..000000000000 --- a/net-misc/dhcp/dhcp-4.3.6.ebuild +++ /dev/null @@ -1,262 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit systemd toolchain-funcs user - -MY_PV="${PV//_alpha/a}" -MY_PV="${MY_PV//_beta/b}" -MY_PV="${MY_PV//_rc/rc}" -MY_PV="${MY_PV//_p/-P}" -MY_P="${PN}-${MY_PV}" -DESCRIPTION="ISC Dynamic Host Configuration Protocol (DHCP) client/server" -HOMEPAGE="http://www.isc.org/products/DHCP" -SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz - ftp://ftp.isc.org/isc/dhcp/${MY_PV}/${MY_P}.tar.gz" - -LICENSE="ISC BSD SSLeay GPL-2" # GPL-2 only for init script -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" -IUSE="+client ipv6 kernel_linux ldap libressl selinux +server ssl vim-syntax" - -DEPEND=" - client? ( - kernel_linux? ( - ipv6? ( sys-apps/iproute2 ) - sys-apps/net-tools - ) - ) - ldap? ( - net-nds/openldap - ssl? ( - !libressl? ( dev-libs/openssl:0 ) - libressl? ( dev-libs/libressl ) - ) - )" -RDEPEND="${DEPEND} - selinux? ( sec-policy/selinux-dhcp ) - vim-syntax? ( app-vim/dhcpd-syntax )" - -S="${WORKDIR}/${MY_P}" - -src_unpack() { - unpack ${A} - # handle local bind hell - cd "${S}"/bind - unpack ./bind.tar.gz -} - -PATCHES=( - # Gentoo patches - these will probably never be accepted upstream - # Fix some permission issues - "${FILESDIR}/${PN}-3.0-fix-perms.patch" - - # Enable dhclient to equery NTP servers - "${FILESDIR}/${PN}-4.3.6-dhclient-ntp.patch" - "${FILESDIR}/${PN}-4.3.6-dhclient-resolvconf.patch" - - # Enable dhclient to get extra configuration from stdin - "${FILESDIR}/${PN}-4.2.2-dhclient-stdin-conf.patch" - "${FILESDIR}/${PN}-4.3.6-nogateway.patch" #265531 - "${FILESDIR}/${PN}-4.3.6-quieter-ping.patch" #296921 - "${FILESDIR}/${PN}-4.2.4-always-accept-4.patch" #437108 - "${FILESDIR}/${PN}-4.3.6-iproute2-path.patch" #480636 - "${FILESDIR}/${PN}-4.2.5-bindtodevice-inet6.patch" #471142 - "${FILESDIR}/${PN}-4.3.3-ldap-ipv6-client-id.patch" #559832 -) - -src_prepare() { - default - - # Brand the version with Gentoo - sed -i \ - -e "/VERSION=/s:'$: Gentoo-${PR}':" \ - configure || 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 -r \ - -e "/(script|host-name|domain-name) /d" \ - client/dhclient.conf.example || die - - if use client && ! use server ; then - sed -i -r \ - -e '/^SUBDIRS/s:\<(dhcpctl|relay|server)\>::g' \ - Makefile.in || die - elif ! use client && use server ; then - sed -i -r \ - -e '/^SUBDIRS/s:\::' \ - Makefile.in || die - fi - - # 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 || die - cp doc/ja_JP.eucJP/dhcp* common || die - fi - fi - # Now remove the non-english docs so there are no errors later - rm -r doc/ja_JP.eucJP || die - - # make the bind build work - binddir="${S}/bind" - cd "${binddir}" || die - cat <<-EOF > bindvar.tmp - binddir=${binddir} - GMAKE=${MAKE:-gmake} - EOF - eapply -p2 "${FILESDIR}"/${PN}-4.3.4-bind-disable.patch - cd bind-*/ || die - eapply -p2 "${FILESDIR}"/${PN}-4.2.2-bind-parallel-build.patch #380717 -} - -src_configure() { - # bind defaults to stupid `/usr/bin/ar` - tc-export AR BUILD_CC - export ac_cv_path_AR=${AR} - - # this is tested for by the bind build system, and can cause trouble - # when cross-building; since dhcp itself doesn't make use of libcap, - # simply disable it. - export ac_cv_lib_cap_cap_set_proc=no - - # Use FHS sane paths ... some of these have configure options, - # but not all, so just do it all here. - local e="/etc/dhcp" r="/var/run/dhcp" l="/var/lib/dhcp" - cat <<-EOF >> includes/site.h - #define _PATH_DHCPD_CONF "${e}/dhcpd.conf" - #define _PATH_DHCLIENT_CONF "${e}/dhclient.conf" - #define _PATH_DHCPD_DB "${l}/dhcpd.leases" - #define _PATH_DHCPD6_DB "${l}/dhcpd6.leases" - #define _PATH_DHCLIENT_DB "${l}/dhclient.leases" - #define _PATH_DHCLIENT6_DB "${l}/dhclient6.leases" - #define _PATH_DHCPD_PID "${r}/dhcpd.pid" - #define _PATH_DHCPD6_PID "${r}/dhcpd6.pid" - #define _PATH_DHCLIENT_PID "${r}/dhcpclient.pid" - #define _PATH_DHCLIENT6_PID "${r}/dhcpclient6.pid" - #define _PATH_DHCRELAY_PID "${r}/dhcrelay.pid" - #define _PATH_DHCRELAY6_PID "${r}/dhcrelay6.pid" - EOF - - local myeconfargs=( - --enable-paranoia - --enable-early-chroot - --sysconfdir=${e} - $(use_enable ipv6 dhcpv6) - $(use_with ldap) - $(use ldap && use_with ssl ldapcrypto || echo --without-ldapcrypto) - ) - econf "${myeconfargs[@]}" - - # configure local bind cruft. symtable option requires - # perl and we don't want to require that #383837. - cd bind/bind-*/ || die - eval econf \ - $(sed -n '/^bindconfig =/,/^$/{:a;N;$!ba;s,^[^-]*,,;s,\\\s*\n\s*--,--,g;s, @[[:upper:]]\+@,,g;P;D}' ../Makefile.in) \ - --disable-symtable \ - --without-make-clean -} - -src_compile() { - # build local bind cruft first - emake -C bind/bind-*/lib/export install - # then build standard dhcp code - emake AR="$(tc-getAR)" -} - -src_install() { - default - - dodoc README RELNOTES doc/{api+protocol,IANA-arp-parameters} - docinto html - dodoc doc/References.html - - if [[ -e client/dhclient ]] ; then - # move the client to / - dodir /sbin - mv "${D}"/usr/sbin/dhclient "${D}"/sbin/ || die - - exeinto /sbin - if use kernel_linux ; then - newexe "${S}"/client/scripts/linux dhclient-script - else - newexe "${S}"/client/scripts/freebsd dhclient-script - fi - fi - - if [[ -e server/dhcpd ]] ; then - if use ldap ; then - insinto /etc/openldap/schema - doins contrib/ldap/dhcp.* - dosbin contrib/ldap/dhcpd-conf-to-ldap - fi - - newinitd "${FILESDIR}"/dhcpd.init5 dhcpd - newconfd "${FILESDIR}"/dhcpd.conf2 dhcpd - newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay - newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay - newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay6 - newconfd "${FILESDIR}"/dhcrelay6.conf dhcrelay6 - - systemd_newtmpfilesd "${FILESDIR}"/dhcpd.tmpfiles dhcpd.conf - systemd_dounit "${FILESDIR}"/dhcpd4.service - systemd_dounit "${FILESDIR}"/dhcpd6.service - systemd_dounit "${FILESDIR}"/dhcrelay4.service - systemd_dounit "${FILESDIR}"/dhcrelay6.service - systemd_install_serviced "${FILESDIR}"/dhcrelay4.service.conf - systemd_install_serviced "${FILESDIR}"/dhcrelay6.service.conf - - sed -i "s:#@slapd@:$(usex ldap slapd ''):" "${ED}"/etc/init.d/* || die #442560 - fi - - # the default config files aren't terribly useful #384087 - local f - for f in "${ED}"/etc/dhcp/*.conf.example ; do - mv "${f}" "${f%.example}" || die - done - sed -i '/^[^#]/s:^:#:' "${ED}"/etc/dhcp/*.conf || die -} - -pkg_preinst() { - enewgroup dhcp - enewuser dhcp -1 -1 /var/lib/dhcp dhcp - - # Keep the user files over the sample ones. The - # hashing is to ignore the crappy defaults #384087. - local f h - for f in dhclient:da7c8496a96452190aecf9afceef4510 dhcpd:10979e7b71134bd7f04d2a60bd58f070 ; do - h=${f#*:} - f="/etc/dhcp/${f%:*}.conf" - if [ -e "${EROOT}"${f} ] ; then - case $(md5sum "${EROOT}"${f}) in - ${h}*) ;; - *) cp -p "${EROOT}"${f} "${ED}"${f};; - esac - fi - done -} - -pkg_postinst() { - 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 -} diff --git a/net-misc/dhcp/dhcp-4.4.0.ebuild b/net-misc/dhcp/dhcp-4.4.0.ebuild new file mode 100644 index 000000000000..ff83c6a59ab6 --- /dev/null +++ b/net-misc/dhcp/dhcp-4.4.0.ebuild @@ -0,0 +1,264 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit systemd toolchain-funcs user + +MY_PV="${PV//_alpha/a}" +MY_PV="${MY_PV//_beta/b}" +MY_PV="${MY_PV//_rc/rc}" +MY_PV="${MY_PV//_p/-P}" +MY_P="${PN}-${MY_PV}" +DESCRIPTION="ISC Dynamic Host Configuration Protocol (DHCP) client/server" +HOMEPAGE="http://www.isc.org/products/DHCP" +SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz + ftp://ftp.isc.org/isc/dhcp/${MY_PV}/${MY_P}.tar.gz" + +LICENSE="ISC BSD SSLeay GPL-2" # GPL-2 only for init script +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" +IUSE="+client ipv6 kernel_linux ldap libressl selinux +server ssl vim-syntax" + +DEPEND=" + client? ( + kernel_linux? ( + ipv6? ( sys-apps/iproute2 ) + sys-apps/net-tools + ) + ) + ldap? ( + net-nds/openldap + ssl? ( + !libressl? ( dev-libs/openssl:0 ) + libressl? ( dev-libs/libressl ) + ) + )" +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-dhcp ) + vim-syntax? ( app-vim/dhcpd-syntax )" + +S="${WORKDIR}/${MY_P}" + +src_unpack() { + unpack ${A} + # handle local bind hell + cd "${S}"/bind + unpack ./bind.tar.gz +} + +PATCHES=( + # Gentoo patches - these will probably never be accepted upstream + # Fix some permission issues + "${FILESDIR}/${PN}-3.0-fix-perms.patch" + + # Enable dhclient to equery NTP servers + "${FILESDIR}/${PN}-4.3.6-dhclient-ntp.patch" + "${FILESDIR}/${PN}-4.3.6-dhclient-resolvconf.patch" + + # Enable dhclient to get extra configuration from stdin + "${FILESDIR}/${PN}-4.2.2-dhclient-stdin-conf.patch" + "${FILESDIR}/${PN}-4.3.6-nogateway.patch" #265531 + "${FILESDIR}/${PN}-4.3.6-quieter-ping.patch" #296921 + "${FILESDIR}/${PN}-4.4.0-always-accept-4.patch" #437108 + "${FILESDIR}/${PN}-4.3.6-iproute2-path.patch" #480636 + "${FILESDIR}/${PN}-4.2.5-bindtodevice-inet6.patch" #471142 + "${FILESDIR}/${PN}-4.3.3-ldap-ipv6-client-id.patch" #559832 +) + +src_prepare() { + default + + # Brand the version with Gentoo + sed -i \ + -e "/VERSION=/s:'$: Gentoo-${PR}':" \ + configure || 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 -r \ + -e "/(script|host-name|domain-name) /d" \ + client/dhclient.conf.example || die + + if use client && ! use server ; then + sed -i -r \ + -e '/^SUBDIRS/s:\<(dhcpctl|relay|server)\>::g' \ + Makefile.in || die + elif ! use client && use server ; then + sed -i -r \ + -e '/^SUBDIRS/s:\::' \ + Makefile.in || die + fi + + # 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 || die + cp doc/ja_JP.eucJP/dhcp* common || die + fi + fi + # Now remove the non-english docs so there are no errors later + rm -r doc/ja_JP.eucJP || die + + # make the bind build work + binddir="${S}/bind" + cd "${binddir}" || die + cat <<-EOF > bindvar.tmp + binddir=${binddir} + GMAKE=${MAKE:-gmake} + EOF + eapply -p2 "${FILESDIR}"/${PN}-4.4.0-bind-disable.patch + # Only use the relevant subdirs now that ISC + #removed the lib/export structure in bind. + sed '/^SUBDIRS/s@=.*$@= isc dns isccfg irs samples@' \ + -i bind-*/lib/Makefile.in || die +} + +src_configure() { + # bind defaults to stupid `/usr/bin/ar` + tc-export AR BUILD_CC + export ac_cv_path_AR=${AR} + + # this is tested for by the bind build system, and can cause trouble + # when cross-building; since dhcp itself doesn't make use of libcap, + # simply disable it. + export ac_cv_lib_cap_cap_set_proc=no + + # Use FHS sane paths ... some of these have configure options, + # but not all, so just do it all here. + local e="/etc/dhcp" r="/var/run/dhcp" l="/var/lib/dhcp" + cat <<-EOF >> includes/site.h + #define _PATH_DHCPD_CONF "${e}/dhcpd.conf" + #define _PATH_DHCLIENT_CONF "${e}/dhclient.conf" + #define _PATH_DHCPD_DB "${l}/dhcpd.leases" + #define _PATH_DHCPD6_DB "${l}/dhcpd6.leases" + #define _PATH_DHCLIENT_DB "${l}/dhclient.leases" + #define _PATH_DHCLIENT6_DB "${l}/dhclient6.leases" + #define _PATH_DHCPD_PID "${r}/dhcpd.pid" + #define _PATH_DHCPD6_PID "${r}/dhcpd6.pid" + #define _PATH_DHCLIENT_PID "${r}/dhcpclient.pid" + #define _PATH_DHCLIENT6_PID "${r}/dhcpclient6.pid" + #define _PATH_DHCRELAY_PID "${r}/dhcrelay.pid" + #define _PATH_DHCRELAY6_PID "${r}/dhcrelay6.pid" + EOF + + local myeconfargs=( + --enable-paranoia + --enable-early-chroot + --sysconfdir=${e} + $(use_enable ipv6 dhcpv6) + $(use_with ldap) + $(use ldap && use_with ssl ldapcrypto || echo --without-ldapcrypto) + ) + econf "${myeconfargs[@]}" + + # configure local bind cruft. symtable option requires + # perl and we don't want to require that #383837. + cd bind/bind-*/ || die + eval econf \ + $(for el in $(awk '/^bindconfig/,/^$/ {print}' ../Makefile.in) ; do if [[ ${el} =~ ^-- ]] ; then printf ' %s' ${el}; fi; done | sed 's,@\([[:alpha:]]\+\)dir@,${binddir}/\1,g') \ + --disable-symtable \ + --without-make-clean +} + +src_compile() { + # build local bind cruft first + emake -C bind/bind-*/lib install + # then build standard dhcp code + emake AR="$(tc-getAR)" +} + +src_install() { + default + + dodoc README RELNOTES doc/{api+protocol,IANA-arp-parameters} + docinto html + dodoc doc/References.html + + if [[ -e client/dhclient ]] ; then + # move the client to / + dodir /sbin + mv "${D}"/usr/sbin/dhclient "${D}"/sbin/ || die + + exeinto /sbin + if use kernel_linux ; then + newexe "${S}"/client/scripts/linux dhclient-script + else + newexe "${S}"/client/scripts/freebsd dhclient-script + fi + fi + + if [[ -e server/dhcpd ]] ; then + if use ldap ; then + insinto /etc/openldap/schema + doins contrib/ldap/dhcp.* + dosbin contrib/ldap/dhcpd-conf-to-ldap + fi + + newinitd "${FILESDIR}"/dhcpd.init5 dhcpd + newconfd "${FILESDIR}"/dhcpd.conf2 dhcpd + newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay + newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay + newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay6 + newconfd "${FILESDIR}"/dhcrelay6.conf dhcrelay6 + + systemd_newtmpfilesd "${FILESDIR}"/dhcpd.tmpfiles dhcpd.conf + systemd_dounit "${FILESDIR}"/dhcpd4.service + systemd_dounit "${FILESDIR}"/dhcpd6.service + systemd_dounit "${FILESDIR}"/dhcrelay4.service + systemd_dounit "${FILESDIR}"/dhcrelay6.service + systemd_install_serviced "${FILESDIR}"/dhcrelay4.service.conf + systemd_install_serviced "${FILESDIR}"/dhcrelay6.service.conf + + sed -i "s:#@slapd@:$(usex ldap slapd ''):" "${ED}"/etc/init.d/* || die #442560 + fi + + # the default config files aren't terribly useful #384087 + local f + for f in "${ED}"/etc/dhcp/*.conf.example ; do + mv "${f}" "${f%.example}" || die + done + sed -i '/^[^#]/s:^:#:' "${ED}"/etc/dhcp/*.conf || die +} + +pkg_preinst() { + enewgroup dhcp + enewuser dhcp -1 -1 /var/lib/dhcp dhcp + + # Keep the user files over the sample ones. The + # hashing is to ignore the crappy defaults #384087. + local f h + for f in dhclient:da7c8496a96452190aecf9afceef4510 dhcpd:10979e7b71134bd7f04d2a60bd58f070 ; do + h=${f#*:} + f="/etc/dhcp/${f%:*}.conf" + if [ -e "${EROOT}"${f} ] ; then + case $(md5sum "${EROOT}"${f}) in + ${h}*) ;; + *) cp -p "${EROOT}"${f} "${ED}"${f};; + esac + fi + done +} + +pkg_postinst() { + 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 +} diff --git a/net-misc/dhcp/files/dhcp-4.4.0-always-accept-4.patch b/net-misc/dhcp/files/dhcp-4.4.0-always-accept-4.patch new file mode 100644 index 000000000000..bbb25eb194bd --- /dev/null +++ b/net-misc/dhcp/files/dhcp-4.4.0-always-accept-4.patch @@ -0,0 +1,29 @@ +https://bugs.gentoo.org/437108 + +Always accept the -4 option even if we don't have IPv6 support enabled. +The relay code does this already. + +--- dhcp-4.4.0/client/dhclient.c ++++ dhcp-4.4.0/client/dhclient.c +@@ -353,8 +353,8 @@ + if (!strcmp(argv[i], "-r")) { + release_mode = 1; + /* no_daemon = 1; */ +-#ifdef DHCPv6 + } else if (!strcmp(argv[i], "-4")) { ++#ifdef DHCPv6 + if (local_family_set && local_family != AF_INET) + log_fatal("Client can only do v4 or v6, not " + "both."); +--- dhcp-4.4.0/server/dhcpd.c ++++ dhcp-4.4.0/server/dhcpd.c +@@ -495,8 +495,8 @@ + } else if (!strcmp (argv [i], "-q")) { + quiet = 1; + quiet_interface_discovery = 1; +-#ifdef DHCPv6 + } else if (!strcmp(argv[i], "-4")) { ++#ifdef DHCPv6 + if (local_family_set && (local_family != AF_INET)) { + log_fatal("Server cannot run in both IPv4 and " + "IPv6 mode at the same time."); diff --git a/net-misc/dhcp/files/dhcp-4.4.0-bind-disable.patch b/net-misc/dhcp/files/dhcp-4.4.0-bind-disable.patch new file mode 100644 index 000000000000..b74255ca4e97 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-4.4.0-bind-disable.patch @@ -0,0 +1,22 @@ +--- dhcp-4.4.0/bind/Makefile.in ++++ dhcp-4.4.0/bind/Makefile.in +@@ -37,6 +37,7 @@ + @BIND_ATF_TRUE@all: bind1 atf bind2 + + bind1: ++disable: + # Extract the source from the tarball, if it hasn't been already. + @if test -d ${bindsrcdir} ; then \ + echo ${bindsrcdir} already unpacked... ; \ +@@ -60,6 +61,7 @@ + fi + + atf: ++disable: + # Build and copy the ATF support if not yet installed. + @if test -d ./atf ; then \ + echo ATF support already installed ; \ +--- dhcp-4.4.0/bind/test ++++ dhcp-4.4.0/bind/test +@@ -0,0 +1 @@ ++--disable-kqueue --disable-epoll --disable-devpoll --without-openssl --without-libxml2 --enable-exportlib --with-gssapi=no --enable-threads=no @BINDCONFIG@ --includedir=${binddir}/include --libdir=${binddir}/lib -- cgit v1.2.3