{"thread":{"id":"47465","subject":"difftool uses hardcoded perl shebang","startedAt":"2017-12-19T13:41:56Z","lastAt":"2017-12-19T17:47:13Z","messageCount":9,"participants":["Jakub Zaverka","Junio C Hamano","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"335018","messageId":"f5d4c8e7bceb410a95a34a8cce4c31dd@deutsche-boerse.com","threadId":"47465","inReplyTo":null,"subject":"difftool uses hardcoded perl shebang","fromName":"Jakub Zaverka","fromEmail":"jakub.zaverka@deutsche-boerse.com","sentAt":"2017-12-19T13:28:09Z","receivedAt":"2017-12-19T13:41:56Z","isPatch":false,"sender":{"key":"jakub.zaverka@deutsche-boerse.com","avatar":null},"body":"The below email is classified: Internal\n\nWhen running git difftool:\n\n>git difftool\nPerl lib version (5.10.0) doesn't match executable version (v5.16.3)\nCompilation failed in require at <path>/git-difftool line 2.\n\nFirst line in my git-difftool is:\n#!/usr/bin/perl\n\nI am using a specific perl that I cannot change. Similarly, I cannot change the git-difftool file. I would like the difftool to use the perl form my PATH. \n\nMaybe it would be better to use #!/usr/bin/env perl?\n-----------------------------------------\nDiese E-Mail enthaelt vertrauliche oder rechtlich geschuetzte Informationen.\nWenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte\nsofort den Absender und loeschen Sie diese E-Mail. Das unbefugte Kopieren\ndieser E-Mail oder die unbefugte Weitergabe der enthaltenen Informationen\nist nicht gestattet.\n\nThe information contained in this message is confidential or protected by\nlaw. If you are not the intended recipient, please contact the sender and\ndelete this message. Any unauthorised copying of this message or\nunauthorised distribution of the information contained herein is prohibited.\n\nLegally required information for business correspondence/\nGesetzliche Pflichtangaben fuer Geschaeftskorrespondenz:\nhttp://deutsche-boerse.com/letterhead\n\n"},{"id":"335023","messageId":"xmqqpo7awvbe.fsf@gitster.mtv.corp.google.com","threadId":"47465","inReplyTo":"f5d4c8e7bceb410a95a34a8cce4c31dd@deutsche-boerse.com","subject":"Re: difftool uses hardcoded perl shebang","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-12-19T16:12:37Z","receivedAt":"2017-12-19T16:12:47Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jakub Zaverka <jakub.zaverka@deutsche-boerse.com> writes:\n\n> The below email is classified: Internal\n\nInternal to what?\n"},{"id":"335024","messageId":"4d6ef097827c434e8c2474fec1e1b9c7@deutsche-boerse.com","threadId":"47465","inReplyTo":"xmqqpo7awvbe.fsf@gitster.mtv.corp.google.com","subject":"RE: difftool uses hardcoded perl shebang","fromName":"Jakub Zaverka","fromEmail":"jakub.zaverka@deutsche-boerse.com","sentAt":"2017-12-19T16:16:19Z","receivedAt":"2017-12-19T16:16:26Z","isPatch":false,"sender":{"key":"jakub.zaverka@deutsche-boerse.com","avatar":null},"body":"Please disregard that line, it just a mailing client attachment. It is completely irrelevant to the matter. \n\n-----Original Message-----\nFrom: Junio C Hamano [mailto:gitster@pobox.com] \nSent: 19 December 2017 17:13\nTo: Jakub Zaverka <jakub.zaverka@deutsche-boerse.com>\nCc: git@vger.kernel.org\nSubject: Re: difftool uses hardcoded perl shebang\n\nJakub Zaverka <jakub.zaverka@deutsche-boerse.com> writes:\n\n> The below email is classified: Internal\n\nInternal to what?\n-----------------------------------------\nDiese E-Mail enthaelt vertrauliche oder rechtlich geschuetzte Informationen.\nWenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte\nsofort den Absender und loeschen Sie diese E-Mail. Das unbefugte Kopieren\ndieser E-Mail oder die unbefugte Weitergabe der enthaltenen Informationen\nist nicht gestattet.\n\nThe information contained in this message is confidential or protected by\nlaw. If you are not the intended recipient, please contact the sender and\ndelete this message. Any unauthorised copying of this message or\nunauthorised distribution of the information contained herein is prohibited.\n\nLegally required information for business correspondence/\nGesetzliche Pflichtangaben fuer Geschaeftskorrespondenz:\nhttp://deutsche-boerse.com/letterhead\n\n"},{"id":"335025","messageId":"20171219162528.GA5804@sigill.intra.peff.net","threadId":"47465","inReplyTo":"f5d4c8e7bceb410a95a34a8cce4c31dd@deutsche-boerse.com","subject":"Re: difftool uses hardcoded perl shebang","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-12-19T16:25:28Z","receivedAt":"2017-12-19T16:25:36Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Dec 19, 2017 at 01:28:09PM +0000, Jakub Zaverka wrote:\n\n> When running git difftool:\n> \n> >git difftool\n> Perl lib version (5.10.0) doesn't match executable version (v5.16.3)\n> Compilation failed in require at <path>/git-difftool line 2.\n> \n> First line in my git-difftool is:\n> #!/usr/bin/perl\n> \n> I am using a specific perl that I cannot change. Similarly, I cannot change the git-difftool file. I would like the difftool to use the perl form my PATH. \n> \n> Maybe it would be better to use #!/usr/bin/env perl?\n\nThis is a build-time knob. When you build git, try:\n\n  make PERL_PATH='/usr/bin/env perl'\n\n(If you don't build your own git, then you might raise the issue with\nwhomever packages your binary).\n\nAs an aside, git-difftool is now a C builtin these days, so the problem\nmight also go away if you upgrade. ;)\n\n-Peff\n"},{"id":"335026","messageId":"xmqqlghywuct.fsf@gitster.mtv.corp.google.com","threadId":"47465","inReplyTo":"20171219162528.GA5804@sigill.intra.peff.net","subject":"Re: difftool uses hardcoded perl shebang","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-12-19T16:33:22Z","receivedAt":"2017-12-19T16:33:31Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> This is a build-time knob. When you build git, try:\n>\n>   make PERL_PATH='/usr/bin/env perl'\n>\n> (If you don't build your own git, then you might raise the issue with\n> whomever packages your binary).\n\nI somehow thought ANYTHING_PATH was meant to point at the exact path\n(as opposed to ANYTHING_COMMAND which is a command line), so it is\nwithin our rights to do\n\n    test -x \"$GIT_EXEC_PATH\" || die \"Your Git installation is broken\"\n\nbut your suggestion above makes such a sanity check impossible.\n\nI'd understand if it were\n\n\tmake PERL_PATH=$(type --path perl)\n\nof course, though.\n\n> As an aside, git-difftool is now a C builtin these days, so the problem\n> might also go away if you upgrade. ;)\n\nYup, true, true.\n"},{"id":"335027","messageId":"20171219164532.GA6745@sigill.intra.peff.net","threadId":"47465","inReplyTo":"xmqqlghywuct.fsf@gitster.mtv.corp.google.com","subject":"Re: difftool uses hardcoded perl shebang","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-12-19T16:45:32Z","receivedAt":"2017-12-19T16:45:38Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Dec 19, 2017 at 08:33:22AM -0800, Junio C Hamano wrote:\n\n> Jeff King <peff@peff.net> writes:\n> \n> > This is a build-time knob. When you build git, try:\n> >\n> >   make PERL_PATH='/usr/bin/env perl'\n> >\n> > (If you don't build your own git, then you might raise the issue with\n> > whomever packages your binary).\n> \n> I somehow thought ANYTHING_PATH was meant to point at the exact path\n> (as opposed to ANYTHING_COMMAND which is a command line), so it is\n> within our rights to do\n> \n>     test -x \"$GIT_EXEC_PATH\" || die \"Your Git installation is broken\"\n> \n> but your suggestion above makes such a sanity check impossible.\n\nHmm, you're right. Though it looks like it is only the test scripts\nwhich actually use this feature. It would be nice if we supported this.\nUnfortunately it's hard to make both of these work:\n\n  make PERL_PATH='/usr/bin/env perl'\n\n  make PERL_PATH='/path with spaces/perl'\n\nWe must protect the spaces in the latter case and treat it as a single\nunit, but would not want to in the former.\n\nIn the meantime, pointing to the actual build-time perl is a workaround\n(but obviously not if it's being done by a third-party packager who has\nno idea where your perl is).\n\n-Peff\n"},{"id":"335028","messageId":"xmqqh8smwspv.fsf@gitster.mtv.corp.google.com","threadId":"47465","inReplyTo":"20171219164532.GA6745@sigill.intra.peff.net","subject":"Re: difftool uses hardcoded perl shebang","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-12-19T17:08:44Z","receivedAt":"2017-12-19T17:08:51Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> In the meantime, pointing to the actual build-time perl is a workaround\n> (but obviously not if it's being done by a third-party packager who has\n> no idea where your perl is).\n\nIs such a binary packaging scheme actually in use that deliberately\nleaves it up to the end user where/if a perl is installed and if it\nis an appropriately recent version?  It sounds rather irresponsible\nto me.\n"},{"id":"335029","messageId":"20171219171253.GA7526@sigill.intra.peff.net","threadId":"47465","inReplyTo":"xmqqh8smwspv.fsf@gitster.mtv.corp.google.com","subject":"Re: difftool uses hardcoded perl shebang","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-12-19T17:12:53Z","receivedAt":"2017-12-19T17:13:00Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Dec 19, 2017 at 09:08:44AM -0800, Junio C Hamano wrote:\n\n> Jeff King <peff@peff.net> writes:\n> \n> > In the meantime, pointing to the actual build-time perl is a workaround\n> > (but obviously not if it's being done by a third-party packager who has\n> > no idea where your perl is).\n> \n> Is such a binary packaging scheme actually in use that deliberately\n> leaves it up to the end user where/if a perl is installed and if it\n> is an appropriately recent version?  It sounds rather irresponsible\n> to me.\n\nNo, I mean that the user can do:\n\n  make PERL_PATH=/path/to/perl/in/my/PATH\n\nbut if they are not building Git themselves, that is not an option for\nthem. And a binary packager cannot help them there, because they do not\nknow that path.\n\n-Peff\n"},{"id":"335031","messageId":"xmqqd13awqxx.fsf@gitster.mtv.corp.google.com","threadId":"47465","inReplyTo":"20171219171253.GA7526@sigill.intra.peff.net","subject":"Re: difftool uses hardcoded perl shebang","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-12-19T17:47:06Z","receivedAt":"2017-12-19T17:47:13Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Tue, Dec 19, 2017 at 09:08:44AM -0800, Junio C Hamano wrote:\n>\n>> Jeff King <peff@peff.net> writes:\n>> \n>> > In the meantime, pointing to the actual build-time perl is a workaround\n>> > (but obviously not if it's being done by a third-party packager who has\n>> > no idea where your perl is).\n>> \n>> Is such a binary packaging scheme actually in use that deliberately\n>> leaves it up to the end user where/if a perl is installed and if it\n>> is an appropriately recent version?  It sounds rather irresponsible\n>> to me.\n>\n> No, I mean that the user can do:\n>\n>   make PERL_PATH=/path/to/perl/in/my/PATH\n>\n> but if they are not building Git themselves, that is not an option for\n> them. And a binary packager cannot help them there, because they do not\n> know that path.\n\nI think we are saying the same thing.  A third-party binary packager\ncannot guess where your custom Perl is nor if it is recent enough.\nI just was wondering if such an irresponsible packaging scheme is in\nuse that lets you install Git without somehow making sure that the\nbox also has a version of Perl that can be used with the version of\nGit.  Then the presence of /path/to/perl/in/my/PATH does not matter,\nas it does not have to be used with Git.\n\n\n"}]}