unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [Patch 0/10] Add Ring
@ 2016-09-13  2:22 Lukas Gradl
  2016-09-13  2:23 ` [Patch 1/10] Add pjproject Lukas Gradl
                   ` (10 more replies)
  0 siblings, 11 replies; 47+ messages in thread
From: Lukas Gradl @ 2016-09-13  2:22 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 430 bytes --]


Hello Guix!

The following patch series adds Ring, a distributed multimedia
communications program.

There is one issue that I can not figure out: The program ring.cx throws
an error if evolution-data-server is not installed in the same profile.
I hence propagated evolution-data-server, but this does not seem to
solve the issue.  If evolution-data-server is installed, it works fine.

Thank you for any feedback!

Best,
Lukas


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Patch 1/10] Add pjproject.
  2016-09-13  2:22 [Patch 0/10] Add Ring Lukas Gradl
@ 2016-09-13  2:23 ` Lukas Gradl
  2016-09-19  7:41   ` Ricardo Wurmus
  2016-09-13  2:24 ` [Patch 2/10] Add dbus-c++ Lukas Gradl
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 47+ messages in thread
From: Lukas Gradl @ 2016-09-13  2:23 UTC (permalink / raw)
  To: guix-devel


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: 0001-gnu-Add-pjproject.patch --]
[-- Type: text/x-patch, Size: 9506 bytes --]

From d6a6a5ded95071a58a160a435ccf56d6828148b0 Mon Sep 17 00:00:00 2001
From: Lukas Gradl <lgradl@openmailbox.org>
Date: Wed, 20 Jul 2016 21:26:32 -0500
Subject: [PATCH 01/10] gnu: Add pjproject

* gnu/packages/telephony.scm (pjproject-sfl): New variable.
---
 gnu/packages/telephony.scm | 181 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 181 insertions(+)

diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index d8a33dd..4893dbd 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -23,6 +23,7 @@
 
 (define-module (gnu packages telephony)
   #:use-module (gnu packages)
+  #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages linux)
@@ -34,6 +35,7 @@
   #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix build-system gnu))
 
 (define-public commoncpp
@@ -286,3 +288,182 @@ lists.  All you need to join an existing conference is the host name or IP
 address of one of the participants.")
     (home-page "http://holdenc.altervista.org/seren/")
     (license gpl3+)))
+
+(define-public pjproject-sfl
+  (let ((sfl-patches
+         (let ((commit "3dbedf53e9cceebb1eed155b5143026f6d253cb8"))
+           (origin
+             (method git-fetch)
+             (uri
+              (git-reference
+               (url
+                "https://gerrit-ring.savoirfairelinux.com/ring-daemon.git")
+               (commit commit)))
+             (file-name (string-append "sfl-patches" "-" "0.0.0-1."
+                                       (string-take commit 7)  "-checkout"))
+             (modules '((guix build utils)
+                        (ice-9 ftw)))
+             (snippet
+              '(let ((files (scandir "." (lambda (file)
+                                           (if (or (string=? file ".")
+                                                   (string=? file ".."))
+                                               #f
+                                               #t)))))
+                 (mkdir-p "sfl-patches")
+                 (copy-recursively "contrib/src/pjproject/" "sfl-patches")
+                 (for-each delete-file-recursively files)))
+             (sha256
+              (base32
+               "1xnvkv0h24zr1dcmp7djjhqgzvrwic242jy4hb3m5qv71azvcsqg"))))))
+    (package
+      (name "pjproject")
+      (version "2.4")
+      (source
+       (origin
+         (method url-fetch)
+         (uri (string-append
+               "http://www.pjsip.org/release/"
+               version "/" name "-" version ".tar.bz2"))
+         (modules '((guix build utils)))
+         (snippet
+          '(begin
+           ; The following removes bundled packages except for 'resample'.
+           ; Pjproject uses some of the source files of resample and one own
+           ; header (resamplesubs.h) not included with resample to build a
+           ; shared library.  Upstream resample does not build this
+           ; library. The license of resample is the LGPL2+
+           ; The homepage of resample is at:
+           ; https://ccrma.stanford.edu/~jos/resample/Free_Resampling_Software.html
+             (let ((third-party-directories
+                    (list "BaseClasses" "bdsound" "bin" "g7221" "gsm"
+                          "ilbc" "lib" "milenage" "mp3" "portaudio"
+                          "speex" "srtp"  ; Keep only resample, build and
+                                        ; README.txt.
+                          "build/baseclasses" "build/g7221" "build/gsm"
+                          "build/ilbc" "build/milenage" "build/portaudio"
+                          "build/samplerate" "build/speex" "build/srtp")))
+                          ; Keep only Makefiles related to resample.
+               (for-each (lambda (file)
+                           (delete-file-recursively
+                            (string-append "third_party/" file)))
+                         third-party-directories)
+               #t)
+             (let ((third-party-dirs
+                    (list "gsm" "ilbc" "speex" "portaudio"
+                          "g7221" "srtp")))
+               (for-each
+                (lambda (dirs)
+                  (substitute* "third_party/build/os-linux.mak"
+                    (((string-append "DIRS += " dirs)) "")))
+                third-party-dirs))
+             (substitute* "aconfigure.ac"
+               (("third_party/build/portaudio/os-auto.mak") ""))))
+         (sha256
+          (base32
+           "0n90n1p41svf23d4fag8jqbjnv82fz14z6zchb8j1kldvap1b00h"))))
+           ;"13fx7kpf1sswj7r0zl7fqkzg3rl5xz3dl96wdnv15qxfviq5wvq8")))) 2.4.5
+      (build-system gnu-build-system)
+      (inputs
+       `(("portaudio" ,portaudio))) ; It might be possible to remove this.
+      (propagated-inputs ; These packages are referenced in the Libs field of
+                         ; the pkg-config file that will be installed by
+                         ; pjproject.
+       `(("speex" ,speex)
+         ("libsrtp" ,libsrtp)
+         ("gnutls" ,gnutls)
+         ("util-linux" ,util-linux)))
+      (native-inputs
+       `(("sfl-patches" ,sfl-patches) ; These patches are distributed with the
+                                      ; libring source.  They contain various
+                                      ; nontrivial changes such as the use of
+                                      ; gnutls instead of openssl.
+         ("autoconf" ,autoconf)
+         ("automake" ,automake)
+         ("pkg-config" ,pkg-config)
+         ("libtool" ,libtool)))
+      (arguments
+       `(#:test-target
+         "selftest"
+         #:configure-flags
+         (list "--disable-oss"
+               "--disable-sound"
+               "--disable-video"
+               "--enable-ext-sound"
+               "--disable-g711-codec"
+               "--disable-l16-codec"
+               "--disable-gsm-codec"
+               "--disable-g722-codec"
+               "--disable-g7221-codec"
+               "--disable-ilbc-codec"
+               "--disable-opencore-amr"
+               "--disable-sdl"
+               "--disable-ffmpeg"
+               "--disable-v4l2"
+               "--enable-ssl=gnutls"
+               "--with-external-speex"
+               "--with-external-pa"
+               "--with-external-srtp")
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'apply-patches
+             (lambda* (#:key inputs #:allow-other-keys)
+               (begin
+                 (mkdir "patch-dir")
+                 (system* "tar" "-xvf" (assoc-ref inputs "sfl-patches")
+                          "-C" "patch-dir" "--strip-components=1")
+                 (let ((patch-dir
+                        (string-append "patch-dir" "/sfl-patches"))
+                       (patches
+                        '("errno" "endianness" "gnutls" "ipv6" "ice_config"
+                          "multiple_listeners" "pj_ice_sess")))
+                   (for-each
+                    (lambda (file)
+                      (zero?
+                       (system* "patch" "--force" "-p1" "-i"
+                                (string-append patch-dir "/"
+                                               file ".patch"))))
+                    patches)))))
+           (add-before 'build 'build-dep
+             (lambda _
+               (zero?
+                (system* "make" "dep"))))
+           (add-before 'patch-source-shebangs 'autoconf
+             (lambda _
+               (zero?
+                (system* "autoconf" "-v" "-f" "-i" "-o"
+                         "aconfigure" "aconfigure.ac"))))
+           (add-before 'autoconf 'disable-some-tests
+             (lambda _
+               (substitute* "Makefile"
+                 (((string-append
+                    "selftest: "
+                    "pjlib-test "
+                    "pjlib-util-test "
+                    "pjnath-test "  ; This test fails.
+                    "pjmedia-test "
+                    "pjsip-test " ; This test fails.
+                    "pjsua-test")) ; This test fails.  This test would need
+                                        ; python.
+                  (string-append
+                   "selftest: "
+                   "pjlib-test "
+                   "pjlib-util-test "
+                   "pjmedia-test")))))
+           (add-before 'autoconf 'set-flags
+             (lambda _
+               (setenv "CFLAGS"
+                       (string-append
+                        "-DPJ_ICE_MAX_CAND=32" " "
+                        "-DPJ_ICE_MAX_CHECKS=150" " "
+                        "-DPJ_ICE_COMP_BITS=2")))))))
+      (home-page "www.pjsip.org")
+      (synopsis "Session Initiation Protocol (SIP) stack")
+      (description "PJProject provides an implementation of the Session
+Initiation Protocol (SIP) and a multimedia framework.
+
+This package is intended for use with libring.  There are several custom
+patches, most notably the use of gnutls instead of openssl for encryption.")
+      (license '(gpl2+ ; pjproject
+                 gpl3+ ; sfl-patches
+                 lgpl2+))))) ; bundled resample
+
-- 
2.9.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [Patch 2/10] Add dbus-c++.
  2016-09-13  2:22 [Patch 0/10] Add Ring Lukas Gradl
  2016-09-13  2:23 ` [Patch 1/10] Add pjproject Lukas Gradl
@ 2016-09-13  2:24 ` Lukas Gradl
  2016-09-28  9:09   ` Ludovic Courtès
  2016-09-13  2:25 ` [Patch 3/10] Add gsm Lukas Gradl
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 47+ messages in thread
From: Lukas Gradl @ 2016-09-13  2:24 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1: 0002-gnu-Add-dbus-c.patch --]
[-- Type: text/x-patch, Size: 2999 bytes --]

From 828174a6663363c26362637f23569e4f23698786 Mon Sep 17 00:00:00 2001
From: Lukas Gradl <lgradl@openmailbox.org>
Date: Thu, 21 Jul 2016 08:39:54 -0500
Subject: [PATCH 02/10] gnu: Add dbus-c++.

* gnu/packages/glib.scm (dbus-c++): New variable.
---
 gnu/packages/glib.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index a85a565..6a78684 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -31,6 +32,7 @@
   #:use-module (gnu packages base)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages enlightenment)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gnome)
@@ -43,6 +45,7 @@
   #:use-module (gnu packages xml)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages file)
+  #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages m4)
 
@@ -659,3 +662,43 @@ many applications simultaneously.
 
 This package provides the library for GLib applications.")
     (license license:lgpl2.1+)))
+
+
+(define-public dbus-c++
+  (package
+    (name "dbus-c++")
+    (version "0.9.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append
+         "https://sourceforge.net/projects/dbus-cplusplus/files/dbus-c%2B%2B/"
+         version "/libdbus-c%2B%2B-" version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0qafmy2i6dzx4n1dqp6pygyy6gjljnb7hwjcj2z11c1wgclsq4dw"))))
+    (build-system gnu-build-system)
+    (propagated-inputs
+     `(("dbus" ,dbus))) ; This is mentioned in the pkg-config file.
+    (inputs
+     `(("efl" ,efl)
+       ("expat" ,expat)
+       ("glib" ,glib)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (arguments
+     `(#:configure-flags (list "LDFLAGS=-lpthread")
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'add-missing-header
+           (lambda _
+             (substitute* "include/dbus-c++/eventloop-integration.h"
+               (("#include <errno.h>")
+                "#include <errno.h>\n#include <unistd.h>")))))))
+    (synopsis "D-Bus API for C++")
+    (description "This package provides an D-Bus API for the C++ programming
+langauage.  It also contains the utility @code{dbuscxx-xml2cpp}.")
+    (home-page "https://sourceforge.net/projects/dbus-cplusplus/")
+    (license license:lgpl2.1)))
-- 
2.9.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [Patch 3/10] Add gsm.
  2016-09-13  2:22 [Patch 0/10] Add Ring Lukas Gradl
  2016-09-13  2:23 ` [Patch 1/10] Add pjproject Lukas Gradl
  2016-09-13  2:24 ` [Patch 2/10] Add dbus-c++ Lukas Gradl
@ 2016-09-13  2:25 ` Lukas Gradl
  2016-09-28  9:16   ` Ludovic Courtès
  2016-09-13  2:26 ` [Patch 4/10] argon2: Install pkg-config file Lukas Gradl
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 47+ messages in thread
From: Lukas Gradl @ 2016-09-13  2:25 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1: 0003-gnu-Add-gsm.patch --]
[-- Type: text/x-patch, Size: 2920 bytes --]

From ecafdf21a654c97fa9adb2c382c431c297a3fee0 Mon Sep 17 00:00:00 2001
From: Lukas Gradl <lgradl@openmailbox.org>
Date: Tue, 9 Aug 2016 16:43:36 -0500
Subject: [PATCH 03/10] gnu: Add gsm.

* gnu/packages/audio.scm (gsm): New variable.
---
 gnu/packages/audio.scm | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 67701a0..283f56b 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2015, 2016 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
+;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2456,3 +2457,49 @@ with support for HD extensions.")
 flavors EBU R128, ATSC A/85, and ReplayGain 2.0.  It helps normalizing the
 loudness of audio and video files to the same level.")
     (license license:gpl2+)))
+
+(define-public gsm
+  (package
+    (name "gsm")
+    (version "1.0.14")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "http://www.quut.com/" name "/" name
+                       "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0b1mx69jq88wva3wk0hi6fcl5a52qhnq2f9p3f3jdh5k61ma252q"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:test-target "tst"
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'install 'pre-install
+           (lambda _
+            (let ((out (assoc-ref %outputs "out")))
+              (substitute* "Makefile"
+                (("INSTALL_ROOT\t=")
+                 (string-append "INSTALL_ROOT\t=\t" out)))
+              (mkdir-p (string-append out "/inc"))
+              (mkdir-p (string-append out "/man"))
+              (mkdir-p (string-append out "/man/man1"))
+              (mkdir-p (string-append out "/man/man3"))
+              (mkdir-p (string-append out "/bin"))
+              (mkdir-p (string-append out "/lib")))))
+         (add-after 'install 'post-install
+           (lambda _
+             (let ((out (assoc-ref %outputs "out")))
+               (begin
+                (system* "mv" (string-append out "/inc")
+                         (string-append out "/include"))
+                (mkdir-p (string-append out "/include/gsm"))
+                (copy-recursively
+                 "inc" (string-append out "/include/gsm"))))))
+         (delete 'configure))))
+    (synopsis "GSM 06.10 lossy speech compression library")
+    (description "This C library provides an encoder and a decoder for the GSM
+06.10 RPE-LTP lossy speech compression algorithm.")
+    (home-page "http://quut.com/gsm/")
+    (license (license:non-copyleft "file://COPYRIGHT"))))
-- 
2.9.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [Patch 4/10] argon2: Install pkg-config file.
  2016-09-13  2:22 [Patch 0/10] Add Ring Lukas Gradl
                   ` (2 preceding siblings ...)
  2016-09-13  2:25 ` [Patch 3/10] Add gsm Lukas Gradl
@ 2016-09-13  2:26 ` Lukas Gradl
  2016-09-15 21:24   ` Danny Milosavljevic
  2016-09-13  2:27 ` [Patch 5/10] opendht: Propagate argon2 Lukas Gradl
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 47+ messages in thread
From: Lukas Gradl @ 2016-09-13  2:26 UTC (permalink / raw)
  To: guix-devel


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: 0004-gnu-argon2-Install-pkg-config-file.patch --]
[-- Type: text/x-patch, Size: 3265 bytes --]

From 9850d4ef481b134d43d2380904b5db8e0d7fdd98 Mon Sep 17 00:00:00 2001
From: Lukas Gradl <lgradl@openmailbox.org>
Date: Tue, 9 Aug 2016 16:49:19 -0500
Subject: [PATCH 04/10] gnu: argon2: Install pkg-config file.

* gnu/packages/password-utils.scm (argon2)[source]: Create pkg-config file.
[arguments]: Install it.
---
 gnu/packages/password-utils.scm | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 7288da6..42b116f 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -311,6 +311,21 @@ through the pass command.")
          "https://codeload.github.com/P-H-C/phc-winner-"
          name "/tar.gz/" version))
        (file-name (string-append name "-" version ".tar.gz"))
+       (snippet
+        '(let ((p (open-file "argon2.pc" "a")))
+           (begin
+             (display
+              (string-append "prefix=/usr/local\n"
+                             "exec_prefix=${prefix}\n"
+                             "includedir=${prefix}/include\n"
+                             "libdir=${prefix}/lib\n\n"
+                             "Name: Argon2\n"
+                             "Description: "
+                             "The Argon2 password hashing algorithm\n"
+                             "Version: 1.0.0\n"
+                             "Cflags: -I${includedir}/\n"
+                             "Libs: -L${libdir} -largon2\n") p)
+             (close-output-port p))))
        (sha256
         (base32
          "0g6wa94sh639xl1qc8z21q43r1mp8y77r1zf8nwx5pfsxd8fmyzv"))))
