[Unbound-users] a shell script to switch concurrent installed Unbound versions
Florian Lohoff
f at zz.de
Sun Nov 21 13:41:56 UTC 2010
On Sun, Nov 21, 2010 at 10:46:16AM +0100, Carsten Strotmann wrote:
> Hello Florian,
>
> thanks for pointing out "stow". I was not aware of "stow" (there are
> many hidden gems in the open source world).
>
> However after having read the documentation, it seems that "stow" is not
> a full replacement for what we do. It seems to install packages (from
> source) into its own separate directory (same as we do) and then
> symlinking it into the usual directories (like /usr/local/sbin/unbound).
> It does no seem to support multiple versions of the same software
> installed at the same time, and not switching between versions. "stow"
> is also designed to work with source packages, while we work with RPM,
> DEB and Solaris PKG for easy binary installations. With "stow"
> symlinking into the usual directories, there is also the danger of an OS
> update or a manual compilation run to overwrite the links created by
> "stow" (or even worse, following the symlinks and alter the original
> binaries).
Stow is simply a simlink management script - It is not bound to /usr/local
but rather manages a directory which is one level up to the "stow" dir ...
And it can manage multiple versions easily as one can remove the links
and restow a different version:
root at p:/usr/local/stow# mkdir -p version-1/sbin
root at p:/usr/local/stow# echo version-1 >version-1/sbin/daemon
root at p:/usr/local/stow# mkdir -p version-2/sbin
root at p:/usr/local/stow# echo version-2 >version-2/sbin/daemon
root at p:/usr/local/stow# stow version-1
root at p:/usr/local/stow# ls -la ../sbin/daemon
lrwxrwxrwx 1 root staff 29 Nov 21 14:37 ../sbin/daemon -> ../stow/version-1/sbin/daemon
root at p:/usr/local/stow# stow -D version-1
root at p:/usr/local/stow# stow version-2
root at p:/usr/local/stow# ls -la ../sbin/daemon
lrwxrwxrwx 1 root staff 29 Nov 21 14:38 ../sbin/daemon -> ../stow/version-2/sbin/daemon
So simply build you project and install it with
prefix=/usr/local/stow/project-version and then stow it ... stow is very
good in eliminating whole subdir trees by symlinking directories as long
as they are unique to a specific project stowed in that basedir.
Its very generic and i also use it for managing different versions of
self compiled binarys in my homedir ...
Flo
--
Florian Lohoff f at zz.de
Professionell gesehen bin ich zu haben ....
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 827 bytes
Desc: Digital signature
URL: <http://lists.nlnetlabs.nl/pipermail/unbound-users/attachments/20101121/ba4b9f9c/attachment.bin>
More information about the Unbound-users
mailing list