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: Fri, 07 Sep 2018 09:51:12
Message-Id: 1536313765.1a5b8897af3537d1631bc911161109bdfd4eeb0e.leio@gentoo
1 commit: 1a5b8897af3537d1631bc911161109bdfd4eeb0e
2 Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 7 09:21:29 2018 +0000
4 Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 7 09:49:25 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a5b8897
7
8 net-misc/networkmanager: remove old
9
10 Package-Manager: Portage-2.3.48, Repoman-2.3.10
11
12 net-misc/networkmanager/Manifest | 2 -
13 .../networkmanager/networkmanager-1.10.6.ebuild | 328 -------------------
14 .../networkmanager/networkmanager-1.4.4-r1.ebuild | 346 ---------------------
15 3 files changed, 676 deletions(-)
16
17 diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest
18 index 2ea3f1ed390..c036520454a 100644
19 --- a/net-misc/networkmanager/Manifest
20 +++ b/net-misc/networkmanager/Manifest
21 @@ -1,6 +1,4 @@
22 DIST NetworkManager-1.10.10.tar.xz 4038552 BLAKE2B a0a3c2a74dd641d25267ec7932f0801e30720334cb905c86abfaeb9bc3c60a2c1e9372b738b1eb43c55a34edf952905d94e3513cef653ea62e470d56bc575b65 SHA512 e536598b19064e0ab7fe3e92362de9c380281ff53a1481438216c2247b2d5287244e735be41c56c53040a5861bf36bbb979e36578244fabd6448a50ea42c4645
23 -DIST NetworkManager-1.10.6.tar.xz 4029656 BLAKE2B 0fa99dbb54c3f51755329f229f941e408d883aeff24bbcf0f9df143544190ab59ed5742caca42ea7cced949de0891ecc148394fbff1b9cd87b26c3a84f2a728e SHA512 8406ed561efff13b63dc218babdd2ad9e2816bcc829ba3ef2ce942bb5fa027640de28660381203016fa9cddb61412d3cd5102b7cbd29d0e284b5cb8d13dd8610
24 DIST NetworkManager-1.12.2.tar.xz 4193776 BLAKE2B bc2b55f33e85dc8381eb18148cef02059e96abe1863da35af2b8f5671e3b2a4296eb1f9b79d864f3d0e6b362f7dbebdea4518a96d255acda9141b9ae95b49038 SHA512 cf5dae6ca8b6d3819a79485082f959907213d43413d15c41b79eb7da40edb913a41e7c18586b14bbf84f30ac493e2d9d466f5e66130c636f041ce939aaf49f35
25 -DIST NetworkManager-1.4.4.tar.xz 3762664 BLAKE2B 430f5a15540c43d067c27927b627ecb1c7935f42566e9b14b82b6f70cf7dae3ed7398bb45647911e91d8ce14558b1eccc0f6ffa97eae852dd524219dcc536a90 SHA512 a73e423e88b0e2694a46dc04f492a656d766796aa987b2e4644147a5939a6fdeb22ff5d8b36c723444bc0ab3d8740b80fa82c2f5e07f073998841695978d6e14
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.10.6.ebuild b/net-misc/networkmanager/networkmanager-1.10.6.ebuild
30 deleted file mode 100644
31 index 3d3830010e1..00000000000
32 --- a/net-misc/networkmanager/networkmanager-1.10.6.ebuild
33 +++ /dev/null
34 @@ -1,328 +0,0 @@
35 -# Copyright 1999-2018 Gentoo Foundation
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} )
43 -
44 -inherit bash-completion-r1 gnome2 linux-info multilib python-any-r1 systemd \
45 - user readme.gentoo-r1 toolchain-funcs vala versionator 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 json kernel_linux +nss +modemmanager ncurses ofono ovs policykit +ppp resolvconf selinux systemd teamd test vala +wext +wifi"
54 -
55 -REQUIRED_USE="
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.37.6:2[${MULTILIB_USEDEP}]
71 - >=dev-libs/libnl-3.2.8:3=[${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[${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? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
113 -"
114 -DEPEND="${COMMON_DEPEND}
115 - dev-util/gdbus-codegen
116 - dev-util/gtk-doc-am
117 - >=dev-util/intltool-0.40
118 - >=sys-devel/gettext-0.17
119 - >=sys-kernel/linux-headers-2.6.29
120 - virtual/pkgconfig[${MULTILIB_USEDEP}]
121 - introspection? (
122 - $(python_gen_any_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]')
123 - dev-lang/perl
124 - dev-libs/libxslt
125 - )
126 - vala? ( $(vala_depend) )
127 - test? (
128 - $(python_gen_any_dep '
129 - dev-python/dbus-python[${PYTHON_USEDEP}]
130 - dev-python/pygobject:3[${PYTHON_USEDEP}]')
131 - )
132 -"
133 -
134 -python_check_deps() {
135 - if use introspection; then
136 - has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return
137 - fi
138 - if use test; then
139 - has_version "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
140 - has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]"
141 - fi
142 -}
143 -
144 -sysfs_deprecated_check() {
145 - ebegin "Checking for SYSFS_DEPRECATED support"
146 -
147 - if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
148 - eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
149 - eerror "or NetworkManager will not work correctly."
150 - eerror "See https://bugs.gentoo.org/333639 for more info."
151 - die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
152 - fi
153 - eend $?
154 -}
155 -
156 -pkg_pretend() {
157 - if use kernel_linux; then
158 - get_version
159 - if linux_config_exists; then
160 - sysfs_deprecated_check
161 - else
162 - ewarn "Was unable to determine your kernel .config"
163 - ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
164 - ewarn "See https://bugs.gentoo.org/333639 for more info."
165 - fi
166 -
167 - fi
168 -}
169 -
170 -pkg_setup() {
171 - if use connection-sharing; then
172 - CONFIG_CHECK="~NF_NAT_IPV4 ~NF_NAT_MASQUERADE_IPV4"
173 - linux-info_pkg_setup
174 - fi
175 - enewgroup plugdev
176 - if use introspection || use test; then
177 - python-any-r1_pkg_setup
178 - fi
179 -}
180 -
181 -src_prepare() {
182 - DOC_CONTENTS="To modify system network connections without needing to enter the
183 - root password, add your user account to the 'plugdev' group."
184 -
185 - use vala && vala_src_prepare
186 - gnome2_src_prepare
187 -}
188 -
189 -multilib_src_configure() {
190 - local myconf=(
191 - --disable-more-warnings
192 - --disable-static
193 - --localstatedir=/var
194 - --disable-lto
195 - --disable-config-plugin-ibft
196 - # ifnet plugin always disabled until someone volunteers to actively
197 - # maintain and fix it
198 - --disable-ifnet
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
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 wext)
233 - $(multilib_native_use_enable wifi)
234 - )
235 -
236 - if multilib_is_native_abi && use policykit; then
237 - myconf+=( --enable-polkit=yes )
238 - else
239 - myconf+=( --enable-polkit=disabled )
240 - fi
241 -
242 - # Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
243 - if use ppp; then
244 - local PPPD_VER=`best_version net-dialup/ppp`
245 - PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
246 - PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
247 - myconf+=( --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER} )
248 - fi
249 -
250 - # unit files directory needs to be passed only when systemd is enabled,
251 - # otherwise systemd support is not disabled completely, bug #524534
252 - use systemd && myconf+=( --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" )
253 -
254 - if multilib_is_native_abi; then
255 - # work-around man out-of-source brokenness, must be done before configure
256 - ln -s "${S}/docs" docs || die
257 - ln -s "${S}/man" man || die
258 - fi
259 -
260 - ECONF_SOURCE=${S} runstatedir="/run" gnome2_src_configure "${myconf[@]}"
261 -}
262 -
263 -multilib_src_compile() {
264 - if multilib_is_native_abi; then
265 - emake
266 - else
267 - local targets=(
268 - libnm/libnm.la
269 - libnm-util/libnm-util.la
270 - libnm-glib/libnm-glib.la
271 - libnm-glib/libnm-glib-vpn.la
272 - )
273 - emake "${targets[@]}"
274 - fi
275 -}
276 -
277 -multilib_src_test() {
278 - if use test && multilib_is_native_abi; then
279 - python_setup
280 - virtx emake check
281 - fi
282 -}
283 -
284 -multilib_src_install() {
285 - if multilib_is_native_abi; then
286 - # Install completions at proper place, bug #465100
287 - gnome2_src_install completiondir="$(get_bashcompdir)"
288 - else
289 - local targets=(
290 - install-libLTLIBRARIES
291 - install-libdeprecatedHEADERS
292 - install-libnm_glib_libnmvpnHEADERS
293 - install-libnm_glib_libnmincludeHEADERS
294 - install-libnm_util_libnm_util_includeHEADERS
295 - install-libnmincludeHEADERS
296 - install-nodist_libnm_glib_libnmincludeHEADERS
297 - install-nodist_libnm_glib_libnmvpnHEADERS
298 - install-nodist_libnm_util_libnm_util_includeHEADERS
299 - install-nodist_libnmincludeHEADERS
300 - install-pkgconfigDATA
301 - )
302 - emake DESTDIR="${D}" "${targets[@]}"
303 - fi
304 -}
305 -
306 -multilib_src_install_all() {
307 - ! use systemd && readme.gentoo_create_doc
308 -
309 - newinitd "${FILESDIR}/init.d.NetworkManager-r1" NetworkManager
310 - newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
311 -
312 - # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
313 - keepdir /etc/NetworkManager/dispatcher.d
314 -
315 - # Provide openrc net dependency only when nm is connected
316 - exeinto /etc/NetworkManager/dispatcher.d
317 - newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
318 - sed -e "s:@EPREFIX@:${EPREFIX}:g" \
319 - -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
320 -
321 - keepdir /etc/NetworkManager/system-connections
322 - chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594
323 -
324 - # Allow users in plugdev group to modify system connections
325 - insinto /usr/share/polkit-1/rules.d/
326 - doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
327 -
328 - # Empty
329 - rmdir "${ED%/}"/var{/lib{/NetworkManager,},} || die
330 -}
331 -
332 -pkg_postinst() {
333 - gnome2_pkg_postinst
334 - systemd_reenable NetworkManager.service
335 - ! use systemd && readme.gentoo_print_elog
336 -
337 - if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
338 - ewarn "The ${PN} system configuration file has moved to a new location."
339 - ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
340 - ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
341 - ewarn
342 - ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
343 - fi
344 -
345 - # NM fallbacks to plugin specified at compile time (upstream bug #738611)
346 - # but still show a warning to remember people to have cleaner config file
347 - if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
348 - if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
349 - ewarn
350 - ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
351 - ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
352 - ewarn
353 - fi
354 - fi
355 -
356 - # NM shows lots of errors making nmcli neither unusable, bug #528748 upstream bug #690457
357 - if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
358 - ewarn "You have psk-flags=1 setting in above files, you will need to"
359 - ewarn "either reconfigure affected networks or, at least, set the flag"
360 - ewarn "value to '0'."
361 - fi
362 -}
363
364 diff --git a/net-misc/networkmanager/networkmanager-1.4.4-r1.ebuild b/net-misc/networkmanager/networkmanager-1.4.4-r1.ebuild
365 deleted file mode 100644
366 index c1d6830c920..00000000000
367 --- a/net-misc/networkmanager/networkmanager-1.4.4-r1.ebuild
368 +++ /dev/null
369 @@ -1,346 +0,0 @@
370 -# Copyright 1999-2017 Gentoo Foundation
371 -# Distributed under the terms of the GNU General Public License v2
372 -
373 -EAPI=6
374 -GNOME_ORG_MODULE="NetworkManager"
375 -GNOME2_LA_PUNT="yes"
376 -VALA_USE_DEPEND="vapigen"
377 -PYTHON_COMPAT=( python{2_7,3_4,3_5} )
378 -
379 -inherit bash-completion-r1 gnome2 linux-info multilib python-any-r1 systemd \
380 - user readme.gentoo-r1 toolchain-funcs vala versionator virtualx udev multilib-minimal
381 -
382 -DESCRIPTION="A set of co-operative tools that make networking simple and straightforward"
383 -HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
384 -
385 -LICENSE="GPL-2+"
386 -SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
387 -
388 -IUSE="audit bluetooth connection-sharing consolekit +dhclient gnutls +introspection \
389 -json kernel_linux +nss +modemmanager ncurses ofono +ppp resolvconf selinux \
390 -systemd teamd test vala +wext +wifi"
391 -
392 -REQUIRED_USE="
393 - modemmanager? ( ppp )
394 - vala? ( introspection )
395 - wext? ( wifi )
396 - ^^ ( nss gnutls )
397 -"
398 -
399 -KEYWORDS="~alpha amd64 arm ~arm64 ~ia64 ppc ppc64 ~sparc x86"
400 -
401 -# gobject-introspection-0.10.3 is needed due to gnome bug 642300
402 -# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
403 -# TODO: need multilib janson (linked to libnm.so)
404 -COMMON_DEPEND="
405 - >=sys-apps/dbus-1.2[${MULTILIB_USEDEP}]
406 - >=dev-libs/dbus-glib-0.100[${MULTILIB_USEDEP}]
407 - >=dev-libs/glib-2.37.6:2[${MULTILIB_USEDEP}]
408 - >=dev-libs/libnl-3.2.8:3=
409 - >=sys-auth/polkit-0.106
410 - net-libs/libndp
411 - >=net-libs/libsoup-2.40:2.4=
412 - net-misc/iputils
413 - sys-apps/util-linux[${MULTILIB_USEDEP}]
414 - sys-libs/readline:0=
415 - >=virtual/libgudev-165:=[${MULTILIB_USEDEP}]
416 - audit? ( sys-process/audit )
417 - bluetooth? ( >=net-wireless/bluez-5 )
418 - connection-sharing? (
419 - net-dns/dnsmasq[dbus,dhcp]
420 - net-firewall/iptables )
421 - consolekit? ( >=sys-auth/consolekit-1.0.0 )
422 - dhclient? ( >=net-misc/dhcp-4[client] )
423 - gnutls? (
424 - dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}]
425 - >=net-libs/gnutls-2.12:=[${MULTILIB_USEDEP}] )
426 - introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
427 - json? ( dev-libs/jansson )
428 - modemmanager? ( >=net-misc/modemmanager-0.7.991:0= )
429 - ncurses? ( >=dev-libs/newt-0.52.15 )
430 - nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
431 - ofono? ( net-misc/ofono )
432 - ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] )
433 - resolvconf? ( net-dns/openresolv )
434 - selinux? ( sys-libs/libselinux )
435 - systemd? ( >=sys-apps/systemd-209:0= )
436 - teamd? ( >=net-misc/libteam-1.9 )
437 -"
438 -RDEPEND="${COMMON_DEPEND}
439 - || (
440 - net-misc/iputils[arping(+)]
441 - net-analyzer/arping
442 - )
443 - wifi? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
444 -"
445 -DEPEND="${COMMON_DEPEND}
446 - dev-util/gdbus-codegen
447 - dev-util/gtk-doc-am
448 - >=dev-util/intltool-0.40
449 - >=sys-devel/gettext-0.17
450 - >=sys-kernel/linux-headers-2.6.29
451 - virtual/pkgconfig[${MULTILIB_USEDEP}]
452 - vala? ( $(vala_depend) )
453 - test? (
454 - $(python_gen_any_dep '
455 - dev-python/dbus-python[${PYTHON_USEDEP}]
456 - dev-python/pygobject:3[${PYTHON_USEDEP}]')
457 - )
458 -"
459 -
460 -python_check_deps() {
461 - if use test; then
462 - has_version "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
463 - has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]"
464 - else
465 - return 0
466 - fi
467 -}
468 -
469 -sysfs_deprecated_check() {
470 - ebegin "Checking for SYSFS_DEPRECATED support"
471 -
472 - if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
473 - eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
474 - eerror "or NetworkManager will not work correctly."
475 - eerror "See https://bugs.gentoo.org/333639 for more info."
476 - die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
477 - fi
478 - eend $?
479 -}
480 -
481 -pkg_pretend() {
482 - if use kernel_linux; then
483 - get_version
484 - if linux_config_exists; then
485 - sysfs_deprecated_check
486 - else
487 - ewarn "Was unable to determine your kernel .config"
488 - ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
489 - ewarn "See https://bugs.gentoo.org/333639 for more info."
490 - fi
491 -
492 - fi
493 -}
494 -
495 -pkg_setup() {
496 - if use connection-sharing; then
497 - CONFIG_CHECK="~NF_NAT_IPV4 ~NF_NAT_MASQUERADE_IPV4"
498 - linux-info_pkg_setup
499 - fi
500 - enewgroup plugdev
501 - use test && python-any-r1_pkg_setup
502 -}
503 -
504 -src_prepare() {
505 - DOC_CONTENTS="To modify system network connections without needing to enter the
506 - root password, add your user account to the 'plugdev' group."
507 -
508 - use vala && vala_src_prepare
509 - gnome2_src_prepare
510 -}
511 -
512 -multilib_src_configure() {
513 - local myconf=()
514 -
515 - # Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
516 - if use ppp; then
517 - local PPPD_VER=`best_version net-dialup/ppp`
518 - PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
519 - PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
520 - myconf+=( --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER} )
521 - fi
522 -
523 - # unit files directory needs to be passed only when systemd is enabled,
524 - # otherwise systemd support is not disabled completely, bug #524534
525 - use systemd && myconf+=( --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" )
526 -
527 - if multilib_is_native_abi; then
528 - # work-around man out-of-source brokenness, must be done before configure
529 - mkdir man || die
530 - find "${S}"/man -name '*.?' -exec ln -s {} man/ ';' || die
531 - else
532 - # libnl, libndp are only used for executables, not libraries
533 - myconf+=( LIB{NL,NDP}_{CFLAGS,LIBS}=' ' )
534 - fi
535 -
536 - # ifnet plugin always disabled until someone volunteers to actively
537 - # maintain and fix it
538 - # Also disable dhcpcd support as it's also completely unmaintained
539 - # and facing bugs like #563938 and many others
540 - #
541 - # We need --with-libnm-glib (and dbus-glib dep) as reverse deps are
542 - # still not ready for removing that lib
543 - ECONF_SOURCE=${S} \
544 - runstatedir="/run" \
545 - gnome2_src_configure \
546 - --disable-more-warnings \
547 - --disable-static \
548 - --localstatedir=/var \
549 - --disable-lto \
550 - --disable-config-plugin-ibft \
551 - --disable-ifnet \
552 - --disable-qt \
553 - --without-netconfig \
554 - --with-dbus-sys-dir=/etc/dbus-1/system.d \
555 - --with-libnm-glib \
556 - --with-nmcli=yes \
557 - --with-udev-dir="$(get_udevdir)" \
558 - --with-config-plugins-default=keyfile \
559 - --with-iptables=/sbin/iptables \
560 - $(multilib_native_with libsoup) \
561 - $(multilib_native_enable concheck) \
562 - --with-crypto=$(usex nss nss gnutls) \
563 - --with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex consolekit consolekit no)) \
564 - --with-suspend-resume=$(multilib_native_usex systemd systemd consolekit) \
565 - $(multilib_native_use_with audit libaudit) \
566 - $(multilib_native_use_enable bluetooth bluez5-dun) \
567 - $(multilib_native_use_enable introspection) \
568 - $(multilib_native_use_enable json json-validation) \
569 - $(multilib_native_use_enable ppp) \
570 - $(use_with dhclient) \
571 - --without-dhcpcd \
572 - $(multilib_native_use_with modemmanager modem-manager-1) \
573 - $(multilib_native_use_with ncurses nmtui) \
574 - $(multilib_native_use_with ofono) \
575 - $(multilib_native_use_with resolvconf) \
576 - $(multilib_native_use_with selinux) \
577 - $(multilib_native_use_with systemd systemd-journal) \
578 - $(multilib_native_use_enable teamd teamdctl) \
579 - $(multilib_native_use_enable test tests) \
580 - $(multilib_native_use_enable vala) \
581 - --without-valgrind \
582 - $(multilib_native_use_with wext) \
583 - $(multilib_native_use_enable wifi) \
584 - "${myconf[@]}"
585 -
586 - # work-around gtk-doc out-of-source brokedness
587 - if multilib_is_native_abi; then
588 - local d
589 - for d in api libnm libnm-util libnm-glib; do
590 - ln -s "${S}"/docs/${d}/html docs/${d}/html || die
591 - done
592 - fi
593 -
594 - # Disable examples
595 - # https://bugzilla.gnome.org/show_bug.cgi?id=769711
596 - cat > examples/Makefile <<-EOF
597 - .PHONY: all check install
598 - all:
599 - check:
600 - install:
601 - EOF
602 -}
603 -
604 -multilib_src_compile() {
605 - if multilib_is_native_abi; then
606 - emake
607 - else
608 - emake all-am
609 - emake -C shared
610 - emake -C introspection # generated headers, needed for libnm
611 - emake -C libnm-core
612 - emake -C libnm
613 - emake -C libnm-util
614 - emake -C libnm-glib
615 - fi
616 -}
617 -
618 -multilib_src_test() {
619 - if use test && multilib_is_native_abi; then
620 - python_setup
621 - virtx emake check
622 - fi
623 -}
624 -
625 -multilib_src_install() {
626 - if multilib_is_native_abi; then
627 - # Install completions at proper place, bug #465100
628 - gnome2_src_install completiondir="$(get_bashcompdir)"
629 - else
630 - emake DESTDIR="${D}" install-am
631 - emake DESTDIR="${D}" install -C shared
632 - emake DESTDIR="${D}" install -C introspection
633 - emake DESTDIR="${D}" install -C libnm-core
634 - emake DESTDIR="${D}" install -C libnm
635 - emake DESTDIR="${D}" install -C libnm-util
636 - emake DESTDIR="${D}" install -C libnm-glib
637 - fi
638 -}
639 -
640 -multilib_src_install_all() {
641 - ! use systemd && readme.gentoo_create_doc
642 -
643 - newinitd "${FILESDIR}/init.d.NetworkManager-r1" NetworkManager
644 - newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
645 -
646 - # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
647 - keepdir /etc/NetworkManager/dispatcher.d
648 -
649 - # Provide openrc net dependency only when nm is connected
650 - exeinto /etc/NetworkManager/dispatcher.d
651 - newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
652 - sed -e "s:@EPREFIX@:${EPREFIX}:g" \
653 - -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
654 -
655 - keepdir /etc/NetworkManager/system-connections
656 - chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594
657 -
658 - # Allow users in plugdev group to modify system connections
659 - insinto /usr/share/polkit-1/rules.d/
660 - doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
661 -
662 - # Remove empty /run/NetworkManager
663 - rmdir "${D}"/run/NetworkManager "${D}"/run || die
664 -}
665 -
666 -pkg_postinst() {
667 - gnome2_pkg_postinst
668 - systemd_reenable NetworkManager.service
669 - ! use systemd && readme.gentoo_print_elog
670 -
671 - if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
672 - ewarn "The ${PN} system configuration file has moved to a new location."
673 - ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
674 - ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
675 - ewarn
676 - ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
677 - fi
678 -
679 - # The polkit rules file moved to /usr/share
680 - old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
681 - if [[ -f "${old_rules}" ]]; then
682 - case "$(md5sum ${old_rules})" in
683 - 574d0cfa7e911b1f7792077003060240* )
684 - # Automatically delete the old rules.d file if the user did not change it
685 - elog
686 - elog "Removing old ${old_rules} ..."
687 - rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
688 - ;;
689 - * )
690 - elog "The ${old_rules}"
691 - elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4"
692 - elog "If you edited ${old_rules}"
693 - elog "without changing its behavior, you may want to remove it."
694 - ;;
695 - esac
696 - fi
697 -
698 - # NM fallbacks to plugin specified at compile time (upstream bug #738611)
699 - # but still show a warning to remember people to have cleaner config file
700 - if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
701 - if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
702 - ewarn
703 - ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
704 - ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
705 - ewarn
706 - fi
707 - fi
708 -
709 - # NM shows lots of errors making nmcli neither unusable, bug #528748 upstream bug #690457
710 - if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
711 - ewarn "You have psk-flags=1 setting in above files, you will need to"
712 - ewarn "either reconfigure affected networks or, at least, set the flag"
713 - ewarn "value to '0'."
714 - fi
715 -}