From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52676) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWoU3-0004Hb-SY for guix-patches@gnu.org; Sat, 23 Jun 2018 15:46:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWoTy-0001os-Tp for guix-patches@gnu.org; Sat, 23 Jun 2018 15:46:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:53787) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fWoTy-0001oo-PS for guix-patches@gnu.org; Sat, 23 Jun 2018 15:46:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fWoTy-0005oO-Ff for guix-patches@gnu.org; Sat, 23 Jun 2018 15:46:02 -0400 Subject: [bug#31952] [PATCH] gnu: git: Update to 2.18.0. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWoTG-00049i-F2 for guix-patches@gnu.org; Sat, 23 Jun 2018 15:45:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWoTB-0001VV-He for guix-patches@gnu.org; Sat, 23 Jun 2018 15:45:18 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:53495) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fWoTB-0001VK-B1 for guix-patches@gnu.org; Sat, 23 Jun 2018 15:45:13 -0400 From: Marius Bakke Date: Sat, 23 Jun 2018 21:45:07 +0200 Message-Id: <20180623194507.16280-1-mbakke@fastmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 31952@debbugs.gnu.org * gnu/packages/version-control.scm (git): Update to 2.18.0. [native-inputs]: Add BASH. [arguments]: In #:make-flags, define SHELL_PATH and TEST_SHELL_PATH. Add #:disallowed-references. Drop /bin/sh substitution from Makefile. Add phase to prevent BASH from ending up in PATH. Delete 'patch-shebangs' phase. --- gnu/packages/version-control.scm | 35 ++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 3980db756..fd6b62da4 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -53,6 +53,7 @@ #:use-module (gnu packages autotools) #:use-module (gnu packages documentation) #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages bison) #:use-module (gnu packages boost) #:use-module (gnu packages check) @@ -144,17 +145,18 @@ as well as the classic centralized workflow.") (name "git") ;; XXX When updating Git, check if the special 'git:src' input to cgit needs ;; to be updated as well. - (version "2.17.1") + (version "2.18.0") (source (origin (method url-fetch) (uri (string-append "mirror://kernel.org/software/scm/git/git-" version ".tar.xz")) (sha256 (base32 - "0pm6bdnrrm165k3krnazxcxadifk2gqi30awlbcf9fism1x6w4vr")))) + "14hfwfkrci829a9316hnvkglnqqw1p03cw9k56p4fcb078wbwh4b")))) (build-system gnu-build-system) (native-inputs `(("native-perl" ,perl) + ("bash-for-tests" ,bash) ;needed for completion test ("gettext" ,gettext-minimal) ("git-manpages" ,(origin @@ -164,7 +166,7 @@ as well as the classic centralized workflow.") version ".tar.xz")) (sha256 (base32 - "0m7grrwsqaihdgcgaicxiy4rlqjpa75n5wl6hi2qhi33xa34gmc3")))))) + "15k04s9pcc5wkmlfa8x99nbgczjbx0c91767ciqmjy9kwsavxqws")))))) (inputs `(("curl" ,curl) ("expat" ,expat) @@ -196,10 +198,23 @@ as well as the classic centralized workflow.") (arguments `(#:make-flags `("V=1" ;more verbose compilation + ,(string-append "SHELL_PATH=" + (assoc-ref %build-inputs "bash") + "/bin/sh") + + ;; Tests require a bash with completion support. + ,(string-append "TEST_SHELL_PATH=" + (assoc-ref %build-inputs "bash-for-tests") + "/bin/bash") + ;; By default 'make install' creates hard links for ;; things in 'libexec/git-core', which leads to huge ;; nars; see . "NO_INSTALL_HARDLINKS=indeed") + + ;; Make sure the full bash does not end up in the final closure. + #:disallowed-references (,bash) + #:test-target "test" ;; Tests fail randomly when parallel: . @@ -212,13 +227,23 @@ as well as the classic centralized workflow.") "/bin/wish8.6")) ; XXX #:modules ((srfi srfi-1) + (srfi srfi-26) ,@%gnu-build-system-modules) #:phases (modify-phases %standard-phases + (add-after 'unpack 'modify-PATH + (lambda* (#:key inputs #:allow-other-keys) + (let ((path (string-split (getenv "PATH") #\:)) + (bash-full (assoc-ref inputs "bash-for-tests"))) + ;; Drop the test bash from PATH so that (which "sh") and + ;; similar does the right thing. + (setenv "PATH" (string-join + (remove (cut string-prefix? bash-full <>) path) + ":")) + #t))) (add-after 'configure 'patch-makefiles (lambda _ (substitute* "Makefile" - (("/bin/sh") (which "sh")) (("/usr/bin/perl") (which "perl")) (("/usr/bin/python") (which "python"))) #t)) @@ -266,6 +291,8 @@ as well as the classic centralized workflow.") "t/t9167-git-svn-cmd-branch-subproject.sh" "t/t9141-git-svn-multiple-branches.sh")) #t))) + ;; FIXME: This phase picks up the wrong bash when patching shebangs. + (delete 'patch-shebangs) (add-after 'install 'install-shell-completion (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) -- 2.18.0