From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id GE0fAyYgImWVcwAA9RJhRA:P1 (envelope-from ) for ; Sun, 08 Oct 2023 05:21:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id GE0fAyYgImWVcwAA9RJhRA (envelope-from ) for ; Sun, 08 Oct 2023 05:21:10 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.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 48CFE46007 for ; Sun, 8 Oct 2023 05:21:09 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=cAuWAQKn; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1696735270; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=n6RVx8SfYnDNLLPQ68dVAB5VBitrazXDTz+Y8wCBnh4=; b=S78/SmOzqi18sAED3FWAE8jjHTrgofJL9d2oUn+yUVXim0C6wNuA/BWtGcwpk1Pt2x1QyX yhuZjEM8dIjiXI9m9xPi+LsYDjMFZSKzaxW9v0ZZGNp1qSfInBh/QXHJclwYMloFPFD1gv iaQPWLbSpuUlxfxGMH+5fmptJSdDLsaav0rZYC0WZTnBP6+w2ESR6TpNF6UtYtA9KV7ixT PqAqTokJrETtjIgCwg3D9qbczTWsXeqNE6f3zC8L/T2WXOqUYvEn4g5pzi4LDeKVG08Q5w crhRj8fUZ30H0OrKLeLWGngqdE1wyUBu2JcO51ZfKsgzcsMC5SDbanwCgvLxYQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1696735270; a=rsa-sha256; cv=none; b=C5fr1hX52Gl1aRLhHJd0viZrTo1CLkA6oKWRjsuqGDkhi38j0dk5EqE9cAJ6pZtiNcaN/u WexjmG2Zfrh2OgCIhSQZAvC8r2Jl/aYs00v503UYORWJbF0xYABEk/V/tt32s8NYaGQyEZ SX2pmJ57v/mcS8Nx4BHf1k7Fnr3NGVdKbSG8s1U+7eIrtMPdYzCNz1+uXGu+eh2JaCPs0l pPxB1gF3qQS0AK9+MGHJ2+kX5h6XOxsSdI7GgH6NbrZESKXfAOHqSHLq6hQGoH/o8MWbi4 lkfH71ybc8E1O9iIgBd9PEWX7cITGlcVCDCoKR1w9V317MVs4MMnvZezsKJGew== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=cAuWAQKn; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpKLW-00043v-Bk; Sat, 07 Oct 2023 23:20:46 -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 1qpKLU-000436-5g for bug-guix@gnu.org; Sat, 07 Oct 2023 23:20:44 -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 1qpKLT-0003g5-SJ; Sat, 07 Oct 2023 23:20:43 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qpKLn-0001al-JI; Sat, 07 Oct 2023 23:21:03 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#65924: [PATCH core-updates 3/3] gnu: git-minimal: Add coreutils and sed to PATH. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: maxim.cournoyer@gmail.com, zimon.toutoune@gmail.com, ludo@gnu.org, bug-guix@gnu.org Resent-Date: Sun, 08 Oct 2023 03:21:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65924 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 65924@debbugs.gnu.org Cc: Maxim Cournoyer , Maxim Cournoyer , Simon Tournier , Ludovic =?UTF-8?Q?Court=C3=A8s?= X-Debbugs-Original-Xcc: Maxim Cournoyer , Simon Tournier , Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 65924-submit@debbugs.gnu.org id=B65924.16967352326045 (code B ref 65924); Sun, 08 Oct 2023 03:21:03 +0000 Received: (at 65924) by debbugs.gnu.org; 8 Oct 2023 03:20:32 +0000 Received: from localhost ([127.0.0.1]:56103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpKLH-0001ZN-PX for submit@debbugs.gnu.org; Sat, 07 Oct 2023 23:20:32 -0400 Received: from mail-qv1-xf31.google.com ([2607:f8b0:4864:20::f31]:53283) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpKLF-0001Ys-OR for 65924@debbugs.gnu.org; Sat, 07 Oct 2023 23:20:30 -0400 Received: by mail-qv1-xf31.google.com with SMTP id 6a1803df08f44-65b162328edso19232566d6.2 for <65924@debbugs.gnu.org>; Sat, 07 Oct 2023 20:20:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696735204; x=1697340004; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=n6RVx8SfYnDNLLPQ68dVAB5VBitrazXDTz+Y8wCBnh4=; b=cAuWAQKnalTNEKUfyePRStobYh4aGNF62GB9Cnu1uOx4/9T9184qLHseADaKpcutgS Lw1gUYR5/+EYtTzfgHLgXzKCupVdkylksR3eCBsaUTWoduJhpyf9vmLywOLNduR8QcMO +jrjv2bFZRrTuHmC0fER7Bl7AlxL0/tZEwuNSDNunxvBfq3xhwG9jmnOfKbYSUshsLQA JoCV4AwKxfYU/RA+iXsZpi3ck+08e3rqLF88LU0LMAd3hqyRJ2S08Jjpn8RMYXy65ve6 VIVu5Qeqa0LKMuhgJOPpYWdXQ+4iLnMkwHpgAuLCupNtwBohuHHGYf8t2yaTUmUHnDQi 0AzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696735204; x=1697340004; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=n6RVx8SfYnDNLLPQ68dVAB5VBitrazXDTz+Y8wCBnh4=; b=cXdVkQfi5R2+A8TtpHpDhc1iM1j3ly5euAVDVwxqDMVn8/g+TQ7lAfsZishOlnPz/S /dcaEKIggdJwK+BWhrFQkDMBQDzIcCkHmqJbWVsx7hDNmOJdlUo6OLYkE8R1CNrzuG2S OmCer/Zn8oJp7rmLEuTmBmI4BpVAXYPwQWRsmjnalbuAvUB23V2tPudebNDnV8cc+V7k sgLDlDZ3ogmv73tZBwpz9QnKXxBi+0E5g4xlWdrE+Kek+yBt2pjbEM/yFMukHQ01p7ac J4N0cq++c/F3YE+o1JL6SuGsKQJEBuSQ4eWCRJEh8jyu8HNcjdeTrqcyc3dpQiiwwVbs hcMA== X-Gm-Message-State: AOJu0YyvtWWfIpD2S0uVdk3Fg/uRE3wfVFEHwJA7+DGBi3KXx3tBGGAd k9z3+2Lk2z5q0BWY8b3CH9K6MAMCsHA= X-Google-Smtp-Source: AGHT+IEPmYxWhuWnKfqd4vspGC/okqyNvfqxx20N5gbJYMIArcY6G+Q8iFZI8ybCS8OVPz0huGkKBg== X-Received: by 2002:a05:6214:1545:b0:655:d82d:2fd0 with SMTP id t5-20020a056214154500b00655d82d2fd0mr12620451qvw.21.1696735204093; Sat, 07 Oct 2023 20:20:04 -0700 (PDT) Received: from localhost.localdomain (dsl-158-21.b2b2c.ca. [66.158.158.21]) by smtp.gmail.com with ESMTPSA id o10-20020a0cf4ca000000b0065b129ec0e8sm2748304qvm.57.2023.10.07.20.20.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Oct 2023 20:20:03 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 7 Oct 2023 23:18:51 -0400 Message-ID: <9e15a3ab5f8d4f44b834e1fc90464312c60fac9e.1696734901.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -3.12 X-Spam-Score: -3.12 X-Migadu-Queue-Id: 48CFE46007 X-TUID: RwqjBkKRvsJn Fixes . * gnu/packages/version-control.scm (git-minimal) [arguments] : New field. : Augment with (ice-9 match), (ice-9 textual-ports) and (guix search-paths). : Add patch-commands phase. [inputs]: Add coreutils-minimal and sed. --- gnu/packages/version-control.scm | 57 ++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index bc647d1538..b0997db5da 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -82,6 +82,7 @@ (define-module (gnu packages version-control) #:use-module (guix build-system python) #:use-module (guix build-system qt) #:use-module (guix build-system trivial) + #:use-module (guix modules) #:use-module (gnu packages apr) #:use-module (gnu packages autotools) #:use-module (gnu packages documentation) @@ -245,9 +246,14 @@ (define-public git-minimal (build-system gnu-build-system) (arguments (list - #:modules `((srfi srfi-1) + #:imported-modules `(,@%gnu-build-system-modules + ,@(source-module-closure '((guix search-paths)))) + #:modules `((ice-9 match) + (ice-9 textual-ports) + (srfi srfi-1) (srfi srfi-26) ((guix build gnu-build-system) #:prefix gnu:) + (guix search-paths) ,@%gnu-build-system-modules) ;; Make sure the full bash does not end up in the final closure. #:disallowed-references (list bash perl) @@ -311,6 +317,51 @@ (define-public git-minimal inputs "bin/curl-config")) ":" (getenv "PATH")))))) #~()) + (add-after 'unpack 'patch-commands + (lambda* (#:key inputs #:allow-other-keys) + (define (prepend-string-to-file text file) + "Prepend TEXT to FILE." + (let ((content (call-with-input-file file + (cut get-string-all <>)))) + (call-with-output-file file + (lambda (port) + (display text port) + (display content port))))) + + (define PATH-variable-definition + (let ((value + (match (evaluate-search-paths + (list $PATH) + (list #$(this-package-input "coreutils-minimal") + #$(this-package-input "sed"))) + (((spec . value)) + value)))) + (string-append + (search-path-definition $PATH value + #:kind 'prefix) "\n\n"))) + + ;; Ensure that coreutils (for basename) and sed are on PATH + ;; for any script that sources the 'git-sh-setup.sh' file. + (prepend-string-to-file PATH-variable-definition + "git-sh-setup.sh") + + ;; Avoid depending on util-linux; it's only used to detect + ;; whether the system is MinGW, which we can detect at build + ;; time. + (substitute* "git-sh-setup.sh" + (("\\$\\(uname -s)") + (if #$(target-mingw?) + "MINGW" + "GNU"))) ;matched against '*' + + ;; git-submodule sources 'git-sh-setup.sh', but not before + ;; invoking the basename and sed commands... patch them to their + ;; absolute location. + (substitute* "git-submodule.sh" + (("\\$\\(basename") + (string-append "$(" (search-input-file inputs "bin/basename"))) + (("sed -e") + (string-append (search-input-file inputs "bin/sed") " -e"))))) (add-after 'configure 'patch-makefiles (lambda _ (substitute* "Makefile" @@ -414,10 +465,12 @@ (define-public git-minimal gettext-minimal perl)) (inputs - (list curl ;for HTTP(S) access + (list coreutils-minimal + curl ;for HTTP(S) access expat ;for 'git push' over HTTP(S) openssl perl + sed zlib)) (native-search-paths ;; For HTTPS access, Git needs a single-file certificate bundle, specified -- 2.41.0