Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/networkmanager/
Date: Tue, 25 Jul 2017 20:24:28
Message-Id: 1501014259.7f2a5cbb288c0b80e1e44f49d5c99aa5583e4ea4.floppym@gentoo
1 commit: 7f2a5cbb288c0b80e1e44f49d5c99aa5583e4ea4
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jul 23 14:06:11 2017 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 25 20:24:19 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7f2a5cbb
7
8 net-misc/networkmanager: bump to 1.8.2
9
10 Package-Manager: Portage-2.3.6_p23, Repoman-2.3.3_p1
11
12 net-misc/networkmanager/Manifest | 1 +
13 .../networkmanager/networkmanager-1.8.2.ebuild | 323 +++++++++++++++++++++
14 2 files changed, 324 insertions(+)
15
16 diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest
17 index 829a7b0153f..2496fce7400 100644
18 --- a/net-misc/networkmanager/Manifest
19 +++ b/net-misc/networkmanager/Manifest
20 @@ -1,2 +1,3 @@
21 DIST NetworkManager-1.4.4.tar.xz 3762664 SHA256 829378f318cc008d138a23ca6a9191928ce75344e7e47a2f2c35f4ac82133309 SHA512 a73e423e88b0e2694a46dc04f492a656d766796aa987b2e4644147a5939a6fdeb22ff5d8b36c723444bc0ab3d8740b80fa82c2f5e07f073998841695978d6e14 WHIRLPOOL d5e4ca3868c2aa8bceec2029c573b61ccc2fbc9f9a84cb8360ecf7d7503011f0501e9bffd54b163de8e84606ad7977b3c187adb78beed3a44bf2a3ee9821631f
22 DIST NetworkManager-1.8.0.tar.xz 3811100 SHA256 fa5a5c6a36cdf95b12df34cc575bd61a74f297ede9be22cac4807a1aff3cf69e SHA512 1f261a9bbba1013ec7ac88672f2ebdfdb9447874eb711ccfa7383534f003f37aabbcddb51aa868e14cec1d76c33d33a99d681a3858ea6239112fe6fce81a9c6c WHIRLPOOL 3e94a50cd50582f9cad26937ee8d597fe275a857882b1fe7ee3a85e3a30cedf16f559064f92afcb00e1703c42b34c0438a0b798538dcedf8cd29da596390b93a
23 +DIST NetworkManager-1.8.2.tar.xz 3818844 SHA256 71a5efcd9e4c237ab57b2893ccc8f91f884ace3bec0e2bd4b31a4c9677ff1bf4 SHA512 7bebea66d8f494c052313224e9d5b1b4cf665482f07ee5d93defc3543f32296545a2d1097ab1fff27dbebb58e07a4bc47fbc0101163db92953ae66ac9b95524d WHIRLPOOL 5928c3d4c1a35dc9485c303f3ce7e7b33c3949a058bd566f8b779d5d6dfa11ee8fc365e1a7954a214cabea70f2239b0f6e2079a67616f5487abbd1d6053260a3
24
25 diff --git a/net-misc/networkmanager/networkmanager-1.8.2.ebuild b/net-misc/networkmanager/networkmanager-1.8.2.ebuild
26 new file mode 100644
27 index 00000000000..ccf11ee170c
28 --- /dev/null
29 +++ b/net-misc/networkmanager/networkmanager-1.8.2.ebuild
30 @@ -0,0 +1,323 @@
31 +# Copyright 1999-2017 Gentoo Foundation
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=6
35 +GNOME_ORG_MODULE="NetworkManager"
36 +GNOME2_LA_PUNT="yes"
37 +VALA_USE_DEPEND="vapigen"
38 +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
39 +
40 +inherit bash-completion-r1 gnome2 linux-info multilib python-any-r1 systemd \
41 + user readme.gentoo-r1 toolchain-funcs vala versionator virtualx udev multilib-minimal
42 +
43 +DESCRIPTION="A set of co-operative tools that make networking simple and straightforward"
44 +HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
45 +
46 +LICENSE="GPL-2+"
47 +SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
48 +
49 +IUSE="audit bluetooth connection-sharing consolekit +dhclient dhcpcd elogind gnutls +introspection json kernel_linux +nss +modemmanager ncurses ofono policykit +ppp resolvconf selinux systemd teamd test vala +wext +wifi"
50 +
51 +REQUIRED_USE="
52 + modemmanager? ( ppp )
53 + vala? ( introspection )
54 + wext? ( wifi )
55 + ^^ ( nss gnutls )
56 + ?? ( consolekit elogind systemd )
57 +"
58 +
59 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
60 +
61 +# gobject-introspection-0.10.3 is needed due to gnome bug 642300
62 +# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
63 +# TODO: need multilib janson (linked to libnm.so)
64 +COMMON_DEPEND="
65 + >=sys-apps/dbus-1.2[${MULTILIB_USEDEP}]
66 + >=dev-libs/dbus-glib-0.100[${MULTILIB_USEDEP}]
67 + >=dev-libs/glib-2.37.6:2[${MULTILIB_USEDEP}]
68 + >=dev-libs/libnl-3.2.8:3=[${MULTILIB_USEDEP}]
69 + policykit? ( >=sys-auth/polkit-0.106 )
70 + net-libs/libndp[${MULTILIB_USEDEP}]
71 + net-misc/curl
72 + net-misc/iputils
73 + sys-apps/util-linux[${MULTILIB_USEDEP}]
74 + sys-libs/readline:0=
75 + >=virtual/libudev-175:=[${MULTILIB_USEDEP}]
76 + audit? ( sys-process/audit )
77 + bluetooth? ( >=net-wireless/bluez-5 )
78 + connection-sharing? (
79 + net-dns/dnsmasq[dbus,dhcp]
80 + net-firewall/iptables )
81 + consolekit? ( >=sys-auth/consolekit-1.0.0 )
82 + dhclient? ( >=net-misc/dhcp-4[client] )
83 + dhcpcd? ( net-misc/dhcpcd )
84 + elogind? ( sys-auth/elogind )
85 + gnutls? (
86 + dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}]
87 + >=net-libs/gnutls-2.12:=[${MULTILIB_USEDEP}] )
88 + introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
89 + json? ( dev-libs/jansson )
90 + modemmanager? ( >=net-misc/modemmanager-0.7.991:0= )
91 + ncurses? ( >=dev-libs/newt-0.52.15 )
92 + nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
93 + ofono? ( net-misc/ofono )
94 + ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] )
95 + resolvconf? ( net-dns/openresolv )
96 + selinux? ( sys-libs/libselinux )
97 + systemd? ( >=sys-apps/systemd-209:0= )
98 + teamd? (
99 + dev-libs/jansson
100 + >=net-misc/libteam-1.9
101 + )
102 +"
103 +RDEPEND="${COMMON_DEPEND}
104 + || (
105 + net-misc/iputils[arping(+)]
106 + net-analyzer/arping
107 + )
108 + wifi? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
109 +"
110 +DEPEND="${COMMON_DEPEND}
111 + dev-util/gdbus-codegen
112 + dev-util/gtk-doc-am
113 + >=dev-util/intltool-0.40
114 + >=sys-devel/gettext-0.17
115 + >=sys-kernel/linux-headers-2.6.29
116 + virtual/pkgconfig[${MULTILIB_USEDEP}]
117 + introspection? (
118 + $(python_gen_any_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]')
119 + dev-lang/perl
120 + dev-libs/libxslt
121 + )
122 + vala? ( $(vala_depend) )
123 + test? (
124 + $(python_gen_any_dep '
125 + dev-python/dbus-python[${PYTHON_USEDEP}]
126 + dev-python/pygobject:3[${PYTHON_USEDEP}]')
127 + )
128 +"
129 +
130 +python_check_deps() {
131 + if use introspection; then
132 + has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return
133 + fi
134 + if use test; then
135 + has_version "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
136 + has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]"
137 + fi
138 +}
139 +
140 +sysfs_deprecated_check() {
141 + ebegin "Checking for SYSFS_DEPRECATED support"
142 +
143 + if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
144 + eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
145 + eerror "or NetworkManager will not work correctly."
146 + eerror "See https://bugs.gentoo.org/333639 for more info."
147 + die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
148 + fi
149 + eend $?
150 +}
151 +
152 +pkg_pretend() {
153 + if use kernel_linux; then
154 + get_version
155 + if linux_config_exists; then
156 + sysfs_deprecated_check
157 + else
158 + ewarn "Was unable to determine your kernel .config"
159 + ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
160 + ewarn "See https://bugs.gentoo.org/333639 for more info."
161 + fi
162 +
163 + fi
164 +}
165 +
166 +pkg_setup() {
167 + if use connection-sharing; then
168 + CONFIG_CHECK="~NF_NAT_IPV4 ~NF_NAT_MASQUERADE_IPV4"
169 + linux-info_pkg_setup
170 + fi
171 + enewgroup plugdev
172 + if use introspection || use test; then
173 + python-any-r1_pkg_setup
174 + fi
175 +}
176 +
177 +src_prepare() {
178 + DOC_CONTENTS="To modify system network connections without needing to enter the
179 + root password, add your user account to the 'plugdev' group."
180 +
181 + use vala && vala_src_prepare
182 + gnome2_src_prepare
183 +}
184 +
185 +multilib_src_configure() {
186 + local myconf=(
187 + --disable-more-warnings
188 + --disable-static
189 + --localstatedir=/var
190 + --disable-lto
191 + --disable-config-plugin-ibft
192 + # ifnet plugin always disabled until someone volunteers to actively
193 + # maintain and fix it
194 + --disable-ifnet
195 + --disable-qt
196 + --without-netconfig
197 + --with-dbus-sys-dir=/etc/dbus-1/system.d
198 + # We need --with-libnm-glib (and dbus-glib dep) as reverse deps are
199 + # still not ready for removing that lib
200 + --with-libnm-glib
201 + --with-nmcli=yes
202 + --with-udev-dir="$(get_udevdir)"
203 + --with-config-plugins-default=keyfile
204 + --with-iptables=/sbin/iptables
205 + $(multilib_native_enable concheck)
206 + --with-crypto=$(usex nss nss gnutls)
207 + --with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind $(multilib_native_usex consolekit consolekit no)))
208 + --with-suspend-resume=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind consolekit))
209 + $(multilib_native_use_with audit libaudit)
210 + $(multilib_native_use_enable bluetooth bluez5-dun)
211 + $(use_with dhclient)
212 + $(use_with dhcpcd)
213 + $(multilib_native_use_enable introspection)
214 + $(multilib_native_use_enable json json-validation)
215 + $(multilib_native_use_enable ppp)
216 + --without-libpsl
217 + $(multilib_native_use_with modemmanager modem-manager-1)
218 + $(multilib_native_use_with ncurses nmtui)
219 + $(multilib_native_use_with ofono)
220 + $(multilib_native_use_with resolvconf)
221 + $(multilib_native_use_with selinux)
222 + $(multilib_native_use_with systemd systemd-journal)
223 + $(multilib_native_use_enable teamd teamdctl)
224 + $(multilib_native_use_enable test tests)
225 + $(multilib_native_use_enable vala)
226 + --without-valgrind
227 + $(multilib_native_use_with wext)
228 + $(multilib_native_use_enable wifi)
229 + )
230 +
231 + if multilib_is_native_abi && use policykit; then
232 + myconf+=( --enable-polkit=yes )
233 + else
234 + myconf+=( --enable-polkit=disabled )
235 + fi
236 +
237 + # Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
238 + if use ppp; then
239 + local PPPD_VER=`best_version net-dialup/ppp`
240 + PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
241 + PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
242 + myconf+=( --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER} )
243 + fi
244 +
245 + # unit files directory needs to be passed only when systemd is enabled,
246 + # otherwise systemd support is not disabled completely, bug #524534
247 + use systemd && myconf+=( --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" )
248 +
249 + if multilib_is_native_abi; then
250 + # work-around man out-of-source brokenness, must be done before configure
251 + ln -s "${S}/docs" docs || die
252 + ln -s "${S}/man" man || die
253 + fi
254 +
255 + ECONF_SOURCE=${S} runstatedir="/run" gnome2_src_configure "${myconf[@]}"
256 +}
257 +
258 +multilib_src_compile() {
259 + if multilib_is_native_abi; then
260 + emake
261 + else
262 + local targets=(
263 + libnm/libnm.la
264 + libnm-util/libnm-util.la
265 + libnm-glib/libnm-glib.la
266 + libnm-glib/libnm-glib-vpn.la
267 + )
268 + emake "${targets[@]}"
269 + fi
270 +}
271 +
272 +multilib_src_test() {
273 + if use test && multilib_is_native_abi; then
274 + python_setup
275 + virtx emake check
276 + fi
277 +}
278 +
279 +multilib_src_install() {
280 + if multilib_is_native_abi; then
281 + # Install completions at proper place, bug #465100
282 + gnome2_src_install completiondir="$(get_bashcompdir)"
283 + else
284 + local targets=(
285 + install-libLTLIBRARIES
286 + install-libdeprecatedHEADERS
287 + install-libnm_glib_libnmvpnHEADERS
288 + install-libnm_glib_libnmincludeHEADERS
289 + install-libnm_util_libnm_util_includeHEADERS
290 + install-libnmincludeHEADERS
291 + install-nodist_libnm_glib_libnmincludeHEADERS
292 + install-nodist_libnm_glib_libnmvpnHEADERS
293 + install-nodist_libnm_util_libnm_util_includeHEADERS
294 + install-nodist_libnmincludeHEADERS
295 + install-pkgconfigDATA
296 + )
297 + emake DESTDIR="${D}" "${targets[@]}"
298 + fi
299 +}
300 +
301 +multilib_src_install_all() {
302 + ! use systemd && readme.gentoo_create_doc
303 +
304 + newinitd "${FILESDIR}/init.d.NetworkManager-r1" NetworkManager
305 + newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
306 +
307 + # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
308 + keepdir /etc/NetworkManager/dispatcher.d
309 +
310 + # Provide openrc net dependency only when nm is connected
311 + exeinto /etc/NetworkManager/dispatcher.d
312 + newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
313 + sed -e "s:@EPREFIX@:${EPREFIX}:g" \
314 + -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
315 +
316 + keepdir /etc/NetworkManager/system-connections
317 + chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594
318 +
319 + # Allow users in plugdev group to modify system connections
320 + insinto /usr/share/polkit-1/rules.d/
321 + doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
322 +}
323 +
324 +pkg_postinst() {
325 + gnome2_pkg_postinst
326 + ! use systemd && readme.gentoo_print_elog
327 +
328 + if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
329 + ewarn "The ${PN} system configuration file has moved to a new location."
330 + ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
331 + ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
332 + ewarn
333 + ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
334 + fi
335 +
336 + # NM fallbacks to plugin specified at compile time (upstream bug #738611)
337 + # but still show a warning to remember people to have cleaner config file
338 + if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
339 + if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
340 + ewarn
341 + ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
342 + ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
343 + ewarn
344 + fi
345 + fi
346 +
347 + # NM shows lots of errors making nmcli neither unusable, bug #528748 upstream bug #690457
348 + if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
349 + ewarn "You have psk-flags=1 setting in above files, you will need to"
350 + ewarn "either reconfigure affected networks or, at least, set the flag"
351 + ewarn "value to '0'."
352 + fi
353 +}