[Koha-bugs] [Bug 20727] Replace usage of File::Spec->tmpdir with C4::Context->temporary_directory
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20727 Bug 20727 depends on bug 20428, which changed state. Bug 20428 Summary: MARC import fails on Debian Stretch https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 What|Removed |Added Status|Pushed to Stable|RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 20727] Replace usage of File::Spec->tmpdir with C4::Context->temporary_directory
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20727 --- Comment #30 from David Cook --- I'm guessing the redefined warnings come from some circular dependency... but that's a red herring since we'd never run C4::Auth on its own anyway. If I create a script and load "C4::Auth", the script compiles fine. In fact, if I remove the semi-colon from the end of "my $dir = C4::Context::temporary_directory", the Koha web app still loads just fine. But I get the following when I try to compile the module: perl -c "C4/Auth.pm" Subroutine psgi_env redefined at C4/Auth.pm line 50. Subroutine safe_exit redefined at C4/Auth.pm line 52. Subroutine get_template_and_user redefined at C4/Auth.pm line 142. Subroutine _version_check redefined at C4/Auth.pm line 715. Subroutine _session_log redefined at C4/Auth.pm line 761. Subroutine _timeout_syspref redefined at C4/Auth.pm line 768. Subroutine checkauth redefined at C4/Auth.pm line 778. Subroutine check_api_auth redefined at C4/Auth.pm line 1387. Subroutine check_cookie_auth redefined at C4/Auth.pm line 1629. syntax error at C4/Auth.pm line 1751, near "C4::Context::temporary_directory my " Global symbol "$instance" requires explicit package name at C4/Auth.pm line 1751. Global symbol "$dir" requires explicit package name at C4/Auth.pm line 1752. Global symbol "$instance" requires explicit package name at C4/Auth.pm line 1752. BEGIN not safe after errors--compilation aborted at C4/Auth.pm line 1928. Interesting... I always thought that modules were compiled when they were loaded using "use". Not even the BEGIN{} block in the module is run when loaded using "use", which seems contradictory to experience... -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 20727] Replace usage of File::Spec->tmpdir with C4::Context->temporary_directory
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20727 --- Comment #29 from David Cook --- That's not it either as I have a newer CGI version than 4.08... HTTP_USER_AGENT=stuff perl -c C4/Auth.pm [Thu Oct 18 11:16:58 2018] Auth.pm: Subroutine psgi_env redefined at C4/Auth.pm line 50. [Thu Oct 18 11:16:58 2018] Auth.pm: Subroutine safe_exit redefined at C4/Auth.pm line 52. [Thu Oct 18 11:16:58 2018] Auth.pm: Subroutine get_template_and_user redefined at C4/Auth.pm line 142. [Thu Oct 18 11:16:58 2018] Auth.pm: Subroutine _version_check redefined at C4/Auth.pm line 715. [Thu Oct 18 11:16:58 2018] Auth.pm: Subroutine _session_log redefined at C4/Auth.pm line 761. [Thu Oct 18 11:16:58 2018] Auth.pm: Subroutine _timeout_syspref redefined at C4/Auth.pm line 768. [Thu Oct 18 11:16:58 2018] Auth.pm: Subroutine checkauth redefined at C4/Auth.pm line 778. [Thu Oct 18 11:16:58 2018] Auth.pm: Subroutine check_api_auth redefined at C4/Auth.pm line 1387. [Thu Oct 18 11:16:58 2018] Auth.pm: Subroutine check_cookie_auth redefined at C4/Auth.pm line 1629. Status: 500 Content-type: text/html Software error: Bareword C4::Context::temporary_directory not allowed while strict subs in use at C4/Auth.pm line 1750. BEGIN not safe after errors--compilation aborted at C4/Auth.pm line 1928. For help, please send mail to this site's webmaster, giving this error message and the time and date of the error. [Thu Oct 18 11:16:58 2018] Auth.pm: Bareword "C4::Context::temporary_directory" not allowed while "strict subs" in use at C4/Auth.pm line 1750. [Thu Oct 18 11:16:58 2018] Auth.pm: BEGIN not safe after errors--compilation aborted at C4/Auth.pm line 1928. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 20727] Replace usage of File::Spec->tmpdir with C4::Context->temporary_directory
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20727 --- Comment #28 from David Cook --- I see C4::Context turns off the warnings for redefined functions when there's a HTTP_USER_AGENT environmental variable, so that explains why the warnings don't show up in the web server logs... I wonder if Modern::Perl is up to something here... -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 20727] Replace usage of File::Spec->tmpdir with C4::Context->temporary_directory
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20727 --- Comment #27 from David Cook --- (In reply to David Cook from comment #26) > I'm guessing no one else has experienced this? For some reason, when I use the web app, I don't get any errors. I wonder if we're suppressing them unintentionally in whatever is loading C4::Auth? -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 20727] Replace usage of File::Spec->tmpdir with C4::Context->temporary_directory
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20727 --- Comment #26 from David Cook --- When I run "perl -c C4/Auth.pm", I get the following: perl -c C4/Auth.pm Subroutine psgi_env redefined at C4/Auth.pm line 50. Subroutine safe_exit redefined at C4/Auth.pm line 52. Subroutine get_template_and_user redefined at C4/Auth.pm line 142. Subroutine _version_check redefined at C4/Auth.pm line 715. Subroutine _session_log redefined at C4/Auth.pm line 761. Subroutine _timeout_syspref redefined at C4/Auth.pm line 768. Subroutine checkauth redefined at C4/Auth.pm line 778. Subroutine check_api_auth redefined at C4/Auth.pm line 1387. Subroutine check_cookie_auth redefined at C4/Auth.pm line 1629. Bareword "C4::Context::temporary_directory" not allowed while "strict subs" in use at C4/Auth.pm line 1750. BEGIN not safe after errors--compilation aborted at C4/Auth.pm line 1928. If I change "C4::Context::temporary_directory" to "C4::Context::temporary_directory()", that error goes away and compilation is fine. I'm guessing no one else has experienced this? -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 20727] Replace usage of File::Spec->tmpdir with C4::Context->temporary_directory
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20727 David Cook changed: What|Removed |Added CC||dc...@prosentient.com.au --- Comment #25 from David Cook --- When I run "perl -c C4/Auth.pm", I get the following: dcook@kohaprod:/kohawebs/dev/dcook/git> perl -c C4/Auth.pm Subroutine psgi_env redefined at C4/Auth.pm line 50. Subroutine safe_exit redefined at C4/Auth.pm line 52. Subroutine get_template_and_user redefined at C4/Auth.pm line 142. Subroutine _version_check redefined at C4/Auth.pm line 715. Subroutine _session_log redefined at C4/Auth.pm line 761. Subroutine _timeout_syspref redefined at C4/Auth.pm line 768. Subroutine checkauth redefined at C4/Auth.pm line 778. Subroutine check_api_auth redefined at C4/Auth.pm line 1387. Subroutine check_cookie_auth redefined at C4/Auth.pm line 1629. Bareword "C4::Context::temporary_directory" not allowed while "strict subs" in use at C4/Auth.pm line 1750. BEGIN not safe after errors--compilation aborted at C4/Auth.pm line 1928. If I change "C4::Context::temporary_directory" to "C4::Context::temporary_directory()", that error goes away and compilation is fine. I'm guessing no one else has experienced this? -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 20727] Replace usage of File::Spec->tmpdir with C4::Context->temporary_directory
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20727 Martin Renvoize changed: What|Removed |Added Resolution|--- |FIXED Status|Pushed to Master|RESOLVED CC||martin.renvoize@ptfs-europe ||.com --- Comment #24 from Martin Renvoize --- Architectural enhancement, not backporting for 18.05.x series. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 20727] Replace usage of File::Spec->tmpdir with C4::Context->temporary_directory
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20727 Nick Clemens changed: What|Removed |Added Status|Passed QA |Pushed to Master CC||n...@bywatersolutions.com --- Comment #23 from Nick Clemens --- Awesome work all! Pushed to master for 18.11.x -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 20727] Replace usage of File::Spec->tmpdir with C4::Context->temporary_directory
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20727 Jonathan Druart changed: What|Removed |Added Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 20727] Replace usage of File::Spec->tmpdir with C4::Context->temporary_directory
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20727 --- Comment #19 from Jonathan Druart --- Created attachment 75925 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75925=edit Bug 20727: (QA follow-up) Fix Upload.t and Plugins.t Trivial changes. Adding C4::Context->temporary_directory to subsequent tmpdir call in Plugins. Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 20727] Replace usage of File::Spec->tmpdir with C4::Context->temporary_directory
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20727 --- Comment #18 from Jonathan Druart --- Created attachment 75924 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75924=edit Bug 20727: Move temporary_directory() to C4::Context Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 20727] Replace usage of File::Spec->tmpdir with C4::Context->temporary_directory
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20727 --- Comment #22 from Jonathan Druart --- Created attachment 75928 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75928=edit Bug 20727: Add use line for File::Spec in C4::Context, sort used modules Signed-off-by: Jonathan Druart -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 20727] Replace usage of File::Spec->tmpdir with C4::Context->temporary_directory
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20727 Jonathan Druart changed: What|Removed |Added Attachment #75667|0 |1 is obsolete|| Attachment #75668|0 |1 is obsolete|| Attachment #75669|0 |1 is obsolete|| Attachment #75670|0 |1 is obsolete|| Attachment #75833|0 |1 is obsolete|| Attachment #75835|0 |1 is obsolete|| --- Comment #17 from Jonathan Druart --- Created attachment 75923 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75923=edit Bug 20727: Replace usage of File::Spec->tmpdir with Koha::UploadedFile->temporary_directory As explained in bug 20428 use tmpdir can cause issues and it just makes sense to standardize our temp directory in a universal way. Test Plan: 1) Apply this patch 2) Verify you can still log in and use Koha 3) Verify the web installer still works 4) Verify EDI module can still download files via FTP 5) Verify fines.pl still runs with -o option 6) prove t/db_dependent/Plugins.t 7) prove t/db_dependent/Sitemapper.t 8) prove t/db_dependent/Templates.t Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 20727] Replace usage of File::Spec->tmpdir with C4::Context->temporary_directory
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20727 --- Comment #21 from Jonathan Druart --- Created attachment 75927 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75927=edit Bug 20727: Replace use of tmpdir in updatedatabase.pl Signed-off-by: Jonathan Druart -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 20727] Replace usage of File::Spec->tmpdir with C4::Context->temporary_directory
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20727 --- Comment #20 from Jonathan Druart --- Created attachment 75926 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75926=edit Bug 20727: (QA follow-up) Remove a few use statements again We do no longer need "use Koha::UploadedFile" in a few places. Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 20727] Replace usage of File::Spec->tmpdir with C4::Context->temporary_directory
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20727 Kyle M Hall changed: What|Removed |Added Attachment #75834|0 |1 is obsolete|| --- Comment #16 from Kyle M Hall --- Created attachment 75835 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75835=edit Bug 20727: Add use line for File::Spec in C4::Context, sort used modules -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 20727] Replace usage of File::Spec->tmpdir with C4::Context->temporary_directory
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20727 --- Comment #15 from Kyle M Hall --- Created attachment 75834 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75834=edit Bug 20727: Add use line for File::Spec in C4::Context, sort used modules -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 20727] Replace usage of File::Spec->tmpdir with C4::Context->temporary_directory
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20727 --- Comment #14 from Kyle M Hall --- Created attachment 75833 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75833=edit Bug 20727: Replace use of tmpdir in updatedatabase.pl -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 20727] Replace usage of File::Spec->tmpdir with C4::Context->temporary_directory
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20727 Jonathan Druart changed: What|Removed |Added CC||jonathan.dru...@bugs.koha-c ||ommunity.org --- Comment #13 from Jonathan Druart --- Do not we need to update the occurrence in updatedatabase.pl as well? installer/data/mysql/updatedatabase.pl:my $tmp= File::Spec->tmpdir.'/koha_upload'; -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 20727] Replace usage of File::Spec->tmpdir with C4::Context->temporary_directory
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20727 Marcel de Rooy changed: What|Removed |Added Summary|Replace usage of|Replace usage of |File::Spec->tmpdir with |File::Spec->tmpdir with |Koha::UploadedFile->tempora |C4::Context->temporary_dire |ry_directory|ctory -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/