this thread, and esepcially Dark_Helmet's explanation was very informative.
Now I'd really love to have an example of how to maintain a package installed from source.
I think it would help a lot of people if there were a decent hand-holding guide for "maintaining packages installed from source".
However I cant seem to coax Google into finding such a guide for the 2 distros I use - CentOS(server) and Ubuntu(Desktop).
As an example, there is a fine editor / dev environment, that is somehow not popular among linux users for whatever reasons, called SETEdit
) which depends on TVision
). It is an opensource port of the likeable old TurboPascal IDE from Borland on which a lot of devs learnt programming in university.
Now both need to be compiled from source as the latest versios of CentOS and Ubuntu dont have it (and it doesnt always work to change a distro for an editor / dev env).
So if I want to compile from source tv
(setedit obviously needs tv installed to display the widgets that make up setedit), and I also want to be able to future my installs by allowing for multiple versions of both
, then is this the way to do it, roughly...
/home/user $ cd ~
/home/user $ mkdir tv2.0.3
/home/user $ cd tv2.0.3/
/home/user/tv2.0.3 $ wget http://tv-site/tv-2.0.3.tar.gz
/home/user/tv2.0.3 $ tar xvf tv-2.0.3.tar.gz
/home/user/tv2.0.3 $ cd tv2.0.3-src/
/home/user/tv2.0.3/tv2.0.3-src $ ./configure
/home/user/tv2.0.3/tv2.0.3-src $ make --prefix='/opt/tv2.0.3'
/home/user/tv2.0.3/tv2.0.3-src $ sudo make install --prefix='/opt/tv2.0.3'
/home/user/tv2.0.3/tv2.0.3-src $ cd ~
/home/user $ mkdir set0.5.4
/home/user $ cd set0.5.4/
/home/user/set0.5.4 $ wget http://set-site/set0.5.4.tar.gz
/home/user/set0.5.4 $ tar xvf set0.5.4.tar.gz
/home/user/set0.5.4 $ cd set0.5.4-src/
/home/user/set0.5.4/set0.5.4-src $ ./configure
/home/user/set0.5.4/set0.5.4-src $ make --prefix='/opt/set0.5.4'
/home/user/set0.5.4/set0.5.4-src $ sudo make install --prefix='/opt/set0.5.4'
This should install first tv2.0.3
Then it would install set0.5.4
I think I might have missed a step in telling the installation of set0.5.4 that it should pick up tv2.0.3 from /opt/tv2.0.3
Now imagine, after 6 months, tv project realeases an updated version tv2.0.4
and that actually breaks a nice feature SetX
But I want tv2.0.4 for some crucial updates
, but I also want my set0.5.4 working fine as it has been.
So this time, I repeat the above steps, but with new locations.
I make-make-install tv2.0.4
and I compile set0.5.4 (same old version) with tv2.0.4 (which removes feature SetX, but adds some nice bling to tv widgets thmeselves) telling it to pick up tv from /opt/tv2.0.4
This new set version I install into /opt/set0.5.4-1
So now I have :
/opt/set0.5.4/ (compiled using /opt/tv2.0.3/)
/opt/set0.5.4-1/ (compiled using /opt/tv2.0.4/)
and so I have full freedom to use either /opt/set0.5.4
, depending on my whim.
This would be really really neat.
I looked it up and find that there is a distro that does this: Gobolinux
But alas! I have to use Centos on server, and Ubuntu on desktop, for several reasons.
So I switching to Gobolinux is out of the question.
The other option I have is using portable linux apps
, but that is a long learning curve and a whole project in itself, not a day's work.
" which promised a lot is now closed down.
So, can I pull off the above?
I have faced this scenario a couple of times for packages far more important than setedit
- where the single piece of software absolutely essential for the server is not in the official repos or installing other repos isnt allowed.
If this multiple-version side-by-side /opt solution
works, that would be the best thing to happen in Linux in some time, and solve a lot of maintenance issues.
Note that I also dont have to bother uninstalling an obsolete version from /opt
I just install a new version and simply don't use the old one!
Apologies for the long post, but this is couldn't posibly have been shortened (without making it decently google-searchable)
Is it better to use /usr/local
for this purpose instead of /opt
? I personally think not, because /opt seems cleaner and further away from the distro-maintained core sytem than /usr/local. The further away any custom things, the better. IMO.
Another possiblity that struck me on some thought is why not simply create a /home/user/bin
and install both tv
into it - as so:
And then, adding /home/user/bin to the system path
That way absolutely nothing is touched in the core system.
Would this way - /home/user/bin work with a server package
- like say a web proxy server - nginx / squid / lighttpd
Or do these simply have
to be installed into /opt, /usr/local at best, and from the native package manager at worst?
If I could locally install and compile from source into /home/user/bin/nginx-x.y.A
, etc. I could easily test multiple versions and configurations
while being fully assured that I broke nothing in the server!
That would be a great thing.
Many thanks for going through this long post, and more so if you can help with a reply.