summary refs log tree commit diff
path: root/pkgs/applications/networking/sync
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/sync')
-rw-r--r--pkgs/applications/networking/sync/acd_cli/default.nix4
-rw-r--r--pkgs/applications/networking/sync/rclone/default.nix6
-rw-r--r--pkgs/applications/networking/sync/rsync/base.nix9
-rw-r--r--pkgs/applications/networking/sync/rsync/default.nix68
-rw-r--r--pkgs/applications/networking/sync/rsync/rrsync.nix9
5 files changed, 57 insertions, 39 deletions
diff --git a/pkgs/applications/networking/sync/acd_cli/default.nix b/pkgs/applications/networking/sync/acd_cli/default.nix
index f630cb4071a..95970a7b870 100644
--- a/pkgs/applications/networking/sync/acd_cli/default.nix
+++ b/pkgs/applications/networking/sync/acd_cli/default.nix
@@ -1,5 +1,5 @@
 { lib, fetchFromGitHub, buildPythonApplication, fuse
-, appdirs, colorama, python-dateutil, requests, requests_toolbelt
+, appdirs, colorama, python-dateutil, requests, requests-toolbelt
 , fusepy, sqlalchemy, setuptools }:
 
 buildPythonApplication rec {
@@ -16,7 +16,7 @@ buildPythonApplication rec {
   };
 
   propagatedBuildInputs = [ appdirs colorama python-dateutil fusepy requests
-                            requests_toolbelt setuptools sqlalchemy ];
+                            requests-toolbelt setuptools sqlalchemy ];
 
   makeWrapperArgs = [ "--prefix LIBFUSE_PATH : ${fuse}/lib/libfuse.so" ];
 
