threads / discuss / 2413

Problem with template location

Subject: Problem with template location

## tl;dr

4 messages between Nov 9, 2005 and Nov 9, 2005.

replies: 3people: 4as markdown or json

Alan Chandler· Nov 9, 2005, 20:45 UTC · lore

I am trying to set up a public repository on my server to which I can push stuff

I have just downloaded the git-core-0.99f-tar.bz2 file and untarred it as me (alan) on account on the server. My home directory is at /home/alan

Went in as me into the git-core-0.99f directory and did a make
Then became ROOT and did 
make prefix=/usr/local install
(I also built the documentation but I don't think that is relevent)

Separately AS ROOT I have gone into the directory where I am going to build my repositories (/var/lib/git) and tried to build the repository as per the tutorial.

roo:/var/lib/git# mkdir famtree.git roo:/var/lib/git# GIT_DIR=famtree.git git-init-db warning: templates not found /home/alan/share/git-core/templates/ roo:/var/lib/git#

git-init-db seems to have got the wrong place for the templates - ie the account where I originally built the code.

(NOTE: the templates have actually been installed in /usr/local/share/git-core/templates)

I had to do a make clean, but following that I did
make prefix=/usr/local 

for the first part, and then re-installed (also with the prefix) and it solves the problem

I don't know whether this is something that can be fixed at install time, or whether the README should be changed to make it clear that you need the prefix on the first stage of the process as well as the second.

-- 
Alan Chandler
http://www.chandlerfamily.org.uk
Open Source. It's the difference between trust and antitrust.
Jon Loeliger· Nov 9, 2005, 21:06 UTC · re: Alan Chandler · lore

Re: Problem with template location

On Wed, 2005-11-09 at 14:45, Alan Chandler wrote:
Show 6 quoted lines
> 
> Went in as me into the git-core-0.99f directory and did a make
> 
> Then became ROOT and did 
> 
> make prefix=/usr/local install

I don't know. There is something so... so... synchronatic about this all... :-)

jdl
Junio C Hamano· Nov 9, 2005, 21:29 UTC · re: Alan Chandler · lore

Re: Problem with template location

Alan Chandler <alan@chandlerfamily.org.uk> writes:
> I don't know whether this is something that can be fixed at install time, or 
> whether the README should be changed to make it clear that you need the 
> prefix on the first stage of the process as well as the second.

Thanks Alan and Jon. This seems to be hitting some people so here is what I plan to push out.

-- >8 -- cut here -- >8 --
Subject: Update INSTALL

Explicitly mention how to install by hand in build-as-user and install-as-root steps.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 INSTALL |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

applies-to: 132cf7a143b9ed08e69399da6caa0c627d26f181 c44922a7817398d63bb2b46dc599bd05c710e746

diff --git a/INSTALL b/INSTALL
index bbb13f3..06b11e1 100644
--- a/INSTALL
+++ b/INSTALL
@@ -5,10 +5,13 @@ Normally you can just do "make" followed
 will install the git programs in your own ~/bin/ directory.  If you want
 to do a global install, you can do
 
-	make prefix=/usr install
+	$ make prefix=/usr ;# as yourself
+	# make prefix=/usr install ;# as root
 
-(or prefix=/usr/local, of course).  Some day somebody may send me a RPM
-spec file or something, and you can do "make rpm" or whatever.
+(or prefix=/usr/local, of course).  Just like any program suite
+that uses $prefix, the built results have some paths encoded,
+which are derived from $prefix, so "make all; make prefix=/usr
+install" would not work.
 
 Issues of note:
 
---
0.99.9.GIT
Peter Eriksen· Nov 9, 2005, 21:49 UTC · re: Alan Chandler · lore

Re: Problem with template location

On Wed, Nov 09, 2005 at 08:45:55PM +0000, Alan Chandler wrote:
Show 11 quoted lines
> I am trying to set up a public repository on my server to which I can push 
> stuff
> 
> I have just downloaded the git-core-0.99f-tar.bz2 file and untarred it as me 
> (alan) on account on the server.  My home directory is at /home/alan
> 
> Went in as me into the git-core-0.99f directory and did a make
> 
> Then became ROOT and did 
> 
> make prefix=/usr/local install
Hey, I fell over this today also.  To me it's really quite unintuitive.
Regards,
Peter

← back to recent threads