Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/dhcpcd/
Date: Sat, 20 Apr 2019 23:25:35
Message-Id: 1555748489.dd885fbb4fca01cfaac13f83e1587cd371c37389.polynomial-c@gentoo
1 commit: dd885fbb4fca01cfaac13f83e1587cd371c37389
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 20 08:19:50 2019 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 20 08:21:29 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd885fbb
7
8 net-misc/dhcpcd: Bump to version 7.2.0
9
10 Package-Manager: Portage-2.3.64, Repoman-2.3.12
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 net-misc/dhcpcd/Manifest | 1 +
14 net-misc/dhcpcd/dhcpcd-7.2.0.ebuild | 148 ++++++++++++++++++++++++++++++++++++
15 2 files changed, 149 insertions(+)
16
17 diff --git a/net-misc/dhcpcd/Manifest b/net-misc/dhcpcd/Manifest
18 index a427a88cc76..417bde5e8fe 100644
19 --- a/net-misc/dhcpcd/Manifest
20 +++ b/net-misc/dhcpcd/Manifest
21 @@ -3,3 +3,4 @@ DIST dhcpcd-7.0.1.tar.xz 207908 BLAKE2B 1a9350a0c4a9eb1eb6f5a7be78beb4a5fecd802e
22 DIST dhcpcd-7.0.8.tar.xz 210752 BLAKE2B ad8ba622589cc1c8c4bb332470c59527e03c817729f43a5b55b4f53f8ed60f35faaffbff24416f8596e78df8deb304f0598e27d890e9601d36c81250fda99942 SHA512 82cd845eb35670788b8f31b973945460f4c5f1a0a3025e3a452b79230dc30704e129d97140e6aec6d0281e0c89c333c0ce0af03c4767b2e5e66547ed3e071953
23 DIST dhcpcd-7.1.0.tar.xz 211496 BLAKE2B ca919723f8f205ad24e28751024ff68cb4d1e86d056d47b1390a8e81cbb62d61e6a09d50d95756968d43383420e479846a4527095532d2761e26c6f4d780988b SHA512 28d2b5ff8cb372df6432becdbfeedaea945608b14374b6af8938936efdaa73d8d8f1cb3f37d2f440137c2f6988f72ed8de6d1bda43d65d4fe22efdd0a1662c24
24 DIST dhcpcd-7.1.1.tar.xz 211788 BLAKE2B 984ec97ffdcb15883f57f9e2a699a7c8f006b2630e7651ab9d55e7a980045f8891f09d9f7be420969203a59671d097a1ed76621fe4a62ff26a5020fc8becfe69 SHA512 8791e718d65ef8ae23a16b98e82824860fa91914e6eb0a42cdbbca28236c1c38005ada44214bde33aac57152fe675debebdb5d141b67dcfc82012996d8337bb4
25 +DIST dhcpcd-7.2.0.tar.xz 212532 BLAKE2B c8768df8006d517d0082f08c6ceebfe5a31695485d32d477acc1c4b9bfce8541110388f186c2ef94642e0692c279fc6d89239cbd8ac07d6ed248e67721c07db5 SHA512 2ab7df53ed42cd7a274bbc9cfb9dca43a8615d9044c0e9f460c41f064ad012b436bf2fe2648dd2738e66aaefc72412cad6c59444631b650f942cba168127a79d
26
27 diff --git a/net-misc/dhcpcd/dhcpcd-7.2.0.ebuild b/net-misc/dhcpcd/dhcpcd-7.2.0.ebuild
28 new file mode 100644
29 index 00000000000..48ba26275d0
30 --- /dev/null
31 +++ b/net-misc/dhcpcd/dhcpcd-7.2.0.ebuild
32 @@ -0,0 +1,148 @@
33 +# Copyright 1999-2019 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=6
37 +
38 +inherit systemd toolchain-funcs
39 +
40 +if [[ ${PV} == "9999" ]]; then
41 + inherit git-r3
42 + EGIT_REPO_URI="https://roy.marples.name/git/dhcpcd.git"
43 +else
44 + MY_P="${P/_alpha/-alpha}"
45 + MY_P="${MY_P/_beta/-beta}"
46 + MY_P="${MY_P/_rc/-rc}"
47 + SRC_URI="https://roy.marples.name/downloads/${PN}/${MY_P}.tar.xz"
48 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
49 + S="${WORKDIR}/${MY_P}"
50 +fi
51 +
52 +DESCRIPTION="A fully featured, yet light weight RFC2131 compliant DHCP client"
53 +HOMEPAGE="https://roy.marples.name/projects/dhcpcd"
54 +LICENSE="BSD-2"
55 +SLOT="0"
56 +IUSE="elibc_glibc +embedded ipv6 kernel_linux +udev"
57 +
58 +COMMON_DEPEND="udev? ( virtual/udev )"
59 +DEPEND="${COMMON_DEPEND}"
60 +RDEPEND="${COMMON_DEPEND}"
61 +
62 +src_configure() {
63 + local dev hooks=() rundir
64 + use udev || dev="--without-dev --without-udev"
65 + hooks=( --with-hook=ntp.conf )
66 + use elibc_glibc && hooks+=( --with-hook=yp.conf )
67 + use kernel_linux && rundir="--rundir=${EPREFIX}/run"
68 + local myeconfargs=(
69 + --prefix="${EPREFIX}"
70 + --libexecdir="${EPREFIX}/lib/dhcpcd"
71 + --dbdir="${EPREFIX}/var/lib/dhcpcd"
72 + --localstatedir="${EPREFIX}/var"
73 + ${rundir}
74 + $(use_enable embedded)
75 + $(use_enable ipv6)
76 + ${dev}
77 + CC="$(tc-getCC)"
78 + ${hooks[@]}
79 + )
80 + econf "${myeconfargs[@]}"
81 +}
82 +
83 +src_install() {
84 + default
85 + keepdir /var/lib/dhcpcd
86 + newinitd "${FILESDIR}"/${PN}.initd ${PN}
87 + systemd_dounit "${FILESDIR}"/${PN}.service
88 +}
89 +
90 +pkg_postinst() {
91 + local dbdir="${EROOT%/}"/var/lib/dhcpcd old_files=()
92 +
93 + local old_old_duid="${EROOT%/}"/var/lib/dhcpcd/dhcpcd.duid
94 + local old_duid="${EROOT%/}"/etc/dhcpcd.duid
95 + local new_duid="${dbdir}"/duid
96 + if [[ -e "${old_old_duid}" ]] ; then
97 + # Upgrade the duid file to the new format if needed
98 + if ! grep -q '..:..:..:..:..:..' "${old_old_duid}"; then
99 + sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_old_duid}"
100 + fi
101 +
102 + # Move the duid to /etc, a more sensible location
103 + if [[ ! -e "${old_duid}" ]] ; then
104 + cp -p "${old_old_duid}" "${new_duid}"
105 + fi
106 + old_files+=( "${old_old_duid}" )
107 + fi
108 +
109 + # dhcpcd-7 moves the files out of /etc
110 + if [[ -e "${old_duid}" ]] ; then
111 + if [[ ! -e "${new_duid}" ]] ; then
112 + cp -p "${old_duid}" "${new_duid}"
113 + fi
114 + old_files+=( "${old_duid}" )
115 + fi
116 + local old_secret="${EROOT%/}"/etc/dhcpcd.secret
117 + local new_secret="${dbdir}"/secret
118 + if [[ -e "${old_secret}" ]] ; then
119 + if [[ ! -e "${new_secret}" ]] ; then
120 + cp -p "${old_secret}" "${new_secret}"
121 + fi
122 + old_files+=( "${old_secret}" )
123 + fi
124 +
125 + # dhcpcd-7 renames some files in /var/lib/dhcpcd
126 + local old_rdm="${dbdir}"/dhcpcd-rdm.monotonic
127 + local new_rdm="${dbdir}"/rdm_monotonic
128 + if [[ -e "${old_rdm}" ]] ; then
129 + if [[ ! -e "${new_rdm}" ]] ; then
130 + cp -p "${old_rdm}" "${new_rdm}"
131 + fi
132 + old_files+=( "${old_rdm}" )
133 + fi
134 + local lease=
135 + for lease in "${dbdir}"/dhcpcd-*.lease*; do
136 + [[ -f "${lease}" ]] || continue
137 + old_files+=( "${lease}" )
138 + local new_lease=$(basename "${lease}" | sed -e "s/dhcpcd-//")
139 + [[ -e "${dbdir}/${new_lease}" ]] && continue
140 + cp "${lease}" "${dbdir}/${new_lease}"
141 + done
142 +
143 + # Warn about removing stale files
144 + if [[ -n "${old_files[@]}" ]] ; then
145 + elog
146 + elog "dhcpcd-7 has copied dhcpcd.duid and dhcpcd.secret from"
147 + elog "${EROOT%/}/etc to ${dbdir}"
148 + elog "and copied leases in ${dbdir} to new files with the dhcpcd-"
149 + elog "prefix dropped."
150 + elog
151 + elog "You should remove these files if you don't plan on reverting"
152 + elog "to an older version:"
153 + local old_file=
154 + for old_file in ${old_files[@]}; do
155 + elog " ${old_file}"
156 + done
157 + fi
158 +
159 + if [ -z "${REPLACING_VERSIONS}" ]; then
160 + elog
161 + elog "dhcpcd has zeroconf support active by default."
162 + elog "This means it will always obtain an IP address even if no"
163 + elog "DHCP server can be contacted, which will break any existing"
164 + elog "failover support you may have configured in your net configuration."
165 + elog "This behaviour can be controlled with the noipv4ll configuration"
166 + elog "file option or the -L command line switch."
167 + elog "See the dhcpcd and dhcpcd.conf man pages for more details."
168 +
169 + elog
170 + elog "Dhcpcd has duid enabled by default, and this may cause issues"
171 + elog "with some dhcp servers. For more information, see"
172 + elog "https://bugs.gentoo.org/show_bug.cgi?id=477356"
173 + fi
174 +
175 + if ! has_version net-dns/bind-tools; then
176 + elog
177 + elog "If you activate the lookup-hostname hook to look up your hostname"
178 + elog "using the dns, you need to install net-dns/bind-tools."
179 + fi
180 +}