From patchwork Tue Jul 19 15:27:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Antero Mejr X-Patchwork-Id: 3790 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 48ED827BBE9; Tue, 19 Jul 2022 16:35:07 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id AA63027BBEA for ; Tue, 19 Jul 2022 16:35:06 +0100 (BST) Received: from localhost ([::1]:52784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oDpFZ-0007wd-QD for patchwork@mira.cbaines.net; Tue, 19 Jul 2022 11:35:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44868) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDp9i-0001V1-79 for guix-patches@gnu.org; Tue, 19 Jul 2022 11:29:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57173) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oDp9h-0002VS-Ud for guix-patches@gnu.org; Tue, 19 Jul 2022 11:29:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oDp9h-0001tq-Na for guix-patches@gnu.org; Tue, 19 Jul 2022 11:29:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56642] [PATCH] gnu: Make libphonenumber reproducible. Resent-From: Antero Mejr Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Jul 2022 15:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56642 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56642@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16582445027248 (code B ref -1); Tue, 19 Jul 2022 15:29:01 +0000 Received: (at submit) by debbugs.gnu.org; 19 Jul 2022 15:28:22 +0000 Received: from localhost ([127.0.0.1]:54932 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oDp93-0001sp-AQ for submit@debbugs.gnu.org; Tue, 19 Jul 2022 11:28:21 -0400 Received: from lists.gnu.org ([209.51.188.17]:57180) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oDp90-0001sh-W4 for submit@debbugs.gnu.org; Tue, 19 Jul 2022 11:28:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44776) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDp8z-0008RE-13 for guix-patches@gnu.org; Tue, 19 Jul 2022 11:28:18 -0400 Received: from mout-p-202.mailbox.org ([2001:67c:2050:0:465::202]:40468) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1oDp8v-0002SA-DL for guix-patches@gnu.org; Tue, 19 Jul 2022 11:28:16 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4LnN4r4zzJz9sVv for ; Tue, 19 Jul 2022 17:27:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1658244476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GgNAkq75tvqKpYpWHFTT41nEGMkBxrHZJDcTvan/Ca0=; b=MduPZxRvEUPoB97QIkaRX5MvfMmUkys1lO2U5ZZskbjonLYyx2yIRm9iC+bZYHFdP80t7R QuVmKk4mhWAd76LKjgWZ5KycEFO/YIAkUgYmRC5XIdZV1+jijmyybFjrXdDJQ7YSdnK5h9 gcnk8UW4CFOaFbbV/lfEPpJuuvGQbVcjABNvw4x/QwCGCeoguYEFNKW0lbwQZpN6Kjxi0o jGE0kE1hgVjsc6ACURWebUeXTIroAnCvXvdm8azWM+taVZyCpPr1J6q/nbpWk54AGLuyMH FWa6WzNJSN+phIr/m3eiv5DK8VikHHGvny9Myj4vCdKhuov5Lp8YP9QrwBF7zw== Date: Tue, 19 Jul 2022 11:27:50 -0400 Message-Id: <20220719152750.128283-1-antero@mailbox.org> MIME-Version: 1.0 X-MBO-RS-ID: 0be0bb92b9182c291eb X-MBO-RS-META: z8g7ochic9yucfw391hyyuhciafhg1ws Received-SPF: pass client-ip=2001:67c:2050:0:465::202; envelope-from=antero@mailbox.org; helo=mout-p-202.mailbox.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Antero Mejr X-ACL-Warn: , Antero Mejr via Guix-patches X-Patchwork-Original-From: Antero Mejr via Guix-patches via From: Antero Mejr X-getmail-retrieved-from-mailbox: Patches * gnu/packages/telephony.scm (libphonenumber): New variable. * gnu/packages/messaging.scm (libphonenumber): Delete variable (moved). --- Moved libphonenumber because it's a telephony package, plus it will avoid circular deps for other telephony packages than depend on it (like pn). Used substitute* instead of a patch to make libphonenumber reproducible because it's a 2-line change, I can do it using a patch if preferred. gnu/packages/messaging.scm | 32 ----------------------------- gnu/packages/telephony.scm | 42 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 32 deletions(-) diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index b68a798715..f08df1a5e4 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -2772,38 +2772,6 @@ (define-public purple-lurch (home-page "https://github.com/gkdr/lurch") (license license:gpl3+))) -(define-public libphonenumber - (package - (name "libphonenumber") - (version "8.11.3") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/google/libphonenumber") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "06y3mh1d1mks6d0ynxp3980g712nkf8l5nyljpybsk326b246hg9")))) - (arguments - `(#:test-target "tests" - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'change-directory - (lambda _ (chdir "cpp")))))) - (build-system cmake-build-system) - (native-inputs - (list googletest pkg-config)) - (inputs - (list boost protobuf icu4c)) - (synopsis "Library for parsing and using phone numbers") - (description - "This package provides a C++ library for parsing, formatting, and -validating international phone numbers.") - (home-page "https://github.com/google/libphonenumber") - (license license:asl2.0))) - - (define-public chatty (package (name "chatty") diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm index e3071d9b75..410d3d8591 100644 --- a/gnu/packages/telephony.scm +++ b/gnu/packages/telephony.scm @@ -22,6 +22,7 @@ ;;; Copyright © 2021 LibreMiami ;;; Copyright © 2021 Sarah Morgensen ;;; Copyright © 2021 Demis Balbach +;;; Copyright © 2022 Antero Mejr ;;; ;;; This file is part of GNU Guix. ;;; @@ -63,6 +64,7 @@ (define-module (gnu packages telephony) #:use-module (gnu packages gnome) #:use-module (gnu packages gnupg) #:use-module (gnu packages gtk) + #:use-module (gnu packages icu4c) #:use-module (gnu packages image) #:use-module (gnu packages libcanberra) #:use-module (gnu packages linphone) @@ -893,3 +895,43 @@ (define-public libtgvoip telephony functionality into custom Telegram clients.") (home-page "https://github.com/zevlg/libtgvoip") (license license:unlicense))) + +(define-public libphonenumber + (package + (name "libphonenumber") + (version "8.11.3") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/google/libphonenumber") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "06y3mh1d1mks6d0ynxp3980g712nkf8l5nyljpybsk326b246hg9")))) + (arguments + (list #:test-target "tests" + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'make-reproducible + (lambda _ + (substitute* + "tools/cpp/src/cpp-build/generate_geocoding_data.cc" + (("return errno == 0;") " +std::sort(entries->begin(), entries->end()); + return errno == 0;") + (("DirEntryKinds kind\\(\\) const \\{ return kind_; \\}") " +DirEntryKinds kind() const { return kind_; } +bool operator<(const DirEntry& d) { return name_ < d.name(); }")))) + (add-after 'make-reproducible 'change-directory + (lambda _ + (chdir "cpp")))))) + (build-system cmake-build-system) + (native-inputs (list googletest pkg-config)) + (inputs (list boost protobuf icu4c)) + (synopsis "Library for parsing and using phone numbers") + (description + "This package provides a C++ library for parsing, formatting, and +validating international phone numbers.") + (home-page "https://github.com/google/libphonenumber") + (license license:asl2.0)))