@@ -321,14 +336,28 @@ through the pass command.")
        #:phases
        (modify-phases %standard-phases
          (delete 'configure)
+         (add-after 'unpack 'fix-pkg-config
+           (lambda _
+             (substitute* "argon2.pc"
+               (("/usr/local")
+                (assoc-ref %outputs "out")))))
          (replace 'install
            (lambda _
              (let ((out (assoc-ref %outputs "out")))
                (install-file "argon2" (string-append out "/bin"))
                (install-file "libargon2.a" (string-append out "/lib"))
                (install-file "libargon2.so" (string-append out "/lib"))
+               (install-file "argon2.pc"
+                             (string-append out "/lib/pkgconfig"))
                (copy-recursively "include"
-                                 (string-append out "/include"))))))))
+                                 (string-append out "/include"))
+               (zero? (system* "ln" "-s"
+                               (string-append out "/lib/libargon2.so")
+                               (string-append out "/lib/libargon2.so.0")))
+               (zero? (system* ; Fix compatability for libtool based builds.
+                       "ln" "-s"
+                       (string-append out "/lib/libargon2.so")
+                       (string-append out "/lib/libargon2.so.0.0.0")))))))))
     (home-page "https://www.argon2.com/")
     (synopsis "Password hashing library")
     (description "Argon2 provides a key derivation function that was declared
-- 
2.9.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* Re: [Patch 5/10] opendht: Propagate argon2.
  2016-09-13  2:22 [Patch 0/10] Add Ring Lukas Gradl
                   ` (3 preceding siblings ...)
  2016-09-13  2:26 ` [Patch 4/10] argon2: Install pkg-config file Lukas Gradl
@ 2016-09-13  2:27 ` Lukas Gradl
  2016-09-25 22:54   ` Lukas Gradl
  2016-09-13  2:28 ` [Patch 6/10] telephony: Add license prefix Lukas Gradl
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 47+ messages in thread
From: Lukas Gradl @ 2016-09-13  2:27 UTC (permalink / raw)
  To: guix-devel


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: 0005-gnu-opendht-Propagate-argon2.patch --]
[-- Type: text/x-patch, Size: 1593 bytes --]

From 5f14484f9d66cc5c40a19de9d58190d0b2b63342 Mon Sep 17 00:00:00 2001
From: Lukas Gradl <lgradl@openmailbox.org>
Date: Tue, 9 Aug 2016 17:00:52 -0500
Subject: [PATCH 05/10] gnu: opendht: Propagate argon2.

* gnu/packages/crypto.scm (opendht)[source]: Add argon2 to pkg-config file.
[inputs]: Remove argon2.
[propagated-inputs]: Add argon2.
---
 gnu/packages/crypto.scm | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index 5dad97c..850ee71 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -125,7 +125,11 @@ OpenBSD tool of the same name.")
            (substitute* "src/crypto.cpp"
              (("argon2/argon2.h") "argon2.h"))
            (substitute* "configure.ac"
-             (("src/argon2/Makefile") ""))))
+             (("src/argon2/Makefile") ""))
+           (substitute* "opendht.pc.in"
+             (("Libs: -L..libdir. -lopendht")
+              (string-append "Libs: -L${libdir} -lopendht\n"
+                             "Requires: argon2")))))
        (sha256
         (base32
          "09yvkmbqbym3b5md4n96qc1s9sf2n8ji404hagih45rmsj49599x"))))
@@ -134,8 +138,9 @@ OpenBSD tool of the same name.")
      `(("gnutls" ,gnutls)
        ("nettle" ,nettle)
        ("msgpack" ,msgpack)
-       ("readline" ,readline)
-       ("argon2" ,argon2)))
+       ("readline" ,readline)))
+    (propagated-inputs
+     `(("argon2" ,argon2)))
     (native-inputs
      `(("autoconf" ,autoconf)
        ("pkg-config" ,pkg-config)
-- 
2.9.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [Patch 6/10] telephony: Add license prefix.
  2016-09-13  2:22 [Patch 0/10] Add Ring Lukas Gradl
                   ` (4 preceding siblings ...)
  2016-09-13  2:27 ` [Patch 5/10] opendht: Propagate argon2 Lukas Gradl
@ 2016-09-13  2:28 ` Lukas Gradl
  2016-09-15 21:25   ` Danny Milosavljevic
  2016-09-28  9:25   ` Ludovic Courtès
  2016-09-13  2:29 ` [Patch 7/10] opendht: Propagate msgpack Lukas Gradl
                   ` (4 subsequent siblings)
  10 siblings, 2 replies; 47+ messages in thread
From: Lukas Gradl @ 2016-09-13  2:28 UTC (permalink / raw)
  To: guix-devel


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: 0006-gnu-telephony-Add-license-prefix.patch --]
[-- Type: text/x-patch, Size: 5490 bytes --]

From 630ad1d1d15131bb62eafe4afb842e5fa2fc5675 Mon Sep 17 00:00:00 2001
From: Lukas Gradl <lgradl@openmailbox.org>
Date: Sun, 28 Aug 2016 12:40:21 -0500
Subject: [PATCH 06/10] gnu: telephony: Add 'license:' prefix.

* gnu/packages/telephony.scm (commoncpp) [license]: Add prefix.
(ucommon) [license]: Add prefix.
(ccrtp) [license]: Add prefix.
(osip) [license]: Add prefix.
(exosip) [license]: Add prefix.
(sipwitch) [license]: Add prefix.
(libsrtp) [license]: Add prefix.
(libiax2) [license]: Add prefix.
(seren) [license]: Add prefix.
(pjproject-sfl) [license]: Add prefix.
---
 gnu/packages/telephony.scm | 28 +++++++++++++++-------------
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index 4893dbd..bd849d6 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -32,7 +32,7 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages xiph)
-  #:use-module (guix licenses)
+  #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
@@ -63,7 +63,7 @@ threaded applications, supporting concurrent synchronization, inter-process
 communications via sockets, and various methods for data handling, such as
 serialization and XML parsing.  It includes the uCommon C++ library, a smaller
 reimplementation.")
-   (license gpl2+) ; plus runtime exception
+   (license license:gpl2+) ; plus runtime exception
    (home-page "http://www.gnu.org/software/commoncpp")))
 
 (define-public ucommon
@@ -83,7 +83,7 @@ reimplementation.")
 to facilitate using C++ design patterns even for very deeply embedded
 applications, such as for systems using uclibc along with posix threading
 support.")
-   (license gpl3+)
+   (license license:gpl3+)
    (home-page "http://www.gnu.org/software/commoncpp")
    (properties '((ftp-directory . "/gnu/commoncpp")))))
 
@@ -107,7 +107,7 @@ protocol from the IETF.  It is suitable both for high capacity servers and
 personal client applications.  It is flexible in its design, allowing it to
 function as a framework for the framework, rather than just being a
 packet-manipulation library.")
-   (license gpl2+) ; plus runtime exception
+   (license license:gpl2+) ; plus runtime exception
    (home-page "http://www.gnu.org/software/ccrtp")))
 
 
@@ -126,7 +126,7 @@ packet-manipulation library.")
    (description "GNU oSIP is an implementation of the SIP protocol.  It is
 used to provide multimedia and telecom software developers with an interface
 to initiate and control SIP sessions.")
-   (license lgpl2.1+)
+   (license license:lgpl2.1+)
    (home-page "http://www.gnu.org/software/osip")))
 
 
@@ -149,7 +149,7 @@ SIP protocol for multimedia session establishment.  This protocol is mainly to
 be used by VoIP telephony applications (endpoints or conference server) but
 might be also useful for any application that wish to establish sessions like
 multiplayer games.")
-   (license gpl2+)
+   (license license:gpl2+)
    ;; (plus OpenSSL linking exception)
    ;; http://git.savannah.gnu.org/cgit/exosip.git/plain/LICENSE.OpenSSL
     (home-page "http://savannah.nongnu.org/projects/exosip")))
@@ -194,7 +194,7 @@ without the need for a service provider.  Its peer-to-peer design ensures that
 there is no central point for media intercept or capture and thus it can be
 used to construct a secure telephone system that operates over the public
 internet.")
-   (license gpl3+)
+   (license license:gpl3+)
    (home-page "http://www.gnu.org/software/sipwitch")))
 
 (define-public libsrtp
@@ -218,7 +218,7 @@ internet.")
 Real-time Transport Protocol (SRTP), the Universal Security Transform (UST),
 and a supporting cryptographic kernel.")
     (home-page "https://github.com/cisco/libsrtp")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public libiax2
   (let ((commit "0e5980f1d78ce462e2d1ed6bc39ff35c8341f201"))
@@ -257,7 +257,9 @@ Voice-over-IP (VoIP) communications.")
       ;; 'src/options.c', 'src/options.h', 'src/ring10.h', 'src/winiphone.c' are
       ;; covered under the 'GPL'.
       ;; The package as a whole is distributed under the LGPL 2.0.
-      (license (list lgpl2.0 public-domain gpl2+)))))
+      (license (list license:lgpl2.0
+                     license:public-domain
+                     license:gpl2+)))))
 
 (define-public seren
   (package
@@ -287,7 +289,7 @@ without having to register accounts, exchange emails, or add people to contact
 lists.  All you need to join an existing conference is the host name or IP
 address of one of the participants.")
     (home-page "http://holdenc.altervista.org/seren/")
-    (license gpl3+)))
+    (license license:gpl3+)))
 
 (define-public pjproject-sfl
   (let ((sfl-patches
@@ -463,7 +465,7 @@ Initiation Protocol (SIP) and a multimedia framework.
 
 This package is intended for use with libring.  There are several custom
 patches, most notably the use of gnutls instead of openssl for encryption.")
-      (license '(gpl2+ ; pjproject
-                 gpl3+ ; sfl-patches
-                 lgpl2+))))) ; bundled resample
+      (license '(license:gpl2+ ; pjproject
+                 license:gpl3+ ; sfl-patches
+                 license:lgpl2+))))) ; bundled resample
 
-- 
2.9.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [Patch 7/10] opendht: Propagate msgpack.
  2016-09-13  2:22 [Patch 0/10] Add Ring Lukas Gradl
                   ` (5 preceding siblings ...)
  2016-09-13  2:28 ` [Patch 6/10] telephony: Add license prefix Lukas Gradl
@ 2016-09-13  2:29 ` Lukas Gradl
  2016-09-28  9:48   ` Ludovic Courtès
  2016-09-13  2:30 ` [Patch 8/10] Add libring Lukas Gradl
                   ` (3 subsequent siblings)
  10 siblings, 1 reply; 47+ messages in thread
From: Lukas Gradl @ 2016-09-13  2:29 UTC (permalink / raw)
  To: guix-devel


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: 0007-gnu-opendht-Propagate-msgpack.patch --]
[-- Type: text/x-patch, Size: 1012 bytes --]

From b611f29c422cfa69c90f437c40fcbee47a77f839 Mon Sep 17 00:00:00 2001
From: Lukas Gradl <lgradl@openmailbox.org>
Date: Sun, 11 Sep 2016 22:32:50 -0500
Subject: [PATCH 07/10] gnu: opendht: Propagate msgpack.

* gnu/packages/crypto.scm (opendht)[inputs]: Remove msgpack.
[propagated-inputs]: Add it.
---
 gnu/packages/crypto.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index 850ee71..75a17bd 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -137,10 +137,10 @@ OpenBSD tool of the same name.")
     (inputs
      `(("gnutls" ,gnutls)
        ("nettle" ,nettle)
-       ("msgpack" ,msgpack)
        ("readline" ,readline)))
     (propagated-inputs
-     `(("argon2" ,argon2)))
+     `(("argon2" ,argon2)
+       ("msgpack" ,msgpack))) ; This is included in several installed headers.
     (native-inputs
      `(("autoconf" ,autoconf)
        ("pkg-config" ,pkg-config)
-- 
2.9.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [Patch 8/10] Add libring.
  2016-09-13  2:22 [Patch 0/10] Add Ring Lukas Gradl
                   ` (6 preceding siblings ...)
  2016-09-13  2:29 ` [Patch 7/10] opendht: Propagate msgpack Lukas Gradl
@ 2016-09-13  2:30 ` Lukas Gradl
  2016-11-05 22:30   ` Ricardo Wurmus
  2016-09-13  2:30 ` [Patch 9/10] Add libringclient Lukas Gradl
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 47+ messages in thread
From: Lukas Gradl @ 2016-09-13  2:30 UTC (permalink / raw)
  To: guix-devel


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: 0008-gnu-Add-libring.patch --]
[-- Type: text/x-patch, Size: 5058 bytes --]

From ad9397f36c7d4e8797c38a838f27079b8ba32631 Mon Sep 17 00:00:00 2001
From: Lukas Gradl <lgradl@openmailbox.org>
Date: Sun, 28 Aug 2016 12:26:23 -0500
Subject: [PATCH 08/10] gnu: Add libring.

* gnu/packages/telephony.scm (libring): New variable.
---
 gnu/packages/telephony.scm | 94 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 94 insertions(+)

diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index bd849d6..96b7489 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -25,12 +25,24 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages boost)
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages crypto)
+  #:use-module (gnu packages glib)
   #:use-module (gnu packages gnupg)
+  #:use-module (gnu packages libupnp)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pcre)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages pulseaudio)
+  #:use-module (gnu packages serialization)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages video)
   #:use-module (gnu packages xiph)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
@@ -469,3 +481,85 @@ patches, most notably the use of gnutls instead of openssl for encryption.")
                  license:gpl3+ ; sfl-patches
                  license:lgpl2+))))) ; bundled resample
 
+(define-public libring
+  (let ((commit "41e032c81a9cdef457d2ead3767abbd6bcee2a16")) ; This is the
+                                        ; commit used by the AUR package.
+    (package
+      (name "libring")
+      (version (string-append "2.2.0-1." (string-take commit 7)))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url
+                "https://gerrit-ring.savoirfairelinux.com/ring-daemon.git")
+               (commit commit)))
+         (file-name (string-append name "-" version "-checkout"))
+         (modules '((guix build utils)))
+         (snippet
+          '(begin
+             (delete-file-recursively "contrib")
+             (substitute* "src/media/video/video_scaler.cpp"
+               ; Fix compatability with recent versions of ffmpeg:
+               (("PIX_FMT_RGB") "AV_PIX_FMT_FLAG_RGB")
+               (("PIX_FMT_PLANAR") "AV_PIX_FMT_FLAG_PLANAR"))
+             (substitute* "src/media/video/video_input.h"
+               (("#include \"threadloop.h\"")
+                (string-append "#include \"threadloop.h\"\n"
+                               "#include \"video/video_base.h\"")))))
+         (sha256
+          (base32
+           "05jqmbihn45pajbyvbb45l1084kr285p23mmmncvqcvdzzw87437"))))
+      (build-system gnu-build-system)
+      (inputs
+       `(("alsa-lib" ,alsa-lib)
+         ("boost" ,boost)
+         ("dbus-c++" ,dbus-c++)
+         ("eudev" ,eudev)
+         ("ffmpeg" ,ffmpeg)
+         ("flac" ,flac)
+         ("gmp" ,gmp)
+         ("gsm" ,gsm)
+         ("jack" ,jack-1)
+         ("jsoncpp" ,jsoncpp)
+         ("libogg" ,libogg)
+         ("opendht" ,opendht)
+         ("opus" ,opus)
+         ("pcre" ,pcre)
+         ("pjproject" ,pjproject-sfl)
+         ("pulseaudio" ,pulseaudio)
+         ("libsamplerate" ,libsamplerate)
+         ("libsndfile" ,libsndfile)
+         ("speex" ,speex)
+         ("libupnp" ,libupnp)
+         ("libvorbis" ,libvorbis)
+         ("libx264" ,libx264)
+         ("yaml-cpp" ,yaml-cpp)
+         ("zlib" ,zlib)))
+      (native-inputs
+       `(("autoconf" ,autoconf)
+         ("pkg-config" ,pkg-config)
+         ("automake" ,automake)
+         ("libtool" ,libtool)
+         ("cppunit" ,cppunit)
+         ("perl" ,perl))) ; Needed for documentation.
+      (arguments
+       `(#:tests? #f ; The tests fail to compile due to missing headers.
+         #:phases
+         (modify-phases %standard-phases
+           (add-before 'configure 'autoconf
+             (lambda _
+               (zero? (system* "autoreconf" "-vfi"))))
+           (add-before 'build 'add-lib-dir
+             (lambda _
+               (zero? (system* "mkdir" "src/lib")))))))
+      (synopsis "Distributed multimedia communications platform")
+      (description "Ring is a secure and distributed voice, video and chat
+communication platform that requires no centralized server and leaves the
+power of privacy in the hands of the user.  It supports the SIP and IAX
+protocols, as well as decentralized calling using P2P-DHT.
+
+This package provides a library and daemon implementing the Ring core functionality.")
+      (home-page "https://ring.cx/")
+      (license license:gpl3+))))
+
-- 
2.9.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [Patch 9/10] Add libringclient.
  2016-09-13  2:22 [Patch 0/10] Add Ring Lukas Gradl
                   ` (7 preceding siblings ...)
  2016-09-13  2:30 ` [Patch 8/10] Add libring Lukas Gradl
@ 2016-09-13  2:30 ` Lukas Gradl
  2016-09-13  2:31 ` [Patch 10/10] Add ring-client-gnome Lukas Gradl
  2016-11-05  4:59 ` [Patch 0/10] Add Ring Chris Marusich
  10 siblings, 0 replies; 47+ messages in thread
From: Lukas Gradl @ 2016-09-13  2:30 UTC (permalink / raw)
  To: guix-devel


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: 0009-gnu-Add-libringclient.patch --]
[-- Type: text/x-patch, Size: 3394 bytes --]

From f0215630412c195bee5c2bf53982911e2d155eff Mon Sep 17 00:00:00 2001
From: Lukas Gradl <lgradl@openmailbox.org>
Date: Sun, 28 Aug 2016 13:07:16 -0500
Subject: [PATCH 09/10] gnu: Add libringclient.

* gnu/packages/telephony.scm (libringclient): New variable.
---
 gnu/packages/telephony.scm | 48 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index 96b7489..7acb2dc 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -40,6 +40,7 @@
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages pulseaudio)
+  #:use-module (gnu packages qt)
   #:use-module (gnu packages serialization)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages video)
@@ -48,6 +49,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu))
 
 (define-public commoncpp
@@ -563,3 +565,49 @@ This package provides a library and daemon implementing the Ring core functional
       (home-page "https://ring.cx/")
       (license license:gpl3+))))
 
+(define-public libringclient
+  (let ((commit "9f223051f401185fdb6aaaaf5b842027555f9ea9")) ; This is the
+                                        ; commit used by the AUR package.
+    (package
+      (name "libringclient")
+      (version (string-append "1.0.0-1." (string-take commit 7)))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://gerrit-ring.savoirfairelinux.com/ring-lrc")
+           (commit commit)))
+         (sha256
+          (base32
+           "04j80ip7y0723dnasm45zdcrhhnp5fiqhb6d4zcppgp2gakhkxs5"))))
+      (build-system cmake-build-system)
+      (propagated-inputs
+       `(("libring" ,libring) ; For 'dring'.
+         ("qtbase" ,qtbase) ; Qt is included in several installed headers.
+         ("qttools" ,qttools)))
+      (arguments
+       `(#:tests? #f ; There is no testsuite.
+         #:configure-flags
+         (list (string-append
+                "-DRING_BUILD_DIR="
+                (assoc-ref %build-inputs "libring")
+                "/include"))
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'configure 'find-dbus-interfaces
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (substitute* "CMakeFiles/ringclient.dir/build.make"
+                 (((string-append (assoc-ref outputs "out")
+                                  "/share/dbus-1/interfaces"))
+                  (string-append (assoc-ref inputs "libring")
+                                 "/share/dbus-1/interfaces"))))))))
+      (synopsis "Distributed multimedia communications platform")
+      (description "Ring is a secure and distributed voice, video and chat
+communication platform that requires no centralized server and leaves the
+power of privacy in the hands of the user.  It supports the SIP and IAX
+protocols, as well as decentralized calling using P2P-DHT.
+
+This package provides a library common to all Ring clients.")
+      (home-page "https://ring.cx/")
+      (license license:gpl3+))))
-- 
2.9.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [Patch 10/10] Add ring-client-gnome.
  2016-09-13  2:22 [Patch 0/10] Add Ring Lukas Gradl
                   ` (8 preceding siblings ...)
  2016-09-13  2:30 ` [Patch 9/10] Add libringclient Lukas Gradl
@ 2016-09-13  2:31 ` Lukas Gradl
  2016-09-15 21:27   ` Danny Milosavljevic
  2016-11-05  4:59 ` [Patch 0/10] Add Ring Chris Marusich
  10 siblings, 1 reply; 47+ messages in thread
From: Lukas Gradl @ 2016-09-13  2:31 UTC (permalink / raw)
  To: guix-devel


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: 0010-gnu-Add-ring-client-gnome.patch --]
[-- Type: text/x-patch, Size: 3425 bytes --]

From 10a6216d59e8128c0d6208c5f0487825f3a956a0 Mon Sep 17 00:00:00 2001
From: Lukas Gradl <lgradl@openmailbox.org>
Date: Sun, 28 Aug 2016 14:05:28 -0500
Subject: [PATCH 10/10] gnu: Add ring-client-gnome.

* gnu/packages/telephony.scm (ring-client-gnome): New variable.
---
 gnu/packages/telephony.scm | 52 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index 7acb2dc..6df564f 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -23,6 +23,7 @@
 
 (define-module (gnu packages telephony)
   #:use-module (gnu packages)
+  #:use-module (gnu packages aidc)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
@@ -30,8 +31,12 @@
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages crypto)
+  #:use-module (gnu packages documentation)
+  #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
   #:use-module (gnu packages gnupg)
+  #:use-module (gnu packages gtk)
   #:use-module (gnu packages libupnp)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages multiprecision)
@@ -611,3 +616,50 @@ protocols, as well as decentralized calling using P2P-DHT.
 This package provides a library common to all Ring clients.")
       (home-page "https://ring.cx/")
       (license license:gpl3+))))
+
+
+(define-public ring-client-gnome
+  (let ((commit "1a468b9e6fae7c4426c590c1b5eee2718e0c0001")) ; This is the
+                                        ; commit used in the AUR package.
+    (package
+      (name "ring-client-gnome")
+      (version (string-append "1.0.0-1." (string-take commit 7)))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url (string-append
+                 "https://gerrit-ring.savoirfairelinux.com/" name))
+           (commit commit)))
+         (sha256
+          (base32
+           "07r0yky60c0zxq4slr7zxgmiknrpybzq94kk1j4khml6nlbjbvp2"))))
+      (build-system cmake-build-system)
+      (inputs
+       `(("libringclient" ,libringclient)
+         ("gtk+" ,gtk+)
+         ("glib:bin" ,glib "bin")
+         ("qrencode" ,qrencode)
+         ("libnotify" ,libnotify)
+         ("clutter" ,clutter)
+         ("clutter-gtk" ,clutter-gtk)
+         ("gettext" ,gnu-gettext)))
+      (native-inputs
+       `(("pkg-config" ,pkg-config)
+         ("doxygen" ,doxygen)))
+      (propagated-inputs
+       `(("libring" ,libring) ; This is needed to run dring.
+         ("adwaita-icon-theme" ,adwaita-icon-theme)
+         ("evolution-data-server" ,evolution-data-server)))
+      (arguments
+       `(#:tests? #f)) ; There is no testsuite.
+      (synopsis "Distributed multimedia communications platform")
+      (description "Ring is a secure and distributed voice, video and chat
+communication platform that requires no centralized server and leaves the
+power of privacy in the hands of the user.  It supports the SIP and IAX
+protocols, as well as decentralized calling using P2P-DHT.
+
+This package provides the Ring client for the Gnome Desktop.")
+      (home-page "https://ring.cx/")
+      (license license:gpl3+))))
-- 
2.9.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* Re: [Patch 4/10] argon2: Install pkg-config file.
  2016-09-13  2:26 ` [Patch 4/10] argon2: Install pkg-config file Lukas Gradl
@ 2016-09-15 21:24   ` Danny Milosavljevic
  2016-09-17 16:47     ` Lukas Gradl
  2016-09-18 21:43     ` Lukas Gradl
  0 siblings, 2 replies; 47+ messages in thread
From: Danny Milosavljevic @ 2016-09-15 21:24 UTC (permalink / raw)
  To: Lukas Gradl; +Cc: guix-devel

> +       (snippet
> +        '(let ((p (open-file "argon2.pc" "a")))
...                                          ^ why?

> +           (begin
> +             (display
> +              (string-append "prefix=/usr/local\n"
> +                             "exec_prefix=${prefix}\n"
> +                             "includedir=${prefix}/include\n"
> +                             "libdir=${prefix}/lib\n\n"
> +                             "Name: Argon2\n"
> +                             "Description: "
> +                             "The Argon2 password hashing algorithm\n"
> +                             "Version: 1.0.0\n"
> +                             "Cflags: -I${includedir}/\n"
> +                             "Libs: -L${libdir} -largon2\n") p)
> +             (close-output-port p))))

Ok but please try to upstream this as well.

> +               (zero? (system* "ln" "-s"
> +                               (string-append out "/lib/libargon2.so")
> +                               (string-append out "/lib/libargon2.so.0")))

The result of this will be ignored. Did you mean "(and ...)"?

> +               (zero? (system* ; Fix compatability for libtool based builds.
> +                       "ln" "-s"
> +                       (string-append out "/lib/libargon2.so")
> +                       (string-append out "/lib/libargon2.so.0.0.0")))))))))

Doesn't this have a soversion other than 0? I mean it's OK, I'm just asking to be sure - because the pkg-config file lists 1.0.0 and the name of the pkg-config file contains no soversion at all.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [Patch 6/10] telephony: Add license prefix.
  2016-09-13  2:28 ` [Patch 6/10] telephony: Add license prefix Lukas Gradl
@ 2016-09-15 21:25   ` Danny Milosavljevic
  2016-09-28  9:25   ` Ludovic Courtès
  1 sibling, 0 replies; 47+ messages in thread
From: Danny Milosavljevic @ 2016-09-15 21:25 UTC (permalink / raw)
  To: Lukas Gradl; +Cc: guix-devel

LGTM

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [Patch 10/10] Add ring-client-gnome.
  2016-09-13  2:31 ` [Patch 10/10] Add ring-client-gnome Lukas Gradl
@ 2016-09-15 21:27   ` Danny Milosavljevic
  2016-09-17 16:38     ` Lukas Gradl
  0 siblings, 1 reply; 47+ messages in thread
From: Danny Milosavljevic @ 2016-09-15 21:27 UTC (permalink / raw)
  To: Lukas Gradl; +Cc: guix-devel

> +      (propagated-inputs
> +       `(("libring" ,libring) ; This is needed to run dring.

Wait... I don't understand why it's required to be propagated...

> +         ("adwaita-icon-theme" ,adwaita-icon-theme)

Okay.

> +         ("evolution-data-server" ,evolution-data-server)))

