Re: installing with minimal sudo
On 06/30/2010 11:18 PM, Basile Starynkevitch wrote: How do distributions makers achieve that?? IIRC they have a strict rule that no compilation or build should run under root! You use "make install DESTDIR=`pwd`/buildroot" and then copy the contents of the buildroot into the real root (e.g. with tar or cpio). Paolo
Re: installing with minimal sudo
On 30.06.2010 23:18, Basile Starynkevitch wrote: Practical advices welcome. Cheers. PS. On Debian, the make-kpkg command has a --rootcmd=sudo option. I am trying to imagine the equivalent for GCC. Of course on my machine sudo don't ask any password. unsure if I understand this correctly, but you could install setting DESTDIR to a temporary installation location and then copying the files later to the final location. Matthias
Re: installing with minimal sudo
On 30/06/2010 22:18, Basile Starynkevitch wrote: > How do you build & install GCC (trunk or some other branch) without > having any root owned files in the build directory? Run "make install" as the limited user, using a DESTDIR, then "sudo cp -R" (or similar) the installed tree into final destination. cheers, DaveK
Re: installing with minimal sudo
Quoting Basile Starynkevitch : Hello All, Is there some trick so that the GCC trunk (or a branch like MELT) is built under some user (e.g. basile) and is installed (in the usual /usr/local prefix, which is writable by root, not by ordinary users on most Linux systems) I usually install in more nonstandard locations - ones I can write to. So no sudo is required. How do you build & install GCC (trunk or some other branch) without having any root owned files in the build directory? What's the problem? you could just change the owner of the files to yourself while you are root. Or afterwards, you can delete them, as long as you can write to the directory they reside in. find builddir -user root should find them all. Then you can use command substitution, xargs, or just find itself, to chown / rm these files.
installing with minimal sudo
Hello All, Is there some trick so that the GCC trunk (or a branch like MELT) is built under some user (e.g. basile) and is installed (in the usual /usr/local prefix, which is writable by root, not by ordinary users on most Linux systems) My concrete need is the following after a make and a sudo make install I sometimes have a few root-owned files in the build directory. (eg ./gcc/b-header-vars or ./gcc/b-header-vars). I would like to avoid that if possible (and I confess that the MELT branch Makefile.in are not very good: I am bad at Makefile.in hacking). Perhaps a make install INSTALL='sudo install' could be enough, but I tend to remember I have tried that more than a year ago without success. Or is there a mean to pass INSTALL='sudo install' at configure time? How do you build & install GCC (trunk or some other branch) without having any root owned files in the build directory? Trying a lot of times a "make distclean && make install" is a very time consuming process that I hate doing. How do distributions makers achieve that?? IIRC they have a strict rule that no compilation or build should run under root! Practical advices welcome. Cheers. PS. On Debian, the make-kpkg command has a --rootcmd=sudo option. I am trying to imagine the equivalent for GCC. Of course on my machine sudo don't ask any password. -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basilestarynkevitchnet mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mines, sont seulement les miennes} ***