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: Fri, 13 May 2022 15:47:26
Message-Id: 1652456836.a859c71fdaf343ba989259e59681bbe5b6c60c1a.mattst88@gentoo
1 commit: a859c71fdaf343ba989259e59681bbe5b6c60c1a
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Fri May 13 15:35:30 2022 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Fri May 13 15:47:16 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a859c71f
7
8 net-misc/networkmanager: Version bump to 1.38.0
9
10 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
11
12 net-misc/networkmanager/Manifest | 1 +
13 .../networkmanager/networkmanager-1.38.0.ebuild | 410 +++++++++++++++++++++
14 2 files changed, 411 insertions(+)
15
16 diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest
17 index 8db2703963b4..9384b121d4dc 100644
18 --- a/net-misc/networkmanager/Manifest
19 +++ b/net-misc/networkmanager/Manifest
20 @@ -1,3 +1,4 @@
21 DIST NetworkManager-1.32.12.tar.xz 5373452 BLAKE2B 29ca1f1c2aea60e4ddc7e3d5464604b329c8b740a2a143266c0bc05ec6a16079cfdf67770fc75afe523664e2e4234189031a8ffa2f51c0f02d4760f3ab20e04a SHA512 b8dfa409302781fdab19790afeb7f4396875e282d6983e2c5775294c8c13d3c1036dee69a37bf6e4fb2a2e80504c8e792780b6a9c1262616e57860da5ebc0e61
22 DIST NetworkManager-1.36.2.tar.xz 5432676 BLAKE2B 8ce2922573ae5b1d244e87d1b979a9fe7443e4fa2cb6caf52b59139ad92169dd46f53460871b44e687860aaee06dd6a4999d0ebce9cde466e61c203ae18dbaa3 SHA512 3d9085bb836000a2354415e5ff35e5e67eacd97680660613128b9befe981d67b6ac8d519581f8635bf219c2db03a92f182066efef3abb2094da2870e12caa353
23 DIST NetworkManager-1.36.4.tar.xz 5433152 BLAKE2B 2bb625381bc5a816a9fdc51498721f9bc1e85fe2e83d114c8897f99f90af6924a0a07fddf0099f8e52c0df2f3353834129b99b4bb487b413cee503da7c680035 SHA512 17b2d39ed2584fb8b805e7b9950f9c4e6d657380881e9e78a1aa85dc58615e0a3896413a6902086f516dee2f373155f69042b4a229f3b9e15fb3c0f958cd8149
24 +DIST NetworkManager-1.38.0.tar.xz 5431664 BLAKE2B adc298681e339d6cfac9c7310a94a1b11bc7f5044a0b2a129d5ab764bd5f29ccc604bbc27c49d52ceab9e2e6dbd923a686fbaf96cf20c73438d680fa5659e5ff SHA512 0f1532b4ea1aeb9d5dd922ee005eef325d39ba3526884793aaaed2eae61737f6a6e95644077f2b45ace569df79246d3d6404272cce02ca7e02b3632aee882940
25
26 diff --git a/net-misc/networkmanager/networkmanager-1.38.0.ebuild b/net-misc/networkmanager/networkmanager-1.38.0.ebuild
27 new file mode 100644
28 index 000000000000..e5deee89b198
29 --- /dev/null
30 +++ b/net-misc/networkmanager/networkmanager-1.38.0.ebuild
31 @@ -0,0 +1,410 @@
32 +# Copyright 1999-2022 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=8
36 +GNOME_ORG_MODULE="NetworkManager"
37 +VALA_USE_DEPEND="vapigen"
38 +PYTHON_COMPAT=( python3_{8..10} )
39 +
40 +inherit gnome.org linux-info meson-multilib python-any-r1 readme.gentoo-r1 systemd toolchain-funcs udev vala virtualx
41 +
42 +DESCRIPTION="A set of co-operative tools that make networking simple and straightforward"
43 +HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
44 +
45 +LICENSE="GPL-2+ LGPL-2.1+"
46 +SLOT="0"
47 +
48 +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"
49 +RESTRICT="!test? ( test )"
50 +
51 +REQUIRED_USE="
52 + bluetooth? ( modemmanager )
53 + connection-sharing? ( || ( iptables nftables ) )
54 + gtk-doc? ( introspection )
55 + iwd? ( wifi )
56 + vala? ( introspection )
57 + wext? ( wifi )
58 + ^^ ( gnutls nss )
59 + ?? ( elogind systemd )
60 + ?? ( dhclient dhcpcd )
61 + ?? ( syslog systemd )
62 +"
63 +
64 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
65 +
66 +COMMON_DEPEND="
67 + sys-apps/util-linux[${MULTILIB_USEDEP}]
68 + elogind? ( >=sys-auth/elogind-219 )
69 + >=virtual/libudev-175:=[${MULTILIB_USEDEP}]
70 + sys-apps/dbus
71 + net-libs/libndp
72 + systemd? ( >=sys-apps/systemd-209:0= )
73 + >=dev-libs/glib-2.40:2[${MULTILIB_USEDEP}]
74 + introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
75 + selinux? ( sys-libs/libselinux )
76 + audit? ( sys-process/audit )
77 + teamd? (
78 + >=dev-libs/jansson-2.7:=
79 + >=net-misc/libteam-1.9
80 + )
81 + policykit? ( >=sys-auth/polkit-0.106 )
82 + nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
83 + gnutls? (
84 + >=net-libs/gnutls-2.12:=[${MULTILIB_USEDEP}]
85 + )
86 + ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] )
87 + modemmanager? (
88 + net-misc/mobile-broadband-provider-info
89 + >=net-misc/modemmanager-0.7.991:0=
90 + )
91 + bluetooth? ( >=net-wireless/bluez-5 )
92 + ofono? ( net-misc/ofono )
93 + dhclient? ( >=net-misc/dhcp-4[client] )
94 + dhcpcd? ( >=net-misc/dhcpcd-9.3.3 )
95 + ovs? ( >=dev-libs/jansson-2.7:= )
96 + resolvconf? ( virtual/resolvconf )
97 + connection-sharing? (
98 + net-dns/dnsmasq[dbus,dhcp]
99 + iptables? ( net-firewall/iptables )
100 + nftables? ( net-firewall/nftables )
101 + )
102 + psl? ( net-libs/libpsl )
103 + concheck? ( net-misc/curl )
104 + tools? (
105 + >=dev-libs/newt-0.52.15
106 + libedit? ( dev-libs/libedit )
107 + !libedit? ( sys-libs/readline:= )
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 -b "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return
152 + fi
153 + if use test; then
154 + has_version -b "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
155 + has_version -b "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_setup
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_wifi_backend_default=$(multilib_native_usex iwd iwd default)
267 + -Dconfig_plugins_default=keyfile
268 + -Difcfg_rh=false
269 + -Difupdown=false
270 +
271 + $(meson_nm_native_program resolvconf "" /sbin/resolvconf)
272 + -Dnetconfig=no
273 + -Dconfig_dns_rc_manager_default=auto
274 +
275 + $(meson_nm_program dhclient "" /sbin/dhclient)
276 + -Ddhcpcanon=no
277 + $(meson_nm_program dhcpcd "" /sbin/dhcpcd)
278 +
279 + $(meson_native_use_bool introspection)
280 + $(meson_native_use_bool vala vapi)
281 + $(meson_native_use_bool gtk-doc docs)
282 + -Dtests=$(multilib_native_usex test)
283 + $(meson_native_true firewalld_zone)
284 + -Dmore_asserts=0
285 + $(meson_use debug more_logging)
286 + -Dvalgrind=no
287 + -Dvalgrind_suppressions=
288 + -Dld_gc=false
289 + $(meson_native_use_bool psl libpsl)
290 + -Dqt=false
291 +
292 + $(meson_use lto b_lto)
293 + )
294 +
295 + if multilib_is_native_abi && use systemd; then
296 + emesonargs+=( -Dsession_tracking_consolekit=false )
297 + emesonargs+=( -Dsession_tracking=systemd )
298 + emesonargs+=( -Dsuspend_resume=systemd )
299 + elif multilib_is_native_abi && use elogind; then
300 + emesonargs+=( -Dsession_tracking_consolekit=false )
301 + emesonargs+=( -Dsession_tracking=elogind )
302 + emesonargs+=( -Dsuspend_resume=elogind )
303 + else
304 + emesonargs+=( -Dsession_tracking_consolekit=false )
305 + emesonargs+=( -Dsession_tracking=no )
306 + emesonargs+=( -Dsuspend_resume=auto )
307 + fi
308 +
309 + if multilib_is_native_abi && use syslog; then
310 + emesonargs+=( -Dconfig_logging_backend_default=syslog )
311 + elif multilib_is_native_abi && use systemd; then
312 + emesonargs+=( -Dconfig_logging_backend_default=journal )
313 + else
314 + emesonargs+=( -Dconfig_logging_backend_default=default )
315 + fi
316 +
317 + if multilib_is_native_abi && use dhclient; then
318 + emesonargs+=( -Dconfig_dhcp_default=dhclient )
319 + elif multilib_is_native_abi && use dhcpcd; then
320 + emesonargs+=( -Dconfig_dhcp_default=dhcpcd )
321 + else
322 + emesonargs+=( -Dconfig_dhcp_default=internal )
323 + fi
324 +
325 + if use nss; then
326 + emesonargs+=( -Dcrypto=nss )
327 + else
328 + emesonargs+=( -Dcrypto=gnutls )
329 + fi
330 +
331 + if use tools ; then
332 + emesonargs+=( -Dreadline=$(usex libedit libedit libreadline) )
333 + else
334 + emesonargs+=( -Dreadline=none )
335 + fi
336 +
337 + # Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
338 + if use ppp; then
339 + local PPPD_VER=`best_version net-dialup/ppp`
340 + PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
341 + PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
342 + emesonargs+=( -Dpppd_plugin_dir=/usr/$(get_libdir)/pppd/${PPPD_VER} )
343 + fi
344 +
345 + meson_src_configure
346 +}
347 +
348 +multilib_src_test() {
349 + if use test && multilib_is_native_abi; then
350 + python_setup
351 + virtx meson_src_test
352 + fi
353 +}
354 +
355 +multilib_src_install() {
356 + meson_src_install
357 + if ! multilib_is_native_abi; then
358 + rm -r "${ED}"/{etc,usr/{bin,lib/NetworkManager,share},var} || die
359 + fi
360 +}
361 +
362 +multilib_src_install_all() {
363 + ! use systemd && readme.gentoo_create_doc
364 +
365 + newinitd "${FILESDIR}/init.d.NetworkManager-r2" NetworkManager
366 + newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
367 +
368 + # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
369 + keepdir /etc/NetworkManager/dispatcher.d
370 +
371 + # Provide openrc net dependency only when nm is connected
372 + exeinto /etc/NetworkManager/dispatcher.d
373 + newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
374 + sed -e "s:@EPREFIX@:${EPREFIX}:g" \
375 + -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
376 +
377 + keepdir /etc/NetworkManager/system-connections
378 + chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594
379 +
380 + # Allow users in plugdev group to modify system connections
381 + insinto /usr/share/polkit-1/rules.d/
382 + doins "${FILESDIR}"/01-org.freedesktop.NetworkManager.settings.modify.system.rules
383 +
384 + insinto /usr/lib/NetworkManager/conf.d #702476
385 + doins "${S}"/examples/nm-conf.d/31-mac-addr-change.conf
386 +
387 + if use iwd; then
388 + # This goes to $nmlibdir/conf.d/ and $nmlibdir is '${prefix}'/lib/$PACKAGE, thus always lib, not get_libdir
389 + cat <<-EOF > "${ED}"/usr/lib/NetworkManager/conf.d/iwd.conf || die
390 + [device]
391 + wifi.backend=iwd
392 + EOF
393 + fi
394 +
395 + mv "${ED}"/usr/share/doc/{NetworkManager/examples/,${PF}} || die
396 + rmdir "${ED}"/usr/share/doc/NetworkManager || die
397 +
398 + # Empty
399 + rmdir "${ED}"/var{/lib{/NetworkManager,},} || die
400 +}
401 +
402 +pkg_postinst() {
403 + udev_reload
404 +
405 + systemd_reenable NetworkManager.service
406 + ! use systemd && readme.gentoo_print_elog
407 +
408 + if [[ -e "${EROOT}/etc/NetworkManager/nm-system-settings.conf" ]]; then
409 + ewarn "The ${PN} system configuration file has moved to a new location."
410 + ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
411 + ewarn "to ${EROOT}/etc/NetworkManager/NetworkManager.conf"
412 + ewarn
413 + ewarn "After doing so, you can remove ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
414 + fi
415 +
416 + # NM fallbacks to plugin specified at compile time (upstream bug #738611)
417 + # but still show a warning to remember people to have cleaner config file
418 + if [[ -e "${EROOT}/etc/NetworkManager/NetworkManager.conf" ]]; then
419 + if grep plugins "${EROOT}/etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
420 + ewarn
421 + ewarn "You seem to use 'ifnet' plugin in ${EROOT}/etc/NetworkManager/NetworkManager.conf"
422 + ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
423 + ewarn
424 + fi
425 + fi
426 +
427 + # NM shows lots of errors making nmcli almost unusable, bug #528748 upstream bug #690457
428 + if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
429 + ewarn "You have psk-flags=1 setting in above files, you will need to"
430 + ewarn "either reconfigure affected networks or, at least, set the flag"
431 + ewarn "value to '0'."
432 + fi
433 +
434 + if use dhclient || use dhcpcd; then
435 + ewarn "You have enabled USE=dhclient and/or USE=dhcpcd, but NetworkManager since"
436 + ewarn "version 1.20 defaults to the internal DHCP client. If the internal client"
437 + ewarn "works for you, and you're happy with, the alternative USE flags can be"
438 + ewarn "disabled. If you want to use dhclient or dhcpcd, then you need to tweak"
439 + ewarn "the main.dhcp configuration option to use one of them instead of internal."
440 + fi
441 +}