diff options
Diffstat (limited to 'pkgs/applications/networking/sync')
6 files changed, 89 insertions, 11 deletions
diff --git a/pkgs/applications/networking/sync/backintime/qt.nix b/pkgs/applications/networking/sync/backintime/qt.nix index 419fabc9348f3..bd571b1aed356 100644 --- a/pkgs/applications/networking/sync/backintime/qt.nix +++ b/pkgs/applications/networking/sync/backintime/qt.nix @@ -1,4 +1,4 @@ -{ mkDerivation, backintime-common, python3 }: +{ lib, mkDerivation, backintime-common, python3, polkit, which, su, coreutils, util-linux }: let python' = python3.withPackages (ps: with ps; [ pyqt5 backintime-common packaging ]); @@ -21,6 +21,29 @@ mkDerivation { preFixup = '' wrapQtApp "$out/bin/backintime-qt" \ - --prefix PATH : "${backintime-common}/bin:$PATH" + --prefix PATH : "${lib.getBin backintime-common}/bin:$PATH" + + substituteInPlace "$out/share/polkit-1/actions/net.launchpad.backintime.policy" \ + --replace "/usr/bin/backintime-qt" "$out/bin/backintime-qt" + + substituteInPlace "$out/share/applications/backintime-qt-root.desktop" \ + --replace "/usr/bin/backintime-qt" "backintime-qt" + + substituteInPlace "$out/share/backintime/qt/serviceHelper.py" \ + --replace "'which'" "'${lib.getBin which}/bin/which'" \ + --replace "/bin/su" "${lib.getBin su}/bin/su" \ + --replace "/usr/bin/backintime" "${lib.getBin backintime-common}/bin/backintime" \ + --replace "/usr/bin/nice" "${lib.getBin coreutils}/bin/nice" \ + --replace "/usr/bin/ionice" "${lib.getBin util-linux}/bin/ionice" + + substituteInPlace "$out/share/dbus-1/system-services/net.launchpad.backintime.serviceHelper.service" \ + --replace "/usr/bin/python3" "${lib.getBin python'}/bin/python3" \ + --replace "/usr/share/backintime" "$out/share/backintime" + + substituteInPlace "$out/bin/backintime-qt_polkit" \ + --replace "/usr/bin/backintime-qt" "$out/bin/backintime-qt" + + wrapProgram "$out/bin/backintime-qt_polkit" \ + --prefix PATH : "${lib.getBin polkit}/bin:$PATH" ''; } diff --git a/pkgs/applications/networking/sync/celeste/default.nix b/pkgs/applications/networking/sync/celeste/default.nix index 7386c32c279c4..5e56e5be71172 100644 --- a/pkgs/applications/networking/sync/celeste/default.nix +++ b/pkgs/applications/networking/sync/celeste/default.nix @@ -20,16 +20,16 @@ rustPlatform.buildRustPackage rec { pname = "celeste"; - version = "0.8.0"; + version = "0.8.1"; src = fetchFromGitHub { owner = "hwittenborn"; repo = "celeste"; rev = "v${version}"; - hash = "sha256-U+2imF4hUDJAwwf/RFZXfOgTxA+O8c6C+CzQoEQreJw="; + hash = "sha256-fJK3UTa5NS+dSsjnqZtRN3HmHQ1bYU2jepkJ5tchYD4="; }; - cargoHash = "sha256-9DrJoXT/uD8y7y2r58DMuURSaic+TtlnPPbw/gq9jPA="; + cargoHash = "sha256-/0w52bh9CsBoMTJsnWuEAQNgQzf92mbzh53H4iQYswc="; postPatch = '' pushd $cargoDepsCopy/librclone-sys diff --git a/pkgs/applications/networking/sync/rclone/default.nix b/pkgs/applications/networking/sync/rclone/default.nix index 26343f6a76efc..5d055d59e27a6 100644 --- a/pkgs/applications/networking/sync/rclone/default.nix +++ b/pkgs/applications/networking/sync/rclone/default.nix @@ -6,16 +6,16 @@ buildGoModule rec { pname = "rclone"; - version = "1.64.2"; + version = "1.65.0"; src = fetchFromGitHub { owner = pname; repo = pname; rev = "v${version}"; - hash = "sha256-gOFOcqCgFAiTc6W3v8Z917hGCzxluswqnuOoUht73GA="; + hash = "sha256-hlkX8JrBz/hFwQj0xCZfuBt2t3CP3Xa1JkNDH0zomxg="; }; - vendorHash = "sha256-eYIGVCTvUfGbsIMFthEfD0r6aeA7Ly9xJ8PJ6hR2SjA="; + vendorHash = "sha256-qKRIT2HqNDpEtZBNHZMXp4Yhh5fCkQSTPU5MQ7FmCHI="; subPackages = [ "." ]; diff --git a/pkgs/applications/networking/sync/rsync/default.nix b/pkgs/applications/networking/sync/rsync/default.nix index 9df26b6bb8453..1baf1c40eb14b 100644 --- a/pkgs/applications/networking/sync/rsync/default.nix +++ b/pkgs/applications/networking/sync/rsync/default.nix @@ -30,6 +30,12 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ perl ]; + patches = [ + # https://github.com/WayneD/rsync/issues/511#issuecomment-1774612577 + # original source: https://build.opensuse.org/package/view_file/network/rsync/rsync-fortified-strlcpy-fix.patch?expand=1&rev=3f8dd2f4a404c96c0f69176e60893714 + ./rsync-fortified-strlcpy-fix.patch + ]; + buildInputs = [ libiconv zlib popt ] ++ lib.optional enableACLs acl ++ lib.optional enableZstd zstd diff --git a/pkgs/applications/networking/sync/rsync/rsync-fortified-strlcpy-fix.patch b/pkgs/applications/networking/sync/rsync/rsync-fortified-strlcpy-fix.patch new file mode 100644 index 0000000000000..296445b4bb563 --- /dev/null +++ b/pkgs/applications/networking/sync/rsync/rsync-fortified-strlcpy-fix.patch @@ -0,0 +1,49 @@ +From 1f83963f59960150e8c46112daa8411324c1f209 Mon Sep 17 00:00:00 2001 +From: Jiri Slaby <jslaby@suse.cz> +Date: Fri, 18 Aug 2023 08:26:20 +0200 +Subject: [PATCH] exclude: fix crashes with fortified strlcpy() + +Fortified (-D_FORTIFY_SOURCE=2 for gcc) builds make strlcpy() crash when +its third parameter (size) is larger than the buffer: + $ rsync -FFXHav '--filter=merge global-rsync-filter' Align-37-43/ xxx + sending incremental file list + *** buffer overflow detected ***: terminated + +It's in the exclude code in setup_merge_file(): + strlcpy(y, save, MAXPATHLEN); + +Note the 'y' pointer was incremented, so it no longer points to memory +with MAXPATHLEN "owned" bytes. + +Fix it by remembering the number of copied bytes into the 'save' buffer +and use that instead of MAXPATHLEN which is clearly incorrect. + +Fixes #511. +--- + exclude.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/exclude.c b/exclude.c +index ffe55b167..1a5de3b9e 100644 +--- a/exclude.c ++++ b/exclude.c +@@ -720,7 +720,8 @@ static BOOL setup_merge_file(int mergelist_num, filter_rule *ex, + parent_dirscan = True; + while (*y) { + char save[MAXPATHLEN]; +- strlcpy(save, y, MAXPATHLEN); ++ /* copylen is strlen(y) which is < MAXPATHLEN. +1 for \0 */ ++ size_t copylen = strlcpy(save, y, MAXPATHLEN) + 1; + *y = '\0'; + dirbuf_len = y - dirbuf; + strlcpy(x, ex->pattern, MAXPATHLEN - (x - buf)); +@@ -734,7 +735,7 @@ static BOOL setup_merge_file(int mergelist_num, filter_rule *ex, + lp->head = NULL; + } + lp->tail = NULL; +- strlcpy(y, save, MAXPATHLEN); ++ strlcpy(y, save, copylen); + while ((*x++ = *y++) != '/') {} + } + parent_dirscan = False; + diff --git a/pkgs/applications/networking/sync/storj-uplink/default.nix b/pkgs/applications/networking/sync/storj-uplink/default.nix index f1cf8489c8086..435a3e1060f3b 100644 --- a/pkgs/applications/networking/sync/storj-uplink/default.nix +++ b/pkgs/applications/networking/sync/storj-uplink/default.nix @@ -5,18 +5,18 @@ buildGoModule rec { pname = "storj-uplink"; - version = "1.90.1"; + version = "1.92.1"; src = fetchFromGitHub { owner = "storj"; repo = "storj"; rev = "v${version}"; - hash = "sha256-LJtNsemNbN+TLyUxSgB/wftKxOfI/y/t+qv1TjcsXzQ="; + hash = "sha256-yeKI8vOuYFhABz09awPuCmjrifLttvBq1kaxMf78/HI="; }; subPackages = [ "cmd/uplink" ]; - vendorHash = "sha256-R713WhFrWT7Cgstk3SLuvvyk3/ZtT1LOH0qqmFcWzKw="; + vendorHash = "sha256-odtCBLg04gG1ztyDLdBADhdEhMkrizNjOGymAtzXy9g="; ldflags = [ "-s" "-w" ]; |