Bug 20920 - Plack timeout because of missing CGI::Compile Perl dependency
Summary: Plack timeout because of missing CGI::Compile Perl dependency
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Packaging (show other bugs)
Version: master
Hardware: All Linux
: P5 - low normal (vote)
Assignee: Jerome Charaoui
QA Contact: Testopia
URL:
Keywords: dependency
Depends on:
Blocks:
 
Reported: 2018-06-12 15:22 UTC by Jerome Charaoui
Modified: 2019-10-14 19:56 UTC (History)
5 users (show)

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


Attachments
Patch for debian/control (738 bytes, patch)
2018-06-12 15:22 UTC, Jerome Charaoui
Details | Diff | Splinter Review
bug 20920: patch to PerlDependencies.pm adding CGI::Compile (753 bytes, patch)
2018-06-20 18:29 UTC, Jerome Charaoui
Details | Diff | Splinter Review
Bug 20920: Add missing dependency on CGI::Compile (824 bytes, patch)
2018-06-29 20:26 UTC, Mirko Tietgen
Details | Diff | Splinter Review
Bug 20920: Followup: generated d/control (1.04 KB, patch)
2018-06-29 20:27 UTC, Mirko Tietgen
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jerome Charaoui 2018-06-12 15:22:55 UTC
Created attachment 76000 [details] [review]
Patch for debian/control

The Debian/Ubuntu package is missing a dependency on libcgi-compile-perl. Without this package installed, when Plack is enabled/started, the webserver is unresponsive and the following errors appear in the logs:

Error while loading /etc/koha/plack.psgi: Can't locate CGI/Compile.pm in @INC (you may need to install the CGI::Compile module) (@INC contains: /usr/share/koha/lib /us
r/share/koha/installer /usr/share/koha/lib/installer /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5
/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Plack
/App/WrapCGI.pm line 8.
BEGIN failed--compilation aborted at /usr/share/perl5/Plack/App/WrapCGI.pm line 8.
Compilation failed in require at /usr/share/perl5/Plack/App/CGIBin.pm line 6.
BEGIN failed--compilation aborted at /usr/share/perl5/Plack/App/CGIBin.pm line 6.
Compilation failed in require at /etc/koha/plack.psgi line 21.
BEGIN failed--compilation aborted at /etc/koha/plack.psgi line 21.

Attached is a patch to add this package to the debian/control file.
Comment 1 Jonathan Druart 2018-06-12 17:10:02 UTC
Which versions of Debian and/or Ubuntu did you test?
Comment 2 Jerome Charaoui 2018-06-12 17:19:30 UTC
Debian 9.4 (stretch)
Comment 3 Mirko Tietgen 2018-06-15 09:46:15 UTC
libcgi-compile-perl is 'recommended' by libplack-perl, which gets it installed on most systems. Apparently koha depends on it. Not sure why it is only recommended by libplack-perl, but that's a different story.

The control file is not supposed to be patched, as stated in the file itself.

> # Do not manually edit "control"

CGI::Compile needs to be added to PerlDependencies.pm.
I will take care of updating the control file afterwards.
Comment 4 Jerome Charaoui 2018-06-20 18:29:38 UTC
Created attachment 76217 [details] [review]
bug 20920: patch to PerlDependencies.pm adding CGI::Compile
Comment 5 Mirko Tietgen 2018-06-29 20:26:54 UTC
Created attachment 76589 [details] [review]
Bug 20920: Add missing dependency on CGI::Compile

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Comment 6 Mirko Tietgen 2018-06-29 20:27:09 UTC
Created attachment 76590 [details] [review]
Bug 20920: Followup: generated d/control

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Comment 7 Mirko Tietgen 2018-06-29 20:46:00 UTC
Jerome, thanks a lot for spotting the problem and your patch!
Minor QA change: first line of the commit message is supposed to be
Bug xxxxx: Your bug report title
I changed it and generated the new control file.

Nick, please push, I will do a 18.05.01-2 and probably 17.11.07-2 package with this because it breaks fresh Koha with Plack on Stretch.
Comment 8 Mirko Tietgen 2018-06-29 22:01:35 UTC
Martin: is in 18.05.01-2, please push to 18.05.02.

Fridolin: is in 17.11.07-2, please push to 17.11.08. Depends on 20693 for 17.11.x, please push the other one first.
Comment 9 Nick Clemens 2018-07-02 13:15:34 UTC
Awesome work all!

Pushed to master for 18.11
Comment 10 Martin Renvoize 2018-07-02 17:04:42 UTC
Pushed to 18.05.x for 18.05.02
Comment 11 Fridolin Somers 2018-07-04 14:25:18 UTC
Pushed to 17.11.x for 17.11.08