From 3272f10024166d50fe970c4f415e56be43ec88b6 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 5 Jul 2018 19:18:07 +0200 Subject: [PATCH 1/3] networkmanager-openvpn: move to a subdirectory --- .../network-manager/{openvpn.nix => openvpn/default.nix} | 4 ++-- .../networking/network-manager/{ => openvpn}/fix-paths.patch | 0 pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename pkgs/tools/networking/network-manager/{openvpn.nix => openvpn/default.nix} (93%) rename pkgs/tools/networking/network-manager/{ => openvpn}/fix-paths.patch (100%) diff --git a/pkgs/tools/networking/network-manager/openvpn.nix b/pkgs/tools/networking/network-manager/openvpn/default.nix similarity index 93% rename from pkgs/tools/networking/network-manager/openvpn.nix rename to pkgs/tools/networking/network-manager/openvpn/default.nix index b1ee3da1b05..2eef7f31ab5 100644 --- a/pkgs/tools/networking/network-manager/openvpn.nix +++ b/pkgs/tools/networking/network-manager/openvpn/default.nix @@ -3,13 +3,13 @@ let pname = "NetworkManager-openvpn"; - version = "1.8.2"; + version = "1.8.4"; in stdenv.mkDerivation rec { name = "${pname}${if withGnome then "-gnome" else ""}-${version}"; src = fetchurl { url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "0p9pjk81h1j1dk9jkkvvk17cq21wyq5kfa4j49fmx9b9yg8syqc8"; + sha256 = "0gyrv46h9k17qym48qacq4zpxbap6hi17shn921824zm98m2bdvr"; }; patches = [ diff --git a/pkgs/tools/networking/network-manager/fix-paths.patch b/pkgs/tools/networking/network-manager/openvpn/fix-paths.patch similarity index 100% rename from pkgs/tools/networking/network-manager/fix-paths.patch rename to pkgs/tools/networking/network-manager/openvpn/fix-paths.patch diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6b1219690d7..6c01ddd1368 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4047,7 +4047,7 @@ with pkgs; networkmanager-iodine = callPackage ../tools/networking/network-manager/iodine.nix { }; - networkmanager-openvpn = callPackage ../tools/networking/network-manager/openvpn.nix { }; + networkmanager-openvpn = callPackage ../tools/networking/network-manager/openvpn { }; networkmanager-l2tp = callPackage ../tools/networking/network-manager/l2tp.nix { }; From f6e83edf36a1444e8fb57c787163b94a02584f13 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 5 Jul 2018 22:30:53 +0200 Subject: [PATCH 2/3] =?UTF-8?q?networkmanager:=201.10.6=20=E2=86=92=201.12?= =?UTF-8?q?.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../networking/network-manager/PppdPath.patch | 11 ---- .../networking/network-manager/default.nix | 57 +++++++++++-------- .../network-manager/fix-paths.patch | 41 +++++++++++++ .../networking/network-manager/modprobe.patch | 11 ---- .../openconnect_helper_path.patch | 29 ---------- 5 files changed, 73 insertions(+), 76 deletions(-) delete mode 100644 pkgs/tools/networking/network-manager/PppdPath.patch create mode 100644 pkgs/tools/networking/network-manager/fix-paths.patch delete mode 100644 pkgs/tools/networking/network-manager/modprobe.patch delete mode 100644 pkgs/tools/networking/network-manager/openconnect_helper_path.patch diff --git a/pkgs/tools/networking/network-manager/PppdPath.patch b/pkgs/tools/networking/network-manager/PppdPath.patch deleted file mode 100644 index 4850d93716d..00000000000 --- a/pkgs/tools/networking/network-manager/PppdPath.patch +++ /dev/null @@ -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; - diff --git a/pkgs/tools/networking/network-manager/default.nix b/pkgs/tools/networking/network-manager/default.nix index 9a129f52213..85c285fd3ec 100644 --- a/pkgs/tools/networking/network-manager/default.nix +++ b/pkgs/tools/networking/network-manager/default.nix @@ -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; }; } diff --git a/pkgs/tools/networking/network-manager/fix-paths.patch b/pkgs/tools/networking/network-manager/fix-paths.patch new file mode 100644 index 00000000000..5deaa2026d0 --- /dev/null +++ b/pkgs/tools/networking/network-manager/fix-paths.patch @@ -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); diff --git a/pkgs/tools/networking/network-manager/modprobe.patch b/pkgs/tools/networking/network-manager/modprobe.patch deleted file mode 100644 index 487c70b0165..00000000000 --- a/pkgs/tools/networking/network-manager/modprobe.patch +++ /dev/null @@ -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); diff --git a/pkgs/tools/networking/network-manager/openconnect_helper_path.patch b/pkgs/tools/networking/network-manager/openconnect_helper_path.patch deleted file mode 100644 index 597fb753e26..00000000000 --- a/pkgs/tools/networking/network-manager/openconnect_helper_path.patch +++ /dev/null @@ -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; From e056ac3f9856b71b4c0eaeb11aa83b775ae30897 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 5 Jul 2018 23:17:22 +0200 Subject: [PATCH 3/3] =?UTF-8?q?networkmanager-applet:=201.8.10=20=E2=86=92?= =?UTF-8?q?=201.8.14?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Password entering should now work even without GNOME Keyring: https://gitlab.gnome.org/GNOME/network-manager-applet/issues/3 --- pkgs/tools/networking/network-manager/applet.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/networking/network-manager/applet.nix b/pkgs/tools/networking/network-manager/applet.nix index ecd10a13976..98b9b0aef4d 100644 --- a/pkgs/tools/networking/network-manager/applet.nix +++ b/pkgs/tools/networking/network-manager/applet.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, meson, ninja, intltool, gtk-doc, pkgconfig, networkmanager, gnome3 +{ stdenv, fetchurl, fetchpatch, meson, ninja, intltool, gtk-doc, pkgconfig, networkmanager, gnome3 , libnotify, libsecret, polkit, isocodes, modemmanager, libxml2, docbook_xsl , mobile-broadband-provider-info, glib-networking, gsettings-desktop-schemas , libgudev, hicolor-icon-theme, jansson, wrapGAppsHook, webkitgtk, gobjectIntrospection @@ -6,18 +6,25 @@ let pname = "network-manager-applet"; - version = "1.8.10"; + version = "1.8.14"; in stdenv.mkDerivation rec { name = "${pname}-${version}"; src = fetchurl { url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz"; - sha256 = "1hy9ni2rwpy68h7jhn5lm2s1zm1vjchfy8lwj8fpm7xlx3x4pp0a"; + sha256 = "1js0i2kwfklahsn77qgxzdscy33drrlym3mrj1qhlw0zf8ri56ya"; }; + patches = [ + (fetchpatch { + url = https://gitlab.gnome.org/GNOME/network-manager-applet/merge_requests/12.patch; + sha256 = "0q5qbjpbrfvhqsprnwjwz4c42nly59cgnbn41w2zlxvqf29gjvwk"; + }) + ]; + mesonFlags = [ "-Dselinux=false" - "-Dappindicator=true" + "-Dappindicator=yes" "-Dgcr=${if withGnome then "true" else "false"}" ]; @@ -34,7 +41,6 @@ in stdenv.mkDerivation rec { propagatedUserEnvPkgs = [ hicolor-icon-theme - gnome3.gnome-keyring # See https://github.com/NixOS/nixpkgs/issues/38967 ]; NIX_CFLAGS = [