From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id kH61Mb/PrF7hEgAA0tVLHw (envelope-from ) for ; Sat, 02 May 2020 01:41:19 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id qOaxBcnPrF5JPAAA1q6Kng (envelope-from ) for ; Sat, 02 May 2020 01:41:29 +0000 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DB907942283 for ; Sat, 2 May 2020 01:41:27 +0000 (UTC) Received: from localhost ([::1]:39884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUguv-00083d-Mw for larch@yhetil.org; Fri, 01 May 2020 21:26:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51618) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jUgur-00083J-2f for guix-patches@gnu.org; Fri, 01 May 2020 21:26:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUguq-0001Mb-5b for guix-patches@gnu.org; Fri, 01 May 2020 21:26:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39419) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jUgup-0001Jo-P3 for guix-patches@gnu.org; Fri, 01 May 2020 21:26:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jUguo-0005Br-Mh for guix-patches@gnu.org; Fri, 01 May 2020 21:26:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#40677] [PATCH V3 03/15] gnu: jami.scm: Add and use a generalized procedure for applying patches to Jami dependencies. Resent-From: Jan Wielkiewicz Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 02 May 2020 01:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40677 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 40677@debbugs.gnu.org Cc: Jan Wielkiewicz Received: via spool by 40677-submit@debbugs.gnu.org id=B40677.158838275119903 (code B ref 40677); Sat, 02 May 2020 01:26:02 +0000 Received: (at 40677) by debbugs.gnu.org; 2 May 2020 01:25:51 +0000 Received: from localhost ([127.0.0.1]:50957 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUgud-0005Ax-As for submit@debbugs.gnu.org; Fri, 01 May 2020 21:25:51 -0400 Received: from smtpo.poczta.interia.pl ([217.74.65.208]:60057) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUgub-0005AU-QV for 40677@debbugs.gnu.org; Fri, 01 May 2020 21:25:50 -0400 X-Interia-R: Interia X-Interia-R-IP: 89.64.43.193 X-Interia-R-Helo: Received: from localhost.localdomain (89-64-43-193.dynamic.chello.pl [89.64.43.193]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by poczta.interia.pl (INTERIA.PL) with ESMTPSA; Sat, 2 May 2020 03:15:08 +0200 (CEST) From: Jan Wielkiewicz Date: Sat, 2 May 2020 03:14:38 +0200 Message-Id: <20200502011450.2676-4-tona_kosmicznego_smiecia@interia.pl> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200502011450.2676-1-tona_kosmicznego_smiecia@interia.pl> References: <20200502011450.2676-1-tona_kosmicznego_smiecia@interia.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Interia-Antivirus: OK DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=interia.pl; s=biztos; t=1588382108; bh=UikJsVFZi46/AspPWJWGpBYneNM/e2ltIMyUFoN1Yzc=; h=X-Interia-R:X-Interia-R-IP:X-Interia-R-Helo:From:To:Cc:Subject: Date:Message-Id:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Interia-Antivirus; b=DYjlI41n917HlYkuB0gedyMQ1hkn51TgHQ3AKx6tTI4O+pMMdfHIWdfXpWo/rkdAY x9HVpwtaxodVJgin3hlfDL70yT3MpyR63aKOEmO0srMs5jcDKN3U3sJC7S6M+rz/sN mURcx/pS1ullcXw1cev/uPhUf6eIFiY1JKGDRhZ0= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Spam: Yes Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=interia.pl header.s=biztos header.b=DYjlI41n; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Scan-Result: default: False [8.29 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.49472007571327]; GREYLIST(0.00)[pass,body]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(0.00)[+ip6:2001:470:142::/48:c]; R_DKIM_REJECT(1.00)[interia.pl:s=biztos]; DWL_DNSWL_FAIL(0.00)[2001:470:142::17:server fail]; FREEMAIL_FROM(0.00)[interia.pl]; BROKEN_CONTENT_TYPE(1.50)[]; R_MISSING_CHARSET(2.50)[]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.16), country: US(-0.00), ip: 2001:470:142::17(-0.49)]; DKIM_TRACE(0.00)[interia.pl:-]; RCPT_COUNT_TWO(0.00)[2]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[89.64.43.193:received]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:22989, ipnet:2001:470:142::/48, country:US]; TAGGED_FROM(0.00)[larch=yhetil.org]; FROM_NEQ_ENVFROM(0.00)[tona_kosmicznego_smiecia@interia.pl,guix-patches-bounces@gnu.org]; ARC_NA(0.00)[]; RECEIVED_SPAMHAUS_XBL(3.00)[89.64.43.193:received]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[interia.pl]; HAS_LIST_UNSUB(-0.01)[]; DNSWL_BLOCKED(0.00)[2001:470:142::17:from]; BAD_REP_POLICIES(0.10)[]; MID_CONTAINS_FROM(1.00)[]; FREEMAIL_CC(0.00)[interia.pl]; RCVD_COUNT_SEVEN(0.00)[9]; FORGED_SENDER_MAILLIST(0.00)[] X-Scanner: scn0 X-Spam-Score: 8.29 X-TUID: cZxAsYARX5fF * gnu/packages/jami.scm (jami-apply-dependency-patches): Add procedure. (pjproject-jami)[arguments]: Use it. Remove the old one. [native-inputs]: Rename the source to sfl-patches in order to satisfy the procedure. --- gnu/packages/jami.scm | 80 ++++++++++++++++++++++++------------------- 1 file changed, 45 insertions(+), 35 deletions(-) diff --git a/gnu/packages/jami.scm b/gnu/packages/jami.scm index 44a57c9bfb..2bee3ac143 100644 --- a/gnu/packages/jami.scm +++ b/gnu/packages/jami.scm @@ -77,12 +77,31 @@ (base32 "0kw172w2ccyz438kf5xqw14nhfm4xk6a2libnzib9j2wvhlpf4q0")))) +;; Savoir-Faire Linux modifies many libraries to add features +;; to Jami. This procedure makes applying patches to a given +;; package easy. +(define jami-apply-dependency-patches + '(lambda* (#:key inputs dep-name patches) + (let ((patches-directory "sfl-patches")) + (mkdir-p patches-directory) + (invoke "tar" "-xvf" (assoc-ref inputs "sfl-patches") + "-C" 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 patches-directory "/" + file ".patch"))) + patches)))) + (define-public pjproject-jami (package (inherit pjproject) (name "pjproject-jami") (native-inputs - `(("savoir-faire-linux-patches" ,(jami-source)) + `(("sfl-patches" ,(jami-source)) ,@(package-native-inputs pjproject))) (arguments `(#:tests? #f @@ -124,40 +143,31 @@ #t)) (add-after 'unpack 'apply-patches (lambda* (#:key inputs #:allow-other-keys) - (let ((savoir-faire-linux-patches-directory "Savoir-faire Linux patches") - ;; Comes from - ;; "ring-project/daemon/contrib/src/pjproject/rules.mak". - ;; WARNING: These amount for huge changes in pjproject. - (savoir-faire-linux-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" - ;; "uwp_vs" ; for windows - "disable_local_resolution"))) - (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" - "ring-project/daemon/contrib/src/pjproject") - (for-each - (lambda (file) - (invoke "patch" "--force" "-p1" "-i" - (string-append savoir-faire-linux-patches-directory "/" - file ".patch"))) - savoir-faire-linux-patches)) - #t)) + (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.26.2