Skip Menu |
 

This queue is for tickets about the FCGI CPAN distribution.

Report information
The Basics
Id: 97680
Status: resolved
Priority: 0/
Queue: FCGI

People
Owner: ether [...] cpan.org
Requestors: fraserbn [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.76

Attachments
0001-On-Android-set-TMPDIR-before-calling-configure.patch



Subject: [PATCH] On Android, set TMPDIR before calling configure
Download (untitled) / with headers
text/plain 135b
See the attached patch for an explanation -- I couldn't find Makefile.PL in the git repo, so this patch is against the latest tarball.
Subject: 0001-On-Android-set-TMPDIR-before-calling-configure.patch
From 184517c315a35e28796d5817d278d59e354475ef Mon Sep 17 00:00:00 2001 From: Brian Fraser <fraserbn@gmail.com> Date: Fri, 1 Aug 2014 21:48:30 +0200 Subject: [PATCH] On Android, set TMPDIR before calling configure The full explanation for this is here: http://stackoverflow.com/questions/15283220/android-shell-eof In short, Android's sh has a bug in that writing cat <<EOF ... EOF will try creating a temporary file in /sqlite_stmt_journals, which may or may not exist, and may or may not be writeable by the current user. So instead do the right thing and set TMPDIR to whatever the current File::Spec->tmpdir returns. --- Makefile.PL | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile.PL b/Makefile.PL index f35c97e..fdf7076 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -139,6 +139,11 @@ if ($sys eq "win32") { print "Please read configure.readme for information on how to run it yourself\n"; $ENV{'CC'} = $Config{'cc'}; + if ( $^O eq 'android' && !$ENV{'TMPDIR'} ) { + # See http://stackoverflow.com/a/15417261 + require File::Spec; + $ENV{'TMPDIR'} = File::Spec->tmpdir(); + } system("$Config{sh} configure"); } -- 1.7.12.4 (Apple Git-37)
Subject: Re: [rt.cpan.org #97680] [PATCH] On Android, set TMPDIR before calling configure
Date: Fri, 1 Aug 2014 13:30:37 -0700
To: Brian Fraser via RT <bug-FCGI [...] rt.cpan.org>
From: Karen Etheridge <ether [...] cpan.org>
Download (untitled) / with headers
text/plain 630b
On Fri, Aug 01, 2014 at 03:44:48PM -0400, Brian Fraser via RT wrote: Show quoted text
> The full explanation for this is here: > http://stackoverflow.com/questions/15283220/android-shell-eof > > In short, Android's sh has a bug in that writing > > cat <<EOF > ... > EOF > > will try creating a temporary file in /sqlite_stmt_journals, > which may or may not exist, and may or may not be writeable > by the current user. > So instead do the right thing and set TMPDIR to whatever the > current File::Spec->tmpdir returns.
Since this would affect everything using a here-doc, I wonder if this should not be done by ExtUtils::MakeMaker instead?
Subject: Re: [rt.cpan.org #97680] [PATCH] On Android, set TMPDIR before calling configure
Date: Mon, 4 Aug 2014 22:17:50 +0200
To: bug-FCGI [...] rt.cpan.org
From: Brian Fraser <fraserbn [...] gmail.com>
On Fri, Aug 1, 2014 at 10:30 PM, Karen Etheridge via RT <bug-FCGI@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=97680 > > > On Fri, Aug 01, 2014 at 03:44:48PM -0400, Brian Fraser via RT wrote:
>> The full explanation for this is here: >> http://stackoverflow.com/questions/15283220/android-shell-eof >> >> In short, Android's sh has a bug in that writing >> >> cat <<EOF >> ... >> EOF >> >> will try creating a temporary file in /sqlite_stmt_journals, >> which may or may not exist, and may or may not be writeable >> by the current user. >> So instead do the right thing and set TMPDIR to whatever the >> current File::Spec->tmpdir returns.
> > Since this would affect everything using a here-doc, I wonder if this > should not be done by ExtUtils::MakeMaker instead? >
Hm.. maybe, but out of ~900 different distributions I've installed on Android, this is the only module with this problem, so it's probably not worth adding it to MM. That being said, if it comes up a couple more times, I'll file a patch against MM.
Ok, released as 0.76!


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.