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

Re: Does Git build things during 'make install"?

From
Johannes Sixt <j6t@kdbg.org>
Date
Oct 16, 2017, 05:58 UTC
Message-ID
<0ec353db-428c-bb6f-03fe-303487fde197@kdbg.org>
In-Reply-To
<CAH8yC8kx9Td51=UFvLwLAQFPKxUXg0D6KKqWR+JX+-wmTAKYRQ@mail.gmail.com>
Am 16.10.2017 um 07:05 schrieb Jeffrey Walton:
Show 27 quoted lines
> My script to build Git dies during cleanup. Cleanup removes the
> downloaded tarball and the unpacked directory:
> 
> ********** Cleanup **********
> 
> rm: cannot remove 'git-2.14.2/perl/blib/lib/.exists': Permission denied
> rm: cannot remove 'git-2.14.2/perl/blib/lib/Git/SVN/Fetcher.pm':
> Permission denied
> rm: cannot remove 'git-2.14.2/perl/blib/lib/Git/SVN/Utils.pm': Permission denied
> rm: cannot remove 'git-2.14.2/perl/blib/lib/Git/SVN/Ra.pm': Permission denied
> rm: cannot remove 'git-2.14.2/perl/blib/lib/Git/SVN/GlobSpec.pm':
> Permission denied
> ...
> 
> When I look at the permissions:
> 
> $ ls -Al git-2.14.2/perl/blib/lib/.exists
> -rw-r--r--   1 root     root           0 Oct 16 00:43
> git-2.14.2/perl/blib/lib/.exists
> 
> The only place in my script that does anything with privileges is
> 'make install' because it runs with sudo.
> 
> Is Git building things in the install recipe? If so, then I don't
> believe that's supposed to happen. According to the GNU coding
> standards, Git should not be doing that. Cf;
> https://www.gnu.org/prep/standards/html_node/Standard-Targets.html.

Yes, running "sudo make install" is a nightmare. sudo clears the path, and the git command is not found by the make invoked with root permissions. This changes the version string that gets compiled into the executable, which finally triggers a complete rebuild under root. Sad...

-- Hannes
Previous: Jeffrey WaltonNext: Junio C Hamano
Message 2 of 4 in “Does Git build things during 'make install"?”
  1. Jeffrey WaltonOct 16, 2017
  2. Johannes SixtOct 16, 2017
  3. Junio C HamanoOct 16, 2017
  4. Johannes SixtOct 16, 2017

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.