/[gentoo-x86]/net-misc/dhcpcd/dhcpcd-6.2.0-r1.ebuild
Gentoo

Contents of /net-misc/dhcpcd/dhcpcd-6.2.0-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download)
Fri Aug 1 21:12:57 2014 UTC (5 years, 4 months ago) by williamh
Branch: MAIN
CVS Tags: HEAD
Changes since 1.11: +1 -1 lines
FILE REMOVED
remove vulnerable versions wrt bug #518596

(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0x30C46538)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/dhcpcd/dhcpcd-6.2.0-r1.ebuild,v 1.11 2014/07/05 15:49:43 zlogene Exp $
4
5 EAPI=5
6
7 if [[ ${PV} == "9999" ]]; then
8 EGIT_REPO_URI="git://roy.marples.name/${PN}.git"
9 inherit git-r3
10 else
11 MY_P="${P/_alpha/-alpha}"
12 MY_P="${MY_P/_beta/-beta}"
13 MY_P="${MY_P/_rc/-rc}"
14 SRC_URI="http://roy.marples.name/downloads/${PN}/${MY_P}.tar.bz2"
15 KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
16 S="${WORKDIR}/${MY_P}"
17 fi
18
19 inherit eutils systemd
20
21 DESCRIPTION="A fully featured, yet light weight RFC2131 compliant DHCP client"
22 HOMEPAGE="http://roy.marples.name/projects/dhcpcd/"
23 LICENSE="BSD-2"
24 SLOT="0"
25 IUSE="elibc_glibc ipv6 kernel_linux +udev"
26
27 COMMON_DEPEND="udev? ( virtual/udev )"
28 DEPEND="${COMMON_DEPEND}"
29 RDEPEND="${COMMON_DEPEND}"
30
31 src_prepare()
32 {
33 epatch "${FILESDIR}/${P}-dynamic-init.patch" #496870
34 epatch "${FILESDIR}/${P}-no_ipv6_fix.patch" #497098
35 epatch_user
36 }
37
38 src_configure()
39 {
40 local dev hooks rundir
41 use udev || dev="--without-dev --without-udev"
42 hooks="--with-hook=ntp.conf"
43 use elibc_glibc && hooks="${hooks} --with-hook=yp.conf"
44 use kernel_linux && rundir="--rundir=${EPREFIX}/run"
45 econf \
46 --prefix="${EPREFIX}" \
47 --libexecdir="${EPREFIX}/lib/dhcpcd" \
48 --dbdir="${EPREFIX}/var/lib/dhcpcd" \
49 --localstatedir="${EPREFIX}/var" \
50 ${rundir} \
51 $(use_enable ipv6) \
52 ${dev} \
53 ${hooks}
54 }
55
56 src_install()
57 {
58 default
59 newinitd "${FILESDIR}"/${PN}.initd ${PN}
60 systemd_dounit "${FILESDIR}"/${PN}.service
61 }
62
63 pkg_postinst()
64 {
65 # Upgrade the duid file to the new format if needed
66 local old_duid="${ROOT}"/var/lib/dhcpcd/dhcpcd.duid
67 local new_duid="${ROOT}"/etc/dhcpcd.duid
68 if [ -e "${old_duid}" ] && ! grep -q '..:..:..:..:..:..' "${old_duid}"; then
69 sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_duid}"
70 fi
71
72 # Move the duid to /etc, a more sensible location
73 if [ -e "${old_duid}" -a ! -e "${new_duid}" ]; then
74 cp -p "${old_duid}" "${new_duid}"
75 fi
76
77 elog
78 elog "dhcpcd has zeroconf support active by default."
79 elog "This means it will always obtain an IP address even if no"
80 elog "DHCP server can be contacted, which will break any existing"
81 elog "failover support you may have configured in your net configuration."
82 elog "This behaviour can be controlled with the noipv4ll configuration"
83 elog "file option or the -L command line switch."
84 elog "See the dhcpcd and dhcpcd.conf man pages for more details."
85
86 elog
87 elog "Dhcpcd has duid enabled by default, and this may cause issues"
88 elog "with some dhcp servers. For more information, see"
89 elog "https://bugs.gentoo.org/show_bug.cgi?id=477356"
90
91 if ! has_version net-dns/bind-tools; then
92 elog
93 elog "If you activate the lookup-hostname hook to look up your hostname"
94 elog "using the dns, you need to install net-dns/bind-tools."
95 fi
96 }

  ViewVC Help
Powered by ViewVC 1.1.20