From: Junio C Hamano <hidden> Date: 2016-06-15 22:42:28
"Paolo Ciarrocchi" [off-list ref] writes:
paolo@Italia:~$ cd git/
paolo@Italia:~/git$ git --version
git version 1.3.GIT
paolo@Italia:~/git$ make >/dev/null
paolo@Italia:~/git$ sudo make install >/dev/null
Password:
GIT_VERSION = 1.3.GIT
Unfortunate is we cannot see what this "sudo" did -- does it
successfully run (installed) git to check the "full" version and
manage to store it in ./GIT-VERSION-FILE?
From: Paolo Ciarrocchi <hidden> Date: 2016-06-15 22:42:28
On 5/31/06, Junio C Hamano [off-list ref] wrote:
"Paolo Ciarrocchi" [off-list ref] writes:
quoted
paolo@Italia:~$ cd git/
paolo@Italia:~/git$ git --version
git version 1.3.GIT
paolo@Italia:~/git$ make >/dev/null
paolo@Italia:~/git$ sudo make install >/dev/null
Password:
GIT_VERSION = 1.3.GIT
Unfortunate is we cannot see what this "sudo" did -- does it
successfully run (installed) git to check the "full" version and
manage to store it in ./GIT-VERSION-FILE?
From: Paolo Ciarrocchi <hidden> Date: 2016-06-15 22:42:28
On 5/31/06, Paolo Ciarrocchi [off-list ref] wrote:
> So yes, it's correctly installed (I pull, compile and install almost
daily always without any problem).
Tried with:
make clean
make && sudo make install
[...]
paolo@Italia:~/git$ git --version
git version 1.3.GIT
paolo@Italia:~/git$ ./GIT-VERSION-GEN
GIT_VERSION = 1.3.3.g2186
Puzzled.
--
Paolo
http://paolociarrocchi.googlepages.com
Why are you doing a "sudo" when you install in your own ~/bin (the default
for git).
The whole point of installing in ~/bin is to not need any elevated
priorities.
I get the feeling that you might have installed something in /usr/bin/ or
/usr/local/bin earlier, and that they are before ~/bin in your PATH.
Linus
From: Paolo Ciarrocchi <hidden> Date: 2016-06-15 22:42:28
On 5/31/06, Linus Torvalds [off-list ref] wrote:
On Wed, 31 May 2006, Paolo Ciarrocchi wrote:
quoted
[...]
install git gitk '/home/paolo/bin'
Why are you doing a "sudo" when you install in your own ~/bin (the default
for git).
Good question :-)
Just because I'm used to do that but you are absolutelly right saying
that is wrong.
The whole point of installing in ~/bin is to not need any elevated
priorities.
I get the feeling that you might have installed something in /usr/bin/ or
/usr/local/bin earlier, and that they are before ~/bin in your PATH.
I don't think so since:
paolo@Italia:~/git$ which git
/home/paolo/bin/git
But I'll do a make && make install in a minute.
Thanks!
Ciao,
--
Paolo
http://paolociarrocchi.googlepages.com
From: Paolo Ciarrocchi <hidden> Date: 2016-06-15 22:42:28
On 5/31/06, Paolo Ciarrocchi [off-list ref] wrote:
On 5/31/06, Linus Torvalds [off-list ref] wrote:
quoted
On Wed, 31 May 2006, Paolo Ciarrocchi wrote:
quoted
Tried with:
make clean
make && sudo make install
[...]
paolo@Italia:~/git$ git --version
git version 1.3.GIT
paolo@Italia:~/git$ ./GIT-VERSION-GEN
GIT_VERSION = 1.3.3.g2186
What does
git describe
paolo@Italia:~/git$ git describe
v1.3.3-g2186d56
quoted
./git --version
paolo@Italia:~/git$ ./git --version
git version 1.3.3.g2186
Doh..
quoted
which git
paolo@Italia:~/git$ which git
/home/paolo/bin/git
Ok...
make && make install
Now I get:
paolo@Italia:~$ git --version
git version 1.3.3.g2186
That is correct.
But I'm still wondering why doing sudo make install caused that
problem, git was correcly installed in /home/paolo/git
Really puzzled.
Ciao,
--
Paolo
http://paolociarrocchi.googlepages.com
paolo@Italia:~/git$ ./git --version
git version 1.3.3.g2186
Doh..
Ok, that's also good.
quoted
which git
paolo@Italia:~/git$ which git
/home/paolo/bin/git
I think I know what's up.
Your "sudo" made "$HOME" be /root. So by doing "sudo make install", you
installed the git in _roots_ ~/bin, ie /root/bin/.
Linus
From: Paolo Ciarrocchi <hidden> Date: 2016-06-15 22:42:28
On 5/31/06, Linus Torvalds [off-list ref] wrote:
On Wed, 31 May 2006, Paolo Ciarrocchi wrote:
quoted
quoted
git describe
paolo@Italia:~/git$ git describe
v1.3.3-g2186d56
Ok.
quoted
quoted
./git --version
paolo@Italia:~/git$ ./git --version
git version 1.3.3.g2186
Doh..
Ok, that's also good.
quoted
quoted
which git
paolo@Italia:~/git$ which git
/home/paolo/bin/git
I think I know what's up.
Your "sudo" made "$HOME" be /root. So by doing "sudo make install", you
installed the git in _roots_ ~/bin, ie /root/bin/.
Doh... not sure to follow you, just did:
sudo make install
paolo@Italia:~/git$ ls /root/
paolo@Italia:~/git$ git --version
git version 1.3.GIT
--
Paolo
http://paolociarrocchi.googlepages.com
From: Paolo Ciarrocchi <hidden> Date: 2016-06-15 22:42:28
On 5/31/06, Paolo Ciarrocchi [off-list ref] wrote:
On 5/31/06, Linus Torvalds [off-list ref] wrote:
quoted
On Wed, 31 May 2006, Paolo Ciarrocchi wrote:
quoted
quoted
git describe
paolo@Italia:~/git$ git describe
v1.3.3-g2186d56
Ok.
quoted
quoted
./git --version
paolo@Italia:~/git$ ./git --version
git version 1.3.3.g2186
Doh..
Ok, that's also good.
quoted
quoted
which git
paolo@Italia:~/git$ which git
/home/paolo/bin/git
I think I know what's up.
Your "sudo" made "$HOME" be /root. So by doing "sudo make install", you
installed the git in _roots_ ~/bin, ie /root/bin/.
Doh... not sure to follow you, just did:
sudo make install
paolo@Italia:~/git$ ls /root/
paolo@Italia:~/git$ git --version
git version 1.3.GIT
And even more intersting:
make clean && make && sudo make install
git --version
git version 1.3.GIT
make install
[...]
mv git-cherry-pick+ git-cherry-pick
mv: sovrascrivo `git-cherry-pick' ignorando il modo 0755?
that in english is something like:
mv: overwrite `git-cherry-pick' ignoring mod 0755?
Wow...of course, make clean && make install fix everything
Ciao,
--
Paolo
http://paolociarrocchi.googlepages.com
From: Paolo Ciarrocchi <hidden> Date: 2016-06-15 22:42:28
On 5/31/06, Paolo Ciarrocchi [off-list ref] wrote:
[...]
And even more intersting:
make clean && make && sudo make install
git --version
git version 1.3.GIT
make install
[...]
mv git-cherry-pick+ git-cherry-pick
mv: sovrascrivo `git-cherry-pick' ignorando il modo 0755?
that in english is something like:
mv: overwrite `git-cherry-pick' ignoring mod 0755?
Wow...of course, make clean && make install fix everything
Thanks to loops on #git for asking me to do the following test:
<PaoloC> paolo@Italia:~/git$ sudo ./GIT-VERSION-GEN
<PaoloC> GIT_VERSION = 1.3.GIT
<PaoloC> paolo@Italia:~/git$ ./GIT-VERSION-GEN
<PaoloC> GIT_VERSION = 1.3.3.g2186
I don't know why it's happening...
--
Paolo
http://paolociarrocchi.googlepages.com
Thanks to loops on #git for asking me to do the following test:
<PaoloC> paolo@Italia:~/git$ sudo ./GIT-VERSION-GEN
<PaoloC> GIT_VERSION = 1.3.GIT
<PaoloC> paolo@Italia:~/git$ ./GIT-VERSION-GEN
<PaoloC> GIT_VERSION = 1.3.3.g2186
I don't know why it's happening...
Heh. You don't have git in your PATH as root. So as root you don't know
what version of git you have ;)
Linus
From: Paolo Ciarrocchi <hidden> Date: 2016-06-15 22:42:28
On 5/31/06, Paolo Ciarrocchi [off-list ref] wrote:
On 5/31/06, Paolo Ciarrocchi [off-list ref] wrote:
[...]
quoted
And even more intersting:
make clean && make && sudo make install
git --version
git version 1.3.GIT
make install
[...]
mv git-cherry-pick+ git-cherry-pick
mv: sovrascrivo `git-cherry-pick' ignorando il modo 0755?
that in english is something like:
mv: overwrite `git-cherry-pick' ignoring mod 0755?
Wow...of course, make clean && make install fix everything
Thanks to loops on #git for asking me to do the following test:
<PaoloC> paolo@Italia:~/git$ sudo ./GIT-VERSION-GEN
<PaoloC> GIT_VERSION = 1.3.GIT
<PaoloC> paolo@Italia:~/git$ ./GIT-VERSION-GEN
<PaoloC> GIT_VERSION = 1.3.3.g2186
I don't know why it's happening...
Ok, thanks to the people living in #git!!
the problem is the following, from GIT-VERSION-GEN:
#!/bin/sh
GVF=GIT-VERSION-FILE
DEF_VER=v1.3.GIT
# First try git-describe, then see if there is a version file
# (included in release tarballs), then default
if VN=$(git describe --abbrev=4 HEAD 2>/dev/null); then
VN=$(echo "$VN" | sed -e 's/-/./g');
elif test -f version
then
VN=$(cat version) || VN="$DEF_VER"
else
VN="$DEF_VER"
fi
paolo@Italia:~/git$ git describe --abbrev=4 HEAD
v1.3.3-g2186
but...
paolo@Italia:~/git$ sudo git describe --abbrev=4 HEAD
sudo: git: command not found
that's because:
paolo@Italia:~/git$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games:/home/paolo/bin
but...
paolo@Italia:~/git$ sudo sh
sh-3.1# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
Don't know whay $PATH are different but at least why I know why git
has that strange behaviour.
Ciao,
--
Paolo
http://paolociarrocchi.googlepages.com
See ENVIRONMENT in the sudo man-page:
PATH Set to a sane value if sudo was configured with
the --with-secure-path option
so apparently your distro builds sudo with "--with-secure-path".
Linus
From: Paolo Ciarrocchi <hidden> Date: 2016-06-15 22:42:28
On 5/31/06, Linus Torvalds [off-list ref] wrote:
On Wed, 31 May 2006, Paolo Ciarrocchi wrote:
quoted
Don't know whay $PATH are different
See ENVIRONMENT in the sudo man-page:
PATH Set to a sane value if sudo was configured with
the --with-secure-path option
so apparently your distro builds sudo with "--with-secure-path".