Re: Reduced privileges install

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

 



On Sep 20, 2010, at 10:53 AM, Brandon Casey wrote:
> On 09/19/2010 06:50 PM, Andrew Keller wrote:
> 
>> Hello, all.  Quick question:
>> 
>> I'm trying to build and install git 1.7.2.3 from source on a server at school used for my class.
>> 'uname -a' is 'SunOS bloch 5.9 Generic_122300-54 sun4u sparc SUNW,UltraAX-i2'.
>> 
>> There were a few hiccups at first – things like CC not being defined, tclsh not existing, the path to python being wrong, etc, but they were all relatively easy to work around.  This last error, however, not so much luck.
>> 
>> Because I do not own the server and my account has restricted privileges, I attempted to augment my PATH to include a directory in my home folder, and then install git in there by specifying a prefix at the configure stage.  The configure and the make work, but the make install fails.  Here's the last section of the log:
>> 
>> 
>> $ make install
>> 
>> ...
>> 
>> make -C templates DESTDIR='' install
>> make[1]: Entering directory `/usr/users/students/ak4390/Downloads/git-1.7.2.3/templates'
>> /usr/ucb/install -d -m 755 '/usr/users/students/ak4390/.local/share/git-core/templates'
>> (cd blt && gtar cf - .) | \
>>        (cd '/usr/users/students/ak4390/.local/share/git-core/templates' && umask 022 && gtar xof -)
>> make[1]: Leaving directory `/usr/users/students/ak4390/Downloads/git-1.7.2.3/templates'
>> make -C perl prefix='/usr/users/students/ak4390/.local' DESTDIR='' install
>> make[1]: Entering directory `/usr/users/students/ak4390/Downloads/git-1.7.2.3/perl'
>> make[2]: Entering directory `/usr/users/students/ak4390/Downloads/git-1.7.2.3/perl'
>> Warning: You do not have permissions to install into /usr/perl5/site_perl/5.6.1/sun4-solaris-64int at /usr/perl5/5.6.1/lib/ExtUtils/Install.pm line 85.
>> Installing /usr/perl5/site_perl/5.6.1/Error.pm
>> Installing /usr/perl5/site_perl/5.6.1/Git.pm
>> mkdir /usr/perl5/site_perl/5.6.1/sun4-solaris-64int/auto: Permission denied at /usr/perl5/5.6.1/lib/ExtUtils/Install.pm line 165
>> make[2]: *** [pure_site_install] Error 255
>> make[2]: Leaving directory `/usr/users/students/ak4390/Downloads/git-1.7.2.3/perl'
>> make[1]: *** [install] Error 2
>> make[1]: Leaving directory `/usr/users/students/ak4390/Downloads/git-1.7.2.3/perl'
>> make: *** [install] Error 2
>> 
>> 
>> So anyways, it appears that it is trying to install into a directory in which I do not have write permissions.  But why?  I thought that setting the prefix to a folder in my home directory would change that.  Is there another parameter I'm forgetting about at the configure stage?
>> 
>> Thanks,
>> Andrew Keller
>> 
>> PS: not sure if it matters, but just in case...
>> path to perl: /bin/perl
>> version of perl: 5.6.1
> 
> By chance could INSTALL_BASE be set in your environment?
> 
>   $ echo $INSTALL_BASE

env says that INSTALL_BASE is not currently set.

> A patch was recently made to unset that variable so that it
> could not influence perl's makemaker.  Though the commit message
> indicates that makemaker complains loudly when both INSTALL_BASE
> and PREFIX are set, so perhaps this is not the problem.
> 
> If INSTALL_BASE is set, then unset it, and try again.
> 
> Alternatively, you could avoid makemaker altogether by setting
> NO_PERL_MAKEMAKER on the make command line and git will build
> its own make file:
> 
>   make NO_PERL_MAKEMAKER=1 install

Setting NO_PERL_MAKEMAKER at the build stage seems to make the install stage work.  Yay!

This is what it took to compile Git on this server without root privileges (Solaris 8 / Sparc):

# create a location for apps in my home folder:
mkdir ~/.local
export PATH=$PATH:/usr/users/students/ak4390/.local/bin
export MANPATH=$MANPATH:/usr/users/students/ak4390/.local/share/man

# compile and install git
$ ln -s /usr/local/bin/tclsh8.4 /usr/users/students/ak4390/.local/bin/tclsh
$ export CC=/usr/local/bin/gcc
$ cd <path-to-git-src>
$ ./configure --prefix=/usr/users/students/ak4390/.local --with-python=/usr/local/bin/python --enable-pthreads=no
$ make NO_PERL_MAKEMAKER=1 all install

Letting the configure figure out the threading did not seem to work.  The compile and install worked, with lots of warnings from gcc about not recognizing -pthreads, but when you try to do a clone, git complained about not being able to fork off the demultiplexer.  So I just turned off threading and it works.

The quick-install-man target still failed, but it's not really a big deal since I can just install it myself.

Thanks,
~ Andrew Keller

--
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]