Hmm. Why is it propagated? Most other packages seem to be able to use it as a regular input just fine. Are they wrong?

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [Patch 10/10] Add ring-client-gnome.
  2016-09-15 21:27   ` Danny Milosavljevic
@ 2016-09-17 16:38     ` Lukas Gradl
  2016-09-25 23:23       ` Lukas Gradl
  2016-09-25 23:35       ` GNOME Settings Schemas - How are they searched for? Danny Milosavljevic
  0 siblings, 2 replies; 47+ messages in thread
From: Lukas Gradl @ 2016-09-17 16:38 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 10302 bytes --]


Thank you for your review!
And Sorry for my late answer!

Danny Milosavljevic <dannym@scratchpost.org> writes:

>> +      (propagated-inputs
>> +       `(("libring" ,libring) ; This is needed to run dring.
>
> Wait... I don't understand why it's required to be propagated...
>

I was not sure how to handle this properly.  The package libring
provides a program 'dring', which is a daemon that, as far as I
understand, does all the communication with peers on the internet.  So
in order to place a call, one first needs to run 'dring &' and then
start the ring-client-gnome.  If the ring daemon is not running, then
ring-client-gnome won't do anything useful, it will just error out on
startup.

Looking at the manual, this does not justify propagation.  My intention
was that people can just install ring-client-gnome in a profile and it
will work.  If libring is not propagated, it will also need to be
installed by hand.

Is there a good way to specify this kind of runtime requirement?  I
could also just move it to 'inputs' and put a hint in the description
that libring should be installed alongside ring-client-gnome.


>> +         ("evolution-data-server" ,evolution-data-server)))
>
> Hmm. Why is it propagated? Most other packages seem to be able to use it as a regular input just fine. Are they wrong?

This is a similar issue.  I use ratpoison and do not have
evolution-data-server in my profile.  Then, if I do this:

---8<--- cut here -------------------- start --->8---
lukas@serenity$ guix package --list-installed | grep evolution-data-server
lukas@serenity$ 
lukas@serenity$ ./pre-inst-env guix environment --no-substitutes --no-grafts --ad-hoc ring-client-gnome
warning: failed to install locale: Invalid argument
accepted connection from pid 686, user lukas
lukas@serenity [env]$ dring &
[1] 708
lukas@serenity [env]$ ring.cx
Ring Daemon 2.3.0, by Savoir-faire Linux 2004-2016
http://www.ring.cx/
[Video support enabled]

10:59:14.283 os_core_unix.c !pjlib 2.4 for POSIX initialized

(gnome-ring:711): Gtk-WARNING **: Locale not supported by C library.
	Using the fallback 'C' locale.
** Message: Ring GNOME client version: 1.0.0
** Message: git ref: unknown

(gnome-ring:711): Clutter-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
Updating all accounts
Loading "708d2bd2d3639223"
Account parameter " "Account.presenceSubscribeSupported" " not found
Loading "45662ba5f88c4297"
Loading vcf from: QDir( "/home/lukas/.local/share/gnome-ring/profiles" , nameFilters = { "*" },  QDir::SortFlags( Name | IgnoreCase ) , QDir::Filters( Dirs|Files|Drives|AllEntries ) )

(gnome-ring:711): GLib-GIO-ERROR **: Settings schema 'org.gnome.Evolution.DefaultSources' is not installed

/gnu/store/p2pxykqp746za9z3cxply4hpjff3qfxa-profile/bin/ring.cx: line 46:   711 Trace/breakpoint trap   gnome-ring $*
lukas@serenity [env]$
---8<--- cut here -------------------- end ----->8---

It throws an error that I do not get if I instead do:

---8<--- cut here -------------------- start --->8---
lukas@serenity$ ./pre-inst-env guix environment --no-substitutes --no-grafts --ad-hoc ring-client-gnome evolution-data-server
warning: failed to install locale: Invalid argument
accepted connection from pid 1120, user lukas
lukas@serenity [env]$ dring &
[1] 1133
lukas@serenity [env]$ Ring Daemon 2.3.0, by Savoir-faire Linux 2004-2016
http://www.ring.cx/
[Video support enabled]

11:22:50.300 os_core_unix.c !pjlib 2.4 for POSIX initialized

lukas@serenity [env]$ ring.cx

(gnome-ring:1150): Gtk-WARNING **: Locale not supported by C library.
	Using the fallback 'C' locale.
** Message: Ring GNOME client version: 1.0.0
** Message: git ref: unknown

(gnome-ring:1150): Clutter-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
Updating all accounts
Loading "708d2bd2d3639223"
Account parameter " "Account.presenceSubscribeSupported" " not found
Loading "45662ba5f88c4297"
Loading vcf from: QDir( "/home/lukas/.local/share/gnome-ring/profiles" , nameFilters = { "*" },  QDir::SortFlags( Name | IgnoreCase ) , QDir::Filters( Dirs|Files|Drives|AllEntries ) )

(gnome-ring:1150): Gtk-WARNING **: gtkwidget.c:8523: widget not within a GtkWindow
QDBusMarshaller: type `VectorString' attempts to redefine basic D-BUS type 'as' (QStringList) (Did you forget to call beginStructure() ?)
QDBusMarshaller: type `MapStringVectorString' produces invalid D-BUS signature `a{s}' (Did you forget to call beginStructure() ?)
QDBusMarshaller: type `QMap<QString,MapStringVectorString>' produces invalid D-BUS signature `a{s}' (Did you forget to call beginStructure() ?)
Invalid current audio plugin
Selection changed 0
Selection changed 0

** (gnome-ring:1150): CRITICAL **: Unable to create EDS registry: Error calling StartServiceByName for org.gnome.evolution.dataserver.Sources5: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildSignaled: Process org.gnome.evolution.dataserver.Sources5 received signal 5

  C-c C-c
lukas@serenity [env]$ 
---8<--- cut here -------------------- end ----->8---

The main window pops up and it works.  I tried to solve this by
propagating evolution-data-server, however, the same thing still
happens.  If evolution-data-server is not explicitly installed, then
ring-client-gnome doesn't find it.  I am not sure how to proceed on
this.  I thought I had seen the same behavior with the package
'gnome-calendar' which also uses evolution-data-server, however, I am
not able to reproduce it now:

---8<--- cut here -------------------- start --->8---
lukas@serenity$ ./pre-inst-env guix environment --no-substitutes --no-grafts --ad-hoc gnome-calendar
warning: failed to install locale: Invalid argument
accepted connection from pid 6782, user lukas
lukas@serenity [env]$ gnome-calendar

(process:6793): libecal-CRITICAL **: e_cal_util_get_system_timezone: assertion 'location != NULL' failed

** (process:6793): WARNING **: Failed to access calendar configuration: Error calling StartServiceByName for org.gnome.evolution.dataserver.Sources5: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildSignaled: Process org.gnome.evolution.dataserver.Sources5 received signal 5

** (process:6793): CRITICAL **: e_cal_data_model_set_timezone: assertion 'zone != NULL' failed

(gnome-calendar:6793): Gtk-WARNING **: Locale not supported by C library.
	Using the fallback 'C' locale.

(gnome-calendar:6793): libecal-CRITICAL **: e_cal_util_get_system_timezone: assertion 'location != NULL' failed

(gnome-calendar:6793): libecal-CRITICAL **: e_cal_util_get_system_timezone: assertion 'location != NULL' failed

(gnome-calendar:6793): GLib-GIO-ERROR **: Settings schema 'org.gnome.shell.calendar' is not installed

Trace/breakpoint trap
lukas@serenity [env]$ exit
lukas@serenity$ ./pre-inst-env guix environment --no-substitutes --no-grafts --ad-hoc gnome-calendar evolution-data-server
warning: failed to install locale: Invalid argument
accepted connection from pid 6805, user lukas
The following derivations will be built:
   /gnu/store/3p1ggs14p303s7l348qvvkaxlhx93g96-profile.drv
   /gnu/store/wkv432071y8ny4805wx7l8dz738il5ap-ca-certificate-bundle.drv
   /gnu/store/m7cx7q37qfk0bzql20cvgb38pqy2qjyx-xdg-mime-database.drv
   /gnu/store/jjj4628gf3mrvy4psaqsl3frl4wl310j-xdg-desktop-database.drv
   /gnu/store/i66lqa6sik03m8f1qnw7yha1p2cnc25a-info-dir.drv
   /gnu/store/82gf9ak5sr7s6imbvgdi8aahw6z3xb3y-gtk-icon-themes.drv
   /gnu/store/3lhi0yx05k5f3fplnpasksyqfsw5gkyp-fonts-dir.drv
warning: collision encountered: /gnu/store/grppcf85880nbzfvj9rg4fc90zx7papz-gtk+-3.20.3/share/icons/hicolor/icon-theme.cache /gnu/store/153wx94y4505kjlbvfyr20q8bafjv998-gnome-calendar-3.20.2/share/icons/hicolor/icon-theme.cache 
warning: arbitrarily choosing /gnu/store/grppcf85880nbzfvj9rg4fc90zx7papz-gtk+-3.20.3/share/icons/hicolor/icon-theme.cache
warning: collision encountered: /gnu/store/ry5ylm1fyjpr875gwga39vj459ccld4q-gtk-icon-themes/share/icons/hicolor/icon-theme.cache /gnu/store/grppcf85880nbzfvj9rg4fc90zx7papz-gtk+-3.20.3/share/icons/hicolor/icon-theme.cache /gnu/store/153wx94y4505kjlbvfyr20q8bafjv998-gnome-calendar-3.20.2/share/icons/hicolor/icon-theme.cache 
warning: arbitrarily choosing /gnu/store/ry5ylm1fyjpr875gwga39vj459ccld4q-gtk-icon-themes/share/icons/hicolor/icon-theme.cache
warning: collision encountered: /gnu/store/kav2jb48w3m18d43bk1f7rxziawpi9sa-evolution-data-server-3.20.1/share/glib-2.0/schemas/gschemas.compiled /gnu/store/grppcf85880nbzfvj9rg4fc90zx7papz-gtk+-3.20.3/share/glib-2.0/schemas/gschemas.compiled /gnu/store/153wx94y4505kjlbvfyr20q8bafjv998-gnome-calendar-3.20.2/share/glib-2.0/schemas/gschemas.compiled 
warning: arbitrarily choosing /gnu/store/kav2jb48w3m18d43bk1f7rxziawpi9sa-evolution-data-server-3.20.1/share/glib-2.0/schemas/gschemas.compiled
lukas@serenity [env]$ gnome-calendar

(process:6859): libecal-CRITICAL **: e_cal_util_get_system_timezone: assertion 'location != NULL' failed

** (process:6859): WARNING **: Failed to access calendar configuration: Error calling StartServiceByName for org.gnome.evolution.dataserver.Sources5: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildSignaled: Process org.gnome.evolution.dataserver.Sources5 received signal 5

** (process:6859): CRITICAL **: e_cal_data_model_set_timezone: assertion 'zone != NULL' failed

(gnome-calendar:6859): Gtk-WARNING **: Locale not supported by C library.
	Using the fallback 'C' locale.

(gnome-calendar:6859): libecal-CRITICAL **: e_cal_util_get_system_timezone: assertion 'location != NULL' failed

(gnome-calendar:6859): libecal-CRITICAL **: e_cal_util_get_system_timezone: assertion 'location != NULL' failed

(gnome-calendar:6859): GLib-GIO-ERROR **: Settings schema 'org.gnome.shell.calendar' is not installed

Trace/breakpoint trap

---8<--- cut here -------------------- end ----->8---

It fails in both cases.

To come back to your question:  I am not fully convinced that other
packages using evolution-data-server are able to properly use it as an
input.  I am pretty sure that propagating evolution-data-server does not
make it a lot better.  Should I move it to 'inputs'?


Thank you for your review!
Best,
Lukas

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [Patch 4/10] argon2: Install pkg-config file.
  2016-09-15 21:24   ` Danny Milosavljevic
@ 2016-09-17 16:47     ` Lukas Gradl
  2016-09-18 21:32       ` Lukas Gradl
  2016-09-18 21:43     ` Lukas Gradl
  1 sibling, 1 reply; 47+ messages in thread
From: Lukas Gradl @ 2016-09-17 16:47 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 2321 bytes --]


Thank you for your review!

Danny Milosavljevic <dannym@scratchpost.org> writes:

>> +       (snippet
>> +        '(let ((p (open-file "argon2.pc" "a")))
> ...                                          ^ why?
>
>> +           (begin
>> +             (display
>> +              (string-append "prefix=/usr/local\n"
>> +                             "exec_prefix=${prefix}\n"
>> +                             "includedir=${prefix}/include\n"
>> +                             "libdir=${prefix}/lib\n\n"
>> +                             "Name: Argon2\n"
>> +                             "Description: "
>> +                             "The Argon2 password hashing algorithm\n"
>> +                             "Version: 1.0.0\n"
>> +                             "Cflags: -I${includedir}/\n"
>> +                             "Libs: -L${libdir} -largon2\n") p)
>> +             (close-output-port p))))
>
> Ok but please try to upstream this as well.

OK, I will look into that.

>
>> +               (zero? (system* "ln" "-s"
>> +                               (string-append out "/lib/libargon2.so")
>> +                               (string-append out "/lib/libargon2.so.0")))
>
> The result of this will be ignored. Did you mean "(and ...)"?

Oops! Yes, I will send an updated patch later today.

>
>> +               (zero? (system* ; Fix compatability for libtool based builds.
>> +                       "ln" "-s"
>> +                       (string-append out "/lib/libargon2.so")
>> +                       (string-append out "/lib/libargon2.so.0.0.0")))))))))
>
> Doesn't this have a soversion other than 0? I mean it's OK, I'm just
> asking to be sure - because the pkg-config file lists 1.0.0 and the
> name of the pkg-config file contains no soversion at all.

I am actually not sure about this.  I noticed that one of the packages
that depends on opendht (I think libring, but need to make sure) is
looking for 'libargon2.so.0.0.0'.  I did not find a way to convince it
to use 'libargon2.so' other than creating this symlink.  I am not sure
if this is a good/acceptable way to solve this, it is probably not the
intended way.  I also could not find documentation on this issue and i
am not sure which part of the toolchain is responsible for making the
'.so.X.X.X' versions of a library.

Thank you!

Best,
Lukas

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [Patch 4/10] argon2: Install pkg-config file.
  2016-09-17 16:47     ` Lukas Gradl
@ 2016-09-18 21:32       ` Lukas Gradl
  0 siblings, 0 replies; 47+ messages in thread
From: Lukas Gradl @ 2016-09-18 21:32 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel


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


>>> +               (zero? (system* "ln" "-s"
>>> +                               (string-append out "/lib/libargon2.so")
>>> +                               (string-append out "/lib/libargon2.so.0")))
>>
>> The result of this will be ignored. Did you mean "(and ...)"?
>
> Oops! Yes, I will send an updated patch later today.
>

A patch fixing this is attached.

Thank you!

Best,
Lukas


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0004-gnu-argon2-Install-pkg-config-file.patch --]
[-- Type: text/x-patch, Size: 3572 bytes --]

From 2fe4bfef5d9d006e2afb982d0eddd5e280d7e559 Mon Sep 17 00:00:00 2001
From: Lukas Gradl <lgradl@openmailbox.org>
Date: Tue, 9 Aug 2016 16:49:19 -0500
Subject: [PATCH 04/10] gnu: argon2: Install pkg-config file.

* gnu/packages/password-utils.scm (argon2)[source]: Create pkg-config file.
[arguments]: Install it.
---
 gnu/packages/password-utils.scm | 40 +++++++++++++++++++++++++++++++++++-----
 1 file changed, 35 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 7288da6..c0d3168 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -311,6 +311,21 @@ through the pass command.")
          "https://codeload.github.com/P-H-C/phc-winner-"
          name "/tar.gz/" version))
        (file-name (string-append name "-" version ".tar.gz"))
+       (snippet
+        '(let ((p (open-file "argon2.pc" "a")))
+           (begin
+             (display
+              (string-append "prefix=/usr/local\n"
+                             "exec_prefix=${prefix}\n"
+                             "includedir=${prefix}/include\n"
+                             "libdir=${prefix}/lib\n\n"
+                             "Name: Argon2\n"
+                             "Description: "
+                             "The Argon2 password hashing algorithm\n"
+                             "Version: 1.0.0\n"
+                             "Cflags: -I${includedir}/\n"
+                             "Libs: -L${libdir} -largon2\n") p)
+             (close-output-port p))))
        (sha256
         (base32
          "0g6wa94sh639xl1qc8z21q43r1mp8y77r1zf8nwx5pfsxd8fmyzv"))))
@@ -321,14 +336,29 @@ through the pass command.")
        #:phases
        (modify-phases %standard-phases
          (delete 'configure)
+         (add-after 'unpack 'fix-pkg-config
+           (lambda _
+             (substitute* "argon2.pc"
+               (("/usr/local")
+                (assoc-ref %outputs "out")))))
          (replace 'install
            (lambda _
              (let ((out (assoc-ref %outputs "out")))
-               (install-file "argon2" (string-append out "/bin"))
-               (install-file "libargon2.a" (string-append out "/lib"))
-               (install-file "libargon2.so" (string-append out "/lib"))
-               (copy-recursively "include"
-                                 (string-append out "/include"))))))))
+               (and
+                (install-file "argon2" (string-append out "/bin"))
+                (install-file "libargon2.a" (string-append out "/lib"))
+                (install-file "libargon2.so" (string-append out "/lib"))
+                (install-file "argon2.pc"
+                              (string-append out "/lib/pkgconfig"))
+                (copy-recursively "include"
+                                  (string-append out "/include"))
+                (zero? (system* "ln" "-s"
+                                (string-append out "/lib/libargon2.so")
+                                (string-append out "/lib/libargon2.so.0")))
+                (zero? (system* ; Fix compatability for libtool based builds.
+                        "ln" "-s"
+                        (string-append out "/lib/libargon2.so")
+                        (string-append out "/lib/libargon2.so.0.0.0"))))))))))
     (home-page "https://www.argon2.com/")
     (synopsis "Password hashing library")
     (description "Argon2 provides a key derivation function that was declared
-- 
2.9.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* Re: [Patch 4/10] argon2: Install pkg-config file.
  2016-09-15 21:24   ` Danny Milosavljevic
  2016-09-17 16:47     ` Lukas Gradl
@ 2016-09-18 21:43     ` Lukas Gradl
  2016-09-19 19:15       ` Danny Milosavljevic
  1 sibling, 1 reply; 47+ messages in thread
From: Lukas Gradl @ 2016-09-18 21:43 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel


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

Danny Milosavljevic <dannym@scratchpost.org> writes:

>> +       (snippet
>> +        '(let ((p (open-file "argon2.pc" "a")))
> ...                                          ^ why?

Sorry, I took this without thinking from another place where I did
similar things.  This should be "w".  The attached patch fixes that.

Thank you!
Best,
Lukas


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0004-gnu-argon2-Install-pkg-config-file.patch --]
[-- Type: text/x-patch, Size: 3572 bytes --]

From eea1626e7ca44674d7430356a900665edefeb4ae Mon Sep 17 00:00:00 2001
From: Lukas Gradl <lgradl@openmailbox.org>
Date: Tue, 9 Aug 2016 16:49:19 -0500
Subject: [PATCH 04/10] gnu: argon2: Install pkg-config file.

* gnu/packages/password-utils.scm (argon2)[source]: Create pkg-config file.
[arguments]: Install it.
---
 gnu/packages/password-utils.scm | 40 +++++++++++++++++++++++++++++++++++-----
 1 file changed, 35 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 7288da6..30e1206 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -311,6 +311,21 @@ through the pass command.")
          "https://codeload.github.com/P-H-C/phc-winner-"
          name "/tar.gz/" version))
        (file-name (string-append name "-" version ".tar.gz"))
+       (snippet
+        '(let ((p (open-file "argon2.pc" "w")))
+           (begin
+             (display
+              (string-append "prefix=/usr/local\n"
+                             "exec_prefix=${prefix}\n"
+                             "includedir=${prefix}/include\n"
+                             "libdir=${prefix}/lib\n\n"
+                             "Name: Argon2\n"
+                             "Description: "
+                             "The Argon2 password hashing algorithm\n"
+                             "Version: 1.0.0\n"
+                             "Cflags: -I${includedir}/\n"
+                             "Libs: -L${libdir} -largon2\n") p)
+             (close-output-port p))))
        (sha256
         (base32
          "0g6wa94sh639xl1qc8z21q43r1mp8y77r1zf8nwx5pfsxd8fmyzv"))))
