Bug 25716 - Add ability to specify additional options in koha-conf.xml for z3950_responder.pl when using koha-z3950-responder
Summary: Add ability to specify additional options in koha-conf.xml for z3950_responde...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-11 15:17 UTC by Kyle M Hall
Modified: 2023-06-08 22:28 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00


Attachments
Bug 25716: Add ability to specify additional options in koha-conf.xml for z3950_responder.pl when using koha-z3950-responder (2.33 KB, patch)
2020-06-11 15:23 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 25716: Don't exit if config doesn't exist in Koha conf file (1.01 KB, patch)
2020-12-03 20:37 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 25716: Don't exit if config doesn't exist in Koha conf file (1.01 KB, patch)
2021-04-26 15:06 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 25716: Add ability to specify additional options in koha-conf.xml for z3950_responder.pl when using koha-z3950-responder (2.36 KB, patch)
2021-09-21 11:58 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 25716: Don't exit if config doesn't exist in Koha conf file (1.05 KB, patch)
2021-09-21 11:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 25716: Add ability to specify additional options in koha-conf.xml for z3950_responder.pl when using koha-z3950-responder (2.41 KB, patch)
2021-09-30 10:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 25716: Don't exit if config doesn't exist in Koha conf file (1.10 KB, patch)
2021-09-30 10:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 25716: Add ability to specify additional options in koha-conf.xml for z3950_responder.pl when using koha-z3950-responder (2.44 KB, patch)
2022-10-24 15:07 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 25716: Don't exit if config doesn't exist in Koha conf file (1.10 KB, patch)
2022-10-24 15:08 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 25716: (QA follow-up) Move additional options to etc/z3950/config.xml (2.38 KB, patch)
2022-10-24 15:08 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 25716: (QA follow-up) Make sure a comment doesn't break tests (917 bytes, patch)
2022-10-24 21:52 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2020-06-11 15:17:11 UTC

    
Comment 1 Kyle M Hall 2020-06-11 15:23:17 UTC
Created attachment 105767 [details] [review]
Bug 25716: Add ability to specify additional options in koha-conf.xml for z3950_responder.pl when using koha-z3950-responder

The z39.50 responder has a number of command line options that are not
accessible if using the debian scripts to control it. We should be able
to set those options in the koha conf file to be passed to the script
itself.

Test Plan:
1) Apply this patch
2) Copy your kohaclone's koha-z3950-responder to /usr/sbin/koha-z3950-responder if necessary
3) Add "<z3950_responder_options>--add-item-status k</z3950_responder_options>" inside your <config> block in your koha-conf.xml file
4) Use koha-z3950-responder to start/restart the z39.50 responder, note the item status is now in subfield k!
Comment 2 Liz Rea 2020-07-27 14:53:49 UTC
Hi Kyle,

There needs to be a check before doing the xmlstarlet here, as the responder won't start if the config option doesn't exist in koha-conf.xml. This will be a problem for upgrading libraries who don't yet have the config options.
Comment 3 Kyle M Hall 2020-12-03 20:37:58 UTC
Created attachment 114166 [details] [review]
Bug 25716: Don't exit if config doesn't exist in Koha conf file
Comment 4 Kyle M Hall 2021-04-26 15:06:43 UTC
Created attachment 120178 [details] [review]
Bug 25716: Don't exit if config doesn't exist in Koha conf file
Comment 5 Tomás Cohen Arazi 2021-09-01 15:58:40 UTC
There's an XML problem I noticed with the syntax highlighter: 

✔ ~/git/koha [qa_25716 ↑·2|✚ 1⚑ 33] 
12:57 $ xmllint etc/koha-conf.xml 
etc/koha-conf.xml:271: parser error : Double hyphen within comment: <!--
 <z3950_responder_options>
 <z3950_responder_options>--add-item-status k -t 5</z3950_responder_options>
                          ^
I suggest we move this into the z3950/ files
Comment 6 Tomás Cohen Arazi 2021-09-20 14:08:43 UTC
It is not breaking xmlstarlet, so not an issue. Back to NSO.
Comment 7 Liz Rea 2021-09-20 21:48:21 UTC
I sign this off (we have had this in production for many months) - however my devbox is broken and I do not have a spoon to get it working right now.
Comment 8 Kyle M Hall 2021-09-21 11:58:55 UTC
Created attachment 125095 [details] [review]
Bug 25716: Add ability to specify additional options in koha-conf.xml for z3950_responder.pl when using koha-z3950-responder

