Gentoo Archives: gentoo-commits

From: Mart Raudsepp <leio@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/networkmanager/
Date: Sun, 26 Apr 2020 08:09:36
Message-Id: 1587888541.424b7e44dcaae3642e57c65e9ad5dbafa94d42a0.leio@gentoo
1 commit: 424b7e44dcaae3642e57c65e9ad5dbafa94d42a0
2 Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
3 AuthorDate: Sun Apr 26 07:43:58 2020 +0000
4 Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
5 CommitDate: Sun Apr 26 08:09:01 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=424b7e44
7
8 net-misc/networkmanager: bump to 1.18.6
9
10 Package-Manager: Portage-2.3.84, Repoman-2.3.20
11 Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>
12
13 net-misc/networkmanager/Manifest | 1 +
14 .../networkmanager/networkmanager-1.18.6.ebuild | 349 +++++++++++++++++++++
15 2 files changed, 350 insertions(+)
16
17 diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest
18 index e0990bbc7a2..4603da4affb 100644
19 --- a/net-misc/networkmanager/Manifest
20 +++ b/net-misc/networkmanager/Manifest
21 @@ -1,2 +1,3 @@
22 DIST NetworkManager-1.18.4.tar.xz 4875196 BLAKE2B 9c58d6d7317562332dfa9639f8e236a0a7f6b58e7dad5af83916b1c6178899a6bcf12bc289fb401d84fd6420306364b4c4c0a25eda2a08eef812acde1862a18a SHA512 9fd22775a400ee8d20c75ebddfee842bfbd8780966444dd537e371a65918f41640e921d2c441853afe8f72d693e9b4c1415435136a07004666a6af4799fd3350
23 +DIST NetworkManager-1.18.6.tar.xz 4845144 BLAKE2B cf66789c025d9ec2007d1fe541acb8fd2b5204796ff8498fc5689124016e84a7e76509bee1b6650c796f0429cce6748c7b99e1976d95ac12bc31a1f1e67289b0 SHA512 92ab648e689dd903279fe676e867d7929f616c96dd478b2132854145a29debfcac5b083d70652ea0c7bccb0eb132534133fc9c005527237c47e2802556a29b92
24 DIST NetworkManager-1.22.10.tar.bz2 6292347 BLAKE2B b6cb06a0630685714cdd3c8b8e1d788a6e979c2d7f232259e682fdc9e1f5569259731fdbbea65b6e8321561ecb8354b6f7a0b10843eb17cbe6f5937af8d9d898 SHA512 61b6214188a3cd281d0d5a5b8bfc402f8a19d8beaa6a3a2bd85983991cc66d62b2c3785d7ca652373903d53331610cd63a45d94bdb355196d939c48f42be29c1
25
26 diff --git a/net-misc/networkmanager/networkmanager-1.18.6.ebuild b/net-misc/networkmanager/networkmanager-1.18.6.ebuild
27 new file mode 100644
28 index 00000000000..9280f0f85f6
29 --- /dev/null
30 +++ b/net-misc/networkmanager/networkmanager-1.18.6.ebuild
31 @@ -0,0 +1,349 @@
32 +# Copyright 1999-2020 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=6
36 +GNOME_ORG_MODULE="NetworkManager"
37 +GNOME2_LA_PUNT="yes"
38 +VALA_USE_DEPEND="vapigen"
39 +PYTHON_COMPAT=( python{3_6,3_7} )
40 +
41 +inherit bash-completion-r1 gnome2 linux-info multilib python-any-r1 systemd readme.gentoo-r1 vala virtualx udev multilib-minimal
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+"
47 +SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
48 +
49 +IUSE="audit bluetooth connection-sharing consolekit +dhclient dhcpcd elogind gnutls +introspection iwd json kernel_linux +nss +modemmanager ncurses ofono ovs policykit +ppp resolvconf selinux systemd teamd test vala +wext +wifi"
50 +RESTRICT="!test? ( test )"
51 +
52 +REQUIRED_USE="
53 + bluetooth? ( modemmanager )
54 + iwd? ( wifi )
55 + vala? ( introspection )
56 + wext? ( wifi )
57 + || ( nss gnutls )
58 + ?? ( consolekit elogind systemd )
59 +"
60 +
61 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
62 +
63 +# gobject-introspection-0.10.3 is needed due to gnome bug 642300
64 +# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
65 +COMMON_DEPEND="
66 + >=sys-apps/dbus-1.2[${MULTILIB_USEDEP}]
67 + >=dev-libs/dbus-glib-0.100[${MULTILIB_USEDEP}]
68 + >=dev-libs/glib-2.40:2[${MULTILIB_USEDEP}]
69 + policykit? ( >=sys-auth/polkit-0.106 )
70 + net-libs/libndp[${MULTILIB_USEDEP}]
71 + >=net-misc/curl-7.24
72 + net-misc/iputils
73 + sys-apps/util-linux[${MULTILIB_USEDEP}]
74 + sys-libs/readline:0=
75 + >=virtual/libudev-175:=[${MULTILIB_USEDEP}]
76 + audit? ( sys-process/audit )
77 + bluetooth? ( >=net-wireless/bluez-5 )
78 + connection-sharing? (
79 + net-dns/dnsmasq[dbus,dhcp]
80 + net-firewall/iptables )
81 + consolekit? ( >=sys-auth/consolekit-1.0.0 )
82 + dhclient? ( >=net-misc/dhcp-4[client] )
83 + dhcpcd? ( net-misc/dhcpcd )
84 + elogind? ( >=sys-auth/elogind-219 )
85 + introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
86 + json? ( >=dev-libs/jansson-2.5[${MULTILIB_USEDEP}] )
87 + modemmanager? ( >=net-misc/modemmanager-0.7.991:0= )
88 + ncurses? ( >=dev-libs/newt-0.52.15 )
89 + nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
90 + !nss? ( gnutls? (
91 + dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}]
92 + >=net-libs/gnutls-2.12:=[${MULTILIB_USEDEP}] ) )
93 + ofono? ( net-misc/ofono )
94 + ovs? ( dev-libs/jansson )
95 + ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] )
96 + resolvconf? ( net-dns/openresolv )
97 + selinux? ( sys-libs/libselinux )
98 + systemd? ( >=sys-apps/systemd-209:0= )
99 + teamd? (
100 + dev-libs/jansson
101 + >=net-misc/libteam-1.9
102 + )
103 +"
104 +RDEPEND="${COMMON_DEPEND}
105 + acct-group/plugdev
106 + || (
107 + net-misc/iputils[arping(+)]
108 + net-analyzer/arping
109 + )
110 + wifi? (
111 + !iwd? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
112 + iwd? ( net-wireless/iwd )
113 + )
114 +"
115 +DEPEND="${COMMON_DEPEND}
116 + dev-util/gdbus-codegen
117 + dev-util/glib-utils
118 + dev-util/gtk-doc-am
119 + >=dev-util/intltool-0.40
120 + >=sys-devel/gettext-0.17
121 + >=sys-kernel/linux-headers-3.18
122 + virtual/pkgconfig[${MULTILIB_USEDEP}]
123 + introspection? (
124 + $(python_gen_any_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]')
125 + dev-lang/perl
126 + dev-libs/libxslt
127 + )
128 + vala? ( $(vala_depend) )
129 + test? (
130 + $(python_gen_any_dep '
131 + dev-python/dbus-python[${PYTHON_USEDEP}]
132 + dev-python/pygobject:3[${PYTHON_USEDEP}]')
133 + )
134 +"
135 +
136 +PATCHES=(
137 + "${FILESDIR}"/${PN}-data-fix-the-ID_NET_DRIVER-udev-rule.patch
138 + "${FILESDIR}"/1.18.4-iwd1-compat.patch # included in 1.21.3+
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 +
199 +multilib_src_configure() {
200 + local myconf=(
201 + --disable-more-warnings
202 + --disable-static
203 + --localstatedir=/var
204 + --disable-lto
205 + --disable-config-plugin-ibft
206 + --disable-qt
207 + --without-netconfig
208 + --with-dbus-sys-dir=/etc/dbus-1/system.d
209 + # We need --with-libnm-glib (and dbus-glib dep) as reverse deps are
210 + # still not ready for removing that lib, bug #665338
211 + --with-libnm-glib
212 + $(multilib_native_with nmcli)
213 + --with-udev-dir="$(get_udevdir)"
214 + --with-config-plugins-default=keyfile
215 + --with-iptables=/sbin/iptables
216 + --with-ebpf=yes
217 + $(multilib_native_enable concheck)
218 + --with-crypto=$(usex nss nss gnutls)
219 + --with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind $(multilib_native_usex consolekit consolekit no)))
220 + # ConsoleKit has no build-time dependency, so use it as the default case.
221 + # There is no off switch, and we do not support upower.
222 + --with-suspend-resume=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind consolekit))
223 + $(multilib_native_use_with audit libaudit)
224 + $(multilib_native_use_enable bluetooth bluez5-dun)
225 + $(use_with dhclient)
226 + $(use_with dhcpcd)
227 + $(multilib_native_use_enable introspection)
228 + $(use_enable json json-validation)
229 + $(multilib_native_use_enable ppp)
230 + --without-libpsl
231 + $(multilib_native_use_with modemmanager modem-manager-1)
232 + $(multilib_native_use_with ncurses nmtui)
233 + $(multilib_native_use_with ofono)
234 + $(multilib_native_use_enable ovs)
235 + $(multilib_native_use_enable policykit polkit)
236 + $(multilib_native_use_enable policykit polkit-agent)
237 + $(multilib_native_use_with resolvconf)
238 + $(multilib_native_use_with selinux)
239 + $(multilib_native_use_with systemd systemd-journal)
240 + $(multilib_native_use_enable teamd teamdctl)
241 + $(multilib_native_use_enable test tests)
242 + $(multilib_native_use_enable vala)
243 + --without-valgrind
244 + $(multilib_native_use_with wifi iwd)
245 + $(multilib_native_use_with wext)
246 + $(multilib_native_use_enable wifi)
247 + )
248 +
249 + # Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
250 + if use ppp; then
251 + local PPPD_VER=`best_version net-dialup/ppp`
252 + PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
253 + PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
254 + myconf+=( --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER} )
255 + fi
256 +
257 + # unit files directory needs to be passed only when systemd is enabled,
258 + # otherwise systemd support is not disabled completely, bug #524534
259 + use systemd && myconf+=( --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" )
260 +
261 + if multilib_is_native_abi; then
262 + # work-around man out-of-source brokenness, must be done before configure
263 + ln -s "${S}/docs" docs || die
264 + ln -s "${S}/man" man || die
265 + fi
266 +
267 + ECONF_SOURCE=${S} runstatedir="/run" gnome2_src_configure "${myconf[@]}"
268 +}
269 +
270 +multilib_src_compile() {
271 + if multilib_is_native_abi; then
272 + emake
273 + else
274 + local targets=(
275 + libnm/libnm.la
276 + libnm-util/libnm-util.la
277 + libnm-glib/libnm-glib.la
278 + libnm-glib/libnm-glib-vpn.la
279 + )
280 + emake "${targets[@]}"
281 + fi
282 +}
283 +
284 +multilib_src_test() {
285 + if use test && multilib_is_native_abi; then
286 + python_setup
287 + virtx emake check
288 + fi
289 +}
290 +
291 +multilib_src_install() {
292 + if multilib_is_native_abi; then
293 + # Install completions at proper place, bug #465100
294 + gnome2_src_install completiondir="$(get_bashcompdir)"
295 + insinto /usr/lib/NetworkManager/conf.d #702476
296 + doins "${S}"/examples/nm-conf.d/31-mac-addr-change.conf
297 + else
298 + local targets=(
299 + install-libLTLIBRARIES
300 + install-libdeprecatedHEADERS
301 + install-libnm_glib_libnmvpnHEADERS
302 + install-libnm_glib_libnmincludeHEADERS
303 + install-libnm_util_libnm_util_includeHEADERS
304 + install-libnmincludeHEADERS
305 + install-nodist_libnm_glib_libnmincludeHEADERS
306 + install-nodist_libnm_glib_libnmvpnHEADERS
307 + install-nodist_libnm_util_libnm_util_includeHEADERS
308 + install-nodist_libnmincludeHEADERS
309 + install-pkgconfigDATA
310 + )
311 + emake DESTDIR="${D}" "${targets[@]}"
312 + fi
313 +}
314 +
315 +multilib_src_install_all() {
316 + einstalldocs
317 + ! use systemd && readme.gentoo_create_doc
318 +
319 + newinitd "${FILESDIR}/init.d.NetworkManager-r1" NetworkManager
320 + newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
321 +
322 + # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
323 + keepdir /etc/NetworkManager/dispatcher.d
324 +
325 + # Provide openrc net dependency only when nm is connected
326 + exeinto /etc/NetworkManager/dispatcher.d
327 + newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
328 + sed -e "s:@EPREFIX@:${EPREFIX}:g" \
329 + -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
330 +
331 + keepdir /etc/NetworkManager/system-connections
332 + chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594
333 +
334 + # Allow users in plugdev group to modify system connections
335 + insinto /usr/share/polkit-1/rules.d/
336 + doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
337 +
338 + if use iwd; then
339 + # This goes to $nmlibdir/conf.d/ and $nmlibdir is '${prefix}'/lib/$PACKAGE, thus always lib, not get_libdir
340 + cat <<-EOF > "${ED%/}"/usr/lib/NetworkManager/conf.d/iwd.conf
341 + [device]
342 + wifi.backend=iwd
343 + EOF
344 + fi
345 +
346 + # Empty
347 + rmdir "${ED%/}"/var{/lib{/NetworkManager,},} || die
348 +}
349 +
350 +pkg_postinst() {
351 + gnome2_pkg_postinst
352 + systemd_reenable NetworkManager.service
353 + ! use systemd && readme.gentoo_print_elog
354 +
355 + if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
356 + ewarn "The ${PN} system configuration file has moved to a new location."
357 + ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
358 + ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
359 + ewarn
360 + ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
361 + fi
362 +
363 + # NM fallbacks to plugin specified at compile time (upstream bug #738611)
364 + # but still show a warning to remember people to have cleaner config file
365 + if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
366 + if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
367 + ewarn
368 + ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
369 + ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
370 + ewarn
371 + fi
372 + fi
373 +
374 + # NM shows lots of errors making nmcli almost unusable, bug #528748 upstream bug #690457
375 + if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
376 + ewarn "You have psk-flags=1 setting in above files, you will need to"
377 + ewarn "either reconfigure affected networks or, at least, set the flag"
378 + ewarn "value to '0'."
379 + fi
380 +}