Gentoo Archives: gentoo-commits

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