Re: [PATCH] To make GIT-VERSION-FILE, search for git more widely
- From
- Matthias Andree <matthias.andree@gmx.de>
- Date
- May 7, 2009, 09:13 UTC
- Message-ID
- <op.utjykjwx1e62zd@merlin.emma.line.org>
- In-Reply-To
- <4A02A39A.3000407@drmicha.warpmail.net>
Am 07.05.2009, 11:02 Uhr, schrieb Michael J Gruber <git@drmicha.warpmail.net>:
Show 27 quoted lines
> Johannes Sixt venit, vidit, dixit 07.05.2009 10:47: >> Junio C Hamano schrieb: >>> Matthias Andree <matthias.andree@gmx.de> writes: >>> >>>> Problem: when git is installed into /usr/local/bin, running 'sudo make >>>> install' won't find git in $PATH (because sudo strips PATH, for >>>> instance >>>> on openSUSE 11.1, and doesn't include /usr/local/whatever). >>> >>> That sounds like a bug/misfeature in sudo (which I do not use) to me. >> >> sudo resets the environment, in particular also PATH. Why would this be >> a bug? >> >> Current distros set env_reset in /etc/soduers for a reason. Not that I >> know the reason in detail, but I won't claim that I'm more clever with >> regards to security issues than distro packagers; so I trust that if >> they >> do it, then it makes sense. >> >> -- Hannes > > sudo's behaviour is fine, but the OP's is not: doing "sudo make install" > amounts to building git as root, unless you have done a make as non-root > before. If you have done that make then GIT-VERSION-FILE will be > up-to-date, and GIT-VERSION-GEN will not even be called by "make > install".
Michael,
believe me that I've thoroughly analyzed this before proposing the change.
More details in the followup - I need to fix the commit message :-)
> So I think the proposed patch would encourage wrong behaviour. (also, > the commit message mixes up ...-GEN and ...-FILE)
Whoops, good catch. PATCH v3 in a minute.
Best regards
-- Matthias Andree