Patchwork udev: fix /var/volatile/tmp permissions

login
register
mail settings
Submitter Riku Voipio
Date Aug. 14, 2014, 9:03 a.m.
Message ID <1408007033-22777-1-git-send-email-riku.voipio@linaro.org>
Download mbox | patch
Permalink /patch/78177/
State Accepted
Commit bf6ad8202caaac6285ca0eb7089c0d92eca63527
Headers show

Comments

Riku Voipio - Aug. 14, 2014, 9:03 a.m.
Mariadb postinstall will fail with:

ERROR: 1  Can't create/write to file '/tmp/#sql_a2a_0.MAI' (Errcode: 13)
140814  8:14:06 [ERROR] Aborting

/tmp is a link to /var/volatile/tmp, set as:

drwxr-xr-x 3 root root 60 Aug 14 08:07 .

populate-volatiles.sh does not create the directory or set
permissions, because it already exists:

Checking for -/var/volatile/tmp-.
Creating directory -/var/volatile/tmp-.
Target already exists. Skipping.

Traced the creation to the initfile in udev. Create with -m 1755
to be sure. With this patch applied, mysql postinst succeeds and
creates the neccesary user tables.

Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
---
 meta/recipes-core/udev/udev/init | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Riku Voipio - Aug. 18, 2014, 7:46 a.m.
Hi,

Any updates on this one?

Riku

On 14 August 2014 12:03, Riku Voipio <riku.voipio@linaro.org> wrote:
> Mariadb postinstall will fail with:
>
> ERROR: 1  Can't create/write to file '/tmp/#sql_a2a_0.MAI' (Errcode: 13)
> 140814  8:14:06 [ERROR] Aborting
>
> /tmp is a link to /var/volatile/tmp, set as:
>
> drwxr-xr-x 3 root root 60 Aug 14 08:07 .
>
> populate-volatiles.sh does not create the directory or set
> permissions, because it already exists:
>
> Checking for -/var/volatile/tmp-.
> Creating directory -/var/volatile/tmp-.
> Target already exists. Skipping.
>
> Traced the creation to the initfile in udev. Create with -m 1755
> to be sure. With this patch applied, mysql postinst succeeds and
> creates the neccesary user tables.
>
> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
> ---
>  meta/recipes-core/udev/udev/init | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init
> index f2c84d5..a442c74 100644
> --- a/meta/recipes-core/udev/udev/init
> +++ b/meta/recipes-core/udev/udev/init
> @@ -57,7 +57,7 @@ case "$1" in
>      # the automount rule for udev needs /tmp directory available, as /tmp is a symlink
>      # to /var/tmp which in turn is a symlink to /var/volatile/tmp, we need to make sure
>      # /var/volatile/tmp directory to be available.
> -    mkdir -p /var/volatile/tmp
> +    mkdir -m 1777 -p /var/volatile/tmp
>
>      # Cache handling.
>      # A list of files which are used as a criteria to judge whether the udev cache could be reused.
> --
> 2.0.1
>
Fathi Boudra - Aug. 27, 2014, 6:46 a.m.
On 18 August 2014 10:46, Riku Voipio <riku.voipio@linaro.org> wrote:
> Hi,
>
> Any updates on this one?

<rant>it's in master-next since 4 days. ~10 days after you posted the
patch.</rant>

> Riku
>
> On 14 August 2014 12:03, Riku Voipio <riku.voipio@linaro.org> wrote:
>> Mariadb postinstall will fail with:
>>
>> ERROR: 1  Can't create/write to file '/tmp/#sql_a2a_0.MAI' (Errcode: 13)
>> 140814  8:14:06 [ERROR] Aborting
>>
>> /tmp is a link to /var/volatile/tmp, set as:
>>
>> drwxr-xr-x 3 root root 60 Aug 14 08:07 .
>>
>> populate-volatiles.sh does not create the directory or set
>> permissions, because it already exists:
>>
>> Checking for -/var/volatile/tmp-.
>> Creating directory -/var/volatile/tmp-.
>> Target already exists. Skipping.
>>
>> Traced the creation to the initfile in udev. Create with -m 1755
>> to be sure. With this patch applied, mysql postinst succeeds and
>> creates the neccesary user tables.
>>
>> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
>> ---
>>  meta/recipes-core/udev/udev/init | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init
>> index f2c84d5..a442c74 100644
>> --- a/meta/recipes-core/udev/udev/init
>> +++ b/meta/recipes-core/udev/udev/init
>> @@ -57,7 +57,7 @@ case "$1" in
>>      # the automount rule for udev needs /tmp directory available, as /tmp is a symlink
>>      # to /var/tmp which in turn is a symlink to /var/volatile/tmp, we need to make sure
>>      # /var/volatile/tmp directory to be available.
>> -    mkdir -p /var/volatile/tmp
>> +    mkdir -m 1777 -p /var/volatile/tmp
>>
>>      # Cache handling.
>>      # A list of files which are used as a criteria to judge whether the udev cache could be reused.
>> --
>> 2.0.1
>>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

Patch

diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init
index f2c84d5..a442c74 100644
--- a/meta/recipes-core/udev/udev/init
+++ b/meta/recipes-core/udev/udev/init
@@ -57,7 +57,7 @@  case "$1" in
     # the automount rule for udev needs /tmp directory available, as /tmp is a symlink
     # to /var/tmp which in turn is a symlink to /var/volatile/tmp, we need to make sure
     # /var/volatile/tmp directory to be available.
-    mkdir -p /var/volatile/tmp
+    mkdir -m 1777 -p /var/volatile/tmp
 
     # Cache handling.
     # A list of files which are used as a criteria to judge whether the udev cache could be reused.