GNU bug report logs - #25508
Git hook shebangs should not be rewritten

Previous Next

Package: guix;

Reported by: Leo Famulari <leo <at> famulari.name>

Date: Sun, 22 Jan 2017 23:27:01 UTC

Severity: important

Merged with 25304, 26749

Done: Miguel Ángel Arruga Vivas <rosen644835 <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25508 in the body.
You can then email your comments to 25508 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#25508; Package guix. (Sun, 22 Jan 2017 23:27:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo Famulari <leo <at> famulari.name>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sun, 22 Jan 2017 23:27:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: bug-guix <at> gnu.org
Cc: John Darrington <jmd <at> gnu.org>
Subject: Git hook shebangs should not be rewritten
Date: Sun, 22 Jan 2017 18:25:50 -0500
[Message part 1 (text/plain, inline)]
----- Forwarded message from John Darrington <john <at> darrington.wattle.id.au> -----

Date: Sun, 22 Jan 2017 14:01:24 +0100
From: John Darrington <john <at> darrington.wattle.id.au>
To: guix-devel <at> gnu.org
Subject: Not patching shebang in git hook samples ?
User-Agent: Mutt/1.5.23 (2014-03-12)

The git package ships with a number of sample hook files.  These are shell scripts and
therefore the #!/bin/sh line gets substituted at  build time.

However these files get installed into every git repostory that is created, 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: 
#!/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/templates for git.

J'

-- 
Avoid eavesdropping.  Send strong encrypted email.
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.




----- End forwarded message -----
[signature.asc (application/pgp-signature, inline)]

Severity set to 'important' from 'normal' Request was from Jack Hill <jackhill <at> jackhill.us> to control <at> debbugs.gnu.org. (Wed, 18 Mar 2020 20:32:01 GMT) Full text and rfc822 format available.

Merged 25304 25508 26749. Request was from Jack Hill <jackhill <at> jackhill.us> to control <at> debbugs.gnu.org. (Wed, 18 Mar 2020 20:38:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#25508; Package guix. (Mon, 16 Nov 2020 18:12:02 GMT) Full text and rfc822 format available.

Message #12 received at 25508 <at> debbugs.gnu.org (full text, mbox):

From: Miguel Ángel Arruga Vivas <rosen644835 <at> gmail.com>
To: Leo Famulari <leo <at> famulari.name>
Cc: 25304 <at> debbugs.gnu.org, 25508 <at> debbugs.gnu.org, John Darrington <jmd <at> gnu.org>
Subject: Re: bug#25508: Git hook shebangs should not be rewritten
Date: Mon, 16 Nov 2020 19:10:59 +0100
[Message part 1 (text/plain, inline)]
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
[0001-gnu-git-Add-phase-to-restore-hooks-shebang.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
Leo Famulari <leo <at> famulari.name> writes:

> From: John Darrington <john <at> darrington.wattle.id.au>
> Subject: Not patching shebang in git hook samples ?
> To: guix-devel <at> 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 shell scripts and
> therefore the #!/bin/sh line gets substituted at  build time.
>
> However these files get installed into every git repostory that is created, 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: 
> #!/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/templates for git.
>
> J'
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#25508; Package guix. (Mon, 16 Nov 2020 18:43:02 GMT) Full text and rfc822 format available.

Message #15 received at 25508 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <marius <at> gnu.org>
To: Miguel Ángel Arruga Vivas <rosen644835 <at> gmail.com>, Leo
 Famulari <leo <at> famulari.name>
Cc: 25304 <at> debbugs.gnu.org, 25508 <at> debbugs.gnu.org, John Darrington <jmd <at> gnu.org>
Subject: Re: bug#25304: bug#25508: Git hook shebangs should not be rewritten
Date: Mon, 16 Nov 2020 19:42:26 +0100
[Message part 1 (text/plain, inline)]
Miguel Ángel Arruga Vivas <rosen644835 <at> gmail.com> writes:

> 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)?

LGTM.  Git (+ git-minimal) is below the 300 rebuild limit for 'master'
(and I try to keep it that way!).
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#25508; Package guix. (Mon, 16 Nov 2020 20:52:02 GMT) Full text and rfc822 format available.

Message #18 received at 25508 <at> debbugs.gnu.org (full text, mbox):

From: Miguel Ángel Arruga Vivas <rosen644835 <at> gmail.com>
To: Marius Bakke <marius <at> gnu.org>
Cc: 25304 <at> debbugs.gnu.org, 25508 <at> debbugs.gnu.org, John Darrington <jmd <at> gnu.org>,
 Leo Famulari <leo <at> famulari.name>
Subject: Re: bug#25304: bug#25508: Git hook shebangs should not be rewritten
Date: Mon, 16 Nov 2020 21:51:43 +0100
Marius Bakke <marius <at> gnu.org> writes:

> Miguel Ángel Arruga Vivas <rosen644835 <at> gmail.com> writes:
>
>> 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)?
>
> LGTM.  Git (+ git-minimal) is below the 300 rebuild limit for 'master'
> (and I try to keep it that way!).

Thanks for the info and the fast review, I wasn't sure if it was 109+242
or just 242.  I've pushed it to master as
46ce24fb2d8c9f7dce16c4c08919f0fc108dbfae.

Happy hacking!
Miguel




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 15 Dec 2020 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 135 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.