1 |
commit: 0ad6112466c595726e31beb479194e5e66308848 |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun May 30 23:58:24 2021 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon May 31 01:58:23 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ad61124 |
7 |
|
8 |
net-misc/networkmanager: Drop old versions |
9 |
|
10 |
Bug: https://bugs.gentoo.org/792345 |
11 |
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> |
12 |
|
13 |
net-misc/networkmanager/Manifest | 3 - |
14 |
...-1.20.6-dont_call_helpers_with_full_paths.patch | 12 - |
15 |
.../files/networkmanager-1.28.0-dhcpcd9.patch | 265 ---------------- |
16 |
...kmanager-1.30.2-iwd-autoconnect-fix-pr785.patch | 58 ---- |
17 |
net-misc/networkmanager/metadata.xml | 6 - |
18 |
.../networkmanager-1.22.10-r12.ebuild | 329 ------------------- |
19 |
.../networkmanager/networkmanager-1.28.0-r1.ebuild | 349 --------------------- |
20 |
.../networkmanager/networkmanager-1.30.2.ebuild | 349 --------------------- |
21 |
8 files changed, 1371 deletions(-) |
22 |
|
23 |
diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest |
24 |
index 906e2303119..362a102a8c4 100644 |
25 |
--- a/net-misc/networkmanager/Manifest |
26 |
+++ b/net-misc/networkmanager/Manifest |
27 |
@@ -1,4 +1 @@ |
28 |
-DIST NetworkManager-1.22.10.tar.bz2 6292347 BLAKE2B b6cb06a0630685714cdd3c8b8e1d788a6e979c2d7f232259e682fdc9e1f5569259731fdbbea65b6e8321561ecb8354b6f7a0b10843eb17cbe6f5937af8d9d898 SHA512 61b6214188a3cd281d0d5a5b8bfc402f8a19d8beaa6a3a2bd85983991cc66d62b2c3785d7ca652373903d53331610cd63a45d94bdb355196d939c48f42be29c1 |
29 |
-DIST NetworkManager-1.28.0.tar.xz 5129848 BLAKE2B 37dc9cda283dad29a70c85ed41a77844b4f60a9815be4b6780fbefecfeffb644fd67ea65373a1895fd2102f2beec9ad141b6e9a92a1a32de646d64acd4250b62 SHA512 ab0bc39626dc55df4e122ad6e1a8086e1467f44bdd41c4491c752dca3ffb549796e0ac888041f12f661f2f6cf4142d0fce59b5135549e48a0076fafcdc45ca06 |
30 |
-DIST NetworkManager-1.30.2.tar.xz 5302032 BLAKE2B 2fd30a09b479a4202c905ef29905d0672c0f4e07af15b0b124a626f160d150348e3d4b256386db43b91c4ac27c897f82269ede6e0f35f4b82905920494d070f2 SHA512 08482ac18814fd94bc99f0aa32de7d38c39d29c914a3080fb6df7ec2437b30f1aea1b5207edeae74ff63b9a181a4823cfa11e8884bc22ae80cb0b95f8cc3514e |
31 |
DIST NetworkManager-1.30.4.tar.xz 5303420 BLAKE2B c2d81fe03f75f4afd05cac06741d9e7fb0d2892bad30462788a39d9c84afd056614e8f8d3371f15f4de7398cc40a32861814498fc36911c43bbe8e43f5053cde SHA512 ca42907d0c0fc6a981d94798a5e264dd58c7d11576a8dd52c8ef6799334af46848091d872e9cec553714766c51457cbe12c5c2017eaac63abce968823b047624 |
32 |
|
33 |
diff --git a/net-misc/networkmanager/files/networkmanager-1.20.6-dont_call_helpers_with_full_paths.patch b/net-misc/networkmanager/files/networkmanager-1.20.6-dont_call_helpers_with_full_paths.patch |
34 |
deleted file mode 100644 |
35 |
index f7ce742c5d5..00000000000 |
36 |
--- a/net-misc/networkmanager/files/networkmanager-1.20.6-dont_call_helpers_with_full_paths.patch |
37 |
+++ /dev/null |
38 |
@@ -1,12 +0,0 @@ |
39 |
-We don't have sed in /usr/bin |
40 |
- |
41 |
---- NetworkManager-1.20.6/data/84-nm-drivers.rules |
42 |
-+++ NetworkManager-1.20.6/data/84-nm-drivers.rules |
43 |
-@@ -7,6 +7,6 @@ |
44 |
- # Determine ID_NET_DRIVER if there's no ID_NET_DRIVER or DRIVERS (old udev?) |
45 |
- ENV{ID_NET_DRIVER}=="?*", GOTO="nm_drivers_end" |
46 |
- DRIVERS=="?*", GOTO="nm_drivers_end" |
47 |
--PROGRAM="/bin/sh -c '/usr/sbin/ethtool -i $$1 |/usr/bin/sed -n s/^driver:\ //p' -- $env{INTERFACE}", ENV{ID_NET_DRIVER}="%c" |
48 |
-+PROGRAM="/bin/sh -c 'ethtool -i $$1 | sed -n s/^driver:\ //p' -- $env{INTERFACE}", ENV{ID_NET_DRIVER}="%c" |
49 |
- |
50 |
- LABEL="nm_drivers_end" |
51 |
|
52 |
diff --git a/net-misc/networkmanager/files/networkmanager-1.28.0-dhcpcd9.patch b/net-misc/networkmanager/files/networkmanager-1.28.0-dhcpcd9.patch |
53 |
deleted file mode 100644 |
54 |
index cfa642dd29b..00000000000 |
55 |
--- a/net-misc/networkmanager/files/networkmanager-1.28.0-dhcpcd9.patch |
56 |
+++ /dev/null |
57 |
@@ -1,265 +0,0 @@ |
58 |
-From a58a89213bf4d0cefb155fef1ec9425f7a6ca5c8 Mon Sep 17 00:00:00 2001 |
59 |
-From: Roy Marples <roy@×××××××.name> |
60 |
-Date: Tue, 19 Jan 2021 05:04:31 +0000 |
61 |
-Subject: [PATCH] DHCP: Support dhcpcd-9.x |
62 |
- |
63 |
-This locks NM into dhcpcd-9.3.3 as that is the first version to support |
64 |
-the --noconfigure option. Older versions are no longer supported by NM |
65 |
-because they do modify the host which is undesirable. |
66 |
- |
67 |
-Due to the way dhcpcd-9 uses privilege separation and that it re-parents |
68 |
-itself to PID 1, the main process cannot be reaped or waited for. |
69 |
-So we rely on dhcpcd correctly cleaning up after itself. |
70 |
-A new function nm_dhcp_client_stop_watch_child() has been added |
71 |
-so that dhcpcd can perform similar cleanup to the equivalent stop call. |
72 |
- |
73 |
-As part of this change, the STOP and STOPPED reasons are mapped to |
74 |
-NM_DHCP_STATE_DONE and PREINIT is mapped to a new state NM_DHCP_STATE_NOOP |
75 |
-which means NM should just ignore this state. |
76 |
- |
77 |
-https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/668 |
78 |
---- |
79 |
- NEWS | 3 ++ |
80 |
- src/dhcp/nm-dhcp-client.c | 20 +++++++++- |
81 |
- src/dhcp/nm-dhcp-client.h | 3 ++ |
82 |
- src/dhcp/nm-dhcp-dhcpcd.c | 82 ++++++++++++++++++++------------------- |
83 |
- 4 files changed, 67 insertions(+), 41 deletions(-) |
84 |
- |
85 |
-diff --git a/NEWS b/NEWS |
86 |
-index 8a48587e5..958bbe91c 100644 |
87 |
---- a/NEWS |
88 |
-+++ b/NEWS |
89 |
-@@ -45,6 +45,9 @@ USE AT YOUR OWN RISK. NOT RECOMMENDED FOR PRODUCTION USE! |
90 |
- cmdline argument actually generates a connection which disables both |
91 |
- ipv4 and ipv6. Previously the generated connection would disable ipv4 |
92 |
- but ipv6 would be set to the 'auto' method. |
93 |
-+* The dhcpcd plugin now requires a minimum version of dhcpcd-9.3.3 with |
94 |
-+ the --noconfigure option. Using an older version will cause dhcpcd to |
95 |
-+ exit with a status code of 1. |
96 |
- |
97 |
- ============================================= |
98 |
- NetworkManager-1.26 |
99 |
-diff --git a/src/dhcp/nm-dhcp-client.c b/src/dhcp/nm-dhcp-client.c |
100 |
-index 46ab48959..56f599abf 100644 |
101 |
---- a/src/dhcp/nm-dhcp-client.c |
102 |
-+++ b/src/dhcp/nm-dhcp-client.c |
103 |
-@@ -367,10 +367,13 @@ reason_to_state(NMDhcpClient *self, const char *iface, const char *reason) |
104 |
- else if (g_ascii_strcasecmp(reason, "nak") == 0 || g_ascii_strcasecmp(reason, "expire") == 0 |
105 |
- || g_ascii_strcasecmp(reason, "expire6") == 0) |
106 |
- return NM_DHCP_STATE_EXPIRE; |
107 |
-- else if (g_ascii_strcasecmp(reason, "end") == 0) |
108 |
-+ else if (g_ascii_strcasecmp(reason, "end") == 0 || g_ascii_strcasecmp(reason, "stop") == 0 |
109 |
-+ || g_ascii_strcasecmp(reason, "stopped") == 0) |
110 |
- return NM_DHCP_STATE_DONE; |
111 |
- else if (g_ascii_strcasecmp(reason, "fail") == 0 || g_ascii_strcasecmp(reason, "abend") == 0) |
112 |
- return NM_DHCP_STATE_FAIL; |
113 |
-+ else if (g_ascii_strcasecmp(reason, "preinit") == 0) |
114 |
-+ return NM_DHCP_STATE_NOOP; |
115 |
- |
116 |
- _LOGD("unmapped DHCP state '%s'", reason); |
117 |
- return NM_DHCP_STATE_UNKNOWN; |
118 |
-@@ -547,6 +550,18 @@ nm_dhcp_client_watch_child(NMDhcpClient *self, pid_t pid) |
119 |
- priv->watch_id = g_child_watch_add(pid, daemon_watch_cb, self); |
120 |
- } |
121 |
- |
122 |
-+void |
123 |
-+nm_dhcp_client_stop_watch_child(NMDhcpClient *self, pid_t pid) |
124 |
-+{ |
125 |
-+ NMDhcpClientPrivate *priv = NM_DHCP_CLIENT_GET_PRIVATE(self); |
126 |
-+ |
127 |
-+ g_return_if_fail(priv->pid == pid); |
128 |
-+ priv->pid = -1; |
129 |
-+ |
130 |
-+ watch_cleanup(self); |
131 |
-+ timeout_cleanup(self); |
132 |
-+} |
133 |
-+ |
134 |
- gboolean |
135 |
- nm_dhcp_client_start_ip4(NMDhcpClient *self, |
136 |
- GBytes * client_id, |
137 |
-@@ -874,6 +889,9 @@ nm_dhcp_client_handle_event(gpointer unused, |
138 |
- state_to_string(new_state), |
139 |
- reason); |
140 |
- |
141 |
-+ if (new_state == NM_DHCP_STATE_NOOP) |
142 |
-+ return TRUE; |
143 |
-+ |
144 |
- if (NM_IN_SET(new_state, NM_DHCP_STATE_BOUND, NM_DHCP_STATE_EXTENDED)) { |
145 |
- GVariantIter iter; |
146 |
- const char * name; |
147 |
-diff --git a/src/dhcp/nm-dhcp-client.h b/src/dhcp/nm-dhcp-client.h |
148 |
-index 05faa9ea5..46446849a 100644 |
149 |
---- a/src/dhcp/nm-dhcp-client.h |
150 |
-+++ b/src/dhcp/nm-dhcp-client.h |
151 |
-@@ -55,6 +55,7 @@ typedef enum { |
152 |
- NM_DHCP_STATE_EXPIRE, /* lease expired or NAKed */ |
153 |
- NM_DHCP_STATE_FAIL, /* failed for some reason */ |
154 |
- NM_DHCP_STATE_TERMINATED, /* client is no longer running */ |
155 |
-+ NM_DHCP_STATE_NOOP, /* state is a non operation for NetworkManager */ |
156 |
- __NM_DHCP_STATE_MAX, |
157 |
- NM_DHCP_STATE_MAX = __NM_DHCP_STATE_MAX - 1, |
158 |
- } NMDhcpState; |
159 |
-@@ -183,6 +184,8 @@ void nm_dhcp_client_start_timeout(NMDhcpClient *self); |
160 |
- |
161 |
- void nm_dhcp_client_watch_child(NMDhcpClient *self, pid_t pid); |
162 |
- |
163 |
-+void nm_dhcp_client_stop_watch_child(NMDhcpClient *self, pid_t pid); |
164 |
-+ |
165 |
- void nm_dhcp_client_set_state(NMDhcpClient *self, |
166 |
- NMDhcpState new_state, |
167 |
- NMIPConfig * ip_config, |
168 |
-diff --git a/src/dhcp/nm-dhcp-dhcpcd.c b/src/dhcp/nm-dhcp-dhcpcd.c |
169 |
-index b2b5d28bd..7cb003859 100644 |
170 |
---- a/src/dhcp/nm-dhcp-dhcpcd.c |
171 |
-+++ b/src/dhcp/nm-dhcp-dhcpcd.c |
172 |
-@@ -1,6 +1,6 @@ |
173 |
- /* SPDX-License-Identifier: GPL-2.0+ */ |
174 |
- /* |
175 |
-- * Copyright (C) 2008 Roy Marples |
176 |
-+ * Copyright (C) 2008,2020 Roy Marples <roy@×××××××.name> |
177 |
- * Copyright (C) 2010 Dan Williams <dcbw@××××××.com> |
178 |
- */ |
179 |
- |
180 |
-@@ -40,7 +40,6 @@ static GType nm_dhcp_dhcpcd_get_type(void); |
181 |
- /*****************************************************************************/ |
182 |
- |
183 |
- typedef struct { |
184 |
-- char * pid_file; |
185 |
- NMDhcpListener *dhcp_listener; |
186 |
- } NMDhcpDhcpcdPrivate; |
187 |
- |
188 |
-@@ -71,39 +70,37 @@ ip4_start(NMDhcpClient *client, |
189 |
- const char * last_ip4_address, |
190 |
- GError ** error) |
191 |
- { |
192 |
-- NMDhcpDhcpcd * self = NM_DHCP_DHCPCD(client); |
193 |
-- NMDhcpDhcpcdPrivate *priv = NM_DHCP_DHCPCD_GET_PRIVATE(self); |
194 |
-- gs_unref_ptrarray GPtrArray *argv = NULL; |
195 |
-- pid_t pid = -1; |
196 |
-- GError * local = NULL; |
197 |
-- gs_free char * cmd_str = NULL; |
198 |
-- gs_free char * binary_name = NULL; |
199 |
-+ NMDhcpDhcpcd * self = NM_DHCP_DHCPCD(client); |
200 |
-+ gs_unref_ptrarray GPtrArray *argv = NULL; |
201 |
-+ pid_t pid; |
202 |
-+ GError * local; |
203 |
-+ gs_free char * cmd_str = NULL; |
204 |
- const char * iface; |
205 |
- const char * dhcpcd_path; |
206 |
- const char * hostname; |
207 |
- |
208 |
-- g_return_val_if_fail(priv->pid_file == NULL, FALSE); |
209 |
-+ pid = nm_dhcp_client_get_pid(client); |
210 |
-+ g_return_val_if_fail(pid == -1, FALSE); |
211 |
- |
212 |
- iface = nm_dhcp_client_get_iface(client); |
213 |
- |
214 |
-- /* dhcpcd does not allow custom pidfiles; the pidfile is always |
215 |
-- * RUNSTATEDIR "dhcpcd-<ifname>.pid". |
216 |
-- */ |
217 |
-- priv->pid_file = g_strdup_printf(RUNSTATEDIR "/dhcpcd-%s.pid", iface); |
218 |
-- |
219 |
- dhcpcd_path = nm_dhcp_dhcpcd_get_path(); |
220 |
- if (!dhcpcd_path) { |
221 |
- nm_utils_error_set_literal(error, NM_UTILS_ERROR_UNKNOWN, "dhcpcd binary not found"); |
222 |
- return FALSE; |
223 |
- } |
224 |
- |
225 |
-- /* Kill any existing dhcpcd from the pidfile */ |
226 |
-- binary_name = g_path_get_basename(dhcpcd_path); |
227 |
-- nm_dhcp_client_stop_existing(priv->pid_file, binary_name); |
228 |
-- |
229 |
- argv = g_ptr_array_new(); |
230 |
- g_ptr_array_add(argv, (gpointer) dhcpcd_path); |
231 |
- |
232 |
-+ /* Don't configure anything, we will do that instead. |
233 |
-+ * This requires dhcpcd-9.3.3 or newer. |
234 |
-+ * Older versions only had an option not to install a default route, |
235 |
-+ * dhcpcd still added addresses and other routes so we no longer support that |
236 |
-+ * as it doesn't fit how NetworkManager wants to work. |
237 |
-+ */ |
238 |
-+ g_ptr_array_add(argv, (gpointer) "--noconfigure"); |
239 |
-+ |
240 |
- g_ptr_array_add(argv, (gpointer) "-B"); /* Don't background on lease (disable fork()) */ |
241 |
- |
242 |
- g_ptr_array_add(argv, (gpointer) "-K"); /* Disable built-in carrier detection */ |
243 |
-@@ -113,8 +110,6 @@ ip4_start(NMDhcpClient *client, |
244 |
- /* --noarp. Don't request or claim the address by ARP; this also disables IPv4LL. */ |
245 |
- g_ptr_array_add(argv, (gpointer) "-A"); |
246 |
- |
247 |
-- g_ptr_array_add(argv, (gpointer) "-G"); /* Let NM handle routing */ |
248 |
-- |
249 |
- g_ptr_array_add(argv, (gpointer) "-c"); /* Set script file */ |
250 |
- g_ptr_array_add(argv, (gpointer) nm_dhcp_helper_path); |
251 |
- |
252 |
-@@ -146,8 +141,8 @@ ip4_start(NMDhcpClient *client, |
253 |
- if (!g_spawn_async(NULL, |
254 |
- (char **) argv->pdata, |
255 |
- NULL, |
256 |
-- G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_STDOUT_TO_DEV_NULL |
257 |
-- | G_SPAWN_STDERR_TO_DEV_NULL, |
258 |
-+ G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL |
259 |
-+ | G_SPAWN_DO_NOT_REAP_CHILD, |
260 |
- nm_utils_setpgid, |
261 |
- NULL, |
262 |
- &pid, |
263 |
-@@ -169,23 +164,32 @@ ip4_start(NMDhcpClient *client, |
264 |
- static void |
265 |
- stop(NMDhcpClient *client, gboolean release) |
266 |
- { |
267 |
-- NMDhcpDhcpcd * self = NM_DHCP_DHCPCD(client); |
268 |
-- NMDhcpDhcpcdPrivate *priv = NM_DHCP_DHCPCD_GET_PRIVATE(self); |
269 |
-- int errsv; |
270 |
-- |
271 |
-- NM_DHCP_CLIENT_CLASS(nm_dhcp_dhcpcd_parent_class)->stop(client, release); |
272 |
-- |
273 |
-- if (priv->pid_file) { |
274 |
-- if (remove(priv->pid_file) == -1) { |
275 |
-- errsv = errno; |
276 |
-- _LOGD("could not remove dhcp pid file \"%s\": %d (%s)", |
277 |
-- priv->pid_file, |
278 |
-- errsv, |
279 |
-- nm_strerror_native(errsv)); |
280 |
-- } |
281 |
-+ NMDhcpDhcpcd *self = NM_DHCP_DHCPCD(client); |
282 |
-+ pid_t pid; |
283 |
-+ int sig, errsv; |
284 |
-+ |
285 |
-+ pid = nm_dhcp_client_get_pid(client); |
286 |
-+ sig = release ? SIGALRM : SIGTERM; |
287 |
-+ _LOGD("sending %s to dhcpcd pid %d", sig == SIGALRM ? "SIGALRM" : "SIGTERM", pid); |
288 |
-+ |
289 |
-+ /* dhcpcd-9.x features privilege separation. |
290 |
-+ * It's not our job to track all these processes so we rely on dhcpcd |
291 |
-+ * to always cleanup after itself. |
292 |
-+ * Because it also re-parents itself to PID 1, the process cannot be |
293 |
-+ * reaped or waited for. |
294 |
-+ * As such, just send the correct signal. |
295 |
-+ */ |
296 |
-+ if (kill(pid, sig) == -1) { |
297 |
-+ errsv = errno; |
298 |
-+ _LOGE("failed to kill dhcpcd %d:%s", errsv, strerror(errsv)); |
299 |
- } |
300 |
- |
301 |
-- /* FIXME: implement release... */ |
302 |
-+ /* When this function exits NM expects the PID to be -1. |
303 |
-+ * This means we also need to stop watching the pid. |
304 |
-+ * If we need to know the exit status then we need to refactor NM |
305 |
-+ * to allow a non -1 to mean we're waiting to exit still. |
306 |
-+ */ |
307 |
-+ nm_dhcp_client_stop_watch_child(client, pid); |
308 |
- } |
309 |
- |
310 |
- /*****************************************************************************/ |
311 |
-@@ -214,8 +218,6 @@ dispose(GObject *object) |
312 |
- g_clear_object(&priv->dhcp_listener); |
313 |
- } |
314 |
- |
315 |
-- nm_clear_g_free(&priv->pid_file); |
316 |
-- |
317 |
- G_OBJECT_CLASS(nm_dhcp_dhcpcd_parent_class)->dispose(object); |
318 |
- } |
319 |
- |
320 |
--- |
321 |
-2.30.0 |
322 |
- |
323 |
|
324 |
diff --git a/net-misc/networkmanager/files/networkmanager-1.30.2-iwd-autoconnect-fix-pr785.patch b/net-misc/networkmanager/files/networkmanager-1.30.2-iwd-autoconnect-fix-pr785.patch |
325 |
deleted file mode 100644 |
326 |
index 0e60ccdcb89..00000000000 |
327 |
--- a/net-misc/networkmanager/files/networkmanager-1.30.2-iwd-autoconnect-fix-pr785.patch |
328 |
+++ /dev/null |
329 |
@@ -1,58 +0,0 @@ |
330 |
-From 4409900f1d05bf60647492a75e478590647b997a Mon Sep 17 00:00:00 2001 |
331 |
-From: Andrew Zaborowski <andrew.zaborowski@×××××.com> |
332 |
-Date: Thu, 18 Mar 2021 00:21:31 +0100 |
333 |
-Subject: [PATCH] iwd: Don't call IWD methods when device unmanaged |
334 |
- |
335 |
-When using IWD-side autoconnect mode (current default), in .deactivate() |
336 |
-and .deactivate_async() refrain from commanding IWD to actually |
337 |
-disconnect until the device is managed. Likely the device is already |
338 |
-disconnected but in any case it's up to IWD to decide in this mode. |
339 |
- |
340 |
-Calling IWD device's .Disconnect() D-Bus method has the side effect of |
341 |
-disabling autoconnect and doing this while NM is still in platform-init |
342 |
-was unexpectedly leaving the device without autoconnect after |
343 |
-platform-init was done, according to user reports. |
344 |
- |
345 |
-Fixes: dc0e31fb7014d8a97aca96bf97a8f86f8236300c |
346 |
---- |
347 |
- src/core/devices/wifi/nm-device-iwd.c | 15 +++++++++++++-- |
348 |
- 1 file changed, 13 insertions(+), 2 deletions(-) |
349 |
- |
350 |
-diff --git a/src/core/devices/wifi/nm-device-iwd.c b/src/core/devices/wifi/nm-device-iwd.c |
351 |
-index 95ade44b58..01f2a30396 100644 |
352 |
---- a/src/core/devices/wifi/nm-device-iwd.c |
353 |
-+++ b/src/core/devices/wifi/nm-device-iwd.c |
354 |
-@@ -588,10 +588,16 @@ deactivate(NMDevice *device) |
355 |
- return; |
356 |
- } |
357 |
- |
358 |
-- cleanup_association_attempt(self, TRUE); |
359 |
-+ cleanup_association_attempt(self, FALSE); |
360 |
- priv->act_mode_switch = FALSE; |
361 |
- |
362 |
-- if (!priv->dbus_station_proxy) |
363 |
-+ /* Don't trigger any actions on the IWD side until the device is managed */ |
364 |
-+ if (priv->iwd_autoconnect && nm_device_get_state(device) < NM_DEVICE_STATE_DISCONNECTED) |
365 |
-+ return; |
366 |
-+ |
367 |
-+ if (priv->dbus_station_proxy) |
368 |
-+ send_disconnect(self); |
369 |
-+ else |
370 |
- reset_mode(self, NULL, NULL, NULL); |
371 |
- } |
372 |
- |
373 |
-@@ -647,6 +653,11 @@ deactivate_async(NMDevice * device, |
374 |
- cleanup_association_attempt(self, FALSE); |
375 |
- priv->act_mode_switch = FALSE; |
376 |
- |
377 |
-+ if (priv->iwd_autoconnect && nm_device_get_state(device) < NM_DEVICE_STATE_DISCONNECTED) { |
378 |
-+ nm_utils_invoke_on_idle(cancellable, disconnect_cb_on_idle, user_data); |
379 |
-+ return; |
380 |
-+ } |
381 |
-+ |
382 |
- if (priv->dbus_station_proxy) { |
383 |
- g_dbus_proxy_call(priv->dbus_station_proxy, |
384 |
- "Disconnect", |
385 |
--- |
386 |
-GitLab |
387 |
- |
388 |
|
389 |
diff --git a/net-misc/networkmanager/metadata.xml b/net-misc/networkmanager/metadata.xml |
390 |
index 808f71c5128..bad2d1a41b7 100644 |
391 |
--- a/net-misc/networkmanager/metadata.xml |
392 |
+++ b/net-misc/networkmanager/metadata.xml |
393 |
@@ -6,7 +6,6 @@ |
394 |
<name>Gentoo GNOME Desktop</name> |
395 |
</maintainer> |
396 |
<use> |
397 |
- <flag name="concheck">Enable connectivity checking support</flag> |
398 |
<flag name="connection-sharing">Use <pkg>net-dns/dnsmasq</pkg> and |
399 |
<pkg>net-firewall/iptables</pkg> for connection sharing</flag> |
400 |
<flag name="dhclient">Use dhclient from <pkg>net-misc/dhcp</pkg> for |
401 |
@@ -15,10 +14,6 @@ |
402 |
<flag name="elogind">Use <pkg>sys-auth/elogind</pkg> for session tracking</flag> |
403 |
<flag name="iwd">Use <pkg>net-wireless/iwd</pkg> instead of |
404 |
<pkg>net-wireless/wpa_supplicant</pkg> for wifi support by default</flag> |
405 |
- <flag name="json">Enable JSON validation via <pkg>dev-libs/jansson</pkg> |
406 |
- in libnm.</flag> |
407 |
- <flag name="libpsl">Link against libpsl</flag> |
408 |
- <flag name="lto">Link-time optimization</flag> |
409 |
<flag name="modemmanager">Enable support for mobile broadband devices |
410 |
using <pkg>net-misc/modemmanager</pkg></flag> |
411 |
<flag name="nss">Use <pkg>dev-libs/nss</pkg> for cryptography</flag> |
412 |
@@ -32,7 +27,6 @@ |
413 |
systemd-resolved, disable this flag and create a symlink to |
414 |
/run/systemd/resolve/stub-resolv.conf.</flag> |
415 |
<flag name="teamd">Enable Teamd control support</flag> |
416 |
- <flag name="tools">Build cli tools such as nmcli, nmtui and nm_cloud_setup</flag> |
417 |
<flag name="wifi">Enable support for wifi and 802.1x security</flag> |
418 |
<flag name="wext">Enable support for the deprecated Wext (Wireless |
419 |
Extensions) API; needed for some older drivers (e.g. ipw2200, |
420 |
|
421 |
diff --git a/net-misc/networkmanager/networkmanager-1.22.10-r12.ebuild b/net-misc/networkmanager/networkmanager-1.22.10-r12.ebuild |
422 |
deleted file mode 100644 |
423 |
index 562789d7de9..00000000000 |
424 |
--- a/net-misc/networkmanager/networkmanager-1.22.10-r12.ebuild |
425 |
+++ /dev/null |
426 |
@@ -1,329 +0,0 @@ |
427 |
-# Copyright 2019-2020 Gentoo Authors |
428 |
-# Distributed under the terms of the GNU General Public License v2 |
429 |
- |
430 |
-EAPI=7 |
431 |
- |
432 |
-PYTHON_COMPAT=( python3_{7,8} ) |
433 |
- |
434 |
-inherit meson linux-info python-any-r1 systemd udev vala |
435 |
- |
436 |
-DESCRIPTION="A set of co-operative tools that make networking simple and straightforward" |
437 |
-HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager" |
438 |
-SRC_URI="https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/archive/${PV}/NetworkManager-${PV}.tar.bz2" |
439 |
- |
440 |
-LICENSE="GPL-2+" |
441 |
-SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version |
442 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
443 |
-IUSE="audit bluetooth +concheck connection-sharing +dhclient dhcpcd " |
444 |
-IUSE+="debug elogind examples +gnutls gtk-doc introspection iwd json kernel_linux " |
445 |
-IUSE+="libpsl lto modemmanager nss ofono ovs +policykit ppp resolvconf selinux " |
446 |
-IUSE+="syslog systemd teamd test +tools vala wext +wifi" |
447 |
- |
448 |
-REQUIRED_USE=" |
449 |
- gtk-doc? ( introspection ) |
450 |
- iwd? ( wifi ) |
451 |
- vala? ( introspection ) |
452 |
- ^^ ( gnutls nss ) |
453 |
- ?? ( elogind systemd ) |
454 |
- ?? ( dhclient dhcpcd ) |
455 |
- ?? ( syslog systemd ) |
456 |
-" |
457 |
- |
458 |
-DEPEND=" |
459 |
- dev-libs/dbus-glib |
460 |
- dev-libs/glib:2 |
461 |
- net-libs/libndp |
462 |
- sys-apps/dbus |
463 |
- sys-kernel/linux-headers |
464 |
- virtual/libudev |
465 |
- audit? ( sys-process/audit ) |
466 |
- bluetooth? ( net-wireless/bluez ) |
467 |
- concheck? ( net-misc/curl ) |
468 |
- connection-sharing? ( |
469 |
- net-dns/dnsmasq[dbus,dhcp] |
470 |
- net-firewall/iptables |
471 |
- ) |
472 |
- dhclient? ( net-misc/dhcp[client] ) |
473 |
- dhcpcd? ( net-misc/dhcpcd ) |
474 |
- elogind? ( sys-auth/elogind ) |
475 |
- gnutls? ( |
476 |
- dev-libs/libgcrypt:0= |
477 |
- net-libs/gnutls |
478 |
- ) |
479 |
- introspection? ( dev-libs/gobject-introspection:= ) |
480 |
- json? ( dev-libs/jansson ) |
481 |
- libpsl? ( net-libs/libpsl ) |
482 |
- modemmanager? ( |
483 |
- net-misc/mobile-broadband-provider-info |
484 |
- net-misc/modemmanager |
485 |
- ) |
486 |
- nss? ( dev-libs/nss ) |
487 |
- ofono? ( net-misc/ofono ) |
488 |
- ovs? ( dev-libs/jansson ) |
489 |
- policykit? ( sys-auth/polkit ) |
490 |
- ppp? ( net-dialup/ppp[ipv6] ) |
491 |
- resolvconf? ( net-dns/openresolv ) |
492 |
- selinux? ( sys-libs/libselinux ) |
493 |
- systemd? ( sys-apps/systemd:= ) |
494 |
- teamd? ( |
495 |
- dev-libs/jansson |
496 |
- net-misc/libteam |
497 |
- ) |
498 |
- tools? ( |
499 |
- dev-libs/newt |
500 |
- sys-libs/ncurses |
501 |
- sys-libs/readline:0= |
502 |
- ) |
503 |
-" |
504 |
-RDEPEND="${DEPEND} |
505 |
- acct-group/plugdev |
506 |
- || ( |
507 |
- net-analyzer/arping |
508 |
- net-misc/iputils[arping(+)] |
509 |
- ) |
510 |
- wifi? ( |
511 |
- iwd? ( net-wireless/iwd ) |
512 |
- !iwd? ( net-wireless/wpa_supplicant[dbus] ) |
513 |
- ) |
514 |
-" |
515 |
-BDEPEND="dev-util/intltool |
516 |
- gtk-doc? ( dev-util/gtk-doc |
517 |
- app-text/docbook-xml-dtd:4.1.2 ) |
518 |
- sys-devel/gettext |
519 |
- virtual/pkgconfig |
520 |
- introspection? ( |
521 |
- $(python_gen_any_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]') |
522 |
- dev-libs/libxslt |
523 |
- dev-lang/perl |
524 |
- ) |
525 |
- vala? ( $(vala_depend) ) |
526 |
-" |
527 |
- |
528 |
-S="${WORKDIR}"/NetworkManager-${PV} |
529 |
- |
530 |
-RESTRICT="!test? ( test )" |
531 |
- |
532 |
-PATCHES=( |
533 |
- "${FILESDIR}/${PN}-1.20.6-dont_call_helpers_with_full_paths.patch" |
534 |
-) |
535 |
- |
536 |
-python_check_deps() { |
537 |
- if use introspection; then |
538 |
- has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return |
539 |
- fi |
540 |
- |
541 |
- if use test; then |
542 |
- has_version "dev-python/dbus-python[${PYTHON_USEDEP}]" && |
543 |
- has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" |
544 |
- fi |
545 |
-} |
546 |
- |
547 |
-sysfs_deprecated_check() { |
548 |
- ebegin "Checking for SYSFS_DEPRECATED support" |
549 |
- |
550 |
- if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then |
551 |
- eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile " |
552 |
- eerror "your kernel or NetworkManager will not work correctly." |
553 |
- eerror "See https://bugs.gentoo.org/333639 for more info." |
554 |
- die "CONFIG_SYSFS_DEPRECATED_V2 support detected!" |
555 |
- fi |
556 |
- eend ${?} |
557 |
-} |
558 |
- |
559 |
-pkg_pretend() { |
560 |
- if use kernel_linux; then |
561 |
- get_version |
562 |
- if linux_config_exists; then |
563 |
- sysfs_deprecated_check |
564 |
- else |
565 |
- ewarn "Was unable to determine your kernel .config" |
566 |
- ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, " |
567 |
- ewarn "NetworkManager will not work correctly." |
568 |
- ewarn "See https://bugs.gentoo.org/333639 for more info." |
569 |
- fi |
570 |
- fi |
571 |
-} |
572 |
- |
573 |
-pkg_setup() { |
574 |
- CONFIG_CHECK="~BPF" |
575 |
- |
576 |
- if use connection-sharing; then |
577 |
- if kernel_is lt 5 1; then |
578 |
- CONFIG_CHECK="~NF_NAT_IPV4 ~NF_NAT_MASQUERADE_IPV4" |
579 |
- else |
580 |
- CONFIG_CHECK="~NF_NAT ~NF_NAT_MASQUERADE" |
581 |
- fi |
582 |
- fi |
583 |
- |
584 |
- linux-info_pkg_setup |
585 |
- |
586 |
- # if use introspection || use test; then |
587 |
- if use introspection; then |
588 |
- python-any-r1_pkg_setup |
589 |
- fi |
590 |
-} |
591 |
- |
592 |
-src_prepare() { |
593 |
- default |
594 |
- use vala && vala_src_prepare |
595 |
-} |
596 |
- |
597 |
-src_configure() { |
598 |
- local emesonargs=( |
599 |
- -D systemdsystemunitdir=$(systemd_get_systemunitdir) |
600 |
- -D system_ca_path=/etc/ssl/certs |
601 |
- -D udev_dir=$(get_udevdir) |
602 |
- -D dbus_conf_dir=/usr/share/dbus-1/system.d |
603 |
- -D kernel_firmware_dir=/lib/firmware |
604 |
- -D iptables=/sbin/iptables |
605 |
- #-D dnsmasq= |
606 |
- #-D dnssec_trigger= |
607 |
- |
608 |
- -D dist_version=${PVR} |
609 |
- $(meson_use policykit polkit) |
610 |
- -D modify_system=true |
611 |
- $(meson_use policykit polkit_agent) |
612 |
- $(meson_use policykit config_auth_polkit_default) |
613 |
- $(meson_use selinux) |
614 |
- $(meson_use systemd systemd_journal) |
615 |
- -D hostname_persist=gentoo |
616 |
- -D libaudit=$(usex audit yes no) |
617 |
- |
618 |
- $(meson_use wext) |
619 |
- $(meson_use wifi) |
620 |
- $(meson_use iwd) |
621 |
- $(meson_use ppp) |
622 |
- #-D pppd='path to pppd binary' |
623 |
- #-D pppd_plugin_dir='path to the pppd plugins directory' |
624 |
- $(meson_use modemmanager modem_manager) |
625 |
- $(meson_use ofono) |
626 |
- $(meson_use concheck) |
627 |
- $(meson_use teamd teamdctl) |
628 |
- $(meson_use ovs) |
629 |
- $(meson_use tools nmcli) |
630 |
- $(meson_use tools nmtui) |
631 |
- $(meson_use tools nm_cloud_setup) |
632 |
- $(meson_use bluetooth bluez5_dun) |
633 |
- -D ebpf=true |
634 |
- |
635 |
- -D config_plugins_default=keyfile |
636 |
- -D ifcfg_rh=false |
637 |
- -D ifupdown=false |
638 |
- |
639 |
- $(meson_feature resolvconf) |
640 |
- -D netconfig=disable |
641 |
- -D config_dns_rc_manager_default=symlink |
642 |
- |
643 |
- $(meson_feature dhclient) |
644 |
- -D dhcpcanon=disable |
645 |
- $(meson_feature dhcpcd) |
646 |
- |
647 |
- $(meson_use introspection) |
648 |
- $(meson_use vala vapi) |
649 |
- $(meson_use gtk-doc docs) |
650 |
- # $(meson_use debug more_asserts) |
651 |
- -D more_asserts=0 |
652 |
- $(meson_use debug more_logging) |
653 |
- -D valgrind=no |
654 |
- -D valgrind_suppressions= |
655 |
- $(meson_use debug ld_gc) |
656 |
- $(meson_use libpsl) |
657 |
- $(meson_use json json_validation) |
658 |
- -D qt=false |
659 |
- |
660 |
- $(meson_use lto b_lto) |
661 |
- ) |
662 |
- |
663 |
- if use systemd; then |
664 |
- emesonargs+=( -D session_tracking_consolekit=false ) |
665 |
- emesonargs+=( -D session_tracking=systemd ) |
666 |
- emesonargs+=( -D suspend_resume=systemd ) |
667 |
- elif use elogind; then |
668 |
- emesonargs+=( -D session_tracking_consolekit=false ) |
669 |
- emesonargs+=( -D session_tracking=elogind ) |
670 |
- emesonargs+=( -D suspend_resume=elogind ) |
671 |
- else |
672 |
- emesonargs+=( -D session_tracking_consolekit=false ) |
673 |
- emesonargs+=( -D session_tracking=none ) |
674 |
- emesonargs+=( -D suspend_resume=auto ) |
675 |
- fi |
676 |
- |
677 |
- if use syslog; then |
678 |
- emesonargs+=( -D config_logging_backend_default=syslog ) |
679 |
- elif use systemd; then |
680 |
- emesonargs+=( -D config_logging_backend_default=journal ) |
681 |
- else |
682 |
- emesonargs+=( -D config_logging_backend_default=default ) |
683 |
- fi |
684 |
- |
685 |
- if use dhclient; then |
686 |
- emesonargs+=( -D config_dhcp_default=dhclient ) |
687 |
- elif use dhcpcd; then |
688 |
- emesonargs+=( -D config_dhcp_default=dhcpcd ) |
689 |
- else |
690 |
- emesonargs+=( -D config_dhcp_default=internal ) |
691 |
- fi |
692 |
- |
693 |
- if use nss; then |
694 |
- emesonargs+=( -D crypto=nss ) |
695 |
- else |
696 |
- emesonargs+=( -D crypto=gnutls ) |
697 |
- fi |
698 |
- |
699 |
- meson_src_configure |
700 |
-} |
701 |
- |
702 |
-src_install() { |
703 |
- meson_src_install |
704 |
- |
705 |
- newinitd "${FILESDIR}/init.d.NetworkManager-r2" NetworkManager |
706 |
- newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager |
707 |
- |
708 |
- # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts |
709 |
- keepdir /etc/NetworkManager/dispatcher.d |
710 |
- |
711 |
- # Provide openrc net dependency only when nm is connected |
712 |
- exeinto /etc/NetworkManager/dispatcher.d |
713 |
- newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status |
714 |
- sed -e "s:@EPREFIX@:${EPREFIX}:g" \ |
715 |
- -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die |
716 |
- |
717 |
- keepdir /etc/NetworkManager/system-connections |
718 |
- chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* || die |
719 |
- |
720 |
- # Allow users in plugdev group to modify system connections |
721 |
- insinto /usr/share/polkit-1/rules.d/ |
722 |
- doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules" |
723 |
- |
724 |
- if use iwd; then |
725 |
- insinto /usr/lib/NetworkManager/conf.d/ |
726 |
- newins - iwd.conf <<- _EOF_ |
727 |
- [device] |
728 |
- wifi.backend=iwd |
729 |
- _EOF_ |
730 |
- fi |
731 |
- |
732 |
- if use examples; then |
733 |
- dodoc -r "${S}"/examples/ |
734 |
- |
735 |
- insinto /usr/lib/NetworkManager/conf.d |
736 |
- doins "${S}"/examples/nm-conf.d/{30-anon,31-mac-addr-change}.conf |
737 |
- |
738 |
- # Temporary workaround |
739 |
- cp "${ED}"/usr/share/doc/NetworkManager/examples/server.conf \ |
740 |
- "${ED}"/usr/share/doc/${PF}/examples/ || |
741 |
- die "Failed to copy server.conf example." |
742 |
- fi |
743 |
- |
744 |
- # Temporary workaround, |
745 |
- # The file will be installed regargless of 'examples' USE. |
746 |
- rm "${ED}"/usr/share/doc/NetworkManager/examples/server.conf || die |
747 |
- rm -r "${ED}"/usr/share/doc/NetworkManager || die |
748 |
- |
749 |
- # Empty dirs |
750 |
- rm -r "${ED}/var" || die |
751 |
-} |
752 |
- |
753 |
-pkg_postinst() { |
754 |
- systemd_reenable NetworkManager.service |
755 |
-} |
756 |
|
757 |
diff --git a/net-misc/networkmanager/networkmanager-1.28.0-r1.ebuild b/net-misc/networkmanager/networkmanager-1.28.0-r1.ebuild |
758 |
deleted file mode 100644 |
759 |
index cd47f2d90ad..00000000000 |
760 |
--- a/net-misc/networkmanager/networkmanager-1.28.0-r1.ebuild |
761 |
+++ /dev/null |
762 |
@@ -1,349 +0,0 @@ |
763 |
-# Copyright 1999-2021 Gentoo Authors |
764 |
-# Distributed under the terms of the GNU General Public License v2 |
765 |
- |
766 |
-EAPI=7 |
767 |
-GNOME_ORG_MODULE="NetworkManager" |
768 |
-VALA_USE_DEPEND="vapigen" |
769 |
-PYTHON_COMPAT=( python3_{7..9} ) |
770 |
- |
771 |
-inherit bash-completion-r1 gnome2 linux-info multilib python-any-r1 systemd readme.gentoo-r1 vala virtualx udev multilib-minimal |
772 |
- |
773 |
-DESCRIPTION="A set of co-operative tools that make networking simple and straightforward" |
774 |
-HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager" |
775 |
- |
776 |
-LICENSE="GPL-2+" |
777 |
-SLOT="0" |
778 |
- |
779 |
-IUSE="audit bluetooth connection-sharing dhclient dhcpcd elogind gnutls +introspection iwd kernel_linux +nss +modemmanager ncurses ofono ovs policykit +ppp resolvconf selinux systemd teamd test vala +wext +wifi" |
780 |
-RESTRICT="!test? ( test )" |
781 |
- |
782 |
-REQUIRED_USE=" |
783 |
- bluetooth? ( modemmanager ) |
784 |
- iwd? ( wifi ) |
785 |
- vala? ( introspection ) |
786 |
- wext? ( wifi ) |
787 |
- || ( nss gnutls ) |
788 |
- ?? ( elogind systemd ) |
789 |
-" |
790 |
- |
791 |
-KEYWORDS="~alpha amd64 arm arm64 ~ia64 ppc ppc64 ~sparc x86" |
792 |
- |
793 |
-# gobject-introspection-0.10.3 is needed due to gnome bug 642300 |
794 |
-# wpa_supplicant-0.7.3-r3 is needed due to bug 359271 |
795 |
-COMMON_DEPEND=" |
796 |
- >=dev-libs/glib-2.40:2[${MULTILIB_USEDEP}] |
797 |
- policykit? ( >=sys-auth/polkit-0.106 ) |
798 |
- net-libs/libndp[${MULTILIB_USEDEP}] |
799 |
- >=net-misc/curl-7.24 |
800 |
- net-misc/iputils |
801 |
- sys-apps/util-linux[${MULTILIB_USEDEP}] |
802 |
- sys-libs/readline:0= |
803 |
- >=virtual/libudev-175:=[${MULTILIB_USEDEP}] |
804 |
- audit? ( sys-process/audit ) |
805 |
- bluetooth? ( >=net-wireless/bluez-5 ) |
806 |
- connection-sharing? ( |
807 |
- net-dns/dnsmasq[dbus,dhcp] |
808 |
- net-firewall/iptables ) |
809 |
- dhclient? ( >=net-misc/dhcp-4[client] ) |
810 |
- dhcpcd? ( >=net-misc/dhcpcd-9.3.3 ) |
811 |
- elogind? ( >=sys-auth/elogind-219 ) |
812 |
- introspection? ( >=dev-libs/gobject-introspection-0.10.3:= ) |
813 |
- modemmanager? ( >=net-misc/modemmanager-0.7.991:0= |
814 |
- net-misc/mobile-broadband-provider-info ) |
815 |
- ncurses? ( >=dev-libs/newt-0.52.15 ) |
816 |
- nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] ) |
817 |
- !nss? ( gnutls? ( |
818 |
- dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}] |
819 |
- >=net-libs/gnutls-2.12:=[${MULTILIB_USEDEP}] ) ) |
820 |
- ofono? ( net-misc/ofono ) |
821 |
- ovs? ( dev-libs/jansson ) |
822 |
- ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] ) |
823 |
- resolvconf? ( net-dns/openresolv ) |
824 |
- selinux? ( sys-libs/libselinux ) |
825 |
- systemd? ( >=sys-apps/systemd-209:0= ) |
826 |
- teamd? ( |
827 |
- dev-libs/jansson |
828 |
- >=net-misc/libteam-1.9 |
829 |
- ) |
830 |
-" |
831 |
-RDEPEND="${COMMON_DEPEND} |
832 |
- acct-group/plugdev |
833 |
- || ( |
834 |
- net-misc/iputils[arping(+)] |
835 |
- net-analyzer/arping |
836 |
- ) |
837 |
- wifi? ( |
838 |
- !iwd? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] ) |
839 |
- iwd? ( net-wireless/iwd ) |
840 |
- ) |
841 |
-" |
842 |
-DEPEND="${COMMON_DEPEND} |
843 |
- >=sys-kernel/linux-headers-3.18 |
844 |
- " |
845 |
-BDEPEND=" |
846 |
- dev-util/gdbus-codegen |
847 |
- dev-util/glib-utils |
848 |
- dev-util/gtk-doc-am |
849 |
- >=dev-util/intltool-0.40 |
850 |
- >=sys-devel/gettext-0.17 |
851 |
- virtual/pkgconfig |
852 |
- introspection? ( |
853 |
- $(python_gen_any_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]') |
854 |
- dev-lang/perl |
855 |
- dev-libs/libxslt |
856 |
- ) |
857 |
- vala? ( $(vala_depend) ) |
858 |
- test? ( |
859 |
- $(python_gen_any_dep ' |
860 |
- dev-python/dbus-python[${PYTHON_USEDEP}] |
861 |
- dev-python/pygobject:3[${PYTHON_USEDEP}]') |
862 |
- ) |
863 |
-" |
864 |
- |
865 |
-PATCHES=( |
866 |
- "${FILESDIR}/${PN}-1.28.0-dhcpcd9.patch" |
867 |
-) |
868 |
- |
869 |
-python_check_deps() { |
870 |
- if use introspection; then |
871 |
- has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return |
872 |
- fi |
873 |
- if use test; then |
874 |
- has_version "dev-python/dbus-python[${PYTHON_USEDEP}]" && |
875 |
- has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" |
876 |
- fi |
877 |
-} |
878 |
- |
879 |
-sysfs_deprecated_check() { |
880 |
- ebegin "Checking for SYSFS_DEPRECATED support" |
881 |
- |
882 |
- if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then |
883 |
- eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel" |
884 |
- eerror "or NetworkManager will not work correctly." |
885 |
- eerror "See https://bugs.gentoo.org/333639 for more info." |
886 |
- die "CONFIG_SYSFS_DEPRECATED_V2 support detected!" |
887 |
- fi |
888 |
- eend $? |
889 |
-} |
890 |
- |
891 |
-pkg_pretend() { |
892 |
- if use kernel_linux; then |
893 |
- get_version |
894 |
- if linux_config_exists; then |
895 |
- sysfs_deprecated_check |
896 |
- else |
897 |
- ewarn "Was unable to determine your kernel .config" |
898 |
- ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly." |
899 |
- ewarn "See https://bugs.gentoo.org/333639 for more info." |
900 |
- fi |
901 |
- |
902 |
- fi |
903 |
-} |
904 |
- |
905 |
-pkg_setup() { |
906 |
- if use connection-sharing; then |
907 |
- if kernel_is lt 5 1; then |
908 |
- CONFIG_CHECK="~NF_NAT_IPV4 ~NF_NAT_MASQUERADE_IPV4" |
909 |
- else |
910 |
- CONFIG_CHECK="~NF_NAT ~NF_NAT_MASQUERADE" |
911 |
- fi |
912 |
- linux-info_pkg_setup |
913 |
- fi |
914 |
- if use introspection || use test; then |
915 |
- python-any-r1_pkg_setup |
916 |
- fi |
917 |
-} |
918 |
- |
919 |
-src_prepare() { |
920 |
- DOC_CONTENTS="To modify system network connections without needing to enter the |
921 |
- root password, add your user account to the 'plugdev' group." |
922 |
- |
923 |
- use vala && vala_src_prepare |
924 |
- gnome2_src_prepare |
925 |
- |
926 |
- sed -i \ |
927 |
- -e 's#/usr/bin/sed#/bin/sed#' \ |
928 |
- data/84-nm-drivers.rules \ |
929 |
- || die |
930 |
-} |
931 |
- |
932 |
-multilib_src_configure() { |
933 |
- local myconf=( |
934 |
- --disable-more-warnings |
935 |
- --disable-static |
936 |
- --localstatedir=/var |
937 |
- --with-runstatedir=/run |
938 |
- --disable-lto |
939 |
- --disable-qt |
940 |
- --without-netconfig |
941 |
- --with-dbus-sys-dir=/etc/dbus-1/system.d |
942 |
- $(multilib_native_with nmcli) |
943 |
- --with-udev-dir="$(get_udevdir)" |
944 |
- --with-config-plugins-default=keyfile |
945 |
- --with-iptables=/sbin/iptables |
946 |
- --with-ebpf=yes |
947 |
- $(multilib_native_enable concheck) |
948 |
- --with-nm-cloud-setup=$(multilib_is_native_abi && echo yes || echo no) |
949 |
- --with-crypto=$(usex nss nss gnutls) |
950 |
- # elogind lacks multilib for now, and consolekit doesn't require linking against, so we use it as a fake option |
951 |
- # This SHOULD be removable once elogind has that. We abuse the fact that 'consolekit' does nothing at buildtime. |
952 |
- # (There is no off switch, and we do not support upower.) |
953 |
- # bug #747358 |
954 |
- --with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind consolekit)) |
955 |
- --with-suspend-resume=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind consolekit)) |
956 |
- $(multilib_native_use_with audit libaudit) |
957 |
- $(multilib_native_use_enable bluetooth bluez5-dun) |
958 |
- --without-dhcpcanon |
959 |
- $(use_with dhclient) |
960 |
- $(use_with dhcpcd) |
961 |
- --with-config-dhcp-default=internal |
962 |
- $(multilib_native_use_enable introspection) |
963 |
- $(multilib_native_use_enable ppp) |
964 |
- --without-libpsl |
965 |
- $(multilib_native_use_with modemmanager modem-manager-1) |
966 |
- $(multilib_native_use_with ncurses nmtui) |
967 |
- $(multilib_native_use_with ofono) |
968 |
- $(multilib_native_use_enable ovs) |
969 |
- $(multilib_native_use_enable policykit polkit) |
970 |
- $(multilib_native_use_with resolvconf) |
971 |
- $(multilib_native_use_with selinux) |
972 |
- $(multilib_native_use_with systemd systemd-journal) |
973 |
- $(multilib_native_use_enable teamd teamdctl) |
974 |
- $(multilib_native_use_enable test tests) |
975 |
- $(multilib_native_use_enable vala) |
976 |
- --without-valgrind |
977 |
- $(multilib_native_use_with wifi iwd) |
978 |
- $(multilib_native_use_with wext) |
979 |
- $(multilib_native_use_enable wifi) |
980 |
- ) |
981 |
- |
982 |
- # Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986 |
983 |
- if use ppp; then |
984 |
- local PPPD_VER=`best_version net-dialup/ppp` |
985 |
- PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR} |
986 |
- PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision |
987 |
- myconf+=( --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER} ) |
988 |
- fi |
989 |
- |
990 |
- # unit files directory needs to be passed only when systemd is enabled, |
991 |
- # otherwise systemd support is not disabled completely, bug #524534 |
992 |
- use systemd && myconf+=( --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" ) |
993 |
- |
994 |
- if multilib_is_native_abi; then |
995 |
- # work-around man out-of-source brokenness, must be done before configure |
996 |
- ln -s "${S}/docs" docs || die |
997 |
- ln -s "${S}/man" man || die |
998 |
- fi |
999 |
- |
1000 |
- ECONF_SOURCE=${S} gnome2_src_configure "${myconf[@]}" |
1001 |
-} |
1002 |
- |
1003 |
-multilib_src_compile() { |
1004 |
- if multilib_is_native_abi; then |
1005 |
- emake |
1006 |
- else |
1007 |
- local targets=( |
1008 |
- libnm/libnm.la |
1009 |
- ) |
1010 |
- emake "${targets[@]}" |
1011 |
- fi |
1012 |
-} |
1013 |
- |
1014 |
-multilib_src_test() { |
1015 |
- if use test && multilib_is_native_abi; then |
1016 |
- python_setup |
1017 |
- virtx emake check |
1018 |
- fi |
1019 |
-} |
1020 |
- |
1021 |
-multilib_src_install() { |
1022 |
- if multilib_is_native_abi; then |
1023 |
- # Install completions at proper place, bug #465100 |
1024 |
- gnome2_src_install completiondir="$(get_bashcompdir)" |
1025 |
- insinto /usr/lib/NetworkManager/conf.d #702476 |
1026 |
- doins "${S}"/examples/nm-conf.d/31-mac-addr-change.conf |
1027 |
- else |
1028 |
- local targets=( |
1029 |
- install-libLTLIBRARIES |
1030 |
- install-libnmincludeHEADERS |
1031 |
- install-nodist_libnmincludeHEADERS |
1032 |
- install-pkgconfigDATA |
1033 |
- ) |
1034 |
- emake DESTDIR="${D}" "${targets[@]}" |
1035 |
- fi |
1036 |
-} |
1037 |
- |
1038 |
-multilib_src_install_all() { |
1039 |
- einstalldocs |
1040 |
- ! use systemd && readme.gentoo_create_doc |
1041 |
- |
1042 |
- newinitd "${FILESDIR}/init.d.NetworkManager-r2" NetworkManager |
1043 |
- newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager |
1044 |
- |
1045 |
- # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts |
1046 |
- keepdir /etc/NetworkManager/dispatcher.d |
1047 |
- |
1048 |
- # Provide openrc net dependency only when nm is connected |
1049 |
- exeinto /etc/NetworkManager/dispatcher.d |
1050 |
- newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status |
1051 |
- sed -e "s:@EPREFIX@:${EPREFIX}:g" \ |
1052 |
- -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die |
1053 |
- |
1054 |
- keepdir /etc/NetworkManager/system-connections |
1055 |
- chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594 |
1056 |
- |
1057 |
- # Allow users in plugdev group to modify system connections |
1058 |
- insinto /usr/share/polkit-1/rules.d/ |
1059 |
- doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules" |
1060 |
- |
1061 |
- if use iwd; then |
1062 |
- # This goes to $nmlibdir/conf.d/ and $nmlibdir is '${prefix}'/lib/$PACKAGE, thus always lib, not get_libdir |
1063 |
- cat <<-EOF > "${ED}"/usr/lib/NetworkManager/conf.d/iwd.conf |
1064 |
- [device] |
1065 |
- wifi.backend=iwd |
1066 |
- EOF |
1067 |
- fi |
1068 |
- |
1069 |
- # Empty |
1070 |
- rmdir "${ED}"/var{/lib{/NetworkManager,},} || die |
1071 |
-} |
1072 |
- |
1073 |
-pkg_postinst() { |
1074 |
- gnome2_pkg_postinst |
1075 |
- systemd_reenable NetworkManager.service |
1076 |
- ! use systemd && readme.gentoo_print_elog |
1077 |
- |
1078 |
- if [[ -e "${EROOT}/etc/NetworkManager/nm-system-settings.conf" ]]; then |
1079 |
- ewarn "The ${PN} system configuration file has moved to a new location." |
1080 |
- ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf" |
1081 |
- ewarn "to ${EROOT}/etc/NetworkManager/NetworkManager.conf" |
1082 |
- ewarn |
1083 |
- ewarn "After doing so, you can remove ${EROOT}/etc/NetworkManager/nm-system-settings.conf" |
1084 |
- fi |
1085 |
- |
1086 |
- # NM fallbacks to plugin specified at compile time (upstream bug #738611) |
1087 |
- # but still show a warning to remember people to have cleaner config file |
1088 |
- if [[ -e "${EROOT}/etc/NetworkManager/NetworkManager.conf" ]]; then |
1089 |
- if grep plugins "${EROOT}/etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then |
1090 |
- ewarn |
1091 |
- ewarn "You seem to use 'ifnet' plugin in ${EROOT}/etc/NetworkManager/NetworkManager.conf" |
1092 |
- ewarn "Since it won't be used, you will need to stop setting ifnet plugin there." |
1093 |
- ewarn |
1094 |
- fi |
1095 |
- fi |
1096 |
- |
1097 |
- # NM shows lots of errors making nmcli almost unusable, bug #528748 upstream bug #690457 |
1098 |
- if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then |
1099 |
- ewarn "You have psk-flags=1 setting in above files, you will need to" |
1100 |
- ewarn "either reconfigure affected networks or, at least, set the flag" |
1101 |
- ewarn "value to '0'." |
1102 |
- fi |
1103 |
- |
1104 |
- if use dhclient || use dhcpcd; then |
1105 |
- ewarn "You have enabled USE=dhclient and/or USE=dhcpcd, but NetworkManager since" |
1106 |
- ewarn "version 1.20 defaults to the internal DHCP client. If the internal client" |
1107 |
- ewarn "works for you, and you're happy with, the alternative USE flags can be" |
1108 |
- ewarn "disabled. If you want to use dhclient or dhcpcd, then you need to tweak" |
1109 |
- ewarn "the main.dhcp configuration option to use one of them instead of internal." |
1110 |
- fi |
1111 |
-} |
1112 |
|
1113 |
diff --git a/net-misc/networkmanager/networkmanager-1.30.2.ebuild b/net-misc/networkmanager/networkmanager-1.30.2.ebuild |
1114 |
deleted file mode 100644 |
1115 |
index 5dfe828e9e7..00000000000 |
1116 |
--- a/net-misc/networkmanager/networkmanager-1.30.2.ebuild |
1117 |
+++ /dev/null |
1118 |
@@ -1,349 +0,0 @@ |
1119 |
-# Copyright 1999-2021 Gentoo Authors |
1120 |
-# Distributed under the terms of the GNU General Public License v2 |
1121 |
- |
1122 |
-EAPI=7 |
1123 |
-GNOME_ORG_MODULE="NetworkManager" |
1124 |
-VALA_USE_DEPEND="vapigen" |
1125 |
-PYTHON_COMPAT=( python3_{7..9} ) |
1126 |
- |
1127 |
-inherit bash-completion-r1 gnome2 linux-info multilib python-any-r1 systemd readme.gentoo-r1 vala virtualx udev multilib-minimal |
1128 |
- |
1129 |
-DESCRIPTION="A set of co-operative tools that make networking simple and straightforward" |
1130 |
-HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager" |
1131 |
- |
1132 |
-LICENSE="GPL-2+ LGPL-2.1+" |
1133 |
-SLOT="0" |
1134 |
- |
1135 |
-IUSE="audit bluetooth connection-sharing dhclient dhcpcd elogind gnutls +introspection iwd kernel_linux +nss +modemmanager ncurses ofono ovs policykit +ppp resolvconf selinux systemd teamd test vala +wext +wifi" |
1136 |
-RESTRICT="!test? ( test )" |
1137 |
- |
1138 |
-REQUIRED_USE=" |
1139 |
- bluetooth? ( modemmanager ) |
1140 |
- iwd? ( wifi ) |
1141 |
- vala? ( introspection ) |
1142 |
- wext? ( wifi ) |
1143 |
- || ( nss gnutls ) |
1144 |
- ?? ( elogind systemd ) |
1145 |
-" |
1146 |
- |
1147 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
1148 |
- |
1149 |
-# gobject-introspection-0.10.3 is needed due to gnome bug 642300 |
1150 |
-# wpa_supplicant-0.7.3-r3 is needed due to bug 359271 |
1151 |
-COMMON_DEPEND=" |
1152 |
- >=dev-libs/glib-2.40:2[${MULTILIB_USEDEP}] |
1153 |
- policykit? ( >=sys-auth/polkit-0.106 ) |
1154 |
- net-libs/libndp[${MULTILIB_USEDEP}] |
1155 |
- >=net-misc/curl-7.24 |
1156 |
- net-misc/iputils |
1157 |
- sys-apps/util-linux[${MULTILIB_USEDEP}] |
1158 |
- sys-libs/readline:0= |
1159 |
- >=virtual/libudev-175:=[${MULTILIB_USEDEP}] |
1160 |
- audit? ( sys-process/audit ) |
1161 |
- bluetooth? ( >=net-wireless/bluez-5 ) |
1162 |
- connection-sharing? ( |
1163 |
- net-dns/dnsmasq[dbus,dhcp] |
1164 |
- net-firewall/iptables ) |
1165 |
- dhclient? ( >=net-misc/dhcp-4[client] ) |
1166 |
- dhcpcd? ( >=net-misc/dhcpcd-9.3.3 ) |
1167 |
- elogind? ( >=sys-auth/elogind-219 ) |
1168 |
- introspection? ( >=dev-libs/gobject-introspection-0.10.3:= ) |
1169 |
- modemmanager? ( >=net-misc/modemmanager-0.7.991:0= |
1170 |
- net-misc/mobile-broadband-provider-info ) |
1171 |
- ncurses? ( >=dev-libs/newt-0.52.15 ) |
1172 |
- nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] ) |
1173 |
- !nss? ( gnutls? ( |
1174 |
- dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}] |
1175 |
- >=net-libs/gnutls-2.12:=[${MULTILIB_USEDEP}] ) ) |
1176 |
- ofono? ( net-misc/ofono ) |
1177 |
- ovs? ( dev-libs/jansson ) |
1178 |
- ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] ) |
1179 |
- resolvconf? ( net-dns/openresolv ) |
1180 |
- selinux? ( sys-libs/libselinux ) |
1181 |
- systemd? ( >=sys-apps/systemd-209:0= ) |
1182 |
- teamd? ( |
1183 |
- dev-libs/jansson |
1184 |
- >=net-misc/libteam-1.9 |
1185 |
- ) |
1186 |
-" |
1187 |
-RDEPEND="${COMMON_DEPEND} |
1188 |
- acct-group/plugdev |
1189 |
- || ( |
1190 |
- net-misc/iputils[arping(+)] |
1191 |
- net-analyzer/arping |
1192 |
- ) |
1193 |
- wifi? ( |
1194 |
- !iwd? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] ) |
1195 |
- iwd? ( net-wireless/iwd ) |
1196 |
- ) |
1197 |
-" |
1198 |
-DEPEND="${COMMON_DEPEND} |
1199 |
- >=sys-kernel/linux-headers-3.18 |
1200 |
- " |
1201 |
-BDEPEND=" |
1202 |
- dev-util/gdbus-codegen |
1203 |
- dev-util/glib-utils |
1204 |
- dev-util/gtk-doc-am |
1205 |
- >=dev-util/intltool-0.40 |
1206 |
- >=sys-devel/gettext-0.17 |
1207 |
- virtual/pkgconfig |
1208 |
- introspection? ( |
1209 |
- $(python_gen_any_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]') |
1210 |
- dev-lang/perl |
1211 |
- dev-libs/libxslt |
1212 |
- ) |
1213 |
- vala? ( $(vala_depend) ) |
1214 |
- test? ( |
1215 |
- $(python_gen_any_dep ' |
1216 |
- dev-python/dbus-python[${PYTHON_USEDEP}] |
1217 |
- dev-python/pygobject:3[${PYTHON_USEDEP}]') |
1218 |
- ) |
1219 |
-" |
1220 |
- |
1221 |
-PATCHES=( |
1222 |
- "${FILESDIR}"/${P}-iwd-autoconnect-fix-pr785.patch |
1223 |
-) |
1224 |
- |
1225 |
-python_check_deps() { |
1226 |
- if use introspection; then |
1227 |
- has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return |
1228 |
- fi |
1229 |
- if use test; then |
1230 |
- has_version "dev-python/dbus-python[${PYTHON_USEDEP}]" && |
1231 |
- has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" |
1232 |
- fi |
1233 |
-} |
1234 |
- |
1235 |
-sysfs_deprecated_check() { |
1236 |
- ebegin "Checking for SYSFS_DEPRECATED support" |
1237 |
- |
1238 |
- if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then |
1239 |
- eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel" |
1240 |
- eerror "or NetworkManager will not work correctly." |
1241 |
- eerror "See https://bugs.gentoo.org/333639 for more info." |
1242 |
- die "CONFIG_SYSFS_DEPRECATED_V2 support detected!" |
1243 |
- fi |
1244 |
- eend $? |
1245 |
-} |
1246 |
- |
1247 |
-pkg_pretend() { |
1248 |
- if use kernel_linux; then |
1249 |
- get_version |
1250 |
- if linux_config_exists; then |
1251 |
- sysfs_deprecated_check |
1252 |
- else |
1253 |
- ewarn "Was unable to determine your kernel .config" |
1254 |
- ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly." |
1255 |
- ewarn "See https://bugs.gentoo.org/333639 for more info." |
1256 |
- fi |
1257 |
- |
1258 |
- fi |
1259 |
-} |
1260 |
- |
1261 |
-pkg_setup() { |
1262 |
- if use connection-sharing; then |
1263 |
- if kernel_is lt 5 1; then |
1264 |
- CONFIG_CHECK="~NF_NAT_IPV4 ~NF_NAT_MASQUERADE_IPV4" |
1265 |
- else |
1266 |
- CONFIG_CHECK="~NF_NAT ~NF_NAT_MASQUERADE" |
1267 |
- fi |
1268 |
- linux-info_pkg_setup |
1269 |
- fi |
1270 |
- if use introspection || use test; then |
1271 |
- python-any-r1_pkg_setup |
1272 |
- fi |
1273 |
-} |
1274 |
- |
1275 |
-src_prepare() { |
1276 |
- DOC_CONTENTS="To modify system network connections without needing to enter the |
1277 |
- root password, add your user account to the 'plugdev' group." |
1278 |
- |
1279 |
- use vala && vala_src_prepare |
1280 |
- gnome2_src_prepare |
1281 |
- |
1282 |
- sed -i \ |
1283 |
- -e 's#/usr/bin/sed#/bin/sed#' \ |
1284 |
- data/84-nm-drivers.rules \ |
1285 |
- || die |
1286 |
-} |
1287 |
- |
1288 |
-multilib_src_configure() { |
1289 |
- local myconf=( |
1290 |
- --disable-more-warnings |
1291 |
- --disable-static |
1292 |
- --localstatedir=/var |
1293 |
- --with-runstatedir=/run |
1294 |
- --disable-lto |
1295 |
- --disable-qt |
1296 |
- --without-netconfig |
1297 |
- --with-dbus-sys-dir=/etc/dbus-1/system.d |
1298 |
- $(multilib_native_with nmcli) |
1299 |
- --with-udev-dir="$(get_udevdir)" |
1300 |
- --with-config-plugins-default=keyfile |
1301 |
- --with-iptables=/sbin/iptables |
1302 |
- --with-ebpf=yes |
1303 |
- $(multilib_native_enable concheck) |
1304 |
- --with-nm-cloud-setup=$(multilib_is_native_abi && echo yes || echo no) |
1305 |
- --with-crypto=$(usex nss nss gnutls) |
1306 |
- # elogind lacks multilib for now, and consolekit doesn't require linking against, so we use it as a fake option |
1307 |
- # This SHOULD be removable once elogind has that. We abuse the fact that 'consolekit' does nothing at buildtime. |
1308 |
- # (There is no off switch, and we do not support upower.) |
1309 |
- # bug #747358 |
1310 |
- --with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind consolekit)) |
1311 |
- --with-suspend-resume=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind consolekit)) |
1312 |
- $(multilib_native_use_with audit libaudit) |
1313 |
- $(multilib_native_use_enable bluetooth bluez5-dun) |
1314 |
- --without-dhcpcanon |
1315 |
- $(use_with dhclient) |
1316 |
- $(use_with dhcpcd) |
1317 |
- --with-config-dhcp-default=internal |
1318 |
- $(multilib_native_use_enable introspection) |
1319 |
- $(multilib_native_use_enable ppp) |
1320 |
- --without-libpsl |
1321 |
- $(multilib_native_use_with modemmanager modem-manager-1) |
1322 |
- $(multilib_native_use_with ncurses nmtui) |
1323 |
- $(multilib_native_use_with ofono) |
1324 |
- $(multilib_native_use_enable ovs) |
1325 |
- $(multilib_native_use_enable policykit polkit) |
1326 |
- $(multilib_native_use_with resolvconf) |
1327 |
- $(multilib_native_use_with selinux) |
1328 |
- $(multilib_native_use_with systemd systemd-journal) |
1329 |
- $(multilib_native_use_enable teamd teamdctl) |
1330 |
- $(multilib_native_use_enable test tests) |
1331 |
- $(multilib_native_use_enable vala) |
1332 |
- --without-valgrind |
1333 |
- $(multilib_native_use_with wifi iwd) |
1334 |
- $(multilib_native_use_with wext) |
1335 |
- $(multilib_native_use_enable wifi) |
1336 |
- ) |
1337 |
- |
1338 |
- # Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986 |
1339 |
- if use ppp; then |
1340 |
- local PPPD_VER=`best_version net-dialup/ppp` |
1341 |
- PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR} |
1342 |
- PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision |
1343 |
- myconf+=( --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER} ) |
1344 |
- fi |
1345 |
- |
1346 |
- # unit files directory needs to be passed only when systemd is enabled, |
1347 |
- # otherwise systemd support is not disabled completely, bug #524534 |
1348 |
- use systemd && myconf+=( --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" ) |
1349 |
- |
1350 |
- if multilib_is_native_abi; then |
1351 |
- # work-around man out-of-source brokenness, must be done before configure |
1352 |
- ln -s "${S}/docs" docs || die |
1353 |
- ln -s "${S}/man" man || die |
1354 |
- fi |
1355 |
- |
1356 |
- ECONF_SOURCE=${S} gnome2_src_configure "${myconf[@]}" |
1357 |
-} |
1358 |
- |
1359 |
-multilib_src_compile() { |
1360 |
- if multilib_is_native_abi; then |
1361 |
- emake |
1362 |
- else |
1363 |
- local targets=( |
1364 |
- libnm/libnm.la |
1365 |
- ) |
1366 |
- emake "${targets[@]}" |
1367 |
- fi |
1368 |
-} |
1369 |
- |
1370 |
-multilib_src_test() { |
1371 |
- if use test && multilib_is_native_abi; then |
1372 |
- python_setup |
1373 |
- virtx emake check |
1374 |
- fi |
1375 |
-} |
1376 |
- |
1377 |
-multilib_src_install() { |
1378 |
- if multilib_is_native_abi; then |
1379 |
- # Install completions at proper place, bug #465100 |
1380 |
- gnome2_src_install completiondir="$(get_bashcompdir)" |
1381 |
- insinto /usr/lib/NetworkManager/conf.d #702476 |
1382 |
- doins "${S}"/examples/nm-conf.d/31-mac-addr-change.conf |
1383 |
- else |
1384 |
- local targets=( |
1385 |
- install-libLTLIBRARIES |
1386 |
- install-libnmincludeHEADERS |
1387 |
- install-nodist_libnmincludeHEADERS |
1388 |
- install-pkgconfigDATA |
1389 |
- ) |
1390 |
- emake DESTDIR="${D}" "${targets[@]}" |
1391 |
- fi |
1392 |
-} |
1393 |
- |
1394 |
-multilib_src_install_all() { |
1395 |
- einstalldocs |
1396 |
- ! use systemd && readme.gentoo_create_doc |
1397 |
- |
1398 |
- newinitd "${FILESDIR}/init.d.NetworkManager-r2" NetworkManager |
1399 |
- newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager |
1400 |
- |
1401 |
- # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts |
1402 |
- keepdir /etc/NetworkManager/dispatcher.d |
1403 |
- |
1404 |
- # Provide openrc net dependency only when nm is connected |
1405 |
- exeinto /etc/NetworkManager/dispatcher.d |
1406 |
- newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status |
1407 |
- sed -e "s:@EPREFIX@:${EPREFIX}:g" \ |
1408 |
- -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die |
1409 |
- |
1410 |
- keepdir /etc/NetworkManager/system-connections |
1411 |
- chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594 |
1412 |
- |
1413 |
- # Allow users in plugdev group to modify system connections |
1414 |
- insinto /usr/share/polkit-1/rules.d/ |
1415 |
- doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules" |
1416 |
- |
1417 |
- if use iwd; then |
1418 |
- # This goes to $nmlibdir/conf.d/ and $nmlibdir is '${prefix}'/lib/$PACKAGE, thus always lib, not get_libdir |
1419 |
- cat <<-EOF > "${ED}"/usr/lib/NetworkManager/conf.d/iwd.conf |
1420 |
- [device] |
1421 |
- wifi.backend=iwd |
1422 |
- EOF |
1423 |
- fi |
1424 |
- |
1425 |
- # Empty |
1426 |
- rmdir "${ED}"/var{/lib{/NetworkManager,},} || die |
1427 |
-} |
1428 |
- |
1429 |
-pkg_postinst() { |
1430 |
- gnome2_pkg_postinst |
1431 |
- systemd_reenable NetworkManager.service |
1432 |
- ! use systemd && readme.gentoo_print_elog |
1433 |
- |
1434 |
- if [[ -e "${EROOT}/etc/NetworkManager/nm-system-settings.conf" ]]; then |
1435 |
- ewarn "The ${PN} system configuration file has moved to a new location." |
1436 |
- ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf" |
1437 |
- ewarn "to ${EROOT}/etc/NetworkManager/NetworkManager.conf" |
1438 |
- ewarn |
1439 |
- ewarn "After doing so, you can remove ${EROOT}/etc/NetworkManager/nm-system-settings.conf" |
1440 |
- fi |
1441 |
- |
1442 |
- # NM fallbacks to plugin specified at compile time (upstream bug #738611) |
1443 |
- # but still show a warning to remember people to have cleaner config file |
1444 |
- if [[ -e "${EROOT}/etc/NetworkManager/NetworkManager.conf" ]]; then |
1445 |
- if grep plugins "${EROOT}/etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then |
1446 |
- ewarn |
1447 |
- ewarn "You seem to use 'ifnet' plugin in ${EROOT}/etc/NetworkManager/NetworkManager.conf" |
1448 |
- ewarn "Since it won't be used, you will need to stop setting ifnet plugin there." |
1449 |
- ewarn |
1450 |
- fi |
1451 |
- fi |
1452 |
- |
1453 |
- # NM shows lots of errors making nmcli almost unusable, bug #528748 upstream bug #690457 |
1454 |
- if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then |
1455 |
- ewarn "You have psk-flags=1 setting in above files, you will need to" |
1456 |
- ewarn "either reconfigure affected networks or, at least, set the flag" |
1457 |
- ewarn "value to '0'." |
1458 |
- fi |
1459 |
- |
1460 |
- if use dhclient || use dhcpcd; then |
1461 |
- ewarn "You have enabled USE=dhclient and/or USE=dhcpcd, but NetworkManager since" |
1462 |
- ewarn "version 1.20 defaults to the internal DHCP client. If the internal client" |
1463 |
- ewarn "works for you, and you're happy with, the alternative USE flags can be" |
1464 |
- ewarn "disabled. If you want to use dhclient or dhcpcd, then you need to tweak" |
1465 |
- ewarn "the main.dhcp configuration option to use one of them instead of internal." |
1466 |
- fi |
1467 |
-} |