Bug 29207

Summary: Restore Getopt::Long config to not ignore cases
Product: Koha Reporter: Peter Vashchuk <stalkernoid>
Component: Architecture, internals, and plumbingAssignee: Peter Vashchuk <stalkernoid>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: minor    
Priority: P5 - low CC: jonathan.druart, kyle, nugged, tomascohen
Version: master   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17600
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00
Bug Depends on: 17600    
Bug Blocks:    
Attachments: Bug 29207: Getopt::Long should not ignore cases
Bug 29207: Getopt::Long should not ignore cases
Bug 29207: Getopt::Long should not ignore cases

Description Peter Vashchuk 2021-10-11 13:36:11 UTC
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17600#c1 removed ":config no_ignore_case" making Getopt::Long not being able to differentiate -d and -D options, which caused problems with starting Z39.50/SRU.
Comment 1 Peter Vashchuk 2021-10-11 14:02:40 UTC
Created attachment 126045 [details] [review]
Bug 29207: Getopt::Long should not ignore cases

To avoid Getopt::Long treating upper case and lower case options,
this patch restores removed ":config no_ignore_case".

Steps to reproduce:
1. Start koha-z3950-responder deamon for any instance.
2. Check z3950.log log file, there should be 
"[fatal] Failed to listen on ...-koha-z3950" in it.
3. Alternatively you can "curl localhost:2100/biblios?version=1.1 -v"
to ensure that it doesn't work "Failed to connect to localhost 
port 2100: Connection refused".
4. Apply the patch.
5. Stop and start daemon again.
6. Check the logs again, there should be no new error there.
7. Same way do the curl to ensure that this time it listens on that port.
Comment 2 Andrii Nugged 2021-10-11 14:05:50 UTC
QA note: yet we had only one option how to check that case problem araised, two other places where no_ignore_case were removed (looks like accidentally, but JD, we need your confirmation that it should be restored in all places).
Comment 3 Jonathan Druart 2021-10-11 14:12:38 UTC
That's definitely an error caused by the script that generated bug 17600.
Comment 4 Tomás Cohen Arazi 2021-10-21 23:20:50 UTC
Created attachment 126686 [details] [review]
Bug 29207: Getopt::Long should not ignore cases

To avoid Getopt::Long treating upper case and lower case options,
this patch restores removed ":config no_ignore_case".

Steps to reproduce:
1. Start koha-z3950-responder deamon for any instance.
2. Check z3950.log log file, there should be
"[fatal] Failed to listen on ...-koha-z3950" in it.
3. Alternatively you can "curl localhost:2100/biblios?version=1.1 -v"
to ensure that it doesn't work "Failed to connect to localhost
port 2100: Connection refused".
4. Apply the patch.
5. Stop and start daemon again.
6. Check the logs again, there should be no new error there.
7. Same way do the curl to ensure that this time it listens on that port.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 5 Katrin Fischer 2021-10-24 10:44:40 UTC
Created attachment 126802 [details] [review]
Bug 29207: Getopt::Long should not ignore cases

To avoid Getopt::Long treating upper case and lower case options,
this patch restores removed ":config no_ignore_case".

Steps to reproduce:
1. Start koha-z3950-responder deamon for any instance.
2. Check z3950.log log file, there should be
"[fatal] Failed to listen on ...-koha-z3950" in it.
3. Alternatively you can "curl localhost:2100/biblios?version=1.1 -v"
to ensure that it doesn't work "Failed to connect to localhost
port 2100: Connection refused".
4. Apply the patch.
5. Stop and start daemon again.
6. Check the logs again, there should be no new error there.
7. Same way do the curl to ensure that this time it listens on that port.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Jonathan Druart 2021-10-25 13:58:50 UTC
Pushed to master for 21.11, thanks to everybody involved!