Hi Klaus,
On 14:48 Mon 09 Sep , Klaus Aehlig wrote:
> -As only each version itself has the authoritative knowledge of which
> -files belong to it, each version provides two executables ``install``
> -and ``uninstall`` that add and remove the symbolic links,
> -respectively. Both executables will be idempotent and only touch
> -symbolic links that are outside the directory for their version of
> -Ganeti and point into this directory. In particular, an ``uninstall``
> -of one version will not interfere with an ``install`` of a different
> -version.
> + directly, where ``${libdir}`` defaults to ``${PREFIX}/lib``.
> + ``${libdir}/ganeti`` will be a symlink to ${libdir}/ganeti-${VERSION}.
> + Symbolic links to the files installed under ``${libdir}/ganeti-${VERSION}``
> + will be added under ``${PREFIX}/bin``, ``${PREFIX}/sbin``, and so on. These
> + symbolic links will go through ``${libdir}/ganeti`` so that the version can
> + be easily changed by updating the ``${libdir}/ganeti`` symbolic link.
Actually this is a violation of FHS ch. 4[1], which states that /usr
should be shareable between systems and should be never written to by
the programs themselves. It would be desirable to add a second symlink
passing through /etc, e.g.:
/usr/lib/ganeti/default -> /etc/ganeti/lib
/etc/ganeti/lib -> /usr/lib/ganeti/2.10
(Note that moving the entire hierarchy under /usr/lib/ganeti helps
/usr/lib stay cleaner).
/usr/share/ganeti/default -> /etc/ganeti/share
/etc/ganeti/share -> /usr/share/ganeti/2.10
You can then update the symlinks under /etc as normal. For the record,
Debian has automated this kind of process using the alternatives
mechanism[2].
[1] http://www.pathname.com/fhs/pub/fhs-2.3.html#THEUSRHIERARCHY
[2] https://wiki.debian.org/DebianAlternatives
Regards,
Apollon