Gentoo Archives: gentoo-commits

From: Mart Raudsepp <leio@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/networkmanager/
Date: Sun, 08 Sep 2019 10:47:31
Message-Id: 1567939614.50e8f9a816e88f61d7f072bfd28da360d2adec9e.leio@gentoo
1 commit: 50e8f9a816e88f61d7f072bfd28da360d2adec9e
2 Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 8 10:45:02 2019 +0000
4 Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 8 10:46:54 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50e8f9a8
7
8 net-misc/networkmanager: remove old
9
10 Package-Manager: Portage-2.3.69, Repoman-2.3.12
11 Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>
12
13 net-misc/networkmanager/Manifest | 2 -
14 .../networkmanager/networkmanager-1.16.0.ebuild | 342 ---------------------
15 .../networkmanager/networkmanager-1.16.2.ebuild | 342 ---------------------
16 3 files changed, 686 deletions(-)
17
18 diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest
19 index 8696f462354..879c26ca44f 100644
20 --- a/net-misc/networkmanager/Manifest
21 +++ b/net-misc/networkmanager/Manifest
22 @@ -1,3 +1 @@
23 -DIST NetworkManager-1.16.0.tar.xz 4793620 BLAKE2B 554559eefbfa489cf01067bd2c32e4b06fed076d38920b41f2d0005873ff913c0af2babcc3d9b463a4b636ca82e5c27ee20ab5768fcfb2c6b79e003d7fdc224d SHA512 e9d8365d8e59e5bc7c0bc13482139fb96b1d87183c8884e71e84eaf05fe121f2bcac519edd916bd242be4e9a9e2d2140a1065f529a9a02bda87b6d2bd4192584
24 -DIST NetworkManager-1.16.2.tar.xz 4820392 BLAKE2B f85fa4ff27cb2f0fc7d58052c810d4c20ca51d6e77e400c44270f941de6b4878b0c645053b9ffb02c3587b6c7b17631f9a6c6c15b630da4747051e1745d1dae8 SHA512 b3e874786d0bce58b967677fe82980aac58023fd4e913345acb63d7a7f253cd8fa6c044e788dd337a52f0fb026ce5fbd333d738dc9c3644d696e85498120f6d2
25 DIST NetworkManager-1.18.2.tar.xz 4872252 BLAKE2B 8a3fa74837a6cf2a09af807b9bd164c949d31efb81fc212485f49e24f0a215ff06db10c4259712f6c51d7480bda1b53457bf50bda9b2df8330891e8c8ba394c8 SHA512 a220d856632693298af0bd23ae4393ee597684fcae400c8ed35bae5e543bcdbd0b0e879f4a7587b674ae86c5fdfbee955acd0fb6226cb95ed31372cb7c222814
26
27 diff --git a/net-misc/networkmanager/networkmanager-1.16.0.ebuild b/net-misc/networkmanager/networkmanager-1.16.0.ebuild
28 deleted file mode 100644
29 index 4ab48bffe5d..00000000000
30 --- a/net-misc/networkmanager/networkmanager-1.16.0.ebuild
31 +++ /dev/null
32 @@ -1,342 +0,0 @@
33 -# Copyright 1999-2019 Gentoo Authors
34 -# Distributed under the terms of the GNU General Public License v2
35 -
36 -EAPI=6
37 -GNOME_ORG_MODULE="NetworkManager"
38 -GNOME2_LA_PUNT="yes"
39 -VALA_USE_DEPEND="vapigen"
40 -PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
41 -
42 -inherit bash-completion-r1 gnome2 linux-info multilib python-any-r1 systemd \
43 - user readme.gentoo-r1 vala virtualx udev multilib-minimal
44 -
45 -DESCRIPTION="A set of co-operative tools that make networking simple and straightforward"
46 -HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
47 -
48 -LICENSE="GPL-2+"
49 -SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
50 -
51 -IUSE="audit bluetooth connection-sharing consolekit +dhclient dhcpcd elogind gnutls +introspection iwd json kernel_linux +nss +modemmanager ncurses ofono ovs policykit +ppp resolvconf selinux systemd teamd test vala +wext +wifi"
52 -
53 -REQUIRED_USE="
54 - bluetooth? ( modemmanager )
55 - iwd? ( wifi )
56 - vala? ( introspection )
57 - wext? ( wifi )
58 - ^^ ( nss gnutls )
59 - ?? ( consolekit elogind systemd )
60 -"
61 -
62 -KEYWORDS="~alpha amd64 arm arm64 ~ia64 ppc ppc64 ~sparc x86"
63 -
64 -# gobject-introspection-0.10.3 is needed due to gnome bug 642300
65 -# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
66 -COMMON_DEPEND="
67 - >=sys-apps/dbus-1.2[${MULTILIB_USEDEP}]
68 - >=dev-libs/dbus-glib-0.100[${MULTILIB_USEDEP}]
69 - >=dev-libs/glib-2.40:2[${MULTILIB_USEDEP}]
70 - policykit? ( >=sys-auth/polkit-0.106 )
71 - net-libs/libndp[${MULTILIB_USEDEP}]
72 - >=net-misc/curl-7.24
73 - net-misc/iputils
74 - sys-apps/util-linux[${MULTILIB_USEDEP}]
75 - sys-libs/readline:0=
76 - >=virtual/libudev-175:=[${MULTILIB_USEDEP}]
77 - audit? ( sys-process/audit )
78 - bluetooth? ( >=net-wireless/bluez-5 )
79 - connection-sharing? (
80 - net-dns/dnsmasq[dbus,dhcp]
81 - net-firewall/iptables )
82 - consolekit? ( >=sys-auth/consolekit-1.0.0 )
83 - dhclient? ( >=net-misc/dhcp-4[client] )
84 - dhcpcd? ( net-misc/dhcpcd )
85 - elogind? ( >=sys-auth/elogind-219 )
86 - gnutls? (
87 - dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}]
88 - >=net-libs/gnutls-2.12:=[${MULTILIB_USEDEP}] )
89 - introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
90 - json? ( >=dev-libs/jansson-2.5[${MULTILIB_USEDEP}] )
91 - modemmanager? ( >=net-misc/modemmanager-0.7.991:0= )
92 - ncurses? ( >=dev-libs/newt-0.52.15 )
93 - nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
94 - ofono? ( net-misc/ofono )
95 - ovs? ( dev-libs/jansson )
96 - ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] )
97 - resolvconf? ( net-dns/openresolv )
98 - selinux? ( sys-libs/libselinux )
99 - systemd? ( >=sys-apps/systemd-209:0= )
100 - teamd? (
101 - dev-libs/jansson
102 - >=net-misc/libteam-1.9
103 - )
104 -"
105 -RDEPEND="${COMMON_DEPEND}
106 - || (
107 - net-misc/iputils[arping(+)]
108 - net-analyzer/arping
109 - )
110 - wifi? (
111 - !iwd? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
112 - iwd? ( net-wireless/iwd )
113 - )
114 -"
115 -DEPEND="${COMMON_DEPEND}
116 - dev-util/gdbus-codegen
117 - dev-util/glib-utils
118 - dev-util/gtk-doc-am
119 - >=dev-util/intltool-0.40
120 - >=sys-devel/gettext-0.17
121 - >=sys-kernel/linux-headers-3.18
122 - virtual/pkgconfig[${MULTILIB_USEDEP}]
123 - introspection? (
124 - $(python_gen_any_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]')
125 - dev-lang/perl
126 - dev-libs/libxslt
127 - )
128 - vala? ( $(vala_depend) )
129 - test? (
130 - $(python_gen_any_dep '
131 - dev-python/dbus-python[${PYTHON_USEDEP}]
132 - dev-python/pygobject:3[${PYTHON_USEDEP}]')
133 - )
134 -"
135 -
136 -python_check_deps() {
137 - if use introspection; then
138 - has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return
139 - fi
140 - if use test; then
141 - has_version "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
142 - has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]"
143 - fi
144 -}
145 -
146 -sysfs_deprecated_check() {
147 - ebegin "Checking for SYSFS_DEPRECATED support"
148 -
149 - if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
150 - eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
151 - eerror "or NetworkManager will not work correctly."
152 - eerror "See https://bugs.gentoo.org/333639 for more info."
153 - die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
154 - fi
155 - eend $?
156 -}
157 -
158 -pkg_pretend() {
159 - if use kernel_linux; then
160 - get_version
161 - if linux_config_exists; then
162 - sysfs_deprecated_check
163 - else
164 - ewarn "Was unable to determine your kernel .config"
165 - ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
166 - ewarn "See https://bugs.gentoo.org/333639 for more info."
167 - fi
168 -
169 - fi
170 -}
171 -
172 -pkg_setup() {
173 - if use connection-sharing; then
174 - CONFIG_CHECK="~NF_NAT ~NF_NAT_MASQUERADE"
175 - linux-info_pkg_setup
176 - fi
177 - enewgroup plugdev
178 - if use introspection || use test; then
179 - python-any-r1_pkg_setup
180 - fi
181 -}
182 -
183 -src_prepare() {
184 - DOC_CONTENTS="To modify system network connections without needing to enter the
185 - root password, add your user account to the 'plugdev' group."
186 -
187 - use vala && vala_src_prepare
188 - gnome2_src_prepare
189 -}
190 -
191 -multilib_src_configure() {
192 - local myconf=(
193 - --disable-more-warnings
194 - --disable-static
195 - --localstatedir=/var
196 - --disable-lto
197 - --disable-config-plugin-ibft
198 - --disable-qt
199 - --without-netconfig
200 - --with-dbus-sys-dir=/etc/dbus-1/system.d
201 - # We need --with-libnm-glib (and dbus-glib dep) as reverse deps are
202 - # still not ready for removing that lib, bug #665338
203 - --with-libnm-glib
204 - --with-nmcli=yes
205 - --with-udev-dir="$(get_udevdir)"
206 - --with-config-plugins-default=keyfile
207 - --with-iptables=/sbin/iptables
208 - --with-ebpf=yes
209 - $(multilib_native_enable concheck)
210 - --with-crypto=$(usex nss nss gnutls)
211 - --with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind $(multilib_native_usex consolekit consolekit no)))
212 - # ConsoleKit has no build-time dependency, so use it as the default case.
213 - # There is no off switch, and we do not support upower.
214 - --with-suspend-resume=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind consolekit))
215 - $(multilib_native_use_with audit libaudit)
216 - $(multilib_native_use_enable bluetooth bluez5-dun)
217 - $(use_with dhclient)
218 - $(use_with dhcpcd)
219 - $(multilib_native_use_enable introspection)
220 - $(use_enable json json-validation)
221 - $(multilib_native_use_enable ppp)
222 - --without-libpsl
223 - $(multilib_native_use_with modemmanager modem-manager-1)
224 - $(multilib_native_use_with ncurses nmtui)
225 - $(multilib_native_use_with ofono)
226 - $(multilib_native_use_enable ovs)
227 - $(multilib_native_use_with resolvconf)
228 - $(multilib_native_use_with selinux)
229 - $(multilib_native_use_with systemd systemd-journal)
230 - $(multilib_native_use_enable teamd teamdctl)
231 - $(multilib_native_use_enable test tests)
232 - $(multilib_native_use_enable vala)
233 - --without-valgrind
234 - $(multilib_native_use_with wifi iwd)
235 - $(multilib_native_use_with wext)
236 - $(multilib_native_use_enable wifi)
237 - )
238 -
239 - if multilib_is_native_abi && use policykit; then
240 - myconf+=( --enable-polkit=yes )
241 - else
242 - myconf+=( --enable-polkit=disabled )
243 - fi
244 -
245 - # Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
246 - if use ppp; then
247 - local PPPD_VER=`best_version net-dialup/ppp`
248 - PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
249 - PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
250 - myconf+=( --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER} )
251 - fi
252 -
253 - # unit files directory needs to be passed only when systemd is enabled,
254 - # otherwise systemd support is not disabled completely, bug #524534
255 - use systemd && myconf+=( --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" )
256 -
257 - if multilib_is_native_abi; then
258 - # work-around man out-of-source brokenness, must be done before configure
259 - ln -s "${S}/docs" docs || die
260 - ln -s "${S}/man" man || die
261 - fi
262 -
263 - ECONF_SOURCE=${S} runstatedir="/run" gnome2_src_configure "${myconf[@]}"
264 -}
265 -
266 -multilib_src_compile() {
267 - if multilib_is_native_abi; then
268 - emake
269 - else
270 - local targets=(
271 - libnm/libnm.la
272 - libnm-util/libnm-util.la
273 - libnm-glib/libnm-glib.la
274 - libnm-glib/libnm-glib-vpn.la
275 - )
276 - emake "${targets[@]}"
277 - fi
278 -}
279 -
280 -multilib_src_test() {
281 - if use test && multilib_is_native_abi; then
282 - python_setup
283 - virtx emake check
284 - fi
285 -}
286 -
287 -multilib_src_install() {
288 - if multilib_is_native_abi; then
289 - # Install completions at proper place, bug #465100
290 - gnome2_src_install completiondir="$(get_bashcompdir)"
291 - else
292 - local targets=(
293 - install-libLTLIBRARIES
294 - install-libdeprecatedHEADERS
295 - install-libnm_glib_libnmvpnHEADERS
296 - install-libnm_glib_libnmincludeHEADERS
297 - install-libnm_util_libnm_util_includeHEADERS
298 - install-libnmincludeHEADERS
299 - install-nodist_libnm_glib_libnmincludeHEADERS
300 - install-nodist_libnm_glib_libnmvpnHEADERS
301 - install-nodist_libnm_util_libnm_util_includeHEADERS
302 - install-nodist_libnmincludeHEADERS
303 - install-pkgconfigDATA
304 - )
305 - emake DESTDIR="${D}" "${targets[@]}"
306 - fi
307 -}
308 -
309 -multilib_src_install_all() {
310 - einstalldocs
311 - ! use systemd && readme.gentoo_create_doc
312 -
313 - newinitd "${FILESDIR}/init.d.NetworkManager-r1" NetworkManager
314 - newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
315 -
316 - # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
317 - keepdir /etc/NetworkManager/dispatcher.d
318 -
319 - # Provide openrc net dependency only when nm is connected
320 - exeinto /etc/NetworkManager/dispatcher.d
321 - newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
322 - sed -e "s:@EPREFIX@:${EPREFIX}:g" \
323 - -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
324 -
325 - keepdir /etc/NetworkManager/system-connections
326 - chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594
327 -
328 - # Allow users in plugdev group to modify system connections
329 - insinto /usr/share/polkit-1/rules.d/
330 - doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
331 -
332 - if use iwd; then
333 - # This goes to $nmlibdir/conf.d/ and $nmlibdir is '${prefix}'/lib/$PACKAGE, thus always lib, not get_libdir
334 - cat <<-EOF > "${ED%/}"/usr/lib/NetworkManager/conf.d/iwd.conf
335 - [device]
336 - wifi.backend=iwd
337 - EOF
338 - fi
339 -
340 - # Empty
341 - rmdir "${ED%/}"/var{/lib{/NetworkManager,},} || die
342 -}
343 -
344 -pkg_postinst() {
345 - gnome2_pkg_postinst
346 - systemd_reenable NetworkManager.service
347 - ! use systemd && readme.gentoo_print_elog
348 -
349 - if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
350 - ewarn "The ${PN} system configuration file has moved to a new location."
351 - ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
352 - ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
353 - ewarn
354 - ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
355 - fi
356 -
357 - # NM fallbacks to plugin specified at compile time (upstream bug #738611)
358 - # but still show a warning to remember people to have cleaner config file
359 - if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
360 - if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
361 - ewarn
362 - ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
363 - ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
364 - ewarn
365 - fi
366 - fi
367 -
368 - # NM shows lots of errors making nmcli neither unusable, bug #528748 upstream bug #690457
369 - if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
370 - ewarn "You have psk-flags=1 setting in above files, you will need to"
371 - ewarn "either reconfigure affected networks or, at least, set the flag"
372 - ewarn "value to '0'."
373 - fi
374 -}
375
376 diff --git a/net-misc/networkmanager/networkmanager-1.16.2.ebuild b/net-misc/networkmanager/networkmanager-1.16.2.ebuild
377 deleted file mode 100644
378 index 777cf71c603..00000000000
379 --- a/net-misc/networkmanager/networkmanager-1.16.2.ebuild
380 +++ /dev/null
381 @@ -1,342 +0,0 @@
382 -# Copyright 1999-2019 Gentoo Authors
383 -# Distributed under the terms of the GNU General Public License v2
384 -
385 -EAPI=6
386 -GNOME_ORG_MODULE="NetworkManager"
387 -GNOME2_LA_PUNT="yes"
388 -VALA_USE_DEPEND="vapigen"
389 -PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
390 -
391 -inherit bash-completion-r1 gnome2 linux-info multilib python-any-r1 systemd \
392 - user readme.gentoo-r1 vala virtualx udev multilib-minimal
393 -
394 -DESCRIPTION="A set of co-operative tools that make networking simple and straightforward"
395 -HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
396 -
397 -LICENSE="GPL-2+"
398 -SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
399 -
400 -IUSE="audit bluetooth connection-sharing consolekit +dhclient dhcpcd elogind gnutls +introspection iwd json kernel_linux +nss +modemmanager ncurses ofono ovs policykit +ppp resolvconf selinux systemd teamd test vala +wext +wifi"
401 -
402 -REQUIRED_USE="
403 - bluetooth? ( modemmanager )
404 - iwd? ( wifi )
405 - vala? ( introspection )
406 - wext? ( wifi )
407 - ^^ ( nss gnutls )
408 - ?? ( consolekit elogind systemd )
409 -"
410 -
411 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
412 -
413 -# gobject-introspection-0.10.3 is needed due to gnome bug 642300
414 -# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
415 -COMMON_DEPEND="
416 - >=sys-apps/dbus-1.2[${MULTILIB_USEDEP}]
417 - >=dev-libs/dbus-glib-0.100[${MULTILIB_USEDEP}]
418 - >=dev-libs/glib-2.40:2[${MULTILIB_USEDEP}]
419 - policykit? ( >=sys-auth/polkit-0.106 )
420 - net-libs/libndp[${MULTILIB_USEDEP}]
421 - >=net-misc/curl-7.24
422 - net-misc/iputils
423 - sys-apps/util-linux[${MULTILIB_USEDEP}]
424 - sys-libs/readline:0=[${MULTILIB_USEDEP}]
425 - >=virtual/libudev-175:=[${MULTILIB_USEDEP}]
426 - audit? ( sys-process/audit )
427 - bluetooth? ( >=net-wireless/bluez-5 )
428 - connection-sharing? (
429 - net-dns/dnsmasq[dbus,dhcp]
430 - net-firewall/iptables )
431 - consolekit? ( >=sys-auth/consolekit-1.0.0 )
432 - dhclient? ( >=net-misc/dhcp-4[client] )
433 - dhcpcd? ( net-misc/dhcpcd )
434 - elogind? ( >=sys-auth/elogind-219 )
435 - gnutls? (
436 - dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}]
437 - >=net-libs/gnutls-2.12:=[${MULTILIB_USEDEP}] )
438 - introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
439 - json? ( >=dev-libs/jansson-2.5[${MULTILIB_USEDEP}] )
440 - modemmanager? ( >=net-misc/modemmanager-0.7.991:0= )
441 - ncurses? ( >=dev-libs/newt-0.52.15 )
442 - nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
443 - ofono? ( net-misc/ofono )
444 - ovs? ( dev-libs/jansson )
445 - ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] )
446 - resolvconf? ( net-dns/openresolv )
447 - selinux? ( sys-libs/libselinux )
448 - systemd? ( >=sys-apps/systemd-209:0= )
449 - teamd? (
450 - dev-libs/jansson
451 - >=net-misc/libteam-1.9
452 - )
453 -"
454 -RDEPEND="${COMMON_DEPEND}
455 - || (
456 - net-misc/iputils[arping(+)]
457 - net-analyzer/arping
458 - )
459 - wifi? (
460 - !iwd? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
461 - iwd? ( net-wireless/iwd )
462 - )
463 -"
464 -DEPEND="${COMMON_DEPEND}
465 - dev-util/gdbus-codegen
466 - dev-util/glib-utils
467 - dev-util/gtk-doc-am
468 - >=dev-util/intltool-0.40
469 - >=sys-devel/gettext-0.17
470 - >=sys-kernel/linux-headers-3.18
471 - virtual/pkgconfig[${MULTILIB_USEDEP}]
472 - introspection? (
473 - $(python_gen_any_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]')
474 - dev-lang/perl
475 - dev-libs/libxslt
476 - )
477 - vala? ( $(vala_depend) )
478 - test? (
479 - $(python_gen_any_dep '
480 - dev-python/dbus-python[${PYTHON_USEDEP}]
481 - dev-python/pygobject:3[${PYTHON_USEDEP}]')
482 - )
483 -"
484 -
485 -python_check_deps() {
486 - if use introspection; then
487 - has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return
488 - fi
489 - if use test; then
490 - has_version "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
491 - has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]"
492 - fi
493 -}
494 -
495 -sysfs_deprecated_check() {
496 - ebegin "Checking for SYSFS_DEPRECATED support"
497 -
498 - if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
499 - eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
500 - eerror "or NetworkManager will not work correctly."
501 - eerror "See https://bugs.gentoo.org/333639 for more info."
502 - die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
503 - fi
504 - eend $?
505 -}
506 -
507 -pkg_pretend() {
508 - if use kernel_linux; then
509 - get_version
510 - if linux_config_exists; then
511 - sysfs_deprecated_check
512 - else
513 - ewarn "Was unable to determine your kernel .config"
514 - ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
515 - ewarn "See https://bugs.gentoo.org/333639 for more info."
516 - fi
517 -
518 - fi
519 -}
520 -
521 -pkg_setup() {
522 - if use connection-sharing; then
523 - CONFIG_CHECK="~NF_NAT ~NF_NAT_MASQUERADE"
524 - linux-info_pkg_setup
525 - fi
526 - enewgroup plugdev
527 - if use introspection || use test; then
528 - python-any-r1_pkg_setup
529 - fi
530 -}
531 -
532 -src_prepare() {
533 - DOC_CONTENTS="To modify system network connections without needing to enter the
534 - root password, add your user account to the 'plugdev' group."
535 -
536 - use vala && vala_src_prepare
537 - gnome2_src_prepare
538 -}
539 -
540 -multilib_src_configure() {
541 - local myconf=(
542 - --disable-more-warnings
543 - --disable-static
544 - --localstatedir=/var
545 - --disable-lto
546 - --disable-config-plugin-ibft
547 - --disable-qt
548 - --without-netconfig
549 - --with-dbus-sys-dir=/etc/dbus-1/system.d
550 - # We need --with-libnm-glib (and dbus-glib dep) as reverse deps are
551 - # still not ready for removing that lib, bug #665338
552 - --with-libnm-glib
553 - --with-nmcli=yes
554 - --with-udev-dir="$(get_udevdir)"
555 - --with-config-plugins-default=keyfile
556 - --with-iptables=/sbin/iptables
557 - --with-ebpf=yes
558 - $(multilib_native_enable concheck)
559 - --with-crypto=$(usex nss nss gnutls)
560 - --with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind $(multilib_native_usex consolekit consolekit no)))
561 - # ConsoleKit has no build-time dependency, so use it as the default case.
562 - # There is no off switch, and we do not support upower.
563 - --with-suspend-resume=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind consolekit))
564 - $(multilib_native_use_with audit libaudit)
565 - $(multilib_native_use_enable bluetooth bluez5-dun)
566 - $(use_with dhclient)
567 - $(use_with dhcpcd)
568 - $(multilib_native_use_enable introspection)
569 - $(use_enable json json-validation)
570 - $(multilib_native_use_enable ppp)
571 - --without-libpsl
572 - $(multilib_native_use_with modemmanager modem-manager-1)
573 - $(multilib_native_use_with ncurses nmtui)
574 - $(multilib_native_use_with ofono)
575 - $(multilib_native_use_enable ovs)
576 - $(multilib_native_use_with resolvconf)
577 - $(multilib_native_use_with selinux)
578 - $(multilib_native_use_with systemd systemd-journal)
579 - $(multilib_native_use_enable teamd teamdctl)
580 - $(multilib_native_use_enable test tests)
581 - $(multilib_native_use_enable vala)
582 - --without-valgrind
583 - $(multilib_native_use_with wifi iwd)
584 - $(multilib_native_use_with wext)
585 - $(multilib_native_use_enable wifi)
586 - )
587 -
588 - if multilib_is_native_abi && use policykit; then
589 - myconf+=( --enable-polkit=yes )
590 - else
591 - myconf+=( --enable-polkit=disabled )
592 - fi
593 -
594 - # Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
595 - if use ppp; then
596 - local PPPD_VER=`best_version net-dialup/ppp`
597 - PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
598 - PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
599 - myconf+=( --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER} )
600 - fi
601 -
602 - # unit files directory needs to be passed only when systemd is enabled,
603 - # otherwise systemd support is not disabled completely, bug #524534
604 - use systemd && myconf+=( --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" )
605 -
606 - if multilib_is_native_abi; then
607 - # work-around man out-of-source brokenness, must be done before configure
608 - ln -s "${S}/docs" docs || die
609 - ln -s "${S}/man" man || die
610 - fi
611 -
612 - ECONF_SOURCE=${S} runstatedir="/run" gnome2_src_configure "${myconf[@]}"
613 -}
614 -
615 -multilib_src_compile() {
616 - if multilib_is_native_abi; then
617 - emake
618 - else
619 - local targets=(
620 - libnm/libnm.la
621 - libnm-util/libnm-util.la
622 - libnm-glib/libnm-glib.la
623 - libnm-glib/libnm-glib-vpn.la
624 - )
625 - emake "${targets[@]}"
626 - fi
627 -}
628 -
629 -multilib_src_test() {
630 - if use test && multilib_is_native_abi; then
631 - python_setup
632 - virtx emake check
633 - fi
634 -}
635 -
636 -multilib_src_install() {
637 - if multilib_is_native_abi; then
638 - # Install completions at proper place, bug #465100
639 - gnome2_src_install completiondir="$(get_bashcompdir)"
640 - else
641 - local targets=(
642 - install-libLTLIBRARIES
643 - install-libdeprecatedHEADERS
644 - install-libnm_glib_libnmvpnHEADERS
645 - install-libnm_glib_libnmincludeHEADERS
646 - install-libnm_util_libnm_util_includeHEADERS
647 - install-libnmincludeHEADERS
648 - install-nodist_libnm_glib_libnmincludeHEADERS
649 - install-nodist_libnm_glib_libnmvpnHEADERS
650 - install-nodist_libnm_util_libnm_util_includeHEADERS
651 - install-nodist_libnmincludeHEADERS
652 - install-pkgconfigDATA
653 - )
654 - emake DESTDIR="${D}" "${targets[@]}"
655 - fi
656 -}
657 -
658 -multilib_src_install_all() {
659 - einstalldocs
660 - ! use systemd && readme.gentoo_create_doc
661 -
662 - newinitd "${FILESDIR}/init.d.NetworkManager-r1" NetworkManager
663 - newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
664 -
665 - # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
666 - keepdir /etc/NetworkManager/dispatcher.d
667 -
668 - # Provide openrc net dependency only when nm is connected
669 - exeinto /etc/NetworkManager/dispatcher.d
670 - newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
671 - sed -e "s:@EPREFIX@:${EPREFIX}:g" \
672 - -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
673 -
674 - keepdir /etc/NetworkManager/system-connections
675 - chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594
676 -
677 - # Allow users in plugdev group to modify system connections
678 - insinto /usr/share/polkit-1/rules.d/
679 - doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
680 -
681 - if use iwd; then
682 - # This goes to $nmlibdir/conf.d/ and $nmlibdir is '${prefix}'/lib/$PACKAGE, thus always lib, not get_libdir
683 - cat <<-EOF > "${ED%/}"/usr/lib/NetworkManager/conf.d/iwd.conf
684 - [device]
685 - wifi.backend=iwd
686 - EOF
687 - fi
688 -
689 - # Empty
690 - rmdir "${ED%/}"/var{/lib{/NetworkManager,},} || die
691 -}
692 -
693 -pkg_postinst() {
694 - gnome2_pkg_postinst
695 - systemd_reenable NetworkManager.service
696 - ! use systemd && readme.gentoo_print_elog
697 -
698 - if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
699 - ewarn "The ${PN} system configuration file has moved to a new location."
700 - ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
701 - ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
702 - ewarn
703 - ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
704 - fi
705 -
706 - # NM fallbacks to plugin specified at compile time (upstream bug #738611)
707 - # but still show a warning to remember people to have cleaner config file
708 - if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
709 - if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
710 - ewarn
711 - ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
712 - ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
713 - ewarn
714 - fi
715 - fi
716 -
717 - # NM shows lots of errors making nmcli almost unusable, bug #528748 upstream bug #690457
718 - if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
719 - ewarn "You have psk-flags=1 setting in above files, you will need to"
720 - ewarn "either reconfigure affected networks or, at least, set the flag"
721 - ewarn "value to '0'."
722 - fi
723 -}