diff --git a/pkgs/applications/networking/sync/rclone/default.nix b/pkgs/applications/networking/sync/rclone/default.nix
index 0a74d19dfdb..4b1a0bed048 100644
--- a/pkgs/applications/networking/sync/rclone/default.nix
+++ b/pkgs/applications/networking/sync/rclone/default.nix
@@ -5,16 +5,16 @@
 
 buildGoModule rec {
   pname = "rclone";
-  version = "1.55.1";
+  version = "1.56.0";
 
   src = fetchFromGitHub {
     owner = pname;
     repo = pname;
     rev = "v${version}";
-    sha256 = "1fyi12qz2igcf9rqsp9gmcgfnmgy4g04s2b03b95ml6klbf73cns";
+    sha256 = "03fqwsbpwb8vmgxg6knkp8f4xlvgg88n2c7inwjg8x91c7c77i0b";
   };
 
-  vendorSha256 = "199z3j62xw9h8yviyv4jfls29y2ri9511hcyp5ix8ahgk6ypz8vw";
+  vendorSha256 = "1gryisn63f6ss889s162ncvlsaznwgvgxdwk2pn5c5zw8dkmjdmi";
 
   subPackages = [ "." ];
 
diff --git a/pkgs/applications/networking/sync/rsync/base.nix b/pkgs/applications/networking/sync/rsync/base.nix
index 3479458088e..39ce5d3a7ea 100644
--- a/pkgs/applications/networking/sync/rsync/base.nix
+++ b/pkgs/applications/networking/sync/rsync/base.nix
@@ -1,4 +1,4 @@
-{ lib, fetchurl }:
+{ lib, fetchurl, fetchpatch }:
 
 rec {
   version = "3.2.3";
@@ -12,6 +12,13 @@ rec {
     url = "mirror://samba/rsync/rsync-patches-${version}.tar.gz";
     sha256 = "1wj21v57v135n6fnmlm2dxmb9lhrrg62jgkggldp1gb7d6s4arny";
   };
+  extraPatches = [
+    (fetchpatch {
+      name = "CVE-2020-14387.patch";
+      url = "https://git.samba.org/?p=rsync.git;a=patch;h=c3f7414;hp=4c4fce51072c9189cfb11b52aa54fed79f5741bd";
+      sha256 = "000lyx48lns84p53nsdlr45mb9558lrvnsz3yic0y3z6h2izv82x";
+    })
+  ];
 
   meta = with lib; {
     description = "Fast incremental file transfer utility";
diff --git a/pkgs/applications/networking/sync/rsync/default.nix b/pkgs/applications/networking/sync/rsync/default.nix
index 54417e6ef4b..88304e56a40 100644
--- a/pkgs/applications/networking/sync/rsync/default.nix
+++ b/pkgs/applications/networking/sync/rsync/default.nix
@@ -1,39 +1,47 @@
-{ lib, stdenv, fetchurl, perl, libiconv, zlib, popt
-, enableACLs ? lib.meta.availableOn stdenv.hostPlatform acl, acl ? null
-, enableLZ4 ? true, lz4 ? null
-, enableOpenSSL ? true, openssl ? null
-, enableXXHash ? true, xxHash ? null
-, enableZstd ? true, zstd ? null
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, perl
+, libiconv
+, zlib
+, popt
+, enableACLs ? lib.meta.availableOn stdenv.hostPlatform acl
+, acl
+, enableLZ4 ? true
+, lz4
+, enableOpenSSL ? true
+, openssl
+, enableXXHash ? true
+, xxHash
+, enableZstd ? true
+, zstd
 , enableCopyDevicesPatch ? false
 , nixosTests
 }:
 
-assert enableACLs -> acl != null;
-assert enableLZ4 -> lz4 != null;
-assert enableOpenSSL -> openssl != null;
-assert enableXXHash -> xxHash != null;
-assert enableZstd -> zstd != null;
-
 let
-  base = import ./base.nix { inherit lib fetchurl; };
+  base = import ./base.nix { inherit lib fetchurl fetchpatch; };
 in
 stdenv.mkDerivation rec {
-  name = "rsync-${base.version}";
+  pname = "rsync";
+  version = base.version;
 
   mainSrc = base.src;
 
   patchesSrc = base.upstreamPatchTarball;
 
-  srcs = [mainSrc] ++ lib.optional enableCopyDevicesPatch patchesSrc;
-  patches = lib.optional enableCopyDevicesPatch "./patches/copy-devices.diff";
+  srcs = [ mainSrc ] ++ lib.optional enableCopyDevicesPatch patchesSrc;
+  patches = lib.optional enableCopyDevicesPatch "./patches/copy-devices.diff"
+    ++ base.extraPatches;
 
-  buildInputs = [libiconv zlib popt]
-                ++ lib.optional enableACLs acl
-                ++ lib.optional enableZstd zstd
-                ++ lib.optional enableLZ4 lz4
-                ++ lib.optional enableOpenSSL openssl
-                ++ lib.optional enableXXHash xxHash;
-  nativeBuildInputs = [perl];
+  buildInputs = [ libiconv zlib popt ]
+    ++ lib.optional enableACLs acl
+    ++ lib.optional enableZstd zstd
+    ++ lib.optional enableLZ4 lz4
+    ++ lib.optional enableOpenSSL openssl
+    ++ lib.optional enableXXHash xxHash;
+  nativeBuildInputs = [ perl ];
 
   configureFlags = [
     "--with-nobody-group=nogroup"
@@ -42,13 +50,13 @@ stdenv.mkDerivation rec {
     # links them even.
     "--with-included-zlib=no"
   ]
-    # Work around issue with cross-compilation:
-    #     configure.sh: error: cannot run test program while cross compiling
-    # Remove once 3.2.4 or more recent is released.
-    # The following PR should fix the cross-compilation issue.
-    # Test using `nix-build -A pkgsCross.aarch64-multiplatform.rsync`.
-    # https://github.com/WayneD/rsync/commit/b7fab6f285ff0ff3816b109a8c3131b6ded0b484
-    ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "--enable-simd=no"
+  # Work around issue with cross-compilation:
+  #     configure.sh: error: cannot run test program while cross compiling
+  # Remove once 3.2.4 or more recent is released.
+  # The following PR should fix the cross-compilation issue.
+  # Test using `nix-build -A pkgsCross.aarch64-multiplatform.rsync`.
+  # https://github.com/WayneD/rsync/commit/b7fab6f285ff0ff3816b109a8c3131b6ded0b484
+  ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "--enable-simd=no"
   ;
 
   passthru.tests = { inherit (nixosTests) rsyncd; };
diff --git a/pkgs/applications/networking/sync/rsync/rrsync.nix b/pkgs/applications/networking/sync/rsync/rrsync.nix
index 83eb4658d2f..e55f7fc1fba 100644
--- a/pkgs/applications/networking/sync/rsync/rrsync.nix
+++ b/pkgs/applications/networking/sync/rsync/rrsync.nix
@@ -1,10 +1,11 @@
-{ lib, stdenv, fetchurl, perl, rsync }:
+{ lib, stdenv, fetchurl, perl, rsync, fetchpatch }:
 
 let
-  base = import ./base.nix { inherit lib fetchurl; };
+  base = import ./base.nix { inherit lib fetchurl fetchpatch; };
 in
 stdenv.mkDerivation {
-  name = "rrsync-${base.version}";
+  pname = "rrsync";
+  version = base.version;
 
   src = base.src;
 
@@ -15,6 +16,8 @@ stdenv.mkDerivation {
   dontConfigure = true;
   dontBuild = true;
 
+  patches = base.extraPatches;
+
   postPatch = ''
     substituteInPlace support/rrsync --replace /usr/bin/rsync ${rsync}/bin/rsync
   '';