[Koha-bugs] [Bug 24749] Plack restart should clear orphaned cgi_compile directories on restart

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Sep 10 05:20:24 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24749

--- Comment #5 from David Cook <dcook at prosentient.com.au> ---
Comment on attachment 109826
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109826
Bug 24749: Attempt to use tmp_path from koha-conf for TMPDIR for starman

Review of attachment 109826:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=24749&attachment=109826)
-----------------------------------------------------------------

::: Koha/Middleware/SetEnv.pm
@@ +96,5 @@
>      } @setenv_headers;
>  
> +    $setenvs{TMPDIR} = C4::Context->temporary_directory;
> +    # See bug 24749
> +

I don't think CGI::Compile will see this, as this'll be set in the PSGI
application I think.

::: debian/scripts/koha-plack
@@ +84,5 @@
>      [ -z $PLACK_MAX_REQUESTS ] && PLACK_MAX_REQUESTS="50"
>      PLACK_WORKERS=$(run_safe_xmlstarlet $instancename plack_workers)
>      [ -z $PLACK_WORKERS ] && PLACK_WORKERS="2"
> +    KOHATMPDIR=$(run_safe_xmlstarlet $instancename tmp_path)
> +    [ -z $KOHATMPDIR ] || TMPDIR=$KOHATMPDIR

You need to export TMPDIR here. Otherwise, it's just going to be localized to
this script. 

(But really you could just define it in plack.psgi instead, which would be a
more robust solution for different deployments.)

You can see this by how KOHA_CONF and PERL5LIB are exported in koha-plack.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list