mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-07 14:00:59 +03:00
networkmanager: 1.10.6 → 1.12.0
This commit is contained in:
parent
3272f10024
commit
f6e83edf36
@ -1,11 +0,0 @@
|
||||
--- NetworkManager-1.6.2.org/src/ppp/nm-ppp-manager.c 2017-02-15 13:10:27.000000000 +0100
|
||||
+++ NetworkManager-1.6.2/./src/ppp/nm-ppp-manager.c 2017-04-03 11:45:39.891653216 +0200
|
||||
@@ -724,7 +724,7 @@
|
||||
|
||||
g_return_val_if_fail (setting != NULL, NULL);
|
||||
|
||||
- pppd_binary = nm_utils_find_helper ("pppd", NULL, err);
|
||||
+ pppd_binary = nm_utils_find_helper ("pppd", PPPD_PATH, err);
|
||||
if (!pppd_binary)
|
||||
return NULL;
|
||||
|
@ -1,19 +1,19 @@
|
||||
{ stdenv, fetchurl, intltool, pkgconfig, dbus-glib, gnome3
|
||||
, systemd, libgudev, libnl, libuuid, polkit, gnutls, ppp, dhcp, iptables
|
||||
{ stdenv, fetchurl, substituteAll, intltool, pkgconfig, dbus-glib, gnome3
|
||||
, systemd, libuuid, polkit, gnutls, ppp, dhcp, iptables
|
||||
, libgcrypt, dnsmasq, bluez5, readline
|
||||
, gobjectIntrospection, modemmanager, openresolv, libndp, newt, libsoup
|
||||
, ethtool, iputils, gnused, coreutils, file, inetutils, kmod, jansson, libxslt
|
||||
, python3Packages, docbook_xsl, fetchpatch, openconnect, curl, autoreconfHook }:
|
||||
, python3Packages, docbook_xsl, openconnect, curl, autoreconfHook }:
|
||||
|
||||
let
|
||||
pname = "NetworkManager";
|
||||
version = "1.10.6";
|
||||
pname = "NetworkManager";
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "network-manager-${version}";
|
||||
name = "network-manager-${version}";
|
||||
version = "1.12.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||
sha256 = "0xmc3x41dbcaxjm85wfv405xq1a1n3xw8m8zg645ywm3avlb3w3a";
|
||||
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||
sha256 = "15bzjkrfa7sw5p5hkdha4a67y1zfnzh1s6za11sh8s1yxmyvkziq";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
@ -25,11 +25,6 @@ in stdenv.mkDerivation rec {
|
||||
preConfigure = ''
|
||||
substituteInPlace configure --replace /usr/bin/uname ${coreutils}/bin/uname
|
||||
substituteInPlace configure --replace /usr/bin/file ${file}/bin/file
|
||||
substituteInPlace src/devices/nm-device.c \
|
||||
--replace /usr/bin/ping ${inetutils}/bin/ping \
|
||||
--replace /usr/bin/ping6 ${inetutils}/bin/ping
|
||||
substituteInPlace src/devices/nm-arping-manager.c \
|
||||
--replace '("arping", NULL, NULL);' '("arping", "${iputils}/bin/arping", NULL);'
|
||||
substituteInPlace data/84-nm-drivers.rules \
|
||||
--replace /bin/sh ${stdenv.shell}
|
||||
substituteInPlace data/85-nm-unmanaged.rules \
|
||||
@ -38,10 +33,6 @@ in stdenv.mkDerivation rec {
|
||||
--replace /bin/sed ${gnused}/bin/sed
|
||||
substituteInPlace data/NetworkManager.service.in \
|
||||
--replace /bin/kill ${coreutils}/bin/kill
|
||||
substituteInPlace clients/common/nm-vpn-helpers.c \
|
||||
--subst-var-by openconnect ${openconnect}
|
||||
substituteInPlace src/nm-core-utils.c \
|
||||
--subst-var-by modprobeBinPath ${kmod}/bin/modprobe
|
||||
# to enable link-local connections
|
||||
configureFlags="$configureFlags --with-udev-dir=$out/lib/udev"
|
||||
|
||||
@ -70,16 +61,32 @@ in stdenv.mkDerivation rec {
|
||||
"--with-modem-manager-1"
|
||||
"--with-nmtui"
|
||||
"--disable-gtk-doc"
|
||||
"--with-libnm-glib" # legacy library, TODO: remove
|
||||
"--disable-tests"
|
||||
];
|
||||
|
||||
patches = [
|
||||
./PppdPath.patch
|
||||
./openconnect_helper_path.patch
|
||||
./modprobe.patch
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=796752
|
||||
(fetchurl {
|
||||
url = https://bugzilla.gnome.org/attachment.cgi?id=372955;
|
||||
sha256 = "17rl19lprnsz4wjmp54c1qw6a3pf8x97bhd69xavwy7cx6z84b3n";
|
||||
})
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=796751
|
||||
(fetchurl {
|
||||
url = https://bugzilla.gnome.org/attachment.cgi?id=372953;
|
||||
sha256 = "1crjplyiiipkhjjlifrv6hhvxinlcxd6irp9ijbc7jij31g44i0a";
|
||||
})
|
||||
(substituteAll {
|
||||
src = ./fix-paths.patch;
|
||||
inherit inetutils kmod openconnect;
|
||||
})
|
||||
|
||||
];
|
||||
|
||||
buildInputs = [ systemd libgudev libnl libuuid polkit ppp libndp curl
|
||||
bluez5 dnsmasq gobjectIntrospection modemmanager readline newt libsoup jansson ];
|
||||
buildInputs = [
|
||||
systemd libuuid polkit ppp libndp curl
|
||||
bluez5 dnsmasq gobjectIntrospection modemmanager readline newt libsoup jansson
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ dbus-glib gnutls libgcrypt python3Packages.pygobject3 ];
|
||||
|
||||
@ -114,10 +121,10 @@ in stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://wiki.gnome.org/Projects/NetworkManager;
|
||||
homepage = https://wiki.gnome.org/Projects/NetworkManager;
|
||||
description = "Network configuration and management tool";
|
||||
license = licenses.gpl2Plus;
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ phreedom rickynils domenkozar obadz ];
|
||||
platforms = platforms.linux;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
41
pkgs/tools/networking/network-manager/fix-paths.patch
Normal file
41
pkgs/tools/networking/network-manager/fix-paths.patch
Normal file
@ -0,0 +1,41 @@
|
||||
--- a/clients/common/nm-vpn-helpers.c
|
||||
+++ b/clients/common/nm-vpn-helpers.c
|
||||
@@ -205,7 +205,7 @@
|
||||
char *argv[4];
|
||||
const char *path;
|
||||
|
||||
- path = nm_utils_find_helper ("openconnect", "/usr/sbin/openconnect", error);
|
||||
+ path = "@openconnect@/bin/openconnect";
|
||||
if (!path)
|
||||
return FALSE;
|
||||
|
||||
--- a/src/devices/nm-device.c
|
||||
+++ b/src/devices/nm-device.c
|
||||
@@ -11828,14 +11828,14 @@
|
||||
gw = nm_ip4_config_best_default_route_get (priv->ip_config_4);
|
||||
if (gw) {
|
||||
nm_utils_inet4_ntop (NMP_OBJECT_CAST_IP4_ROUTE (gw)->gateway, buf);
|
||||
- ping_binary = nm_utils_find_helper ("ping", "/usr/bin/ping", NULL);
|
||||
+ ping_binary = "@inetutils@/bin/ping";
|
||||
log_domain = LOGD_IP4;
|
||||
}
|
||||
} else if (priv->ip_config_6 && priv->ip6_state == IP_DONE) {
|
||||
gw = nm_ip6_config_best_default_route_get (priv->ip_config_6);
|
||||
if (gw) {
|
||||
nm_utils_inet6_ntop (&NMP_OBJECT_CAST_IP6_ROUTE (gw)->gateway, buf);
|
||||
- ping_binary = nm_utils_find_helper ("ping6", "/usr/bin/ping6", NULL);
|
||||
+ ping_binary = "@inetutils@/bin/ping";
|
||||
log_domain = LOGD_IP6;
|
||||
}
|
||||
}
|
||||
--- a/src/nm-core-utils.c
|
||||
+++ b/src/nm-core-utils.c
|
||||
@@ -428,7 +428,7 @@
|
||||
|
||||
/* construct the argument list */
|
||||
argv = g_ptr_array_sized_new (4);
|
||||
- g_ptr_array_add (argv, "/sbin/modprobe");
|
||||
+ g_ptr_array_add (argv, "@kmod@/bin/modprobe");
|
||||
g_ptr_array_add (argv, (char *) arg1);
|
||||
|
||||
va_start (ap, arg1);
|
@ -1,11 +0,0 @@
|
||||
--- a/src/nm-core-utils.c 2017-02-15 13:10:27.000000000 +0100
|
||||
+++ b/src/nm-core-utils.c 2017-07-06 14:28:41.575815695 +0200
|
||||
@@ -419,7 +419,7 @@
|
||||
|
||||
/* construct the argument list */
|
||||
argv = g_ptr_array_sized_new (4);
|
||||
- g_ptr_array_add (argv, "/sbin/modprobe");
|
||||
+ g_ptr_array_add (argv, "@modprobeBinPath@");
|
||||
g_ptr_array_add (argv, (char *) arg1);
|
||||
|
||||
va_start (ap, arg1);
|
@ -1,29 +0,0 @@
|
||||
diff --git a/clients/common/nm-vpn-helpers.c b/clients/common/nm-vpn-helpers.c
|
||||
index 15611c45c..4a7444d3a 100644
|
||||
--- a/clients/common/nm-vpn-helpers.c
|
||||
+++ b/clients/common/nm-vpn-helpers.c
|
||||
@@ -203,23 +203,8 @@ nm_vpn_openconnect_authenticate_helper (const char *host,
|
||||
gboolean ret;
|
||||
char **strv = NULL, **iter;
|
||||
char *argv[4];
|
||||
- const char *path;
|
||||
- const char *const DEFAULT_PATHS[] = {
|
||||
- "/sbin/",
|
||||
- "/usr/sbin/",
|
||||
- "/usr/local/sbin/",
|
||||
- "/bin/",
|
||||
- "/usr/bin/",
|
||||
- "/usr/local/bin/",
|
||||
- NULL,
|
||||
- };
|
||||
-
|
||||
- path = nm_utils_file_search_in_paths ("openconnect", "/usr/sbin/openconnect", DEFAULT_PATHS,
|
||||
- G_FILE_TEST_IS_EXECUTABLE, NULL, NULL, error);
|
||||
- if (!path)
|
||||
- return FALSE;
|
||||
|
||||
- argv[0] = (char *) path;
|
||||
+ argv[0] = "@openconnect@/bin/openconnect";
|
||||
argv[1] = "--authenticate";
|
||||
argv[2] = (char *) host;
|
||||
argv[3] = NULL;
|
Loading…
Reference in New Issue
Block a user