Symlinks in charms

Gustavo Niemeyer gustavo.niemeyer at canonical.com
Wed Feb 8 13:15:46 UTC 2012


Greetings,

Over the course of the store work I've perceived that our handling of
symlinks is broken in the implementation. They are currently being
packed as a normal file, with the content of the referenced file.
That's why we didn't perceive it sooner: in the few cases where
they're being used, it actually works as a coincidence.

Kapil has already filed a bug for us to track that, and we'll be
fixing that both in the client side juju code and in the store.

    https://bugs.launchpad.net/juju/+bug/928348

The main reason I'm reporting it here, though, is that while
discussing the bug yesterday, we've decided to make a restriction on
which symlinks are accepted within a charm. We'll only pack and handle
symlinks, once the bug is fixed, if they point to content that is
within the charm itself. The target doesn't have to exist, but it must
lie within the charm directory. This excludes both absolute symlinks
and relative symlinks that would point out of the charm directory.

The reason for the restriction is to make charms more portable and
more likely to work in the future. Absolute symlinks are arguably a
lesser issue, and we can potentially lift the restriction in the
future once we understand better the use cases, but relative symlinks
pointing out of the charm directory would break if the implementation
changes slightly.

If any of that sounds unreasonable, please let us know.

-- 
Gustavo Niemeyer
http://niemeyer.net
http://niemeyer.net/plus
http://niemeyer.net/twitter
http://niemeyer.net/blog

-- I'm not absolutely sure of anything.



More information about the Juju mailing list