The packages need a couple of followup fixes for the new plugin system to work optimally, I think. On an installation running off the alpha2 packages (3.11-1~git+20130321124944.90dfa923) I have this in koha-conf.xml: <pluginsdir>__PLUGINS_DIR__</pluginsdir> <enable_plugins>0</enable_plugins> This can be fixed manually if you want to enable the plugin system, of course, but I think it would be better if: 1. The <pluginsdir> came ready filled with a standard value. Something like /var/lib/koha/<instancename>/plugins perhaps? 2. koha-create-dirs created the directory set by <pluginsdir>, with the right permissions
Hm, another problem: The plugins/ dir is missing from /usr/share/koha/intranet/cgi-bin/, so when i choose "Plugins" from the "More" menu in an installation running off the packages i get a 404 error. I'm not sure what is responsible for putting it in the right place? Makefile.PL? Perhaps it needs a line like this around line 295? './plugins' => 'INTRANET_CGI_DIR',
So I copied the necessary files to /usr/share/koha/intranet/cgi-bin/plugins/ to be able to test some more and I notice that the "Upload a plugin" link on the left hand side of plugins-home.pl is not showing, either when I am logged in as superlibrarian or as a "regular" user with all the plugin permissions. This might be caused by my ad hoc attempts to fix the previous problems, but it at least deserves another look when the other problems are fixed.
When I access plugins-upload.pl directly, I can upload the KitchenSink plugin without trouble, so the problem is just related to the display of the "Upload a plugin" link.
OK, so as I understand it, we'd need to: 1) koha-create: fill in __PLUGINS_DIR__ 2) leave the enable_plugins as off (at least for now) 3) koha-create-dirs: create the directory, set permissions (writeable by the koha user) 4) I'm not sure what the deal is with the cgi-bin/plugins directory. What goes there? How is it generated in a normal installation?
(In reply to comment #4) > OK, so as I understand it, we'd need to: > > 1) koha-create: fill in __PLUGINS_DIR__ > 2) leave the enable_plugins as off (at least for now) > 3) koha-create-dirs: create the directory, set permissions (writeable by the > koha user) 3 x yup. > 4) I'm not sure what the deal is with the cgi-bin/plugins directory. What > goes there? How is it generated in a normal installation? The contents of the plugins/ directory, which contains plugins- home.pl etc, in the same way as all the other top level dirs for the intranet.
Why is that not created by the makefile like everything else?
(In reply to comment #6) > Why is that not created by the makefile like everything else? Beats me, Im afraid...
One note, /plugins/ is where the plugin system lives ( plugins-home.pl, etc ) and /plugin/ is an Alias in the Apache config to the directory where installed plugins live ( var/lib/plugins )
Some more comments after digging around some more: (In reply to comment #4) > OK, so as I understand it, we'd need to: > > 1) koha-create: fill in __PLUGINS_DIR__ And we probably want to have some standard location, so all we really need to fill in is the instancename. > 2) leave the enable_plugins as off (at least for now) Yeah, Jared seems very set on making sure plugins are not enabled by accident... ;-) > 3) koha-create-dirs: create the directory, set permissions (writeable by the > koha user) An alternative approach could be to have a separate script like koha-plugins-enable that creates the dirs only when they are actually needed. But putting it in koha-create-dirs is probably a lot less work... > 4) I'm not sure what the deal is with the cgi-bin/plugins directory. What > goes there? How is it generated in a normal installation?s As far as I can tell, the problem is that the new plugins/ dir we have in the repository is not mentioned in Makefile.PL. I wonder if this will result in the same problem Im seeing on a standard install? I got the paths slightly wrong. This is the URL from Plugins in the More menu, which gives me a 404: /cgi-bin/koha/plugins/plugins-home.pl As Kyle pointed out there is another problem too: 5) The Alias /plugin/ ... stuff is missing from the Apache configs installed by the packages.
Created attachment 16783 [details] [review] Bug 9890 - Fix the new plugin system for package installs Create the plugins directory in the Makefile
Created attachment 16791 [details] [review] [PASSED QA] Bug 9890 - Fix the new plugin system for package installs Create the plugins directory in the Makefile Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> One line change, all ok.
(14:58:28) jcamins: bug 9890 just needs one sign off or QA. (14:58:29) huginn: Bug http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9890 normal, P5 - low, ---, koha-bugs, Needs Signoff , Fix the new plugin system for package installs (14:58:49) jcamins: I will QA it myself.
This patch has been pushed to master.
OK, so that patch solves the bit I was unsure of, so that leaves setting up the directories and the koha-conf, right?
(In reply to comment #14) > OK, so that patch solves the bit I was unsure of, so that leaves setting up > the directories and the koha-conf, right? Yea, and the Apache conf.
Any news on this?
Created attachment 18417 [details] [review] Bug 9890 - Fix koha-create and koha-create-dirs As noted in the bug, there were three things to do: 1) koha-create: fill in __PLUGINS_DIR__ 2) leave the enable_plugins as off (at least for now) 3) koha-create-dirs: create the directory, set permissions (writeable by the koha user) - Fixed generate_config_file from koha-create so it correctly fills __PLUGINS_DIR__ in every installed file. - koha-create-dirs now creates the relevant dir. - enable_plugins is set to 0 currently, no action required here. Regarding the apache configurations, I'm not sure what you mean. Regards To+ Sponsored-by: Universidad Nacional de Córdoba
I'm not sure if anything else is needed for packages, and no one is around today to ask :-(
Created attachment 18564 [details] [review] Bug 9890 - Fix koha-create and koha-create-dirs As noted in the bug, there were three things to do: 1) koha-create: fill in __PLUGINS_DIR__ 2) leave the enable_plugins as off (at least for now) 3) koha-create-dirs: create the directory, set permissions (writeable by the koha user) - Fixed generate_config_file from koha-create so it correctly fills __PLUGINS_DIR__ in every installed file. - koha-create-dirs now creates the relevant dir. - enable_plugins is set to 0 currently, no action required here. Regarding the apache configurations, I'm not sure what you mean. Regards To+ Edit: got some minutes to test and re-check and found that the substitution didn't put the right data. Fixed Sponsored-by: Universidad Nacional de Córdoba
Created attachment 18620 [details] [review] Bug 9890 - Fix koha-create and koha-create-dirs As noted in the bug, there were three things to do: 1) koha-create: fill in __PLUGINS_DIR__ 2) leave the enable_plugins as off (at least for now) 3) koha-create-dirs: create the directory, set permissions (writeable by the koha user) - Fixed generate_config_file from koha-create so it correctly fills __PLUGINS_DIR__ in every installed file. - koha-create-dirs now creates the relevant dir. - enable_plugins is set to 0 currently, no action required here. Regarding the apache configurations, I'm not sure what you mean. Regards To+ Edit: got some minutes to test and re-check and found that the substitution didn't put the right data. Fixed Sponsored-by: Universidad Nacional de Córdoba Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Robin, could you ake a look at this maybe?
Created attachment 19200 [details] [review] Signed off patch Attached is the signed off patch. (git bz is broken.)
Pushed to master. Thanks, Tomás!
This patch has been pushed to 3.12.x, will be in 3.12.2.