[Bug 40989] New: t/db_dependent/OAI/Server.t fails on Debian 13
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40989 Bug ID: 40989 Summary: t/db_dependent/OAI/Server.t fails on Debian 13 Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: victor@tuxayo.net QA Contact: testopia@bugs.koha-community.org 1. KOHA_IMAGE=main-bookworm ktd up 2. prove t/db_dependent/OAI/Server.t 3. pass 4. KOHA_IMAGE=main-trixie ktd up 5. prove t/db_dependent/OAI/Server.t # got : 'http://localhost/' # expect : 'http://localhost' Severity = major because it makes the CI fail and hides issues even if not as much as Bug 40680. -- 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=40989 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=40680 -- 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=40989 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matthias.meusburger@biblibr | |e.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40989 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |41077 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41077 [Bug 41077] [OMNIBUS] Debian 13 and Perl 5.40 compatibility -- 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=40989 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also|https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=40680 | -- 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=40989 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|NEW |CONFIRMED Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | -- 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=40989 --- Comment #1 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- The tests fail because the returned structures differ. In particular the difference is a trailing slash in the `request: http://localhost` portion of the response. Debian's updated `CGI` module is the culprit: To reproduce: 1. Run: $ KOHA_IMAGE=main-bookworm ktd --proxy --name bookworm up -d $ ktd --name bookworm --wait-ready 120 $ ktd --name bookworm --shell --run "perl -MCGI -e 'print \"CGI \$CGI::VERSION: \", CGI->new->self_url, \"\n\"'" && ktd --name bookworm down => SUCCESS: Prints ``` CGI 4.55: http://localhost ``` 2. Run: $ KOHA_IMAGE=main-trixie ktd --proxy --name bookworm up -d $ ktd --name trixie --wait-ready 120 $ ktd --name trixie --shell --run "perl -MCGI -e 'print \"CGI \$CGI::VERSION: \", CGI->new->self_url, \"\n\"'" && ktd --name trixie down => FAIL: Prints ``` CGI 4.68: http://localhost/ ``` -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40989 --- Comment #2 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 190161 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190161&action=edit Bug 40989: Fix OAI-PMH tests for CGI.pm 4.68+ CGI.pm 4.68 (shipped with Debian 13/Trixie) changed the behavior of self_url() to include a trailing slash when there's no path component. This causes OAI-PMH tests to fail as they expect URLs without trailing slashes. This patch strips the trailing slash from both the requestURL field in OAI responses and the baseURL field in Identify responses to maintain compatibility across CGI.pm versions. Test plan: 1. Start a 'trixie' KTD: $ KOHA_IMAGE=main-trixie ktd --proxy --name trixie up -d $ ktd --name trixie --wait-ready 120 2. Run the tests: $ ktd --name trixie --shell k$ prove t/db_dependent/OAI/Server.t => FAIL: Tests fail! 3. Apply this patch 5. Repeat 2 6. Repeat 1-2 with a 'bookworm' image => SUCCESS: Tests pass too! 7. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40989 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40989 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CONFIRMED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40989 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40989 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |CONFIRMED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40989 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CONFIRMED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40989 David Nind <david@davidnind.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=40989 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190161|0 |1 is obsolete| | --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 190189 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190189&action=edit Bug 40989: Fix OAI-PMH tests for CGI.pm 4.68+ CGI.pm 4.68 (shipped with Debian 13/Trixie) changed the behavior of self_url() to include a trailing slash when there's no path component. This causes OAI-PMH tests to fail as they expect URLs without trailing slashes. This patch strips the trailing slash from both the requestURL field in OAI responses and the baseURL field in Identify responses to maintain compatibility across CGI.pm versions. Test plan: 1. Start a 'trixie' KTD: $ KOHA_IMAGE=main-trixie ktd --proxy --name trixie up -d $ ktd --name trixie --wait-ready 120 2. Run the tests: $ ktd --name trixie --shell k$ prove t/db_dependent/OAI/Server.t => FAIL: Tests fail! 3. Apply this patch 5. Repeat 2 6. Repeat 1-2 with a 'bookworm' image => SUCCESS: Tests pass too! 7. Sign off :-D Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40989 --- Comment #4 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Leaving a note for QA review: * The CGI->self_url() change can be considered an enhancement on CGI. My patch makes sure it doesn't work the way upstream does, but makes it 'not change behavior'. My call was to do it like this because... * The tests are very large and a refactoring *could* be a pain to support both cases (been told I change too many lines in tests when providing 'a one line fix'). * I don't think that trailing slash is relevant at all in any case -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40989 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |victor@tuxayo.net |y.org | --- Comment #5 from Victor Grousset/tuxayo <victor@tuxayo.net> ---
refactoring *could* be a pain to support both cases
+1 and if anything to refactor, it would be accommodate the new self_url() output, not both cases. If we can away without wider changes, let's go with that. -- Not related to fixing the tests but still to the change of self_url(), there are other occurrences of self_url() that on recent OSes I guess should lead to URLs with a double / in the middle. That shouldn't be a worry right? Unless we have a specific case that could be a concern. For good measure, I've emailed Matts to know if they think of something when knowing about that self_url() change. Otherwise, test plan works and code looks good so I think I'll pass QA not later than Monday unless some info comes up. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40989 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190189|0 |1 is obsolete| | --- Comment #6 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 190467 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190467&action=edit Bug 40989: Fix OAI-PMH tests for CGI.pm 4.68+ CGI.pm 4.68 (shipped with Debian 13/Trixie) changed the behavior of self_url() to include a trailing slash when there's no path component. This causes OAI-PMH tests to fail as they expect URLs without trailing slashes. This patch strips the trailing slash from both the requestURL field in OAI responses and the baseURL field in Identify responses to maintain compatibility across CGI.pm versions. Test plan: 1. Start a 'trixie' KTD: $ KOHA_IMAGE=main-trixie ktd --proxy --name trixie up -d $ ktd --name trixie --wait-ready 120 2. Run the tests: $ ktd --name trixie --shell k$ prove t/db_dependent/OAI/Server.t => FAIL: Tests fail! 3. Apply this patch 5. Repeat 2 6. Repeat 1-2 with a 'bookworm' image => SUCCESS: Tests pass too! 7. Sign off :-D Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40989 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #7 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Works, makes sense, QA script happy, code looks good, passing QA :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40989 --- Comment #8 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Thanks Matts for the quick glance and confirming there seems to be nothing additional to worry about. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40989 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40989 --- Comment #9 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40989 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes OAI-PMH (tests release notes| |and request) so that | |OAI-PMH responses work when | |Debian 13 (Trixie) is used | |as the operating system. | |Trailing slashes are | |stripped from requestURL | |for CGI.pm 4.68+ | |compatibility | | | |Technical details: | | | |CGI.pm 4.68 (shipped with | |Debian 13/Trixie) changed | |the behaviour of | |self_url() to include a | |trailing slash when there's | |no path component. | | | |This strips the trailing | |slash from both the | |requestURL field in OAI | |responses and the baseURL | |field in Identify responses | |to maintain compatibility | |across CGI.pm versions. CC| |david@davidnind.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40989 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|26.05.00 |26.05.00,25.11.01 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40989 --- Comment #10 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40989 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=40978 CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40989 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting --- Comment #11 from David Cook <dcook@prosentient.com.au> --- As per my comment on https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41077#c14 I don't think this needs to be backported to 25.05 or lower, so changing to "Needs documenting". -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40989 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Needs documenting |RESOLVED --- Comment #12 from David Nind <david@davidnind.com> --- Architecture related - no changes to the manual required. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org