Summary: | Fix the new plugin system for package installs | ||
---|---|---|---|
Product: | Koha | Reporter: | Magnus Enger <magnus> |
Component: | Packaging | Assignee: | Bugs List <koha-bugs> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P5 - low | CC: | gmcharlt, kyle, robin, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 7804 | ||
Bug Blocks: | |||
Attachments: |
Bug 9890 - Fix the new plugin system for package installs
[PASSED QA] Bug 9890 - Fix the new plugin system for package installs Bug 9890 - Fix koha-create and koha-create-dirs Bug 9890 - Fix koha-create and koha-create-dirs Bug 9890 - Fix koha-create and koha-create-dirs Signed off patch |
Description
Magnus Enger
2013-03-21 14:32:16 UTC
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. |