@@ -321,14 +336,29 @@ through the pass command.")
        #:phases
        (modify-phases %standard-phases
          (delete 'configure)
+         (add-after 'unpack 'fix-pkg-config
+           (lambda _
+             (substitute* "argon2.pc"
+               (("/usr/local")
+                (assoc-ref %outputs "out")))))
          (replace 'install
            (lambda _
              (let ((out (assoc-ref %outputs "out")))
-               (install-file "argon2" (string-append out "/bin"))
-               (install-file "libargon2.a" (string-append out "/lib"))
-               (install-file "libargon2.so" (string-append out "/lib"))
-               (copy-recursively "include"
-                                 (string-append out "/include"))))))))
+               (and
+                (install-file "argon2" (string-append out "/bin"))
+                (install-file "libargon2.a" (string-append out "/lib"))
+                (install-file "libargon2.so" (string-append out "/lib"))
+                (install-file "argon2.pc"
+                              (string-append out "/lib/pkgconfig"))
+                (copy-recursively "include"
+                                  (string-append out "/include"))
+                (zero? (system* "ln" "-s"
+                                (string-append out "/lib/libargon2.so")
+                                (string-append out "/lib/libargon2.so.0")))
+                (zero? (system* ; Fix compatability for libtool based builds.
+                        "ln" "-s"
+                        (string-append out "/lib/libargon2.so")
+                        (string-append out "/lib/libargon2.so.0.0.0"))))))))))
     (home-page "https://www.argon2.com/")
     (synopsis "Password hashing library")
     (description "Argon2 provides a key derivation function that was declared
-- 
2.9.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* Re: [Patch 1/10] Add pjproject.
  2016-09-13  2:23 ` [Patch 1/10] Add pjproject Lukas Gradl
@ 2016-09-19  7:41   ` Ricardo Wurmus
  2016-09-20  5:39     ` Lukas Gradl
  0 siblings, 1 reply; 47+ messages in thread
From: Ricardo Wurmus @ 2016-09-19  7:41 UTC (permalink / raw)
  To: Lukas Gradl; +Cc: guix-devel

Hi Lukas,

thanks for the patches!

> From d6a6a5ded95071a58a160a435ccf56d6828148b0 Mon Sep 17 00:00:00 2001
> From: Lukas Gradl <lgradl@openmailbox.org>
> Date: Wed, 20 Jul 2016 21:26:32 -0500
> Subject: [PATCH 01/10] gnu: Add pjproject

> * gnu/packages/telephony.scm (pjproject-sfl): New variable.
> ---
>  gnu/packages/telephony.scm | 181 +++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 181 insertions(+)

> diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
> index d8a33dd..4893dbd 100644
> --- a/gnu/packages/telephony.scm
> +++ b/gnu/packages/telephony.scm
> @@ -23,6 +23,7 @@
 
>  (define-module (gnu packages telephony)
>    #:use-module (gnu packages)
> +  #:use-module (gnu packages audio)
>    #:use-module (gnu packages autotools)
>    #:use-module (gnu packages gnupg)
>    #:use-module (gnu packages linux)
> @@ -34,6 +35,7 @@
>    #:use-module (guix licenses)
>    #:use-module (guix packages)
>    #:use-module (guix download)
> +  #:use-module (guix git-download)
>    #:use-module (guix build-system gnu))
 
>  (define-public commoncpp
> @@ -286,3 +288,182 @@ lists.  All you need to join an existing conference is the host name or IP
>  address of one of the participants.")
>      (home-page "http://holdenc.altervista.org/seren/")
>      (license gpl3+)))
> +
> +(define-public pjproject-sfl
> +  (let ((sfl-patches
> +         (let ((commit "3dbedf53e9cceebb1eed155b5143026f6d253cb8"))
> +           (origin
> +             (method git-fetch)
> +             (uri
> +              (git-reference
> +               (url
> +                "https://gerrit-ring.savoirfairelinux.com/ring-daemon.git")
> +               (commit commit)))
> +             (file-name (string-append "sfl-patches" "-" "0.0.0-1."
> +                                       (string-take commit 7)  "-checkout"))
> +             (modules '((guix build utils)
> +                        (ice-9 ftw)))
> +             (snippet
> +              '(let ((files (scandir "." (lambda (file)
> +                                           (if (or (string=? file ".")
> +                                                   (string=? file ".."))
> +                                               #f
> +                                               #t)))))
> +                 (mkdir-p "sfl-patches")
> +                 (copy-recursively "contrib/src/pjproject/" "sfl-patches")
> +                 (for-each delete-file-recursively files)))

Why is this needed?

> +             (sha256
> +              (base32
> +               "1xnvkv0h24zr1dcmp7djjhqgzvrwic242jy4hb3m5qv71azvcsqg"))))))
> +    (package
> +      (name "pjproject")
> +      (version "2.4")
> +      (source
> +       (origin
> +         (method url-fetch)
> +         (uri (string-append
> +               "http://www.pjsip.org/release/"
> +               version "/" name "-" version ".tar.bz2"))
> +         (modules '((guix build utils)))
> +         (snippet
> +          '(begin
> +           ; The following removes bundled packages except for 'resample'.
> +           ; Pjproject uses some of the source files of resample and one own
> +           ; header (resamplesubs.h) not included with resample to build a
> +           ; shared library.  Upstream resample does not build this
> +           ; library. The license of resample is the LGPL2+
> +           ; The homepage of resample is at:
> +           ; https://ccrma.stanford.edu/~jos/resample/Free_Resampling_Software.html

For line comments like this please use “;;”.  Can we split off the fork
of “resample” into a separate package?  This package definition is
already very big.

> +             (let ((third-party-directories
> +                    (list "BaseClasses" "bdsound" "bin" "g7221" "gsm"
> +                          "ilbc" "lib" "milenage" "mp3" "portaudio"
> +                          "speex" "srtp"  ; Keep only resample, build and
> +                                        ; README.txt.
> +                          "build/baseclasses" "build/g7221" "build/gsm"
> +                          "build/ilbc" "build/milenage" "build/portaudio"
> +                          "build/samplerate" "build/speex" "build/srtp")))
> +                          ; Keep only Makefiles related to resample.
> +               (for-each (lambda (file)
> +                           (delete-file-recursively
> +                            (string-append "third_party/" file)))
> +                         third-party-directories)
> +               #t)
> +             (let ((third-party-dirs
> +                    (list "gsm" "ilbc" "speex" "portaudio"
> +                          "g7221" "srtp")))
> +               (for-each
> +                (lambda (dirs)
> +                  (substitute* "third_party/build/os-linux.mak"
> +                    (((string-append "DIRS += " dirs)) "")))
> +                third-party-dirs))
> +             (substitute* "aconfigure.ac"
> +               (("third_party/build/portaudio/os-auto.mak") ""))))
> +         (sha256
> +          (base32
> +           "0n90n1p41svf23d4fag8jqbjnv82fz14z6zchb8j1kldvap1b00h"))))
> +           ;"13fx7kpf1sswj7r0zl7fqkzg3rl5xz3dl96wdnv15qxfviq5wvq8")))) 2.4.5

Please remove the extra hash.

> +      (build-system gnu-build-system)
> +      (inputs
> +       `(("portaudio" ,portaudio))) ; It might be possible to remove this.

Have you tried? :)

> +      (propagated-inputs ; These packages are referenced in the Libs field of
> +                         ; the pkg-config file that will be installed by
> +                         ; pjproject.

We normally use line comments for longer blocks like this.

> +       `(("speex" ,speex)
> +         ("libsrtp" ,libsrtp)
> +         ("gnutls" ,gnutls)
> +         ("util-linux" ,util-linux)))
> +      (native-inputs
> +       `(("sfl-patches" ,sfl-patches) ; These patches are distributed with the
> +                                      ; libring source.  They contain various
> +                                      ; nontrivial changes such as the use of
> +                                      ; gnutls instead of openssl.
> +         ("autoconf" ,autoconf)
> +         ("automake" ,automake)

Why are the autotools needed?  Is this tarball not bootstrapped?

> +         ("pkg-config" ,pkg-config)
> +         ("libtool" ,libtool)))
> +      (arguments
> +       `(#:test-target
> +         "selftest"

Please put them on the same line.

> +         #:configure-flags
> +         (list "--disable-oss"
> +               "--disable-sound"
> +               "--disable-video"
> +               "--enable-ext-sound"
> +               "--disable-g711-codec"
> +               "--disable-l16-codec"
> +               "--disable-gsm-codec"
> +               "--disable-g722-codec"
> +               "--disable-g7221-codec"
> +               "--disable-ilbc-codec"
> +               "--disable-opencore-amr"
> +               "--disable-sdl"
> +               "--disable-ffmpeg"
> +               "--disable-v4l2"
> +               "--enable-ssl=gnutls"
> +               "--with-external-speex"
> +               "--with-external-pa"
> +               "--with-external-srtp")

Why are so many features disabled?  A comment would be nice.

> +         #:phases
> +         (modify-phases %standard-phases
> +           (add-after 'unpack 'apply-patches
> +             (lambda* (#:key inputs #:allow-other-keys)
> +               (begin

No need for “begin” here.

> +                 (mkdir "patch-dir")
> +                 (system* "tar" "-xvf" (assoc-ref inputs "sfl-patches")
> +                          "-C" "patch-dir" "--strip-components=1")
> +                 (let ((patch-dir
> +                        (string-append "patch-dir" "/sfl-patches"))
> +                       (patches
> +                        '("errno" "endianness" "gnutls" "ipv6" "ice_config"
> +                          "multiple_listeners" "pj_ice_sess")))
> +                   (for-each
> +                    (lambda (file)
> +                      (zero?
> +                       (system* "patch" "--force" "-p1" "-i"
> +                                (string-append patch-dir "/"
> +                                               file ".patch"))))
> +                    patches)))))

Normally, we don’t patch in build phases.  We use the “(patches…)” field
in the source definition instead.  Would this be possible here as well?

> +           (add-before 'build 'build-dep
> +             (lambda _
> +               (zero?
> +                (system* "make" "dep"))))

The lambda can go on one line.  Is this to build the remaining bundled
library?

> +           (add-before 'patch-source-shebangs 'autoconf
> +             (lambda _
> +               (zero?
> +                (system* "autoconf" "-v" "-f" "-i" "-o"
> +                         "aconfigure" "aconfigure.ac"))))

It would be better if we didn’t have to run autoconf.  Is it possible to
avoid it?

> +           (add-before 'autoconf 'disable-some-tests
> +             (lambda _
> +               (substitute* "Makefile"
> +                 (((string-append
> +                    "selftest: "
> +                    "pjlib-test "
> +                    "pjlib-util-test "
> +                    "pjnath-test "  ; This test fails.
> +                    "pjmedia-test "
> +                    "pjsip-test " ; This test fails.
> +                    "pjsua-test")) ; This test fails.  This test would need
> +                                        ; python.

Please don’t use “string-append” here.  You can just break the string
literal.  The comments would go on top then.

> +                  (string-append
> +                   "selftest: "
> +                   "pjlib-test "
> +                   "pjlib-util-test "
> +                   "pjmedia-test")))))
> +           (add-before 'autoconf 'set-flags
> +             (lambda _
> +               (setenv "CFLAGS"
> +                       (string-append
> +                        "-DPJ_ICE_MAX_CAND=32" " "
> +                        "-DPJ_ICE_MAX_CHECKS=150" " "
> +                        "-DPJ_ICE_COMP_BITS=2")))))))

We can pass flags in #:make-flags or #:configure-flags.  That’s better
than using a build phase.

~~ Ricardo

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [Patch 4/10] argon2: Install pkg-config file.
  2016-09-18 21:43     ` Lukas Gradl
@ 2016-09-19 19:15       ` Danny Milosavljevic
  2016-09-25 22:45         ` Lukas Gradl
  0 siblings, 1 reply; 47+ messages in thread
From: Danny Milosavljevic @ 2016-09-19 19:15 UTC (permalink / raw)
  To: Lukas Gradl; +Cc: guix-devel

Hi Lukas,

I thought about it some more.

On Sun, 18 Sep 2016 16:43:03 -0500
Lukas Gradl <lgradl@openmailbox.org> wrote:
> +               (and
> +                (install-file "argon2" (string-append out "/bin"))
> +                (install-file "libargon2.a" (string-append out "/lib"))
> +                (install-file "libargon2.so" (string-append out "/lib"))
> +                (install-file "argon2.pc"
> +                              (string-append out "/lib/pkgconfig"))

Hmm. I looked at the implementation of "install-file" and its return value seems to be the one of "copy-file". And the Guile manual specifies that the return value of "copy-file" is unspecified. (Instead it does dynamic unwinding on error)

So I'd do the "install-file" and "copy-recursively" calls outside the "(and ...)".

> +                (copy-recursively "include"
> +                                  (string-append out "/include"))
> +                (zero? (system* "ln" "-s"
> +                                (string-append out "/lib/libargon2.so")
> +                                (string-append out "/lib/libargon2.so.0")))

I think that there's a "symlink" function in Guile for that (which has unspecified return value). Would probably be marginally faster, too.

> +                (zero? (system* ; Fix compatability for libtool based builds.
> +                        "ln" "-s"
> +                        (string-append out "/lib/libargon2.so")
> +                        (string-append out "/lib/libargon2.so.0.0.0"))))))))))

Likewise.

About the part of the toolchain that sets the soname, either libtool mode=link does it ("-version-info") or it's an option "-soname" to ld (or gcc with "-Wl," prefix). 

The official soname used is set in argon2 Makefile:

        SO_LDFLAGS := -Wl,-soname,libargon2.so.0
                                  ^^^^^^^^^

But I'd say it's fine to manually symlink - since it works. Please still check how the client of argon2 in this case (libring ?) loads the shared object.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [Patch 1/10] Add pjproject.
  2016-09-19  7:41   ` Ricardo Wurmus
@ 2016-09-20  5:39     ` Lukas Gradl
  2016-09-22  2:46       ` Ricardo Wurmus
  0 siblings, 1 reply; 47+ messages in thread
From: Lukas Gradl @ 2016-09-20  5:39 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel


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


Hi Ricardo!

Thank you for your review!  

Ricardo Wurmus <rekado@elephly.net> writes:
>> From d6a6a5ded95071a58a160a435ccf56d6828148b0 Mon Sep 17 00:00:00 2001
>> From: Lukas Gradl <lgradl@openmailbox.org>
>> Date: Wed, 20 Jul 2016 21:26:32 -0500
>> Subject: [PATCH 01/10] gnu: Add pjproject
>
>> * gnu/packages/telephony.scm (pjproject-sfl): New variable.
>> ---
>>  gnu/packages/telephony.scm | 181 +++++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 181 insertions(+)
>
>> diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
>> index d8a33dd..4893dbd 100644
>> --- a/gnu/packages/telephony.scm
>> +++ b/gnu/packages/telephony.scm
>> @@ -23,6 +23,7 @@
>  
>>  (define-module (gnu packages telephony)
>>    #:use-module (gnu packages)
>> +  #:use-module (gnu packages audio)
>>    #:use-module (gnu packages autotools)
>>    #:use-module (gnu packages gnupg)
>>    #:use-module (gnu packages linux)
>> @@ -34,6 +35,7 @@
>>    #:use-module (guix licenses)
>>    #:use-module (guix packages)
>>    #:use-module (guix download)
>> +  #:use-module (guix git-download)
>>    #:use-module (guix build-system gnu))
>  
>>  (define-public commoncpp
>> @@ -286,3 +288,182 @@ lists.  All you need to join an existing conference is the host name or IP
>>  address of one of the participants.")
>>      (home-page "http://holdenc.altervista.org/seren/")
>>      (license gpl3+)))
>> +
>> +(define-public pjproject-sfl
>> +  (let ((sfl-patches
>> +         (let ((commit "3dbedf53e9cceebb1eed155b5143026f6d253cb8"))
>> +           (origin
>> +             (method git-fetch)
>> +             (uri
>> +              (git-reference
>> +               (url
>> +                "https://gerrit-ring.savoirfairelinux.com/ring-daemon.git")
>> +               (commit commit)))
>> +             (file-name (string-append "sfl-patches" "-" "0.0.0-1."
>> +                                       (string-take commit 7)  "-checkout"))
>> +             (modules '((guix build utils)
>> +                        (ice-9 ftw)))
>> +             (snippet
>> +              '(let ((files (scandir "." (lambda (file)
>> +                                           (if (or (string=? file ".")
>> +                                                   (string=? file ".."))
>> +                                               #f
>> +                                               #t)))))
>> +                 (mkdir-p "sfl-patches")
>> +                 (copy-recursively "contrib/src/pjproject/" "sfl-patches")
>> +                 (for-each delete-file-recursively files)))
>
> Why is this needed?

My idea here is the following:  The source tree downloaded here contains
the complete source for libring, which includes the patches to
pjproject.  In this snippet I try to get rid of all the other libring
files that are not needed and only keep the patches to pjproject.  Then
I try to make the directory tree that contains these patches as shallow
as possible.  I remember I had some problems with copying them to "."
but trying again now it works.  I attached an updated patch that does
this.

>
>> +             (sha256
>> +              (base32
>> +               "1xnvkv0h24zr1dcmp7djjhqgzvrwic242jy4hb3m5qv71azvcsqg"))))))
>> +    (package
>> +      (name "pjproject")
>> +      (version "2.4")
>> +      (source
>> +       (origin
>> +         (method url-fetch)
>> +         (uri (string-append
>> +               "http://www.pjsip.org/release/"
>> +               version "/" name "-" version ".tar.bz2"))
>> +         (modules '((guix build utils)))
>> +         (snippet
>> +          '(begin
>> +           ; The following removes bundled packages except for 'resample'.
>> +           ; Pjproject uses some of the source files of resample and one own
>> +           ; header (resamplesubs.h) not included with resample to build a
>> +           ; shared library.  Upstream resample does not build this
>> +           ; library. The license of resample is the LGPL2+
>> +           ; The homepage of resample is at:
>> +           ; https://ccrma.stanford.edu/~jos/resample/Free_Resampling_Software.html
>
> For line comments like this please use “;;”.

Done.

> Can we split off the fork of “resample” into a separate package?
> This package definition is already very big.

I tried this a few weeks (months?) ago.  The biggest roadblocks were the
missing header added by pjproject and some dependencies of 'resample'.

I will look into it again.

>
>> +             (let ((third-party-directories
>> +                    (list "BaseClasses" "bdsound" "bin" "g7221" "gsm"
>> +                          "ilbc" "lib" "milenage" "mp3" "portaudio"
>> +                          "speex" "srtp"  ; Keep only resample, build and
>> +                                        ; README.txt.
>> +                          "build/baseclasses" "build/g7221" "build/gsm"
>> +                          "build/ilbc" "build/milenage" "build/portaudio"
>> +                          "build/samplerate" "build/speex" "build/srtp")))
>> +                          ; Keep only Makefiles related to resample.
>> +               (for-each (lambda (file)
>> +                           (delete-file-recursively
>> +                            (string-append "third_party/" file)))
>> +                         third-party-directories)
>> +               #t)
>> +             (let ((third-party-dirs
>> +                    (list "gsm" "ilbc" "speex" "portaudio"
>> +                          "g7221" "srtp")))
>> +               (for-each
>> +                (lambda (dirs)
>> +                  (substitute* "third_party/build/os-linux.mak"
>> +                    (((string-append "DIRS += " dirs)) "")))
>> +                third-party-dirs))
>> +             (substitute* "aconfigure.ac"
>> +               (("third_party/build/portaudio/os-auto.mak") ""))))
>> +         (sha256
>> +          (base32
>> +           "0n90n1p41svf23d4fag8jqbjnv82fz14z6zchb8j1kldvap1b00h"))))
>> +           ;"13fx7kpf1sswj7r0zl7fqkzg3rl5xz3dl96wdnv15qxfviq5wvq8")))) 2.4.5
>
> Please remove the extra hash.

This is a leftover from a previous attempt at a different version.
I am very sorry about this.  I will be more careful next time before
submitting. 

>> +      (build-system gnu-build-system)
>> +      (inputs
>> +       `(("portaudio" ,portaudio))) ; It might be possible to remove this.
>
> Have you tried? :)
>

Yes, but so far without success.

Sorry that this comment was still there.  The configure phase checks for
portaudio and fails if it is not available.  I had a vague hunch at the
time that portaudio is actually not being used although configure fails if
it can not find it.  I based this off the observations that there is no
store reference to portaudio and that a lot of flags in the build log
seem to disable portaudio.  I will look more into this but I think that
most likely portaudio can not be omitted.


