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