git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Problems installing as root

From
Shawn O. Pearce <spearce@spearce.org>
Date
Feb 26, 2007, 02:10 UTC
Message-ID
<20070226021053.GB1884@spearce.org>
In-Reply-To
<ersapr$bu5$1@sea.gmane.org>
walt <wa1ter@myrealbox.com> wrote:
Show 9 quoted lines
> Shawn O. Pearce wrote:
> > walt <wa1ter@myrealbox.com> wrote:
> >> First, 'make install' as root leaves dozens of files owned by root
> >> in my personal source directory.
> 
> > Which files, specifically? ...
> 
> ~/src/git $find . -user 0
> ./git-fsck-objects
...+100 files...
This is caused by below...
Show 14 quoted lines
> >> Second, this is a more recent problem with 'make install':
> >> make -C git-gui all
> >> make[1]: Entering directory `/usr/local/mnt/wa1ter/src/git/git-gui'
> >> GITGUI_VERSION = 0.6.GITGUI
> 
> > Hmm.  You can't get the right version number for git-gui.  Do you
> > have tags fetched?
> 
> Oops.  I stupidly forgot to tell you the reason for the failure
> when running the script as root:  /usr/local is not in root's path,
> and thus /usr/local/bin/git-* can't be found.  Since the script
> assumes that git is already installed and working, I would guess
> that it would also fail if I had just fetched Junio's repository
> for the first time and attempted an initial install.

Right. So what is happening is the toplevel Makefile tries to run GIT-VERSION-GEN to obtain the version, that calls git-describe, which does not exist, fails, and falls back on the hardcoded version number. That version number differs from what the software was compiled with, so it gets recompiled. Instant set of +100 files owned by root.

Same issue happens down inside of git-gui.
I think the only answer I have for you is the following:
  If you want to run the Makefile without having git in your path
  then make a tarball first (make dist) with Git in your path,
  then unpack the tarball and compile that.
  This works as the tarball embeds version and credits files that
  sidestep the need for git-describe.
-- 
Shawn.
Previous: waltNext: Junio C Hamano
Message 9 of 11 in “Problems installing as root”
  1. waltFeb 24, 2007
  2. Shawn O. PearceFeb 25, 2007
  3. Junio C HamanoFeb 25, 2007
  4. Shawn O. PearceFeb 25, 2007
  5. Junio C HamanoFeb 25, 2007
  6. Shawn O. PearceFeb 25, 2007
  7. Junio C HamanoFeb 25, 2007
  8. waltFeb 25, 2007
  9. Shawn O. PearceFeb 26, 2007
  10. Junio C HamanoFeb 25, 2007
  11. waltFeb 26, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.