>> +      (propagated-inputs ; These packages are referenced in the Libs field of
>> +                         ; the pkg-config file that will be installed by
>> +                         ; pjproject.
>
> We normally use line comments for longer blocks like this.

OK, fixed.

>> +       `(("speex" ,speex)
>> +         ("libsrtp" ,libsrtp)
>> +         ("gnutls" ,gnutls)
>> +         ("util-linux" ,util-linux)))
>> +      (native-inputs
>> +       `(("sfl-patches" ,sfl-patches) ; These patches are distributed with the
>> +                                      ; libring source.  They contain various
>> +                                      ; nontrivial changes such as the use of
>> +                                      ; gnutls instead of openssl.
>> +         ("autoconf" ,autoconf)
>> +         ("automake" ,automake)
>
> Why are the autotools needed?  Is this tarball not bootstrapped?

Some of the patches introduce changes to '.in' and '.ac' files and the
snippet changes "aconfigure.ac", so I think it is necessary to run
autoconf to make sure these changes will be used.

>> +         ("pkg-config" ,pkg-config)
>> +         ("libtool" ,libtool)))
>> +      (arguments
>> +       `(#:test-target
>> +         "selftest"
>
> Please put them on the same line.

Sure, Sorry about that.

>> +         #:configure-flags
>> +         (list "--disable-oss"
>> +               "--disable-sound"
>> +               "--disable-video"
>> +               "--enable-ext-sound"
>> +               "--disable-g711-codec"
>> +               "--disable-l16-codec"
>> +               "--disable-gsm-codec"
>> +               "--disable-g722-codec"
>> +               "--disable-g7221-codec"
>> +               "--disable-ilbc-codec"
>> +               "--disable-opencore-amr"
>> +               "--disable-sdl"
>> +               "--disable-ffmpeg"
>> +               "--disable-v4l2"
>> +               "--enable-ssl=gnutls"
>> +               "--with-external-speex"
>> +               "--with-external-pa"
>> +               "--with-external-srtp")
>
> Why are so many features disabled?  A comment would be nice.

The version that is bundled with libring had these flags, so I think
ring will probably not use them.  I can try to enable more of these.

>> +         #:phases
>> +         (modify-phases %standard-phases
>> +           (add-after 'unpack 'apply-patches
>> +             (lambda* (#:key inputs #:allow-other-keys)
>> +               (begin
>
> No need for “begin” here.

OK.  I changed this section a little to work with the patches sitting in
the top level of the 'sfl-patches' tarball instead of the 'sfl-patches'
sub-directory.

>
>> +                 (mkdir "patch-dir")
>> +                 (system* "tar" "-xvf" (assoc-ref inputs "sfl-patches")
>> +                          "-C" "patch-dir" "--strip-components=1")
>> +                 (let ((patch-dir
>> +                        (string-append "patch-dir" "/sfl-patches"))
>> +                       (patches
>> +                        '("errno" "endianness" "gnutls" "ipv6" "ice_config"
>> +                          "multiple_listeners" "pj_ice_sess")))
>> +                   (for-each
>> +                    (lambda (file)
>> +                      (zero?
>> +                       (system* "patch" "--force" "-p1" "-i"
>> +                                (string-append patch-dir "/"
>> +                                               file ".patch"))))
>> +                    patches)))))
>
> Normally, we don’t patch in build phases.  We use the “(patches…)” field
> in the source definition instead.  Would this be possible here as
> well?

I think it should, but I was not able to get it to work.  I tried
"(patches (list sfl-patches))" because I think that the 'patches' field
should accept origin objects, however this just yielded the following:

---8<--- cut here -------------------- start --->8---
patch unexpectedly ends in middle of line
/gnu/store/ni491r4ffm03v0cr70df12lwiq826das-patch-2.7.5/bin/patch: **** Only garbage was found in the patch input.
source is under 'pjproject-2.4'
applying '/gnu/store/mjh1a1fjlz53psz4qxx0kh09qmbqj0jc-sfl-patches-0.0.0-1.tar.xz'...
builder for `/gnu/store/kb35an4z14adc0kn592dawxqlq6dzyhd-pjproject-2.4.tar.xz.drv' failed to produce output path `/gnu/store/lhrw7zwcxgginsi4w1pfgrkhpims1rza-pjproject-2.4.tar.xz'
---8<--- cut here -------------------- end ----->8---

It seems like it is trying to apply the tarball as a patch, so it is
probably not as easy as "(patches (list sfl-patches))".  Are there any
packages that use an 'origin' object in the 'patches' field?  Grepping
with

grep -r "(patches " gnu/packages | grep -v "search-patch"

does not yield any results that were helpful to me.

>> +           (add-before 'build 'build-dep
>> +             (lambda _
>> +               (zero?
>> +                (system* "make" "dep"))))
>
> The lambda can go on one line.  Is this to build the remaining bundled
> library?

Yes, that is right.

>> +           (add-before 'patch-source-shebangs 'autoconf
>> +             (lambda _
>> +               (zero?
>> +                (system* "autoconf" "-v" "-f" "-i" "-o"
>> +                         "aconfigure" "aconfigure.ac"))))
>
> It would be better if we didn’t have to run autoconf.  Is it possible to
> avoid it?

The file "aconfigure.ac" gets changed by the patch "gnutls.patch", but
that patch also changes "aconfigure", so it might not need to rerun
autoconf.  However, I also change this file in a snippet (to disable the
requirement of building the third-party directory), so running autoconf
can not be avoided here.

>
>> +           (add-before 'autoconf 'disable-some-tests
>> +             (lambda _
>> +               (substitute* "Makefile"
>> +                 (((string-append
>> +                    "selftest: "
>> +                    "pjlib-test "
>> +                    "pjlib-util-test "
>> +                    "pjnath-test "  ; This test fails.
>> +                    "pjmedia-test "
>> +                    "pjsip-test " ; This test fails.
>> +                    "pjsua-test")) ; This test fails.  This test would need
>> +                                        ; python.
>
> Please don’t use “string-append” here.  You can just break the string
> literal.  The comments would go on top then.

OK, done.

>
>> +                  (string-append
>> +                   "selftest: "
>> +                   "pjlib-test "
>> +                   "pjlib-util-test "
>> +                   "pjmedia-test")))))
>> +           (add-before 'autoconf 'set-flags
>> +             (lambda _
>> +               (setenv "CFLAGS"
>> +                       (string-append
>> +                        "-DPJ_ICE_MAX_CAND=32" " "
>> +                        "-DPJ_ICE_MAX_CHECKS=150" " "
>> +                        "-DPJ_ICE_COMP_BITS=2")))))))
>
> We can pass flags in #:make-flags or #:configure-flags.  That’s better
> than using a build phase.

Done.  Sorry about that.  I remember having problems with this but it
worked just now.

> ~~ Ricardo
>




Thank you for your detailed review!

I apologize for the high number of trivial issues!  I will review my own
work more careful next time before submitting.

The attached patch does not yet address the following:
- Separate package for resample.
- Apply patches in the (patches ...) field instead of a build phase.
- Maybe remove portaudio from inputs.

I will work on all of these, but I think some of these items might take some
time.

Thank you!
Best,
Lukas


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Add-pjproject.patch --]
[-- Type: text/x-patch, Size: 8583 bytes --]

From 060f49eb22788ee5a331ae12c5094066b341efcd Mon Sep 17 00:00:00 2001
From: Lukas Gradl <lgradl@openmailbox.org>
Date: Wed, 20 Jul 2016 21:26:32 -0500
Subject: [PATCH] gnu: Add pjproject

* gnu/packages/telephony.scm (pjproject-sfl): New variable.
---
 gnu/packages/telephony.scm | 160 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 160 insertions(+)

diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index d8a33dd..ce2034a 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -23,6 +23,7 @@
 
 (define-module (gnu packages telephony)
   #:use-module (gnu packages)
+  #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages linux)
@@ -34,6 +35,7 @@
   #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix build-system gnu))
 
 (define-public commoncpp
@@ -286,3 +288,161 @@ lists.  All you need to join an existing conference is the host name or IP
 address of one of the participants.")
     (home-page "http://holdenc.altervista.org/seren/")
     (license gpl3+)))
+
+(define-public pjproject-sfl
+  (let ((sfl-patches
+         (let ((commit "3dbedf53e9cceebb1eed155b5143026f6d253cb8"))
+           (origin
+             (method git-fetch)
+             (uri
+              (git-reference
+               (url
+                "https://gerrit-ring.savoirfairelinux.com/ring-daemon.git")
+               (commit commit)))
+             (file-name (string-append "sfl-patches" "-" "0.0.0-1."
+                                       (string-take commit 7)  "-checkout"))
+             (modules '((guix build utils)
+                        (ice-9 ftw)))
+             (snippet
+              '(let ((files (scandir "." (lambda (file)
+                                           (if (or (string=? file ".")
+                                                   (string=? file ".."))
+                                               #f
+                                               #t)))))
+                 (copy-recursively "contrib/src/pjproject/" ".")
+                 (for-each delete-file-recursively files)))
+             (sha256
+              (base32
+               "1xnvkv0h24zr1dcmp7djjhqgzvrwic242jy4hb3m5qv71azvcsqg"))))))
+    (package
+      (name "pjproject")
+      (version "2.4")
+      (source
+       (origin
+         (method url-fetch)
+         (uri (string-append
+               "http://www.pjsip.org/release/"
+               version "/" name "-" version ".tar.bz2"))
+         (modules '((guix build utils)))
+         (snippet
+          '(begin
+           ;; The following removes bundled packages except for 'resample'.
+           ;; Pjproject uses some of the source files of resample and one own
+           ;; header (resamplesubs.h) not included with resample to build a
+           ;; shared library.  Upstream resample does not build this
+           ;; library. The license of resample is the LGPL2+
+           ;; The homepage of resample is at:
+           ;; https://ccrma.stanford.edu/~jos/resample/Free_Resampling_Software.html
+             (let ((third-party-directories
+                    (list "BaseClasses" "bdsound" "bin" "g7221" "gsm"
+                          "ilbc" "lib" "milenage" "mp3" "portaudio"
+                          "speex" "srtp"  ; Keep only resample, build and
+                                        ; README.txt.
+                          "build/baseclasses" "build/g7221" "build/gsm"
+                          "build/ilbc" "build/milenage" "build/portaudio"
+                          "build/samplerate" "build/speex" "build/srtp")))
+                          ;; Keep only Makefiles related to resample.
+               (for-each (lambda (file)
+                           (delete-file-recursively
+                            (string-append "third_party/" file)))
+                         third-party-directories)
+               #t)
+             (let ((third-party-dirs
+                    (list "gsm" "ilbc" "speex" "portaudio"
+                          "g7221" "srtp")))
+               (for-each
+                (lambda (dirs)
+                  (substitute* "third_party/build/os-linux.mak"
+                    (((string-append "DIRS += " dirs)) "")))
+                third-party-dirs))
+             (substitute* "aconfigure.ac"
+               (("third_party/build/portaudio/os-auto.mak") ""))))
+         (sha256
+          (base32
+           "0n90n1p41svf23d4fag8jqbjnv82fz14z6zchb8j1kldvap1b00h"))))
+      (build-system gnu-build-system)
+      (inputs
+       `(("portaudio" ,portaudio)))
+      (propagated-inputs
+       ;; These packages are referenced in the Libs field of the pkg-config
+       ;; file that will be installed by pjproject.
+       `(("speex" ,speex)
+         ("libsrtp" ,libsrtp)
+         ("gnutls" ,gnutls)
+         ("util-linux" ,util-linux)))
+      (native-inputs
+       `(("sfl-patches" ,sfl-patches)
+         ;; These patches are distributed with the libring source.  They
+         ;; contain various nontrivial changes such as the use of gnutls
+         ;; instead of openssl.
+         ("autoconf" ,autoconf)
+         ("automake" ,automake)
+         ("pkg-config" ,pkg-config)
+         ("libtool" ,libtool)))
+      (arguments
+       `(#:test-target "selftest"
+         #:configure-flags  ;; The disabled features are not used by libring.
+         (list "--disable-oss"
+               "--disable-sound"
+               "--disable-video"
+               "--enable-ext-sound"
+               "--disable-g711-codec"
+               "--disable-l16-codec"
+               "--disable-gsm-codec"
+               "--disable-g722-codec"
+               "--disable-g7221-codec"
+               "--disable-ilbc-codec"
+               "--disable-opencore-amr"
+               "--disable-sdl"
+               "--disable-ffmpeg"
+               "--disable-v4l2"
+               "--enable-ssl=gnutls"
+               "--with-external-speex"
+               "--with-external-pa"
+               "--with-external-srtp"
+               "CFLAGS=-DPJ_ICE_MAX_CAND=32 -DPJ_ICE_MAX_CHECKS=150 \
+-DPJ_ICE_COMP_BITS=2")
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'apply-patches
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let ((patch-dir "patch-dir")
+                     (patches
+                        '("errno" "endianness" "gnutls" "ipv6" "ice_config"
+                          "multiple_listeners" "pj_ice_sess")))
+                 (mkdir patch-dir)
+                 (system* "tar" "-xvf" (assoc-ref inputs "sfl-patches")
+                          "-C" patch-dir "--strip-components=1")
+                 (for-each
+                  (lambda (file)
+                    (zero?
+                     (system* "patch" "--force" "-p1" "-i"
+                              (string-append patch-dir "/"
+                                             file ".patch"))))
+                  patches))))
+           (add-before 'build 'build-dep
+             (lambda _ (zero? (system* "make" "dep"))))
+           (add-before 'patch-source-shebangs 'autoconf
+             (lambda _
+               (zero?
+                (system* "autoconf" "-v" "-f" "-i" "-o"
+                         "aconfigure" "aconfigure.ac"))))
+           (add-before 'autoconf 'disable-some-tests
+             ;; Three of the six test programs fail due to missing network
+             ;; access.
+             (lambda _
+               (substitute* "Makefile"
+                 (("selftest: pjlib-test pjlib-util-test pjnath-test \
+pjmedia-test pjsip-test pjsua-test")
+                  "selftest: pjlib-test pjlib-util-test pjmedia-test")))))))
+      (home-page "www.pjsip.org")
+      (synopsis "Session Initiation Protocol (SIP) stack")
+      (description "PJProject provides an implementation of the Session
+Initiation Protocol (SIP) and a multimedia framework.
+
+This package is intended for use with libring.  There are several custom
+patches, most notably the use of gnutls instead of openssl for encryption.")
+      (license '(gpl2+ ; pjproject
+                 gpl3+ ; sfl-patches
+                 lgpl2+))))) ; bundled resample
+
-- 
2.9.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* Re: [Patch 1/10] Add pjproject.
  2016-09-20  5:39     ` Lukas Gradl
@ 2016-09-22  2:46       ` Ricardo Wurmus
  2016-09-26  6:41         ` Lukas Gradl
  0 siblings, 1 reply; 47+ messages in thread
From: Ricardo Wurmus @ 2016-09-22  2:46 UTC (permalink / raw)
  To: Lukas Gradl; +Cc: guix-devel


Hi Lukas,

Thanks for sending an updated patch!

>>> +(define-public pjproject-sfl
>>> +  (let ((sfl-patches
>>> +         (let ((commit "3dbedf53e9cceebb1eed155b5143026f6d253cb8"))
>>> +           (origin
>>> +             (method git-fetch)
>>> +             (uri
>>> +              (git-reference
>>> +               (url
>>> +                "https://gerrit-ring.savoirfairelinux.com/ring-daemon.git")
>>> +               (commit commit)))
>>> +             (file-name (string-append "sfl-patches" "-" "0.0.0-1."
>>> +                                       (string-take commit 7)  "-checkout"))
>>> +             (modules '((guix build utils)
>>> +                        (ice-9 ftw)))
>>> +             (snippet
>>> +              '(let ((files (scandir "." (lambda (file)
>>> +                                           (if (or (string=? file ".")
>>> +                                                   (string=? file ".."))
>>> +                                               #f
>>> +                                               #t)))))
>>> +                 (mkdir-p "sfl-patches")
>>> +                 (copy-recursively "contrib/src/pjproject/" "sfl-patches")
>>> +                 (for-each delete-file-recursively files)))
>>
>> Why is this needed?
>
> My idea here is the following:  The source tree downloaded here contains
> the complete source for libring, which includes the patches to
> pjproject.  In this snippet I try to get rid of all the other libring
> files that are not needed and only keep the patches to pjproject.  Then
> I try to make the directory tree that contains these patches as shallow
> as possible.  I remember I had some problems with copying them to "."
> but trying again now it works.  I attached an updated patch that does
> this.

Is there no release that includes these patches?  Why do we have to
apply them ourselves?  In Guix we try to avoid patching upstream sources
with functional patches (as opposed to patches that fix problems with
building the software on Guix), as this is really upstream’s work.

Is this really pjproject version 2.4 when we apply a massive patch set
like that?

~~ Ricardo

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [Patch 4/10] argon2: Install pkg-config file.
  2016-09-19 19:15       ` Danny Milosavljevic
@ 2016-09-25 22:45         ` Lukas Gradl
  2016-09-25 23:13           ` Danny Milosavljevic
  0 siblings, 1 reply; 47+ messages in thread
From: Lukas Gradl @ 2016-09-25 22:45 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel


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

Hi Danny,

Sorry for the delay!

Danny Milosavljevic <dannym@scratchpost.org> writes:

> Hi Lukas,
>
> I thought about it some more.
>
> On Sun, 18 Sep 2016 16:43:03 -0500
> Lukas Gradl <lgradl@openmailbox.org> wrote:
>> +               (and
>> +                (install-file "argon2" (string-append out "/bin"))
>> +                (install-file "libargon2.a" (string-append out "/lib"))
>> +                (install-file "libargon2.so" (string-append out "/lib"))
>> +                (install-file "argon2.pc"
>> +                              (string-append out "/lib/pkgconfig"))
>
> Hmm. I looked at the implementation of "install-file" and its return
> value seems to be the one of "copy-file". And the Guile manual
> specifies that the return value of "copy-file" is
> unspecified. (Instead it does dynamic unwinding on error)
>
> So I'd do the "install-file" and "copy-recursively" calls outside the "(and ...)".

OK.

>
>> +                (copy-recursively "include"
>> +                                  (string-append out "/include"))
>> +                (zero? (system* "ln" "-s"
>> +                                (string-append out "/lib/libargon2.so")
>> +                                (string-append out "/lib/libargon2.so.0")))
>
> I think that there's a "symlink" function in Guile for that (which has unspecified return value). Would probably be marginally faster, too.

>> +                (zero? (system* ; Fix compatability for libtool based builds.
>> +                        "ln" "-s"
>> +                        (string-append out "/lib/libargon2.so")
>> +                        (string-append out "/lib/libargon2.so.0.0.0"))))))))))
>
> Likewise.

