From patchwork Sun Jul 21 19:50:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kyle Meyer X-Patchwork-Id: 14735 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 0EBEE16F98; Sun, 21 Jul 2019 20:52:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id BCE88163F1 for ; Sun, 21 Jul 2019 20:52:10 +0100 (BST) Received: from localhost ([::1]:57572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpHsQ-0007WG-EL for patchwork@mira.cbaines.net; Sun, 21 Jul 2019 15:52:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33249) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpHsK-0007G4-2b for guix-patches@gnu.org; Sun, 21 Jul 2019 15:52:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hpHsI-0001pV-Rm for guix-patches@gnu.org; Sun, 21 Jul 2019 15:52:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50727) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hpHsI-0001pK-LU for guix-patches@gnu.org; Sun, 21 Jul 2019 15:52:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hpHsI-0001Sg-JL for guix-patches@gnu.org; Sun, 21 Jul 2019 15:52:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36752] [PATCH 1/2] gnu: git-annex: Don't patch shebang used in hooks. Resent-From: Kyle Meyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 21 Jul 2019 19:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36752 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 36752@debbugs.gnu.org Received: via spool by 36752-submit@debbugs.gnu.org id=B36752.15637386775499 (code B ref 36752); Sun, 21 Jul 2019 19:52:02 +0000 Received: (at 36752) by debbugs.gnu.org; 21 Jul 2019 19:51:17 +0000 Received: from localhost ([127.0.0.1]:59542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpHrV-0001QY-Ei for submit@debbugs.gnu.org; Sun, 21 Jul 2019 15:51:17 -0400 Received: from pb-smtp20.pobox.com ([173.228.157.52]:50609) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpHrU-0001QP-2P for 36752@debbugs.gnu.org; Sun, 21 Jul 2019 15:51:12 -0400 Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 6A26A86DC3; Sun, 21 Jul 2019 15:51:11 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=sasl; bh=mFKGaBvMELdk yLrIXGGo6YzrqqU=; b=hzrD+0q481F4oQAAwIdBTb2WOkt0linU1iQYw3il9ViC ayU4UP1aZkVoM2r8zDmdXTVAmWJciKlIuIpaKUaKynuRWYZgjPVWgb1BgM8luZS0 xTzn+oRRy35RYox/ZLfzyj+taeXnVyCwaVzQe+kaAtJr73dIO05PKFLWEP3txOE= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 62F5286DC2; Sun, 21 Jul 2019 15:51:11 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:cc:subject:date:message-id:in-reply-to:references:mime-version:content-type:content-transfer-encoding; s=mesmtp; bh=hc9TCmCdzZIh4zPH5iZp6kpIpENpi+oTPmxpfv6YZPE=; b=kEz+HNYApr3qkjZZwyuAY3RSCY4hl8opHL2NjuFld98PtDXzi5jmJhXv4ggL0LthPQ1VNvK3cIDcDqRrRgs8kp1K4UD9lIbTEJe/5YEF1uW6EiBNL6OTa8G1mnUuJBtMpQy+LeDh/eVGGO/ZuPG5nN5qvOlpR+wOWgfQvynoANc= Received: from hylob.fios-router.home (unknown [96.246.193.231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id 4D6EC86DC1; Sun, 21 Jul 2019 15:51:07 -0400 (EDT) (envelope-from kyle@kyleam.com) From: Kyle Meyer Date: Sun, 21 Jul 2019 15:50:57 -0400 Message-Id: <20190721195058.11263-1-kyle@kyleam.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190721194626.10944-1-kyle@kyleam.com> References: <20190721194626.10944-1-kyle@kyleam.com> MIME-Version: 1.0 X-Pobox-Relay-ID: E181CE5A-ABF0-11E9-842C-B0405B776F7B-24757444!pb-smtp20.pobox.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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" X-getmail-retrieved-from-mailbox: Patches git-annex relies on configuring Git's pre-commit and post-receive hooks. Avoid patching the shebang that git-annex embeds when generating these hooks so that the hooks don't fail if garbage collection claims the bash that was current when the annex repository was initialized. * gnu/packages/haskell-apps.scm (git-annex):[arguments]: Patch hook shebangs only temporarily for tests. --- gnu/packages/haskell-apps.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gnu/packages/haskell-apps.scm b/gnu/packages/haskell-apps.scm index d675863090..15a6686ed6 100644 --- a/gnu/packages/haskell-apps.scm +++ b/gnu/packages/haskell-apps.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2018 Arun Isaac ;;; Copyright © 2016, 2017 Leo Famulari ;;; Copyright © 2015 Paul van der Walt +;;; Copyright © 2019 Kyle Meyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -158,8 +159,13 @@ (define-public git-annex '("--flags=-Android -Assistant -Pairing -S3 -Webapp -WebDAV") #:phases (modify-phases %standard-phases - (add-before 'configure 'patch-shell + (add-before 'configure 'patch-shell-for-tests (lambda _ + ;; Shell.hs defines "/bin/sh" that is used in Git hooks. We + ;; shouldn't patch hooks with Guix's current bash because the + ;; hooks can exist after that bash is garbage collected, but + ;; let's temporarily patch it so that we can run the tests. + (copy-file "Utility/Shell.hs" "/tmp/Shell.hs") (substitute* "Utility/Shell.hs" (("/bin/sh") (which "sh"))) #t)) @@ -193,6 +199,11 @@ (define-public git-annex (symlink "git-annex" "git-annex-shell")) (invoke "git-annex" "test") #t)) + (add-after 'check 'unpatch-shell-and-rebuild + (lambda args + ;; Undo `patch-shell-for-tests'. + (copy-file "/tmp/Shell.hs" "Utility/Shell.hs") + (apply (assoc-ref %standard-phases 'build) args))) (add-after 'install 'install-symlinks (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out"))