Subject: bug#26245: dovecot-trees: Update to 2.1.0

From: ng0 <[email-masked]>
Date: Fri, 24 Mar 2017 22:46:01 +0000

This updates dovecot-trees to 2.1.0.

It also changes the -fetch method to use file instead of git. The
problem is I'm not sure if I picked the correct link.

https://0xacab.org/riseuplabs/trees/tree/v2.1.0 is the url I used, in
the webbrowser I selected the dropdown menu in their gitlab to save the
master. I suppose that v2.1.0 is a tag and not just a branch, and that
this downloads the tag at this commit.
If you know a better way, or know this doesn't work, I appreciate
feedback. Maybe we could document how to get this from gitlab based git
instances, so that it's useful for packagers.
>From 09e193dad32a8ea9d5756bf3c85ebd32ba36f262 Mon Sep 17 00:00:00 2001
From: ng0 <[email-masked]>
Date: Fri, 24 Mar 2017 16:45:57 +0000
Subject: [PATCH] gnu: dovecot-trees: Update to 2.1.0.

* gnu/packages/mail.scm (dovecot-trees): Update to 2.1.0.
(source): Change to use 'url-fetch'.
---
 gnu/packages/mail.scm | 75 +++++++++++++++++++++++++--------------------------
 1 file changed, 36 insertions(+), 39 deletions(-)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 2ae1277ae..505352644 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -1131,44 +1131,41 @@ It supports mbox/Maildir and its own dbox/mdbox formats.")
     (license (list lgpl2.1 license:expat (non-copyleft "file://COPYING")))))
 
 (define-public dovecot-trees
-  (let ((commit "006059c8a47d68f14f73c09743e45b9a73014dbf")
-        (revision "1"))
-    (package
-      (name "dovecot-trees")
-      (version (string-append "2.0.0-" revision "." (string-take commit 7)))
-      (source
-       (origin
-         (method git-fetch)
-         (uri (git-reference
-               (url "https://0xacab.org/riseuplabs/trees.git")
-               (commit commit)))
-         (file-name (string-append name "-" version "-checkout"))
-         (sha256
-          (base32
-           "0ax90bzc66x179wi1m7ywqwa8nssyhjngs7ij109hqqxg5ymfp73"))))
-      (build-system gnu-build-system)
-      (native-inputs
-       `(("automake" ,automake)
-         ("autoconf" ,autoconf)
-         ("libtool" ,libtool)
-         ("dovecot" ,dovecot)
-         ("pkg-config" ,pkg-config)))
-      (inputs
-       `(("libsodium" ,libsodium)))
-      (arguments
-       `(#:tests? #f ;No tests exist.
-         #:configure-flags (list (string-append "--with-dovecot="
-                                                (assoc-ref %build-inputs "dovecot")
-                                                "/lib/dovecot"))
-         #:phases
-         (modify-phases %standard-phases
-           (add-before 'configure 'autogen
-             (lambda _
-               (zero? (system* "./autogen.sh")))))))
-      (home-page "https://0xacab.org/riseuplabs/trees")
-      (synopsis "NaCL-based Dovecot email storage encryption plugin")
-      (description
-       "Technology for Resting Email Encrypted Storage (TREES) is a NaCL-based
+  (package
+    (name "dovecot-trees")
+    (version "2.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://0xacab.org/riseuplabs/trees/repository/"
+                           "archive.tar.gz?ref=v" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0rkk10b1bsjz979sc864vpgcdchy7yxwmyv4ik50lar1h6awdnrf"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("automake" ,automake)
+       ("autoconf" ,autoconf)
+       ("libtool" ,libtool)
+       ("dovecot" ,dovecot)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("libsodium" ,libsodium)))
+    (arguments
+     `(#:tests? #f ;No tests exist.
+       #:configure-flags (list (string-append "--with-dovecot="
+                                              (assoc-ref %build-inputs "dovecot")
+                                              "/lib/dovecot"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'autogen
+           (lambda _
+             (zero? (system* "./autogen.sh")))))))
+    (home-page "https://0xacab.org/riseuplabs/trees")
+    (synopsis "NaCL-based Dovecot email storage encryption plugin")
+    (description
+     "Technology for Resting Email Encrypted Storage (TREES) is a NaCL-based
 Dovecot encryption plugin.  This plugin adds individually encrypted mail
 storage to the Dovecot IMAP server.  It is inspired by Posteo's scrambler
 which uses OpenSSL and RSA keypairs.  TREES works in a similar way, but uses
@@ -1184,7 +1181,7 @@ How it works:
 using lidsodium sealed boxes.
 @item New mail is encrypted as it arrives using the Curve25519 public key.
 @end enumerate\n")
-      (license agpl3))))
+    (license agpl3)))
 
 (define-public dovecot-libsodium-plugin
   (let ((commit "044de73c01c35385df0105f6b387bec5d5317ce7")
-- 
2.12.1