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: Sun, 22 Aug 2021 19:35:55
Message-Id: 1629660153.5c70e9b2513b1c3fd530350ad0b91fc9421b21de.mattst88@gentoo
1 commit: 5c70e9b2513b1c3fd530350ad0b91fc9421b21de
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 22 05:35:28 2021 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 22 19:22:33 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c70e9b2
7
8 net-misc/networkmanager: Version bump to 1.32.10
9
10 * switch to Meson
11 * Add IUSE="conncheck debug psl lto syslog tools"
12 * Remove IUSE="ncurses" (replaced by USE="tools"), bug #798483
13
14 Closes: https://bugs.gentoo.org/784494
15 Closes: https://bugs.gentoo.org/796467
16 Closes: https://bugs.gentoo.org/798483
17 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
18
19 net-misc/networkmanager/Manifest | 1 +
20 net-misc/networkmanager/metadata.xml | 8 +
21 .../networkmanager/networkmanager-1.32.10.ebuild | 382 +++++++++++++++++++++
22 3 files changed, 391 insertions(+)
23
24 diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest
25 index 47eba2bb7b4..ed45bf2e7b6 100644
26 --- a/net-misc/networkmanager/Manifest
27 +++ b/net-misc/networkmanager/Manifest
28 @@ -1,4 +1,5 @@
29 DIST NetworkManager-1.30.4.tar.xz 5303420 BLAKE2B c2d81fe03f75f4afd05cac06741d9e7fb0d2892bad30462788a39d9c84afd056614e8f8d3371f15f4de7398cc40a32861814498fc36911c43bbe8e43f5053cde SHA512 ca42907d0c0fc6a981d94798a5e264dd58c7d11576a8dd52c8ef6799334af46848091d872e9cec553714766c51457cbe12c5c2017eaac63abce968823b047624
30 +DIST NetworkManager-1.32.10.tar.xz 5353296 BLAKE2B af176abd4dd8f725741cc8fde10245606d1b00cb6b11cde11b2e3bce74a33980fdf76fab5c6c769a4275c5168098cb2531a0a03909db8eef5fa502d464d59bd1 SHA512 c4eb9114869efba197c3ec1e99d7d5bc54222d9c7118cf699fe61130952a20376a760b86909290d6312a4a23016d51f9ff90ba8eadbbcda84ce811e441293d8d
31 DIST NetworkManager-1.32.2.tar.xz 5242372 BLAKE2B d19dbbb86cafd29023e0bd1b3a1ce69580d769d77a993b5e0db6cc526de7b1cce573e74c96483bf88c3a45f3ac7d4831a27d1efb1d8414cc8dd6e5671bdbf4f3 SHA512 9c7891a1106ebf333344818d29810ae182b284d1966760ec79bafa0618378a5ca68d58ec941357328ae8d4a43473f3916d62e4cfa316a46532773326312c0cc1
32 DIST NetworkManager-1.32.4.tar.xz 5250412 BLAKE2B 6c0931d50a8666f88865d4ca5281e1570dd230156e30bb27822c9ea3d93b3b3b24f336e154787794e7edd7c00296f9f7c5761136cac0c0eacf142a0371cbfe81 SHA512 95be90d4c8f8f9f58a3c7ad8d8c9b592d2b77f283df58b495fe1b673c4fadd4409f4fc00fc9766343e3ac240dd805583db4f05e6d1f0b367fe22b306227fc684
33 DIST NetworkManager-1.32.6.tar.xz 5254712 BLAKE2B 44c3019ba6b04552e67f31e9c069754f627f9f97a9ed110ce662dff033c7e8c009bed55da15cd4df592f0edf2c44f445f2733307f06ffbc4c5a946e05c3f26a3 SHA512 7556e8c3934a83320646336bcaffc010a91258c1ab669596e4b7ece98eb35e1d1ae625bca0de3781638e0a186656de61d554ef8722beea6bc29cdb0c70314b1d
34
35 diff --git a/net-misc/networkmanager/metadata.xml b/net-misc/networkmanager/metadata.xml
36 index 70f8a3206ee..e5c4a40c8ca 100644
37 --- a/net-misc/networkmanager/metadata.xml
38 +++ b/net-misc/networkmanager/metadata.xml
39 @@ -6,6 +6,7 @@
40 <name>Gentoo GNOME Desktop</name>
41 </maintainer>
42 <use>
43 + <flag name="concheck">Enable connectivity checking support</flag>
44 <flag name="connection-sharing">
45 Support connection sharing (uses <pkg>net-dns/dnsmasq</pkg>)
46 </flag>
47 @@ -23,6 +24,10 @@
48 Use <pkg>net-wireless/iwd</pkg> instead of
49 <pkg>net-wireless/wpa_supplicant</pkg> for wifi support by default
50 </flag>
51 + <flag name="psl">
52 + Use public suffix list via <pkg>net-libs/libpsl</pkg>
53 + </flag>
54 + <flag name="lto">Build using Link Time Optimizations (LTO)</flag>
55 <flag name="modemmanager">
56 Enable support for mobile broadband devices using
57 <pkg>net-misc/modemmanager</pkg>
58 @@ -44,6 +49,9 @@
59 create a symlink to /run/systemd/resolve/stub-resolv.conf.
60 </flag>
61 <flag name="teamd">Enable Teamd control support</flag>
62 + <flag name="tools">
63 + Build cli tools such as nmcli, nmtui and nm_cloud_setup
64 + </flag>
65 <flag name="wifi">Enable support for wifi and 802.1x security</flag>
66 <flag name="wext">
67 Enable support for the deprecated Wext (Wireless Extensions) API; needed
68
69 diff --git a/net-misc/networkmanager/networkmanager-1.32.10.ebuild b/net-misc/networkmanager/networkmanager-1.32.10.ebuild
70 new file mode 100644
71 index 00000000000..86e790b61b6
72 --- /dev/null
73 +++ b/net-misc/networkmanager/networkmanager-1.32.10.ebuild
74 @@ -0,0 +1,382 @@
75 +# Copyright 1999-2021 Gentoo Authors
76 +# Distributed under the terms of the GNU General Public License v2
77 +
78 +EAPI=7
79 +GNOME_ORG_MODULE="NetworkManager"
80 +VALA_USE_DEPEND="vapigen"
81 +PYTHON_COMPAT=( python3_{7..10} )
82 +
83 +inherit gnome.org linux-info meson-multilib python-any-r1 systemd readme.gentoo-r1 vala virtualx udev
84 +
85 +DESCRIPTION="A set of co-operative tools that make networking simple and straightforward"
86 +HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
87 +
88 +LICENSE="GPL-2+ LGPL-2.1+"
89 +SLOT="0"
90 +
91 +IUSE="audit bluetooth +concheck connection-sharing debug dhclient dhcpcd elogind gnutls +introspection iptables iwd kernel_linux psl lto +nss nftables +modemmanager ofono ovs policykit +ppp resolvconf selinux syslog systemd teamd test +tools vala +wext +wifi"
92 +RESTRICT="!test? ( test )"
93 +
94 +REQUIRED_USE="
95 + bluetooth? ( modemmanager )
96 + connection-sharing? ( || ( iptables nftables ) )
97 + iwd? ( wifi )
98 + vala? ( introspection )
99 + wext? ( wifi )
100 + ^^ ( gnutls nss )
101 + ?? ( elogind systemd )
102 + ?? ( dhclient dhcpcd )
103 + ?? ( syslog systemd )
104 +"
105 +
106 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
107 +
108 +COMMON_DEPEND="
109 + sys-apps/util-linux[${MULTILIB_USEDEP}]
110 + elogind? ( >=sys-auth/elogind-219 )
111 + >=virtual/libudev-175:=[${MULTILIB_USEDEP}]
112 + sys-apps/dbus
113 + net-libs/libndp
114 + systemd? ( >=sys-apps/systemd-209:0= )
115 + >=dev-libs/glib-2.40:2[${MULTILIB_USEDEP}]
116 + introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
117 + selinux? ( sys-libs/libselinux )
118 + audit? ( sys-process/audit )
119 + teamd? (
120 + >=dev-libs/jansson-2.7
121 + >=net-misc/libteam-1.9
122 + )
123 + policykit? ( >=sys-auth/polkit-0.106 )
124 + nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
125 + gnutls? (
126 + >=net-libs/gnutls-2.12:=[${MULTILIB_USEDEP}]
127 + )
128 + ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] )
129 + modemmanager? (
130 + net-misc/mobile-broadband-provider-info
131 + >=net-misc/modemmanager-0.7.991:0=
132 + )
133 + bluetooth? ( >=net-wireless/bluez-5 )
134 + ofono? ( net-misc/ofono )
135 + dhclient? ( >=net-misc/dhcp-4[client] )
136 + dhcpcd? ( >=net-misc/dhcpcd-9.3.3 )
137 + ovs? ( >=dev-libs/jansson-2.7 )
138 + resolvconf? ( net-dns/openresolv )
139 + connection-sharing? (
140 + net-dns/dnsmasq[dbus,dhcp]
141 + iptables? ( net-firewall/iptables )
142 + nftables? ( net-firewall/nftables )
143 + )
144 + psl? ( net-libs/libpsl )
145 + concheck? ( net-misc/curl )
146 + tools? (
147 + sys-libs/readline:0=
148 + >=dev-libs/newt-0.52.15
149 + )
150 +"
151 +RDEPEND="${COMMON_DEPEND}
152 + acct-group/plugdev
153 + || (
154 + net-misc/iputils[arping(+)]
155 + net-analyzer/arping
156 + )
157 + wifi? (
158 + !iwd? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
159 + iwd? ( net-wireless/iwd )
160 + )
161 +"
162 +DEPEND="${COMMON_DEPEND}
163 + >=sys-kernel/linux-headers-3.18
164 + net-libs/libndp[${MULTILIB_USEDEP}]
165 +"
166 +BDEPEND="
167 + dev-util/gdbus-codegen
168 + dev-util/glib-utils
169 + dev-util/gtk-doc
170 + app-text/docbook-xml-dtd:4.1.2
171 + >=dev-util/intltool-0.40
172 + >=sys-devel/gettext-0.17
173 + virtual/pkgconfig
174 + introspection? (
175 + $(python_gen_any_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]')
176 + dev-lang/perl
177 + dev-libs/libxslt
178 + )
179 + vala? ( $(vala_depend) )
180 + test? (
181 + >=dev-libs/jansson-2.7
182 + $(python_gen_any_dep '
183 + dev-python/dbus-python[${PYTHON_USEDEP}]
184 + dev-python/pygobject:3[${PYTHON_USEDEP}]')
185 + )
186 +"
187 +
188 +python_check_deps() {
189 + if use introspection; then
190 + has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return
191 + fi
192 + if use test; then
193 + has_version "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
194 + has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]"
195 + fi
196 +}
197 +
198 +sysfs_deprecated_check() {
199 + ebegin "Checking for SYSFS_DEPRECATED support"
200 +
201 + if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
202 + eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
203 + eerror "or NetworkManager will not work correctly."
204 + eerror "See https://bugs.gentoo.org/333639 for more info."
205 + die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
206 + fi
207 + eend $?
208 +}
209 +
210 +pkg_pretend() {
211 + if use kernel_linux; then
212 + get_version
213 + if linux_config_exists; then
214 + sysfs_deprecated_check
215 + else
216 + ewarn "Was unable to determine your kernel .config"
217 + ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
218 + ewarn "See https://bugs.gentoo.org/333639 for more info."
219 + fi
220 + fi
221 +}
222 +
223 +pkg_setup() {
224 + if use connection-sharing; then
225 + if kernel_is lt 5 1; then
226 + CONFIG_CHECK="~NF_NAT_IPV4 ~NF_NAT_MASQUERADE_IPV4"
227 + else
228 + CONFIG_CHECK="~NF_NAT ~NF_NAT_MASQUERADE"
229 + fi
230 + linux-info_pkg_setup
231 + fi
232 + if use introspection || use test; then
233 + python-any-r1_pkg_setup
234 + fi
235 +}
236 +
237 +src_prepare() {
238 + DOC_CONTENTS="To modify system network connections without needing to enter the
239 + root password, add your user account to the 'plugdev' group."
240 +
241 + default
242 + use vala && vala_src_prepare
243 +
244 + sed -i \
245 + -e 's#/usr/bin/sed#/bin/sed#' \
246 + data/84-nm-drivers.rules \
247 + || die
248 +}
249 +
250 +multilib_src_configure() {
251 + local emesonargs=(
252 + --localstatedir="${EPREFIX}/var"
253 +
254 + -Dsystemdsystemunitdir=$(systemd_get_systemunitdir)
255 + -Dsystem_ca_path=/etc/ssl/certs
256 + -Dudev_dir=$(get_udevdir)
257 + -Ddbus_conf_dir=/usr/share/dbus-1/system.d
258 + -Dkernel_firmware_dir=/lib/firmware
259 + -Diptables=/sbin/iptables
260 + -Dnft=/sbin/nft
261 + -Ddnsmasq=/usr/sbin/dnsmasq
262 + #-Ddnssec_trigger=
263 +
264 + -Ddist_version=${PVR}
265 + $(meson_native_use_bool policykit polkit)
266 + $(meson_native_use_bool policykit config_auth_polkit_default)
267 + -Dmodify_system=true
268 + -Dpolkit_agent_helper_1=/usr/lib/polkit-1/polkit-agent-helper-1
269 + $(meson_native_use_bool selinux)
270 + $(meson_native_use_bool systemd systemd_journal)
271 + -Dhostname_persist=gentoo
272 + -Dlibaudit=$(multilib_native_usex audit)
273 +
274 + $(meson_native_use_bool wext)
275 + $(meson_native_use_bool wifi)
276 + $(meson_native_use_bool iwd)
277 + $(meson_native_use_bool ppp)
278 + -Dpppd=/usr/sbin/pppd
279 + $(meson_native_use_bool modemmanager modem_manager)
280 + $(meson_native_use_bool ofono)
281 + $(meson_native_use_bool concheck)
282 + $(meson_native_use_bool teamd teamdctl)
283 + $(meson_native_use_bool ovs)
284 + $(meson_native_use_bool tools nmcli)
285 + $(meson_native_use_bool tools nmtui)
286 + $(meson_native_use_bool tools nm_cloud_setup)
287 + $(meson_native_use_bool bluetooth bluez5_dun)
288 + -Debpf=true
289 +
290 + -Dconfig_plugins_default=keyfile
291 + -Difcfg_rh=false
292 + -Difupdown=false
293 +
294 + $(meson_native_use_feature resolvconf)
295 + -Dnetconfig=disable
296 + -Dconfig_dns_rc_manager_default=symlink
297 +
298 + $(meson_feature dhclient)
299 + -Ddhcpcanon=disable
300 + $(meson_feature dhcpcd)
301 +
302 + $(meson_native_use_bool introspection)
303 + $(meson_native_use_bool vala vapi)
304 + $(meson_native_true docs)
305 + -Dtests=$(multilib_native_usex test)
306 + $(meson_native_true firewalld_zone)
307 + -Dmore_asserts=0
308 + $(meson_use debug more_logging)
309 + -Dvalgrind=no
310 + -Dvalgrind_suppressions=
311 + -Dld_gc=false
312 + $(meson_native_use_bool psl libpsl)
313 + -Dqt=false
314 +
315 + $(meson_use lto b_lto)
316 + )
317 +
318 + if multilib_is_native_abi && use systemd; then
319 + emesonargs+=( -Dsession_tracking_consolekit=false )
320 + emesonargs+=( -Dsession_tracking=systemd )
321 + emesonargs+=( -Dsuspend_resume=systemd )
322 + elif multilib_is_native_abi && use elogind; then
323 + emesonargs+=( -Dsession_tracking_consolekit=false )
324 + emesonargs+=( -Dsession_tracking=elogind )
325 + emesonargs+=( -Dsuspend_resume=elogind )
326 + else
327 + emesonargs+=( -Dsession_tracking_consolekit=false )
328 + emesonargs+=( -Dsession_tracking=no )
329 + emesonargs+=( -Dsuspend_resume=auto )
330 + fi
331 +
332 + if multilib_is_native_abi && use syslog; then
333 + emesonargs+=( -Dconfig_logging_backend_default=syslog )
334 + elif multilib_is_native_abi && use systemd; then
335 + emesonargs+=( -Dconfig_logging_backend_default=journal )
336 + else
337 + emesonargs+=( -Dconfig_logging_backend_default=default )
338 + fi
339 +
340 + if multilib_is_native_abi && use dhclient; then
341 + emesonargs+=( -Dconfig_dhcp_default=dhclient )
342 + elif multilib_is_native_abi && use dhcpcd; then
343 + emesonargs+=( -Dconfig_dhcp_default=dhcpcd )
344 + else
345 + emesonargs+=( -Dconfig_dhcp_default=internal )
346 + fi
347 +
348 + if use nss; then
349 + emesonargs+=( -Dcrypto=nss )
350 + else
351 + emesonargs+=( -Dcrypto=gnutls )
352 + fi
353 +
354 + # Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
355 + if use ppp; then
356 + local PPPD_VER=`best_version net-dialup/ppp`
357 + PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
358 + PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
359 + emesonargs+=( -Dpppd_plugin_dir=/usr/$(get_libdir)/pppd/${PPPD_VER} )
360 + fi
361 +
362 + meson_src_configure
363 +}
364 +
365 +multilib_src_test() {
366 + if use test && multilib_is_native_abi; then
367 + python_setup
368 + virtx meson_src_test
369 + fi
370 +}
371 +
372 +multilib_src_install() {
373 + meson_src_install
374 + if ! multilib_is_native_abi; then
375 + rm -rf "${ED}"/{etc,usr/{bin,lib/NetworkManager,share},var}
376 + fi
377 +}
378 +
379 +multilib_src_install_all() {
380 + ! use systemd && readme.gentoo_create_doc
381 +
382 + newinitd "${FILESDIR}/init.d.NetworkManager-r2" NetworkManager
383 + newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
384 +
385 + # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
386 + keepdir /etc/NetworkManager/dispatcher.d
387 +
388 + # Provide openrc net dependency only when nm is connected
389 + exeinto /etc/NetworkManager/dispatcher.d
390 + newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
391 + sed -e "s:@EPREFIX@:${EPREFIX}:g" \
392 + -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
393 +
394 + keepdir /etc/NetworkManager/system-connections
395 + chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594
396 +
397 + # Allow users in plugdev group to modify system connections
398 + insinto /usr/share/polkit-1/rules.d/
399 + doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
400 +
401 + insinto /usr/lib/NetworkManager/conf.d #702476
402 + doins "${S}"/examples/nm-conf.d/31-mac-addr-change.conf
403 +
404 + if use iwd; then
405 + # This goes to $nmlibdir/conf.d/ and $nmlibdir is '${prefix}'/lib/$PACKAGE, thus always lib, not get_libdir
406 + cat <<-EOF > "${ED}"/usr/lib/NetworkManager/conf.d/iwd.conf
407 + [device]
408 + wifi.backend=iwd
409 + EOF
410 + fi
411 +
412 + mv "${ED}"/usr/share/doc/{NetworkManager/examples/,${PF}} || die
413 + rmdir "${ED}"/usr/share/doc/NetworkManager || die
414 +
415 + # Empty
416 + rmdir "${ED}"/var{/lib{/NetworkManager,},} || die
417 +}
418 +
419 +pkg_postinst() {
420 + systemd_reenable NetworkManager.service
421 + ! use systemd && readme.gentoo_print_elog
422 +
423 + if [[ -e "${EROOT}/etc/NetworkManager/nm-system-settings.conf" ]]; then
424 + ewarn "The ${PN} system configuration file has moved to a new location."
425 + ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
426 + ewarn "to ${EROOT}/etc/NetworkManager/NetworkManager.conf"
427 + ewarn
428 + ewarn "After doing so, you can remove ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
429 + fi
430 +
431 + # NM fallbacks to plugin specified at compile time (upstream bug #738611)
432 + # but still show a warning to remember people to have cleaner config file
433 + if [[ -e "${EROOT}/etc/NetworkManager/NetworkManager.conf" ]]; then
434 + if grep plugins "${EROOT}/etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
435 + ewarn
436 + ewarn "You seem to use 'ifnet' plugin in ${EROOT}/etc/NetworkManager/NetworkManager.conf"
437 + ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
438 + ewarn
439 + fi
440 + fi
441 +
442 + # NM shows lots of errors making nmcli almost unusable, bug #528748 upstream bug #690457
443 + if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
444 + ewarn "You have psk-flags=1 setting in above files, you will need to"
445 + ewarn "either reconfigure affected networks or, at least, set the flag"
446 + ewarn "value to '0'."
447 + fi
448 +
449 + if use dhclient || use dhcpcd; then
450 + ewarn "You have enabled USE=dhclient and/or USE=dhcpcd, but NetworkManager since"
451 + ewarn "version 1.20 defaults to the internal DHCP client. If the internal client"
452 + ewarn "works for you, and you're happy with, the alternative USE flags can be"
453 + ewarn "disabled. If you want to use dhclient or dhcpcd, then you need to tweak"
454 + ewarn "the main.dhcp configuration option to use one of them instead of internal."
455 + fi
456 +}