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