pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Adding zbackup 1.4.4
Module Name: pkgsrc-wip
Committed By: i3enedek <pkgsrc_git%i3enedek.neomailbox.net@localhost>
Pushed By: i3enedek
Date: Thu Feb 11 12:28:49 2016 +0000
Changeset: 8309418e74424f511bdb13b3b08787634dea662d
Added Files:
zbackup/DESCR
zbackup/Makefile
zbackup/PLIST
zbackup/TODO
zbackup/distinfo
zbackup/patches/patch-compression.cc
zbackup/patches/patch-endian.hh
zbackup/patches/patch-file.cc
zbackup/patches/patch-unbuffered__file.cc
Log Message:
Adding zbackup 1.4.4
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=8309418e74424f511bdb13b3b08787634dea662d
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
zbackup/DESCR | 15 +++++++++++++++
zbackup/Makefile | 26 ++++++++++++++++++++++++++
zbackup/PLIST | 2 ++
zbackup/TODO | 2 ++
zbackup/distinfo | 10 ++++++++++
zbackup/patches/patch-compression.cc | 18 ++++++++++++++++++
zbackup/patches/patch-endian.hh | 13 +++++++++++++
zbackup/patches/patch-file.cc | 30 ++++++++++++++++++++++++++++++
zbackup/patches/patch-unbuffered__file.cc | 22 ++++++++++++++++++++++
9 files changed, 138 insertions(+)
diffs:
diff --git a/zbackup/DESCR b/zbackup/DESCR
new file mode 100755
index 0000000..84e3508
--- /dev/null
+++ b/zbackup/DESCR
@@ -0,0 +1,15 @@
+zbackup is a globally-deduplicating backup tool, based on the ideas found in
+rsync.
+
+Feed a large .tar into it, and it will store duplicate regions of it only
+once, then compress and optionally encrypt the result. Feed another .tar file,
+and it will also re-use any data found in any previous backups.
+This way only new changes are stored, and as long as the files are not very
+different, the amount of storage required is very low. Any of the backup files
+stored previously can be read back in full at any time.
+
+This is achieved by sliding a window with a rolling hash over the input at a
+byte granularity and checking whether the block in focus was ever met already.
+
+If a rolling hash matches, an additional full cryptographic hash is calculated
+to ensure the block is indeed the same. The deduplication happens then.
diff --git a/zbackup/Makefile b/zbackup/Makefile
new file mode 100755
index 0000000..9f0fbf9
--- /dev/null
+++ b/zbackup/Makefile
@@ -0,0 +1,26 @@
+# $NetBSD$
+
+GITHUB_PROJECT= zbackup
+DISTNAME= 1.4.4
+PKGNAME= ${GITHUB_PROJECT}-${DISTNAME}
+PKGNAME= zbackup-1.4.4
+CATEGORIES= archivers
+MASTER_SITES= ${MASTER_SITE_GITHUB:=zbackup/}
+DIST_SUBDIR= ${GITHUB_PROJECT}
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= http://zbackup.org/
+COMMENT= Globally-deduplicating backup tool
+LICENSE= gnu-gpl-v3
+
+USE_TOOLS+= cmake
+
+WRKSRC= ${WRKDIR}/zbackup-1.4.4
+USE_CMAKE= yes
+USE_LANGUAGES= c c++
+
+.include "../../devel/protobuf-c/buildlink3.mk"
+.include "../../security/openssl/buildlink3.mk"
+.include "../../archivers/lzo/buildlink3.mk"
+#.include "../../archivers/libzip/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/zbackup/PLIST b/zbackup/PLIST
new file mode 100755
index 0000000..9b95414
--- /dev/null
+++ b/zbackup/PLIST
@@ -0,0 +1,2 @@
+@comment $NetBSD$
+bin/zbackup
diff --git a/zbackup/TODO b/zbackup/TODO
new file mode 100755
index 0000000..ffa5a96
--- /dev/null
+++ b/zbackup/TODO
@@ -0,0 +1,2 @@
+Not added the tests, because they currently use qmake, so just no.
+
diff --git a/zbackup/distinfo b/zbackup/distinfo
new file mode 100755
index 0000000..2db538b
--- /dev/null
+++ b/zbackup/distinfo
@@ -0,0 +1,10 @@
+$NetBSD$
+
+SHA1 (zbackup/1.4.4.tar.gz) = 722d04a158214d2548c08d6ce7bceb451a757863
+RMD160 (zbackup/1.4.4.tar.gz) = 1b2874244528af51a8099b74dbda3ee25b2b71a5
+SHA512 (zbackup/1.4.4.tar.gz) = 96f0984be71e521b2a188448bb2801996701be6e96b1dac4672cabc9f6bcb6631fdb8d03f5dde4bbdbb0050d9bd1409d468fcba15f93730d69e6c55271aba575
+Size (zbackup/1.4.4.tar.gz) = 87118 bytes
+SHA1 (patch-compression.cc) = 89e0b6c90329fd1454e11825e3d4ea1f404ffa7b
+SHA1 (patch-endian.hh) = cc36f8538e33f3709c45cd475043ecd38650e805
+SHA1 (patch-file.cc) = d735acfc4830ae2a50b2d91797b91d16af0b6d62
+SHA1 (patch-unbuffered__file.cc) = e92a3fb2403154526ed6fce5f9b89d4660c73eb8
diff --git a/zbackup/patches/patch-compression.cc b/zbackup/patches/patch-compression.cc
new file mode 100755
index 0000000..2031d22
--- /dev/null
+++ b/zbackup/patches/patch-compression.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+--- compression.cc.orig 2015-09-16 07:28:04.000000000 +0000
++++ compression.cc
+@@ -291,9 +291,11 @@ private:
+ } while (true);
+ }
+ };
+-
++#if defined(__NetBSD__) || defined(__FreeBSD__)
++#include <sys/endian.h>
++#else
+ #include <endian.h>
+-
++#endif
+ // like NoStreamEnDecoder, but also adds the uncompressed size before the stream
+ //NOTE You should make sure that the compression function doesn't overwrite any
+ // memory, if this information is corrupted! This could be exploited by a
diff --git a/zbackup/patches/patch-endian.hh b/zbackup/patches/patch-endian.hh
new file mode 100755
index 0000000..bf263e3
--- /dev/null
+++ b/zbackup/patches/patch-endian.hh
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- endian.hh.orig 2015-09-16 07:28:04.000000000 +0000
++++ endian.hh
+@@ -6,7 +6,7 @@
+
+ #include <stdint.h>
+ #include <arpa/inet.h>
+-#ifdef __APPLE__
++#if defined(__NetBSD__) ||defined(__FreeBSD__)
+ #include <machine/endian.h>
+ #else
+ #include <endian.h>
diff --git a/zbackup/patches/patch-file.cc b/zbackup/patches/patch-file.cc
new file mode 100755
index 0000000..ae474c7
--- /dev/null
+++ b/zbackup/patches/patch-file.cc
@@ -0,0 +1,30 @@
+$NetBSD$
+
+--- file.cc.orig 2015-09-16 07:28:04.000000000 +0000
++++ file.cc
+@@ -6,7 +6,7 @@
+ #include <unistd.h>
+ #include <cerrno>
+ #include <cstring>
+-#ifdef __APPLE__
++#if defined(__APPLE_) || defined(__NetBSD__) || defined(__FreeBSD__)
+ #include <sys/socket.h>
+ #else
+ #include <sys/sendfile.h>
+@@ -67,6 +67,16 @@ void File::rename( std::string const & f
+ #ifdef __APPLE__
+ if ( -1 == sendfile(write_fd, read_fd, offset, &stat_buf.st_size, NULL, 0) )
+ throw exCantRename( from + " to " + to );
++ #elif defined(__NetBSD__) || defined(__OpenBSD__)
++
++ size_t BUFSIZE = 4096, size;
++ char buf[BUFSIZE];
++
++ while ( ( size = ::read( read_fd, buf, BUFSIZE ) ) != -1 && size != 0 )
++ ::write( write_fd, buf, size );
++
++ if ( size == -1 )
++ throw exCantRename( from + " to " + to );
+ #else
+ if ( -1 == sendfile(write_fd, read_fd, &offset, stat_buf.st_size) )
+ throw exCantRename( from + " to " + to );
diff --git a/zbackup/patches/patch-unbuffered__file.cc b/zbackup/patches/patch-unbuffered__file.cc
new file mode 100755
index 0000000..09c8427
--- /dev/null
+++ b/zbackup/patches/patch-unbuffered__file.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- unbuffered_file.cc.orig 2015-09-16 07:28:04.000000000 +0000
++++ unbuffered_file.cc
+@@ -13,7 +13,7 @@
+ #include "unbuffered_file.hh"
+
+
+-#ifdef __APPLE__
++#if defined(__APPLE__) || defined(__NetBSD__) || defined(__FreeBSD__)
+ #define lseek64 lseek
+ #endif
+
+@@ -24,7 +24,7 @@ UnbufferedFile::UnbufferedFile( char con
+
+ int flags = ( mode == WriteOnly ? ( O_WRONLY | O_CREAT | O_TRUNC ) :
+ O_RDONLY );
+-#ifndef __APPLE__
++#if !defined(__APPLE__) && !defined(__NetBSD__) && !defined(__FreeBSD__)
+ flags |= O_LARGEFILE;
+ #endif
+ fd = open( fileName, flags, 0666 );
Home |
Main Index |
Thread Index |
Old Index