[Bug 20428] New: MARC import fails on Debian Stretch
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Bug ID: 20428 Summary: MARC import fails on Debian Stretch Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org It appears that Koha cannot access /tmp on Stretch. We should standardize on each Koha instance having it's own TMPDIR in /var/lib/koha/<instance>/tmp to avoid this as well as avoiding possible file name collisions between instances. -- 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=20428 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |black23@gmail.com, | |josef.moravec@gmail.com, | |rbit@rbit.cz -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org, | |tomascohen@gmail.com Keywords| |rel_18_05_candidate --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- If it is confirmed, it's blocker for 18.05 -- 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=20428 --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #1)
If it is confirmed, it's blocker for 18.05
To give a bit more detail, we had two Koha servers that were upgraded to Stretch. Both servers exhibited this behavior. The file upload would work just fine, the files would show up in /tmp as expected, but then Koha was unable to 'see' those files. In the code, if you printed a list of files in /tmp, Koha would see the tmp dir as empty! It's like to Koha, /tmp was a write-only filesystem! -- 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=20428 paxed <pasi.kallinen@joensuu.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pasi.kallinen@joensuu.fi --- Comment #3 from paxed <pasi.kallinen@joensuu.fi> --- Would this be caused by systemd PrivateTmp? https://www.maxoberberger.net/blog/2017/10/debian-9-private-tmp.html -- 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=20428 --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to paxed from comment #3)
Would this be caused by systemd PrivateTmp?
https://www.maxoberberger.net/blog/2017/10/debian-9-private-tmp.html
That's the most probable cause! But the solution should be what Kyle said: creating a per-instance temp dir and adjusting the cleanup script to deal with it too. -- 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=20428 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | -- 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=20428 --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 73426 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73426&action=edit Bug 20428: Add the option to specify a tmp uploads dir -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 73427 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73427&action=edit Bug 20428: Make Koha::UploadedFile use the new config entry for tmp files -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 73428 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73428&action=edit Bug 20428: Make about.pl inform about missing upload_tmp_path entry -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #73426|0 |1 is obsolete| | --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 73429 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73429&action=edit Bug 20428: Add the option to specify a tmp uploads dir This patch adds an option to the koha-conf.xml file for specifying a temporary uploaded files directory. The koha-create script is adjusted to handle it and a convenient option switch is added. If ommited, it will default to /var/lib/koha/<instance>/uploads_tmp. koha-create-dirs is patched to create the required directory with the right permissions. The docs get the new parameter documented. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #73427|0 |1 is obsolete| | --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 73430 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73430&action=edit Bug 20428: Make Koha::UploadedFile use the new config entry for tmp files This patch makes Koha::UploadedFile->temporary_directory try to use the new configuration entry. It will fallback to File::Spec->tmpdir otherwise. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #73428|0 |1 is obsolete| | --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 73431 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73431&action=edit Bug 20428: Make about.pl inform about missing upload_tmp_path entry This patch makes about.pl warn about a missing upload_tmp_path entry in koha-conf.xml. It also mentions the effectively used tmp dir. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cbutosi@gmail.com --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- *** Bug 19898 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 --- Comment #12 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 73430 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73430 Bug 20428: Make Koha::UploadedFile use the new config entry for tmp files Review of attachment 73430: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=20428&attachment=73430) ----------------------------------------------------------------- ::: Koha/UploadedFile.pm @@ +169,5 @@
sub temporary_directory { my ( $class ) = @_; + return (C4::Context->config('upload_tmp_path')) + ? C4::Context->config('upload_tmp_path') + : File::Spec->tmpdir;
Why a trinary when a || File::Spec->tmpdir would work more nicely? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #73429|0 |1 is obsolete| | --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 75159 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75159&action=edit Bug 20428: Add the option to specify a tmp uploads dir This patch adds an option to the koha-conf.xml file for specifying a temporary uploaded files directory. The koha-create script is adjusted to handle it and a convenient option switch is added. If ommited, it will default to /var/lib/koha/<instance>/uploads_tmp. koha-create-dirs is patched to create the required directory with the right permissions. The docs get the new parameter documented. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #73430|0 |1 is obsolete| | --- Comment #14 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 75160 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75160&action=edit Bug 20428: Make Koha::UploadedFile use the new config entry for tmp files This patch makes Koha::UploadedFile->temporary_directory try to use the new configuration entry. It will fallback to File::Spec->tmpdir otherwise. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #73431|0 |1 is obsolete| | --- Comment #15 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 75161 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75161&action=edit Bug 20428: Make about.pl inform about missing upload_tmp_path entry This patch makes about.pl warn about a missing upload_tmp_path entry in koha-conf.xml. It also mentions the effectively used tmp dir. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |20727 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20727 [Bug 20727] Replace usage of File::Spec->tmpdir with Koha::UploadedFile->temporary_directory -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Kyle M Hall <kyle@bywatersolutions.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=20428 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #75159|0 |1 is obsolete| | Attachment #75160|0 |1 is obsolete| | Attachment #75161|0 |1 is obsolete| | --- Comment #16 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 75162 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75162&action=edit Bug 20428: Add the option to specify a tmp uploads dir This patch adds an option to the koha-conf.xml file for specifying a temporary uploaded files directory. The koha-create script is adjusted to handle it and a convenient option switch is added. If ommited, it will default to /var/lib/koha/<instance>/uploads_tmp. koha-create-dirs is patched to create the required directory with the right permissions. The docs get the new parameter documented. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 --- Comment #17 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 75163 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75163&action=edit Bug 20428: Make Koha::UploadedFile use the new config entry for tmp files This patch makes Koha::UploadedFile->temporary_directory try to use the new configuration entry. It will fallback to File::Spec->tmpdir otherwise. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 --- Comment #18 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 75164 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75164&action=edit Bug 20428: Make about.pl inform about missing upload_tmp_path entry This patch makes about.pl warn about a missing upload_tmp_path entry in koha-conf.xml. It also mentions the effectively used tmp dir. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 --- Comment #19 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- No access to /tmp? This will probably affect much more than upload? What about CGI sessions? Several cron jobs ? We should also look for hardcoded /tmp's in the codebase.. etc. Or make sure that koha-instance has enough permissions at install/upgrade ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #75162|0 |1 is obsolete| | --- Comment #20 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 75169 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75169&action=edit Bug 20428: Add the option to specify a tmp uploads dir This patch adds an option to the koha-conf.xml file for specifying a temporary uploaded files directory. The koha-create script is adjusted to handle it and a convenient option switch is added. If ommited, it will default to /var/lib/koha/<instance>/uploads_tmp. koha-create-dirs is patched to create the required directory with the right permissions. The docs get the new parameter documented. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #75163|0 |1 is obsolete| | --- Comment #21 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 75170 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75170&action=edit Bug 20428: Make Koha::UploadedFile use the new config entry for tmp files This patch makes Koha::UploadedFile->temporary_directory try to use the new configuration entry. It will fallback to File::Spec->tmpdir otherwise. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #75164|0 |1 is obsolete| | --- Comment #22 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 75171 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75171&action=edit Bug 20428: Make about.pl inform about missing upload_tmp_path entry This patch makes about.pl warn about a missing upload_tmp_path entry in koha-conf.xml. It also mentions the effectively used tmp dir. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 --- Comment #23 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 75172 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75172&action=edit Bug 20428: Added missing parameter --upload-tmp-path Line 463 lists valid parameters, but it was missing upload-tmp-path: which resulted in the koha-create saying it is an invalid parameter. TEST PLAN --------- 1) apply all patches but this. 2) sudo perl ~/misc4dev/cp_debian_files.pl 3) restart_all 4) sudo koha-create --create-db --upload-tmp-path unique-path awesome-test-name -- Fails to run. 5) apply this patch 6) repeat 2-4 7) sudo vi /etc/koha/sites/awesome-test-name/koha-conf.xml -- the upload_tmp_path entry should have unique-path in it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff CC| |mtompset@hotmail.com --- Comment #24 from M. Tompsett <mtompset@hotmail.com> --- I'm going for lunch, but I'll have to test this on Stretch for a MARC import to be sure. Changing back to needs signoff. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 M. Tompsett <mtompset@hotmail.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=20428 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #25 from Tomás Cohen Arazi <tomascohen@gmail.com> --- This is PQA. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 --- Comment #26 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Marcel de Rooy from comment #19)
No access to /tmp? This will probably affect much more than upload? What about CGI sessions? Several cron jobs ? We should also look for hardcoded /tmp's in the codebase.. etc.
Or make sure that koha-instance has enough permissions at install/upgrade ?
You are right about this being a broader problem for Stretch users. Kyle filed bug 20727 to have that conversation as this one only deals with file uploads. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 --- Comment #27 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Tomás Cohen Arazi from comment #26)
(In reply to Marcel de Rooy from comment #19)
No access to /tmp? This will probably affect much more than upload? What about CGI sessions? Several cron jobs ? We should also look for hardcoded /tmp's in the codebase.. etc.
Or make sure that koha-instance has enough permissions at install/upgrade ?
You are right about this being a broader problem for Stretch users. Kyle filed bug 20727 to have that conversation as this one only deals with file uploads.
I think koha-conf should contain an entry for an alternative tmp directory. Upload should then create a subfolder there. But the config var should be more general and not be upload-tmp-path.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |ASSIGNED --- Comment #28 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Marcel de Rooy from comment #27)
(In reply to Tomás Cohen Arazi from comment #26)
(In reply to Marcel de Rooy from comment #19)
No access to /tmp? This will probably affect much more than upload? What about CGI sessions? Several cron jobs ? We should also look for hardcoded /tmp's in the codebase.. etc.
Or make sure that koha-instance has enough permissions at install/upgrade ?
You are right about this being a broader problem for Stretch users. Kyle filed bug 20727 to have that conversation as this one only deals with file uploads.
I think koha-conf should contain an entry for an alternative tmp directory. Upload should then create a subfolder there. But the config var should be more general and not be upload-tmp-path..
I agree. Will try to provide a sensible follow-up. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 --- Comment #29 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 75275 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75275&action=edit Bug 20428: Make upload_tmp a more general tmp directory Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #75169|0 |1 is obsolete| | --- Comment #30 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 75279 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75279&action=edit Bug 20428: Add the option to specify a tmp uploads dir This patch adds an option to the koha-conf.xml file for specifying a temporary uploaded files directory. The koha-create script is adjusted to handle it and a convenient option switch is added. If ommited, it will default to /var/lib/koha/<instance>/uploads_tmp. koha-create-dirs is patched to create the required directory with the right permissions. The docs get the new parameter documented. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #75170|0 |1 is obsolete| | --- Comment #31 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 75280 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75280&action=edit Bug 20428: Make Koha::UploadedFile use the new config entry for tmp files This patch makes Koha::UploadedFile->temporary_directory try to use the new configuration entry. It will fallback to File::Spec->tmpdir otherwise. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #75171|0 |1 is obsolete| | --- Comment #32 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 75281 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75281&action=edit Bug 20428: Make about.pl inform about missing upload_tmp_path entry This patch makes about.pl warn about a missing upload_tmp_path entry in koha-conf.xml. It also mentions the effectively used tmp dir. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #75172|0 |1 is obsolete| | --- Comment #33 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 75282 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75282&action=edit Bug 20428: Added missing parameter --upload-tmp-path Line 463 lists valid parameters, but it was missing upload-tmp-path: which resulted in the koha-create saying it is an invalid parameter. TEST PLAN --------- 1) apply all patches but this. 2) sudo perl ~/misc4dev/cp_debian_files.pl 3) restart_all 4) sudo koha-create --create-db --upload-tmp-path unique-path awesome-test-name -- Fails to run. 5) apply this patch 6) repeat 2-4 7) sudo vi /etc/koha/sites/awesome-test-name/koha-conf.xml -- the upload_tmp_path entry should have unique-path in it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #75275|0 |1 is obsolete| | --- Comment #34 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 75283 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75283&action=edit Bug 20428: Make upload_tmp a more general tmp directory Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #75283|0 |1 is obsolete| | --- Comment #35 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 75286 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75286&action=edit Bug 20428: Make upload_tmp a more general tmp directory Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Tomás Cohen Arazi <tomascohen@gmail.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=20428 --- Comment #36 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Marcel: can you review the last changes? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 --- Comment #37 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Tomás Cohen Arazi from comment #36)
Marcel: can you review the last changes?
QA: Looking here now -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 --- Comment #38 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- dev-koha@dev:/usr/share/koha/devclone$ ll /var/lib/koha/dev/tmp/uploads/ drwxr-xr-x 2 dev-koha dev-koha 4096 May 14 08:56 koha_dev_upload Removing this additional level. In an enhancement we can remove the database name from the main upload folder in tmp since it is instance bound now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #75279|0 |1 is obsolete| | --- Comment #39 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 75293 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75293&action=edit Bug 20428: Add the option to specify a tmp uploads dir This patch adds an option to the koha-conf.xml file for specifying a temporary uploaded files directory. The koha-create script is adjusted to handle it and a convenient option switch is added. If ommited, it will default to /var/lib/koha/<instance>/uploads_tmp. koha-create-dirs is patched to create the required directory with the right permissions. The docs get the new parameter documented. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #75280|0 |1 is obsolete| | --- Comment #40 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 75294 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75294&action=edit Bug 20428: Make Koha::UploadedFile use the new config entry for tmp files This patch makes Koha::UploadedFile->temporary_directory try to use the new configuration entry. It will fallback to File::Spec->tmpdir otherwise. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #75281|0 |1 is obsolete| | --- Comment #41 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 75295 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75295&action=edit Bug 20428: Make about.pl inform about missing upload_tmp_path entry This patch makes about.pl warn about a missing upload_tmp_path entry in koha-conf.xml. It also mentions the effectively used tmp dir. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #75282|0 |1 is obsolete| | --- Comment #42 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 75296 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75296&action=edit Bug 20428: Added missing parameter --upload-tmp-path Line 463 lists valid parameters, but it was missing upload-tmp-path: which resulted in the koha-create saying it is an invalid parameter. TEST PLAN --------- 1) apply all patches but this. 2) sudo perl ~/misc4dev/cp_debian_files.pl 3) restart_all 4) sudo koha-create --create-db --upload-tmp-path unique-path awesome-test-name -- Fails to run. 5) apply this patch 6) repeat 2-4 7) sudo vi /etc/koha/sites/awesome-test-name/koha-conf.xml -- the upload_tmp_path entry should have unique-path in it. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #75286|0 |1 is obsolete| | --- Comment #43 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 75297 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75297&action=edit Bug 20428: Make upload_tmp a more general tmp directory Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 --- Comment #44 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 75298 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75298&action=edit Bug 20428: (QA follow-up) Remove redundant directory level Upload creates its own upload folder in the temp folder, so there is no need to add another level in temporary_directory. Removing the creation of this folder in koha-create-dirs too. Also removing the use Koha::UploadedFiles in about.pl. No longer needed. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 --- Comment #45 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- I would recommend release notes and a db rev warning to alert people to move existing installs in this direction. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 --- Comment #46 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Marcel de Rooy from comment #45)
I would recommend release notes and a db rev warning to alert people to move existing installs in this direction.
Maybe on the about page? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 --- Comment #47 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Marcel de Rooy from comment #45)
I would recommend release notes and a db rev warning to alert people to move existing installs in this direction.
I agree there should be an IMPORTANT: notice in the release notes for people in Stretch. And I think it is not the only one on this release. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 --- Comment #48 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #46)
(In reply to Marcel de Rooy from comment #45)
I would recommend release notes and a db rev warning to alert people to move existing installs in this direction.
Maybe on the about page?
Yeah, there is an about warning already on the new tmp config var. A print warning from updatedatabase would be extra. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 --- Comment #49 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 75305 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75305&action=edit Bug 20428: Display warning if the entry is empty And not only if the entry is missing. We should do the same for other entries. Also, use Koha::UploadedFile->temporary_directory to know the fallback value. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 --- Comment #50 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Marcel de Rooy from comment #48)
(In reply to Jonathan Druart from comment #46)
(In reply to Marcel de Rooy from comment #45)
I would recommend release notes and a db rev warning to alert people to move existing installs in this direction.
Maybe on the about page?
Yeah, there is an about warning already on the new tmp config var. A print warning from updatedatabase would be extra.
I do not think it is necessary. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #51 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 18.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_18_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Narcis Garcia <informatica@actiu.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |informatica@actiu.net --- Comment #52 from Narcis Garcia <informatica@actiu.net> --- PHP uses parameter "upload_tmp_dir", usually set at php.ini or webserver site profile. Doesn't Perl have some similar to not make necessary to check filesystem paths and permissions? I have a Koha 17.11 running in Debian 9 (Stretch) without problem about uploads. How does Koha 17.11 deal with this? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 --- Comment #53 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Narcis Garcia from comment #52)
PHP uses parameter "upload_tmp_dir", usually set at php.ini or webserver site profile. Doesn't Perl have some similar to not make necessary to check filesystem paths and permissions?
I have a Koha 17.11 running in Debian 9 (Stretch) without problem about uploads. How does Koha 17.11 deal with this?
Did you see comment 4? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 --- Comment #54 from Narcis Garcia <informatica@actiu.net> --- Is "template_cache_dir" parameter affected by this issue? I have Koha 17.11 running on Debian 9 without this directive. Should I enable it when following performance recommendations? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 --- Comment #55 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Narcis Garcia from comment #54)
Is "template_cache_dir" parameter affected by this issue?
No
I have Koha 17.11 running on Debian 9 without this directive. Should I enable it when following performance recommendations?
Yes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Eugene Espinoza <eugenegf@yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |eugenegf@yahoo.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Pongtawat <pongtawat@punsarn.asia> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |januszop@gmail.com --- Comment #56 from Pongtawat <pongtawat@punsarn.asia> --- *** Bug 19676 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 --- Comment #57 from Mason James <mtj@kohaaloha.com> --- (In reply to Narcis Garcia from comment #52)
PHP uses parameter "upload_tmp_dir", usually set at php.ini or webserver site profile. Doesn't Perl have some similar to not make necessary to check filesystem paths and permissions?
I have a Koha 17.11 running in Debian 9 (Stretch) without problem about uploads. How does Koha 17.11 deal with this?
fyi: i've hit this problem on deb9 with 17.11.6 + plack -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 --- Comment #58 from Mason James <mtj@kohaaloha.com> --- (In reply to Jonathan Druart from comment #51)
Pushed to master for 18.05, thanks to everybody involved!
hi Frido, would you accept this patchset for the 17.11 release? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20428 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to Stable |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org