Subject: bug#38979: closed (Closing the broken patch)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 06 Jan 2020 18:28:07 +0000

Your bug report

#38979: [PATCH 07/22] gnu: jami: Fix the procedure for applying patches. Use the procedure correctly in pjproject-jami.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
38979: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=38979
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Closing the broken patch
From: Jan <[email-masked]>
To: [email-masked]
Date: Mon, 6 Jan 2020 19:08:09 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

I broke the whole patch series, sorry, hope this solves everything.
I got smtp error and thought patches didn't send.

Jan Wielkiewicz

Subject: [PATCH 07/22] gnu: jami: Fix the procedure for applying patches. Use the procedure correctly in pjproject-jami.
From: Jan Wielkiewicz <[email-masked]>
To: [email-masked]
Cc: Jan Wielkiewicz <[email-masked]>
Date: Mon, 6 Jan 2020 02:11:37 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

---
 gnu/packages/jami.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/jami.scm b/gnu/packages/jami.scm
index c6f38d4a8c..f257767a85 100644
--- a/gnu/packages/jami.scm
+++ b/gnu/packages/jami.scm
@@ -58,6 +58,22 @@
   #:use-module (guix download)
   #:use-module (guix git-download))
 
+(define-public jami-apply-dependency-patches
+  '(lambda* (#:key inputs dep-name patches)
+	    (let ((savoir-faire-linux-patches-directory "Savoir-faire Linux patches"))
+	      (mkdir-p savoir-faire-linux-patches-directory)
+	      (invoke "tar" "-xvf" (assoc-ref inputs "savoir-faire-linux-patches")
+				  "-C" savoir-faire-linux-patches-directory
+				  "--strip-components=5"
+				  (string-append "ring-project/daemon/contrib/src/"
+						 dep-name))
+	      (for-each
+       (lambda (file)
+	 (invoke "patch" "--force" "-p1" "-i"
+			     (string-append savoir-faire-linux-patches-directory "/"
+					    file ".patch")))
+       patches))))
+
 (define %jami-version "20191128.1.4c44bb7")
 
 (define* (jami-source #:key without-daemon)
@@ -115,6 +131,8 @@
              ;;   making a shared object;
              "CFLAGS=-fPIC"
              "CXXFLAGS=-fPIC")
+       #:modules ((guix build utils)
+		  ,@(@@ (guix build-system gnu) %default-modules))
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'make-git-checkout-writable
@@ -157,6 +175,31 @@
                                          file ".patch")))
                 savoir-faire-linux-patches))
              #t))
+		    (lambda* (#:key inputs #:allow-other-keys)
+			     (let ((jami-apply-dependency-patches ,jami-apply-dependency-patches))
+			       ;; Comes from
+			       ;; "ring-project/daemon/contrib/src/pjproject/rules.mak".
+			       ;; WARNING: These amount for huge changes in pjproject.
+			       (jami-apply-dependency-patches #:inputs inputs
+							      #:dep-name "pjproject"
+							      #:patches
+							      '("fix_turn_alloc_failure"
+								"rfc2466"
+								"ipv6"
+								"multiple_listeners"
+								"pj_ice_sess"
+								"fix_turn_fallback"
+								"fix_ioqueue_ipv6_sendto"
+								"add_dtls_transport"
+								"rfc6544"
+								"ice_config"
+								"sip_config"
+								"fix_first_packet_turn_tcp"
+								"fix_ebusy_turn"
+								"ignore_ipv6_on_transport_check"
+								"fix_turn_connection_failure"
+								"disable_local_resolution"))
+			       #t))
          ;; TODO: We could use substitute-keyword-arguments instead of
          ;; repeating the phases from pjproject, but somehow it does
          ;; not work.
-- 
2.24.1