From mboxrd@z Thu Jan 1 00:00:00 1970 From: ng0 Subject: Re: [PATCH 3/3] gnu: Add zpaq. Date: Sat, 28 Jan 2017 17:51:49 +0000 Message-ID: <87o9yrvzre.fsf@wasp.i-did-not-set--mail-host-address--so-tickle-me> References: <20170127195924.22959-1-me@tobias.gr> <20170127195924.22959-3-me@tobias.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53231) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cXXAX-0003hJ-Gl for guix-devel@gnu.org; Sat, 28 Jan 2017 12:52:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cXXAT-0000Vp-Ui for guix-devel@gnu.org; Sat, 28 Jan 2017 12:52:09 -0500 Received: from latitanza.investici.org ([82.94.249.234]:25050) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cXXAT-0000V8-Ew for guix-devel@gnu.org; Sat, 28 Jan 2017 12:52:05 -0500 In-Reply-To: <20170127195924.22959-3-me@tobias.gr> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Tobias Geerinckx-Rice , guix-devel@gnu.org Tobias Geerinckx-Rice writes: > * gnu/packages/compression.scm (zpaq): New variable. > --- Cool! Thanks for working on it. Functionality seems okay: ...Creating an archive: ng0@wasp /g/s/q/bin> ./zpaq a /home/ng0/test.zpaq /home/ng0/News Creating /home/ng0/test.zpaq at offset 0 + 0 Adding 0.000000 MB in 0 files -method 14 -threads 2 at 2017-01-28 17:45:52. + /home/ng0/News/ + /home/ng0/News/drafts/ + /home/ng0/News/drafts/drafts/ + /home/ng0/News/drafts/queue/ 4 +added, 0 -removed. 0.000000 + (0.000000 -> 0.000000 -> 0.000584) =3D 0.000584 MB 0.014 seconds (all OK) ...and listing its content: ng0@wasp /g/s/q/bin> ./zpaq l /home/ng0/test.zpaq zpaq v7.15 journaling archiver, compiled Jan 28 2017 /home/ng0/test.zpaq: 1 versions, 4 files, 0 fragments, 0.000584 MB - 2016-10-27 14:27:19 0 d0755 /home/ng0/News/ - 2016-10-27 14:27:19 0 d0755 /home/ng0/News/drafts/ - 2016-11-21 11:19:39 0 d0755 - /home/ng0/News/drafts/drafts/ - 2016-10-27 14:27:19 0 d0755 - /home/ng0/News/drafts/queue/ 0.000000 MB of 0.000000 MB (4 files) shown -> 0.000000 MB (0 refs to 0 of 0 frags) after dedupe -> 0.000584 MB compressed. 0.001 seconds (all OK) =20 > gnu/packages/compression.scm | 60 ++++++++++++++++++++++++++++++++++++= +++++++- > 1 file changed, 59 insertions(+), 1 deletion(-) > > diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.sc= m > index 2e4de81..ca5509c 100644 > --- a/gnu/packages/compression.scm > +++ b/gnu/packages/compression.scm > @@ -10,7 +10,7 @@ > ;;; Copyright =C2=A9 2015, 2016 Efraim Flashner > ;;; Copyright =C2=A9 2016 Ben Woodcroft > ;;; Copyright =C2=A9 2016 Danny Milosavljevic > -;;; Copyright =C2=A9 2016 Tobias Geerinckx-Rice > +;;; Copyright =C2=A9 2016, 2017 Tobias Geerinckx-Rice > ;;; Copyright =C2=A9 2016 David Craven > ;;; Copyright =C2=A9 2016 Kei Kebreau > ;;; Copyright =C2=A9 2016 Marius Bakke > @@ -46,6 +46,8 @@ > #:use-module (gnu packages perl) > #:use-module (gnu packages pkg-config) > #:use-module (gnu packages valgrind) > + #:use-module (gnu packages zip) > + #:use-module (ice-9 match) > #:use-module ((srfi srfi-1) #:select (last))) > =20 > (define-public zlib > @@ -1001,3 +1003,59 @@ handles the 7z format which features very high c= ompression ratios.") > (description "gzstream is a small library for providing zlib > functionality in a C++ iostream.") > (license license:lgpl2.1+))) > + > +(define-public zpaq > + (package > + (name "zpaq") > + (version "7.15") > + (source > + (origin > + (method url-fetch/zipbomb) > + (uri (string-append "http://mattmahoney.net/dc/zpaq" > + (string-delete #\. version) ".zip")) > + (sha256 > + (base32 > + "066l94yyladlfzri877nh2dhkvspagjn3m5bmv725fmhkr9c4pp8")) > + (modules '((guix build utils))) > + (snippet > + ;; Delete irrelevant pre-compiled binaries. > + '(for-each delete-file (find-files "." "\\.exe$"))))) > + (build-system gnu-build-system) > + (arguments > + `(#:phases > + (modify-phases %standard-phases > + (delete 'configure)) ; no =E2=80=98configure=E2=80=99= script > + #:make-flags > + (list > + (string-append "CPPFLAGS=3D-Dunix" > + ,(match (or (%current-target-system) > + (%current-system)) > + ("x86_64-linux" "") > + ("i686-linux" "") > + (_ " -DNOJIT"))) > + (string-append "CXXFLAGS=3D-O3 -mtune=3Dgeneric -DNDEBUG" > + ,(match (or (%current-target-system) > + (%current-system)) > + ("x86_64-linux" " -march=3Dnocona") > + ("i686-linux" " -march=3Di686") > + (_ ""))) Can you add a comment on the CPPFLAGS? Otherwise, LGTM! > + (string-append "PREFIX=3D" > + (assoc-ref %outputs "out"))))) > + (native-inputs > + `(("perl" ,perl))) ; for pod2man > + (home-page "http://mattmahoney.net/dc/zpaq.html") > + (synopsis "Incremental journaling archiver") > + (description "ZPAQ is a command-line archiver that backs up faster= and > +compresses better than most other popular archivers in realistic situa= tions > +with many duplicate and already compressed files. It backs up only th= ose files > +modified since the last update. All previous versions remain untouche= d and can > +be independently recovered. Identical files are only stored once (kno= wn as > +@dfn{de-duplication}). Archives can also be encrypted. > +ZPAQ is intended to back up user data, not entire operating systems. I= t ignores > +owner and group IDs, ACLs, extended attributes, or special file types = like > +devices, sockets, or named pipes. It does not follow or restore symbo= lic links > +or junctions, and always follows hard links.") > + (license (list license:public-domain > + ;; libzpaq.cpp contains a mix of public-domain and > + ;; expat-licenced (or =E2=80=98MIT=E2=80=99) code. > + license:expat)))) > --=20 > 2.9.3 > > --=20 =E2=99=A5=E2=92=B6 ng0 -- https://www.inventati.org/patternsinthechaos/