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

Contents of /net-misc/dhcpcd/dhcpcd-5.6.4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (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.9: +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-5.6.4.ebuild,v 1.9 2014/01/18 10:25:23 vapier Exp $
4
5 EAPI=4
6
7 inherit eutils systemd
8
9 MY_P="${P/_alpha/-alpha}"
10 MY_P="${MY_P/_beta/-beta}"
11 MY_P="${MY_P/_rc/-rc}"
12 S="${WORKDIR}/${MY_P}"
13
14 DESCRIPTION="A fully featured, yet light weight RFC2131 compliant DHCP client"
15 HOMEPAGE="http://roy.marples.name/projects/dhcpcd/"
16 SRC_URI="http://roy.marples.name/downloads/${PN}/${MY_P}.tar.bz2"
17 LICENSE="BSD-2"
18
19 KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
20
21 SLOT="0"
22 IUSE="+zeroconf elibc_glibc"
23
24 DEPEND=""
25 RDEPEND=""
26
27 src_prepare() {
28 epatch_user
29 if ! use zeroconf; then
30 elog "Disabling zeroconf support"
31 {
32 echo
33 echo "# dhcpcd ebuild requested no zeroconf"
34 echo "noipv4ll"
35 } >> dhcpcd.conf
36 fi
37 }
38
39 src_configure() {
40 local hooks="--with-hook=ntp.conf"
41 use elibc_glibc && hooks="${hooks} --with-hook=yp.conf"
42 econf \
43 --prefix="${EPREFIX}" \
44 --libexecdir="${EPREFIX}/lib/dhcpcd" \
45 --dbdir="${EPREFIX}/var/lib/dhcpcd" \
46 --localstatedir="${EPREFIX}/var" \
47 ${hooks}
48 }
49
50 src_install() {
51 default
52 newinitd "${FILESDIR}"/${PN}.initd ${PN}
53 systemd_dounit "${FILESDIR}"/${PN}.service
54 }
55
56 pkg_preinst() {
57 has_version 'net-misc/dhcpcd[zeroconf]' && prev_zero=true || prev_zero=false
58 }
59
60 pkg_postinst() {
61 # Upgrade the duid file to the new format if needed
62 local old_duid="${ROOT}"/var/lib/dhcpcd/dhcpcd.duid
63 local new_duid="${ROOT}"/etc/dhcpcd.duid
64 if [ -e "${old_duid}" ] && ! grep -q '..:..:..:..:..:..' "${old_duid}"; then
65 sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_duid}"
66 fi
67
68 # Move the duid to /etc, a more sensible location
69 if [ -e "${old_duid}" -a ! -e "${new_duid}" ]; then
70 cp -p "${old_duid}" "${new_duid}"
71 fi
72
73 if use zeroconf && ! $prev_zero; then
74 elog "You have installed dhcpcd with zeroconf support."
75 elog "This means that it will always obtain an IP address even if no"
76 elog "DHCP server can be contacted, which will break any existing"
77 elog "failover support you may have configured in your net configuration."
78 elog "This behaviour can be controlled with the -L flag."
79 elog "See the dhcpcd man page for more details."
80 fi
81
82 elog
83 elog "Users upgrading from 4.0 series should pay attention to removal"
84 elog "of compat useflag. This changes behavior of dhcp in wide manner:"
85 elog "dhcpcd no longer sends a default ClientID for ethernet interfaces."
86 elog "This is so we can re-use the address the kernel DHCP client found."
87 elog "To retain the old behaviour of sending a default ClientID based on the"
88 elog "hardware address for interface, simply add the keyword clientid"
89 elog "to dhcpcd.conf or use commandline parameter -I ''"
90 elog
91 elog "Also, users upgrading from 4.0 series should be aware that"
92 elog "the -N, -R and -Y command line options no longer exist."
93 elog "These are controled now by nohook options in dhcpcd.conf."
94
95 # Mea culpa, feel free to remove that after some time --mgorny.
96 if [[ -e "${ROOT}"/etc/systemd/system/network.target.wants/${PN}.service ]]
97 then
98 ebegin "Moving ${PN}.service to multi-user.target"
99 mv "${ROOT}"/etc/systemd/system/network.target.wants/${PN}.service \
100 "${ROOT}"/etc/systemd/system/multi-user.target.wants/
101 eend ${?} \
102 "Please try to re-enable dhcpcd.service"
103 fi
104 }

  ViewVC Help
Powered by ViewVC 1.1.20