I changed the first of these two to use Guile's symlink function and
removed the second one ('libargon2.so.0.0.0) because I think it is not
needed after all.  Since the return value of "(symlink ...)" is
unspecified, then we don't need the "(and ...)" at all, right?  I
dropped it for now.

> About the part of the toolchain that sets the soname, either libtool mode=link does it ("-version-info") or it's an option "-soname" to ld (or gcc with "-Wl," prefix). 
>
> The official soname used is set in argon2 Makefile:
>
>         SO_LDFLAGS := -Wl,-soname,libargon2.so.0
>                                   ^^^^^^^^^
>
> But I'd say it's fine to manually symlink - since it works. Please still check how the client of argon2 in this case (libring ?) loads the shared object.

Thank you for this explanation!

I looked into this some more.  The error that I saw earlier that
prompted me to symlink actually occurred during the phase
'validate-runpath' of the build of libring.  The build itself finished
without any problems, however libargon2.so.0 is not found in the
runpath:

---8<--- cut here -------------------- start --->8---
starting phase `validate-runpath'
validating RUNPATH of 0 binaries in "/gnu/store/mfanlirixm9468z02vf4c8dqvjl5gm01-libring-2.2.0-1.41e032c/lib"...
validating RUNPATH of 1 binaries in "/gnu/store/mfanlirixm9468z02vf4c8dqvjl5gm01-libring-2.2.0-1.41e032c/sbin"...
/gnu/store/mfanlirixm9468z02vf4c8dqvjl5gm01-libring-2.2.0-1.41e032c/sbin/dring: error: depends on 'libargon2.so.0', which cannot be found in RUNPATH ("/gnu/store/b6d8j2w72fi9m67llz0mwgxjffw6ykms-dbus-c++-0.9.0/lib" "/gnu/store/311lp7c9w9slsb408dskj7cy5caz894q-speex-1.2rc1/lib" "/gnu/store/571c58j8f06x8svykg4n5s0ip36kna5c-util-linux-2.27/lib" "/gnu/store/1i3xmm18dw9kq6wi46f6sj9nxy9pckjl-alsa-lib-1.0.27.1/lib" "/gnu/store/2yx0rhssryy4n1wxvzi1rg03ipv4abid-pulseaudio-9.0/lib" "/gnu/store/2yx0rhssryy4n1wxvzi1rg03ipv4abid-pulseaudio-9.0/lib/pulseaudio" "/gnu/store/r8cavha98fk7x13n43h65m2x448bhyfc-json-c-0.12/lib" "/gnu/store/bmlkg9mbqj1k0y7kdq2rdll42aicglyk-dbus-1.10.8/lib" "/gnu/store/8pskv4xpdjg1grx3c2an3g5fqj8pcrgh-gdbm-1.12/lib" "/gnu/store/jy0644xc70hkvrv7gn6l5hys51dv2r38-libsamplerate-0.1.8/lib" "/gnu/store/ijyypnxnrv4wq9gg2jy2dp4wf129da5v-libsndfile-1.0.26/lib" "/gnu/store/ah4jgqr54yzn5wm8i81mf33b8ph9sh53-flac-1.3.1/lib" "/gnu/store/jdf37llsrlldwm6kq29hya5j4cfr8qhv-libvorbis-1.3.5/lib" "/gnu/store/qs7cl4890ja9s2p4k8l0nzw2ak7dg22r-libogg-1.3.2/lib" "/gnu/store/8fi2fsdwjmz8sar3l4dyya4bzal0n9x9-libupnp-1.6.20/lib" "/gnu/store/zwc6ck9j0wv80kz5snw5acwb39ws88m1-pcre-8.38/lib" "/gnu/store/xbcwlpy7szxgr4pccbn1gkrpqa8j7npm-opendht-0.6.1/lib" "/gnu/store/1qv5i6rfxjc4d0rg7z6r9dapmf85kzmy-gnutls-3.5.2/lib" "/gnu/store/2z0lv1px7izrmzxsqi3555yavqa56mkq-libidn-1.32/lib" "/gnu/store/3fhnmvbdxlsh64pr3zg4y74x3hlx33qw-libtasn1-4.8/lib" "/gnu/store/cdkrfbl10kbyyjjw3yfk9hckfw8n1b7g-gmp-6.1.0/lib" "/gnu/store/9nifwk709wajpyfwa0jzaa3p6mf10vxs-gcc-4.9.3-lib/lib" "/gnu/store/q6sc9lws85pk034dny8ikl9z33n94zjm-jack-0.124.1/lib64" "/gnu/store/zvg8qyjsz20vjd170h4ilk7pnv7bqmm6-eudev-3.1.5/lib" "/gnu/store/m9vxvhdj691bq1f85lpflvnhcvrdilih-glibc-2.23/lib" "/gnu/store/y51frvdprzpq3skac6w392px91vyp4rq-libcap-2.24/lib" "/gnu/store/5992iq1v7arqa14ym3di58n4la0893nv-zlib-1.2.8/lib" "/gnu/store/7zhj5adf7kq7pr6j46wj1gjdc8vi0mwk-nettle-3.2/lib" "/gnu/store/8z4lfj32b7q308xigfj8w1nmgbgyvd6g-argon2-20160406/lib" "/gnu/store/00qwdmjrzflh0q4g9n18wcx8nvhhxcj1-bdb-6.2.23/lib" "/gnu/store/62px2z0gh6ygvi4pjdb1yqwqr8243vbp-ffmpeg-3.1.3/lib" "/gnu/store/9nifwk709wajpyfwa0jzaa3p6mf10vxs-gcc-4.9.3-lib/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/../../..")
phase `validate-runpath' failed after 0.0 seconds
builder for `/gnu/store/7hy39m8nlvy2rjd6iljvgrbpqbwq1grz-libring-2.2.0-1.41e032c.drv' failed with exit code 1
@ build-failed /gnu/store/7hy39m8nlvy2rjd6iljvgrbpqbwq1grz-libring-2.2.0-1.41e032c.drv - 1 builder for `/gnu/store/7hy39m8nlvy2rjd6iljvgrbpqbwq1grz-libring-2.2.0-1.41e032c.drv' failed with exit code 1
guix build: error: build failed: build of `/gnu/store/7hy39m8nlvy2rjd6iljvgrbpqbwq1grz-libring-2.2.0-1.41e032c.drv' failed
---8<--- cut here -------------------- end ----->8---

I produced this after commenting all the symlink calls.  I think this
error points out that the following can be found in the offending binary
'dring':

---8<--- cut here -------------------- start --->8---
lukas@serenity [env]$ objdump -p /gnu/store/mfanlirixm9468z02vf4c8dqvjl5gm01-libring-2.2.0-1.41e032c/sbin/dring |grep argon2
  NEEDED               libargon2.so.0
  RUNPATH              /gnu/store/b6d8j2w72fi9m67llz0mwgxjffw6ykms-dbus-c++-0.9.0/lib:/gnu/store/311lp7c9w9slsb408dskj7cy5caz894q-speex-1.2rc1/lib:/gnu/store/571c58j8f06x8svykg4n5s0ip36kna5c-util-linux-2.27/lib:/gnu/store/1i3xmm18dw9kq6wi46f6sj9nxy9pckjl-alsa-lib-1.0.27.1/lib:/gnu/store/2yx0rhssryy4n1wxvzi1rg03ipv4abid-pulseaudio-9.0/lib:/gnu/store/2yx0rhssryy4n1wxvzi1rg03ipv4abid-pulseaudio-9.0/lib/pulseaudio:/gnu/store/r8cavha98fk7x13n43h65m2x448bhyfc-json-c-0.12/lib:/gnu/store/bmlkg9mbqj1k0y7kdq2rdll42aicglyk-dbus-1.10.8/lib:/gnu/store/8pskv4xpdjg1grx3c2an3g5fqj8pcrgh-gdbm-1.12/lib:/gnu/store/jy0644xc70hkvrv7gn6l5hys51dv2r38-libsamplerate-0.1.8/lib:/gnu/store/ijyypnxnrv4wq9gg2jy2dp4wf129da5v-libsndfile-1.0.26/lib:/gnu/store/ah4jgqr54yzn5wm8i81mf33b8ph9sh53-flac-1.3.1/lib:/gnu/store/jdf37llsrlldwm6kq29hya5j4cfr8qhv-libvorbis-1.3.5/lib:/gnu/store/qs7cl4890ja9s2p4k8l0nzw2ak7dg22r-libogg-1.3.2/lib:/gnu/store/8fi2fsdwjmz8sar3l4dyya4bzal0n9x9-libupnp-1.6.20/lib:/gnu/store/zwc6ck9j0wv80kz5snw5acwb39ws88m1-pcre-8.38/lib:/gnu/store/xbcwlpy7szxgr4pccbn1gkrpqa8j7npm-opendht-0.6.1/lib:/gnu/store/1qv5i6rfxjc4d0rg7z6r9dapmf85kzmy-gnutls-3.5.2/lib:/gnu/store/2z0lv1px7izrmzxsqi3555yavqa56mkq-libidn-1.32/lib:/gnu/store/3fhnmvbdxlsh64pr3zg4y74x3hlx33qw-libtasn1-4.8/lib:/gnu/store/cdkrfbl10kbyyjjw3yfk9hckfw8n1b7g-gmp-6.1.0/lib:/gnu/store/9nifwk709wajpyfwa0jzaa3p6mf10vxs-gcc-4.9.3-lib/lib:/gnu/store/q6sc9lws85pk034dny8ikl9z33n94zjm-jack-0.124.1/lib64:/gnu/store/zvg8qyjsz20vjd170h4ilk7pnv7bqmm6-eudev-3.1.5/lib:/gnu/store/m9vxvhdj691bq1f85lpflvnhcvrdilih-glibc-2.23/lib:/gnu/store/y51frvdprzpq3skac6w392px91vyp4rq-libcap-2.24/lib:/gnu/store/5992iq1v7arqa14ym3di58n4la0893nv-zlib-1.2.8/lib:/gnu/store/7zhj5adf7kq7pr6j46wj1gjdc8vi0mwk-nettle-3.2/lib:/gnu/store/8z4lfj32b7q308xigfj8w1nmgbgyvd6g-argon2-20160406/lib:/gnu/store/00qwdmjrzflh0q4g9n18wcx8nvhhxcj1-bdb-6.2.23/lib:/gnu/store/62px2z0gh6ygvi4pjdb1yqwqr8243vbp-ffmpeg-3.1.3/lib:/gnu/store/9nifwk709wajpyfwa0jzaa3p6mf10vxs-gcc-4.9.3-lib/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/../../..
---8<--- cut here -------------------- end ----->8---

My understanding is now that if this 'dring' binary were to get
executed, it would look for 'libargon2.so.0' in the Runpath.  However,
there is only 'libargon2.so' in
'/gnu/store/8z4lfj32b7q308xigfj8w1nmgbgyvd6g-argon2-20160406/lib', which
it ignores.


My next question was why it was looking for 'libargon2.so.0' at all if
it does not exist.

Actually, 'libargon2.so' calls itself 'libargon2.so.0':

---8<--- cut here -------------------- start --->8---
lukas@serenity [env]$ objdump -p /gnu/store/5fh9w9x3ihvy9n7pw0q58xafj6x21w99-argon2-20160406/lib/libargon2.so 
[...]
Dynamic Section:
  NEEDED               libgcc_s.so.1
  NEEDED               libpthread.so.0
  NEEDED               libc.so.6
  SONAME               libargon2.so.0
  RUNPATH              /gnu/store/m9vxvhdj691bq1f85lpflvnhcvrdilih-glibc-2.23/lib:/gnu/store/9nifwk709wajpyfwa0jzaa3p6mf10vxs-gcc-4.9.3-lib/lib:/gnu/store/9nifwk709wajpyfwa0jzaa3p6mf10vxs-gcc-4.9.3-lib/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/../../..
[...]
---8<--- cut here -------------------- end ----->8---

Libring requires Opendht via pkg-config.  The pkg-config file of Opendht
then tells the libring build process that 'argon2' is required.  Then
'libargon2.so' is found and maybe used during the build of libring, but
somehow (I am not sure how) the soname of 'libargon2.so' which does not
match the filename ends up in the 'NEEDED' section of 'dring' as seen
above.


To fix this situation it would probably suffice to make sure that the
soname and the filename of the Argon2 library match.  To that end, one
could either change the soname or the filename to match the other one.
I think that changing either of these is risky because other dependent
libraries might depend on one of those.  So I would keep the symlink
'libargon2.so.0' -> 'libargon2.so' but remove the 'libargon2.so.0.0.0'
since it appears unneeded.  Building libring works with these changes.

I hope this makes sense.  My understanding of libtool is still very
superficial.

Thank you!

Best,
Lukas



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0004-gnu-argon2-Install-pkg-config-file.patch --]
[-- Type: text/x-patch, Size: 2950 bytes --]

From 5fb85fef7b1475baca6c29beb26799ca8f3d814a Mon Sep 17 00:00:00 2001
From: Lukas Gradl <lgradl@openmailbox.org>
Date: Tue, 9 Aug 2016 16:49:19 -0500
Subject: [PATCH 04/10] gnu: argon2: Install pkg-config file.

* gnu/packages/password-utils.scm (argon2)[source]: Create pkg-config file.
[arguments]: Install it.
---
 gnu/packages/password-utils.scm | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 7288da6..f62d041 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -311,6 +311,21 @@ through the pass command.")
          "https://codeload.github.com/P-H-C/phc-winner-"
          name "/tar.gz/" version))
        (file-name (string-append name "-" version ".tar.gz"))
+       (snippet
+        '(let ((p (open-file "argon2.pc" "w")))
+           (begin
+             (display
+              (string-append "prefix=/usr/local\n"
+                             "exec_prefix=${prefix}\n"
+                             "includedir=${prefix}/include\n"
+                             "libdir=${prefix}/lib\n\n"
+                             "Name: Argon2\n"
+                             "Description: "
+                             "The Argon2 password hashing algorithm\n"
+                             "Version: 1.0.0\n"
+                             "Cflags: -I${includedir}/\n"
+                             "Libs: -L${libdir} -largon2\n") p)
+             (close-output-port p))))
        (sha256
         (base32
          "0g6wa94sh639xl1qc8z21q43r1mp8y77r1zf8nwx5pfsxd8fmyzv"))))
@@ -321,14 +336,23 @@ through the pass command.")
        #:phases
        (modify-phases %standard-phases
          (delete 'configure)
+         (add-after 'unpack 'fix-pkg-config
+           (lambda _
+             (substitute* "argon2.pc"
+               (("/usr/local")
+                (assoc-ref %outputs "out")))))
          (replace 'install
            (lambda _
              (let ((out (assoc-ref %outputs "out")))
                (install-file "argon2" (string-append out "/bin"))
                (install-file "libargon2.a" (string-append out "/lib"))
                (install-file "libargon2.so" (string-append out "/lib"))
+               (install-file "argon2.pc"
+                             (string-append out "/lib/pkgconfig"))
                (copy-recursively "include"
-                                 (string-append out "/include"))))))))
+                                 (string-append out "/include"))
+               (symlink (string-append out "/lib/libargon2.so")
+                        (string-append out "/lib/libargon2.so.0"))))))))
     (home-page "https://www.argon2.com/")
     (synopsis "Password hashing library")
     (description "Argon2 provides a key derivation function that was declared
-- 
2.9.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* Re: [Patch 5/10] opendht: Propagate argon2.
  2016-09-13  2:27 ` [Patch 5/10] opendht: Propagate argon2 Lukas Gradl
@ 2016-09-25 22:54   ` Lukas Gradl
  2016-09-25 23:24     ` Danny Milosavljevic
  0 siblings, 1 reply; 47+ messages in thread
From: Lukas Gradl @ 2016-09-25 22:54 UTC (permalink / raw)
  To: guix-devel


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


Hello,

I noticed that some linker flags are set incorrectly.  The result was
that the output of
"objdump -p /gnu/store/...-opendht-0.6.1/lib/libopendht.so"
was missing a 'NEEDED' line for 'libargon2.so.0'.
The attached patch fixes that.

Thank you!

Best,
Lukas


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0005-gnu-opendht-Propagate-argon2.patch --]
[-- Type: text/x-patch, Size: 2128 bytes --]

From e7e0b00146f380f96c7ecb8d00ba3d00375d49f9 Mon Sep 17 00:00:00 2001
From: Lukas Gradl <lgradl@openmailbox.org>
Date: Tue, 9 Aug 2016 17:00:52 -0500
Subject: [PATCH 05/10] gnu: opendht: Propagate argon2.

* gnu/packages/crypto.scm (opendht)[source]: Add argon2 to pkg-config file.
[inputs]: Remove argon2.
[propagated-inputs]: Add argon2.
---
 gnu/packages/crypto.scm | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index ff5b0db..0c3e6c1 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -131,11 +131,20 @@ OpenBSD tool of the same name.")
            (delete-file-recursively "src/argon2")
            (substitute* "src/Makefile.am"
              (("./argon2/libargon2.la") "")
-             (("SUBDIRS = argon2") ""))
+             (("SUBDIRS = argon2") "")
+             (("libopendht_la_LDFLAGS = @LDFLAGS@")
+              "libopendht_la_LDFLAGS = @LDFLAGS@ @argon2_LIBS@"))
            (substitute* "src/crypto.cpp"
              (("argon2/argon2.h") "argon2.h"))
            (substitute* "configure.ac"
-             (("src/argon2/Makefile") ""))))
+             (("src/argon2/Makefile") "")
+             (("PKG_CHECK_MODULES..GNUTLS.. .gnutls .. 3.1..")
+              "PKG_CHECK_MODULES([GNUTLS], [gnutls >= 3.1])\n\
+PKG_CHECK_MODULES([argon2], [argon2 >= 1.0])"))
+           (substitute* "opendht.pc.in"
+             (("Libs: -L..libdir. -lopendht")
+              (string-append "Libs: -L${libdir} -lopendht\n"
+                             "Requires: argon2")))))
        (sha256
         (base32
          "09yvkmbqbym3b5md4n96qc1s9sf2n8ji404hagih45rmsj49599x"))))