The z39.50 responder has a number of command line options that are not
accessible if using the debian scripts to control it. We should be able
to set those options in the koha conf file to be passed to the script
itself.

Test Plan:
1) Apply this patch
2) Copy your kohaclone's koha-z3950-responder to /usr/sbin/koha-z3950-responder if necessary
3) Add "<z3950_responder_options>--add-item-status k</z3950_responder_options>" inside your <config> block in your koha-conf.xml file
4) Use koha-z3950-responder to start/restart the z39.50 responder, note the item status is now in subfield k!

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 9 Kyle M Hall 2021-09-21 11:59:18 UTC
Created attachment 125096 [details] [review]
Bug 25716: Don't exit if config doesn't exist in Koha conf file

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 10 Martin Renvoize 2021-09-30 10:21:22 UTC
Created attachment 125481 [details] [review]
Bug 25716: Add ability to specify additional options in koha-conf.xml for z3950_responder.pl when using koha-z3950-responder

The z39.50 responder has a number of command line options that are not
accessible if using the debian scripts to control it. We should be able
to set those options in the koha conf file to be passed to the script
itself.

Test Plan:
1) Apply this patch
2) Copy your kohaclone's koha-z3950-responder to /usr/sbin/koha-z3950-responder if necessary
3) Add "<z3950_responder_options>--add-item-status k</z3950_responder_options>" inside your <config> block in your koha-conf.xml file
4) Use koha-z3950-responder to start/restart the z39.50 responder, note the item status is now in subfield k!

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 11 Martin Renvoize 2021-09-30 10:21:26 UTC
Created attachment 125482 [details] [review]
Bug 25716: Don't exit if config doesn't exist in Koha conf file

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 12 Martin Renvoize 2021-09-30 10:23:25 UTC
I can't really fail this.. but I would have preferred to see it as options in the z3950 specific config file rather than this somewhat obscure pass a param into the config.. it feels weird having `--add-item-status k--` inside a config line

But.. the code does indeed work and although we get a noisy warning about XML issues in the qa scripts it doesn't appear to actually cause an issue with the feature.

Passing QA.
Comment 13 Jonathan Druart 2021-10-21 13:08:48 UTC
Shouln't it be more in etc/z3950/config.xml?

Or, isn't actually more something for an environment variable?
Comment 14 Kyle M Hall 2022-10-24 15:07:49 UTC
Created attachment 142520 [details] [review]
Bug 25716: Add ability to specify additional options in koha-conf.xml for z3950_responder.pl when using koha-z3950-responder

The z39.50 responder has a number of command line options that are not
accessible if using the debian scripts to control it. We should be able
to set those options in the koha conf file to be passed to the script
itself.

Test Plan:
1) Apply this patch
2) Copy your kohaclone's koha-z3950-responder to /usr/sbin/koha-z3950-responder if necessary
3) Add "<z3950_responder_options>--add-item-status k</z3950_responder_options>" inside your <config> block in your koha-conf.xml file
4) Use koha-z3950-responder to start/restart the z39.50 responder, note the item status is now in subfield k!

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 15 Kyle M Hall 2022-10-24 15:08:00 UTC
Created attachment 142521 [details] [review]
Bug 25716: Don't exit if config doesn't exist in Koha conf file

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 16 Kyle M Hall 2022-10-24 15:08:04 UTC
Created attachment 142522 [details] [review]
Bug 25716: (QA follow-up) Move additional options to etc/z3950/config.xml

This followup moves the configuration to the z3950 etc file, either the
default and or the custom file is used as per the existing script code.

In addition, the options and be set using an environment variable named Z3950_ADDITIONAL_OPTS.
Comment 17 Tomás Cohen Arazi 2022-10-24 16:23:48 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 18 Tomás Cohen Arazi 2022-10-24 21:52:55 UTC
Created attachment 142577 [details] [review]
Bug 25716: (QA follow-up) Make sure a comment doesn't break tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>