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