summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2017-01-02 15:38:46 +0100
committerMichael Raskin <7c6f434c@mail.ru>2017-01-02 15:38:46 +0100
commit277e7119be926b4fcdf4e73654490caaf350b3e1 (patch)
treedbf6aec6613df6e6051ff68e439d76b4f9693d78
parent6151982f5818b5428b013c69e760b52da40ffe2f (diff)
downloadnixlib-277e7119be926b4fcdf4e73654490caaf350b3e1.tar
nixlib-277e7119be926b4fcdf4e73654490caaf350b3e1.tar.gz
nixlib-277e7119be926b4fcdf4e73654490caaf350b3e1.tar.bz2
nixlib-277e7119be926b4fcdf4e73654490caaf350b3e1.tar.lz
nixlib-277e7119be926b4fcdf4e73654490caaf350b3e1.tar.xz
nixlib-277e7119be926b4fcdf4e73654490caaf350b3e1.tar.zst
nixlib-277e7119be926b4fcdf4e73654490caaf350b3e1.zip
openvpn: 2.3.13 -> 2.4.0
-rw-r--r--pkgs/tools/networking/openvpn/default.nix9
-rw-r--r--pkgs/tools/networking/openvpn/systemd-notify.patch14
2 files changed, 13 insertions, 10 deletions
diff --git a/pkgs/tools/networking/openvpn/default.nix b/pkgs/tools/networking/openvpn/default.nix
index 13e1c68befda..f609c90ad504 100644
--- a/pkgs/tools/networking/openvpn/default.nix
+++ b/pkgs/tools/networking/openvpn/default.nix
@@ -7,11 +7,12 @@ assert pkcs11Support -> (pkcs11helper != null);
 with stdenv.lib;
 
 stdenv.mkDerivation rec {
-  name = "openvpn-2.3.12";
+  name = "openvpn-${version}";
+  version = "2.4.0";
 
   src = fetchurl {
-    url = "http://swupdate.openvpn.net/community/releases/${name}.tar.gz";
-    sha256 = "1zqwq19xg6yf90nv35yr8r0ljas5f42v4n9hjjmhlnzpan69plzm";
+    url = "http://swupdate.openvpn.net/community/releases/${name}.tar.xz";
+    sha256 = "0zpqnbhjaifdalyxwmvk5kcyd7cpxbcigbn7967nbsyvl54vl8vg";
   };
 
   patches = optional stdenv.isLinux ./systemd-notify.patch;
@@ -39,8 +40,10 @@ stdenv.mkDerivation rec {
   meta = {
     description = "A robust and highly flexible tunneling application";
     homepage = http://openvpn.net/;
+    downloadPage = "https://openvpn.net/index.php/open-source/downloads.html";
     license = stdenv.lib.licenses.gpl2;
     maintainers = [ stdenv.lib.maintainers.viric ];
     platforms = stdenv.lib.platforms.unix;
+    updateWalker = true;
   };
 }
diff --git a/pkgs/tools/networking/openvpn/systemd-notify.patch b/pkgs/tools/networking/openvpn/systemd-notify.patch
index 9291f7a46642..c0ac8ae89d3c 100644
--- a/pkgs/tools/networking/openvpn/systemd-notify.patch
+++ b/pkgs/tools/networking/openvpn/systemd-notify.patch
@@ -10,13 +10,13 @@ diff -ru -x '*~' openvpn-2.3.1-orig/src/openvpn/init.c openvpn-2.3.1/src/openvpn
  static struct context *static_context; /* GLOBAL */
  
  /*
-@@ -1241,6 +1243,9 @@
- {
-   static const char message[] = "Initialization Sequence Completed";
+@@ -1375,6 +1375,9 @@
+     /* Reset the unsuccessful connection counter on complete initialisation */
+     c->options.unsuccessful_attempts = 0;
  
-+  /* Tell systemd we're ready. */
-+  sd_notify(0, "READY=1");
++    /* Tell systemd we're ready. */
++    sd_notify(0, "READY=1");
 +
-   /* If we delayed UID/GID downgrade or chroot, do it now */
-   do_uid_gid_chroot (c, true);
+     /* If we delayed UID/GID downgrade or chroot, do it now */
+     do_uid_gid_chroot (c, true);