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: Mon, 05 Jul 2021 20:20:25
Message-Id: 1625516415.6332f7a55b8afac8e7c24f48b488c147f35acf92.mattst88@gentoo
1 commit: 6332f7a55b8afac8e7c24f48b488c147f35acf92
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 5 19:28:11 2021 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 5 20:20:15 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6332f7a5
7
8 net-misc/networkmanager: Version bump to 1.32.2
9
10 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
11
12 net-misc/networkmanager/Manifest | 1 +
13 net-misc/networkmanager/metadata.xml | 58 ++--
14 .../networkmanager/networkmanager-1.32.2.ebuild | 349 +++++++++++++++++++++
15 3 files changed, 388 insertions(+), 20 deletions(-)
16
17 diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest
18 index 362a102a8c4..fe3d500f753 100644
19 --- a/net-misc/networkmanager/Manifest
20 +++ b/net-misc/networkmanager/Manifest
21 @@ -1 +1,2 @@
22 DIST NetworkManager-1.30.4.tar.xz 5303420 BLAKE2B c2d81fe03f75f4afd05cac06741d9e7fb0d2892bad30462788a39d9c84afd056614e8f8d3371f15f4de7398cc40a32861814498fc36911c43bbe8e43f5053cde SHA512 ca42907d0c0fc6a981d94798a5e264dd58c7d11576a8dd52c8ef6799334af46848091d872e9cec553714766c51457cbe12c5c2017eaac63abce968823b047624
23 +DIST NetworkManager-1.32.2.tar.xz 5242372 BLAKE2B d19dbbb86cafd29023e0bd1b3a1ce69580d769d77a993b5e0db6cc526de7b1cce573e74c96483bf88c3a45f3ac7d4831a27d1efb1d8414cc8dd6e5671bdbf4f3 SHA512 9c7891a1106ebf333344818d29810ae182b284d1966760ec79bafa0618378a5ca68d58ec941357328ae8d4a43473f3916d62e4cfa316a46532773326312c0cc1
24
25 diff --git a/net-misc/networkmanager/metadata.xml b/net-misc/networkmanager/metadata.xml
26 index bad2d1a41b7..70f8a3206ee 100644
27 --- a/net-misc/networkmanager/metadata.xml
28 +++ b/net-misc/networkmanager/metadata.xml
29 @@ -6,30 +6,48 @@
30 <name>Gentoo GNOME Desktop</name>
31 </maintainer>
32 <use>
33 - <flag name="connection-sharing">Use <pkg>net-dns/dnsmasq</pkg> and
34 - <pkg>net-firewall/iptables</pkg> for connection sharing</flag>
35 - <flag name="dhclient">Use dhclient from <pkg>net-misc/dhcp</pkg> for
36 - getting ip</flag>
37 - <flag name="dhcpcd">Use <pkg>net-misc/dhcpcd</pkg> for getting ip</flag>
38 - <flag name="elogind">Use <pkg>sys-auth/elogind</pkg> for session tracking</flag>
39 - <flag name="iwd">Use <pkg>net-wireless/iwd</pkg> instead of
40 - <pkg>net-wireless/wpa_supplicant</pkg> for wifi support by default</flag>
41 - <flag name="modemmanager">Enable support for mobile broadband devices
42 - using <pkg>net-misc/modemmanager</pkg></flag>
43 + <flag name="connection-sharing">
44 + Support connection sharing (uses <pkg>net-dns/dnsmasq</pkg>)
45 + </flag>
46 + <flag name="dhclient">
47 + Use dhclient from <pkg>net-misc/dhcp</pkg> for getting an IP via DHCP
48 + </flag>
49 + <flag name="dhcpcd">Use <pkg>net-misc/dhcpcd</pkg> for getting an IP</flag>
50 + <flag name="elogind">
51 + Use <pkg>sys-auth/elogind</pkg> for session tracking
52 + </flag>
53 + <flag name="iptables">
54 + Use <pkg>net-firewall/iptables</pkg> for connection sharing
55 + </flag>
56 + <flag name="iwd">
57 + Use <pkg>net-wireless/iwd</pkg> instead of
58 + <pkg>net-wireless/wpa_supplicant</pkg> for wifi support by default
59 + </flag>
60 + <flag name="modemmanager">
61 + Enable support for mobile broadband devices using
62 + <pkg>net-misc/modemmanager</pkg>
63 + </flag>
64 + <flag name="nftables">
65 + Use <pkg>net-firewall/nftables</pkg> for connection sharing
66 + </flag>
67 <flag name="nss">Use <pkg>dev-libs/nss</pkg> for cryptography</flag>
68 <flag name="ofono">Use <pkg>net-misc/ofono</pkg> for telephony support.</flag>
69 <flag name="ovs">Enable OpenVSwitch support</flag>
70 - <flag name="ppp">Enable support for mobile broadband and PPPoE
71 - connections using <pkg>net-dialup/ppp</pkg></flag>
72 - <flag name="resolvconf">Use <pkg>net-dns/openresolv</pkg> for managing
73 - DNS information in /etc/resolv.conf. Generally, a symlink to
74 - /run/NetworkManager/resolv.conf is simpler. On systems running
75 - systemd-resolved, disable this flag and create a symlink to
76 - /run/systemd/resolve/stub-resolv.conf.</flag>
77 + <flag name="ppp">
78 + Enable support for mobile broadband and PPPoE connections using
79 + <pkg>net-dialup/ppp</pkg>
80 + </flag>
81 + <flag name="resolvconf">
82 + Use <pkg>net-dns/openresolv</pkg> for managing DNS information in
83 + /etc/resolv.conf. Generally, a symlink to /run/NetworkManager/resolv.conf
84 + is simpler. On systems running systemd-resolved, disable this flag and
85 + create a symlink to /run/systemd/resolve/stub-resolv.conf.
86 + </flag>
87 <flag name="teamd">Enable Teamd control support</flag>
88 <flag name="wifi">Enable support for wifi and 802.1x security</flag>
89 - <flag name="wext">Enable support for the deprecated Wext (Wireless
90 - Extensions) API; needed for some older drivers (e.g. ipw2200,
91 - ndiswrapper)</flag>
92 + <flag name="wext">
93 + Enable support for the deprecated Wext (Wireless Extensions) API; needed
94 + for some older drivers (e.g. ipw2200, ndiswrapper)
95 + </flag>
96 </use>
97 </pkgmetadata>
98
99 diff --git a/net-misc/networkmanager/networkmanager-1.32.2.ebuild b/net-misc/networkmanager/networkmanager-1.32.2.ebuild
100 new file mode 100644
101 index 00000000000..6c937ab0b9b
102 --- /dev/null
103 +++ b/net-misc/networkmanager/networkmanager-1.32.2.ebuild
104 @@ -0,0 +1,349 @@
105 +# Copyright 1999-2021 Gentoo Authors
106 +# Distributed under the terms of the GNU General Public License v2
107 +
108 +EAPI=7
109 +GNOME_ORG_MODULE="NetworkManager"
110 +VALA_USE_DEPEND="vapigen"
111 +PYTHON_COMPAT=( python3_{7..10} )
112 +
113 +inherit bash-completion-r1 gnome2 linux-info multilib python-any-r1 systemd readme.gentoo-r1 vala virtualx udev multilib-minimal
114 +
115 +DESCRIPTION="A set of co-operative tools that make networking simple and straightforward"
116 +HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
117 +
118 +LICENSE="GPL-2+ LGPL-2.1+"
119 +SLOT="0"
120 +
121 +IUSE="audit bluetooth connection-sharing dhclient dhcpcd elogind gnutls +introspection iptables iwd kernel_linux +nss nftables +modemmanager ncurses ofono ovs policykit +ppp resolvconf selinux systemd teamd test vala +wext +wifi"
122 +RESTRICT="!test? ( test )"
123 +
124 +REQUIRED_USE="
125 + bluetooth? ( modemmanager )
126 + connection-sharing? ( || ( iptables nftables ) )
127 + iwd? ( wifi )
128 + vala? ( introspection )
129 + wext? ( wifi )
130 + || ( nss gnutls )
131 + ?? ( elogind systemd )
132 +"
133 +
134 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
135 +
136 +# gobject-introspection-0.10.3 is needed due to gnome bug 642300
137 +# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
138 +COMMON_DEPEND="
139 + >=dev-libs/glib-2.40:2[${MULTILIB_USEDEP}]
140 + policykit? ( >=sys-auth/polkit-0.106 )
141 + net-libs/libndp[${MULTILIB_USEDEP}]
142 + >=net-misc/curl-7.24
143 + net-misc/iputils
144 + sys-apps/util-linux[${MULTILIB_USEDEP}]
145 + sys-libs/readline:0=
146 + >=virtual/libudev-175:=[${MULTILIB_USEDEP}]
147 + audit? ( sys-process/audit )
148 + bluetooth? ( >=net-wireless/bluez-5 )
149 + connection-sharing? (
150 + net-dns/dnsmasq[dbus,dhcp]
151 + iptables? ( net-firewall/iptables )
152 + nftables? ( net-firewall/nftables )
153 + )
154 + dhclient? ( >=net-misc/dhcp-4[client] )
155 + dhcpcd? ( >=net-misc/dhcpcd-9.3.3 )
156 + elogind? ( >=sys-auth/elogind-219 )
157 + introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
158 + modemmanager? ( >=net-misc/modemmanager-0.7.991:0=
159 + net-misc/mobile-broadband-provider-info )
160 + ncurses? ( >=dev-libs/newt-0.52.15 )
161 + nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
162 + !nss? ( gnutls? (
163 + dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}]
164 + >=net-libs/gnutls-2.12:=[${MULTILIB_USEDEP}] ) )
165 + ofono? ( net-misc/ofono )
166 + ovs? ( dev-libs/jansson )
167 + ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] )
168 + resolvconf? ( net-dns/openresolv )
169 + selinux? ( sys-libs/libselinux )
170 + systemd? ( >=sys-apps/systemd-209:0= )
171 + teamd? (
172 + dev-libs/jansson
173 + >=net-misc/libteam-1.9
174 + )
175 +"
176 +RDEPEND="${COMMON_DEPEND}
177 + acct-group/plugdev
178 + || (
179 + net-misc/iputils[arping(+)]
180 + net-analyzer/arping
181 + )
182 + wifi? (
183 + !iwd? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
184 + iwd? ( net-wireless/iwd )
185 + )
186 +"
187 +DEPEND="${COMMON_DEPEND}
188 + >=sys-kernel/linux-headers-3.18
189 + "
190 +BDEPEND="
191 + dev-util/gdbus-codegen
192 + dev-util/glib-utils
193 + dev-util/gtk-doc-am
194 + >=dev-util/intltool-0.40
195 + >=sys-devel/gettext-0.17
196 + virtual/pkgconfig
197 + introspection? (
198 + $(python_gen_any_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]')
199 + dev-lang/perl
200 + dev-libs/libxslt
201 + )
202 + vala? ( $(vala_depend) )
203 + test? (
204 + $(python_gen_any_dep '
205 + dev-python/dbus-python[${PYTHON_USEDEP}]
206 + dev-python/pygobject:3[${PYTHON_USEDEP}]')
207 + )
208 +"
209 +
210 +python_check_deps() {
211 + if use introspection; then
212 + has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return
213 + fi
214 + if use test; then
215 + has_version "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
216 + has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]"
217 + fi
218 +}
219 +
220 +sysfs_deprecated_check() {
221 + ebegin "Checking for SYSFS_DEPRECATED support"
222 +
223 + if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
224 + eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
225 + eerror "or NetworkManager will not work correctly."
226 + eerror "See https://bugs.gentoo.org/333639 for more info."
227 + die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
228 + fi
229 + eend $?
230 +}
231 +
232 +pkg_pretend() {
233 + if use kernel_linux; then
234 + get_version
235 + if linux_config_exists; then
236 + sysfs_deprecated_check
237 + else
238 + ewarn "Was unable to determine your kernel .config"
239 + ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
240 + ewarn "See https://bugs.gentoo.org/333639 for more info."
241 + fi
242 +
243 + fi
244 +}
245 +
246 +pkg_setup() {
247 + if use connection-sharing; then
248 + if kernel_is lt 5 1; then
249 + CONFIG_CHECK="~NF_NAT_IPV4 ~NF_NAT_MASQUERADE_IPV4"
250 + else
251 + CONFIG_CHECK="~NF_NAT ~NF_NAT_MASQUERADE"
252 + fi
253 + linux-info_pkg_setup
254 + fi
255 + if use introspection || use test; then
256 + python-any-r1_pkg_setup
257 + fi
258 +}
259 +
260 +src_prepare() {
261 + DOC_CONTENTS="To modify system network connections without needing to enter the
262 + root password, add your user account to the 'plugdev' group."
263 +
264 + use vala && vala_src_prepare
265 + gnome2_src_prepare
266 +
267 + sed -i \
268 + -e 's#/usr/bin/sed#/bin/sed#' \
269 + data/84-nm-drivers.rules \
270 + || die
271 +}
272 +
273 +multilib_src_configure() {
274 + local myconf=(
275 + --disable-more-warnings
276 + --disable-static
277 + --localstatedir=/var
278 + --with-runstatedir=/run
279 + --disable-lto
280 + --disable-qt
281 + --without-netconfig
282 + --with-dbus-sys-dir=/etc/dbus-1/system.d
283 + $(multilib_native_with nmcli)
284 + --with-udev-dir="$(get_udevdir)"
285 + --with-config-plugins-default=keyfile
286 + --with-iptables=/sbin/iptables
287 + --with-nft=/sbin/nft
288 + --with-ebpf=yes
289 + $(multilib_native_enable concheck)
290 + --with-nm-cloud-setup=$(multilib_is_native_abi && echo yes || echo no)
291 + --with-crypto=$(usex nss nss gnutls)
292 + # elogind lacks multilib for now, and consolekit doesn't require linking against, so we use it as a fake option
293 + # This SHOULD be removable once elogind has that. We abuse the fact that 'consolekit' does nothing at buildtime.
294 + # (There is no off switch, and we do not support upower.)
295 + # bug #747358
296 + --with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind consolekit))
297 + --with-suspend-resume=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind consolekit))
298 + $(multilib_native_use_with audit libaudit)
299 + $(multilib_native_use_enable bluetooth bluez5-dun)
300 + --without-dhcpcanon
301 + $(use_with dhclient)
302 + $(use_with dhcpcd)
303 + --with-config-dhcp-default=internal
304 + $(multilib_native_use_enable introspection)
305 + $(multilib_native_use_enable ppp)
306 + --without-libpsl
307 + $(multilib_native_use_with modemmanager modem-manager-1)
308 + $(multilib_native_use_with ncurses nmtui)
309 + $(multilib_native_use_with ofono)
310 + $(multilib_native_use_enable ovs)
311 + $(multilib_native_use_enable policykit polkit)
312 + $(multilib_native_use_with resolvconf)
313 + $(multilib_native_use_with selinux)
314 + $(multilib_native_use_with systemd systemd-journal)
315 + $(multilib_native_use_enable teamd teamdctl)
316 + $(multilib_native_use_enable test tests)
317 + $(multilib_native_use_enable vala)
318 + --without-valgrind
319 + $(multilib_native_use_with wifi iwd)
320 + $(multilib_native_use_with wext)
321 + $(multilib_native_use_enable wifi)
322 + )
323 +
324 + # Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
325 + if use ppp; then
326 + local PPPD_VER=`best_version net-dialup/ppp`
327 + PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
328 + PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
329 + myconf+=( --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER} )
330 + fi
331 +
332 + # unit files directory needs to be passed only when systemd is enabled,
333 + # otherwise systemd support is not disabled completely, bug #524534
334 + use systemd && myconf+=( --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" )
335 +
336 + if multilib_is_native_abi; then
337 + # work-around man out-of-source brokenness, must be done before configure
338 + ln -s "${S}/docs" docs || die
339 + ln -s "${S}/man" man || die
340 + fi
341 +
342 + ECONF_SOURCE=${S} gnome2_src_configure "${myconf[@]}"
343 +}
344 +
345 +multilib_src_compile() {
346 + if multilib_is_native_abi; then
347 + emake
348 + else
349 + local targets=(
350 + libnm/libnm.la
351 + )
352 + emake "${targets[@]}"
353 + fi
354 +}
355 +
356 +multilib_src_test() {
357 + if use test && multilib_is_native_abi; then
358 + python_setup
359 + virtx emake check
360 + fi
361 +}
362 +
363 +multilib_src_install() {
364 + if multilib_is_native_abi; then
365 + # Install completions at proper place, bug #465100
366 + gnome2_src_install completiondir="$(get_bashcompdir)"
367 + insinto /usr/lib/NetworkManager/conf.d #702476
368 + doins "${S}"/examples/nm-conf.d/31-mac-addr-change.conf
369 + else
370 + local targets=(
371 + install-libLTLIBRARIES
372 + install-libnmincludeHEADERS
373 + install-nodist_libnmincludeHEADERS
374 + install-pkgconfigDATA
375 + )
376 + emake DESTDIR="${D}" "${targets[@]}"
377 + fi
378 +}
379 +
380 +multilib_src_install_all() {
381 + einstalldocs
382 + ! use systemd && readme.gentoo_create_doc
383 +
384 + newinitd "${FILESDIR}/init.d.NetworkManager-r2" NetworkManager
385 + newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
386 +
387 + # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
388 + keepdir /etc/NetworkManager/dispatcher.d
389 +
390 + # Provide openrc net dependency only when nm is connected
391 + exeinto /etc/NetworkManager/dispatcher.d
392 + newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
393 + sed -e "s:@EPREFIX@:${EPREFIX}:g" \
394 + -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
395 +
396 + keepdir /etc/NetworkManager/system-connections
397 + chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594
398 +
399 + # Allow users in plugdev group to modify system connections
400 + insinto /usr/share/polkit-1/rules.d/
401 + doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
402 +
403 + if use iwd; then
404 + # This goes to $nmlibdir/conf.d/ and $nmlibdir is '${prefix}'/lib/$PACKAGE, thus always lib, not get_libdir
405 + cat <<-EOF > "${ED}"/usr/lib/NetworkManager/conf.d/iwd.conf
406 + [device]
407 + wifi.backend=iwd
408 + EOF
409 + fi
410 +
411 + # Empty
412 + rmdir "${ED}"/var{/lib{/NetworkManager,},} || die
413 +}
414 +
415 +pkg_postinst() {
416 + gnome2_pkg_postinst
417 + systemd_reenable NetworkManager.service
418 + ! use systemd && readme.gentoo_print_elog
419 +
420 + if [[ -e "${EROOT}/etc/NetworkManager/nm-system-settings.conf" ]]; then
421 + ewarn "The ${PN} system configuration file has moved to a new location."
422 + ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
423 + ewarn "to ${EROOT}/etc/NetworkManager/NetworkManager.conf"
424 + ewarn
425 + ewarn "After doing so, you can remove ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
426 + fi
427 +
428 + # NM fallbacks to plugin specified at compile time (upstream bug #738611)
429 + # but still show a warning to remember people to have cleaner config file
430 + if [[ -e "${EROOT}/etc/NetworkManager/NetworkManager.conf" ]]; then
431 + if grep plugins "${EROOT}/etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
432 + ewarn
433 + ewarn "You seem to use 'ifnet' plugin in ${EROOT}/etc/NetworkManager/NetworkManager.conf"
434 + ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
435 + ewarn
436 + fi
437 + fi
438 +
439 + # NM shows lots of errors making nmcli almost unusable, bug #528748 upstream bug #690457
440 + if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
441 + ewarn "You have psk-flags=1 setting in above files, you will need to"
442 + ewarn "either reconfigure affected networks or, at least, set the flag"
443 + ewarn "value to '0'."
444 + fi
445 +
446 + if use dhclient || use dhcpcd; then
447 + ewarn "You have enabled USE=dhclient and/or USE=dhcpcd, but NetworkManager since"
448 + ewarn "version 1.20 defaults to the internal DHCP client. If the internal client"
449 + ewarn "works for you, and you're happy with, the alternative USE flags can be"
450 + ewarn "disabled. If you want to use dhclient or dhcpcd, then you need to tweak"
451 + ewarn "the main.dhcp configuration option to use one of them instead of internal."
452 + fi
453 +}