Subject: [Pkg-cacti-maint] Bug#681558: solution

From: Paul Gevers <[email-masked]>
Date: Sun, 29 Jul 2012 19:10:25 +0200

Dear co-maintainers

I have thought this through and through and have decided that all
options that I can think of, are sub-optimal.

1) Leave the situation as in the current 0.8.8a-3 package and document
the fact that people need to manually create soft-links to the
/usr/share/cacti/site/include and lib directory.

2) Leave the situation as in the current 0.8.8a-3 package but provide
the links illegally.

3) Move the installed plugins folder back to
/usr/share/cacti/site/plugins, add a README.txt (symlink to
/usr/share/doc/cacti/README.plugins.txt) where we document that the
BETTER way is to install the plugins in /usr/local/share/cacti/plugins/
but to use that people need to replace the /usr/share/cacti/site/plugins
directory with a symlink to the local folder and additionally need to
create the proper links back.

The more I think about it, the more I prefer option 3. System
administrators that know what they are doing will install in the proper
local folder, and those that don't find the proper info, install in
/usr/share/cacti/site/plugins and things will just work. So if nobody
comes up with a better idea or shows preference for one of the other
options, that is what I will implement.

Paul

PS1: Some additional info on the bug: The problem is that several
plug-ins are using php chdir('../../') to move down the tree before
doing includes, but the php implementation of chdir resolves symlinks
[1], so in the end the plug-in can not find the include and lib
directory. So the solution is in rewriting the plug-ins, but that is out
of scope for Debian.

PS2: At least two links are needed: to site/lib and to site/include.

[1] http://www.php.net/manual/en/function.chdir.php#53266