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