@@ -144,8 +153,9 @@ OpenBSD tool of the same name.")
      `(("gnutls" ,gnutls)
        ("nettle" ,nettle)
        ("msgpack" ,msgpack)
-       ("readline" ,readline)
-       ("argon2" ,argon2)))
+       ("readline" ,readline)))
+    (propagated-inputs
+     `(("argon2" ,argon2)))
     (native-inputs
      `(("autoconf" ,autoconf)
        ("pkg-config" ,pkg-config)
-- 
2.9.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* Re: [Patch 4/10] argon2: Install pkg-config file.
  2016-09-25 22:45         ` Lukas Gradl
@ 2016-09-25 23:13           ` Danny Milosavljevic
  2016-09-25 23:32             ` Lukas Gradl
  0 siblings, 1 reply; 47+ messages in thread
From: Danny Milosavljevic @ 2016-09-25 23:13 UTC (permalink / raw)
  To: Lukas Gradl; +Cc: guix-devel

Hi Lukas,

On Sun, 25 Sep 2016 17:45:06 -0500
Lukas Gradl <lgradl@openmailbox.org> wrote:

> Since the return value of "(symlink ...)" is
> unspecified, then we don't need the "(and ...)" at all, right?  

Right.

> My understanding is now that if this 'dring' binary were to get
> executed, it would look for 'libargon2.so.0' in the Runpath.  However,
> there is only 'libargon2.so' in
> '/gnu/store/8z4lfj32b7q308xigfj8w1nmgbgyvd6g-argon2-20160406/lib', which
> it ignores.

Yeah, .so files without version number in the name (xxx.so) are only used by gcc when linking. The actual running program doesn't do anything with them.

I think ldconfig updates a database from soname to actual file name. I'm not sure what the rules for the symlinks in ldconfig are.

> My next question was why it was looking for 'libargon2.so.0' at all if
> it does not exist.

I think it's because of the soname. The soname is the main ABI in this case, the files are just an implementation detail. The actual matching should be done via comparing sonames. It's just that it doesn't scan all files on the system in order to find it. 

>$ objdump -p /gnu/store/mfanlirixm9468z02vf4c8dqvjl5gm01-libring-2.2.0-1.41e032c/sbin/dring |grep argon2
>  NEEDED               libargon2.so.0
>$ objdump -p /gnu/store/5fh9w9x3ihvy9n7pw0q58xafj6x21w99-argon2-20160406/lib/libargon2.so 
>Dynamic Section:
>  SONAME               libargon2.so.0

So far so good.

It should just be in file libargon2.so.0 in order to be used. So I think the symlink that you are doing from the existing file libargo2.so to the required file libargon2.so.0 is fine.

> To fix this situation it would probably suffice to make sure that the
> soname and the filename of the Argon2 library match.

I agree.

>  To that end, one
> could either change the soname or the filename to match the other one.
> I think that changing either of these is risky because other dependent
> libraries might depend on one of those.  

Especially changing the soname would be bad. It's part of the ABI. Don't touch it - especially when it actually lists a major API version - as it does.

What we could do is rename libargon2.so to libargo2.so.0. But then gcc won't find it - so I wouldn't recommend it.

>So I would keep the symlink
> 'libargon2.so.0' -> 'libargon2.so' but remove the 'libargon2.so.0.0.0'
> since it appears unneeded.  Building libring works with these changes.

Yes. I think that is a good approach.

Could you send an updated patchset?

Thanks!

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [Patch 10/10] Add ring-client-gnome.
  2016-09-17 16:38     ` Lukas Gradl
@ 2016-09-25 23:23       ` Lukas Gradl
  2016-09-25 23:35       ` GNOME Settings Schemas - How are they searched for? Danny Milosavljevic
  1 sibling, 0 replies; 47+ messages in thread
From: Lukas Gradl @ 2016-09-25 23:23 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel


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

Lukas Gradl <lgradl@openmailbox.org> writes:

> To come back to your question:  I am not fully convinced that other
> packages using evolution-data-server are able to properly use it as an
> input.  I am pretty sure that propagating evolution-data-server does not
> make it a lot better.  Should I move it to 'inputs'?

I went ahead and did that.



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0010-gnu-Add-ring-client-gnome.patch --]
[-- Type: text/x-patch, Size: 3425 bytes --]

From b54bcfbda5c8e58a5a561ec8953c77c1bbe43230 Mon Sep 17 00:00:00 2001
From: Lukas Gradl <lgradl@openmailbox.org>
Date: Sun, 28 Aug 2016 14:05:28 -0500
Subject: [PATCH 10/10] gnu: Add ring-client-gnome.

* gnu/packages/telephony.scm (ring-client-gnome): New variable.
---
 gnu/packages/telephony.scm | 52 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index 6ef1e58..22638b0 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -23,6 +23,7 @@
 
 (define-module (gnu packages telephony)
   #:use-module (gnu packages)
+  #:use-module (gnu packages aidc)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
@@ -30,8 +31,12 @@
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages crypto)
+  #:use-module (gnu packages documentation)
+  #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
   #:use-module (gnu packages gnupg)
+  #:use-module (gnu packages gtk)
   #:use-module (gnu packages libupnp)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages multiprecision)
@@ -590,3 +595,50 @@ protocols, as well as decentralized calling using P2P-DHT.
 This package provides a library common to all Ring clients.")
       (home-page "https://ring.cx/")
       (license license:gpl3+))))
+
+
+(define-public ring-client-gnome
+  (let ((commit "1a468b9e6fae7c4426c590c1b5eee2718e0c0001")) ; This is the
+                                        ; commit used in the AUR package.
+    (package
+      (name "ring-client-gnome")
+      (version (string-append "1.0.0-1." (string-take commit 7)))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url (string-append
+                 "https://gerrit-ring.savoirfairelinux.com/" name))
+           (commit commit)))
+         (sha256
+          (base32
+           "07r0yky60c0zxq4slr7zxgmiknrpybzq94kk1j4khml6nlbjbvp2"))))
+      (build-system cmake-build-system)
+      (inputs
+       `(("libringclient" ,libringclient)
+         ("gtk+" ,gtk+)
+         ("glib:bin" ,glib "bin")
+         ("qrencode" ,qrencode)
+         ("libnotify" ,libnotify)
+         ("clutter" ,clutter)
+         ("clutter-gtk" ,clutter-gtk)
+         ("evolution-data-server" ,evolution-data-server)
+         ("gettext" ,gnu-gettext)))
+      (native-inputs
+       `(("pkg-config" ,pkg-config)
+         ("doxygen" ,doxygen)))
+      (propagated-inputs
+       `(("libring" ,libring) ; This is needed to run dring.
+         ("adwaita-icon-theme" ,adwaita-icon-theme)))
+      (arguments
+       `(#:tests? #f)) ; There is no testsuite.
+      (synopsis "Distributed multimedia communications platform")
+      (description "Ring is a secure and distributed voice, video and chat
+communication platform that requires no centralized server and leaves the
+power of privacy in the hands of the user.  It supports the SIP and IAX
+protocols, as well as decentralized calling using P2P-DHT.
+
+This package provides the Ring client for the Gnome Desktop.")
+      (home-page "https://ring.cx/")
+      (license license:gpl3+))))
-- 
2.9.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* Re: [Patch 5/10] opendht: Propagate argon2.
  2016-09-25 22:54   ` Lukas Gradl
@ 2016-09-25 23:24     ` Danny Milosavljevic
  2016-09-25 23:43       ` Lukas Gradl
  0 siblings, 1 reply; 47+ messages in thread
From: Danny Milosavljevic @ 2016-09-25 23:24 UTC (permalink / raw)
  To: Lukas Gradl; +Cc: guix-devel

Hi Lukas,

On Sun, 25 Sep 2016 17:54:36 -0500
Lukas Gradl <lgradl@openmailbox.org> wrote:

> I noticed that some linker flags are set incorrectly.  The result was
> that the output of
> "objdump -p /gnu/store/...-opendht-0.6.1/lib/libopendht.so"
> was missing a 'NEEDED' line for 'libargon2.so.0'.
> The attached patch fixes that.

I'd also add a comment that the purpose of all that is to unbundle argon2 and then re-add the installed argon2 library.

Looks good to me.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [Patch 4/10] argon2: Install pkg-config file.
  2016-09-25 23:13           ` Danny Milosavljevic
@ 2016-09-25 23:32             ` Lukas Gradl
  2016-09-28  9:18               ` Ludovic Courtès
  0 siblings, 1 reply; 47+ messages in thread
From: Lukas Gradl @ 2016-09-25 23:32 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel


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

Hi,

Danny Milosavljevic <dannym@scratchpost.org> writes:
> Yes. I think that is a good approach.
>
> Could you send an updated patchset?

The attached patch implements everything as discussed.  Thank you for
your explanation and your help!  I am a lot happier with this package
now than before.

Best,
Lukas



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0004-gnu-argon2-Install-pkg-config-file.patch --]
[-- Type: text/x-patch, Size: 2950 bytes --]

From 5fb85fef7b1475baca6c29beb26799ca8f3d814a Mon Sep 17 00:00:00 2001
From: Lukas Gradl <lgradl@openmailbox.org>
Date: Tue, 9 Aug 2016 16:49:19 -0500
Subject: [PATCH 04/10] gnu: argon2: Install pkg-config file.

* gnu/packages/password-utils.scm (argon2)[source]: Create pkg-config file.
[arguments]: Install it.
---
 gnu/packages/password-utils.scm | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 7288da6..f62d041 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -311,6 +311,21 @@ through the pass command.")
          "https://codeload.github.com/P-H-C/phc-winner-"
          name "/tar.gz/" version))
        (file-name (string-append name "-" version ".tar.gz"))
+       (snippet
+        '(let ((p (open-file "argon2.pc" "w")))
+           (begin
+             (display
+              (string-append "prefix=/usr/local\n"
+                             "exec_prefix=${prefix}\n"
+                             "includedir=${prefix}/include\n"
+                             "libdir=${prefix}/lib\n\n"
+                             "Name: Argon2\n"
+                             "Description: "
+                             "The Argon2 password hashing algorithm\n"
+                             "Version: 1.0.0\n"
+                             "Cflags: -I${includedir}/\n"
+                             "Libs: -L${libdir} -largon2\n") p)
+             (close-output-port p))))
        (sha256
         (base32
          "0g6wa94sh639xl1qc8z21q43r1mp8y77r1zf8nwx5pfsxd8fmyzv"))))
@@ -321,14 +336,23 @@ through the pass command.")
        #:phases
        (modify-phases %standard-phases
          (delete 'configure)
+         (add-after 'unpack 'fix-pkg-config
+           (lambda _
+             (substitute* "argon2.pc"
+               (("/usr/local")
+                (assoc-ref %outputs "out")))))
          (replace 'install
            (lambda _
              (let ((out (assoc-ref %outputs "out")))
                (install-file "argon2" (string-append out "/bin"))
                (install-file "libargon2.a" (string-append out "/lib"))
                (install-file "libargon2.so" (string-append out "/lib"))
+               (install-file "argon2.pc"
+                             (string-append out "/lib/pkgconfig"))
                (copy-recursively "include"
-                                 (string-append out "/include"))))))))
+                                 (string-append out "/include"))
+               (symlink (string-append out "/lib/libargon2.so")
+                        (string-append out "/lib/libargon2.so.0"))))))))
     (home-page "https://www.argon2.com/")
     (synopsis "Password hashing library")
     (description "Argon2 provides a key derivation function that was declared
-- 
2.9.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* GNOME Settings Schemas - How are they searched for?
  2016-09-17 16:38     ` Lukas Gradl
  2016-09-25 23:23       ` Lukas Gradl
@ 2016-09-25 23:35       ` Danny Milosavljevic
  2016-10-23 15:36         ` Pjotr Prins
  1 sibling, 1 reply; 47+ messages in thread
From: Danny Milosavljevic @ 2016-09-25 23:35 UTC (permalink / raw)
  To: Lukas Gradl

Hi,

> I was not sure how to handle this properly.  The package libring
> provides a program 'dring', which is a daemon that, as far as I
> understand, does all the communication with peers on the internet.  So
> in order to place a call, one first needs to run 'dring &' and then
> start the ring-client-gnome.  If the ring daemon is not running, then
> ring-client-gnome won't do anything useful, it will just error out on
> startup.
> 
> Looking at the manual, this does not justify propagation.  My intention
> was that people can just install ring-client-gnome in a profile and it
> will work.  If libring is not propagated, it will also need to be
> installed by hand.

I think it's fine to be propagated in this case - but let's see what the others say.

> Is there a good way to specify this kind of runtime requirement?  I
> could also just move it to 'inputs' and put a hint in the description
> that libring should be installed alongside ring-client-gnome.

Good question.

> (gnome-ring:711): GLib-GIO-ERROR **: Settings schema 'org.gnome.Evolution.DefaultSources' is not installed
> (gnome-calendar:6793): GLib-GIO-ERROR **: Settings schema 'org.gnome.shell.calendar' is not installed
> ** (process:6859): WARNING **: Failed to access calendar configuration: Error calling StartServiceByName for org.gnome.evolution.dataserver.Sources
> (gnome-calendar:6859): GLib-GIO-ERROR **: Settings schema 'org.gnome.shell.calendar' is not installed

Hmmm... I don't use GNOME - so no idea. I have to defer to people more knowledgeable about it. How does a GNOME program find other program's settings schemas in Guix? Also it seems it's trying to use dbus (?) in order to start the evolution data server. How is that searched for?

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [Patch 5/10] opendht: Propagate argon2.
  2016-09-25 23:24     ` Danny Milosavljevic
@ 2016-09-25 23:43       ` Lukas Gradl
  0 siblings, 0 replies; 47+ messages in thread
From: Lukas Gradl @ 2016-09-25 23:43 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel


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

Danny Milosavljevic <dannym@scratchpost.org> writes:

> Hi Lukas,
>
> On Sun, 25 Sep 2016 17:54:36 -0500
> Lukas Gradl <lgradl@openmailbox.org> wrote:
>
>> I noticed that some linker flags are set incorrectly.  The result was
>> that the output of
>> "objdump -p /gnu/store/...-opendht-0.6.1/lib/libopendht.so"
>> was missing a 'NEEDED' line for 'libargon2.so.0'.
>> The attached patch fixes that.
>
> I'd also add a comment that the purpose of all that is to unbundle argon2 and then re-add the installed argon2 library.

Done.  An updated patch is attached.  Thank you!

Best,
Lukas




[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0005-gnu-opendht-Propagate-argon2.patch --]
[-- Type: text/x-patch, Size: 2375 bytes --]

From fd1f5d43844ad80fe516607f869dcbda82b23a1f Mon Sep 17 00:00:00 2001
From: Lukas Gradl <lgradl@openmailbox.org>
Date: Tue, 9 Aug 2016 17:00:52 -0500
Subject: [PATCH 05/10] gnu: opendht: Propagate argon2.

* gnu/packages/crypto.scm (opendht)[source]: Add argon2 to pkg-config file.
[inputs]: Remove argon2.
[propagated-inputs]: Add argon2.
---
 gnu/packages/crypto.scm | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index ff5b0db..5f5e0c2 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -127,15 +127,26 @@ OpenBSD tool of the same name.")
        (file-name (string-append name "-" version ".tar.gz"))
        (modules '((guix build utils)))
        (snippet
+        ;; These changes remove the bundled 'argon2' and instead use the
+        ;; package argon2.
         '(begin
            (delete-file-recursively "src/argon2")
            (substitute* "src/Makefile.am"
              (("./argon2/libargon2.la") "")
-             (("SUBDIRS = argon2") ""))
+             (("SUBDIRS = argon2") "")
+             (("libopendht_la_LDFLAGS = @LDFLAGS@")
+              "libopendht_la_LDFLAGS = @LDFLAGS@ @argon2_LIBS@"))
            (substitute* "src/crypto.cpp"
              (("argon2/argon2.h") "argon2.h"))
            (substitute* "configure.ac"
-             (("src/argon2/Makefile") ""))))
+             (("src/argon2/Makefile") "")
+             (("PKG_CHECK_MODULES..GNUTLS.. .gnutls .. 3.1..")
+              "PKG_CHECK_MODULES([GNUTLS], [gnutls >= 3.1])\n\
+PKG_CHECK_MODULES([argon2], [argon2 >= 1.0])"))
+           (substitute* "opendht.pc.in"
+             (("Libs: -L..libdir. -lopendht")
+              (string-append "Libs: -L${libdir} -lopendht\n"
+                             "Requires: argon2")))))
        (sha256
         (base32
          "09yvkmbqbym3b5md4n96qc1s9sf2n8ji404hagih45rmsj49599x"))))
@@ -144,8 +155,9 @@ OpenBSD tool of the same name.")
      `(("gnutls" ,gnutls)
        ("nettle" ,nettle)
        ("msgpack" ,msgpack)
-       ("readline" ,readline)
-       ("argon2" ,argon2)))
+       ("readline" ,readline)))
+    (propagated-inputs
+     `(("argon2" ,argon2)))
     (native-inputs
      `(("autoconf" ,autoconf)
        ("pkg-config" ,pkg-config)
-- 
2.9.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* Re: [Patch 1/10] Add pjproject.
  2016-09-22  2:46       ` Ricardo Wurmus
@ 2016-09-26  6:41         ` Lukas Gradl
  2016-11-05 22:25           ` Ricardo Wurmus
  0 siblings, 1 reply; 47+ messages in thread
From: Lukas Gradl @ 2016-09-26  6:41 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 2029 bytes --]

Hi Ricardo,

Sorry for the delay!

Ricardo Wurmus <rekado@elephly.net> writes:
>> My idea here is the following:  The source tree downloaded here contains
>> the complete source for libring, which includes the patches to
>> pjproject.  In this snippet I try to get rid of all the other libring
>> files that are not needed and only keep the patches to pjproject.  Then
>> I try to make the directory tree that contains these patches as shallow
>> as possible.  I remember I had some problems with copying them to "."
>> but trying again now it works.  I attached an updated patch that does
>> this.
>
> Is there no release that includes these patches?  Why do we have to
> apply them ourselves?  In Guix we try to avoid patching upstream sources
> with functional patches (as opposed to patches that fix problems with
> building the software on Guix), as this is really upstream’s work.

There is no release that I know of that contains these patches.  The
Ring project ships a Makefile in the 'contrib' directory of the
'libring' source tree that downloads the upstream Pjproject source
and applies these very same patches to it.  It then continues to build a
bundled version of pjproject + patches.

> Is this really pjproject version 2.4 when we apply a massive patch set
> like that?

It is not.  It is a fork of pjproject that introduces several functional
changes, the most notable one being the use of GnuTLS instead of
OpenSSL.  I suspect the Ring project's motivation for doing this are at
least in part legal issues as the OpenSSL license seems to be
incompatible with the GPL according to
"http://www.gnu.org/licenses/license-list.html".  I don't know if there
are technical benefits of using one over the other.

I tried to denote the fact that this is a fork of pjproject by naming
the variable 'pjproject-sfl' instead of just 'pjproject'.  I could go
further and make it local to the definition of libring or change the
name of the package?


Thank you!

Best,
Lukas

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [Patch 2/10] Add dbus-c++.
  2016-09-13  2:24 ` [Patch 2/10] Add dbus-c++ Lukas Gradl
@ 2016-09-28  9:09   ` Ludovic Courtès
  0 siblings, 0 replies; 47+ messages in thread
From: Ludovic Courtès @ 2016-09-28  9:09 UTC (permalink / raw)
  To: Lukas Gradl; +Cc: guix-devel

Lukas Gradl <lgradl@openmailbox.org> skribis:

> From 828174a6663363c26362637f23569e4f23698786 Mon Sep 17 00:00:00 2001
> From: Lukas Gradl <lgradl@openmailbox.org>
> Date: Thu, 21 Jul 2016 08:39:54 -0500
> Subject: [PATCH 02/10] gnu: Add dbus-c++.
>
> * gnu/packages/glib.scm (dbus-c++): New variable.

I changed the URL to use mirror://sourceforge, made a couple of cosmetic
changes and committed.  Thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [Patch 3/10] Add gsm.
  2016-09-13  2:25 ` [Patch 3/10] Add gsm Lukas Gradl
@ 2016-09-28  9:16   ` Ludovic Courtès
  0 siblings, 0 replies; 47+ messages in thread
From: Ludovic Courtès @ 2016-09-28  9:16 UTC (permalink / raw)
  To: Lukas Gradl; +Cc: guix-devel

Lukas Gradl <lgradl@openmailbox.org> skribis:

> From ecafdf21a654c97fa9adb2c382c431c297a3fee0 Mon Sep 17 00:00:00 2001
> From: Lukas Gradl <lgradl@openmailbox.org>
> Date: Tue, 9 Aug 2016 16:43:36 -0500
> Subject: [PATCH 03/10] gnu: Add gsm.
>
> * gnu/packages/audio.scm (gsm): New variable.

Applied with small changes:

> +             (let ((out (assoc-ref %outputs "out")))
> +               (begin
> +                (system* "mv" (string-append out "/inc")
> +                         (string-append out "/include"))

I removed ‘begin’ and used ‘rename-file’ here.

> +                (mkdir-p (string-append out "/include/gsm"))
> +                (copy-recursively
> +                 "inc" (string-append out "/include/gsm"))))))

I noticed that this leads to a situation where we have both
include/gsm.h and include/gsm/gsm.h as identical file.  I suppose the
former is unnecessary?

Thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [Patch 4/10] argon2: Install pkg-config file.
  2016-09-25 23:32             ` Lukas Gradl
@ 2016-09-28  9:18               ` Ludovic Courtès
  0 siblings, 0 replies; 47+ messages in thread
From: Ludovic Courtès @ 2016-09-28  9:18 UTC (permalink / raw)
  To: Lukas Gradl; +Cc: guix-devel

Hello,

Lukas Gradl <lgradl@openmailbox.org> skribis:

> From 5fb85fef7b1475baca6c29beb26799ca8f3d814a Mon Sep 17 00:00:00 2001
> From: Lukas Gradl <lgradl@openmailbox.org>
> Date: Tue, 9 Aug 2016 16:49:19 -0500
> Subject: [PATCH 04/10] gnu: argon2: Install pkg-config file.
>
> * gnu/packages/password-utils.scm (argon2)[source]: Create pkg-config file.
> [arguments]: Install it.
> ---
>  gnu/packages/password-utils.scm | 26 +++++++++++++++++++++++++-
>  1 file changed, 25 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
> index 7288da6..f62d041 100644
> --- a/gnu/packages/password-utils.scm
> +++ b/gnu/packages/password-utils.scm
> @@ -311,6 +311,21 @@ through the pass command.")
>           "https://codeload.github.com/P-H-C/phc-winner-"
>           name "/tar.gz/" version))
>         (file-name (string-append name "-" version ".tar.gz"))
> +       (snippet
> +        '(let ((p (open-file "argon2.pc" "w")))
> +           (begin
> +             (display
> +              (string-append "prefix=/usr/local\n"
> +                             "exec_prefix=${prefix}\n"
> +                             "includedir=${prefix}/include\n"
> +                             "libdir=${prefix}/lib\n\n"
> +                             "Name: Argon2\n"
> +                             "Description: "
> +                             "The Argon2 password hashing algorithm\n"
> +                             "Version: 1.0.0\n"
> +                             "Cflags: -I${includedir}/\n"
> +                             "Libs: -L${libdir} -largon2\n") p)
> +             (close-output-port p))))

As Danny suggested, this should be discussed upstream.  What’s the
status of this .pc file upstream?  I’m reluctant to start relying on it
if there’s no sign that it will eventually be provided by upstream.

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [Patch 6/10] telephony: Add license prefix.
  2016-09-13  2:28 ` [Patch 6/10] telephony: Add license prefix Lukas Gradl
  2016-09-15 21:25   ` Danny Milosavljevic
@ 2016-09-28  9:25   ` Ludovic Courtès
  1 sibling, 0 replies; 47+ messages in thread
From: Ludovic Courtès @ 2016-09-28  9:25 UTC (permalink / raw)
  To: Lukas Gradl; +Cc: guix-devel

Lukas Gradl <lgradl@openmailbox.org> skribis:

> From 630ad1d1d15131bb62eafe4afb842e5fa2fc5675 Mon Sep 17 00:00:00 2001
> From: Lukas Gradl <lgradl@openmailbox.org>
> Date: Sun, 28 Aug 2016 12:40:21 -0500
> Subject: [PATCH 06/10] gnu: telephony: Add 'license:' prefix.
>
> * gnu/packages/telephony.scm (commoncpp) [license]: Add prefix.
> (ucommon) [license]: Add prefix.
> (ccrtp) [license]: Add prefix.
> (osip) [license]: Add prefix.
> (exosip) [license]: Add prefix.
> (sipwitch) [license]: Add prefix.
> (libsrtp) [license]: Add prefix.
> (libiax2) [license]: Add prefix.
> (seren) [license]: Add prefix.
> (pjproject-sfl) [license]: Add prefix.

Applied, thanks!

Ludo'.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [Patch 7/10] opendht: Propagate msgpack.
  2016-09-13  2:29 ` [Patch 7/10] opendht: Propagate msgpack Lukas Gradl
@ 2016-09-28  9:48   ` Ludovic Courtès
  0 siblings, 0 replies; 47+ messages in thread
From: Ludovic Courtès @ 2016-09-28  9:48 UTC (permalink / raw)
  To: Lukas Gradl; +Cc: guix-devel

Lukas Gradl <lgradl@openmailbox.org> skribis:

> From b611f29c422cfa69c90f437c40fcbee47a77f839 Mon Sep 17 00:00:00 2001
> From: Lukas Gradl <lgradl@openmailbox.org>
> Date: Sun, 11 Sep 2016 22:32:50 -0500
> Subject: [PATCH 07/10] gnu: opendht: Propagate msgpack.
>
> * gnu/packages/crypto.scm (opendht)[inputs]: Remove msgpack.
> [propagated-inputs]: Add it.

Applied, thanks!

Ludo'.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: GNOME Settings Schemas - How are they searched for?
  2016-09-25 23:35       ` GNOME Settings Schemas - How are they searched for? Danny Milosavljevic
@ 2016-10-23 15:36         ` Pjotr Prins
  0 siblings, 0 replies; 47+ messages in thread
From: Pjotr Prins @ 2016-10-23 15:36 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

On Mon, Sep 26, 2016 at 01:35:04AM +0200, Danny Milosavljevic wrote:
> > (gnome-ring:711): GLib-GIO-ERROR **: Settings schema 'org.gnome.Evolution.DefaultSources' is not installed
> > (gnome-calendar:6793): GLib-GIO-ERROR **: Settings schema 'org.gnome.shell.calendar' is not installed
> > ** (process:6859): WARNING **: Failed to access calendar configuration: Error calling StartServiceByName for org.gnome.evolution.dataserver.Sources
> > (gnome-calendar:6859): GLib-GIO-ERROR **: Settings schema 'org.gnome.shell.calendar' is not installed
> 
> Hmmm... I don't use GNOME - so no idea. I have to defer to people more knowledgeable about it. How does a GNOME program find other program's settings schemas in Guix? Also it seems it's trying to use dbus (?) in order to start the evolution data server. How is that searched for?

I am hitting a similar problem with gnumeric. Install latest, open
spreadsheet, hit 'safe as' and you get:

(gnumeric:1974): GLib-GIO-ERROR **: Settings schema 'org.gtk.Settings.FileChooser' is not installed

(bit annoying as some work got lost) but easy to reproduce.

This issue suggests a solution:

  http://stackoverflow.com/questions/9678301/can-not-use-gtk3-filechooser-on-mac-osx#9684626

i.e., the builder needs to run glib-compile-schemas [path to
org.gtk.Settings.FileChooser.gschema]. There is a compiled schema in
the path, but maybe not for FileChooser and others.

Pj.
-- 

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [Patch 0/10] Add Ring
  2016-09-13  2:22 [Patch 0/10] Add Ring Lukas Gradl
                   ` (9 preceding siblings ...)
  2016-09-13  2:31 ` [Patch 10/10] Add ring-client-gnome Lukas Gradl
@ 2016-11-05  4:59 ` Chris Marusich
  2016-11-09 18:07   ` Lukas Gradl
  10 siblings, 1 reply; 47+ messages in thread
From: Chris Marusich @ 2016-11-05  4:59 UTC (permalink / raw)
  To: Lukas Gradl; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 762 bytes --]

Lukas Gradl <lgradl@openmailbox.org> writes:

> Hello Guix!
>
> The following patch series adds Ring, a distributed multimedia
> communications program.
>
> There is one issue that I can not figure out: The program ring.cx throws
> an error if evolution-data-server is not installed in the same profile.
> I hence propagated evolution-data-server, but this does not seem to
> solve the issue.  If evolution-data-server is installed, it works fine.
>
> Thank you for any feedback!
>
> Best,
> Lukas

What's the status of this patch series?  Especially since Ring just
recently became an official GNU package [1], it would be super nice to
have it in GNU Guix!

[1] https://lists.gnu.org/archive/html/ring/2016-11/msg00004.html

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [Patch 1/10] Add pjproject.
  2016-09-26  6:41         ` Lukas Gradl
@ 2016-11-05 22:25           ` Ricardo Wurmus
  2016-11-05 22:49             ` Mathieu Lirzin
  0 siblings, 1 reply; 47+ messages in thread
From: Ricardo Wurmus @ 2016-11-05 22:25 UTC (permalink / raw)
  To: Lukas Gradl; +Cc: guix-devel


Hi Lukas,

> Sorry for the delay!

Likewise! :)

> Ricardo Wurmus <rekado@elephly.net> writes:
>>> My idea here is the following:  The source tree downloaded here contains
>>> the complete source for libring, which includes the patches to
>>> pjproject.  In this snippet I try to get rid of all the other libring
>>> files that are not needed and only keep the patches to pjproject.  Then
>>> I try to make the directory tree that contains these patches as shallow
>>> as possible.  I remember I had some problems with copying them to "."
>>> but trying again now it works.  I attached an updated patch that does
>>> this.
>>
>> Is there no release that includes these patches?  Why do we have to
>> apply them ourselves?  In Guix we try to avoid patching upstream sources
>> with functional patches (as opposed to patches that fix problems with
>> building the software on Guix), as this is really upstream’s work.
>
> There is no release that I know of that contains these patches.  The
> Ring project ships a Makefile in the 'contrib' directory of the
> 'libring' source tree that downloads the upstream Pjproject source
> and applies these very same patches to it.  It then continues to build a
> bundled version of pjproject + patches.
>
>> Is this really pjproject version 2.4 when we apply a massive patch set
>> like that?
>
> It is not.  It is a fork of pjproject that introduces several functional
> changes, the most notable one being the use of GnuTLS instead of
> OpenSSL.  I suspect the Ring project's motivation for doing this are at
> least in part legal issues as the OpenSSL license seems to be
> incompatible with the GPL according to
> "http://www.gnu.org/licenses/license-list.html".  I don't know if there
> are technical benefits of using one over the other.
>
> I tried to denote the fact that this is a fork of pjproject by naming
> the variable 'pjproject-sfl' instead of just 'pjproject'.  I could go
> further and make it local to the definition of libring or change the
> name of the package?

Thanks for the explanations!

I think it would be better to change the name to “pjproject-sfl” as
well.  Not sure about what to do about the version number, because it
clearly isn’t the same as upstream “pjproject”.

I still think that the definition of “sfl-patches” is particularly
ugly.  Considering that you actually get the very same sources for the
“libring” package and “pjproject-sfl” is only used by “libring” (please
correct me if I’m wrong), I think it’s not pretty to take the sources
and delete everything but the patches.  In this case I think it may be
better to merge the definitions of “pjproject” and “libring”.

It seems to me that much of what is now “pjproject” (e.g. the snippet to
leave only the patches, the extra build phases, etc) would no longer be
needed when building “pjproject” as part of “libring”.  Merging the two
might make this all a lot clearer.

What do you think?

~~ Ricardo


PS: for future reference, this

(lambda (file)
 (if (or (string=? file ".")
         (string=? file ".."))
 #f
 #t))

could more concisely be written as

(cute (not (or (string=? <> ".")
               (string=? <> ".."))))

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [Patch 8/10] Add libring.
  2016-09-13  2:30 ` [Patch 8/10] Add libring Lukas Gradl
@ 2016-11-05 22:30   ` Ricardo Wurmus
  0 siblings, 0 replies; 47+ messages in thread
From: Ricardo Wurmus @ 2016-11-05 22:30 UTC (permalink / raw)
  To: Lukas Gradl; +Cc: guix-devel


Lukas Gradl <lgradl@openmailbox.org> writes:

> From ad9397f36c7d4e8797c38a838f27079b8ba32631 Mon Sep 17 00:00:00 2001
> From: Lukas Gradl <lgradl@openmailbox.org>
> Date: Sun, 28 Aug 2016 12:26:23 -0500
> Subject: [PATCH 08/10] gnu: Add libring.

> * gnu/packages/telephony.scm (libring): New variable.
> ---
>  gnu/packages/telephony.scm | 94 ++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 94 insertions(+)

> diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
> index bd849d6..96b7489 100644
> --- a/gnu/packages/telephony.scm
> +++ b/gnu/packages/telephony.scm
> @@ -25,12 +25,24 @@
>    #:use-module (gnu packages)
>    #:use-module (gnu packages audio)
>    #:use-module (gnu packages autotools)
> +  #:use-module (gnu packages base)
> +  #:use-module (gnu packages boost)
> +  #:use-module (gnu packages check)
> +  #:use-module (gnu packages compression)
> +  #:use-module (gnu packages crypto)
> +  #:use-module (gnu packages glib)
>    #:use-module (gnu packages gnupg)
> +  #:use-module (gnu packages libupnp)
>    #:use-module (gnu packages linux)
>    #:use-module (gnu packages multiprecision)
>    #:use-module (gnu packages ncurses)
> +  #:use-module (gnu packages perl)
> +  #:use-module (gnu packages pcre)
>    #:use-module (gnu packages pkg-config)
> +  #:use-module (gnu packages pulseaudio)
> +  #:use-module (gnu packages serialization)
>    #:use-module (gnu packages tls)
> +  #:use-module (gnu packages video)
>    #:use-module (gnu packages xiph)
>    #:use-module ((guix licenses) #:prefix license:)
>    #:use-module (guix packages)
> @@ -469,3 +481,85 @@
>                   license:gpl3+ ; sfl-patches
>                   license:lgpl2+))))) ; bundled resample
 
> --

What’s with these dashes?

> +(define-public libring
> +  (let ((commit "41e032c81a9cdef457d2ead3767abbd6bcee2a16")) ; This is the
> +                                        ; commit used by the AUR package.

Is there another reason why we should use this commit?  I don’t think
it’s a *good* reason :) 

> +    (package
> +      (name "libring")
> +      (version (string-append "2.2.0-1." (string-take commit 7)))
> +      (source
> +       (origin
> +         (method git-fetch)
> +         (uri (git-reference
> +               (url
> +                "https://gerrit-ring.savoirfairelinux.com/ring-daemon.git")
> +               (commit commit)))
> +         (file-name (string-append name "-" version "-checkout"))
> +         (modules '((guix build utils)))
> +         (snippet
> +          '(begin
> +             (delete-file-recursively "contrib")
> +             (substitute* "src/media/video/video_scaler.cpp"
> +               ; Fix compatability with recent versions of ffmpeg:
> +               (("PIX_FMT_RGB") "AV_PIX_FMT_FLAG_RGB")
> +               (("PIX_FMT_PLANAR") "AV_PIX_FMT_FLAG_PLANAR"))
> +             (substitute* "src/media/video/video_input.h"
> +               (("#include \"threadloop.h\"")
> +                (string-append "#include \"threadloop.h\"\n"
> +                               "#include \"video/video_base.h\"")))))
> +         (sha256
> +          (base32
> +           "05jqmbihn45pajbyvbb45l1084kr285p23mmmncvqcvdzzw87437"))))
> +      (build-system gnu-build-system)
> +      (inputs
> +       `(("alsa-lib" ,alsa-lib)
> +         ("boost" ,boost)
> +         ("dbus-c++" ,dbus-c++)
> +         ("eudev" ,eudev)
> +         ("ffmpeg" ,ffmpeg)
> +         ("flac" ,flac)
> +         ("gmp" ,gmp)
> +         ("gsm" ,gsm)
> +         ("jack" ,jack-1)
> +         ("jsoncpp" ,jsoncpp)
> +         ("libogg" ,libogg)
> +         ("opendht" ,opendht)
> +         ("opus" ,opus)
> +         ("pcre" ,pcre)
> +         ("pjproject" ,pjproject-sfl)

See my other email about “pjproject”.

> +         ("pulseaudio" ,pulseaudio)
> +         ("libsamplerate" ,libsamplerate)
> +         ("libsndfile" ,libsndfile)
> +         ("speex" ,speex)
> +         ("libupnp" ,libupnp)
> +         ("libvorbis" ,libvorbis)
> +         ("libx264" ,libx264)
> +         ("yaml-cpp" ,yaml-cpp)
> +         ("zlib" ,zlib)))
> +      (native-inputs
> +       `(("autoconf" ,autoconf)
> +         ("pkg-config" ,pkg-config)
> +         ("automake" ,automake)
> +         ("libtool" ,libtool)

We can do without these native-inputs if we take the latest release, right?

> +         ("cppunit" ,cppunit)
> +         ("perl" ,perl))) ; Needed for documentation.
> +      (arguments
> +       `(#:tests? #f ; The tests fail to compile due to missing
> headers.

Is this fixable?

> +         #:phases
> +         (modify-phases %standard-phases
> +           (add-before 'configure 'autoconf
> +             (lambda _
> +               (zero? (system* "autoreconf" "-vfi"))))
> +           (add-before 'build 'add-lib-dir
> +             (lambda _
> +               (zero? (system* "mkdir" "src/lib")))))))

