1 |
commit: b3da92f330c0de5a4a5acd64fb19d845ae836b59 |
2 |
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 29 20:08:03 2016 +0000 |
4 |
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 29 20:09:16 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b3da92f3 |
7 |
|
8 |
Revert "net-misc/networkmanager: Drop old" |
9 |
Old versions still needed by some arches |
10 |
|
11 |
This reverts commit e9606f0e918e2ade8431684f3e40bc800cd0efcb. |
12 |
|
13 |
net-misc/networkmanager/Manifest | 1 + |
14 |
net-misc/networkmanager/files/1.2.4-upower.patch | 67 ++++ |
15 |
...anager-1.2.2-sleep-monitor-upower-include.patch | 30 ++ |
16 |
.../networkmanager/networkmanager-1.2.4.ebuild | 333 ++++++++++++++++++++ |
17 |
.../networkmanager/networkmanager-1.4.0.ebuild | 341 +++++++++++++++++++++ |
18 |
5 files changed, 772 insertions(+) |
19 |
|
20 |
diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest |
21 |
index 0c9fa51..c37c3c3 100644 |
22 |
--- a/net-misc/networkmanager/Manifest |
23 |
+++ b/net-misc/networkmanager/Manifest |
24 |
@@ -1,2 +1,3 @@ |
25 |
DIST NetworkManager-1.0.12.tar.xz 3490836 SHA256 3a470f8c60109b1acb5784ddc2423501706b5fe34c793a6faee87e591eb04a9e SHA512 926c0139dc7ade7bbc512f0d2e386a42a278aceff68996bc3a18fb1940f5d516f0ff2768459d6f50fd5669d72c15202307396bb3cf8b67c3dbac19db484b971c WHIRLPOOL 6178af61fb30a7e8b72cc05296a014a5be5b10fed41cd5385f0bebae1fa22519c83cf8c359479372f063fc2b891715015454c53cd4f1f1516fc03bca76a552ac |
26 |
+DIST NetworkManager-1.2.4.tar.xz 3728788 SHA256 19bfb7306dd472d010443a8027d91f9fd50fe6e0c5aa4ea8083845de0fa38faa SHA512 83fa179c0f360c7f40504cf58275e28638b5a986458c99adc85567595ca170ac3d081ffa0c99e5619c97d4a3228e5318e613330894547ad3438eaa2bfcc1f28b WHIRLPOOL 625cf2a32f5fb1e5ae537f2285f6945ca14f438959fb5556b490a90fe16eddcfb22e84c82f8f0f479f2387ec54ba292b18f28c0676375d729f9bb6a435d9e12b |
27 |
DIST NetworkManager-1.4.0.tar.xz 3699568 SHA256 c4d5e075998a291074501602a5068a7e54d9e0f2658aba079d58145d65be531d SHA512 2580e885684f6ad464eebdf9e0dab5432d4d45f0f4127af7f8947be16fc5ce84a5cc090e195b68619c14e218d9cffcde1615400c19326e58bdac8fdf7b53fb46 WHIRLPOOL 39607ac0606039c242b2033b9e540c3beb88e7f48fdb8188d942341a57e097dc0e9c7bde248b6d9ae65bd3ac94df83b5e7d7a371baf7f32c8542581c3bdf778c |
28 |
|
29 |
diff --git a/net-misc/networkmanager/files/1.2.4-upower.patch b/net-misc/networkmanager/files/1.2.4-upower.patch |
30 |
new file mode 100644 |
31 |
index 00000000..a08e34a |
32 |
--- /dev/null |
33 |
+++ b/net-misc/networkmanager/files/1.2.4-upower.patch |
34 |
@@ -0,0 +1,67 @@ |
35 |
+From f864c58cfe87533c69dcf00e3ea236809392a8e0 Mon Sep 17 00:00:00 2001 |
36 |
+From: Beniamino Galvani <bgalvani@××××××.com> |
37 |
+Date: Thu, 4 Aug 2016 16:25:30 +0200 |
38 |
+Subject: build: fix build with '--with-suspend-resume=upower' |
39 |
+ |
40 |
+Now we have a single file for all suspend APIs and the selection is |
41 |
+done through the preprocessor: remove stale AM_CONDITIONALs and define |
42 |
+SUSPEND_RESUME_UPOWER when needed. |
43 |
+ |
44 |
+Fixes: c76eb3e8f7a80b69c570b513ee3eb16bea1b34bd |
45 |
+(cherry picked from commit e4b2c989dc51818e52906b5120ea6a0659274631) |
46 |
+ |
47 |
+diff --git a/configure.ac b/configure.ac |
48 |
+index 46775c3..7869f07 100644 |
49 |
+--- a/configure.ac |
50 |
++++ b/configure.ac |
51 |
+@@ -472,7 +472,9 @@ if test "z$with_suspend_resume" = "z"; then |
52 |
+ fi |
53 |
+ |
54 |
+ case $with_suspend_resume in |
55 |
+- upower) ;; |
56 |
++ upower) |
57 |
++ AC_DEFINE([SUSPEND_RESUME_UPOWER], 1, [Define to 1 to use UPower suspend api]) |
58 |
++ ;; |
59 |
+ systemd) |
60 |
+ PKG_CHECK_MODULES(SYSTEMD_INHIBIT, [libsystemd >= 209],, |
61 |
+ [PKG_CHECK_MODULES(SYSTEMD_INHIBIT, [libsystemd-login >= 183])]) |
62 |
+@@ -485,9 +487,6 @@ case $with_suspend_resume in |
63 |
+ AC_MSG_ERROR(--with-suspend-resume must be one of [upower, systemd, consolekit]) |
64 |
+ ;; |
65 |
+ esac |
66 |
+-AM_CONDITIONAL(SUSPEND_RESUME_UPOWER, test "x$with_suspend_resume" = "xupower") |
67 |
+-AM_CONDITIONAL(SUSPEND_RESUME_SYSTEMD, test "x$with_suspend_resume" = "xsystemd") |
68 |
+-AM_CONDITIONAL(SUSPEND_RESUME_CONSOLEKIT, test "x$with_suspend_resume" = "xconsolekit") |
69 |
+ |
70 |
+ # SELinux support |
71 |
+ AC_ARG_WITH(selinux, AS_HELP_STRING([--with-selinux=yes|no|auto], [Build with SELinux (default: auto)]),,[with_selinux=auto]) |
72 |
+-- |
73 |
+cgit v0.10.2 |
74 |
+ |
75 |
+--- a/config.h.in |
76 |
++++ b/config.h.in |
77 |
+@@ -216,6 +216,9 @@ |
78 |
+ /* Define to 1 to use systemd suspend api */ |
79 |
+ #undef SUSPEND_RESUME_SYSTEMD |
80 |
+ |
81 |
++/* Define to 1 to use UPower suspend api */ |
82 |
++#undef SUSPEND_RESUME_UPOWER |
83 |
++ |
84 |
+ /* Define to 1 if libsystemd-journald is available */ |
85 |
+ #undef SYSTEMD_JOURNAL |
86 |
+ |
87 |
+--- a/configure |
88 |
++++ b/configure |
89 |
+@@ -22776,7 +22776,11 @@ |
90 |
+ fi |
91 |
+ |
92 |
+ case $with_suspend_resume in |
93 |
+- upower) ;; |
94 |
++ upower) |
95 |
++ |
96 |
++$as_echo "#define SUSPEND_RESUME_UPOWER 1" >>confdefs.h |
97 |
++ |
98 |
++ ;; |
99 |
+ systemd) |
100 |
+ |
101 |
+ pkg_failed=no |
102 |
|
103 |
diff --git a/net-misc/networkmanager/files/networkmanager-1.2.2-sleep-monitor-upower-include.patch b/net-misc/networkmanager/files/networkmanager-1.2.2-sleep-monitor-upower-include.patch |
104 |
new file mode 100644 |
105 |
index 00000000..52a21c4 |
106 |
--- /dev/null |
107 |
+++ b/net-misc/networkmanager/files/networkmanager-1.2.2-sleep-monitor-upower-include.patch |
108 |
@@ -0,0 +1,30 @@ |
109 |
+From 10ba492047b1ad80adeeb878e7f155a13638da7f Mon Sep 17 00:00:00 2001 |
110 |
+From: Michael Olbrich <m.olbrich@×××××××××××.de> |
111 |
+Date: Wed, 18 May 2016 10:43:51 +0200 |
112 |
+Subject: [PATCH] sleep-monitor-upower: add missing include |
113 |
+ |
114 |
+Otherwise building fails with: |
115 |
+ |
116 |
+ nm-sleep-monitor-upower.c:132:45: error: expected declaration specifiers or '...' before 'nm_sleep_monitor_get' |
117 |
+ nm-sleep-monitor-upower.c:132:67: error: expected declaration specifiers or '...' before '(' token |
118 |
+ |
119 |
+https://mail.gnome.org/archives/networkmanager-list/2016-May/msg00053.html |
120 |
+--- |
121 |
+ src/nm-sleep-monitor-upower.c | 1 + |
122 |
+ 1 file changed, 1 insertion(+) |
123 |
+ |
124 |
+diff --git a/src/nm-sleep-monitor-upower.c b/src/nm-sleep-monitor-upower.c |
125 |
+index 5f0ff24..8d07190 100644 |
126 |
+--- a/src/nm-sleep-monitor-upower.c |
127 |
++++ b/src/nm-sleep-monitor-upower.c |
128 |
+@@ -24,6 +24,7 @@ |
129 |
+ #include <sys/stat.h> |
130 |
+ |
131 |
+ #include "nm-core-internal.h" |
132 |
++#include "NetworkManagerUtils.h" |
133 |
+ |
134 |
+ #include "nm-sleep-monitor.h" |
135 |
+ |
136 |
+-- |
137 |
+2.9.0 |
138 |
+ |
139 |
|
140 |
diff --git a/net-misc/networkmanager/networkmanager-1.2.4.ebuild b/net-misc/networkmanager/networkmanager-1.2.4.ebuild |
141 |
new file mode 100644 |
142 |
index 00000000..773be0e |
143 |
--- /dev/null |
144 |
+++ b/net-misc/networkmanager/networkmanager-1.2.4.ebuild |
145 |
@@ -0,0 +1,333 @@ |
146 |
+# Copyright 1999-2016 Gentoo Foundation |
147 |
+# Distributed under the terms of the GNU General Public License v2 |
148 |
+# $Id$ |
149 |
+ |
150 |
+EAPI=6 |
151 |
+GNOME_ORG_MODULE="NetworkManager" |
152 |
+GNOME2_LA_PUNT="yes" |
153 |
+VALA_USE_DEPEND="vapigen" |
154 |
+PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} ) |
155 |
+ |
156 |
+inherit bash-completion-r1 gnome2 linux-info multilib python-any-r1 systemd \ |
157 |
+ user readme.gentoo-r1 toolchain-funcs vala versionator virtualx udev multilib-minimal |
158 |
+ |
159 |
+DESCRIPTION="A set of co-operative tools that make networking simple and straightforward" |
160 |
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager" |
161 |
+ |
162 |
+LICENSE="GPL-2+" |
163 |
+SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version |
164 |
+ |
165 |
+IUSE="bluetooth connection-sharing consolekit +dhclient gnutls +introspection \ |
166 |
+kernel_linux +nss +modemmanager ncurses +ppp resolvconf selinux systemd teamd test \ |
167 |
+vala +wext +wifi" |
168 |
+ |
169 |
+REQUIRED_USE=" |
170 |
+ modemmanager? ( ppp ) |
171 |
+ wext? ( wifi ) |
172 |
+ ^^ ( nss gnutls ) |
173 |
+" |
174 |
+ |
175 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
176 |
+ |
177 |
+# gobject-introspection-0.10.3 is needed due to gnome bug 642300 |
178 |
+# wpa_supplicant-0.7.3-r3 is needed due to bug 359271 |
179 |
+COMMON_DEPEND=" |
180 |
+ >=sys-apps/dbus-1.2[${MULTILIB_USEDEP}] |
181 |
+ >=dev-libs/dbus-glib-0.100[${MULTILIB_USEDEP}] |
182 |
+ >=dev-libs/glib-2.37.6:2[${MULTILIB_USEDEP}] |
183 |
+ >=dev-libs/libnl-3.2.8:3= |
184 |
+ >=sys-auth/polkit-0.106 |
185 |
+ net-libs/libndp |
186 |
+ >=net-libs/libsoup-2.40:2.4= |
187 |
+ net-misc/iputils |
188 |
+ sys-libs/readline:0= |
189 |
+ >=virtual/libgudev-165:=[${MULTILIB_USEDEP}] |
190 |
+ bluetooth? ( >=net-wireless/bluez-5 ) |
191 |
+ connection-sharing? ( |
192 |
+ net-dns/dnsmasq[dhcp] |
193 |
+ net-firewall/iptables ) |
194 |
+ gnutls? ( |
195 |
+ dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}] |
196 |
+ >=net-libs/gnutls-2.12:=[${MULTILIB_USEDEP}] ) |
197 |
+ modemmanager? ( >=net-misc/modemmanager-0.7.991 ) |
198 |
+ ncurses? ( >=dev-libs/newt-0.52.15 ) |
199 |
+ nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] ) |
200 |
+ dhclient? ( >=net-misc/dhcp-4[client] ) |
201 |
+ introspection? ( >=dev-libs/gobject-introspection-0.10.3:= ) |
202 |
+ ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] ) |
203 |
+ resolvconf? ( net-dns/openresolv ) |
204 |
+ systemd? ( >=sys-apps/systemd-209:0= ) |
205 |
+ !systemd? ( || ( sys-power/upower sys-power/upower-pm-utils ) ) |
206 |
+ teamd? ( >=net-misc/libteam-1.9 ) |
207 |
+" |
208 |
+RDEPEND="${COMMON_DEPEND} |
209 |
+ consolekit? ( sys-auth/consolekit ) |
210 |
+ wifi? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] ) |
211 |
+" |
212 |
+DEPEND="${COMMON_DEPEND} |
213 |
+ dev-util/gdbus-codegen |
214 |
+ dev-util/gtk-doc-am |
215 |
+ >=dev-util/intltool-0.40 |
216 |
+ >=sys-devel/gettext-0.17 |
217 |
+ >=sys-kernel/linux-headers-2.6.29 |
218 |
+ virtual/pkgconfig |
219 |
+ vala? ( $(vala_depend) ) |
220 |
+ test? ( |
221 |
+ $(python_gen_any_dep ' |
222 |
+ dev-python/dbus-python[${PYTHON_USEDEP}] |
223 |
+ dev-python/pygobject:3[${PYTHON_USEDEP}]') |
224 |
+ ) |
225 |
+" |
226 |
+ |
227 |
+python_check_deps() { |
228 |
+ if use test; then |
229 |
+ has_version "dev-python/dbus-python[${PYTHON_USEDEP}]" && |
230 |
+ has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" |
231 |
+ else |
232 |
+ return 0 |
233 |
+ fi |
234 |
+} |
235 |
+ |
236 |
+sysfs_deprecated_check() { |
237 |
+ ebegin "Checking for SYSFS_DEPRECATED support" |
238 |
+ |
239 |
+ if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then |
240 |
+ eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel" |
241 |
+ eerror "or NetworkManager will not work correctly." |
242 |
+ eerror "See https://bugs.gentoo.org/333639 for more info." |
243 |
+ die "CONFIG_SYSFS_DEPRECATED_V2 support detected!" |
244 |
+ fi |
245 |
+ eend $? |
246 |
+} |
247 |
+ |
248 |
+pkg_pretend() { |
249 |
+ if use kernel_linux; then |
250 |
+ get_version |
251 |
+ if linux_config_exists; then |
252 |
+ sysfs_deprecated_check |
253 |
+ else |
254 |
+ ewarn "Was unable to determine your kernel .config" |
255 |
+ ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly." |
256 |
+ ewarn "See https://bugs.gentoo.org/333639 for more info." |
257 |
+ fi |
258 |
+ |
259 |
+ fi |
260 |
+} |
261 |
+ |
262 |
+pkg_setup() { |
263 |
+ enewgroup plugdev |
264 |
+} |
265 |
+ |
266 |
+src_prepare() { |
267 |
+ DOC_CONTENTS="To modify system network connections without needing to enter the |
268 |
+ root password, add your user account to the 'plugdev' group." |
269 |
+ |
270 |
+ local PATCHES=( |
271 |
+ # https://bugs.gentoo.org/590432 |
272 |
+ "${FILESDIR}/1.2.4-upower.patch" |
273 |
+ ) |
274 |
+ |
275 |
+ use vala && vala_src_prepare |
276 |
+ gnome2_src_prepare |
277 |
+} |
278 |
+ |
279 |
+multilib_src_configure() { |
280 |
+ local myconf=() |
281 |
+ |
282 |
+ # Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986 |
283 |
+ if use ppp; then |
284 |
+ local PPPD_VER=`best_version net-dialup/ppp` |
285 |
+ PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR} |
286 |
+ PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision |
287 |
+ myconf+=( --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER} ) |
288 |
+ fi |
289 |
+ |
290 |
+ # unit files directory needs to be passed only when systemd is enabled, |
291 |
+ # otherwise systemd support is not disabled completely, bug #524534 |
292 |
+ use systemd && myconf+=( --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" ) |
293 |
+ |
294 |
+ if multilib_is_native_abi; then |
295 |
+ # work-around man out-of-source brokenness, must be done before configure |
296 |
+ mkdir man || die |
297 |
+ find "${S}"/man -name '*.?' -exec ln -s {} man/ ';' || die |
298 |
+ else |
299 |
+ # libnl, libndp are only used for executables, not libraries |
300 |
+ myconf+=( LIB{NL,NDP}_{CFLAGS,LIBS}=' ' ) |
301 |
+ fi |
302 |
+ |
303 |
+ # ifnet plugin always disabled until someone volunteers to actively |
304 |
+ # maintain and fix it |
305 |
+ # Also disable dhcpcd support as it's also completely unmaintained |
306 |
+ # and facing bugs like #563938 and many others |
307 |
+ # |
308 |
+ # We need --with-libnm-glib (and dbus-glib dep) as reverse deps are |
309 |
+ # still not ready for removing that lib |
310 |
+ ECONF_SOURCE=${S} \ |
311 |
+ runstatedir="/run" \ |
312 |
+ gnome2_src_configure \ |
313 |
+ --disable-more-warnings \ |
314 |
+ --disable-static \ |
315 |
+ --localstatedir=/var \ |
316 |
+ --disable-lto \ |
317 |
+ --disable-config-plugin-ibft \ |
318 |
+ --disable-ifnet \ |
319 |
+ --disable-qt \ |
320 |
+ --without-netconfig \ |
321 |
+ --with-dbus-sys-dir=/etc/dbus-1/system.d \ |
322 |
+ --with-libnm-glib \ |
323 |
+ --with-nmcli=yes \ |
324 |
+ --with-udev-dir="$(get_udevdir)" \ |
325 |
+ --with-config-plugins-default=keyfile \ |
326 |
+ --with-iptables=/sbin/iptables \ |
327 |
+ $(multilib_native_with libsoup) \ |
328 |
+ $(multilib_native_enable concheck) \ |
329 |
+ --with-crypto=$(usex nss nss gnutls) \ |
330 |
+ --with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex consolekit consolekit no)) \ |
331 |
+ --with-suspend-resume=$(multilib_native_usex systemd systemd upower) \ |
332 |
+ $(multilib_native_use_enable bluetooth bluez5-dun) \ |
333 |
+ $(multilib_native_use_enable introspection) \ |
334 |
+ $(multilib_native_use_enable ppp) \ |
335 |
+ $(use_with dhclient) \ |
336 |
+ --without-dhcpcd \ |
337 |
+ $(multilib_native_use_with modemmanager modem-manager-1) \ |
338 |
+ $(multilib_native_use_with ncurses nmtui) \ |
339 |
+ $(multilib_native_use_with resolvconf) \ |
340 |
+ $(multilib_native_use_with selinux) \ |
341 |
+ $(multilib_native_use_with systemd systemd-journal) \ |
342 |
+ $(multilib_native_use_enable teamd teamdctl) \ |
343 |
+ $(multilib_native_use_enable test tests) \ |
344 |
+ $(multilib_native_use_enable vala) \ |
345 |
+ --without-valgrind \ |
346 |
+ $(multilib_native_use_with wext) \ |
347 |
+ $(multilib_native_use_enable wifi) \ |
348 |
+ "${myconf[@]}" |
349 |
+ |
350 |
+ # work-around gtk-doc out-of-source brokedness |
351 |
+ if multilib_is_native_abi; then |
352 |
+ local d |
353 |
+ for d in api libnm libnm-util libnm-glib; do |
354 |
+ ln -s "${S}"/docs/${d}/html docs/${d}/html || die |
355 |
+ done |
356 |
+ fi |
357 |
+ |
358 |
+ # Disable examples |
359 |
+ # https://bugzilla.gnome.org/show_bug.cgi?id=769711 |
360 |
+ cat > examples/Makefile <<-EOF |
361 |
+ .PHONY: all check install |
362 |
+ all: |
363 |
+ check: |
364 |
+ install: |
365 |
+ EOF |
366 |
+} |
367 |
+ |
368 |
+multilib_src_compile() { |
369 |
+ if multilib_is_native_abi; then |
370 |
+ emake |
371 |
+ else |
372 |
+ emake all-am |
373 |
+ emake -C shared |
374 |
+ emake -C introspection # generated headers, needed for libnm |
375 |
+ emake -C libnm-core |
376 |
+ emake -C libnm |
377 |
+ emake -C libnm-util |
378 |
+ emake -C libnm-glib |
379 |
+ fi |
380 |
+} |
381 |
+ |
382 |
+multilib_src_test() { |
383 |
+ if use test && multilib_is_native_abi; then |
384 |
+ python_setup |
385 |
+ virtx emake check |
386 |
+ fi |
387 |
+} |
388 |
+ |
389 |
+multilib_src_install() { |
390 |
+ if multilib_is_native_abi; then |
391 |
+ # Install completions at proper place, bug #465100 |
392 |
+ gnome2_src_install completiondir="$(get_bashcompdir)" |
393 |
+ else |
394 |
+ emake DESTDIR="${D}" install-am |
395 |
+ emake DESTDIR="${D}" install -C shared |
396 |
+ emake DESTDIR="${D}" install -C introspection |
397 |
+ emake DESTDIR="${D}" install -C libnm-core |
398 |
+ emake DESTDIR="${D}" install -C libnm |
399 |
+ emake DESTDIR="${D}" install -C libnm-util |
400 |
+ emake DESTDIR="${D}" install -C libnm-glib |
401 |
+ fi |
402 |
+} |
403 |
+ |
404 |
+multilib_src_install_all() { |
405 |
+ ! use systemd && readme.gentoo_create_doc |
406 |
+ |
407 |
+ newinitd "${FILESDIR}/init.d.NetworkManager" NetworkManager |
408 |
+ newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager |
409 |
+ |
410 |
+ # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts |
411 |
+ keepdir /etc/NetworkManager/dispatcher.d |
412 |
+ |
413 |
+ # Provide openrc net dependency only when nm is connected |
414 |
+ exeinto /etc/NetworkManager/dispatcher.d |
415 |
+ newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status |
416 |
+ sed -e "s:@EPREFIX@:${EPREFIX}:g" \ |
417 |
+ -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die |
418 |
+ |
419 |
+ keepdir /etc/NetworkManager/system-connections |
420 |
+ chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594 |
421 |
+ |
422 |
+ # Allow users in plugdev group to modify system connections |
423 |
+ insinto /usr/share/polkit-1/rules.d/ |
424 |
+ doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules" |
425 |
+ |
426 |
+ # Remove empty /run/NetworkManager |
427 |
+ rmdir "${D}"/run/NetworkManager "${D}"/run || die |
428 |
+} |
429 |
+ |
430 |
+pkg_postinst() { |
431 |
+ gnome2_pkg_postinst |
432 |
+ ! use systemd && readme.gentoo_print_elog |
433 |
+ |
434 |
+ if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then |
435 |
+ ewarn "The ${PN} system configuration file has moved to a new location." |
436 |
+ ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf" |
437 |
+ ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf" |
438 |
+ ewarn |
439 |
+ ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf" |
440 |
+ fi |
441 |
+ |
442 |
+ # The polkit rules file moved to /usr/share |
443 |
+ old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules" |
444 |
+ if [[ -f "${old_rules}" ]]; then |
445 |
+ case "$(md5sum ${old_rules})" in |
446 |
+ 574d0cfa7e911b1f7792077003060240* ) |
447 |
+ # Automatically delete the old rules.d file if the user did not change it |
448 |
+ elog |
449 |
+ elog "Removing old ${old_rules} ..." |
450 |
+ rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually" |
451 |
+ ;; |
452 |
+ * ) |
453 |
+ elog "The ${old_rules}" |
454 |
+ elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4" |
455 |
+ elog "If you edited ${old_rules}" |
456 |
+ elog "without changing its behavior, you may want to remove it." |
457 |
+ ;; |
458 |
+ esac |
459 |
+ fi |
460 |
+ |
461 |
+ # NM fallbacks to plugin specified at compile time (upstream bug #738611) |
462 |
+ # but still show a warning to remember people to have cleaner config file |
463 |
+ if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then |
464 |
+ if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then |
465 |
+ ewarn |
466 |
+ ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf" |
467 |
+ ewarn "Since it won't be used, you will need to stop setting ifnet plugin there." |
468 |
+ ewarn |
469 |
+ fi |
470 |
+ fi |
471 |
+ |
472 |
+ # NM shows lots of errors making nmcli neither unusable, bug #528748 upstream bug #690457 |
473 |
+ if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then |
474 |
+ ewarn "You have psk-flags=1 setting in above files, you will need to" |
475 |
+ ewarn "either reconfigure affected networks or, at least, set the flag" |
476 |
+ ewarn "value to '0'." |
477 |
+ fi |
478 |
+} |
479 |
|
480 |
diff --git a/net-misc/networkmanager/networkmanager-1.4.0.ebuild b/net-misc/networkmanager/networkmanager-1.4.0.ebuild |
481 |
new file mode 100644 |
482 |
index 00000000..c735125 |
483 |
--- /dev/null |
484 |
+++ b/net-misc/networkmanager/networkmanager-1.4.0.ebuild |
485 |
@@ -0,0 +1,341 @@ |
486 |
+# Copyright 1999-2016 Gentoo Foundation |
487 |
+# Distributed under the terms of the GNU General Public License v2 |
488 |
+# $Id$ |
489 |
+ |
490 |
+EAPI=6 |
491 |
+GNOME_ORG_MODULE="NetworkManager" |
492 |
+GNOME2_LA_PUNT="yes" |
493 |
+VALA_USE_DEPEND="vapigen" |
494 |
+PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} ) |
495 |
+ |
496 |
+inherit bash-completion-r1 gnome2 linux-info multilib python-any-r1 systemd \ |
497 |
+ user readme.gentoo-r1 toolchain-funcs vala versionator virtualx udev multilib-minimal |
498 |
+ |
499 |
+DESCRIPTION="A set of co-operative tools that make networking simple and straightforward" |
500 |
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager" |
501 |
+ |
502 |
+LICENSE="GPL-2+" |
503 |
+SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version |
504 |
+ |
505 |
+IUSE="audit bluetooth connection-sharing consolekit +dhclient gnutls +introspection \ |
506 |
+json kernel_linux +nss +modemmanager ncurses ofono +ppp resolvconf selinux \ |
507 |
+systemd teamd test vala +wext +wifi" |
508 |
+ |
509 |
+REQUIRED_USE=" |
510 |
+ modemmanager? ( ppp ) |
511 |
+ vala? ( introspection ) |
512 |
+ wext? ( wifi ) |
513 |
+ ^^ ( nss gnutls ) |
514 |
+" |
515 |
+ |
516 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" |
517 |
+ |
518 |
+# gobject-introspection-0.10.3 is needed due to gnome bug 642300 |
519 |
+# wpa_supplicant-0.7.3-r3 is needed due to bug 359271 |
520 |
+# TODO: need multilib janson (linked to libnm.so) |
521 |
+COMMON_DEPEND=" |
522 |
+ >=sys-apps/dbus-1.2[${MULTILIB_USEDEP}] |
523 |
+ >=dev-libs/dbus-glib-0.100[${MULTILIB_USEDEP}] |
524 |
+ >=dev-libs/glib-2.37.6:2[${MULTILIB_USEDEP}] |
525 |
+ >=dev-libs/libnl-3.2.8:3= |
526 |
+ >=sys-auth/polkit-0.106 |
527 |
+ net-libs/libndp |
528 |
+ >=net-libs/libsoup-2.40:2.4= |
529 |
+ net-misc/iputils |
530 |
+ sys-libs/readline:0= |
531 |
+ >=virtual/libgudev-165:=[${MULTILIB_USEDEP}] |
532 |
+ audit? ( sys-process/audit ) |
533 |
+ bluetooth? ( >=net-wireless/bluez-5 ) |
534 |
+ connection-sharing? ( |
535 |
+ net-dns/dnsmasq[dhcp] |
536 |
+ net-firewall/iptables ) |
537 |
+ consolekit? ( >=sys-auth/consolekit-1.0.0 ) |
538 |
+ dhclient? ( >=net-misc/dhcp-4[client] ) |
539 |
+ gnutls? ( |
540 |
+ dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}] |
541 |
+ >=net-libs/gnutls-2.12:=[${MULTILIB_USEDEP}] ) |
542 |
+ introspection? ( >=dev-libs/gobject-introspection-0.10.3:= ) |
543 |
+ json? ( dev-libs/jansson ) |
544 |
+ modemmanager? ( >=net-misc/modemmanager-0.7.991 ) |
545 |
+ ncurses? ( >=dev-libs/newt-0.52.15 ) |
546 |
+ nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] ) |
547 |
+ ofono? ( net-misc/ofono ) |
548 |
+ ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] ) |
549 |
+ resolvconf? ( net-dns/openresolv ) |
550 |
+ selinux? ( sys-libs/libselinux ) |
551 |
+ systemd? ( >=sys-apps/systemd-209:0= ) |
552 |
+ !systemd? ( |
553 |
+ !consolekit? ( || ( sys-power/upower sys-power/upower-pm-utils ) ) |
554 |
+ ) |
555 |
+ teamd? ( >=net-misc/libteam-1.9 ) |
556 |
+" |
557 |
+RDEPEND="${COMMON_DEPEND} |
558 |
+ wifi? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] ) |
559 |
+" |
560 |
+DEPEND="${COMMON_DEPEND} |
561 |
+ dev-util/gdbus-codegen |
562 |
+ dev-util/gtk-doc-am |
563 |
+ >=dev-util/intltool-0.40 |
564 |
+ >=sys-devel/gettext-0.17 |
565 |
+ >=sys-kernel/linux-headers-2.6.29 |
566 |
+ virtual/pkgconfig[${MULTILIB_USEDEP}] |
567 |
+ vala? ( $(vala_depend) ) |
568 |
+ test? ( |
569 |
+ $(python_gen_any_dep ' |
570 |
+ dev-python/dbus-python[${PYTHON_USEDEP}] |
571 |
+ dev-python/pygobject:3[${PYTHON_USEDEP}]') |
572 |
+ ) |
573 |
+" |
574 |
+ |
575 |
+python_check_deps() { |
576 |
+ if use test; then |
577 |
+ has_version "dev-python/dbus-python[${PYTHON_USEDEP}]" && |
578 |
+ has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" |
579 |
+ else |
580 |
+ return 0 |
581 |
+ fi |
582 |
+} |
583 |
+ |
584 |
+sysfs_deprecated_check() { |
585 |
+ ebegin "Checking for SYSFS_DEPRECATED support" |
586 |
+ |
587 |
+ if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then |
588 |
+ eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel" |
589 |
+ eerror "or NetworkManager will not work correctly." |
590 |
+ eerror "See https://bugs.gentoo.org/333639 for more info." |
591 |
+ die "CONFIG_SYSFS_DEPRECATED_V2 support detected!" |
592 |
+ fi |
593 |
+ eend $? |
594 |
+} |
595 |
+ |
596 |
+pkg_pretend() { |
597 |
+ if use kernel_linux; then |
598 |
+ get_version |
599 |
+ if linux_config_exists; then |
600 |
+ sysfs_deprecated_check |
601 |
+ else |
602 |
+ ewarn "Was unable to determine your kernel .config" |
603 |
+ ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly." |
604 |
+ ewarn "See https://bugs.gentoo.org/333639 for more info." |
605 |
+ fi |
606 |
+ |
607 |
+ fi |
608 |
+} |
609 |
+ |
610 |
+pkg_setup() { |
611 |
+ enewgroup plugdev |
612 |
+ |
613 |
+ use test && python-any-r1_pkg_setup |
614 |
+} |
615 |
+ |
616 |
+src_prepare() { |
617 |
+ DOC_CONTENTS="To modify system network connections without needing to enter the |
618 |
+ root password, add your user account to the 'plugdev' group." |
619 |
+ |
620 |
+ use vala && vala_src_prepare |
621 |
+ gnome2_src_prepare |
622 |
+} |
623 |
+ |
624 |
+multilib_src_configure() { |
625 |
+ local myconf=() |
626 |
+ |
627 |
+ # Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986 |
628 |
+ if use ppp; then |
629 |
+ local PPPD_VER=`best_version net-dialup/ppp` |
630 |
+ PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR} |
631 |
+ PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision |
632 |
+ myconf+=( --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER} ) |
633 |
+ fi |
634 |
+ |
635 |
+ # unit files directory needs to be passed only when systemd is enabled, |
636 |
+ # otherwise systemd support is not disabled completely, bug #524534 |
637 |
+ use systemd && myconf+=( --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" ) |
638 |
+ |
639 |
+ if multilib_is_native_abi; then |
640 |
+ # work-around man out-of-source brokenness, must be done before configure |
641 |
+ mkdir man || die |
642 |
+ find "${S}"/man -name '*.?' -exec ln -s {} man/ ';' || die |
643 |
+ else |
644 |
+ # libnl, libndp are only used for executables, not libraries |
645 |
+ myconf+=( LIB{NL,NDP}_{CFLAGS,LIBS}=' ' ) |
646 |
+ fi |
647 |
+ |
648 |
+ # ifnet plugin always disabled until someone volunteers to actively |
649 |
+ # maintain and fix it |
650 |
+ # Also disable dhcpcd support as it's also completely unmaintained |
651 |
+ # and facing bugs like #563938 and many others |
652 |
+ # |
653 |
+ # We need --with-libnm-glib (and dbus-glib dep) as reverse deps are |
654 |
+ # still not ready for removing that lib |
655 |
+ ECONF_SOURCE=${S} \ |
656 |
+ runstatedir="/run" \ |
657 |
+ gnome2_src_configure \ |
658 |
+ --disable-more-warnings \ |
659 |
+ --disable-static \ |
660 |
+ --localstatedir=/var \ |
661 |
+ --disable-lto \ |
662 |
+ --disable-config-plugin-ibft \ |
663 |
+ --disable-ifnet \ |
664 |
+ --disable-qt \ |
665 |
+ --without-netconfig \ |
666 |
+ --with-dbus-sys-dir=/etc/dbus-1/system.d \ |
667 |
+ --with-libnm-glib \ |
668 |
+ --with-nmcli=yes \ |
669 |
+ --with-udev-dir="$(get_udevdir)" \ |
670 |
+ --with-config-plugins-default=keyfile \ |
671 |
+ --with-iptables=/sbin/iptables \ |
672 |
+ $(multilib_native_with libsoup) \ |
673 |
+ $(multilib_native_enable concheck) \ |
674 |
+ --with-crypto=$(usex nss nss gnutls) \ |
675 |
+ --with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex consolekit consolekit no)) \ |
676 |
+ --with-suspend-resume=$(multilib_native_usex systemd systemd $(multilib_native_usex consolekit consolekit upower)) \ |
677 |
+ $(multilib_native_use_with audit libaudit) \ |
678 |
+ $(multilib_native_use_enable bluetooth bluez5-dun) \ |
679 |
+ $(multilib_native_use_enable introspection) \ |
680 |
+ $(multilib_native_use_enable json json-validation) \ |
681 |
+ $(multilib_native_use_enable ppp) \ |
682 |
+ $(use_with dhclient) \ |
683 |
+ --without-dhcpcd \ |
684 |
+ $(multilib_native_use_with modemmanager modem-manager-1) \ |
685 |
+ $(multilib_native_use_with ncurses nmtui) \ |
686 |
+ $(multilib_native_use_with ofono) \ |
687 |
+ $(multilib_native_use_with resolvconf) \ |
688 |
+ $(multilib_native_use_with selinux) \ |
689 |
+ $(multilib_native_use_with systemd systemd-journal) \ |
690 |
+ $(multilib_native_use_enable teamd teamdctl) \ |
691 |
+ $(multilib_native_use_enable test tests) \ |
692 |
+ $(multilib_native_use_enable vala) \ |
693 |
+ --without-valgrind \ |
694 |
+ $(multilib_native_use_with wext) \ |
695 |
+ $(multilib_native_use_enable wifi) \ |
696 |
+ "${myconf[@]}" |
697 |
+ |
698 |
+ # work-around gtk-doc out-of-source brokedness |
699 |
+ if multilib_is_native_abi; then |
700 |
+ local d |
701 |
+ for d in api libnm libnm-util libnm-glib; do |
702 |
+ ln -s "${S}"/docs/${d}/html docs/${d}/html || die |
703 |
+ done |
704 |
+ fi |
705 |
+ |
706 |
+ # Disable examples |
707 |
+ # https://bugzilla.gnome.org/show_bug.cgi?id=769711 |
708 |
+ cat > examples/Makefile <<-EOF |
709 |
+ .PHONY: all check install |
710 |
+ all: |
711 |
+ check: |
712 |
+ install: |
713 |
+ EOF |
714 |
+} |
715 |
+ |
716 |
+multilib_src_compile() { |
717 |
+ if multilib_is_native_abi; then |
718 |
+ emake |
719 |
+ else |
720 |
+ emake all-am |
721 |
+ emake -C shared |
722 |
+ emake -C introspection # generated headers, needed for libnm |
723 |
+ emake -C libnm-core |
724 |
+ emake -C libnm |
725 |
+ emake -C libnm-util |
726 |
+ emake -C libnm-glib |
727 |
+ fi |
728 |
+} |
729 |
+ |
730 |
+multilib_src_test() { |
731 |
+ if use test && multilib_is_native_abi; then |
732 |
+ python_setup |
733 |
+ virtx emake check |
734 |
+ fi |
735 |
+} |
736 |
+ |
737 |
+multilib_src_install() { |
738 |
+ if multilib_is_native_abi; then |
739 |
+ # Install completions at proper place, bug #465100 |
740 |
+ gnome2_src_install completiondir="$(get_bashcompdir)" |
741 |
+ else |
742 |
+ emake DESTDIR="${D}" install-am |
743 |
+ emake DESTDIR="${D}" install -C shared |
744 |
+ emake DESTDIR="${D}" install -C introspection |
745 |
+ emake DESTDIR="${D}" install -C libnm-core |
746 |
+ emake DESTDIR="${D}" install -C libnm |
747 |
+ emake DESTDIR="${D}" install -C libnm-util |
748 |
+ emake DESTDIR="${D}" install -C libnm-glib |
749 |
+ fi |
750 |
+} |
751 |
+ |
752 |
+multilib_src_install_all() { |
753 |
+ ! use systemd && readme.gentoo_create_doc |
754 |
+ |
755 |
+ newinitd "${FILESDIR}/init.d.NetworkManager" NetworkManager |
756 |
+ newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager |
757 |
+ |
758 |
+ # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts |
759 |
+ keepdir /etc/NetworkManager/dispatcher.d |
760 |
+ |
761 |
+ # Provide openrc net dependency only when nm is connected |
762 |
+ exeinto /etc/NetworkManager/dispatcher.d |
763 |
+ newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status |
764 |
+ sed -e "s:@EPREFIX@:${EPREFIX}:g" \ |
765 |
+ -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die |
766 |
+ |
767 |
+ keepdir /etc/NetworkManager/system-connections |
768 |
+ chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594 |
769 |
+ |
770 |
+ # Allow users in plugdev group to modify system connections |
771 |
+ insinto /usr/share/polkit-1/rules.d/ |
772 |
+ doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules" |
773 |
+ |
774 |
+ # Remove empty /run/NetworkManager |
775 |
+ rmdir "${D}"/run/NetworkManager "${D}"/run || die |
776 |
+} |
777 |
+ |
778 |
+pkg_postinst() { |
779 |
+ gnome2_pkg_postinst |
780 |
+ ! use systemd && readme.gentoo_print_elog |
781 |
+ |
782 |
+ if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then |
783 |
+ ewarn "The ${PN} system configuration file has moved to a new location." |
784 |
+ ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf" |
785 |
+ ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf" |
786 |
+ ewarn |
787 |
+ ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf" |
788 |
+ fi |
789 |
+ |
790 |
+ # The polkit rules file moved to /usr/share |
791 |
+ old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules" |
792 |
+ if [[ -f "${old_rules}" ]]; then |
793 |
+ case "$(md5sum ${old_rules})" in |
794 |
+ 574d0cfa7e911b1f7792077003060240* ) |
795 |
+ # Automatically delete the old rules.d file if the user did not change it |
796 |
+ elog |
797 |
+ elog "Removing old ${old_rules} ..." |
798 |
+ rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually" |
799 |
+ ;; |
800 |
+ * ) |
801 |
+ elog "The ${old_rules}" |
802 |
+ elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4" |
803 |
+ elog "If you edited ${old_rules}" |
804 |
+ elog "without changing its behavior, you may want to remove it." |
805 |
+ ;; |
806 |
+ esac |
807 |
+ fi |
808 |
+ |
809 |
+ # NM fallbacks to plugin specified at compile time (upstream bug #738611) |
810 |
+ # but still show a warning to remember people to have cleaner config file |
811 |
+ if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then |
812 |
+ if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then |
813 |
+ ewarn |
814 |
+ ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf" |
815 |
+ ewarn "Since it won't be used, you will need to stop setting ifnet plugin there." |
816 |
+ ewarn |
817 |
+ fi |
818 |
+ fi |
819 |
+ |
820 |
+ # NM shows lots of errors making nmcli neither unusable, bug #528748 upstream bug #690457 |
821 |
+ if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then |
822 |
+ ewarn "You have psk-flags=1 setting in above files, you will need to" |
823 |
+ ewarn "either reconfigure affected networks or, at least, set the flag" |
824 |
+ ewarn "value to '0'." |
825 |
+ fi |
826 |
+} |