unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Rutger Helling <rhelling@mykolab.com>
To: ludo@gnu.org
Cc: 29210@debbugs.gnu.org
Subject: [bug#29210] [PATCH] gnu: messaging: Add libsignal-protocol-c and enable OMEMO for dino.
Date: Wed, 15 Nov 2017 08:39:29 +0100	[thread overview]
Message-ID: <66fce890efdd9b607c1c9962fabfced6@mykolab.com> (raw)
In-Reply-To: <87bmk4lbr8.fsf@gnu.org>


[-- Attachment #1.1: Type: text/plain, Size: 2583 bytes --]

Hey Ludo, 

thanks for the review. Here's a second version of the first patch with
your changes.
I've tried adding only -DBUILD_TESTING, and I think that fixed the
timestamp issues.
The tests now run properly and it seems to build in a reproducible way. 

The second patch is unchanged, but added again for convenience. 

On 2017-11-14 23:46, ludo@gnu.org wrote:

> Hi Rutger,
> 
> Rutger Helling <rhelling@mykolab.com> skribis:
> 
>> From 4212f0c4ffe43464ed7bd2e9f1a8f10e308ec792 Mon Sep 17 00:00:00 2001
>> From: Rutger Helling <rhelling@mykolab.com>
>> Date: Wed, 8 Nov 2017 11:16:29 +0100
>> Subject: [PATCH] gnu: messaging: Add libsignal-protocol-c.
>> 
>> * gnu/packages/messaging.scm (libsignal-protocol-c): New variable.
> 
> [...]
> 
>> +  (arguments
>> +   `(#:tests? #f
>> +     ; Required for proper linking.
>> +     #:configure-flags '("-DBUILD_SHARED_LIBS=on")))
>> +     ; FIXME: With the below additional flags the tests pass, however this
>> +     ; causes problems with timestamps, therefore the tests are disabled for
>> +     ; now:
>> +     ; -DCMAKE_BUILD_TYPE=Debug
>> +     ; -DBUILD_TESTING=1
> 
> What are the timestamp issues you're referring to above?  It would be
> nice if we could have our cake and eat it too.  :-)
> 
> Besides, the default in 'cmake-build-system' is
> "-DCMAKE_BUILD_TYPE=RelWithDebugInfo" (i.e., "-O2 -g"), and I think we
> should keep it this way here.
> 
> Nipick: please use two semicolons for block comments like this (one
> semicolon is for margin comments).
> 
>> +  (home-page "https://github.com/WhisperSystems/libsignal-protocol-c")
>> +  (synopsis "Ratcheting forward secrecy protocol")
>> +  (description "libsignal-protocol-c is a ratcheting forward secrecy protocol
>> +that works in synchronous and asynchronous messaging environments.")
> 
> Nitpicking here as well: it's an /implementation/ of the protocol.
> Could you also expound the description a little bit?
> 
>> +  (license license:gpl3)))
> 
> Since source file headers don't say anything particular, it's 'gpl3+'
> ("or any later version".)
> 
> Could you send an updated patch?
> 
>> From db99f5874d24e0aa3e74005bf7200f459451aeb7 Mon Sep 17 00:00:00 2001
>> From: Rutger Helling <rhelling@mykolab.com>
>> Date: Wed, 8 Nov 2017 11:18:38 +0100
>> Subject: [PATCH] gnu: messaging: Enable OMEMO for dino.
>> 
>> * gnu/packages/messaging.scm (dino) Update to commit f6ac5bbd26638412a2289fd1d28ef12de1d7e8b5. [inputs]: Add libsignal-protocol-c, libgcrypt. [arguments]: Change #configure-flags to "-DSHARED_SIGNAL_PROTOCOL=yes".
> 
> OK!
> 
> Thank you,
> Ludo'.

[-- Attachment #1.2: Type: text/html, Size: 4211 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-messaging-Add-libsignal-protocol-c-v2.patch --]
[-- Type: text/x-diff; name=0001-gnu-messaging-Add-libsignal-protocol-c-v2.patch, Size: 2384 bytes --]

From f805dc9314964f3c60d82651e7f31e2b4011116d Mon Sep 17 00:00:00 2001
From: Rutger Helling <rhelling@mykolab.com>
Date: Wed, 15 Nov 2017 08:26:17 +0100
Subject: [PATCH] gnu: messaging: Add libsignal-protocol-c.

* gnu/packages/messaging.scm (libsignal-protocol-c): New variable.
---
 gnu/packages/messaging.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 72dbbcd1e..77c13e2e7 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
+;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -124,6 +125,35 @@ keys, no previous conversation is compromised.")
     (home-page "https://otr.cypherpunks.ca/")
     (license (list license:lgpl2.1 license:gpl2))))
 
+(define-public libsignal-protocol-c
+  (package
+  (name "libsignal-protocol-c")
+  (version "2.3.1")
+  (source (origin
+           (method url-fetch)
+           (uri (string-append "https://github.com/WhisperSystems/"
+                               "libsignal-protocol-c/archive/v" version
+                               ".tar.gz"))
+           (file-name (string-append name "-" version ".tar.gz"))
+           (sha256
+            (base32
+             "1klz9jvbnmfc3qy2x6qcswzw14a7kyzs51dlg18yllvir1f1kz0s"))))
+  (arguments
+   `(;; Required for proper linking and for tests to run.
+     #:configure-flags '("-DBUILD_SHARED_LIBS=on" "-DBUILD_TESTING=1")))
+  (build-system cmake-build-system)
+  (inputs `( ;; Required for tests:
+            ("check", check)
+            ("openssl", openssl)))
+  (native-inputs `(("pkg-config", pkg-config)))
+  (home-page "https://github.com/WhisperSystems/libsignal-protocol-c")
+  (synopsis "Implementation of a ratcheting forward secrecy protocol")
+  (description "libsignal-protocol-c is an implementation of a ratcheting
+forward secrecy protocol that works in synchronous and asynchronous
+messaging environments.  It can be used with messaging software to provide
+end-to-end encryption.")
+  (license license:gpl3+)))
+
 (define-public bitlbee
   (package
     (name "bitlbee")
-- 
2.15.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-gnu-messaging-Enable-OMEMO-for-dino.patch --]
[-- Type: text/x-diff; name=0002-gnu-messaging-Enable-OMEMO-for-dino.patch, Size: 2804 bytes --]

From db99f5874d24e0aa3e74005bf7200f459451aeb7 Mon Sep 17 00:00:00 2001
From: Rutger Helling <rhelling@mykolab.com>
Date: Wed, 8 Nov 2017 11:18:38 +0100
Subject: [PATCH] gnu: messaging: Enable OMEMO for dino.

* gnu/packages/messaging.scm (dino) Update to commit f6ac5bbd26638412a2289fd1d28ef12de1d7e8b5. [inputs]: Add libsignal-protocol-c, libgcrypt. [arguments]: Change #configure-flags to "-DSHARED_SIGNAL_PROTOCOL=yes".
---
 gnu/packages/messaging.scm | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 4f436b5a5..67d369fbd 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -570,7 +570,7 @@ end-to-end encryption support; XML console.")
 (define-public dino
   ;; The only release tarball is for version 0.0, but it is very old and fails
   ;; to build.
-  (let ((commit "54a25fd926070a977138cec94908c55806e22f4a")
+  (let ((commit "f6ac5bbd26638412a2289fd1d28ef12de1d7e8b5")
         (revision "1"))
     (package
       (name "dino")
@@ -579,19 +579,19 @@ end-to-end encryption support; XML console.")
                 (method git-fetch)
                 (uri (git-reference
                       (url "https://github.com/dino/dino.git")
-                      (commit commit)))
+                      (commit commit)
+                      (recursive? #t))) ; Needed for the 'libsignal-protocol-c'
+                                        ; submodule.
                 (file-name (string-append name "-" version "-checkout"))
                 (sha256
                  (base32
-                  "1m100wzr5xqaj3r4vprxj0961833wqk0p7z94nmjsf2f0s67v5r3"))))
+                  "14vk5jmvn8igjikrvg7pinrzahw8gryysb1v9y3vw47ncyic8b7p"))))
       (build-system cmake-build-system)
       (arguments
        `(#:tests? #f ; there are no tests
          #:parallel-build? #f ; not supported
-         #:configure-flags
-         ;; FIXME: we disable the omemo plugin because it needs
-         ;; libsignal-protocol, for which we don't have a package yet.
-         '("-DDISABLED_PLUGINS=omemo")
+         ; Use our libsignal-protocol-c instead of the git submodule.
+         #:configure-flags '("-DSHARED_SIGNAL_PROTOCOL=yes")
          #:modules ((guix build cmake-build-system)
                     ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
                     (guix build utils))
@@ -604,6 +604,8 @@ end-to-end encryption support; XML console.")
              (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
       (inputs
        `(("libgee" ,libgee)
+         ("libsignal-protocol-c", libsignal-protocol-c)
+         ("libgcrypt", libgcrypt)
          ("libsoup" ,libsoup)
          ("sqlite" ,sqlite)
          ("gpgme" ,gpgme)
-- 
2.15.0


  reply	other threads:[~2017-11-15  7:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-08 10:38 [bug#29210] [PATCH] gnu: messaging: Add libsignal-protocol-c and enable OMEMO for dino Rutger Helling
2017-11-14 22:46 ` Ludovic Courtès
2017-11-15  7:39   ` Rutger Helling [this message]
2017-11-16  8:51     ` bug#29210: " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=66fce890efdd9b607c1c9962fabfced6@mykolab.com \
    --to=rhelling@mykolab.com \
    --cc=29210@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).