All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2] Fix error SRCDIR when using usrmerge DISTRO_FEATURES
@ 2023-04-27  8:22 qiutt
  2023-05-04 11:56 ` [OE-core] " Alexandre Belloni
  2023-05-10 16:26 ` Ross Burton
  0 siblings, 2 replies; 7+ messages in thread
From: qiutt @ 2023-04-27  8:22 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1882 bytes --]

From 3b1c081d4efffe83f3a63184450cc79bf16356dc Mon Sep 17 00:00:00 2001
From: Qiu Tingting <qiutt@fujitsu.com>
Date: Thu, 27 Apr 2023 15:24:35 +0800
Subject: [PATCH V2] Fix error SRCDIR when using usrmerge DISTRO_FEATURES

When build e2fsprogs ptest with usrmerge DISTRO_FEATURES,
in test_script and test_one scripts, value of SRCDIR has problem.
SRCDIR=/usr/usr/lib/e2fsprogs/ptest/test

ptest log
# ptest-runner e2fsprogs
START: ptest-runner
2022-12-17T11:08
BEGIN: /usr/lib/e2fsprogs/ptest
ls: cannot access '/usr/usr/lib/e2fsprogs/ptest/test/[a-zA-Z]_*': No such file or directory
./test_script: line 54: /usr/usr/lib/e2fsprogs/ptest/test/test_post: No such file or directory
DURATION: 0
END: /usr/lib/e2fsprogs/ptest
2022-12-17T11:08
STOP: ptest-runner
TOTAL: 1 FAIL: 0

Reason
In Makefile.in, SRCDIR is set by prefix and libdir.
@echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_one
@echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_script
prefix=/usr
libdir=/usr/lib (when usrmerge is set)

solution
After ptest compiling, check and modify SRCDIR in test_script and test_one.

Signed-off-by: Qiu Tingting <qiutt@fujitsu.com>
---
meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb | 3 +++
1 file changed, 3 insertions(+)

diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb
index 2620610903..a2eb4f8f8f 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb
@@ -122,6 +122,9 @@ RDEPENDS:${PN}-ptest += "e2fsprogs-badblocks e2fsprogs-dumpe2fs e2fsprogs-e2fsck

do_compile_ptest() {
oe_runmake -C ${B}/tests
+       sed -i 's,/usr/usr,/usr,g' \
+           ${B}/tests/test_one \
+           ${B}/tests/test_script
}

