Merge pull request #16412 from obadz/networkmanager-1.2

NetworkManager & plugins: upgrade to 1.2
This commit is contained in:
obadz 2016-06-22 15:12:23 +01:00 committed by GitHub
commit f540e09a8b
14 changed files with 82 additions and 196 deletions

View File

@ -3,20 +3,14 @@
, mobile_broadband_provider_info, glib_networking, gsettings_desktop_schemas
, makeWrapper, udev, libgudev, hicolor_icon_theme }:
let
pn = "network-manager-applet";
major = "1.0";
# With version 1.0.12 of NM, we are no longer in sync
# version = "${networkmanager.version}.10";
version = "${major}.10";
in
stdenv.mkDerivation rec {
name = "network-manager-applet-${version}";
name = "${pname}-${version}";
pname = "network-manager-applet";
version = networkmanager.version;
src = fetchurl {
url = "mirror://gnome/sources/${pn}/${major}/${name}.tar.xz";
sha256 = "1szh5jyijxm6z55irkp5s44pwah0nikss40mx7pvpk38m8zaqidh";
url = "mirror://gnome/sources/${pname}/${networkmanager.major}/${name}.tar.xz";
sha256 = "02b42e7c17c9cd6c840563750da92ce58da1ec621df7f0c2402016026e727756";
};
configureFlags = [ "--sysconfdir=/etc" ];
@ -34,8 +28,7 @@ stdenv.mkDerivation rec {
''CFLAGS=-DMOBILE_BROADBAND_PROVIDER_INFO=\"${mobile_broadband_provider_info}/share/mobile-broadband-provider-info/serviceproviders.xml\"''
];
preInstall =
''
preInstall = ''
installFlagsArray=( "sysconfdir=$out/etc" )
'';

View File

@ -6,11 +6,13 @@
stdenv.mkDerivation rec {
name = "network-manager-${version}";
version = "1.0.12";
pname = "NetworkManager";
major = "1.2";
version = "${major}.2";
src = fetchurl {
url = "mirror://gnome/sources/NetworkManager/1.0/NetworkManager-${version}.tar.xz";
sha256 = "17jan0g5jzp8mrpklyacwdgnnw016m1c5pc4az5im6qhc260yirs";
url = "mirror://gnome/sources/${pname}/${major}/${pname}-${version}.tar.xz";
sha256 = "41d8082e027f58bb5fa4181f93742606ab99c659794a18e2823eff22df0eecd9";
};
preConfigure = ''
@ -61,15 +63,11 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ intltool pkgconfig ];
patches = [ ./nm-platform.patch ];
preInstall =
''
installFlagsArray=( "sysconfdir=$out/etc" "localstatedir=$out/var" )
preInstall = ''
installFlagsArray=( "sysconfdir=$out/etc" "localstatedir=$out/var" "runstatedir=$out/var/run" )
'';
postInstall =
''
postInstall = ''
mkdir -p $out/lib/NetworkManager
# FIXME: Workaround until NixOS' dbus+systemd supports at_console policy
@ -88,7 +86,7 @@ stdenv.mkDerivation rec {
homepage = http://projects.gnome.org/NetworkManager/;
description = "Network configuration and management tool";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ phreedom urkud rickynils domenkozar ];
maintainers = with maintainers; [ phreedom urkud rickynils domenkozar obadz ];
platforms = platforms.linux;
};
}

View File

