Gnetoo prefix on servers, puppy linux, and others

17 views
Skip to first unread message

Dilawar Singh

unread,
Nov 26, 2014, 4:24:02 AM11/26/14
to wncc...@googlegroups.com
Developing on servers is fun because of high speed of compilation. But during development, programmers need a lot of libraries which are not installed on server by default and asking admin to install this and that all the time is pain. One solution is to manually download everything and install it in user space e.g. ~/bin.

Gentoo-prefix can do wonders here if the linux you are using is compatible with it: centos, and puppy linux are, I can vouch for them; Ubuntu > 9.04 is not. It brings the power of "emerge" in your hand without being a superuser. No need to install gentoo to use emerge.

The project is discussed here https://www.gentoo.org/proj/en/gentoo-alt/prefix/ . After downloading the `bootstrap-prefix.sh` script, just run it. Before that make sure that you unset `LD_LIBRARY_PATH` in .bashrc or some other shell-initialization file.

I did wonders to my Puppy Linux which I keep on an external hard-disk. Currently I am using it on a unix-cluster. It keeps your default $PATH separated from PREFIX paths. Bootstrapping takes time since everything gets compiled on local machine.

Windows user can try interix port of it.

Pritam Baral

unread,
Nov 26, 2014, 9:23:18 AM11/26/14
to wncc...@googlegroups.com
Is this similar to debootstrap of Debian?


Regards,
Chhatoi Pritam Baral

Sanyam Mulay

unread,
Nov 26, 2014, 11:46:49 AM11/26/14
to wncc...@googlegroups.com
Just to take the discussion forward. Many people will be familiar with the python virtualenv.

It seems to me that this is very much like the python virtualenv concept. Is that so ? or are there any differences and what are they ?


--
--
The website for the club is http://wncc-iitb.org/
To post to this group, send email to wncc...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "Web and Coding Club IIT Bombay" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wncc_iitb+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dilawar Singh

unread,
Nov 26, 2014, 11:46:49 AM11/26/14
to wncc...@googlegroups.com
Yes. But with emerge, you download the source code and compile it on your
machine, with your own compile flags. I guess debootstrap only installs
pre-compiled packages on your system which is good if you want to install thing
quickly.

best,
Dilawar

Saket Choudhary

unread,
Nov 26, 2014, 3:33:59 PM11/26/14
to wncc...@googlegroups.com
I find it easier with linuxbrew.
This has existed for Mac for more than 4 years, but is pretty new for
the linux environment.

Same ideology as gentoo-prefix: 'Build from source, stay away from
/root'. But here's a big big advantage:

1. Dependencies handled automagically

If I were to install gcc-4.9 I need to first compile all
dependencies(there are atleast 6!). This is taken care of by
linuxbrew:
https://github.com/Homebrew/linuxbrew/blob/master/Library/Formula/gcc.rb#L47

So it would download the dependencies first, compile them and then
compile gcc. Again as simple as:
$ brew install gcc

2. Linuxbrew's formulas are curated. So patching is handled
automagically too! No need to google all those compile time errors,
you would ideally never come across one with linuxbrew.

And with `homebrew-science`(https://github.com/Homebrew/homebrew-science)
those `blas` and `opencv` libraries are a command away, which I have
always found a nightmare otherwise.

Saket Choudhary

unread,
Nov 26, 2014, 3:36:29 PM11/26/14
to wncc...@googlegroups.com
On 26 November 2014 at 06:43, Sanyam Mulay <sanyam...@gmail.com> wrote:
> Just to take the discussion forward. Many people will be familiar with the
> python virtualenv.
>
> It seems to me that this is very much like the python virtualenv concept. Is
> that so ? or are there any differences and what are they ?
>

Yes, more or less.

Virtualenv was the 'cherry' before it was eaten by 'Anaconda'
https://store.continuum.io/cshop/anaconda/

Saket

Manoj G

unread,
Nov 26, 2014, 10:33:27 PM11/26/14
to wncc...@googlegroups.com
Though the technology is outdated, to create identical setup in every ec2 without having to learn dockers, one might try building a chroot image and copying it all over..
It is very cheap and easy without polluting server's namespace, also adds security.

Pritam Baral

unread,
Nov 27, 2014, 4:21:34 AM11/27/14
to wncc...@googlegroups.com

As long as we're talking about EC2, what's wrong with modifying an installed AMI, as root, and saving that as a new AMI? Surely far less hassle than chroot and all...

Dilawar Singh

unread,
Nov 27, 2014, 8:25:42 AM11/27/14
to wncc...@googlegroups.com

>1. Dependencies handled automagically
>2. Linuxbrew's formulas are curated. So patching is handled

Emerge can do more than that. See the 'USE' flags for details. You can drop or
include any dependencies when compiling any package and its dependencies e.g. if
you put +python -perl then python python is on and perl is off. Variables for
./configure and cmake are passed accordingly.

Funtoo takes it a bit further. Instead of putting changes into emerge tree (sort
of repo), it allows you to clone the whole tree as your personal repo and your
can put your changes to your tree and then send the pull request.

I think archlinux package manager allow both local building and installing
pre-compiled packages. Not sure if they have a prefix system.

best,
Dilawar

Pritam Baral

unread,
Nov 27, 2014, 10:42:48 AM11/27/14
to wncc...@googlegroups.com


On 27-Nov-2014 6:55 pm, "Dilawar Singh" <dilawar....@gmail.com> wrote:
> I think archlinux package manager allow both local building and installing
> pre-compiled packages. Not sure if they have a prefix system.

Yeah, the Arch Build System allows one to locally configure and compile a package; it does not have special flags (like Gentoo) though, we simply get the direct commands used for compilation (think ./configure --enable-option1).

And no, pacman itself packages only for the root system; but pacman, while installing, takes a parameter --root where you can specify a custom filesystem root to install under, though it still requires EUID=0. There once was a discussion on building something like Gentoo-prefix with pacman and ABS, but the apparent technical overhead was deemed unworthy.

 >
> best,
>     Dilawar

Reply all
Reply to author
Forward
0 new messages