do_install_ptest() {
--
2.25.1

[-- Attachment #2: Type: text/html, Size: 2818 bytes --]

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [OE-core] [PATCH V2] Fix error SRCDIR when using usrmerge DISTRO_FEATURES
  2023-04-27  8:22 [PATCH V2] Fix error SRCDIR when using usrmerge DISTRO_FEATURES qiutt
@ 2023-05-04 11:56 ` Alexandre Belloni
  2023-05-05  2:34   ` qiutt
  2023-05-10 16:26 ` Ross Burton
  1 sibling, 1 reply; 7+ messages in thread
From: Alexandre Belloni @ 2023-05-04 11:56 UTC (permalink / raw)
  To: qiutt; +Cc: openembedded-core

Hello,

I applied it to be able to test, however, your mailer is mangling your
patches and they don't apply without heavily modifying them.

On 27/04/2023 01:22:58-0700, qiutt@fujitsu.com wrote:
> From 3b1c081d4efffe83f3a63184450cc79bf16356dc Mon Sep 17 00:00:00 2001
> From: Qiu Tingting <qiutt@fujitsu.com>
> Date: Thu, 27 Apr 2023 15:24:35 +0800
> Subject: [PATCH V2] Fix error SRCDIR when using usrmerge DISTRO_FEATURES
> 
> When build e2fsprogs ptest with usrmerge DISTRO_FEATURES,
> in test_script and test_one scripts, value of SRCDIR has problem.
> SRCDIR=/usr/usr/lib/e2fsprogs/ptest/test
> 
> ptest log
> # ptest-runner e2fsprogs
> START: ptest-runner
> 2022-12-17T11:08
> BEGIN: /usr/lib/e2fsprogs/ptest
> ls: cannot access '/usr/usr/lib/e2fsprogs/ptest/test/[a-zA-Z]_*': No such file or directory
> ./test_script: line 54: /usr/usr/lib/e2fsprogs/ptest/test/test_post: No such file or directory
> DURATION: 0
> END: /usr/lib/e2fsprogs/ptest
> 2022-12-17T11:08
> STOP: ptest-runner
> TOTAL: 1 FAIL: 0
> 
> Reason
> In Makefile.in, SRCDIR is set by prefix and libdir.
> @echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_one
> @echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_script
> prefix=/usr
> libdir=/usr/lib (when usrmerge is set)
> 
> solution
> After ptest compiling, check and modify SRCDIR in test_script and test_one.
> 
> Signed-off-by: Qiu Tingting <qiutt@fujitsu.com>
> ---
> meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb | 3 +++
> 1 file changed, 3 insertions(+)
> 
> diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb
> index 2620610903..a2eb4f8f8f 100644
> --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb
> +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb
> @@ -122,6 +122,9 @@ RDEPENDS:${PN}-ptest += "e2fsprogs-badblocks e2fsprogs-dumpe2fs e2fsprogs-e2fsck
> 
> do_compile_ptest() {
> oe_runmake -C ${B}/tests

All the whitespaces are missing fro the beginning of those two lines

> +� � � �sed -i 's,/usr/usr,/usr,g' \
> +� � � � � �${B}/tests/test_one \
> +� � � � � �${B}/tests/test_script
> }
> 
> do_install_ptest() {
> --
> 2.25.1

> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#180486): https://lists.openembedded.org/g/openembedded-core/message/180486
> Mute This Topic: https://lists.openembedded.org/mt/98532823/3617179
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH V2] Fix error SRCDIR when using usrmerge DISTRO_FEATURES
  2023-05-04 11:56 ` [OE-core] " Alexandre Belloni
@ 2023-05-05  2:34   ` qiutt
  2023-05-05  3:47     ` [OE-core] " Khem Raj
  0 siblings, 1 reply; 7+ messages in thread
From: qiutt @ 2023-05-05  2:34 UTC (permalink / raw)
  To: openembedded-core


[-- Attachment #1.1: Type: text/plain, Size: 210 bytes --]

On Thu, May 4, 2023 at 07:56 PM, Alexandre Belloni wrote:

> 
> All the whitespaces are missing fro the beginning of those two lines

Could you use the attachments and try again?

Thanks,
Qiu Tingting

[-- Attachment #1.2: Type: text/html, Size: 2981 bytes --]

[-- Attachment #2: 0001-Fix-error-SRCDIR-when-using-usrmerge-DISTRO_FEATURES.patch --]
[-- Type: application/octet-stream, Size: 1846 bytes --]

From 3b1c081d4efffe83f3a63184450cc79bf16356dc Mon Sep 17 00:00:00 2001
From: Qiu Tingting <qiutt@fujitsu.com>
Date: Thu, 27 Apr 2023 15:24:35 +0800
Subject: [PATCH V2] Fix error SRCDIR when using usrmerge DISTRO_FEATURES

When build e2fsprogs ptest with usrmerge DISTRO_FEATURES,
in test_script and test_one scripts, value of SRCDIR has problem.
  SRCDIR=/usr/usr/lib/e2fsprogs/ptest/test

ptest log
  # ptest-runner e2fsprogs
  START: ptest-runner
  2022-12-17T11:08
  BEGIN: /usr/lib/e2fsprogs/ptest
  ls: cannot access '/usr/usr/lib/e2fsprogs/ptest/test/[a-zA-Z]_*': No such file or directory
  ./test_script: line 54: /usr/usr/lib/e2fsprogs/ptest/test/test_post: No such file or directory
  DURATION: 0
  END: /usr/lib/e2fsprogs/ptest
  2022-12-17T11:08
  STOP: ptest-runner
  TOTAL: 1 FAIL: 0

Reason
  In Makefile.in, SRCDIR is set by prefix and libdir.
    @echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_one
    @echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_script
  prefix=/usr
  libdir=/usr/lib (when usrmerge is set)

solution
  After ptest compiling, check and modify SRCDIR in test_script and test_one.

Signed-off-by: Qiu Tingting <qiutt@fujitsu.com>
---
 meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb
index 2620610903..a2eb4f8f8f 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb
@@ -122,6 +122,9 @@ RDEPENDS:${PN}-ptest += "e2fsprogs-badblocks e2fsprogs-dumpe2fs e2fsprogs-e2fsck
 
 do_compile_ptest() {
 	oe_runmake -C ${B}/tests
+	sed -i 's,/usr/usr,/usr,g' \
+	    ${B}/tests/test_one \
+	    ${B}/tests/test_script
 }
 
 do_install_ptest() {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [OE-core] [PATCH V2] Fix error SRCDIR when using usrmerge DISTRO_FEATURES
  2023-05-05  2:34   ` qiutt
@ 2023-05-05  3:47     ` Khem Raj
  0 siblings, 0 replies; 7+ messages in thread
From: Khem Raj @ 2023-05-05  3:47 UTC (permalink / raw)
  To: qiutt, Alexandre BELLONI; +Cc: openembedded-core

I have picked both of the patches and tried the one sent as
attachments and they work ok here. I have then resent them to mailing
list hopefully Alex can pick them up and try

On Thu, May 4, 2023 at 7:34 PM qiutt@fujitsu.com <qiutt@fujitsu.com> wrote:
>
> On Thu, May 4, 2023 at 07:56 PM, Alexandre Belloni wrote:
>
> All the whitespaces are missing fro the beginning of those two lines
>
> Could you use the attachments and try again?
>
> Thanks,
> Qiu Tingting
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#180892): https://lists.openembedded.org/g/openembedded-core/message/180892
> Mute This Topic: https://lists.openembedded.org/mt/98532823/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [OE-core] [PATCH V2] Fix error SRCDIR when using usrmerge DISTRO_FEATURES
  2023-04-27  8:22 [PATCH V2] Fix error SRCDIR when using usrmerge DISTRO_FEATURES qiutt
  2023-05-04 11:56 ` [OE-core] " Alexandre Belloni
@ 2023-05-10 16:26 ` Ross Burton
  2023-05-15  3:04   ` 回复: " Tingting Qiu (Fujitsu)
  2023-05-18  1:54   ` qiutt
  1 sibling, 2 replies; 7+ messages in thread
From: Ross Burton @ 2023-05-10 16:26 UTC (permalink / raw)
  To: qiutt; +Cc: openembedded-core

First, please use the commit message convention: the shortlog should start with "e2fsprogs:”.


>   In Makefile.in, SRCDIR is set by prefix and libdir.
>     @echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_one
>     @echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_script
>   prefix=/usr
>   libdir=/usr/lib (when usrmerge is set)
>   solution
>   After ptest compiling, check and modify SRCDIR in test_script and test_one.

The reason is correct, but the fix is wrong.

$libdir *always* includes $prefix.  This only works in non-usrmerge builds because for historical reasons we pass —libdir=$(base_libdir), which sets libdir=/lib.  This happens to work because /usr/lib is actually where the ptest files are installed, but that is pure coincidence.

Also, this broken part of the Makefile is a rule that *we patch in* (see ptest.patch), so simply fix that patch instead of working around it in with a sed.

Ross

^ permalink raw reply	[flat|nested] 7+ messages in thread

* 回复: [OE-core] [PATCH V2] Fix error SRCDIR when using usrmerge DISTRO_FEATURES
  2023-05-10 16:26 ` Ross Burton
@ 2023-05-15  3:04   ` Tingting Qiu (Fujitsu)
  2023-05-18  1:54   ` qiutt
  1 sibling, 0 replies; 7+ messages in thread
From: Tingting Qiu (Fujitsu) @ 2023-05-15  3:04 UTC (permalink / raw)
  To: Ross Burton; +Cc: openembedded-core

Hi, Ross

Please see "[PATCH V3] e2fsprogs: Fix error SRCDIR when using usrmerge DISTRO_FEATURES". 
First, "e2fsprogs:” is added into commit message.
Then, it is fixed with ptest.patch.

Best regards,
Qiu Tingting
________________________________________
发件人: Ross Burton <Ross.Burton@arm.com>
发送时间: 2023年5月11日 00:26
收件人: Qiu, Tingting/仇 婷婷
抄送: openembedded-core@lists.openembedded.org
主题: Re: [OE-core] [PATCH V2] Fix error SRCDIR when using usrmerge DISTRO_FEATURES

First, please use the commit message convention: the shortlog should start with "e2fsprogs:”.


>   In Makefile.in, SRCDIR is set by prefix and libdir.
>     @echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_one
>     @echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_script
>   prefix=/usr
>   libdir=/usr/lib (when usrmerge is set)
>   solution
>   After ptest compiling, check and modify SRCDIR in test_script and test_one.

The reason is correct, but the fix is wrong.

$libdir *always* includes $prefix.  This only works in non-usrmerge builds because for historical reasons we pass ―libdir=$(base_libdir), which sets libdir=/lib.  This happens to work because /usr/lib is actually where the ptest files are installed, but that is pure coincidence.

Also, this broken part of the Makefile is a rule that *we patch in* (see ptest.patch), so simply fix that patch instead of working around it in with a sed.

Ross

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH V2] Fix error SRCDIR when using usrmerge DISTRO_FEATURES
  2023-05-10 16:26 ` Ross Burton
  2023-05-15  3:04   ` 回复: " Tingting Qiu (Fujitsu)
@ 2023-05-18  1:54   ` qiutt
  1 sibling, 0 replies; 7+ messages in thread
From: qiutt @ 2023-05-18  1:54 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 432 bytes --]

Hi, Ross

> 
> First, please use the commit message convention: the shortlog should start
> with "e2fsprogs:”.
> 

> 
> Also, this broken part of the Makefile is a rule that *we patch in* (see
> ptest.patch), so simply fix that patch instead of working around it in
> with a sed.
> 

Please review "[PATCH V3] e2fsprogs: Fix error SRCDIR when using usrmerge DISTRO_FEATURES".
Thanks.

Best regards,
Qiu Tingting

[-- Attachment #2: Type: text/html, Size: 631 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-05-18  1:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-27  8:22 [PATCH V2] Fix error SRCDIR when using usrmerge DISTRO_FEATURES qiutt
2023-05-04 11:56 ` [OE-core] " Alexandre Belloni
2023-05-05  2:34   ` qiutt
2023-05-05  3:47     ` [OE-core] " Khem Raj
2023-05-10 16:26 ` Ross Burton
2023-05-15  3:04   ` 回复: " Tingting Qiu (Fujitsu)
2023-05-18  1:54   ` qiutt

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.