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