Summary: | misc/translator/translate does not work with perl 5.26 | ||
---|---|---|---|
Product: | Koha | Reporter: | Olli-Antti Kivilahti <olli-antti.kivilahti> |
Component: | translate.koha-community.org | Assignee: | Olli-Antti Kivilahti <olli-antti.kivilahti> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P5 - low | CC: | fridolin.somers, jonathan.druart, julian.maurice, martin.renvoize, nick |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
0001-Bug-21480-misc-translator-translate-does-not-work-wi.patch
Bug 21480: misc/translator/translate does not work with perl 5.26 Bug 21480: misc/translator/translate does not work with perl 5.26 |
Description
Olli-Antti Kivilahti
2018-10-03 08:42:50 UTC
Tested with: 1. cd $KOHA_PATH/misc/translator/ 2. perl translate create fi-FI 3. perl translate update fi-FI 4. perl translate install fi-FI Created attachment 79860 [details] [review] 0001-Bug-21480-misc-translator-translate-does-not-work-wi.patch Created attachment 79861 [details] [review] Bug 21480: misc/translator/translate does not work with perl 5.26 Perl 5.26 (or earlier) introduced a security feature, where implicitly including the program directory as a Perl library directory no longer happens (perl -I. ). This causes translate to fail because it cannot find the *.pm -files in it's own directory. This patch adds the familiar mantra use lib $FindBin::Bin; to the relevant scripts. To test: 1. Install Ubuntu18.04 or something else with Perl 5.26 2. Install Koha (we use the dev-install) 3. cd $KOHA_PATH/misc/translator/ 4. perl translate create fi-FI 5. Observe problems with missing modules. Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Problem confirmed on Debian 9/Perl 5.24 The patch fixes the issue. Created attachment 79901 [details] [review] Bug 21480: misc/translator/translate does not work with perl 5.26 Perl 5.26 (or earlier) introduced a security feature, where implicitly including the program directory as a Perl library directory no longer happens (perl -I. ). This causes translate to fail because it cannot find the *.pm -files in it's own directory. This patch adds the familiar mantra use lib $FindBin::Bin; to the relevant scripts. To test: 1. Install Ubuntu18.04 or something else with Perl 5.26 2. Install Koha (we use the dev-install) 3. cd $KOHA_PATH/misc/translator/ 4. perl translate create fi-FI 5. Observe problems with missing modules. Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Cannot recreate the issue right now but the changes make sense. Odd QA script failures here, not caused by this patch, ignoring but mentioning FAIL misc/translator/text-extract2.pl OK critic OK forbidden patterns OK git manipulation OK pod OK spelling FAIL valid Name "main::INPUT" used only once: possible typo FAIL misc/translator/tmpl_process3.pl OK critic OK forbidden patterns OK git manipulation OK pod OK spelling FAIL valid main::mkdir_recursive() called too early to check prototype Awesome work all! Pushed to master for 18.11 Pushed to 18.05.x for 18.05.05 Pushed to 17.11.x for 17.11.11 |