Patchwork pseudo-1.5.1: keep install command directory mode

login
register
mail settings
Submitter Kang Kai
Date March 31, 2014, 8:35 a.m.
Message ID <1396254930-11013-2-git-send-email-kai.kang@windriver.com>
Download mbox | patch
Permalink /patch/69675/
State New
Headers show

Comments

Kang Kai - March 31, 2014, 8:35 a.m.
From: "yanjun.zhu" <yanjun.zhu@windriver.com>

When install command sets the created directory mode, pseudo will change
the mode of the directory to 0700 incorrectly. Backport patch to fix it.

Drop PR as well.

Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 .../files/pseudo-1.5.1-install-directory-mode.patch    | 18 ++++++++++++++++++
 meta/recipes-devtools/pseudo/pseudo_1.5.1.bb           |  3 +--
 2 files changed, 19 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-devtools/pseudo/files/pseudo-1.5.1-install-directory-mode.patch
Martin Jansa - March 31, 2014, 10:24 a.m.
On Mon, Mar 31, 2014 at 04:35:30PM +0800, Kai Kang wrote:
> From: "yanjun.zhu" <yanjun.zhu@windriver.com>
> 
> When install command sets the created directory mode, pseudo will change
> the mode of the directory to 0700 incorrectly. Backport patch to fix it.
> 
> Drop PR as well.
> 
> Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
>  .../files/pseudo-1.5.1-install-directory-mode.patch    | 18 ++++++++++++++++++
>  meta/recipes-devtools/pseudo/pseudo_1.5.1.bb           |  3 +--
>  2 files changed, 19 insertions(+), 2 deletions(-)
>  create mode 100644 meta/recipes-devtools/pseudo/files/pseudo-1.5.1-install-directory-mode.patch
> 
> diff --git a/meta/recipes-devtools/pseudo/files/pseudo-1.5.1-install-directory-mode.patch b/meta/recipes-devtools/pseudo/files/pseudo-1.5.1-install-directory-mode.patch
> new file mode 100644
> index 0000000..e8eaf13
> --- /dev/null
> +++ b/meta/recipes-devtools/pseudo/files/pseudo-1.5.1-install-directory-mode.patch
> @@ -0,0 +1,18 @@
> +Upstream-Status: Backport
> +
> +when install command sets the created directory mode, pseudo will change
> +the mode of the directory to 0700 incorrectly.
> +
> +Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
> +Signed-off-by: Kai Kang <kai.kang@windriver.com>
> +
> +--- a/ports/unix/guts/mkdirat.c
> ++++ b/ports/unix/guts/mkdirat.c
> +@@ -25,6 +25,7 @@
> + 		stat_rc = base_fstatat(dirfd, path, &buf, AT_SYMLINK_NOFOLLOW);
> + #endif
> + 		if (stat_rc != -1) {
> ++			buf.st_mode = PSEUDO_DB_MODE(buf.st_mode, mode);
> + 			pseudo_client_op(OP_MKDIR, 0, -1, dirfd, path, &buf);
> + 		} else {
> + 			pseudo_debug(1, "mkdir of %s succeeded, but stat failed: %s\n",
> diff --git a/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb b/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb
> index bc92856..c265017 100644
> --- a/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb
> +++ b/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb
> @@ -1,11 +1,10 @@
>  require pseudo.inc
>  
> -PR = "r4"

You cannot drop PR when PV/PE is the same, version goes backward (you
should notice QA Error about that).

> -
>  SRC_URI = " \
>      http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2 \
>      file://0001-pseudo_has_unload-add-function.patch \
>      file://shutdownping.patch \
> +    file://pseudo-1.5.1-install-directory-mode.patch \
>  "
>  
>  SRC_URI[md5sum] = "5ec67c7bff5fe68c56de500859c19172"
> -- 
> 1.8.4
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Kang Kai - March 31, 2014, 2:37 p.m.
On 2014?03?31? 18:24, Martin Jansa wrote:
> On Mon, Mar 31, 2014 at 04:35:30PM +0800, Kai Kang wrote:
>> From: "yanjun.zhu" <yanjun.zhu@windriver.com>
>>
>> When install command sets the created directory mode, pseudo will change
>> the mode of the directory to 0700 incorrectly. Backport patch to fix it.
>>
>> Drop PR as well.
>>
>> Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
>> Signed-off-by: Kai Kang <kai.kang@windriver.com>
>> ---
>>   .../files/pseudo-1.5.1-install-directory-mode.patch    | 18 ++++++++++++++++++
>>   meta/recipes-devtools/pseudo/pseudo_1.5.1.bb           |  3 +--
>>   2 files changed, 19 insertions(+), 2 deletions(-)
>>   create mode 100644 meta/recipes-devtools/pseudo/files/pseudo-1.5.1-install-directory-mode.patch
>>
>> diff --git a/meta/recipes-devtools/pseudo/files/pseudo-1.5.1-install-directory-mode.patch b/meta/recipes-devtools/pseudo/files/pseudo-1.5.1-install-directory-mode.patch
>> new file mode 100644
>> index 0000000..e8eaf13
>> --- /dev/null
>> +++ b/meta/recipes-devtools/pseudo/files/pseudo-1.5.1-install-directory-mode.patch
>> @@ -0,0 +1,18 @@
>> +Upstream-Status: Backport
>> +
>> +when install command sets the created directory mode, pseudo will change
>> +the mode of the directory to 0700 incorrectly.
>> +
>> +Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
>> +Signed-off-by: Kai Kang <kai.kang@windriver.com>
>> +
>> +--- a/ports/unix/guts/mkdirat.c
>> ++++ b/ports/unix/guts/mkdirat.c
>> +@@ -25,6 +25,7 @@
>> + 		stat_rc = base_fstatat(dirfd, path, &buf, AT_SYMLINK_NOFOLLOW);
>> + #endif
>> + 		if (stat_rc != -1) {
>> ++			buf.st_mode = PSEUDO_DB_MODE(buf.st_mode, mode);
>> + 			pseudo_client_op(OP_MKDIR, 0, -1, dirfd, path, &buf);
>> + 		} else {
>> + 			pseudo_debug(1, "mkdir of %s succeeded, but stat failed: %s\n",
>> diff --git a/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb b/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb
>> index bc92856..c265017 100644
>> --- a/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb
>> +++ b/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb
>> @@ -1,11 +1,10 @@
>>   require pseudo.inc
>>   
>> -PR = "r4"
> You cannot drop PR when PV/PE is the same, version goes backward (you
> should notice QA Error about that).

Sorry, forget that. But I didn't meet the QA Error. When should it 
appear, parse recipes or do_package_qa?

I'll send V2.

Thanks,
Kai

>
>> -
>>   SRC_URI = " \
>>       http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2 \
>>       file://0001-pseudo_has_unload-add-function.patch \
>>       file://shutdownping.patch \
>> +    file://pseudo-1.5.1-install-directory-mode.patch \
>>   "
>>   
>>   SRC_URI[md5sum] = "5ec67c7bff5fe68c56de500859c19172"
>> -- 
>> 1.8.4
>>
>> -- 
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Martin Jansa - March 31, 2014, 3:11 p.m.
On Mon, Mar 31, 2014 at 10:37:36PM +0800, Kang Kai wrote:
> On 2014?03?31? 18:24, Martin Jansa wrote:
> > On Mon, Mar 31, 2014 at 04:35:30PM +0800, Kai Kang wrote:
> >> From: "yanjun.zhu" <yanjun.zhu@windriver.com>
> >>
> >> When install command sets the created directory mode, pseudo will change
> >> the mode of the directory to 0700 incorrectly. Backport patch to fix it.
> >>
> >> Drop PR as well.
> >>
> >> Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
> >> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> >> ---
> >>   .../files/pseudo-1.5.1-install-directory-mode.patch    | 18 ++++++++++++++++++
> >>   meta/recipes-devtools/pseudo/pseudo_1.5.1.bb           |  3 +--
> >>   2 files changed, 19 insertions(+), 2 deletions(-)
> >>   create mode 100644 meta/recipes-devtools/pseudo/files/pseudo-1.5.1-install-directory-mode.patch
> >>
> >> diff --git a/meta/recipes-devtools/pseudo/files/pseudo-1.5.1-install-directory-mode.patch b/meta/recipes-devtools/pseudo/files/pseudo-1.5.1-install-directory-mode.patch
> >> new file mode 100644
> >> index 0000000..e8eaf13
> >> --- /dev/null
> >> +++ b/meta/recipes-devtools/pseudo/files/pseudo-1.5.1-install-directory-mode.patch
> >> @@ -0,0 +1,18 @@
> >> +Upstream-Status: Backport
> >> +
> >> +when install command sets the created directory mode, pseudo will change
> >> +the mode of the directory to 0700 incorrectly.
> >> +
> >> +Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
> >> +Signed-off-by: Kai Kang <kai.kang@windriver.com>
> >> +
> >> +--- a/ports/unix/guts/mkdirat.c
> >> ++++ b/ports/unix/guts/mkdirat.c
> >> +@@ -25,6 +25,7 @@
> >> + 		stat_rc = base_fstatat(dirfd, path, &buf, AT_SYMLINK_NOFOLLOW);
> >> + #endif
> >> + 		if (stat_rc != -1) {
> >> ++			buf.st_mode = PSEUDO_DB_MODE(buf.st_mode, mode);
> >> + 			pseudo_client_op(OP_MKDIR, 0, -1, dirfd, path, &buf);
> >> + 		} else {
> >> + 			pseudo_debug(1, "mkdir of %s succeeded, but stat failed: %s\n",
> >> diff --git a/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb b/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb
> >> index bc92856..c265017 100644
> >> --- a/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb
> >> +++ b/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb
> >> @@ -1,11 +1,10 @@
> >>   require pseudo.inc
> >>   
> >> -PR = "r4"
> > You cannot drop PR when PV/PE is the same, version goes backward (you
> > should notice QA Error about that).
> 
> Sorry, forget that. But I didn't meet the QA Error. When should it 
> appear, parse recipes or do_package_qa?

do_package_qa (iirc it needs buildhistory enabled in order to detect it
between "clean" builds).

> I'll send V2.
> 
> Thanks,
> Kai
> 
> >
> >> -
> >>   SRC_URI = " \
> >>       http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2 \
> >>       file://0001-pseudo_has_unload-add-function.patch \
> >>       file://shutdownping.patch \
> >> +    file://pseudo-1.5.1-install-directory-mode.patch \
> >>   "
> >>   
> >>   SRC_URI[md5sum] = "5ec67c7bff5fe68c56de500859c19172"
> >> -- 
> >> 1.8.4
> >>
> >> -- 
> >> _______________________________________________
> >> Openembedded-core mailing list
> >> Openembedded-core@lists.openembedded.org
> >> http://lists.openembedded.org/mailman/listinfo/openembedded-core
> 
> 
> -- 
> Regards,
> Neil | Kai Kang
>

Patch

diff --git a/meta/recipes-devtools/pseudo/files/pseudo-1.5.1-install-directory-mode.patch b/meta/recipes-devtools/pseudo/files/pseudo-1.5.1-install-directory-mode.patch
new file mode 100644
index 0000000..e8eaf13
--- /dev/null
+++ b/meta/recipes-devtools/pseudo/files/pseudo-1.5.1-install-directory-mode.patch
@@ -0,0 +1,18 @@ 
+Upstream-Status: Backport
+
+when install command sets the created directory mode, pseudo will change
+the mode of the directory to 0700 incorrectly.
+
+Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+--- a/ports/unix/guts/mkdirat.c
++++ b/ports/unix/guts/mkdirat.c
+@@ -25,6 +25,7 @@
+ 		stat_rc = base_fstatat(dirfd, path, &buf, AT_SYMLINK_NOFOLLOW);
+ #endif
+ 		if (stat_rc != -1) {
++			buf.st_mode = PSEUDO_DB_MODE(buf.st_mode, mode);
+ 			pseudo_client_op(OP_MKDIR, 0, -1, dirfd, path, &buf);
+ 		} else {
+ 			pseudo_debug(1, "mkdir of %s succeeded, but stat failed: %s\n",
diff --git a/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb b/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb
index bc92856..c265017 100644
--- a/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb
+++ b/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb
@@ -1,11 +1,10 @@ 
 require pseudo.inc
 
-PR = "r4"
-
 SRC_URI = " \
     http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2 \
     file://0001-pseudo_has_unload-add-function.patch \
     file://shutdownping.patch \
+    file://pseudo-1.5.1-install-directory-mode.patch \
 "
 
 SRC_URI[md5sum] = "5ec67c7bff5fe68c56de500859c19172"