* [PATCH] php: Fix race condition during installation.
@ 2015-05-08 17:29 Jacob Stiffler
2015-05-08 17:39 ` Denys Dmytriyenko
2015-05-11 21:55 ` Denys Dmytriyenko
0 siblings, 2 replies; 5+ messages in thread
From: Jacob Stiffler @ 2015-05-08 17:29 UTC (permalink / raw)
To: meta-arago
* The race condition manifests with the following error:
Installing PHP CLI binary: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/bin/
Installing PHP CGI binary: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/bin/
Installing build environment: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/lib/build/
Installing helper programs: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/bin/
Installing PEAR environment: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/lib/php/
Installing PDO headers: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/include/php/ext/pdo/
cp: cannot create regular file `/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/bin/#INST@1289#': No such file or directory
make: *** [install-cgi] Error 1
make: *** Waiting for unfinished jobs....
* This issue was root caused to being a race condition when multiple
threads are used.
* The PHP CGI bibary installation does not install the $bindir, PHP
CLI binary intalls the $bindir, so there is a slight chance that PHP
CGI will attempt to install its binaries before the $bindir is
created.
* This patches the makefile so that installing the PHP CGI binaries
will also install the $bindir.
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
---
.../php/fix-race-condition-during-install.patch | 10 ++++++++++
.../recipes-devtools/php/php_5.4.14.bbappend | 4 +++-
2 files changed, 13 insertions(+), 1 deletion(-)
create mode 100644 meta-arago-distro/recipes-devtools/php/php/fix-race-condition-during-install.patch
diff --git a/meta-arago-distro/recipes-devtools/php/php/fix-race-condition-during-install.patch b/meta-arago-distro/recipes-devtools/php/php/fix-race-condition-during-install.patch
new file mode 100644
index 0000000..f4f3fb6
--- /dev/null
+++ b/meta-arago-distro/recipes-devtools/php/php/fix-race-condition-during-install.patch
@@ -0,0 +1,10 @@
+diff -rupN php-5.4.14/sapi/cgi/Makefile.frag php-5.4.14.0/sapi/cgi/Makefile.frag
+--- php-5.4.14/sapi/cgi/Makefile.frag 2013-04-10 03:47:04.000000000 -0400
++++ php-5.4.14.0/sapi/cgi/Makefile.frag 2015-05-08 11:41:10.389484079 -0400
+@@ -5,5 +5,6 @@ $(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(P
+
+ install-cgi: $(SAPI_CGI_PATH)
+ @echo "Installing PHP CGI binary: $(INSTALL_ROOT)$(bindir)/"
++ @$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
+ @$(INSTALL) -m 0755 $(SAPI_CGI_PATH) $(INSTALL_ROOT)$(bindir)/$(program_prefix)php-cgi$(program_suffix)$(EXEEXT)
+
diff --git a/meta-arago-distro/recipes-devtools/php/php_5.4.14.bbappend b/meta-arago-distro/recipes-devtools/php/php_5.4.14.bbappend
index ebf480c..f463233 100644
--- a/meta-arago-distro/recipes-devtools/php/php_5.4.14.bbappend
+++ b/meta-arago-distro/recipes-devtools/php/php_5.4.14.bbappend
@@ -1,7 +1,9 @@
# look for files in this layer first
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-PR_append = "-arago2"
+PR_append = "-arago3"
+
+SRC_URI_append = " files://fix-race-condition-during-install.patch"
SRC_URI_append_virtclass-native = " file://0001-php-native-Fix-host-contamination-issue.patch"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] php: Fix race condition during installation.
2015-05-08 17:29 [PATCH] php: Fix race condition during installation Jacob Stiffler
@ 2015-05-08 17:39 ` Denys Dmytriyenko
2015-05-11 10:47 ` Jacob Stiffler
2015-05-11 21:55 ` Denys Dmytriyenko
1 sibling, 1 reply; 5+ messages in thread
From: Denys Dmytriyenko @ 2015-05-08 17:39 UTC (permalink / raw)
To: Jacob Stiffler; +Cc: meta-arago
Is it from upstream or your own fix? If latter, do you plan on submitting it
upstream?
On Fri, May 08, 2015 at 01:29:26PM -0400, Jacob Stiffler wrote:
> * The race condition manifests with the following error:
>
> Installing PHP CLI binary: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/bin/
> Installing PHP CGI binary: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/bin/
> Installing build environment: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/lib/build/
> Installing helper programs: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/bin/
> Installing PEAR environment: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/lib/php/
> Installing PDO headers: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/include/php/ext/pdo/
> cp: cannot create regular file `/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/bin/#INST@1289#': No such file or directory
> make: *** [install-cgi] Error 1
> make: *** Waiting for unfinished jobs....
>
> * This issue was root caused to being a race condition when multiple
> threads are used.
> * The PHP CGI bibary installation does not install the $bindir, PHP
> CLI binary intalls the $bindir, so there is a slight chance that PHP
> CGI will attempt to install its binaries before the $bindir is
> created.
> * This patches the makefile so that installing the PHP CGI binaries
> will also install the $bindir.
>
> Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
> ---
> .../php/fix-race-condition-during-install.patch | 10 ++++++++++
> .../recipes-devtools/php/php_5.4.14.bbappend | 4 +++-
> 2 files changed, 13 insertions(+), 1 deletion(-)
> create mode 100644 meta-arago-distro/recipes-devtools/php/php/fix-race-condition-during-install.patch
>
> diff --git a/meta-arago-distro/recipes-devtools/php/php/fix-race-condition-during-install.patch b/meta-arago-distro/recipes-devtools/php/php/fix-race-condition-during-install.patch
> new file mode 100644
> index 0000000..f4f3fb6
> --- /dev/null
> +++ b/meta-arago-distro/recipes-devtools/php/php/fix-race-condition-during-install.patch
> @@ -0,0 +1,10 @@
> +diff -rupN php-5.4.14/sapi/cgi/Makefile.frag php-5.4.14.0/sapi/cgi/Makefile.frag
> +--- php-5.4.14/sapi/cgi/Makefile.frag 2013-04-10 03:47:04.000000000 -0400
> ++++ php-5.4.14.0/sapi/cgi/Makefile.frag 2015-05-08 11:41:10.389484079 -0400
> +@@ -5,5 +5,6 @@ $(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(P
> +
> + install-cgi: $(SAPI_CGI_PATH)
> + @echo "Installing PHP CGI binary: $(INSTALL_ROOT)$(bindir)/"
> ++ @$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
> + @$(INSTALL) -m 0755 $(SAPI_CGI_PATH) $(INSTALL_ROOT)$(bindir)/$(program_prefix)php-cgi$(program_suffix)$(EXEEXT)
> +
> diff --git a/meta-arago-distro/recipes-devtools/php/php_5.4.14.bbappend b/meta-arago-distro/recipes-devtools/php/php_5.4.14.bbappend
> index ebf480c..f463233 100644
> --- a/meta-arago-distro/recipes-devtools/php/php_5.4.14.bbappend
> +++ b/meta-arago-distro/recipes-devtools/php/php_5.4.14.bbappend
> @@ -1,7 +1,9 @@
> # look for files in this layer first
> FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
>
> -PR_append = "-arago2"
> +PR_append = "-arago3"
> +
> +SRC_URI_append = " files://fix-race-condition-during-install.patch"
>
> SRC_URI_append_virtclass-native = " file://0001-php-native-Fix-host-contamination-issue.patch"
>
> --
> 1.7.9.5
>
> _______________________________________________
> meta-arago mailing list
> meta-arago@arago-project.org
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] php: Fix race condition during installation.
2015-05-08 17:39 ` Denys Dmytriyenko
@ 2015-05-11 10:47 ` Jacob Stiffler
2015-05-11 16:35 ` Denys Dmytriyenko
0 siblings, 1 reply; 5+ messages in thread
From: Jacob Stiffler @ 2015-05-11 10:47 UTC (permalink / raw)
To: Denys Dmytriyenko; +Cc: meta-arago
This is my own fix.
There was a php bug to track this (https://bugs.php.net/bug.php?id=61345).
It appears that the there is no fix in meta-openembedded in the daisy or
daisy-next branches, but from dizzy onward, a later version of php is
used which has this fix.
On 5/8/2015 1:39 PM, Denys Dmytriyenko wrote:
> Is it from upstream or your own fix? If latter, do you plan on submitting it
> upstream?
>
>
> On Fri, May 08, 2015 at 01:29:26PM -0400, Jacob Stiffler wrote:
>> * The race condition manifests with the following error:
>>
>> Installing PHP CLI binary: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/bin/
>> Installing PHP CGI binary: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/bin/
>> Installing build environment: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/lib/build/
>> Installing helper programs: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/bin/
>> Installing PEAR environment: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/lib/php/
>> Installing PDO headers: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/include/php/ext/pdo/
>> cp: cannot create regular file `/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/bin/#INST@1289#': No such file or directory
>> make: *** [install-cgi] Error 1
>> make: *** Waiting for unfinished jobs....
>>
>> * This issue was root caused to being a race condition when multiple
>> threads are used.
>> * The PHP CGI bibary installation does not install the $bindir, PHP
>> CLI binary intalls the $bindir, so there is a slight chance that PHP
>> CGI will attempt to install its binaries before the $bindir is
>> created.
>> * This patches the makefile so that installing the PHP CGI binaries
>> will also install the $bindir.
>>
>> Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
>> ---
>> .../php/fix-race-condition-during-install.patch | 10 ++++++++++
>> .../recipes-devtools/php/php_5.4.14.bbappend | 4 +++-
>> 2 files changed, 13 insertions(+), 1 deletion(-)
>> create mode 100644 meta-arago-distro/recipes-devtools/php/php/fix-race-condition-during-install.patch
>>
>> diff --git a/meta-arago-distro/recipes-devtools/php/php/fix-race-condition-during-install.patch b/meta-arago-distro/recipes-devtools/php/php/fix-race-condition-during-install.patch
>> new file mode 100644
>> index 0000000..f4f3fb6
>> --- /dev/null
>> +++ b/meta-arago-distro/recipes-devtools/php/php/fix-race-condition-during-install.patch
>> @@ -0,0 +1,10 @@
>> +diff -rupN php-5.4.14/sapi/cgi/Makefile.frag php-5.4.14.0/sapi/cgi/Makefile.frag
>> +--- php-5.4.14/sapi/cgi/Makefile.frag 2013-04-10 03:47:04.000000000 -0400
>> ++++ php-5.4.14.0/sapi/cgi/Makefile.frag 2015-05-08 11:41:10.389484079 -0400
>> +@@ -5,5 +5,6 @@ $(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(P
>> +
>> + install-cgi: $(SAPI_CGI_PATH)
>> + @echo "Installing PHP CGI binary: $(INSTALL_ROOT)$(bindir)/"
>> ++ @$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
>> + @$(INSTALL) -m 0755 $(SAPI_CGI_PATH) $(INSTALL_ROOT)$(bindir)/$(program_prefix)php-cgi$(program_suffix)$(EXEEXT)
>> +
>> diff --git a/meta-arago-distro/recipes-devtools/php/php_5.4.14.bbappend b/meta-arago-distro/recipes-devtools/php/php_5.4.14.bbappend
>> index ebf480c..f463233 100644
>> --- a/meta-arago-distro/recipes-devtools/php/php_5.4.14.bbappend
>> +++ b/meta-arago-distro/recipes-devtools/php/php_5.4.14.bbappend
>> @@ -1,7 +1,9 @@
>> # look for files in this layer first
>> FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
>>
>> -PR_append = "-arago2"
>> +PR_append = "-arago3"
>> +
>> +SRC_URI_append = " files://fix-race-condition-during-install.patch"
>>
>> SRC_URI_append_virtclass-native = " file://0001-php-native-Fix-host-contamination-issue.patch"
>>
>> --
>> 1.7.9.5
>>
>> _______________________________________________
>> meta-arago mailing list
>> meta-arago@arago-project.org
>> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] php: Fix race condition during installation.
2015-05-11 10:47 ` Jacob Stiffler
@ 2015-05-11 16:35 ` Denys Dmytriyenko
0 siblings, 0 replies; 5+ messages in thread
From: Denys Dmytriyenko @ 2015-05-11 16:35 UTC (permalink / raw)
To: Jacob Stiffler; +Cc: meta-arago
Good, thanks.
On Mon, May 11, 2015 at 06:47:50AM -0400, Jacob Stiffler wrote:
> This is my own fix.
>
> There was a php bug to track this (https://bugs.php.net/bug.php?id=61345).
>
> It appears that the there is no fix in meta-openembedded in the
> daisy or daisy-next branches, but from dizzy onward, a later version
> of php is used which has this fix.
>
>
> On 5/8/2015 1:39 PM, Denys Dmytriyenko wrote:
> >Is it from upstream or your own fix? If latter, do you plan on submitting it
> >upstream?
> >
> >
> >On Fri, May 08, 2015 at 01:29:26PM -0400, Jacob Stiffler wrote:
> >>* The race condition manifests with the following error:
> >>
> >>Installing PHP CLI binary: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/bin/
> >>Installing PHP CGI binary: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/bin/
> >>Installing build environment: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/lib/build/
> >>Installing helper programs: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/bin/
> >>Installing PEAR environment: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/lib/php/
> >>Installing PDO headers: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/include/php/ext/pdo/
> >>cp: cannot create regular file `/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/bin/#INST@1289#': No such file or directory
> >>make: *** [install-cgi] Error 1
> >>make: *** Waiting for unfinished jobs....
> >>
> >>* This issue was root caused to being a race condition when multiple
> >> threads are used.
> >>* The PHP CGI bibary installation does not install the $bindir, PHP
> >> CLI binary intalls the $bindir, so there is a slight chance that PHP
> >> CGI will attempt to install its binaries before the $bindir is
> >> created.
> >>* This patches the makefile so that installing the PHP CGI binaries
> >> will also install the $bindir.
> >>
> >>Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
> >>---
> >> .../php/fix-race-condition-during-install.patch | 10 ++++++++++
> >> .../recipes-devtools/php/php_5.4.14.bbappend | 4 +++-
> >> 2 files changed, 13 insertions(+), 1 deletion(-)
> >> create mode 100644 meta-arago-distro/recipes-devtools/php/php/fix-race-condition-during-install.patch
> >>
> >>diff --git a/meta-arago-distro/recipes-devtools/php/php/fix-race-condition-during-install.patch b/meta-arago-distro/recipes-devtools/php/php/fix-race-condition-during-install.patch
> >>new file mode 100644
> >>index 0000000..f4f3fb6
> >>--- /dev/null
> >>+++ b/meta-arago-distro/recipes-devtools/php/php/fix-race-condition-during-install.patch
> >>@@ -0,0 +1,10 @@
> >>+diff -rupN php-5.4.14/sapi/cgi/Makefile.frag php-5.4.14.0/sapi/cgi/Makefile.frag
> >>+--- php-5.4.14/sapi/cgi/Makefile.frag 2013-04-10 03:47:04.000000000 -0400
> >>++++ php-5.4.14.0/sapi/cgi/Makefile.frag 2015-05-08 11:41:10.389484079 -0400
> >>+@@ -5,5 +5,6 @@ $(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(P
> >>+
> >>+ install-cgi: $(SAPI_CGI_PATH)
> >>+ @echo "Installing PHP CGI binary: $(INSTALL_ROOT)$(bindir)/"
> >>++ @$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
> >>+ @$(INSTALL) -m 0755 $(SAPI_CGI_PATH) $(INSTALL_ROOT)$(bindir)/$(program_prefix)php-cgi$(program_suffix)$(EXEEXT)
> >>+
> >>diff --git a/meta-arago-distro/recipes-devtools/php/php_5.4.14.bbappend b/meta-arago-distro/recipes-devtools/php/php_5.4.14.bbappend
> >>index ebf480c..f463233 100644
> >>--- a/meta-arago-distro/recipes-devtools/php/php_5.4.14.bbappend
> >>+++ b/meta-arago-distro/recipes-devtools/php/php_5.4.14.bbappend
> >>@@ -1,7 +1,9 @@
> >> # look for files in this layer first
> >> FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
> >>-PR_append = "-arago2"
> >>+PR_append = "-arago3"
> >>+
> >>+SRC_URI_append = " files://fix-race-condition-during-install.patch"
> >> SRC_URI_append_virtclass-native = " file://0001-php-native-Fix-host-contamination-issue.patch"
> >>--
> >>1.7.9.5
> >>
> >>_______________________________________________
> >>meta-arago mailing list
> >>meta-arago@arago-project.org
> >>http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] php: Fix race condition during installation.
2015-05-08 17:29 [PATCH] php: Fix race condition during installation Jacob Stiffler
2015-05-08 17:39 ` Denys Dmytriyenko
@ 2015-05-11 21:55 ` Denys Dmytriyenko
1 sibling, 0 replies; 5+ messages in thread
From: Denys Dmytriyenko @ 2015-05-11 21:55 UTC (permalink / raw)
To: Jacob Stiffler; +Cc: meta-arago
On Fri, May 08, 2015 at 01:29:26PM -0400, Jacob Stiffler wrote:
> * The race condition manifests with the following error:
>
> Installing PHP CLI binary: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/bin/
> Installing PHP CGI binary: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/bin/
> Installing build environment: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/lib/build/
> Installing helper programs: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/bin/
> Installing PEAR environment: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/lib/php/
> Installing PDO headers: /home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/include/php/ext/pdo/
> cp: cannot create regular file `/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/x86_64-linux/php-native/5.4.14-r5.0-arago2/image/home/gtbldadm/ti/oe-layersetup/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/bin/#INST@1289#': No such file or directory
> make: *** [install-cgi] Error 1
> make: *** Waiting for unfinished jobs....
>
> * This issue was root caused to being a race condition when multiple
> threads are used.
> * The PHP CGI bibary installation does not install the $bindir, PHP
> CLI binary intalls the $bindir, so there is a slight chance that PHP
> CGI will attempt to install its binaries before the $bindir is
> created.
> * This patches the makefile so that installing the PHP CGI binaries
> will also install the $bindir.
>
> Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
> ---
> .../php/fix-race-condition-during-install.patch | 10 ++++++++++
> .../recipes-devtools/php/php_5.4.14.bbappend | 4 +++-
> 2 files changed, 13 insertions(+), 1 deletion(-)
> create mode 100644 meta-arago-distro/recipes-devtools/php/php/fix-race-condition-during-install.patch
>
> diff --git a/meta-arago-distro/recipes-devtools/php/php/fix-race-condition-during-install.patch b/meta-arago-distro/recipes-devtools/php/php/fix-race-condition-during-install.patch
> new file mode 100644
> index 0000000..f4f3fb6
> --- /dev/null
> +++ b/meta-arago-distro/recipes-devtools/php/php/fix-race-condition-during-install.patch
> @@ -0,0 +1,10 @@
> +diff -rupN php-5.4.14/sapi/cgi/Makefile.frag php-5.4.14.0/sapi/cgi/Makefile.frag
> +--- php-5.4.14/sapi/cgi/Makefile.frag 2013-04-10 03:47:04.000000000 -0400
> ++++ php-5.4.14.0/sapi/cgi/Makefile.frag 2015-05-08 11:41:10.389484079 -0400
> +@@ -5,5 +5,6 @@ $(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(P
> +
> + install-cgi: $(SAPI_CGI_PATH)
> + @echo "Installing PHP CGI binary: $(INSTALL_ROOT)$(bindir)/"
> ++ @$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
> + @$(INSTALL) -m 0755 $(SAPI_CGI_PATH) $(INSTALL_ROOT)$(bindir)/$(program_prefix)php-cgi$(program_suffix)$(EXEEXT)
> +
> diff --git a/meta-arago-distro/recipes-devtools/php/php_5.4.14.bbappend b/meta-arago-distro/recipes-devtools/php/php_5.4.14.bbappend
> index ebf480c..f463233 100644
> --- a/meta-arago-distro/recipes-devtools/php/php_5.4.14.bbappend
> +++ b/meta-arago-distro/recipes-devtools/php/php_5.4.14.bbappend
> @@ -1,7 +1,9 @@
> # look for files in this layer first
> FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
>
> -PR_append = "-arago2"
> +PR_append = "-arago3"
> +
> +SRC_URI_append = " files://fix-race-condition-during-install.patch"
Have you tested this patch? There's a typo above - file:// not files://
>
> SRC_URI_append_virtclass-native = " file://0001-php-native-Fix-host-contamination-issue.patch"
>
> --
> 1.7.9.5
>
> _______________________________________________
> meta-arago mailing list
> meta-arago@arago-project.org
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-05-11 21:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-08 17:29 [PATCH] php: Fix race condition during installation Jacob Stiffler
2015-05-08 17:39 ` Denys Dmytriyenko
2015-05-11 10:47 ` Jacob Stiffler
2015-05-11 16:35 ` Denys Dmytriyenko
2015-05-11 21:55 ` Denys Dmytriyenko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.