zbackup: fix

The upstream proposed fix doesn't apply cleanly, so here's a version
that does.
main
Harrison Houghton 3 years ago
parent a3f85aedb1
commit 3b46f18b02
  1. 12
      pkgs/tools/backup/zbackup/default.nix
  2. 11
      pkgs/tools/backup/zbackup/protobuf-api-change.patch

@ -1,4 +1,8 @@
{ lib, stdenv, fetchFromGitHub, cmake, zlib, openssl, protobuf, protobufc, lzo, libunwind }:
{ lib, stdenv, fetchFromGitHub, fetchpatch
, cmake, protobufc
, libunwind, lzo, openssl, protobuf, zlib
}:
stdenv.mkDerivation rec {
pname = "zbackup";
version = "1.4.4";
@ -10,6 +14,12 @@ stdenv.mkDerivation rec {
hash = "sha256-9Fk4EhEeQ2J4Kirc7oad4CzmW70Mmza6uozd87qfgZI=";
};
patches = [
# compare with https://github.com/zbackup/zbackup/pull/158;
# but that doesn't apply cleanly to this version
./protobuf-api-change.patch
];
buildInputs = [ zlib openssl protobuf lzo libunwind ];
nativeBuildInputs = [ cmake protobufc ];

@ -0,0 +1,11 @@
--- a/backup_restorer.cc
+++ b/backup_restorer.cc
@@ -48,7 +48,7 @@
// TODO: this disables size checks for each separate message. Figure a better
// way to do this while keeping them enabled. It seems we need to create an
// instance of CodedInputStream for each message, but it might be expensive
- cis.SetTotalBytesLimit( backupData.size(), -1 );
+ cis.SetTotalBytesLimit( backupData.size() );
// Used when emitting chunks
string chunk;
Loading…
Cancel
Save