From patchwork Thu Oct 24 19:05:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Hogan X-Patchwork-Id: 69419 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 3F40927BBEA; Thu, 24 Oct 2024 20:14:06 +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=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 EE2B727BBE2 for ; Thu, 24 Oct 2024 20:14:04 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t43HE-0007RG-9q; Thu, 24 Oct 2024 15:13:45 -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 1t43H2-0007Q2-0H for guix-patches@gnu.org; Thu, 24 Oct 2024 15:13:33 -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 1t43H1-0003p8-N1 for guix-patches@gnu.org; Thu, 24 Oct 2024 15:13:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=ZYWZdyr1hDTcU570gLsWNaDeau6QOyXWjJUxdXCO7YQ=; b=iD3m8V55XocCIDMqAkDrl9wR5gtC8k6gQGk7a5JPpeWDFT77hrp3ofpc4Dn4E9Xf7GcNbYMKHnqBUQJEo+IxPXQwm0ne5UKfqcyuYiS1FOMGuVcx1tWDX43AIG80nUve8fvO+KTfE3typzNMoNHoX+vnTxbX6YnZGzNB7xU3LrpbKZxfOJ9+0haH1olk3rFlape9RCxZa8VqzCUn0qcGI7YBCagW0wrhBz+sLUnonFTYdSkgK6V4mCssQD2o75BHyNmIFMCl0AklzXzAnDK2X0dt3TofkeKQmF3omZx5l2H4+6JtOuPzS9Rs4rPVIZojNyZIXqKbbgn4o9h9OtzCNw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t43HW-0003Rn-ET for guix-patches@gnu.org; Thu, 24 Oct 2024 15:14:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73993] [PATCH] gnu: git-sizer: Pin git version. Resent-From: Greg Hogan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 24 Oct 2024 19:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73993 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73993@debbugs.gnu.org Cc: Greg Hogan X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.172979723913229 (code B ref -1); Thu, 24 Oct 2024 19:14:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 Oct 2024 19:13:59 +0000 Received: from localhost ([127.0.0.1]:36206 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t43HT-0003RJ-34 for submit@debbugs.gnu.org; Thu, 24 Oct 2024 15:13:59 -0400 Received: from lists.gnu.org ([209.51.188.17]:36010) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t43HQ-0003R6-6M for submit@debbugs.gnu.org; Thu, 24 Oct 2024 15:13:57 -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 1t43Eo-0007Hb-WA for guix-patches@gnu.org; Thu, 24 Oct 2024 15:11:15 -0400 Received: from mail-qt1-x834.google.com ([2607:f8b0:4864:20::834]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t43Em-0003fR-QB for guix-patches@gnu.org; Thu, 24 Oct 2024 15:11:14 -0400 Received: by mail-qt1-x834.google.com with SMTP id d75a77b69052e-460a415633fso7099161cf.2 for ; Thu, 24 Oct 2024 12:11:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=greghogan-com.20230601.gappssmtp.com; s=20230601; t=1729797071; x=1730401871; 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=ZYWZdyr1hDTcU570gLsWNaDeau6QOyXWjJUxdXCO7YQ=; b=p1q7g3DA57Jp0luDLPUhP6dqd4Xvsm/rSJM95521urbBqgJRKOCT4d2alYkfn+Mc0S 6ikGJzrYfhjoOy84Djcyio3KHvTKL3nZ4flJqxziFLOcM6MfM15Q25v8dpOr2EGVdeBS 4ngdKLlp3i9mjoWkRJu/DZqLM1StcovUUSTAoRMdus6xkz5AuxpqEhzqGAEPAfPTeZNO +Z6A4gbwxsZJjDV7mNgkEAfWwzI9C5iyRy4B+X2tmB64dCUFZ1regaS6zd8oM0QgOuPP iy98x8IPZVA/HjcKjhFGpC4dxUlsdF8qh8mpDqJCtgrscmBxqcJZX+qzt2sIITt38zj5 JAVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729797071; x=1730401871; 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=ZYWZdyr1hDTcU570gLsWNaDeau6QOyXWjJUxdXCO7YQ=; b=pj+zQ6bC5gkmXE4RmdvawxXQsyNNFSI3YRb7ZsX4p4ok2JtmZSiV8oozpfZxLhfKSB F3fcGFZc1QcjEz6mc0f7b5EM/3194KfnYLgMev+B0NJawHT4Y8KSNPUYcLsyd/DMnCqq EjN7JfbJin+U1F9f7hQiCuLc3sVe1YjGYGry1L1+FUxlkhqj+h92PMaBWfEeSstuIBRD zdLgXrHnzcXNgeqieQzE6t63KZfKzzm4JWuU5yZ2KUSKqSBN0YbcajriSBdtWcbCGbO8 7jqnN4ACbJcf/upMWErU2eaOn78JJmITYwooZoYOIfJfBiPxtAIfNs8Ex/MjL0XsQ5DE E8LA== X-Gm-Message-State: AOJu0YztvIB3PgTyxUAdqMsF2AKDylgPSC8mu6lW0r1pQzGevZzVEynn tgxWb5DqhEYdsOxRCQb80NZbijTTwMrYKtB/0OUX0FVCiIuvdhfr0eoz2qDS9o5qivmbtTF7kow N4fs= X-Google-Smtp-Source: AGHT+IEfKRJucqolftQ3nzkDlc6Laix09xWn26q8NifegtBTL9yLwJ2iOswpBWPHRM6ssPSENb+aVA== X-Received: by 2002:ac8:5802:0:b0:461:2146:3aaf with SMTP id d75a77b69052e-46121463c9cmr59103361cf.0.1729797071087; Thu, 24 Oct 2024 12:11:11 -0700 (PDT) Received: from ip-10-114-89-186.evoforge.org (ec2-52-70-167-183.compute-1.amazonaws.com. [52.70.167.183]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-460d3da210csm54559131cf.81.2024.10.24.12.11.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2024 12:11:10 -0700 (PDT) From: Greg Hogan Date: Thu, 24 Oct 2024 19:05:07 +0000 Message-ID: <12475749a8d371488d9ae1fa331ad10dd24aa644.1729796653.git.code@greghogan.com> X-Mailer: git-send-email 2.46.1 MIME-Version: 1.0 Received-SPF: none client-ip=2607:f8b0:4864:20::834; envelope-from=code@greghogan.com; helo=mail-qt1-x834.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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 When I submitted this package the placement of git in native-inputs was incorrect. This patch switches that dependency to the pinned version of git in inputs and therefore hard-codes the path. * gnu/packages/version-control.scm (git-sizer) [arguments]<#:phases>: Use gexps and hard-code git path in 'fix-paths. [propagated-inputs]: Remove git. [native-inputs]: Add git-minimal/pinned. Change-Id: Ide0c5a3df7c0cf0ecdaa5446b5d13970dae96560 --- gnu/packages/version-control.scm | 44 +++++++++++++++++--------------- 1 file changed, 24 insertions(+), 20 deletions(-) base-commit: ac19ae37b5000c224c4cd167b239cc3027d01b30 diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 6bd37fee82..78342fbe31 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -4364,26 +4364,30 @@ (define-public git-sizer "1b4sl4djnfaxwph41y4bh9yal4bpd1nz4403ryp7nzna7h2x0zis")))) (build-system go-build-system) (arguments - '(#:import-path "github.com/github/git-sizer" - #:install-source? #f - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'fix-paths - (lambda* (#:key outputs #:allow-other-keys) - (substitute* '("src/github.com/github/git-sizer/git_sizer_test.go") - (("bin/git-sizer") - (string-append (assoc-ref outputs "out") - "/bin/git-sizer"))))) - (replace 'check - (lambda* (#:key tests? import-path #:allow-other-keys) - (when tests? - (for-each (lambda (test) - (invoke "go" "test" "-v" "-run" test import-path)) - ;; TestExec and TestSubmodule require a copy of the - ;; Git repository. - '("TestBomb" "TestFromSubdir" "TestRefgroups" - "TestRefSelections" "TestTaggedTags")))))))) - (native-inputs (list git)) + (list + #:import-path "github.com/github/git-sizer" + #:install-source? #f + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-paths + (lambda _ + (let ((git #$git-minimal/pinned)) + (substitute* '("src/github.com/github/git-sizer/git_sizer_test.go") + (("bin/git-sizer") + (string-append #$output "/bin/git-sizer"))) + (substitute* '("src/github.com/github/git-sizer/git/git.go") + (("gitBin, err := findGitBin\\(\\)") + (string-append "gitBin := \"" git "/bin/git\"\n\tvar err error")))))) + (replace 'check + (lambda* (#:key tests? import-path #:allow-other-keys) + (when tests? + (for-each (lambda (test) + (invoke "go" "test" "-v" "-run" test import-path)) + ;; TestExec and TestSubmodule require a copy of the + ;; Git repository. + '("TestBomb" "TestFromSubdir" "TestRefgroups" + "TestRefSelections" "TestTaggedTags")))))))) + (inputs (list git-minimal/pinned)) (propagated-inputs (list go-github-com-cli-safeexec go-github-com-davecgh-go-spew