Merge pull request #142160 from hrhino/fix/zbackup

zbackup: fix
This commit is contained in:
Guillaume Girol 2021-10-25 19:49:06 +00:00 committed by GitHub
commit 9ed177ac16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 1 deletions

View File

@ -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 ];

View File

@ -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;