Problem running 'make install' as root when on mounted fs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I just tried building and installing Git on Mac OSX. My home directory is NFS mounted, to which I have write (but root doesn't).

When I do make, everything compiles OK
When I do sudo make install, I get '/bin/sh: GIT-BUILD-OPTIONS: permission denied'

It seems that make install is re-running the GIT-BUILD-OPTIONS target, and that tries to write to the current directory. In my case, on an NFS mounted home, root doesn't have write permissions to the local dir and so the install step fails.

I could build on a local partition (e.g. /tmp) but I'd prefer to have the code on my local drive so that I can do a git update and other such changes subsequently. I was able to get it to work by removing the echo>> from the GIT-BUILD-OPTIONS step after having built the code the first time.

The problem basically seems to be:

install: all
all:: ... GIT-BUILD-OPTIONS

I think it would be possible to restrict the GIT-BUILD-OPTIONS to be generated during a build phase, so restructuring the Makefile like:

install: build
all:: build GIT-BUILD-OPTIONS
build: ...

would then mean the install phase wouldn't have to touch the GIT-BUILD- OPTIONS step.

Does that sound reasonable? I'm happy to test it out and submit a patch if people agree (and/or have opinions on what the inner target 'build' should be called)

Alex
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]