@ -1,26 +0,0 @@
diff --git a/src/nm-l2tp-service.c b/src/nm-l2tp-service.c
index d2c9dc4..e61d3d2 100644
--- a/src/nm-l2tp-service.c
+++ b/src/nm-l2tp-service.c
@@ -655,9 +655,7 @@ nm_find_ipsec (void)
{
static const char *ipsec_binary_paths[] =
{
- "/sbin/ipsec",
- "/usr/sbin/ipsec",
- "/usr/local/sbin/ipsec",
+ "@strongswan@/bin/ipsec",
NULL
};
@@ -677,9 +675,7 @@ nm_find_l2tpd (void)
{
static const char *l2tp_binary_paths[] =
{
- "/sbin/xl2tpd",
- "/usr/sbin/xl2tpd",
- "/usr/local/sbin/xl2tpd",
+ "@xl2tpd@/bin/xl2tpd",
NULL
};

View File

@ -1,48 +1,42 @@
{ stdenv, fetchFromGitHub, substituteAll, automake, autoconf, libtool, intltool, pkgconfig
, networkmanager, ppp, xl2tpd, strongswan
{ stdenv, fetchFromGitHub, automake, autoconf, libtool, intltool, pkgconfig
, networkmanager, networkmanagerapplet, ppp, xl2tpd, strongswan, libsecret
, withGnome ? true, gnome3 }:
stdenv.mkDerivation rec {
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
pname = "NetworkManager-l2tp";
version = "0.9.8.7";
version = networkmanager.version;
src = fetchFromGitHub {
owner = "seriyps";
repo = "NetworkManager-l2tp";
owner = "nm-l2tp";
repo = "network-manager-l2tp";
rev = version;
sha256 = "07gl562p3f6l2wn64f3vvz1ygp3hsfhiwh4sn04c3fahfdys69zx";
sha256 = "1zqdhm7pzhaq6q8pddj9ki25qs9m6qwqgzc5x07a0qffla2rq5j1";
};
buildInputs = [ networkmanager ppp ]
buildInputs = [ networkmanager ppp networkmanagerapplet libsecret ]
++ stdenv.lib.optionals withGnome [ gnome3.gtk gnome3.libgnome_keyring ];
nativeBuildInputs = [ automake autoconf libtool intltool pkgconfig ];
configureScript = "./autogen.sh";
postPatch = ''
sed -i -e 's%"\(/usr/sbin\|/usr/pkg/sbin\|/usr/local/sbin\)/[^"]*",%%g' ./src/nm-l2tp-service.c
substituteInPlace ./src/nm-l2tp-service.c \
--replace /sbin/ipsec ${strongswan}/bin/ipsec \
--replace /sbin/xl2tpd ${xl2tpd}/bin/xl2tpd
'';
preConfigure = "./autogen.sh";
configureFlags =
if withGnome then "--with-gnome" else "--without-gnome";
postConfigure = "sed 's/-Werror//g' -i Makefile */Makefile";
patches =
[ ( substituteAll {
src = ./l2tp-purity.patch;
inherit xl2tpd strongswan;
})
];
# Workaround https://github.com/xelerance/xl2tpd/issues/108
postPatch = ''
substituteInPlace ./src/nm-l2tp-service.c --replace 'write_config_option (pppopt_fd, "lock\n");' ""
'';
meta = with stdenv.lib; {
description = "L2TP plugin for NetworkManager";
inherit (networkmanager.meta) platforms;
homepage = https://github.com/seriyps/NetworkManager-l2tp;
license = licenses.gpl2;
maintainers = with maintainers; [ abbradar ];
maintainers = with maintainers; [ abbradar obadz ];
};
}

View File

@ -1,17 +0,0 @@
diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c
index 8803377..14e5726 100644
--- a/src/platform/nm-platform.c
+++ b/src/platform/nm-platform.c
@@ -39,6 +39,12 @@
#include "nm-enum-types.h"
#include "nm-core-internal.h"
+#if HAVE_LIBNL_INET6_ADDR_GEN_MODE && HAVE_KERNEL_INET6_ADDR_GEN_MODE
+#include <linux/if_link.h>
+#else
+#define IN6_ADDR_GEN_MODE_NONE 1
+#endif
+
#define ADDRESS_LIFETIME_PADDING 5
G_STATIC_ASSERT (sizeof ( ((NMPlatformLink *) NULL)->addr.data ) == NM_UTILS_HWADDR_LEN_MAX);

View File

@ -4,13 +4,11 @@
stdenv.mkDerivation rec {
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
pname = "NetworkManager-openconnect";
version = "1.0.2";
# FixMe: Change version back to "networkmanager.version"
version = networkmanager.version;
src = fetchurl {
url = "mirror://gnome/sources/${pname}/1.0/${pname}-${version}.tar.xz";
sha256 = "03k05s3aaxcwrip3g3r13bx80wbg7vh5sssc7mvg27c4cdc0a2hj";
url = "mirror://gnome/sources/${pname}/${networkmanager.major}/${pname}-${version}.tar.xz";
sha256 = "522979593e21b4e884112816708db9eb66148b3491580dacfad53472b94aafec";
};
buildInputs = [ openconnect networkmanager libsecret ]
@ -31,15 +29,6 @@ stdenv.mkDerivation rec {
--replace "/sbin/modprobe" "${kmod}/sbin/modprobe"
'';
postConfigure = ''
substituteInPlace "./auth-dialog/Makefile" \
--replace "-Wstrict-prototypes" "" \
--replace "-Werror" ""
substituteInPlace "properties/Makefile" \
--replace "-Wstrict-prototypes" "" \
--replace "-Werror" ""
'';
meta = {
description = "NetworkManager's OpenConnect plugin";
inherit (networkmanager.meta) maintainers platforms;

View File

@ -7,8 +7,8 @@ stdenv.mkDerivation rec {
version = networkmanager.version;
src = fetchurl {
url = "mirror://gnome/sources/${pname}/1.0/${pname}-${version}.tar.xz";
sha256 = "132xwkgyfnpma7m6b06jhrd1g9xk5dlpx8alnsf03ls3z92bd0n9";
url = "mirror://gnome/sources/${pname}/${networkmanager.major}/${pname}-${version}.tar.xz";
sha256 = "47a6d219a781eff8491c7876b7fb95b12dcfb8f8a05f916f95afc65c7babddef";
};
buildInputs = [ openvpn networkmanager libsecret ]
@ -33,15 +33,6 @@ stdenv.mkDerivation rec {
--replace "/sbin/openvpn" "${openvpn}/sbin/openvpn"
'';
postConfigure = ''
substituteInPlace "./auth-dialog/Makefile" \
--replace "-Wstrict-prototypes" "" \
--replace "-Werror" ""
substituteInPlace "properties/Makefile" \
--replace "-Wstrict-prototypes" "" \
--replace "-Werror" ""
'';
meta = {
description = "NetworkManager's OpenVPN plugin";
inherit (networkmanager.meta) maintainers platforms;

View File

@ -1,26 +0,0 @@
diff --git a/src/nm-pptp-service.c b/src/nm-pptp-service.c
index 68a5759..568bbfe 100644
--- a/src/nm-pptp-service.c
+++ b/src/nm-pptp-service.c
@@ -730,9 +730,7 @@ nm_find_pppd (void)
{
static const char *pppd_binary_paths[] =
{
- "/sbin/pppd",
- "/usr/sbin/pppd",
- "/usr/local/sbin/pppd",
+ "@ppp@/sbin/pppd",
NULL
};
@@ -752,9 +750,7 @@ nm_find_pptp (void)
{
static const char *pptp_binary_paths[] =
{
- "/sbin/pptp",
- "/usr/sbin/pptp",
- "/usr/local/sbin/pptp",
+ "@pptp@/sbin/pptp",
NULL
};

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, networkmanager, pptp, ppp, intltool, pkgconfig, substituteAll
{ stdenv, fetchurl, networkmanager, pptp, ppp, intltool, pkgconfig
, libsecret, withGnome ? true, gnome3 }:
stdenv.mkDerivation rec {
@ -7,8 +7,8 @@ stdenv.mkDerivation rec {
version = networkmanager.version;
src = fetchurl {
url = "mirror://gnome/sources/${pname}/1.0/${pname}-${version}.tar.xz";
sha256 = "1gn1f8r32wznk4rsn2lg2slw1ccli00svz0fi4bx0qiylimlbyln";
url = "mirror://gnome/sources/${pname}/${networkmanager.major}/${pname}-${version}.tar.xz";
sha256 = "a72cb88ecc0a9edec836e8042c592d68b8b290c0d78082e6b25cf08b46c6be5d";
};
buildInputs = [ networkmanager pptp ppp libsecret ]
@ -17,18 +17,17 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ intltool pkgconfig ];
postPatch = ''
sed -i -e 's%"\(/usr/sbin\|/usr/pkg/sbin\|/usr/local/sbin\)/[^"]*",%%g' ./src/nm-pptp-service.c
substituteInPlace ./src/nm-pptp-service.c \
--replace /sbin/pptp ${pptp}/bin/pptp \
--replace /sbin/pppd ${ppp}/bin/pppd
'';
configureFlags =
if withGnome then "--with-gnome --with-gtkver=3" else "--without-gnome";
postConfigure = "sed 's/-Werror//g' -i Makefile */Makefile";
patches =
[ ( substituteAll {
src = ./pptp-purity.patch;
inherit ppp pptp;
})
];
meta = {
description = "PPtP plugin for NetworkManager";
inherit (networkmanager.meta) maintainers platforms;

View File

@ -7,8 +7,8 @@ stdenv.mkDerivation rec {
version = networkmanager.version;
src = fetchurl {
url = "mirror://gnome/sources/${pname}/1.0/${pname}-${version}.tar.xz";
sha256 = "0hycplnc78688sgpzdh3ifra6chascrh751mckqkp1j553bri0jk";
url = "mirror://gnome/sources/${pname}/${networkmanager.major}/${pname}-${version}.tar.xz";
sha256 = "e900f6500026f8c3ee4feb92e1d0a0c0abbee9ba507dad915b47a8ab7df9e1f3";
};
buildInputs = [ vpnc networkmanager libsecret ]
@ -30,15 +30,6 @@ stdenv.mkDerivation rec {
--replace "/sbin/modprobe" "${kmod}/sbin/modprobe"
'';
postConfigure = ''
substituteInPlace "./auth-dialog/Makefile" \
--replace "-Wstrict-prototypes" "" \
--replace "-Werror" ""
substituteInPlace "properties/Makefile" \
--replace "-Wstrict-prototypes" "" \
--replace "-Werror" ""
'';
meta = {
description = "NetworkManager's VPNC plugin";
inherit (networkmanager.meta) maintainers platforms;

View File

@ -2594,7 +2594,7 @@ in
netselect = callPackage ../tools/networking/netselect { };
# stripped down, needed by steam
networkmanager098 = callPackage ../tools/networking/network-manager/0.9.8.nix { };
networkmanager098 = callPackage ../tools/networking/network-manager/0.9.8 { };
networkmanager = callPackage ../tools/networking/network-manager { };