Please use “(lambda _ (mkdir-p "src/lib") #t)” instead.

> +      (synopsis "Distributed multimedia communications platform")
> +      (description "Ring is a secure and distributed voice, video and chat
> +communication platform that requires no centralized server and leaves the
> +power of privacy in the hands of the user.  It supports the SIP and IAX
> +protocols, as well as decentralized calling using P2P-DHT.
> +
> +This package provides a library and daemon implementing the Ring core functionality.")

The last line is a bit long, please break it.

> +      (home-page "https://ring.cx/")
> +      (license license:gpl3+))))
> +
> 2.9.0

Thanks for this patch!  This must have been a lot of work.  Do you think
you could update this patch under consideration of my comments in this
and the other email about “pjproject”?

~~ Ricardo

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [Patch 1/10] Add pjproject.
  2016-11-05 22:25           ` Ricardo Wurmus
@ 2016-11-05 22:49             ` Mathieu Lirzin
  2016-11-05 22:54               ` Ricardo Wurmus
  0 siblings, 1 reply; 47+ messages in thread
From: Mathieu Lirzin @ 2016-11-05 22:49 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Hi,

Ricardo Wurmus <rekado@elephly.net> writes:

> PS: for future reference, this
>
> (lambda (file)
>  (if (or (string=? file ".")
>          (string=? file ".."))
>  #f
>  #t))
>
> could more concisely be written as
>
> (cute (not (or (string=? <> ".")
>                (string=? <> ".."))))

I think you mean something like this instead:

(lambda (file)
  (not (or (string=? file ".")
           (string=? file ".."))))

Did I miss something?

-- 
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [Patch 1/10] Add pjproject.
  2016-11-05 22:49             ` Mathieu Lirzin
@ 2016-11-05 22:54               ` Ricardo Wurmus
  0 siblings, 0 replies; 47+ messages in thread
From: Ricardo Wurmus @ 2016-11-05 22:54 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel


Mathieu Lirzin <mthl@gnu.org> writes:

> Hi,
>
> Ricardo Wurmus <rekado@elephly.net> writes:
>
>> PS: for future reference, this
>>
>> (lambda (file)
>>  (if (or (string=? file ".")
>>          (string=? file ".."))
>>  #f
>>  #t))
>>
>> could more concisely be written as
>>
>> (cute (not (or (string=? <> ".")
>>                (string=? <> ".."))))
>
> I think you mean something like this instead:
>
> (lambda (file)
>   (not (or (string=? file ".")
>            (string=? file ".."))))
>
> Did I miss something?

No, *I* did :) I mixed up two things and didn’t check before sending.
Thanks for the correction.

~~ Ricardo

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [Patch 0/10] Add Ring
  2016-11-05  4:59 ` [Patch 0/10] Add Ring Chris Marusich
@ 2016-11-09 18:07   ` Lukas Gradl
  2016-11-09 22:43     ` Leo Famulari
  2016-11-13  0:52     ` Mike Gerwitz
  0 siblings, 2 replies; 47+ messages in thread
From: Lukas Gradl @ 2016-11-09 18:07 UTC (permalink / raw)
  To: Chris Marusich; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1080 bytes --]


Hello,

I would like to apologize for my long silence.  I am currently facing
somewhat of a crisis in my professional life, which is taking a lot of
my time and energy.

Chris Marusich <cmmarusich@gmail.com> writes:

> What's the status of this patch series?  Especially since Ring just
> recently became an official GNU package [1], it would be super nice to
> have it in GNU Guix!
>
> [1] https://lists.gnu.org/archive/html/ring/2016-11/msg00004.html

I agree this is very exciting.  Unfortunately, I am afraid that I will
not have the time to finish this patch series in the near future.  I
have been working on this in my spare time which I have to dedicate to
other purposes right now.  I am very sorry about this.

If anyone would like to work on this patch series, please feel free to
claim it as your own. I hope my work will be of some use.  If nobody
picks it up, I will be very happy to come back to it, but that will most
likely not happen within the next two months.

I am sorry to tell you this only now, I should have come forward with
this earlier.

Best,
Lukas


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [Patch 0/10] Add Ring
  2016-11-09 18:07   ` Lukas Gradl
@ 2016-11-09 22:43     ` Leo Famulari
  2016-11-12 23:39       ` Lukas Gradl
  2016-11-13  0:52     ` Mike Gerwitz
  1 sibling, 1 reply; 47+ messages in thread
From: Leo Famulari @ 2016-11-09 22:43 UTC (permalink / raw)
  To: Lukas Gradl; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1457 bytes --]

On Wed, Nov 09, 2016 at 12:07:10PM -0600, Lukas Gradl wrote:
> I would like to apologize for my long silence.  I am currently facing
> somewhat of a crisis in my professional life, which is taking a lot of
> my time and energy.
> 
> Chris Marusich <cmmarusich@gmail.com> writes:
> 
> > What's the status of this patch series?  Especially since Ring just
> > recently became an official GNU package [1], it would be super nice to
> > have it in GNU Guix!
> >
> > [1] https://lists.gnu.org/archive/html/ring/2016-11/msg00004.html
> 
> I agree this is very exciting.  Unfortunately, I am afraid that I will
> not have the time to finish this patch series in the near future.  I
> have been working on this in my spare time which I have to dedicate to
> other purposes right now.  I am very sorry about this.
> 
> If anyone would like to work on this patch series, please feel free to
> claim it as your own. I hope my work will be of some use.  If nobody
> picks it up, I will be very happy to come back to it, but that will most
> likely not happen within the next two months.
> 
> I am sorry to tell you this only now, I should have come forward with
> this earlier.

Hi Lukas, there's really no need to apologize. We are happy for any help
we can get :)

I'm sure somebody will be happy to pick this up! Thank you for your work
so far!

I wish you good luck and I hope to see you again when you have more free
time.

Leo

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [Patch 0/10] Add Ring
  2016-11-09 22:43     ` Leo Famulari
@ 2016-11-12 23:39       ` Lukas Gradl
  0 siblings, 0 replies; 47+ messages in thread
From: Lukas Gradl @ 2016-11-12 23:39 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1651 bytes --]

Leo Famulari <leo@famulari.name> writes:

> On Wed, Nov 09, 2016 at 12:07:10PM -0600, Lukas Gradl wrote:
>> I would like to apologize for my long silence.  I am currently facing
>> somewhat of a crisis in my professional life, which is taking a lot of
>> my time and energy.
>> 
>> Chris Marusich <cmmarusich@gmail.com> writes:
>> 
>> > What's the status of this patch series?  Especially since Ring just
>> > recently became an official GNU package [1], it would be super nice to
>> > have it in GNU Guix!
>> >
>> > [1] https://lists.gnu.org/archive/html/ring/2016-11/msg00004.html
>> 
>> I agree this is very exciting.  Unfortunately, I am afraid that I will
>> not have the time to finish this patch series in the near future.  I
>> have been working on this in my spare time which I have to dedicate to
>> other purposes right now.  I am very sorry about this.
>> 
>> If anyone would like to work on this patch series, please feel free to
>> claim it as your own. I hope my work will be of some use.  If nobody
>> picks it up, I will be very happy to come back to it, but that will most
>> likely not happen within the next two months.
>> 
>> I am sorry to tell you this only now, I should have come forward with
>> this earlier.
>
> Hi Lukas, there's really no need to apologize. We are happy for any help
> we can get :)
>
> I'm sure somebody will be happy to pick this up! Thank you for your work
> so far!
>
> I wish you good luck and I hope to see you again when you have more free
> time.

Thank you, Leo!  I like the Guix project and its community and will
definitely be back.

All the best,
Lukas

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [Patch 0/10] Add Ring
  2016-11-09 18:07   ` Lukas Gradl
  2016-11-09 22:43     ` Leo Famulari
@ 2016-11-13  0:52     ` Mike Gerwitz
  2016-11-13 21:00       ` Lukas Gradl
  1 sibling, 1 reply; 47+ messages in thread
From: Mike Gerwitz @ 2016-11-13  0:52 UTC (permalink / raw)
  To: Lukas Gradl; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 835 bytes --]

On Wed, Nov 09, 2016 at 12:07:10 -0600, Lukas Gradl wrote:
> If anyone would like to work on this patch series, please feel free to
> claim it as your own. I hope my work will be of some use.  If nobody
> picks it up, I will be very happy to come back to it, but that will most
> likely not happen within the next two months.

With that in mind, as part of the evaluation, the Ring team agreed to
create a build system that conforms to GNU standards.  They're likely to
wrap their CMake system, but hopefully this change will make it easier
to package in the future.

I don't know the timeline, though.

-- 
Mike Gerwitz
Free Software Hacker+Activist | GNU Maintainer & Volunteer
GPG: D6E9 B930 028A 6C38 F43B  2388 FEF6 3574 5E6F 6D05
Old: 2217 5B02 E626 BC98 D7C0  C2E5 F22B B815 8EE3 0EAB
https://mikegerwitz.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [Patch 0/10] Add Ring
  2016-11-13  0:52     ` Mike Gerwitz
@ 2016-11-13 21:00       ` Lukas Gradl
  0 siblings, 0 replies; 47+ messages in thread
From: Lukas Gradl @ 2016-11-13 21:00 UTC (permalink / raw)
  To: Mike Gerwitz; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 821 bytes --]

Mike Gerwitz <mtg@gnu.org> writes:

> On Wed, Nov 09, 2016 at 12:07:10 -0600, Lukas Gradl wrote:
>> If anyone would like to work on this patch series, please feel free to
>> claim it as your own. I hope my work will be of some use.  If nobody
>> picks it up, I will be very happy to come back to it, but that will most
>> likely not happen within the next two months.
>
> With that in mind, as part of the evaluation, the Ring team agreed to
> create a build system that conforms to GNU standards.  They're likely to
> wrap their CMake system, but hopefully this change will make it easier
> to package in the future.
>
> I don't know the timeline, though.

There were some issues with the build system and the organization of the
source code that I initially struggled with.  I think this is very good
news.

Thank you!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2016-11-13 21:01 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-13  2:22 [Patch 0/10] Add Ring Lukas Gradl
2016-09-13  2:23 ` [Patch 1/10] Add pjproject Lukas Gradl
2016-09-19  7:41   ` Ricardo Wurmus
2016-09-20  5:39     ` Lukas Gradl
2016-09-22  2:46       ` Ricardo Wurmus
2016-09-26  6:41         ` Lukas Gradl
2016-11-05 22:25           ` Ricardo Wurmus
2016-11-05 22:49             ` Mathieu Lirzin
2016-11-05 22:54               ` Ricardo Wurmus
2016-09-13  2:24 ` [Patch 2/10] Add dbus-c++ Lukas Gradl
2016-09-28  9:09   ` Ludovic Courtès
2016-09-13  2:25 ` [Patch 3/10] Add gsm Lukas Gradl
2016-09-28  9:16   ` Ludovic Courtès
2016-09-13  2:26 ` [Patch 4/10] argon2: Install pkg-config file Lukas Gradl
2016-09-15 21:24   ` Danny Milosavljevic
2016-09-17 16:47     ` Lukas Gradl
2016-09-18 21:32       ` Lukas Gradl
2016-09-18 21:43     ` Lukas Gradl
2016-09-19 19:15       ` Danny Milosavljevic
2016-09-25 22:45         ` Lukas Gradl
2016-09-25 23:13           ` Danny Milosavljevic
2016-09-25 23:32             ` Lukas Gradl
2016-09-28  9:18               ` Ludovic Courtès
2016-09-13  2:27 ` [Patch 5/10] opendht: Propagate argon2 Lukas Gradl
2016-09-25 22:54   ` Lukas Gradl
2016-09-25 23:24     ` Danny Milosavljevic
2016-09-25 23:43       ` Lukas Gradl
2016-09-13  2:28 ` [Patch 6/10] telephony: Add license prefix Lukas Gradl
2016-09-15 21:25   ` Danny Milosavljevic
2016-09-28  9:25   ` Ludovic Courtès
2016-09-13  2:29 ` [Patch 7/10] opendht: Propagate msgpack Lukas Gradl
2016-09-28  9:48   ` Ludovic Courtès
2016-09-13  2:30 ` [Patch 8/10] Add libring Lukas Gradl
2016-11-05 22:30   ` Ricardo Wurmus
2016-09-13  2:30 ` [Patch 9/10] Add libringclient Lukas Gradl
2016-09-13  2:31 ` [Patch 10/10] Add ring-client-gnome Lukas Gradl
2016-09-15 21:27   ` Danny Milosavljevic
2016-09-17 16:38     ` Lukas Gradl
2016-09-25 23:23       ` Lukas Gradl
2016-09-25 23:35       ` GNOME Settings Schemas - How are they searched for? Danny Milosavljevic
2016-10-23 15:36         ` Pjotr Prins
2016-11-05  4:59 ` [Patch 0/10] Add Ring Chris Marusich
2016-11-09 18:07   ` Lukas Gradl
2016-11-09 22:43     ` Leo Famulari
2016-11-12 23:39       ` Lukas Gradl
2016-11-13  0:52     ` Mike Gerwitz
2016-11-13 21:00       ` Lukas Gradl

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).