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