[Bug 18913] New: Allow symbolic link in /etc/koha/sites
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18913 Bug ID: 18913 Summary: Allow symbolic link in /etc/koha/sites Change sponsored?: --- Product: Koha Version: 16.11 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: pongtawat@punsarn.asia QA Contact: testopia@bugs.koha-community.org Currently using a symbolic link to link a Koha site directory inside /etc/koha/sites to somewhere else doesn't work. Koha scripts (e.g koha-list) only look for actual directory there. There is some use case where allowing symlink there would be convenient, e.g. linking to a site directory tracked with git. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18913 --- Comment #1 from Pongtawat <pongtawat@punsarn.asia> --- Created attachment 64935 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64935&action=edit Allow symbolic link in /etc/koha/sites Test Plan: Before patch: 1) Create a Koha site called demo 2) mv /etc/koha/sites/demo /srv/demo 3) ln -s /srv/demo /etc/koha/sites/ 4) koha-list will not show demo as one of the site 5) koha-list --enabled will not show demo as one of the site After patch: 1) Create a Koha site called demo 2) mv /etc/koha/sites/demo /srv/demo 3) ln -s /srv/demo /etc/koha/sites/ 4) koha-list will show demo as one of the site 5) koha-list --enabled will show demo as one of the site -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18913 Pongtawat <pongtawat@punsarn.asia> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Change sponsored?|--- |Sponsored Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18913 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18913 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |pongtawat@punsarn.asia |ity.org | CC| |katrin.fischer@bsz-bw.de --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Please don't forget to assign your bugs to yourself :) -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18913 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com --- Comment #3 from M. Tompsett <mtompset@hotmail.com> --- Had to adapt test plan, because you need to copy the script file into place. perl /home/vagrant/misc4dev/do_all_you_can_do.pl --instance test --userid admin --password admin But other than that, seems to work. -L basically says to follow symbolic links, so this doesn't break anything as far as I can tell. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18913 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18913 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64935|0 |1 is obsolete| | --- Comment #4 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 68511 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68511&action=edit Bug 18913 - Allows symbolic link in /etc/koha/sites Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18913 --- Comment #5 from Pongtawat <pongtawat@punsarn.asia> --- Thanks for signing off. And sorry that I forgot that the script has to be copied to system location first. BTW, is there a way to test Debian script directly from the git (dev) layout? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18913 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Should this be targetted for master? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18913 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18913 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #68511|0 |1 is obsolete| | --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 71939 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71939&action=edit Bug 18913: Allow symbolic link in /etc/koha/sites This patch makes the koha-* scripts follow symbolic links when querying for Koha instances. Without it, it is not possible to define instances outside the /etc/koha/sites directory, To test: - Create a symlink in /etc/koha/sites: $ sudo ln -s /tmp /etc/koha/sites/test - Test the original is_instance function: $ . /usr/share/koha/bin/koha-functions.sh $ is_instance test && echo success || echo failure => FAIL: symlinks are not considered instance names (i.e. failure is printed) - Apply this patch - Update the koha-functions.sh file: $ perl misc4dev/cp_debian_files.pl - Test is_instance again: $ . /usr/share/koha/bin/koha-functions.sh $ is_instance test && echo success || echo failure => SUCCESS: symlinks are considered instance names (i.e. success is printed) - Sign off :-D Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18913 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | Version|16.11 |master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18913 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Patch pushed to master for 18.05 Congratulations Pongtawat for your first patch in! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18913 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED CC| |nick@bywatersolutions.com --- Comment #9 from Nick Clemens <nick@bywatersolutions.com> --- Enhancement, not backported for 17.11 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org