{"thread":{"id":"21288","subject":"Extra checks for PERL_PATH and SHELL_PATH?","startedAt":"2009-10-20T03:50:51Z","lastAt":"2009-10-20T16:33:07Z","messageCount":5,"participants":["Matt Kraai","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"125438","messageId":"20091020035051.GA3237@ftbfs.org","threadId":"21288","inReplyTo":null,"subject":"Extra checks for PERL_PATH and SHELL_PATH?","fromName":"Matt Kraai","fromEmail":"kraai@ftbfs.org","sentAt":"2009-10-20T03:50:51Z","receivedAt":"2009-10-20T03:50:51Z","isPatch":false,"sender":{"key":"kraai@ftbfs.org","avatar":null},"body":"Hi,\n\nThe top-level Makefile currently contains\n\n> ifndef SHELL_PATH\n> \tSHELL_PATH = /bin/sh\n> endif\n> ifndef PERL_PATH\n> \tPERL_PATH = /usr/bin/perl\n> endif\n\nThe checks are only necessary if these variables need to be overridden\nby environment variables, not just via the make command line.  Is this\nthe case?\n\n-- \nMatt Kraai                                           http://ftbfs.org/\n"},{"id":"125446","messageId":"7vr5syshat.fsf@alter.siamese.dyndns.org","threadId":"21288","inReplyTo":"20091020035051.GA3237@ftbfs.org","subject":"Re: Extra checks for PERL_PATH and SHELL_PATH?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-10-20T06:36:26Z","receivedAt":"2009-10-20T06:36:26Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matt Kraai <kraai@ftbfs.org> writes:\n\n> The top-level Makefile currently contains\n>\n>> ifndef SHELL_PATH\n>> \tSHELL_PATH = /bin/sh\n>> endif\n>> ifndef PERL_PATH\n>> \tPERL_PATH = /usr/bin/perl\n>> endif\n>\n> The checks are only necessary if these variables need to be overridden\n> by environment variables, not just via the make command line.  Is this\n> the case?\n\nIt may not have been the original intention, but the above would mean that\nsome people may have learned to run \"SHELL_PATH=/bin/ksh make\" and\nchanging it would break things for them, no?\n\nI do not think changing them is bad per-se, but we would need to add extra\nwarnings in the release note to explain this change, that's all.  This\nwould only affect people who build from the source (including distro\npeople) so it is not really a big deal.\n"},{"id":"125459","messageId":"1256029588-24128-1-git-send-email-kraai@ftbfs.org","threadId":"21288","inReplyTo":"7vr5syshat.fsf@alter.siamese.dyndns.org","subject":"[PATCH] Makefile: set PERL_PATH and SHELL_PATH unconditionally","fromName":"Matt Kraai","fromEmail":"kraai@ftbfs.org","sentAt":"2009-10-20T09:06:28Z","receivedAt":"2009-10-20T09:06:28Z","isPatch":true,"sender":{"key":"kraai@ftbfs.org","avatar":null},"body":"Do not check whether PERL_PATH and SHELL_PATH are undefined before\nsetting their default values.  This prevents them from being set via\nenvironment variables.\n\nSigned-off-by: Matt Kraai <kraai@ftbfs.org>\n---\n On Mon, Oct 19, 2009 at 11:36:26PM -0700, Junio C Hamano wrote:\n > Matt Kraai <kraai@ftbfs.org> writes:\n > \n > > The top-level Makefile currently contains\n > >\n > >> ifndef SHELL_PATH\n > >> \tSHELL_PATH = /bin/sh\n > >> endif\n > >> ifndef PERL_PATH\n > >> \tPERL_PATH = /usr/bin/perl\n > >> endif\n > >\n > > The checks are only necessary if these variables need to be overridden\n > > by environment variables, not just via the make command line.  Is this\n > > the case?\n > \n > It may not have been the original intention, but the above would mean that\n > some people may have learned to run \"SHELL_PATH=/bin/ksh make\" and\n > changing it would break things for them, no?\n\n Yes, that's what I was concerned about.  This appears to be possible\n for PERL_PATH on all platforms and for SHELL_PATH on platforms other\n than SCO UnixWare, SunOS, and IRIX.\n\n > I do not think changing them is bad per-se, but we would need to add extra\n > warnings in the release note to explain this change, that's all.  This\n > would only affect people who build from the source (including distro\n > people) so it is not really a big deal.\n\n I hope this patch is OK.\n\n Documentation/RelNotes-1.6.6.txt |    3 +++\n Makefile                         |    8 ++------\n 2 files changed, 5 insertions(+), 6 deletions(-)\n\ndiff --git a/Documentation/RelNotes-1.6.6.txt b/Documentation/RelNotes-1.6.6.txt\nindex 5f1fecb..bfda14c 100644\n--- a/Documentation/RelNotes-1.6.6.txt\n+++ b/Documentation/RelNotes-1.6.6.txt\n@@ -58,3 +58,6 @@ release, unless otherwise noted.\n    whitespace attribute).  The 'trailing-space' whitespace error class has\n    become a short-hand to cover both of these and there is no behaviour\n    change for existing set-ups.\n+\n+ * PERL_PATH and SHELL_PATH may not be overridden using environment\n+   variables during the build.\ndiff --git a/Makefile b/Makefile\nindex 42b7d60..5bac305 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -392,12 +392,8 @@ ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS)\n OTHER_PROGRAMS = git$X\n \n # Set paths to tools early so that they can be used for version tests.\n-ifndef SHELL_PATH\n-\tSHELL_PATH = /bin/sh\n-endif\n-ifndef PERL_PATH\n-\tPERL_PATH = /usr/bin/perl\n-endif\n+SHELL_PATH = /bin/sh\n+PERL_PATH = /usr/bin/perl\n \n export PERL_PATH\n \n-- \n1.6.5\n"},{"id":"125486","messageId":"7vtyxuox7u.fsf@alter.siamese.dyndns.org","threadId":"21288","inReplyTo":"1256029588-24128-1-git-send-email-kraai@ftbfs.org","subject":"Re: [PATCH] Makefile: set PERL_PATH and SHELL_PATH unconditionally","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-10-20T16:18:29Z","receivedAt":"2009-10-20T16:18:29Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matt Kraai <kraai@ftbfs.org> writes:\n\n> Do not check whether PERL_PATH and SHELL_PATH are undefined before\n> setting their default values.  This prevents them from being set via\n> environment variables.\n\nIs there an upside of \"preventing them from getting set\", by the way?\n"},{"id":"125496","messageId":"20091020163307.GA5208@ftbfs.org","threadId":"21288","inReplyTo":"7vtyxuox7u.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Makefile: set PERL_PATH and SHELL_PATH unconditionally","fromName":"Matt Kraai","fromEmail":"kraai@ftbfs.org","sentAt":"2009-10-20T16:33:07Z","receivedAt":"2009-10-20T16:33:07Z","isPatch":true,"sender":{"key":"kraai@ftbfs.org","avatar":null},"body":"On Tue, Oct 20, 2009 at 09:18:29AM -0700, Junio C Hamano wrote:\n> Matt Kraai <kraai@ftbfs.org> writes:\n> \n> > Do not check whether PERL_PATH and SHELL_PATH are undefined before\n> > setting their default values.  This prevents them from being set via\n> > environment variables.\n> \n> Is there an upside of \"preventing them from getting set\", by the way?\n\nNot that I know of.\n\nI originally thought that the checks were superfluous, but now I just\nbelieve they're inconsistent and confusing to people like me who think\nthey understand Makefiles but don't.  :)\n\n-- \nMatt Kraai                                             http://ftbfs.org/\n"}]}