# Problem with template location

4 messages from 2005-11-09 to 2005-11-09. Participants: Alan Chandler, Jon Loeliger, Junio C Hamano, Peter Eriksen.
Thread: https://gitlist.dev/t/2413

## Alan Chandler, 2005-11-09 20:45

Subject: Problem with template location
Message-ID: <200511092045.55300.alan@chandlerfamily.org.uk>
URL: https://gitlist.dev/e/200511092045.55300.alan%40chandlerfamily.org.uk

```
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, 2005-11-09 21:06

Subject: Re: Problem with template location
Message-ID: <1131570383.23046.32.camel@cashmere.sps.mot.com>
URL: https://gitlist.dev/e/1131570383.23046.32.camel%40cashmere.sps.mot.com
In-Reply-To: <200511092045.55300.alan@chandlerfamily.org.uk>

```
On Wed, 2005-11-09 at 14:45, Alan Chandler wrote:

> 
> 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, 2005-11-09 21:29

Subject: Re: Problem with template location
Message-ID: <7vr79pbjcz.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vr79pbjcz.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <200511092045.55300.alan@chandlerfamily.org.uk>

```
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, 2005-11-09 21:49

Subject: Re: Problem with template location
Message-ID: <20051109214904.GB23052@ebar091.ebar.dtu.dk>
URL: https://gitlist.dev/e/20051109214904.GB23052%40ebar091.ebar.dtu.dk
In-Reply-To: <200511092045.55300.alan@chandlerfamily.org.uk>

```
On Wed, Nov 09, 2005 at 08:45:55PM +0000, Alan Chandler wrote:
> 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

```
