networkmanager: 1.10.6 → 1.12.0

+73 -76
-11
pkgs/tools/networking/network-manager/PppdPath.patch
··· 1 - --- NetworkManager-1.6.2.org/src/ppp/nm-ppp-manager.c 2017-02-15 13:10:27.000000000 +0100 2 - +++ NetworkManager-1.6.2/./src/ppp/nm-ppp-manager.c 2017-04-03 11:45:39.891653216 +0200 3 - @@ -724,7 +724,7 @@ 4 - 5 - g_return_val_if_fail (setting != NULL, NULL); 6 - 7 - - pppd_binary = nm_utils_find_helper ("pppd", NULL, err); 8 - + pppd_binary = nm_utils_find_helper ("pppd", PPPD_PATH, err); 9 - if (!pppd_binary) 10 - return NULL; 11 -
···
+32 -25
pkgs/tools/networking/network-manager/default.nix
··· 1 - { stdenv, fetchurl, intltool, pkgconfig, dbus-glib, gnome3 2 - , systemd, libgudev, libnl, libuuid, polkit, gnutls, ppp, dhcp, iptables 3 , libgcrypt, dnsmasq, bluez5, readline 4 , gobjectIntrospection, modemmanager, openresolv, libndp, newt, libsoup 5 , ethtool, iputils, gnused, coreutils, file, inetutils, kmod, jansson, libxslt 6 - , python3Packages, docbook_xsl, fetchpatch, openconnect, curl, autoreconfHook }: 7 8 let 9 - pname = "NetworkManager"; 10 - version = "1.10.6"; 11 in stdenv.mkDerivation rec { 12 - name = "network-manager-${version}"; 13 14 src = fetchurl { 15 - url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; 16 - sha256 = "0xmc3x41dbcaxjm85wfv405xq1a1n3xw8m8zg645ywm3avlb3w3a"; 17 }; 18 19 outputs = [ "out" "dev" ]; ··· 25 preConfigure = '' 26 substituteInPlace configure --replace /usr/bin/uname ${coreutils}/bin/uname 27 substituteInPlace configure --replace /usr/bin/file ${file}/bin/file 28 - substituteInPlace src/devices/nm-device.c \ 29 - --replace /usr/bin/ping ${inetutils}/bin/ping \ 30 - --replace /usr/bin/ping6 ${inetutils}/bin/ping 31 - substituteInPlace src/devices/nm-arping-manager.c \ 32 - --replace '("arping", NULL, NULL);' '("arping", "${iputils}/bin/arping", NULL);' 33 substituteInPlace data/84-nm-drivers.rules \ 34 --replace /bin/sh ${stdenv.shell} 35 substituteInPlace data/85-nm-unmanaged.rules \ ··· 38 --replace /bin/sed ${gnused}/bin/sed 39 substituteInPlace data/NetworkManager.service.in \ 40 --replace /bin/kill ${coreutils}/bin/kill 41 - substituteInPlace clients/common/nm-vpn-helpers.c \ 42 - --subst-var-by openconnect ${openconnect} 43 - substituteInPlace src/nm-core-utils.c \ 44 - --subst-var-by modprobeBinPath ${kmod}/bin/modprobe 45 # to enable link-local connections 46 configureFlags="$configureFlags --with-udev-dir=$out/lib/udev" 47 ··· 70 "--with-modem-manager-1" 71 "--with-nmtui" 72 "--disable-gtk-doc" 73 ]; 74 75 patches = [ 76 - ./PppdPath.patch 77 - ./openconnect_helper_path.patch 78 - ./modprobe.patch 79 ]; 80 81 - buildInputs = [ systemd libgudev libnl libuuid polkit ppp libndp curl 82 - bluez5 dnsmasq gobjectIntrospection modemmanager readline newt libsoup jansson ]; 83 84 propagatedBuildInputs = [ dbus-glib gnutls libgcrypt python3Packages.pygobject3 ]; 85 ··· 114 }; 115 116 meta = with stdenv.lib; { 117 - homepage = https://wiki.gnome.org/Projects/NetworkManager; 118 description = "Network configuration and management tool"; 119 - license = licenses.gpl2Plus; 120 maintainers = with maintainers; [ phreedom rickynils domenkozar obadz ]; 121 - platforms = platforms.linux; 122 }; 123 }
··· 1 + { stdenv, fetchurl, substituteAll, intltool, pkgconfig, dbus-glib, gnome3 2 + , systemd, libuuid, polkit, gnutls, ppp, dhcp, iptables 3 , libgcrypt, dnsmasq, bluez5, readline 4 , gobjectIntrospection, modemmanager, openresolv, libndp, newt, libsoup 5 , ethtool, iputils, gnused, coreutils, file, inetutils, kmod, jansson, libxslt 6 + , python3Packages, docbook_xsl, openconnect, curl, autoreconfHook }: 7 8 let 9 + pname = "NetworkManager"; 10 in stdenv.mkDerivation rec { 11 + name = "network-manager-${version}"; 12 + version = "1.12.0"; 13 14 src = fetchurl { 15 + url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; 16 + sha256 = "15bzjkrfa7sw5p5hkdha4a67y1zfnzh1s6za11sh8s1yxmyvkziq"; 17 }; 18 19 outputs = [ "out" "dev" ]; ··· 25 preConfigure = '' 26 substituteInPlace configure --replace /usr/bin/uname ${coreutils}/bin/uname 27 substituteInPlace configure --replace /usr/bin/file ${file}/bin/file 28 substituteInPlace data/84-nm-drivers.rules \ 29 --replace /bin/sh ${stdenv.shell} 30 substituteInPlace data/85-nm-unmanaged.rules \ ··· 33 --replace /bin/sed ${gnused}/bin/sed 34 substituteInPlace data/NetworkManager.service.in \ 35 --replace /bin/kill ${coreutils}/bin/kill 36 # to enable link-local connections 37 configureFlags="$configureFlags --with-udev-dir=$out/lib/udev" 38 ··· 61 "--with-modem-manager-1" 62 "--with-nmtui" 63 "--disable-gtk-doc" 64 + "--with-libnm-glib" # legacy library, TODO: remove 65 + "--disable-tests" 66 ]; 67 68 patches = [ 69 + # https://bugzilla.gnome.org/show_bug.cgi?id=796752 70 + (fetchurl { 71 + url = https://bugzilla.gnome.org/attachment.cgi?id=372955; 72 + sha256 = "17rl19lprnsz4wjmp54c1qw6a3pf8x97bhd69xavwy7cx6z84b3n"; 73 + }) 74 + # https://bugzilla.gnome.org/show_bug.cgi?id=796751 75 + (fetchurl { 76 + url = https://bugzilla.gnome.org/attachment.cgi?id=372953; 77 + sha256 = "1crjplyiiipkhjjlifrv6hhvxinlcxd6irp9ijbc7jij31g44i0a"; 78 + }) 79 + (substituteAll { 80 + src = ./fix-paths.patch; 81 + inherit inetutils kmod openconnect; 82 + }) 83 + 84 ]; 85 86 + buildInputs = [ 87 + systemd libuuid polkit ppp libndp curl 88 + bluez5 dnsmasq gobjectIntrospection modemmanager readline newt libsoup jansson 89 + ]; 90 91 propagatedBuildInputs = [ dbus-glib gnutls libgcrypt python3Packages.pygobject3 ]; 92 ··· 121 }; 122 123 meta = with stdenv.lib; { 124 + homepage = https://wiki.gnome.org/Projects/NetworkManager; 125 description = "Network configuration and management tool"; 126 + license = licenses.gpl2Plus; 127 maintainers = with maintainers; [ phreedom rickynils domenkozar obadz ]; 128 + platforms = platforms.linux; 129 }; 130 }
+41
pkgs/tools/networking/network-manager/fix-paths.patch
···
··· 1 + --- a/clients/common/nm-vpn-helpers.c 2 + +++ b/clients/common/nm-vpn-helpers.c 3 + @@ -205,7 +205,7 @@ 4 + char *argv[4]; 5 + const char *path; 6 + 7 + - path = nm_utils_find_helper ("openconnect", "/usr/sbin/openconnect", error); 8 + + path = "@openconnect@/bin/openconnect"; 9 + if (!path) 10 + return FALSE; 11 + 12 + --- a/src/devices/nm-device.c 13 + +++ b/src/devices/nm-device.c 14 + @@ -11828,14 +11828,14 @@ 15 + gw = nm_ip4_config_best_default_route_get (priv->ip_config_4); 16 + if (gw) { 17 + nm_utils_inet4_ntop (NMP_OBJECT_CAST_IP4_ROUTE (gw)->gateway, buf); 18 + - ping_binary = nm_utils_find_helper ("ping", "/usr/bin/ping", NULL); 19 + + ping_binary = "@inetutils@/bin/ping"; 20 + log_domain = LOGD_IP4; 21 + } 22 + } else if (priv->ip_config_6 && priv->ip6_state == IP_DONE) { 23 + gw = nm_ip6_config_best_default_route_get (priv->ip_config_6); 24 + if (gw) { 25 + nm_utils_inet6_ntop (&NMP_OBJECT_CAST_IP6_ROUTE (gw)->gateway, buf); 26 + - ping_binary = nm_utils_find_helper ("ping6", "/usr/bin/ping6", NULL); 27 + + ping_binary = "@inetutils@/bin/ping"; 28 + log_domain = LOGD_IP6; 29 + } 30 + } 31 + --- a/src/nm-core-utils.c 32 + +++ b/src/nm-core-utils.c 33 + @@ -428,7 +428,7 @@ 34 + 35 + /* construct the argument list */ 36 + argv = g_ptr_array_sized_new (4); 37 + - g_ptr_array_add (argv, "/sbin/modprobe"); 38 + + g_ptr_array_add (argv, "@kmod@/bin/modprobe"); 39 + g_ptr_array_add (argv, (char *) arg1); 40 + 41 + va_start (ap, arg1);
-11
pkgs/tools/networking/network-manager/modprobe.patch
··· 1 - --- a/src/nm-core-utils.c 2017-02-15 13:10:27.000000000 +0100 2 - +++ b/src/nm-core-utils.c 2017-07-06 14:28:41.575815695 +0200 3 - @@ -419,7 +419,7 @@ 4 - 5 - /* construct the argument list */ 6 - argv = g_ptr_array_sized_new (4); 7 - - g_ptr_array_add (argv, "/sbin/modprobe"); 8 - + g_ptr_array_add (argv, "@modprobeBinPath@"); 9 - g_ptr_array_add (argv, (char *) arg1); 10 - 11 - va_start (ap, arg1);
···
-29
pkgs/tools/networking/network-manager/openconnect_helper_path.patch
··· 1 - diff --git a/clients/common/nm-vpn-helpers.c b/clients/common/nm-vpn-helpers.c 2 - index 15611c45c..4a7444d3a 100644 3 - --- a/clients/common/nm-vpn-helpers.c 4 - +++ b/clients/common/nm-vpn-helpers.c 5 - @@ -203,23 +203,8 @@ nm_vpn_openconnect_authenticate_helper (const char *host, 6 - gboolean ret; 7 - char **strv = NULL, **iter; 8 - char *argv[4]; 9 - - const char *path; 10 - - const char *const DEFAULT_PATHS[] = { 11 - - "/sbin/", 12 - - "/usr/sbin/", 13 - - "/usr/local/sbin/", 14 - - "/bin/", 15 - - "/usr/bin/", 16 - - "/usr/local/bin/", 17 - - NULL, 18 - - }; 19 - - 20 - - path = nm_utils_file_search_in_paths ("openconnect", "/usr/sbin/openconnect", DEFAULT_PATHS, 21 - - G_FILE_TEST_IS_EXECUTABLE, NULL, NULL, error); 22 - - if (!path) 23 - - return FALSE; 24 - 25 - - argv[0] = (char *) path; 26 - + argv[0] = "@openconnect@/bin/openconnect"; 27 - argv[1] = "--authenticate"; 28 - argv[2] = (char *) host; 29 - argv[3] = NULL;
···