From patchwork Sat Feb 24 08:19:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Figiel X-Patchwork-Id: 60969 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 1EB3727BBE9; Sat, 24 Feb 2024 08:41:53 +0000 (GMT) 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 26C9C27BBE2 for ; Sat, 24 Feb 2024 08:41:50 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdnbL-0007y8-Ee; Sat, 24 Feb 2024 03:41:43 -0500 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 1rdnbH-0007xL-Kk for guix-patches@gnu.org; Sat, 24 Feb 2024 03:41:39 -0500 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 1rdnbG-0000pi-8T for guix-patches@gnu.org; Sat, 24 Feb 2024 03:41:39 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rdnbe-0001lX-7F for guix-patches@gnu.org; Sat, 24 Feb 2024 03:42:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69234] [PATCH v3 2/5] gnu: go-github-com-shirou-gopsutil: Update to 2.21.11. References: <87cysvbby7.fsf@troyfigiel.com> In-Reply-To: <87cysvbby7.fsf@troyfigiel.com> Resent-From: Troy Figiel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 24 Feb 2024 08:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69234 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69234@debbugs.gnu.org Received: via spool by 69234-submit@debbugs.gnu.org id=B69234.17087640826654 (code B ref 69234); Sat, 24 Feb 2024 08:42:02 +0000 Received: (at 69234) by debbugs.gnu.org; 24 Feb 2024 08:41:22 +0000 Received: from localhost ([127.0.0.1]:39160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdnaz-0001j8-0y for submit@debbugs.gnu.org; Sat, 24 Feb 2024 03:41:21 -0500 Received: from mout-p-201.mailbox.org ([80.241.56.171]:42104) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdnao-0001h5-73 for 69234@debbugs.gnu.org; Sat, 24 Feb 2024 03:41:11 -0500 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (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 mout-p-201.mailbox.org (Postfix) with ESMTPS id 4ThgLJ14Rvz9srJ for <69234@debbugs.gnu.org>; Sat, 24 Feb 2024 09:40:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=troyfigiel.com; s=MBO0001; t=1708764008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=LuXYvvtFzGk1hj/kMMn9pQItJ8N54AtbdDKWr1FYHEU=; b=Vb+DcfDLQ4XGIY801GnWpN64nXQkbp+D221t22p1Zfwb2tyYroTuDoKBDi30sZGwuEAYfE v+5pezYz7uYH7cayBSq6XxxYSCcr69qd3YMFg15d2DTBYq3zzFZZXS0lmLrbvcFWgraHfI UQkqiy+voE/s8LP6bYplDzXgYlZlL2Ptit1oS8l2UguD9mI6myMz8FEqLtkEKMlKX8K1EN A60yHqArABzXwt/mGkTD2SXM/FRzCYIzV4ZQOYbbr0zqRnPuEWKzI8V4wDoyHJ05rveucQ KZIvZ67e+K5o1mG9nM7ySdDYi0n4xJWmkDiZHDsKYwMQ77y7PlpWyzSYmRplIQ== From: Troy Figiel Date: Sat, 24 Feb 2024 09:19:28 +0100 Message-ID: <87r0h29rx4.fsf@troyfigiel.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4ThgLJ14Rvz9srJ 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/golang-xyz.scm (go-github-com-shirou-gopsutil): Update to 2.21.11. [arguments]: Fix tests. <#:go>: Update to go-1.18. <#:phases>: Add 'remove-v3 and 'remove-failing-tests phases. [propagated-inputs]: Add go-golang-org-x-sys. [native-inputs]: Add go-github-com-stretchr-testify and procps. * gnu/packages/golang-xyz.scm: Add (gnu packages linux) module. --- gnu/packages/golang-xyz.scm | 63 ++++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 22 deletions(-) diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm index 401c769da5..bcf46992e0 100644 --- a/gnu/packages/golang-xyz.scm +++ b/gnu/packages/golang-xyz.scm @@ -45,7 +45,8 @@ (define-module (gnu packages golang-xyz) #:use-module (gnu packages golang-build) #:use-module (gnu packages golang-check) #:use-module (gnu packages golang-compression) - #:use-module (gnu packages golang-crypto)) + #:use-module (gnu packages golang-crypto) + #:use-module (gnu packages linux)) ;;; Commentary: ;;; @@ -1094,29 +1095,47 @@ (define-public go-github-com-rcrowley-go-metrics (license license:bsd-2)))) (define-public go-github-com-shirou-gopsutil - (let ((commit "47ef3260b6bf6ead847e7c8fc4101b33c365e399") - (revision "0")) - (package - (name "go-github-com-shirou-gopsutil") - (version (git-version "v2.19.7" revision commit)) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/shirou/gopsutil") - (commit commit))) ; XXX - (file-name (git-file-name name version)) - (sha256 - (base32 - "0x1g4r32q4201nr2b754xnrrndmwsrhfr7zg37spya86qrmijnws")))) - (build-system go-build-system) - (arguments - '(#:import-path "github.com/shirou/gopsutil")) - (synopsis "Process and system monitoring in Go") - (description "This package provides a library for retrieving information + (package + (name "go-github-com-shirou-gopsutil") + (version "2.21.11") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/shirou/gopsutil") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0gpb10xkdwfimn1sp4jhrvzz4p3zgmdb78q8v23nap3yi6v4bff5")))) + (build-system go-build-system) + (arguments + (list + #:go go-1.18 + #:import-path "github.com/shirou/gopsutil" + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'remove-v3 + (lambda* (#:key import-path #:allow-other-keys) + ;; We remove the separately included v3 module. + (delete-file-recursively (string-append "src/" + import-path + "/v3")))) + (add-before 'check 'remove-failing-tests + (lambda* (#:key import-path #:allow-other-keys) + (delete-file-recursively + ;; host_test.go tries to access files such as + ;; /var/run/utmp that do not exist in the build + ;; environment. + (string-append "src/" import-path "/host/host_test.go"))))))) + ;; TODO: Add go-github-com-tklauser-go-sysconf to propagated-inputs once + ;; it is packaged. + (propagated-inputs (list go-golang-org-x-sys)) + (native-inputs (list go-github-com-stretchr-testify procps)) + (synopsis "Process and system monitoring in Go") + (description "This package provides a library for retrieving information on running processes and system utilization (CPU, memory, disks, network, sensors).") - (home-page "https://github.com/shirou/gopsutil") - (license license:bsd-3)))) + (home-page "https://github.com/shirou/gopsutil") + (license license:bsd-3))) (define-public go-github-com-skip2-go-qrcode (package