From patchwork Wed May 15 16:51:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 64457 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 4503127BBE9; Wed, 15 May 2024 17:52:22 +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_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,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 A731327BBE2 for ; Wed, 15 May 2024 17:52:17 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7HrG-0007hf-DY; Wed, 15 May 2024 12:52:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s7HrE-0007hF-Pg for guix-patches@gnu.org; Wed, 15 May 2024 12:52:00 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7HrE-00031E-Ha for guix-patches@gnu.org; Wed, 15 May 2024 12:52:00 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s7HrG-00071M-2U for guix-patches@gnu.org; Wed, 15 May 2024 12:52:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70962] [PATCH 01/14] gnu: grpc: Modernize. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 May 2024 16:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70962 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70962@debbugs.gnu.org Cc: Maxim Cournoyer X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.171579188826978 (code B ref -1); Wed, 15 May 2024 16:52:01 +0000 Received: (at submit) by debbugs.gnu.org; 15 May 2024 16:51:28 +0000 Received: from localhost ([127.0.0.1]:43103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7Hqh-000714-A7 for submit@debbugs.gnu.org; Wed, 15 May 2024 12:51:27 -0400 Received: from lists.gnu.org ([209.51.188.17]:58772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7Hqf-00070y-J1 for submit@debbugs.gnu.org; Wed, 15 May 2024 12:51:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s7Hqd-0007e5-ES for guix-patches@gnu.org; Wed, 15 May 2024 12:51:23 -0400 Received: from mail-qv1-xf34.google.com ([2607:f8b0:4864:20::f34]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7Hqb-0002ld-DS for guix-patches@gnu.org; Wed, 15 May 2024 12:51:23 -0400 Received: by mail-qv1-xf34.google.com with SMTP id 6a1803df08f44-6a0ff97a9c7so61694686d6.0 for ; Wed, 15 May 2024 09:51:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715791879; x=1716396679; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=CCjZy5Sg+w9JemZFjGBFpZdFncEPR1AaYb1RW7JkqzQ=; b=P6D/zYVnAl+5Y2+FMz4S8oWQXMKBT6IYODedz6MaocddKO//bUmzcklK/umBeaQ7hu yyW8cexfMHFt2khEt6EitZnUPuCkCumDlzdh2+ixSsTULOt8PJlErt+N8uqrrR6Sv9wH YYWXZWWQp79A/HOOc58fFwULvwgh8Njy/I+hGGoId8pjCI5KCxJe7sIHf3OcmZ0HPiTS 76YiITPCnzncgGRAeGyFDC7ZT8ekwLPy0VRHKOwfkS+e/oNRGw+MxKOiX9EFve3FdyDl hiCdNcN8XZFutruf1jly4zcuKnXEMKVxO96cVe9RwwMDExneBmgZJZo5Cv3xAqi1ZN0m +YIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715791879; x=1716396679; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CCjZy5Sg+w9JemZFjGBFpZdFncEPR1AaYb1RW7JkqzQ=; b=gy3nQog/ze73ZNH+Qt7SeZKo+/djjRnY3AEuKelmaxCZIedDpsDXoPXPjLbh/4rQ8S xuty4/sBokJDajeEF3v4UoHEjkM6EMRO9RyS9NaX56VTOXsRH3SjlKGYJN3OHC/Xj5V7 w6Rk5hbf5sqRh/5KlXGKwEU4kKoug+6qdG28dV2yj3v6aqgJVA6Nt5mG2Z4w0LSW7fiK FMPpka0hnbFnjpApyqdJctOxEnuzEzd37USkmSol96zy2fCYYrZBqCZ6OQ/AItcbupR4 7v+tvngs6guhLfaJn6xX4w1cA+fTHnC46eByqaCBuNRtFDb3FPIS5+dEIe2nXDVm5Z/k U2sw== X-Gm-Message-State: AOJu0Yzc8rQNQkWMpaHT0okGYzyYy9iJeHnJLWdCHei6HyuNzLZeDJNu tPiySLD0q1K777bY5Y58hPrHHubfO1nPzLJpKqKk2hCAsZNH4xaXNdIVHw== X-Google-Smtp-Source: AGHT+IFcEX05jOKoKe5eJn1C5UeCScSTgi67QHn+uhuSyIfNJzeTZxNR9QpD0rYRhJlGfB6JAURQrQ== X-Received: by 2002:a05:6214:578a:b0:6a0:e690:2f96 with SMTP id 6a1803df08f44-6a167987dc2mr303352476d6.21.1715791879274; Wed, 15 May 2024 09:51:19 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-107.b2b2c.ca. [205.233.125.107]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6a15f1ce6b9sm65974836d6.83.2024.05.15.09.51.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 09:51:18 -0700 (PDT) From: Maxim Cournoyer Date: Wed, 15 May 2024 12:51:09 -0400 Message-ID: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::f34; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qv1-xf34.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/rpc.scm (grpc) [arguments]: Use gexps. Delete trailing #t. [native-inputs]: Remove labels. * gnu/packages/rpc.scm (grpc-1.16.1) [arguments]: Use gexps. Change-Id: I0e89d246cc62a293274a32344108a7249f343257 --- gnu/packages/rpc.scm | 118 +++++++++++++++++++++---------------------- 1 file changed, 58 insertions(+), 60 deletions(-) base-commit: 029f2e970d5d14dda2dc89a4a3cc17de573ff90c diff --git a/gnu/packages/rpc.scm b/gnu/packages/rpc.scm index a88c79f8b9..d067d978c5 100644 --- a/gnu/packages/rpc.scm +++ b/gnu/packages/rpc.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2020 Brett Gilio ;;; Copyright © 2021 Greg Hogan ;;; Copyright © 2021 Tobias Geerinckx-Rice -;;; Copyright © 2022 Maxim Cournoyer +;;; Copyright © 2022, 2024 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -65,55 +65,53 @@ (define-public grpc "1fs407hnlnm0b8sncjwys9rc7ia5nb7wxrpx39nq3pzzfs1lv3vq")))) (build-system cmake-build-system) (arguments - `(#:tests? #f ; no test target - #:configure-flags - (list "-DgRPC_ZLIB_PROVIDER=package" - "-DgRPC_ABSL_PROVIDER=package" - "-DgRPC_CARES_PROVIDER=package" - "-DgRPC_SSL_PROVIDER=package" - "-DgRPC_PROTOBUF_PROVIDER=package" - "-DgRPC_RE2_PROVIDER=package" - (string-append "-DCMAKE_INSTALL_PREFIX=" - (assoc-ref %outputs "out")) - "-DCMAKE_INSTALL_LIBDIR=lib" - (string-append "-DCMAKE_INSTALL_RPATH=" - (assoc-ref %outputs "out") "/lib") - "-DCMAKE_VERBOSE_MAKEFILE=ON") - #:phases - (modify-phases %standard-phases - (add-before 'configure 'configure-shared - (lambda* (#:key (configure-flags '()) #:allow-other-keys) - (mkdir "../build-shared") - (with-directory-excursion "../build-shared" - (apply invoke - "cmake" "../source" - "-DBUILD_SHARED_LIBS=ON" - configure-flags) - (apply invoke "make" - `("-j" ,(number->string (parallel-job-count))))))) - (add-after 'install 'install-shared-libraries - (lambda _ - (with-directory-excursion "../build-shared" - (invoke "make" "install")))) - (add-before 'strip 'move-static-libs - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (static (assoc-ref outputs "static"))) - (mkdir-p (string-append static "/lib")) - (with-directory-excursion - (string-append out "/lib") - (for-each + (list + #:tests? #f ; no test target + #:configure-flags + #~(list "-DgRPC_ZLIB_PROVIDER=package" + "-DgRPC_ABSL_PROVIDER=package" + "-DgRPC_CARES_PROVIDER=package" + "-DgRPC_SSL_PROVIDER=package" + "-DgRPC_PROTOBUF_PROVIDER=package" + "-DgRPC_RE2_PROVIDER=package" + (string-append "-DCMAKE_INSTALL_PREFIX=" #$output) + "-DCMAKE_INSTALL_LIBDIR=lib" + (string-append "-DCMAKE_INSTALL_RPATH=" #$output "/lib") + "-DCMAKE_VERBOSE_MAKEFILE=ON") + #:phases + #~(modify-phases %standard-phases + (add-before 'configure 'configure-shared + (lambda* (#:key configure-flags #:allow-other-keys) + (mkdir "../build-shared") + (with-directory-excursion "../build-shared" + (apply invoke "cmake" "../source" + "-DBUILD_SHARED_LIBS=ON" + configure-flags) + (apply invoke "make" + (list "-j" (number->string (parallel-job-count))))))) + (add-after 'install 'install-shared-libraries + (lambda _ + (with-directory-excursion "../build-shared" + (invoke "make" "install")))) + (add-before 'strip 'move-static-libs + (lambda _ + (let ((static #$output:static)) + (mkdir-p (string-append static "/lib")) + (with-directory-excursion (string-append #$output "/lib") + (for-each (lambda (file) - (rename-file file - (string-append static "/lib/" file))) - (find-files "." "\\.a$")))) - #t))))) - (inputs - (list abseil-cpp-cxxstd11 c-ares/cmake openssl re2 zlib)) + (rename-file file (string-append static "/lib/" file))) + (find-files "." "\\.a$"))))))))) (native-inputs - `(("pkg-config" ,pkg-config) - ("protobuf" ,protobuf) - ("python" ,python-wrapper))) + (list pkg-config + protobuf + python-wrapper)) + (inputs + (list abseil-cpp-cxxstd11 + c-ares/cmake + openssl + re2 + zlib)) (home-page "https://grpc.io") (synopsis "High performance universal RPC framework") (description "gRPC is a modern high performance @dfn{Remote Procedure Call} @@ -159,18 +157,18 @@ (define-public grpc-1.16.1 (arguments (substitute-keyword-arguments (package-arguments grpc) ((#:phases phases) - `(modify-phases ,phases - ;; Note: This would be nicer as a snippet, but that creates a tarball - ;; instead of a checkout and breaks assumptions made by the builder. - (add-after 'unpack 'rename-gettid - (lambda _ - ;; Rename custom gettid() syscall wrapper to avoid conflict - ;; with gettid() from glibc 2.30. - (substitute* '("src/core/lib/gpr/log_linux.cc" - "src/core/lib/gpr/log_posix.cc" - "src/core/lib/iomgr/ev_epollex_linux.cc") - (("gettid\\(") - "sys_gettid(")))))))) + #~(modify-phases #$phases + ;; Note: This would be nicer as a snippet, but that creates a tarball + ;; instead of a checkout and breaks assumptions made by the builder. + (add-after 'unpack 'rename-gettid + (lambda _ + ;; Rename custom gettid() syscall wrapper to avoid conflict + ;; with gettid() from glibc 2.30. + (substitute* '("src/core/lib/gpr/log_linux.cc" + "src/core/lib/gpr/log_posix.cc" + "src/core/lib/iomgr/ev_epollex_linux.cc") + (("gettid\\(") + "sys_gettid(")))))))) (inputs (modify-inputs (package-inputs grpc) (replace "abseil-cpp" abseil-cpp-20200923.3)))