Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/networkmanager/
Date: Tue, 31 May 2022 18:24:21
Message-Id: 1654021421.c2a5d2f1ed888bbf16d63692edec0ca8ee0b76f4.mattst88@gentoo
1 commit: c2a5d2f1ed888bbf16d63692edec0ca8ee0b76f4
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 31 17:31:13 2022 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Tue May 31 18:23:41 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2a5d2f1
7
8 net-misc/networkmanager: Drop old versions
9
10 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
11
12 net-misc/networkmanager/Manifest | 2 -
13 .../networkmanager-1.32.12-r1.ebuild | 400 --------------------
14 .../networkmanager/networkmanager-1.36.2.ebuild | 408 ---------------------
15 3 files changed, 810 deletions(-)
16
17 diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest
18 index 9384b121d4dc..8217c005db29 100644
19 --- a/net-misc/networkmanager/Manifest
20 +++ b/net-misc/networkmanager/Manifest
21 @@ -1,4 +1,2 @@
22 -DIST NetworkManager-1.32.12.tar.xz 5373452 BLAKE2B 29ca1f1c2aea60e4ddc7e3d5464604b329c8b740a2a143266c0bc05ec6a16079cfdf67770fc75afe523664e2e4234189031a8ffa2f51c0f02d4760f3ab20e04a SHA512 b8dfa409302781fdab19790afeb7f4396875e282d6983e2c5775294c8c13d3c1036dee69a37bf6e4fb2a2e80504c8e792780b6a9c1262616e57860da5ebc0e61
23 -DIST NetworkManager-1.36.2.tar.xz 5432676 BLAKE2B 8ce2922573ae5b1d244e87d1b979a9fe7443e4fa2cb6caf52b59139ad92169dd46f53460871b44e687860aaee06dd6a4999d0ebce9cde466e61c203ae18dbaa3 SHA512 3d9085bb836000a2354415e5ff35e5e67eacd97680660613128b9befe981d67b6ac8d519581f8635bf219c2db03a92f182066efef3abb2094da2870e12caa353
24 DIST NetworkManager-1.36.4.tar.xz 5433152 BLAKE2B 2bb625381bc5a816a9fdc51498721f9bc1e85fe2e83d114c8897f99f90af6924a0a07fddf0099f8e52c0df2f3353834129b99b4bb487b413cee503da7c680035 SHA512 17b2d39ed2584fb8b805e7b9950f9c4e6d657380881e9e78a1aa85dc58615e0a3896413a6902086f516dee2f373155f69042b4a229f3b9e15fb3c0f958cd8149
25 DIST NetworkManager-1.38.0.tar.xz 5431664 BLAKE2B adc298681e339d6cfac9c7310a94a1b11bc7f5044a0b2a129d5ab764bd5f29ccc604bbc27c49d52ceab9e2e6dbd923a686fbaf96cf20c73438d680fa5659e5ff SHA512 0f1532b4ea1aeb9d5dd922ee005eef325d39ba3526884793aaaed2eae61737f6a6e95644077f2b45ace569df79246d3d6404272cce02ca7e02b3632aee882940
26
27 diff --git a/net-misc/networkmanager/networkmanager-1.32.12-r1.ebuild b/net-misc/networkmanager/networkmanager-1.32.12-r1.ebuild
28 deleted file mode 100644
29 index fd6fc99404a6..000000000000
30 --- a/net-misc/networkmanager/networkmanager-1.32.12-r1.ebuild
31 +++ /dev/null
32 @@ -1,400 +0,0 @@
33 -# Copyright 1999-2022 Gentoo Authors
34 -# Distributed under the terms of the GNU General Public License v2
35 -
36 -EAPI=7
37 -GNOME_ORG_MODULE="NetworkManager"
38 -VALA_USE_DEPEND="vapigen"
39 -PYTHON_COMPAT=( python3_{7..10} )
40 -
41 -inherit gnome.org linux-info meson-multilib python-any-r1 readme.gentoo-r1 systemd toolchain-funcs udev vala virtualx
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+ LGPL-2.1+"
47 -SLOT="0"
48 -
49 -IUSE="audit bluetooth +concheck connection-sharing debug dhclient dhcpcd elogind gnutls +gtk-doc +introspection iptables iwd psl lto +nss nftables +modemmanager ofono ovs policykit +ppp resolvconf selinux syslog systemd teamd test +tools vala +wext +wifi"
50 -RESTRICT="!test? ( test )"
51 -
52 -REQUIRED_USE="
53 - bluetooth? ( modemmanager )
54 - connection-sharing? ( || ( iptables nftables ) )
55 - gtk-doc? ( introspection )
56 - iwd? ( wifi )
57 - vala? ( introspection )
58 - wext? ( wifi )
59 - ^^ ( gnutls nss )
60 - ?? ( elogind systemd )
61 - ?? ( dhclient dhcpcd )
62 - ?? ( syslog systemd )
63 -"
64 -
65 -KEYWORDS="~alpha amd64 arm arm64 ~ia64 ppc ppc64 ~riscv ~sparc x86"
66 -
67 -COMMON_DEPEND="
68 - sys-apps/util-linux[${MULTILIB_USEDEP}]
69 - elogind? ( >=sys-auth/elogind-219 )
70 - >=virtual/libudev-175:=[${MULTILIB_USEDEP}]
71 - sys-apps/dbus
72 - net-libs/libndp
73 - systemd? ( >=sys-apps/systemd-209:0= )
74 - >=dev-libs/glib-2.40:2[${MULTILIB_USEDEP}]
75 - introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
76 - selinux? ( sys-libs/libselinux )
77 - audit? ( sys-process/audit )
78 - teamd? (
79 - >=dev-libs/jansson-2.7:=
80 - >=net-misc/libteam-1.9
81 - )
82 - policykit? ( >=sys-auth/polkit-0.106 )
83 - nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
84 - gnutls? (
85 - >=net-libs/gnutls-2.12:=[${MULTILIB_USEDEP}]
86 - )
87 - ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] )
88 - modemmanager? (
89 - net-misc/mobile-broadband-provider-info
90 - >=net-misc/modemmanager-0.7.991:0=
91 - )
92 - bluetooth? ( >=net-wireless/bluez-5 )
93 - ofono? ( net-misc/ofono )
94 - dhclient? ( >=net-misc/dhcp-4[client] )
95 - dhcpcd? ( >=net-misc/dhcpcd-9.3.3 )
96 - ovs? ( >=dev-libs/jansson-2.7:= )
97 - resolvconf? ( net-dns/openresolv )
98 - connection-sharing? (
99 - net-dns/dnsmasq[dbus,dhcp]
100 - iptables? ( net-firewall/iptables )
101 - nftables? ( net-firewall/nftables )
102 - )
103 - psl? ( net-libs/libpsl )
104 - concheck? ( net-misc/curl )
105 - tools? (
106 - sys-libs/readline:0=
107 - >=dev-libs/newt-0.52.15
108 - )
109 -"
110 -RDEPEND="${COMMON_DEPEND}
111 - acct-group/plugdev
112 - || (
113 - net-misc/iputils[arping(+)]
114 - net-analyzer/arping
115 - )
116 - wifi? (
117 - !iwd? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
118 - iwd? ( net-wireless/iwd )
119 - )
120 -"
121 -DEPEND="${COMMON_DEPEND}
122 - >=sys-kernel/linux-headers-3.18
123 - net-libs/libndp[${MULTILIB_USEDEP}]
124 -"
125 -BDEPEND="
126 - dev-util/gdbus-codegen
127 - dev-util/glib-utils
128 - gtk-doc? (
129 - dev-util/gtk-doc
130 - app-text/docbook-xml-dtd:4.1.2
131 - )
132 - >=dev-util/intltool-0.40
133 - >=sys-devel/gettext-0.17
134 - virtual/pkgconfig
135 - introspection? (
136 - $(python_gen_any_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]')
137 - dev-lang/perl
138 - dev-libs/libxslt
139 - )
140 - vala? ( $(vala_depend) )
141 - test? (
142 - >=dev-libs/jansson-2.7
143 - $(python_gen_any_dep '
144 - dev-python/dbus-python[${PYTHON_USEDEP}]
145 - dev-python/pygobject:3[${PYTHON_USEDEP}]')
146 - )
147 -"
148 -
149 -python_check_deps() {
150 - if use introspection; then
151 - has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return
152 - fi
153 - if use test; then
154 - has_version "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
155 - has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]"
156 - fi
157 -}
158 -
159 -sysfs_deprecated_check() {
160 - ebegin "Checking for SYSFS_DEPRECATED support"
161 -
162 - if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
163 - eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
164 - eerror "or NetworkManager will not work correctly."
165 - eerror "See https://bugs.gentoo.org/333639 for more info."
166 - die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
167 - fi
168 - eend $?
169 -}
170 -
171 -pkg_pretend() {
172 - if use kernel_linux; then
173 - get_version
174 - if linux_config_exists; then
175 - sysfs_deprecated_check
176 - else
177 - ewarn "Was unable to determine your kernel .config"
178 - ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
179 - ewarn "See https://bugs.gentoo.org/333639 for more info."
180 - fi
181 - fi
182 -}
183 -
184 -pkg_setup() {
185 - if use connection-sharing; then
186 - if kernel_is lt 5 1; then
187 - CONFIG_CHECK="~NF_NAT_IPV4 ~NF_NAT_MASQUERADE_IPV4"
188 - else
189 - CONFIG_CHECK="~NF_NAT ~NF_NAT_MASQUERADE"
190 - fi
191 - linux-info_pkg_setup
192 - fi
193 -
194 - if use introspection || use test; then
195 - python-any-r1_pkg_setup
196 - fi
197 -
198 - # bug 809695
199 - if tc-is-clang && use lto; then
200 - eerror "Clang does not support -flto-partition"
201 - die "Please use gcc or turn off USE=lto flag when building with clang"
202 - fi
203 -}
204 -
205 -src_prepare() {
206 - DOC_CONTENTS="To modify system network connections without needing to enter the
207 - root password, add your user account to the 'plugdev' group."
208 -
209 - default
210 - use vala && vala_src_prepare
211 -
212 - sed -i \
213 - -e 's#/usr/bin/sed#/bin/sed#' \
214 - data/84-nm-drivers.rules \
215 - || die
216 -}
217 -
218 -meson_nm_program() {
219 - usex "$1" "-D${2:-$1}=$3" "-D${2:-$1}=no"
220 -}
221 -
222 -meson_nm_native_program() {
223 - multilib_native_usex "$1" "-D${2:-$1}=$3" "-D${2:-$1}=no"
224 -}
225 -
226 -multilib_src_configure() {
227 - local emesonargs=(
228 - --localstatedir="${EPREFIX}/var"
229 -
230 - -Dsystemdsystemunitdir=$(systemd_get_systemunitdir)
231 - -Dsystem_ca_path=/etc/ssl/certs
232 - -Dudev_dir=$(get_udevdir)
233 - -Ddbus_conf_dir=/usr/share/dbus-1/system.d
234 - -Dkernel_firmware_dir=/lib/firmware
235 - -Diptables=/sbin/iptables
236 - -Dnft=/sbin/nft
237 - -Ddnsmasq=/usr/sbin/dnsmasq
238 - #-Ddnssec_trigger=
239 -
240 - -Ddist_version=${PVR}
241 - $(meson_native_use_bool policykit polkit)
242 - $(meson_native_use_bool policykit config_auth_polkit_default)
243 - -Dmodify_system=true
244 - -Dpolkit_agent_helper_1=/usr/lib/polkit-1/polkit-agent-helper-1
245 - $(meson_native_use_bool selinux)
246 - $(meson_native_use_bool systemd systemd_journal)
247 - -Dhostname_persist=gentoo
248 - -Dlibaudit=$(multilib_native_usex audit)
249 -
250 - $(meson_native_use_bool wext)
251 - $(meson_native_use_bool wifi)
252 - $(meson_native_use_bool iwd)
253 - $(meson_native_use_bool ppp)
254 - -Dpppd=/usr/sbin/pppd
255 - $(meson_native_use_bool modemmanager modem_manager)
256 - $(meson_native_use_bool ofono)
257 - $(meson_native_use_bool concheck)
258 - $(meson_native_use_bool teamd teamdctl)
259 - $(meson_native_use_bool ovs)
260 - $(meson_native_use_bool tools nmcli)
261 - $(meson_native_use_bool tools nmtui)
262 - $(meson_native_use_bool tools nm_cloud_setup)
263 - $(meson_native_use_bool bluetooth bluez5_dun)
264 - -Debpf=true
265 -
266 - -Dconfig_plugins_default=keyfile
267 - -Difcfg_rh=false
268 - -Difupdown=false
269 -
270 - $(meson_nm_native_program resolvconf "" /sbin/resolvconf)
271 - -Dnetconfig=no
272 - -Dconfig_dns_rc_manager_default=auto
273 -
274 - $(meson_nm_program dhclient "" /sbin/dhclient)
275 - -Ddhcpcanon=no
276 - $(meson_nm_program dhcpcd "" /sbin/dhcpcd)
277 -
278 - $(meson_native_use_bool introspection)
279 - $(meson_native_use_bool vala vapi)
280 - $(meson_native_use_bool gtk-doc docs)
281 - -Dtests=$(multilib_native_usex test)
282 - $(meson_native_true firewalld_zone)
283 - -Dmore_asserts=0
284 - $(meson_use debug more_logging)
285 - -Dvalgrind=no
286 - -Dvalgrind_suppressions=
287 - -Dld_gc=false
288 - $(meson_native_use_bool psl libpsl)
289 - -Dqt=false
290 -
291 - $(meson_use lto b_lto)
292 - )
293 -
294 - if multilib_is_native_abi && use systemd; then
295 - emesonargs+=( -Dsession_tracking_consolekit=false )
296 - emesonargs+=( -Dsession_tracking=systemd )
297 - emesonargs+=( -Dsuspend_resume=systemd )
298 - elif multilib_is_native_abi && use elogind; then
299 - emesonargs+=( -Dsession_tracking_consolekit=false )
300 - emesonargs+=( -Dsession_tracking=elogind )
301 - emesonargs+=( -Dsuspend_resume=elogind )
302 - else
303 - emesonargs+=( -Dsession_tracking_consolekit=false )
304 - emesonargs+=( -Dsession_tracking=no )
305 - emesonargs+=( -Dsuspend_resume=auto )
306 - fi
307 -
308 - if multilib_is_native_abi && use syslog; then
309 - emesonargs+=( -Dconfig_logging_backend_default=syslog )
310 - elif multilib_is_native_abi && use systemd; then
311 - emesonargs+=( -Dconfig_logging_backend_default=journal )
312 - else
313 - emesonargs+=( -Dconfig_logging_backend_default=default )
314 - fi
315 -
316 - if multilib_is_native_abi && use dhclient; then
317 - emesonargs+=( -Dconfig_dhcp_default=dhclient )
318 - elif multilib_is_native_abi && use dhcpcd; then
319 - emesonargs+=( -Dconfig_dhcp_default=dhcpcd )
320 - else
321 - emesonargs+=( -Dconfig_dhcp_default=internal )
322 - fi
323 -
324 - if use nss; then
325 - emesonargs+=( -Dcrypto=nss )
326 - else
327 - emesonargs+=( -Dcrypto=gnutls )
328 - fi
329 -
330 - # Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
331 - if use ppp; then
332 - local PPPD_VER=`best_version net-dialup/ppp`
333 - PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
334 - PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
335 - emesonargs+=( -Dpppd_plugin_dir=/usr/$(get_libdir)/pppd/${PPPD_VER} )
336 - fi
337 -
338 - meson_src_configure
339 -}
340 -
341 -multilib_src_test() {
342 - if use test && multilib_is_native_abi; then
343 - python_setup
344 - virtx meson_src_test
345 - fi
346 -}
347 -
348 -multilib_src_install() {
349 - meson_src_install
350 - if ! multilib_is_native_abi; then
351 - rm -r "${ED}"/{etc,usr/{bin,lib/NetworkManager,share},var} || die
352 - fi
353 -}
354 -
355 -multilib_src_install_all() {
356 - ! use systemd && readme.gentoo_create_doc
357 -
358 - newinitd "${FILESDIR}/init.d.NetworkManager-r2" NetworkManager
359 - newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
360 -
361 - # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
362 - keepdir /etc/NetworkManager/dispatcher.d
363 -
364 - # Provide openrc net dependency only when nm is connected
365 - exeinto /etc/NetworkManager/dispatcher.d
366 - newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
367 - sed -e "s:@EPREFIX@:${EPREFIX}:g" \
368 - -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
369 -
370 - keepdir /etc/NetworkManager/system-connections
371 - chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594
372 -
373 - # Allow users in plugdev group to modify system connections
374 - insinto /usr/share/polkit-1/rules.d/
375 - doins "${FILESDIR}"/01-org.freedesktop.NetworkManager.settings.modify.system.rules
376 -
377 - insinto /usr/lib/NetworkManager/conf.d #702476
378 - doins "${S}"/examples/nm-conf.d/31-mac-addr-change.conf
379 -
380 - if use iwd; then
381 - # This goes to $nmlibdir/conf.d/ and $nmlibdir is '${prefix}'/lib/$PACKAGE, thus always lib, not get_libdir
382 - cat <<-EOF > "${ED}"/usr/lib/NetworkManager/conf.d/iwd.conf || die
383 - [device]
384 - wifi.backend=iwd
385 - EOF
386 - fi
387 -
388 - mv "${ED}"/usr/share/doc/{NetworkManager/examples/,${PF}} || die
389 - rmdir "${ED}"/usr/share/doc/NetworkManager || die
390 -
391 - # Empty
392 - rmdir "${ED}"/var{/lib{/NetworkManager,},} || die
393 -}
394 -
395 -pkg_postinst() {
396 - systemd_reenable NetworkManager.service
397 - ! use systemd && readme.gentoo_print_elog
398 -
399 - if [[ -e "${EROOT}/etc/NetworkManager/nm-system-settings.conf" ]]; then
400 - ewarn "The ${PN} system configuration file has moved to a new location."
401 - ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
402 - ewarn "to ${EROOT}/etc/NetworkManager/NetworkManager.conf"
403 - ewarn
404 - ewarn "After doing so, you can remove ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
405 - fi
406 -
407 - # NM fallbacks to plugin specified at compile time (upstream bug #738611)
408 - # but still show a warning to remember people to have cleaner config file
409 - if [[ -e "${EROOT}/etc/NetworkManager/NetworkManager.conf" ]]; then
410 - if grep plugins "${EROOT}/etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
411 - ewarn
412 - ewarn "You seem to use 'ifnet' plugin in ${EROOT}/etc/NetworkManager/NetworkManager.conf"
413 - ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
414 - ewarn
415 - fi
416 - fi
417 -
418 - # NM shows lots of errors making nmcli almost unusable, bug #528748 upstream bug #690457
419 - if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
420 - ewarn "You have psk-flags=1 setting in above files, you will need to"
421 - ewarn "either reconfigure affected networks or, at least, set the flag"
422 - ewarn "value to '0'."
423 - fi
424 -
425 - if use dhclient || use dhcpcd; then
426 - ewarn "You have enabled USE=dhclient and/or USE=dhcpcd, but NetworkManager since"
427 - ewarn "version 1.20 defaults to the internal DHCP client. If the internal client"
428 - ewarn "works for you, and you're happy with, the alternative USE flags can be"
429 - ewarn "disabled. If you want to use dhclient or dhcpcd, then you need to tweak"
430 - ewarn "the main.dhcp configuration option to use one of them instead of internal."
431 - fi
432 -}
433
434 diff --git a/net-misc/networkmanager/networkmanager-1.36.2.ebuild b/net-misc/networkmanager/networkmanager-1.36.2.ebuild
435 deleted file mode 100644
436 index 40c06d6ef040..000000000000
437 --- a/net-misc/networkmanager/networkmanager-1.36.2.ebuild
438 +++ /dev/null
439 @@ -1,408 +0,0 @@
440 -# Copyright 1999-2022 Gentoo Authors
441 -# Distributed under the terms of the GNU General Public License v2
442 -
443 -EAPI=8
444 -GNOME_ORG_MODULE="NetworkManager"
445 -VALA_USE_DEPEND="vapigen"
446 -PYTHON_COMPAT=( python3_{8..10} )
447 -
448 -inherit gnome.org linux-info meson-multilib python-any-r1 readme.gentoo-r1 systemd toolchain-funcs udev vala virtualx
449 -
450 -DESCRIPTION="A set of co-operative tools that make networking simple and straightforward"
451 -HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
452 -
453 -LICENSE="GPL-2+ LGPL-2.1+"
454 -SLOT="0"
455 -
456 -IUSE="audit bluetooth +concheck connection-sharing debug dhclient dhcpcd elogind gnutls +gtk-doc +introspection iptables iwd psl libedit lto +nss nftables +modemmanager ofono ovs policykit +ppp resolvconf selinux syslog systemd teamd test +tools vala +wext +wifi"
457 -RESTRICT="!test? ( test )"
458 -
459 -REQUIRED_USE="
460 - bluetooth? ( modemmanager )
461 - connection-sharing? ( || ( iptables nftables ) )
462 - gtk-doc? ( introspection )
463 - iwd? ( wifi )
464 - vala? ( introspection )
465 - wext? ( wifi )
466 - ^^ ( gnutls nss )
467 - ?? ( elogind systemd )
468 - ?? ( dhclient dhcpcd )
469 - ?? ( syslog systemd )
470 -"
471 -
472 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
473 -
474 -COMMON_DEPEND="
475 - sys-apps/util-linux[${MULTILIB_USEDEP}]
476 - elogind? ( >=sys-auth/elogind-219 )
477 - >=virtual/libudev-175:=[${MULTILIB_USEDEP}]
478 - sys-apps/dbus
479 - net-libs/libndp
480 - systemd? ( >=sys-apps/systemd-209:0= )
481 - >=dev-libs/glib-2.40:2[${MULTILIB_USEDEP}]
482 - introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
483 - selinux? ( sys-libs/libselinux )
484 - audit? ( sys-process/audit )
485 - teamd? (
486 - >=dev-libs/jansson-2.7:=
487 - >=net-misc/libteam-1.9
488 - )
489 - policykit? ( >=sys-auth/polkit-0.106 )
490 - nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
491 - gnutls? (
492 - >=net-libs/gnutls-2.12:=[${MULTILIB_USEDEP}]
493 - )
494 - ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] )
495 - modemmanager? (
496 - net-misc/mobile-broadband-provider-info
497 - >=net-misc/modemmanager-0.7.991:0=
498 - )
499 - bluetooth? ( >=net-wireless/bluez-5 )
500 - ofono? ( net-misc/ofono )
501 - dhclient? ( >=net-misc/dhcp-4[client] )
502 - dhcpcd? ( >=net-misc/dhcpcd-9.3.3 )
503 - ovs? ( >=dev-libs/jansson-2.7:= )
504 - resolvconf? ( net-dns/openresolv )
505 - connection-sharing? (
506 - net-dns/dnsmasq[dbus,dhcp]
507 - iptables? ( net-firewall/iptables )
508 - nftables? ( net-firewall/nftables )
509 - )
510 - psl? ( net-libs/libpsl )
511 - concheck? ( net-misc/curl )
512 - tools? (
513 - >=dev-libs/newt-0.52.15
514 - libedit? ( dev-libs/libedit )
515 - !libedit? ( sys-libs/readline:= )
516 - )
517 -"
518 -RDEPEND="${COMMON_DEPEND}
519 - acct-group/plugdev
520 - || (
521 - net-misc/iputils[arping(+)]
522 - net-analyzer/arping
523 - )
524 - wifi? (
525 - !iwd? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
526 - iwd? ( net-wireless/iwd )
527 - )
528 -"
529 -DEPEND="${COMMON_DEPEND}
530 - >=sys-kernel/linux-headers-3.18
531 - net-libs/libndp[${MULTILIB_USEDEP}]
532 -"
533 -BDEPEND="
534 - dev-util/gdbus-codegen
535 - dev-util/glib-utils
536 - gtk-doc? (
537 - dev-util/gtk-doc
538 - app-text/docbook-xml-dtd:4.1.2
539 - )
540 - >=dev-util/intltool-0.40
541 - >=sys-devel/gettext-0.17
542 - virtual/pkgconfig
543 - introspection? (
544 - $(python_gen_any_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]')
545 - dev-lang/perl
546 - dev-libs/libxslt
547 - )
548 - vala? ( $(vala_depend) )
549 - test? (
550 - >=dev-libs/jansson-2.7
551 - $(python_gen_any_dep '
552 - dev-python/dbus-python[${PYTHON_USEDEP}]
553 - dev-python/pygobject:3[${PYTHON_USEDEP}]')
554 - )
555 -"
556 -
557 -python_check_deps() {
558 - if use introspection; then
559 - has_version -b "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return
560 - fi
561 - if use test; then
562 - has_version -b "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
563 - has_version -b "dev-python/pygobject:3[${PYTHON_USEDEP}]"
564 - fi
565 -}
566 -
567 -sysfs_deprecated_check() {
568 - ebegin "Checking for SYSFS_DEPRECATED support"
569 -
570 - if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
571 - eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
572 - eerror "or NetworkManager will not work correctly."
573 - eerror "See https://bugs.gentoo.org/333639 for more info."
574 - die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
575 - fi
576 - eend $?
577 -}
578 -
579 -pkg_pretend() {
580 - if use kernel_linux; then
581 - get_version
582 - if linux_config_exists; then
583 - sysfs_deprecated_check
584 - else
585 - ewarn "Was unable to determine your kernel .config"
586 - ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
587 - ewarn "See https://bugs.gentoo.org/333639 for more info."
588 - fi
589 - fi
590 -}
591 -
592 -pkg_setup() {
593 - if use connection-sharing; then
594 - if kernel_is lt 5 1; then
595 - CONFIG_CHECK="~NF_NAT_IPV4 ~NF_NAT_MASQUERADE_IPV4"
596 - else
597 - CONFIG_CHECK="~NF_NAT ~NF_NAT_MASQUERADE"
598 - fi
599 - linux-info_pkg_setup
600 - fi
601 -
602 - if use introspection || use test; then
603 - python-any-r1_pkg_setup
604 - fi
605 -
606 - # bug 809695
607 - if tc-is-clang && use lto; then
608 - eerror "Clang does not support -flto-partition"
609 - die "Please use gcc or turn off USE=lto flag when building with clang"
610 - fi
611 -}
612 -
613 -src_prepare() {
614 - DOC_CONTENTS="To modify system network connections without needing to enter the
615 - root password, add your user account to the 'plugdev' group."
616 -
617 - default
618 - use vala && vala_setup
619 -
620 - sed -i \
621 - -e 's#/usr/bin/sed#/bin/sed#' \
622 - data/84-nm-drivers.rules \
623 - || die
624 -}
625 -
626 -meson_nm_program() {
627 - usex "$1" "-D${2:-$1}=$3" "-D${2:-$1}=no"
628 -}
629 -
630 -meson_nm_native_program() {
631 - multilib_native_usex "$1" "-D${2:-$1}=$3" "-D${2:-$1}=no"
632 -}
633 -
634 -multilib_src_configure() {
635 - local emesonargs=(
636 - --localstatedir="${EPREFIX}/var"
637 -
638 - -Dsystemdsystemunitdir=$(systemd_get_systemunitdir)
639 - -Dsystem_ca_path=/etc/ssl/certs
640 - -Dudev_dir=$(get_udevdir)
641 - -Ddbus_conf_dir=/usr/share/dbus-1/system.d
642 - -Dkernel_firmware_dir=/lib/firmware
643 - -Diptables=/sbin/iptables
644 - -Dnft=/sbin/nft
645 - -Ddnsmasq=/usr/sbin/dnsmasq
646 - #-Ddnssec_trigger=
647 -
648 - -Ddist_version=${PVR}
649 - $(meson_native_use_bool policykit polkit)
650 - $(meson_native_use_bool policykit config_auth_polkit_default)
651 - -Dmodify_system=true
652 - -Dpolkit_agent_helper_1=/usr/lib/polkit-1/polkit-agent-helper-1
653 - $(meson_native_use_bool selinux)
654 - $(meson_native_use_bool systemd systemd_journal)
655 - -Dhostname_persist=gentoo
656 - -Dlibaudit=$(multilib_native_usex audit)
657 -
658 - $(meson_native_use_bool wext)
659 - $(meson_native_use_bool wifi)
660 - $(meson_native_use_bool iwd)
661 - $(meson_native_use_bool ppp)
662 - -Dpppd=/usr/sbin/pppd
663 - $(meson_native_use_bool modemmanager modem_manager)
664 - $(meson_native_use_bool ofono)
665 - $(meson_native_use_bool concheck)
666 - $(meson_native_use_bool teamd teamdctl)
667 - $(meson_native_use_bool ovs)
668 - $(meson_native_use_bool tools nmcli)
669 - $(meson_native_use_bool tools nmtui)
670 - $(meson_native_use_bool tools nm_cloud_setup)
671 - $(meson_native_use_bool bluetooth bluez5_dun)
672 - -Debpf=true
673 -
674 - -Dconfig_wifi_backend_default=$(multilib_native_usex iwd iwd default)
675 - -Dconfig_plugins_default=keyfile
676 - -Difcfg_rh=false
677 - -Difupdown=false
678 -
679 - $(meson_nm_native_program resolvconf "" /sbin/resolvconf)
680 - -Dnetconfig=no
681 - -Dconfig_dns_rc_manager_default=auto
682 -
683 - $(meson_nm_program dhclient "" /sbin/dhclient)
684 - -Ddhcpcanon=no
685 - $(meson_nm_program dhcpcd "" /sbin/dhcpcd)
686 -
687 - $(meson_native_use_bool introspection)
688 - $(meson_native_use_bool vala vapi)
689 - $(meson_native_use_bool gtk-doc docs)
690 - -Dtests=$(multilib_native_usex test)
691 - $(meson_native_true firewalld_zone)
692 - -Dmore_asserts=0
693 - $(meson_use debug more_logging)
694 - -Dvalgrind=no
695 - -Dvalgrind_suppressions=
696 - -Dld_gc=false
697 - $(meson_native_use_bool psl libpsl)
698 - -Dqt=false
699 -
700 - $(meson_use lto b_lto)
701 - )
702 -
703 - if multilib_is_native_abi && use systemd; then
704 - emesonargs+=( -Dsession_tracking_consolekit=false )
705 - emesonargs+=( -Dsession_tracking=systemd )
706 - emesonargs+=( -Dsuspend_resume=systemd )
707 - elif multilib_is_native_abi && use elogind; then
708 - emesonargs+=( -Dsession_tracking_consolekit=false )
709 - emesonargs+=( -Dsession_tracking=elogind )
710 - emesonargs+=( -Dsuspend_resume=elogind )
711 - else
712 - emesonargs+=( -Dsession_tracking_consolekit=false )
713 - emesonargs+=( -Dsession_tracking=no )
714 - emesonargs+=( -Dsuspend_resume=auto )
715 - fi
716 -
717 - if multilib_is_native_abi && use syslog; then
718 - emesonargs+=( -Dconfig_logging_backend_default=syslog )
719 - elif multilib_is_native_abi && use systemd; then
720 - emesonargs+=( -Dconfig_logging_backend_default=journal )
721 - else
722 - emesonargs+=( -Dconfig_logging_backend_default=default )
723 - fi
724 -
725 - if multilib_is_native_abi && use dhclient; then
726 - emesonargs+=( -Dconfig_dhcp_default=dhclient )
727 - elif multilib_is_native_abi && use dhcpcd; then
728 - emesonargs+=( -Dconfig_dhcp_default=dhcpcd )
729 - else
730 - emesonargs+=( -Dconfig_dhcp_default=internal )
731 - fi
732 -
733 - if use nss; then
734 - emesonargs+=( -Dcrypto=nss )
735 - else
736 - emesonargs+=( -Dcrypto=gnutls )
737 - fi
738 -
739 - if use tools ; then
740 - emesonargs+=( -Dreadline=$(usex libedit libedit libreadline) )
741 - else
742 - emesonargs+=( -Dreadline=none )
743 - fi
744 -
745 - # Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
746 - if use ppp; then
747 - local PPPD_VER=`best_version net-dialup/ppp`
748 - PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
749 - PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
750 - emesonargs+=( -Dpppd_plugin_dir=/usr/$(get_libdir)/pppd/${PPPD_VER} )
751 - fi
752 -
753 - meson_src_configure
754 -}
755 -
756 -multilib_src_test() {
757 - if use test && multilib_is_native_abi; then
758 - python_setup
759 - virtx meson_src_test
760 - fi
761 -}
762 -
763 -multilib_src_install() {
764 - meson_src_install
765 - if ! multilib_is_native_abi; then
766 - rm -r "${ED}"/{etc,usr/{bin,lib/NetworkManager,share},var} || die
767 - fi
768 -}
769 -
770 -multilib_src_install_all() {
771 - ! use systemd && readme.gentoo_create_doc
772 -
773 - newinitd "${FILESDIR}/init.d.NetworkManager-r2" NetworkManager
774 - newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
775 -
776 - # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
777 - keepdir /etc/NetworkManager/dispatcher.d
778 -
779 - # Provide openrc net dependency only when nm is connected
780 - exeinto /etc/NetworkManager/dispatcher.d
781 - newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
782 - sed -e "s:@EPREFIX@:${EPREFIX}:g" \
783 - -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
784 -
785 - keepdir /etc/NetworkManager/system-connections
786 - chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594
787 -
788 - # Allow users in plugdev group to modify system connections
789 - insinto /usr/share/polkit-1/rules.d/
790 - doins "${FILESDIR}"/01-org.freedesktop.NetworkManager.settings.modify.system.rules
791 -
792 - insinto /usr/lib/NetworkManager/conf.d #702476
793 - doins "${S}"/examples/nm-conf.d/31-mac-addr-change.conf
794 -
795 - if use iwd; then
796 - # This goes to $nmlibdir/conf.d/ and $nmlibdir is '${prefix}'/lib/$PACKAGE, thus always lib, not get_libdir
797 - cat <<-EOF > "${ED}"/usr/lib/NetworkManager/conf.d/iwd.conf || die
798 - [device]
799 - wifi.backend=iwd
800 - EOF
801 - fi
802 -
803 - mv "${ED}"/usr/share/doc/{NetworkManager/examples/,${PF}} || die
804 - rmdir "${ED}"/usr/share/doc/NetworkManager || die
805 -
806 - # Empty
807 - rmdir "${ED}"/var{/lib{/NetworkManager,},} || die
808 -}
809 -
810 -pkg_postinst() {
811 - systemd_reenable NetworkManager.service
812 - ! use systemd && readme.gentoo_print_elog
813 -
814 - if [[ -e "${EROOT}/etc/NetworkManager/nm-system-settings.conf" ]]; then
815 - ewarn "The ${PN} system configuration file has moved to a new location."
816 - ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
817 - ewarn "to ${EROOT}/etc/NetworkManager/NetworkManager.conf"
818 - ewarn
819 - ewarn "After doing so, you can remove ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
820 - fi
821 -
822 - # NM fallbacks to plugin specified at compile time (upstream bug #738611)
823 - # but still show a warning to remember people to have cleaner config file
824 - if [[ -e "${EROOT}/etc/NetworkManager/NetworkManager.conf" ]]; then
825 - if grep plugins "${EROOT}/etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
826 - ewarn
827 - ewarn "You seem to use 'ifnet' plugin in ${EROOT}/etc/NetworkManager/NetworkManager.conf"
828 - ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
829 - ewarn
830 - fi
831 - fi
832 -
833 - # NM shows lots of errors making nmcli almost unusable, bug #528748 upstream bug #690457
834 - if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
835 - ewarn "You have psk-flags=1 setting in above files, you will need to"
836 - ewarn "either reconfigure affected networks or, at least, set the flag"
837 - ewarn "value to '0'."
838 - fi
839 -
840 - if use dhclient || use dhcpcd; then
841 - ewarn "You have enabled USE=dhclient and/or USE=dhcpcd, but NetworkManager since"
842 - ewarn "version 1.20 defaults to the internal DHCP client. If the internal client"
843 - ewarn "works for you, and you're happy with, the alternative USE flags can be"
844 - ewarn "disabled. If you want to use dhclient or dhcpcd, then you need to tweak"
845 - ewarn "the main.dhcp configuration option to use one of them instead of internal."
846 - fi
847 -}