From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 4HrfM//Asl9ATQAA0tVLHw (envelope-from ) for ; Mon, 16 Nov 2020 18:12:15 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id +HSkL//Asl9MGQAAbx9fmQ (envelope-from ) for ; Mon, 16 Nov 2020 18:12:15 +0000 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 282E69404C6 for ; Mon, 16 Nov 2020 18:12:15 +0000 (UTC) Received: from localhost ([::1]:49768 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1keiz5-0004d3-SN for larch@yhetil.org; Mon, 16 Nov 2020 13:12:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33154) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1keiyw-0004b1-VO for bug-guix@gnu.org; Mon, 16 Nov 2020 13:12:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45606) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1keiyw-0008F1-LZ for bug-guix@gnu.org; Mon, 16 Nov 2020 13:12:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1keiyw-0007oX-E1 for bug-guix@gnu.org; Mon, 16 Nov 2020 13:12:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#25304: bug#25508: Git hook shebangs should not be rewritten Resent-From: Miguel =?UTF-8?Q?=C3=81ngel?= Arruga Vivas Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 16 Nov 2020 18:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25304 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Leo Famulari Received: via spool by 25304-submit@debbugs.gnu.org id=B25304.160555028629984 (code B ref 25304); Mon, 16 Nov 2020 18:12:02 +0000 Received: (at 25304) by debbugs.gnu.org; 16 Nov 2020 18:11:26 +0000 Received: from localhost ([127.0.0.1]:57150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keiyL-0007nY-Rz for submit@debbugs.gnu.org; Mon, 16 Nov 2020 13:11:26 -0500 Received: from mail-wm1-f52.google.com ([209.85.128.52]:37618) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keiyK-0007nI-7d; Mon, 16 Nov 2020 13:11:25 -0500 Received: by mail-wm1-f52.google.com with SMTP id h21so185470wmb.2; Mon, 16 Nov 2020 10:11:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=t6mHTqOpjD0Rw+3MOX/YWm9ZH4LZHHwtmHBIDD7SnBY=; b=hSyVgf7pzqVA6Rzuyd+oyVq1u99q4I5irhp9VhO7hmy1o17sEEx90fEmXtHTtHhdee JGHQUT8i6wYb6Ho2WnNtuCywPDJ5gj1xgJCu2Rw0Qw5Zo+mliT3P1f/1vi5Mt00fJRhT mJDD7fH46idXIB+RWVGZjSDrs2ypnPTNdos8IO73st5VaXhn18UITemBPMgtw5Z8i6jD +yxGW+QE0OkGqgtM1RAl3p8FDE0AfKDph0j34arwP9wWPzuqC7aiYbVc8XbY5TiF/Zcf hNJjPe6kMhM/nckdAJIxnINZjHzERU75zdCEKUjL6WkrgejvFJqx8kGSZ0TgYiSuE8l5 T5lQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=t6mHTqOpjD0Rw+3MOX/YWm9ZH4LZHHwtmHBIDD7SnBY=; b=Z07+gh/lQ79kDIXAtlAvbvLO4O6uP/jAJxDotzmy5qUEpTMl17NlOOkzfmoR1sk44J lgnAZpoKr8t0fFgyNtQaX8E/zLq1piKW6Q2SgFrGLwszzDtRoQlfDdkAuxkG9mWTKQSd D6uzzJthXIPBaeISjnA7CI3cYkolIFRAgceO2FxQCIpUzJbtvK5XyD7LBrbCXX4fazor RuqTpwNMntenqIHv1RDBxBRZz57Cpf5mNQdniPyZHBz6wGddvSSi6T2YcQFvsBrwbmva jj8kTUOYHTEn6XrwIUmxdetOFeZ4QaRpN+L5IMymaKwHVbJpRz/orIFLOT9Pa7KQ+bkP fxkw== X-Gm-Message-State: AOAM530oURmHb4shKfbt1KVGMBfsG3kffjwrIyIuFqBx11CxtlPoEWWv 6iM6JoMMG+xXyDldL55OlDQ= X-Google-Smtp-Source: ABdhPJzHlpJ8yFO8TraNqp/sqX9kJAQvjgHKmbH5dxwo7oYbbdtUf3dI92t+/i6GbGl4FeajXwAoiw== X-Received: by 2002:a7b:ce99:: with SMTP id q25mr131738wmj.35.1605550278448; Mon, 16 Nov 2020 10:11:18 -0800 (PST) Received: from unfall (20.134.94.90.dynamic.jazztel.es. [90.94.134.20]) by smtp.gmail.com with ESMTPSA id b8sm25669015wrv.57.2020.11.16.10.11.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2020 10:11:17 -0800 (PST) From: Miguel =?UTF-8?Q?=C3=81ngel?= Arruga Vivas References: <20170122232550.GB27876@jasmine> Date: Mon, 16 Nov 2020 19:10:59 +0100 In-Reply-To: <20170122232550.GB27876@jasmine> (Leo Famulari's message of "Sun, 22 Jan 2017 18:25:50 -0500") Message-ID: <87r1otw4ss.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -0.8 (/) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 25304@debbugs.gnu.org, 25508@debbugs.gnu.org, John Darrington Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=gmail.com header.s=20161025 header.b=hSyVgf7p; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: -2.01 X-TUID: cQ+ENJwtKerr --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Sorry, I've closed this with the libtool one. The attached patch fixes this one too, should I push it to master (as the last change for git) or to core-updates or staging (as it might seem looking at the dependencies)? Happy hacking! Miguel --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-git-Add-phase-to-restore-hooks-shebang.patch Content-Transfer-Encoding: quoted-printable Content-Description: 0001.patch From=209f0e9eea6d7c338fba234c2f8935ba76b1d94b2c Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Miguel=3D20=3DC3=3D81ngel=3D20Arruga=3D20Vivas?=3D Date: Mon, 16 Nov 2020 19:06:40 +0100 Subject: [PATCH] gnu: git: Add phase to restore hooks shebang. Fixes . * gnu/packages/version-control.scm (git)[arguments]: New phase restore-sample-hooks-shebang. =2D-- gnu/packages/version-control.scm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-contro= l.scm index 3e46a6162b..1842528ff6 100644 =2D-- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -391,6 +391,16 @@ as well as the classic centralized workflow.") (install-file "contrib/subtree/git-subtree.1" (string-append subtree "/share/man/man1")) #t))) + (add-after 'install 'restore-sample-hooks-shebang + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (dir (string-append out "/share/git-core/templates/hoo= ks"))) + (for-each (lambda (file) + (format #t "restoring shebang on `~a'~%" file) + (substitute* file + (("^#!.*/bin/sh") "#!/bin/sh"))) + (find-files dir ".*")) + #t))) (add-after 'install 'split (lambda* (#:key inputs outputs #:allow-other-keys) ;; Split the binaries to the various outputs. =2D-=20 2.29.2 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Leo Famulari writes: > From: John Darrington > Subject: Not patching shebang in git hook samples ? > To: guix-devel@gnu.org > Date: Sun, 22 Jan 2017 14:01:24 +0100 (3 years, 42 weeks, 4 days ago) > > The git package ships with a number of sample hook files. These are shel= l scripts and > therefore the #!/bin/sh line gets substituted at build time. > > However these files get installed into every git repostory that is create= d, and users > are invited to use them as templates for their own hooks. > > This will be fine until both git and bash are updated. Now the original = bash is free > to be garbage collected. If that happens, the path:=20 > #!/gnu/store/qkw4zrwfybxww8f56nkb6hggxambk89b-bash-4.4.0/bin/sh > will no longer exist. > > I suggest what we turn off the shebang patching for the files in share/te= mplates for git. > > J' --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAEBCgAdFiEEiIeExBRZrMuD5+hMY0xuiXn6vsIFAl+ywLQACgkQY0xuiXn6 vsI5hQv+IfRGaTZ7A0Ulzdy54BxcVq/asGgJUcAG8HU/cZbxQDSjmbcWXoIomrI8 PyvVVmoFwm6RVFKvCZCFqFVIeKMzPZOjgWLV2gRLwBH1VR+oQG+1LT7WTULL8fGB 6ToYkKWqE3d7sZnE5J+jFjVclCXUVyzySIW0cCBT8jXei9sOTnO8+nby9/aBwMpT +1sMz2qGZ4XR8arXPQnp1duDaBrqq4hPOcsMUH2NL86Widf3EkJ0F+CskU0z/Bi8 jufRuZcy9OfQXUHqoVOEvS9catdq9IAR4rGaYhRMHUiq796Bka232kATYkpTmjZz pMFxyQNUkDQtRCVt8devE54Xliy6OTPD3w0RRn/3s78XKyCVCim2JQK0+40cDDHh dnrUN1tkZ87ggHw1xth2NVdi4eKlKIqB4mAClH9QRyF2yW0EzGmjE27Lxbb3e9aM +nSZHYo52VbKbUVGVkgmBwT9el9zGG/YcIbfO3oM71Pe18Xmmf7KropfvKgVhqaz AAPVvykG =3IH3 -----END PGP SIGNATURE----- --==-=-=--