Re: [OE-core] [PATCH 2/2] gawk: Fix ptests on musl

2023-04-14 Thread Khem Raj
On Fri, Apr 14, 2023 at 12:35 AM Khem Raj  wrote:
>
> On Thu, Apr 13, 2023 at 9:06 AM Richard Purdie
>  wrote:
> >
> > On Thu, 2023-04-13 at 08:29 -0700, Khem Raj wrote:
> > > On Thu, Apr 13, 2023 at 6:44 AM Richard Purdie
> > >  wrote:
> > > >
> > > > On Thu, 2023-04-13 at 06:16 -0700, Khem Raj wrote:
> > > > > On Thu, Apr 13, 2023 at 3:14 AM Richard Purdie
> > > > >  wrote:
> > > > > >
> > > > > > On Wed, 2023-04-12 at 22:54 -0700, Khem Raj wrote:
> > > > > > > Signed-off-by: Khem Raj 
> > > > > > > ---
> > > > > > >  ...0001-Provide-fixes-for-tests-on-musl.patch | 73 
> > > > > > > +++
> > > > > > >  meta/recipes-extended/gawk/gawk_5.2.1.bb  |  7 +-
> > > > > > >  2 files changed, 77 insertions(+), 3 deletions(-)
> > > > > > >  create mode 100644 
> > > > > > > meta/recipes-extended/gawk/gawk/0001-Provide-fixes-for-tests-on-musl.patch
> > > > > > >
> > > > > > > diff --git 
> > > > > > > a/meta/recipes-extended/gawk/gawk/0001-Provide-fixes-for-tests-on-musl.patch
> > > > > > >  
> > > > > > > b/meta/recipes-extended/gawk/gawk/0001-Provide-fixes-for-tests-on-musl.patch
> > > > > > > new file mode 100644
> > > > > > > index 00..4ff2466c0e
> > > > > > > --- /dev/null
> > > > > > > +++ 
> > > > > > > b/meta/recipes-extended/gawk/gawk/0001-Provide-fixes-for-tests-on-musl.patch
> > > > > > > @@ -0,0 +1,73 @@
> > > > > > > +From 95bcf4397b6f727208f3c627b7d00dacec406d02 Mon Sep 17 
> > > > > > > 00:00:00 2001
> > > > > > > +From: Khem Raj 
> > > > > > > +Date: Wed, 12 Apr 2023 21:57:18 -0700
> > > > > > > +Subject: [PATCH] Provide fixes for tests on musl
> > > > > > > +
> > > > > > > +Fixes rebt8b1 and regx8bit
> > > > > > > +Disable clos1way6 [1]
> > > > > > > +
> > > > > > > +Disable commas and backsmalls1, they do not work
> > > > > > > +with musl-locales somehow even though we do isntall
> > > > > > > +en_US.UTF-8 on target
> > > > > > > +
> > > > > > > +[1] 
> > > > > > > https://lists.gnu.org/archive/html/bug-gawk/2021-02/msg5.html
> > > > > > > +
> > > > > > > +Upstream-Status: Inappropriate [musl-specific]
> > > > > > > +Signed-off-by: Khem Raj 
> > > > > > > +---
> > > > > > > + test/Maketests | 11 ---
> > > > > > > +
> > > > > >
> > > > > > Carrying a patch like this makes me a bit nervous as:
> > > > > >
> > > > > > a) it is only applied for musl so it makes recipe upgrade testing a
> > > > > > nightmare
> > > > > >
> > > > > > b) there doesn't appear to be any path to upstream it, we'd just 
> > > > > > have
> > > > > > to carry it indefinitely.
> > > > > >
> > > > > > c) the reasons for the failure don't seem to be understood.
> > > > >
> > > > > reasons are clear,  these tests need full locale support which we do
> > > > > not have with musl.
> > > >
> > > > The above says something quite different to what the patch says:
> > > >
> > > > "they do not work with musl-locales somehow"
> > >
> > > yeah the metadata patch subject should be improved to say disable tests
> >
> > That would be clearer, yes.
> >
> > > >
> > > > which sounds like nobody has looked into it.
> > >
> > > yes, and my localedata knowledge is limited to root cause this further 
> > > sadly.
> >
> > Fair enough, we just need to be clear about that.
> >
> > > > > > Is there something we can do to avoid having to carry this
> > > > > > indefinitely?
> > >
> > > You can do sed operations from the recipe. I don't know how that will be 
> > > better
> > > than patch. btw. we are already carrying another patch to disable other 
> > > tests
> > > because I guess they fail on Autobuilder on stress but not always,
> > > because they worked
> > > fine on my ptest run.
> > >
> > > https://git.openembedded.org/openembedded-core/tree/meta/recipes-extended/gawk/gawk/remove-sensitive-tests.patch
> > >
> > > Do we have plans to address this with upstream as well ?
> >
> > The difference between that patch and the one proposed is that the one
> > above:
> >
> > a) is unconditional
> > b) is clear and simple, it just deletes the tests
> >
> > This means when the recipe is upgraded, the patch is obvious and
> > therefore straight forward to port.
> >
> > Ideas:
> >
> > Can we simplify the musl one to delete the tests in question?
> >
> > Could we get a patch upstream which allowed us to disable tests from
> > the commandline to improve both cases?
> >
> > I think we should be able to work something out but I just wanted to
> > make it clear the patch as it stands isn't clear enough and will cause
> > maintenance issues so we need to work out something better.
> >

I just sent a v3 patchset for this issue which IMO solves the problem and
creates less hassle to maintain as well. Let me know.

>
> if you run make check on musl/emux86-64 then we only get one failure clos1way6
> and others pass. Which matches alpine. However, I think the way ptest is 
> copying
> partially the test environment seems to be the cause. I tried to pass LANG=C 
> etc
> but it did not help. Secondly, there are some surgeries the 

[OE-core] [PATCH v3 3/3] gawk: Add skipped.txt to emit test to ignore

2023-04-14 Thread Khem Raj
This file can be processed by run-ptest during runtime and tests
mentioned in skipped.txt will not be run.

Signed-off-by: Khem Raj 
---
v3: New

 meta/recipes-extended/gawk/gawk/run-ptest | 5 +
 meta/recipes-extended/gawk/gawk_5.2.1.bb  | 6 ++
 2 files changed, 11 insertions(+)

diff --git a/meta/recipes-extended/gawk/gawk/run-ptest 
b/meta/recipes-extended/gawk/gawk/run-ptest
index 2675650600..f4ef3e7bd4 100644
--- a/meta/recipes-extended/gawk/gawk/run-ptest
+++ b/meta/recipes-extended/gawk/gawk/run-ptest
@@ -3,6 +3,11 @@
 cd test
 for i in `grep -E "^[a-z0-9_-]*:$" Maketests |awk -F: '{print $1}'`; do
   unset LANG
+  grep -q "^$i$" skipped.txt
+  if [ $? -eq 0 ]; then
+echo "SKIP: $i"
+continue
+  fi
   srcdir=`pwd` AWKPROG=gawk AWK=gawk CMP=cmp make -f Maketests $i >$i.tmp 2>&1
   if [ -e _$i ]; then
 cat _$i
diff --git a/meta/recipes-extended/gawk/gawk_5.2.1.bb 
b/meta/recipes-extended/gawk/gawk_5.2.1.bb
index c914326563..768c8eb364 100644
--- a/meta/recipes-extended/gawk/gawk_5.2.1.bb
+++ b/meta/recipes-extended/gawk/gawk_5.2.1.bb
@@ -59,6 +59,9 @@ do_install_ptest() {
# https://bugzilla.yoctoproject.org/show_bug.cgi?id=14371
rm -f ${D}${PTEST_PATH}/test/time.*
rm -f ${D}${PTEST_PATH}/test/timeout.*
+   for t in time timeout; do
+   echo $t >> ${D}${PTEST_PATH}/test/skipped.txt
+   done
 }
 
 do_install_ptest:append:libc-musl() {
@@ -71,6 +74,9 @@ do_install_ptest:append:libc-musl() {
# The below two need LANG=C inside the make rule for musl
rm -f ${D}${PTEST_PATH}/test/rebt8b1.*
rm -f ${D}${PTEST_PATH}/test/regx8bit.*
+   for t in clos1way6 backsmalls1 commas rebt8b1 regx8bit; do
+   echo $t >> ${D}${PTEST_PATH}/test/skipped.txt
+   done
 }
 
 RDEPENDS:${PN}-ptest += "make locale-base-en-us"
-- 
2.40.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180008): 
https://lists.openembedded.org/g/openembedded-core/message/180008
Mute This Topic: https://lists.openembedded.org/mt/98273973/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v3 2/3] gawk: Remove redundant patch

2023-04-14 Thread Khem Raj
This patch is doing the same things thats already being done in the
do_install_ptest where the problematic tests are being deleted from
final package. run-ptest script runs a find for available tests and runs
each test target found during run therefore its enough to remove
them from final install.

Signed-off-by: Khem Raj 
Cc: Ross Burton 
---
v2: New
v3: No change

 .../gawk/gawk/remove-sensitive-tests.patch| 43 ---
 meta/recipes-extended/gawk/gawk_5.2.1.bb  |  1 -
 2 files changed, 44 deletions(-)
 delete mode 100644 meta/recipes-extended/gawk/gawk/remove-sensitive-tests.patch

diff --git a/meta/recipes-extended/gawk/gawk/remove-sensitive-tests.patch 
b/meta/recipes-extended/gawk/gawk/remove-sensitive-tests.patch
deleted file mode 100644
index ffae55058b..00
--- a/meta/recipes-extended/gawk/gawk/remove-sensitive-tests.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 354d24baf7c51977d22ff61ad42e6a2cbd4dc8ac Mon Sep 17 00:00:00 2001
-From: Ross Burton 
-Date: Tue, 21 Dec 2021 17:09:12 +
-Subject: [PATCH] gawk: remove load-sensitive tests
-
-These tests require an unloaded host as otherwise timing sensitive tests can 
fail
-https://bugzilla.yoctoproject.org/show_bug.cgi?id=14371
-
-Upstream-Status: Inappropriate
-Signed-off-by: Ross Burton 
-

- test/Maketests | 10 --
- 1 file changed, 10 deletions(-)
-
-diff --git a/test/Maketests b/test/Maketests
-index 3a667af..f117697 100644
 a/test/Maketests
-+++ b/test/Maketests
-@@ -2137,11 +2137,6 @@ symtab12:
-   @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
-   @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
- 
--timeout:
--  @echo $@ $(ZOS_FAIL)
--  @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
--  @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
--
- typedregex1:
-   @echo $@
-   @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
-@@ -2371,11 +2366,6 @@ rwarray:
-   @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  < "$(srcdir)"/$@.in >_$@ 2>&1 
|| echo EXIT CODE: $$? >>_$@
-   @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
- 
--time:
--  @echo $@
--  @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
--  @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
--
- mpfrbigint:
-   @echo $@
-   @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  -M >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
diff --git a/meta/recipes-extended/gawk/gawk_5.2.1.bb 
b/meta/recipes-extended/gawk/gawk_5.2.1.bb
index bbb26231a1..c914326563 100644
--- a/meta/recipes-extended/gawk/gawk_5.2.1.bb
+++ b/meta/recipes-extended/gawk/gawk_5.2.1.bb
@@ -16,7 +16,6 @@ PACKAGECONFIG[readline] = 
"--with-readline,--without-readline,readline"
 PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr"
 
 SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
-   file://remove-sensitive-tests.patch \
file://run-ptest \
"
 
-- 
2.40.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180007): 
https://lists.openembedded.org/g/openembedded-core/message/180007
Mute This Topic: https://lists.openembedded.org/mt/98273972/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v3 1/3] gawk: Disable known ptest fails on musl

2023-04-14 Thread Khem Raj
Add needed locale rdeps on musl as well.

Signed-off-by: Khem Raj 
---
v2: Delete failing tests on musl
v3: No change

 meta/recipes-extended/gawk/gawk_5.2.1.bb | 17 +++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-extended/gawk/gawk_5.2.1.bb 
b/meta/recipes-extended/gawk/gawk_5.2.1.bb
index e381bad148..bbb26231a1 100644
--- a/meta/recipes-extended/gawk/gawk_5.2.1.bb
+++ b/meta/recipes-extended/gawk/gawk_5.2.1.bb
@@ -62,8 +62,21 @@ do_install_ptest() {
rm -f ${D}${PTEST_PATH}/test/timeout.*
 }
 
-RDEPENDS:${PN}-ptest += "make"
+do_install_ptest:append:libc-musl() {
+   # Reported  
https://lists.gnu.org/archive/html/bug-gawk/2021-02/msg5.html
+   rm -f ${D}${PTEST_PATH}/test/clos1way6.*
+   # Needs en_US.UTF-8 but then does not work with musl
+   rm -f ${D}${PTEST_PATH}/test/backsmalls1.*
+   # Needs en_US.UTF-8 but then does not work with musl
+   rm -f ${D}${PTEST_PATH}/test/commas.*
+   # The below two need LANG=C inside the make rule for musl
+   rm -f ${D}${PTEST_PATH}/test/rebt8b1.*
+   rm -f ${D}${PTEST_PATH}/test/regx8bit.*
+}
+
+RDEPENDS:${PN}-ptest += "make locale-base-en-us"
 
-RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-en-us 
locale-base-en-us.iso-8859-1"
+RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-en-us.iso-8859-1"
+RDEPENDS:${PN}-ptest:append:libc-musl = " musl-locales"
 
 BBCLASSEXTEND = "native nativesdk"
-- 
2.40.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180006): 
https://lists.openembedded.org/g/openembedded-core/message/180006
Mute This Topic: https://lists.openembedded.org/mt/98273971/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] kernel: improve initramfs bundle processing time

2023-04-14 Thread Bruce Ashfield
From: Bruce Ashfield 

This is a partial fix for bugzilla 15059 
[https://bugzilla.yoctoproject.org/show_bug.cgi?id=15059]

It has been noted by several people that when an initramfs is bundled:

  - a lot of the kernel is rebuilt
  - it takes a really long time

When looking at the logs, the second kernel compilation (that performs
the bundle) is not using the parallel make settings, and builds with
-j1.

We are already explicitly passing PARALLEL_MAKE when building kernel
modules, and by extending that explicit use to the main kernel
compilation, we ensure that we always get a parallel build.

Build times chnaged from more than 30 minutes for the bundle, to
3 minutes in local testing.

The question of whether or not too much is rebuilding during the
bundle step is still an open question, but with this tweak, at least
the build time is back in the realm of acceptable.

Signed-off-by: Bruce Ashfield 
---
 meta/classes-recipe/kernel.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes-recipe/kernel.bbclass 
b/meta/classes-recipe/kernel.bbclass
index aefa0d21bc..e634eabd49 100644
--- a/meta/classes-recipe/kernel.bbclass
+++ b/meta/classes-recipe/kernel.bbclass
@@ -382,7 +382,7 @@ kernel_do_compile() {

use_alternate_initrd=CONFIG_INITRAMFS_SOURCE=${B}/usr/${INITRAMFS_IMAGE_NAME}.cpio
fi
for typeformake in ${KERNEL_IMAGETYPE_FOR_MAKE} ; do
-   oe_runmake ${typeformake} ${KERNEL_EXTRA_ARGS} 
$use_alternate_initrd
+   oe_runmake ${PARALLEL_MAKE} ${typeformake} ${KERNEL_EXTRA_ARGS} 
$use_alternate_initrd
done
 }
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180005): 
https://lists.openembedded.org/g/openembedded-core/message/180005
Mute This Topic: https://lists.openembedded.org/mt/98269754/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v2 1/2] gawk: Disable known ptest fails on musl

2023-04-14 Thread Khem Raj
ignore this set, it does not work.

On Fri, Apr 14, 2023 at 8:55 AM Khem Raj  wrote:
>
> Add needed locale rdeps on musl as well.
>
> Signed-off-by: Khem Raj 
> ---
> v2: Delete failing tests on musl
>
>  meta/recipes-extended/gawk/gawk_5.2.1.bb | 17 +++--
>  1 file changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-extended/gawk/gawk_5.2.1.bb 
> b/meta/recipes-extended/gawk/gawk_5.2.1.bb
> index e381bad148..bbb26231a1 100644
> --- a/meta/recipes-extended/gawk/gawk_5.2.1.bb
> +++ b/meta/recipes-extended/gawk/gawk_5.2.1.bb
> @@ -62,8 +62,21 @@ do_install_ptest() {
> rm -f ${D}${PTEST_PATH}/test/timeout.*
>  }
>
> -RDEPENDS:${PN}-ptest += "make"
> +do_install_ptest:append:libc-musl() {
> +   # Reported  
> https://lists.gnu.org/archive/html/bug-gawk/2021-02/msg5.html
> +   rm -f ${D}${PTEST_PATH}/test/clos1way6.*
> +   # Needs en_US.UTF-8 but then does not work with musl
> +   rm -f ${D}${PTEST_PATH}/test/backsmalls1.*
> +   # Needs en_US.UTF-8 but then does not work with musl
> +   rm -f ${D}${PTEST_PATH}/test/commas.*
> +   # The below two need LANG=C inside the make rule for musl
> +   rm -f ${D}${PTEST_PATH}/test/rebt8b1.*
> +   rm -f ${D}${PTEST_PATH}/test/regx8bit.*
> +}
> +
> +RDEPENDS:${PN}-ptest += "make locale-base-en-us"
>
> -RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-en-us 
> locale-base-en-us.iso-8859-1"
> +RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-en-us.iso-8859-1"
> +RDEPENDS:${PN}-ptest:append:libc-musl = " musl-locales"
>
>  BBCLASSEXTEND = "native nativesdk"
> --
> 2.40.0
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180004): 
https://lists.openembedded.org/g/openembedded-core/message/180004
Mute This Topic: https://lists.openembedded.org/mt/98265108/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH V1] coreutils: Add gcc parameter for ptest

2023-04-14 Thread Khem Raj
On Fri, Apr 14, 2023 at 3:06 AM Richard Purdie
 wrote:
>
> On Fri, 2023-04-14 at 16:53 +0800, qi...@fujitsu.com wrote:
> > From: Qiu Tingting 
> >
> > If gcc is installed in image, ptest result has 4 ERROR.
> >   ERROR: tests/rm/r-root.sh
> >   ERROR: tests/rm/rm-readdir-fail.sh
> >   ERROR: tests/cp/nfs-removal-race.sh
> >   ERROR: tests/ls/getxattr-speedup.sh
> >
> > r-root.log as an example:
> >   --
> >   k.c:1:10: fatal error: stdio.h: No such file or directory
> >   1 | #include 
> > |  ^
> >   compilation terminated.
> >   r-root.sh: set-up failure: failed to build shared library
> >   ERROR tests/rm/r-root.sh (exit status: 99)
> >   --
> >
> > reason:
> >   In these cases, k.c file is created and compiled by gcc before run.
> >   There is a stdio.h file in /usr/include/ directory,
> >   but gcc parameter is not set it.
> >
> > solution:
> >   Add "-l /usr/include/" in gcc parameter.
> >
> > other:
> >   If gcc is not installed in image, these cases will be skipped.
> >
> > Signed-off-by: Qiu Tingting 
> > ---
> >  meta/recipes-core/coreutils/coreutils_9.1.bb | 1 +
> >  1 file changed, 1 insertion(+)
>
>
> I'm a bit puzzled by this. Wouldn't on target gcc have /usr/include as
> part of it's default search path? Why isn't the default search path
> working?

yeah. Perhaps looking at full compiler commandline used just for this
test would help maybe there is something like
-ffreestanding or something passed to it.

>
> Cheers,
>
> Richard
>
>
> >
> > diff --git a/meta/recipes-core/coreutils/coreutils_9.1.bb 
> > b/meta/recipes-core/coreutils/coreutils_9.1.bb
> > index 4807eefd04..fe785b673d 100644
> > --- a/meta/recipes-core/coreutils/coreutils_9.1.bb
> > +++ b/meta/recipes-core/coreutils/coreutils_9.1.bb
> > @@ -184,6 +184,7 @@ do_install_ptest () {
> >  install ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
> >  cp ${B}/Makefile ${D}${PTEST_PATH}/
> >  cp ${S}/init.cfg ${D}${PTEST_PATH}/
> > +sed -i 's/CC -Wall -shared/CC -Wall -shared -l \/usr\/include\//g' 
> > ${D}${PTEST_PATH}/init.cfg
> >  cp -r ${B}/src ${D}${PTEST_PATH}/
> >  cp -r ${S}/src/*.c ${D}${PTEST_PATH}/src
> >  sed -i '/^VPATH/s/= .*$/= ./g' ${D}${PTEST_PATH}/Makefile
> >
> >
>
>
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180003): 
https://lists.openembedded.org/g/openembedded-core/message/180003
Mute This Topic: https://lists.openembedded.org/mt/98258324/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v2 1/2] gawk: Disable known ptest fails on musl

2023-04-14 Thread Khem Raj
Add needed locale rdeps on musl as well.

Signed-off-by: Khem Raj 
---
v2: Delete failing tests on musl

 meta/recipes-extended/gawk/gawk_5.2.1.bb | 17 +++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-extended/gawk/gawk_5.2.1.bb 
b/meta/recipes-extended/gawk/gawk_5.2.1.bb
index e381bad148..bbb26231a1 100644
--- a/meta/recipes-extended/gawk/gawk_5.2.1.bb
+++ b/meta/recipes-extended/gawk/gawk_5.2.1.bb
@@ -62,8 +62,21 @@ do_install_ptest() {
rm -f ${D}${PTEST_PATH}/test/timeout.*
 }
 
-RDEPENDS:${PN}-ptest += "make"
+do_install_ptest:append:libc-musl() {
+   # Reported  
https://lists.gnu.org/archive/html/bug-gawk/2021-02/msg5.html
+   rm -f ${D}${PTEST_PATH}/test/clos1way6.*
+   # Needs en_US.UTF-8 but then does not work with musl
+   rm -f ${D}${PTEST_PATH}/test/backsmalls1.*
+   # Needs en_US.UTF-8 but then does not work with musl
+   rm -f ${D}${PTEST_PATH}/test/commas.*
+   # The below two need LANG=C inside the make rule for musl
+   rm -f ${D}${PTEST_PATH}/test/rebt8b1.*
+   rm -f ${D}${PTEST_PATH}/test/regx8bit.*
+}
+
+RDEPENDS:${PN}-ptest += "make locale-base-en-us"
 
-RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-en-us 
locale-base-en-us.iso-8859-1"
+RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-en-us.iso-8859-1"
+RDEPENDS:${PN}-ptest:append:libc-musl = " musl-locales"
 
 BBCLASSEXTEND = "native nativesdk"
-- 
2.40.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180001): 
https://lists.openembedded.org/g/openembedded-core/message/180001
Mute This Topic: https://lists.openembedded.org/mt/98265108/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v2 2/2] gawk: Remove redundant patch

2023-04-14 Thread Khem Raj
This patch is doing the same things thats already being done in the
do_install_ptest where the problematic tests are being deleted from
final package. run-ptest script runs a find for available tests and runs
each test target found during run therefore its enough to remove
them from final install.

Signed-off-by: Khem Raj 
Cc: Ross Burton 
---
 .../gawk/gawk/remove-sensitive-tests.patch| 43 ---
 meta/recipes-extended/gawk/gawk_5.2.1.bb  |  1 -
 2 files changed, 44 deletions(-)
 delete mode 100644 meta/recipes-extended/gawk/gawk/remove-sensitive-tests.patch

diff --git a/meta/recipes-extended/gawk/gawk/remove-sensitive-tests.patch 
b/meta/recipes-extended/gawk/gawk/remove-sensitive-tests.patch
deleted file mode 100644
index ffae55058b..00
--- a/meta/recipes-extended/gawk/gawk/remove-sensitive-tests.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 354d24baf7c51977d22ff61ad42e6a2cbd4dc8ac Mon Sep 17 00:00:00 2001
-From: Ross Burton 
-Date: Tue, 21 Dec 2021 17:09:12 +
-Subject: [PATCH] gawk: remove load-sensitive tests
-
-These tests require an unloaded host as otherwise timing sensitive tests can 
fail
-https://bugzilla.yoctoproject.org/show_bug.cgi?id=14371
-
-Upstream-Status: Inappropriate
-Signed-off-by: Ross Burton 
-

- test/Maketests | 10 --
- 1 file changed, 10 deletions(-)
-
-diff --git a/test/Maketests b/test/Maketests
-index 3a667af..f117697 100644
 a/test/Maketests
-+++ b/test/Maketests
-@@ -2137,11 +2137,6 @@ symtab12:
-   @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
-   @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
- 
--timeout:
--  @echo $@ $(ZOS_FAIL)
--  @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
--  @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
--
- typedregex1:
-   @echo $@
-   @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
-@@ -2371,11 +2366,6 @@ rwarray:
-   @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  < "$(srcdir)"/$@.in >_$@ 2>&1 
|| echo EXIT CODE: $$? >>_$@
-   @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
- 
--time:
--  @echo $@
--  @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
--  @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
--
- mpfrbigint:
-   @echo $@
-   @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  -M >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
diff --git a/meta/recipes-extended/gawk/gawk_5.2.1.bb 
b/meta/recipes-extended/gawk/gawk_5.2.1.bb
index bbb26231a1..c914326563 100644
--- a/meta/recipes-extended/gawk/gawk_5.2.1.bb
+++ b/meta/recipes-extended/gawk/gawk_5.2.1.bb
@@ -16,7 +16,6 @@ PACKAGECONFIG[readline] = 
"--with-readline,--without-readline,readline"
 PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr"
 
 SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
-   file://remove-sensitive-tests.patch \
file://run-ptest \
"
 
-- 
2.40.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180002): 
https://lists.openembedded.org/g/openembedded-core/message/180002
Mute This Topic: https://lists.openembedded.org/mt/98265109/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][kirkstone][PATCH] package.bbclass: correct check for /build in copydebugsources()

2023-04-14 Thread Peter Marko via lists.openembedded.org
Newly introduced kirkstone-only commit
https://git.openembedded.org/openembedded-core/commit/?h=kirkstone=80839835ec9fcb63069289225a3c1af257ffdef7
broke builds with externalsrc in Gitlab-CI.
This is yocto-4.0.9 regression.

It checks if directory starts with "build" instead of
if checking if it equals to "build".
Gitlab-CI uses directory "/builds" which matches the check
but directory /build does not exist, only /builds.
After successful check it tries to move this non-existent
directory which does not exists and thus do_package fails.

Signed-off-by: Peter Marko 
---
 meta/classes/package.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 2950218145..67acc278d1 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -638,7 +638,7 @@ def copydebugsources(debugsrcdir, sources, d):
 if os.path.exists(dvar + debugsrcdir + sdir):
 # Special case for /build since we need to move into
 # /usr/src/debug/build so rename sdir to build.build
-if sdir.find("/build") == 0:
+if sdir == "/build" or sdir.find("/build/") == 0:
 cmd = "mv %s%s%s %s%s%s" % (dvar, debugsrcdir, "/build", 
dvar, debugsrcdir, "/build.build")
 subprocess.check_output(cmd, shell=True, 
stderr=subprocess.STDOUT)
 sdir = sdir.replace("/build", "/build.build", 1)
-- 
2.30.2


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18): 
https://lists.openembedded.org/g/openembedded-core/message/18
Mute This Topic: https://lists.openembedded.org/mt/98264611/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] oeqa/utils/metadata.py: Fix running oe-selftest running with no distro set

2023-04-14 Thread Thomas Roos via lists.openembedded.org
From: Thomas Roos 

This will use default values when no distribution is set.

[YOCTO #15086]

Signed-off-by: Thomas Roos 
---
 meta/lib/oeqa/utils/metadata.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/lib/oeqa/utils/metadata.py b/meta/lib/oeqa/utils/metadata.py
index 8013aa684d..15ec190c4a 100644
--- a/meta/lib/oeqa/utils/metadata.py
+++ b/meta/lib/oeqa/utils/metadata.py
@@ -27,9 +27,9 @@ def metadata_from_bb():
 data_dict = get_bb_vars()
 
 # Distro information
-info_dict['distro'] = {'id': data_dict['DISTRO'],
-   'version_id': data_dict['DISTRO_VERSION'],
-   'pretty_name': '%s %s' % (data_dict['DISTRO'], 
data_dict['DISTRO_VERSION'])}
+info_dict['distro'] = {'id': data_dict.get('DISTRO', 'NODISTRO'),
+'version_id': data_dict.get('DISTRO_VERSION', 
'NO_DISTRO_VERSION'),
+'pretty_name': '%s %s' % 
(data_dict.get('DISTRO', 'NODISTRO'), data_dict.get('DISTRO_VERSION', 
'NO_DISTRO_VERSION'))}
 
 # Host distro information
 os_release = get_os_release()
-- 
2.34.1




Amazon Web Services EMEA SARL
38 avenue John F. Kennedy, L-1855 Luxembourg
Sitz der Gesellschaft: L-1855 Luxemburg
eingetragen im Luxemburgischen Handelsregister unter R.C.S. B186284

Amazon Web Services EMEA SARL, Niederlassung Deutschland
Marcel-Breuer-Str. 12, D-80807 Muenchen
Sitz der Zweigniederlassung: Muenchen
eingetragen im Handelsregister des Amtsgerichts Muenchen unter HRB 242240, 
USt-ID DE317013094





-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#17): 
https://lists.openembedded.org/g/openembedded-core/message/17
Mute This Topic: https://lists.openembedded.org/mt/98263303/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] oeqa/selftest: Use SSTATE_DIR of parent build dir

2023-04-14 Thread Thomas Roos via lists.openembedded.org
From: Thomas Roos 

This will configure the build-st/conf/local.conf with the SSTATE_DIR
of the parent build dir to speed up the build, test, dev process.

Signed-off-by: Thomas Roos 
---
 meta/lib/oeqa/selftest/context.py | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/meta/lib/oeqa/selftest/context.py 
b/meta/lib/oeqa/selftest/context.py
index 0a7a9da72a..f2a5ba792f 100644
--- a/meta/lib/oeqa/selftest/context.py
+++ b/meta/lib/oeqa/selftest/context.py
@@ -16,6 +16,7 @@ from random import choice
 import oeqa
 import oe
 import bb.utils
+import bb.tinfoil
 
 from oeqa.core.context import OETestContext, OETestContextExecutor
 from oeqa.core.exception import OEQAPreRun, OEQATestNotFound
@@ -79,6 +80,12 @@ class OESelftestTestContext(OETestContext):
 self.removebuilddir = removebuilddir
 
 def setup_builddir(self, suffix, selftestdir, suite):
+# Get SSTATE_DIR from the parent build dir
+with bb.tinfoil.Tinfoil(tracking=True) as tinfoil:
+tinfoil.prepare(quiet=2, config_only=True)
+d = tinfoil.config_data
+sstatedir = str(d.getVar('SSTATE_DIR'))
+
 builddir = os.environ['BUILDDIR']
 if not selftestdir:
 selftestdir = get_test_layer()
@@ -118,6 +125,9 @@ class OESelftestTestContext(OETestContext):
 if os.environ[e].endswith(builddir):
 os.environ[e] = os.environ[e].replace(builddir, newbuilddir)
 
+# Set SSTATE_DIR to match the parent SSTATE_DIR
+subprocess.check_output("echo 'SSTATE_DIR ?= \"%s\"' >> 
%s/conf/local.conf" % (sstatedir, newbuilddir), cwd=newbuilddir, shell=True)
+
 os.chdir(newbuilddir)
 
 def patch_test(t):
-- 
2.34.1




Amazon Web Services EMEA SARL
38 avenue John F. Kennedy, L-1855 Luxembourg
Sitz der Gesellschaft: L-1855 Luxemburg
eingetragen im Luxemburgischen Handelsregister unter R.C.S. B186284

Amazon Web Services EMEA SARL, Niederlassung Deutschland
Marcel-Breuer-Str. 12, D-80807 Muenchen
Sitz der Zweigniederlassung: Muenchen
eingetragen im Handelsregister des Amtsgerichts Muenchen unter HRB 242240, 
USt-ID DE317013094





-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#179998): 
https://lists.openembedded.org/g/openembedded-core/message/179998
Mute This Topic: https://lists.openembedded.org/mt/98263257/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [dunfell][PATCH] curl: CVE-2023-27534 SFTP path ~ resolving discrepancy

2023-04-14 Thread Hitendra Prajapati
Upstream-Status: Backport from 
https://github.com/curl/curl/commit/4e2b52b5f7a3bf50a0f1494155717b02cc1df6d6

Signed-off-by: Hitendra Prajapati 
---
 .../curl/curl/CVE-2023-27534.patch| 123 ++
 meta/recipes-support/curl/curl_7.69.1.bb  |   1 +
 2 files changed, 124 insertions(+)
 create mode 100644 meta/recipes-support/curl/curl/CVE-2023-27534.patch

diff --git a/meta/recipes-support/curl/curl/CVE-2023-27534.patch 
b/meta/recipes-support/curl/curl/CVE-2023-27534.patch
new file mode 100644
index 00..aeeffd5fea
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2023-27534.patch
@@ -0,0 +1,123 @@
+From 4e2b52b5f7a3bf50a0f1494155717b02cc1df6d6 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg 
+Date: Thu, 9 Mar 2023 16:22:11 +0100
+Subject: [PATCH] curl_path: create the new path with dynbuf
+
+CVE: CVE-2023-27534
+Upstream-Status: Backport 
[https://github.com/curl/curl/commit/4e2b52b5f7a3bf50a0f1494155717b02cc1df6d6]
+
+Signed-off-by: Hitendra Prajapati 
+---
+ lib/curl_path.c | 71 -
+ 1 file changed, 35 insertions(+), 36 deletions(-)
+
+diff --git a/lib/curl_path.c b/lib/curl_path.c
+index f429634..e17db4b 100644
+--- a/lib/curl_path.c
 b/lib/curl_path.c
+@@ -30,6 +30,8 @@
+ #include "escape.h"
+ #include "memdebug.h"
+ 
++#define MAX_SSHPATH_LEN 10 /* arbitrary */
++
+ /* figure out the path to work with in this particular request */
+ CURLcode Curl_getworkingpath(struct connectdata *conn,
+  char *homedir,  /* when SFTP is used */
+@@ -37,60 +39,57 @@ CURLcode Curl_getworkingpath(struct connectdata *conn,
+  real path to work with */
+ {
+   struct Curl_easy *data = conn->data;
+-  char *real_path = NULL;
+   char *working_path;
+   size_t working_path_len;
++  struct dynbuf npath;
+   CURLcode result =
+ Curl_urldecode(data, data->state.up.path, 0, _path,
+_path_len, FALSE);
+   if(result)
+ return result;
+ 
++  /* new path to switch to in case we need to */
++  Curl_dyn_init(, MAX_SSHPATH_LEN);
++
+   /* Check for /~/, indicating relative to the user's home directory */
+-  if(conn->handler->protocol & CURLPROTO_SCP) {
+-real_path = malloc(working_path_len + 1);
+-if(real_path == NULL) {
++  if((data->conn->handler->protocol & CURLPROTO_SCP) &&
++ (working_path_len > 3) && (!memcmp(working_path, "/~/", 3))) {
++/* It is referenced to the home directory, so strip the leading '/~/' */
++if(Curl_dyn_addn(, _path[3], working_path_len - 3)) {
+   free(working_path);
+   return CURLE_OUT_OF_MEMORY;
+ }
+-if((working_path_len > 3) && (!memcmp(working_path, "/~/", 3)))
+-  /* It is referenced to the home directory, so strip the leading '/~/' */
+-  memcpy(real_path, working_path + 3, working_path_len - 2);
+-else
+-  memcpy(real_path, working_path, 1 + working_path_len);
+   }
+-  else if(conn->handler->protocol & CURLPROTO_SFTP) {
+-if((working_path_len > 1) && (working_path[1] == '~')) {
+-  size_t homelen = strlen(homedir);
+-  real_path = malloc(homelen + working_path_len + 1);
+-  if(real_path == NULL) {
+-free(working_path);
+-return CURLE_OUT_OF_MEMORY;
+-  }
+-  /* It is referenced to the home directory, so strip the
+- leading '/' */
+-  memcpy(real_path, homedir, homelen);
+-  real_path[homelen] = '/';
+-  real_path[homelen + 1] = '\0';
+-  if(working_path_len > 3) {
+-memcpy(real_path + homelen + 1, working_path + 3,
+-   1 + working_path_len -3);
+-  }
++  else if((data->conn->handler->protocol & CURLPROTO_SFTP) &&
++  (working_path_len > 2) && !memcmp(working_path, "/~/", 3)) {
++size_t len;
++const char *p;
++int copyfrom = 3;
++if(Curl_dyn_add(, homedir)) {
++  free(working_path);
++  return CURLE_OUT_OF_MEMORY;
+ }
+-else {
+-  real_path = malloc(working_path_len + 1);
+-  if(real_path == NULL) {
+-free(working_path);
+-return CURLE_OUT_OF_MEMORY;
+-  }
+-  memcpy(real_path, working_path, 1 + working_path_len);
++/* Copy a separating '/' if homedir does not end with one */
++len = Curl_dyn_len();
++p = Curl_dyn_ptr();
++if(len && (p[len-1] != '/'))
++  copyfrom = 2;
++
++if(Curl_dyn_addn(,
++ _path[copyfrom], working_path_len - copyfrom)) {
++  free(working_path);
++  return CURLE_OUT_OF_MEMORY;
+ }
+   }
+ 
+-  free(working_path);
++  if(Curl_dyn_len()) {
++free(working_path);
+ 
+-  /* store the pointer for the caller to receive */
+-  *path = real_path;
++/* store the pointer for the caller to receive */
++*path = Curl_dyn_ptr();
++  }
++  else
++*path = working_path;
+ 
+   return CURLE_OK;
+ }
+-- 
+2.25.1
+
diff --git a/meta/recipes-support/curl/curl_7.69.1.bb 
b/meta/recipes-support/curl/curl_7.69.1.bb
index 

Re: [OE-core] [PATCH V1] coreutils: Add gcc parameter for ptest

2023-04-14 Thread Richard Purdie
On Fri, 2023-04-14 at 16:53 +0800, qi...@fujitsu.com wrote:
> From: Qiu Tingting 
> 
> If gcc is installed in image, ptest result has 4 ERROR.
>   ERROR: tests/rm/r-root.sh
>   ERROR: tests/rm/rm-readdir-fail.sh
>   ERROR: tests/cp/nfs-removal-race.sh
>   ERROR: tests/ls/getxattr-speedup.sh
> 
> r-root.log as an example:
>   --
>   k.c:1:10: fatal error: stdio.h: No such file or directory
>   1 | #include 
> |  ^
>   compilation terminated.
>   r-root.sh: set-up failure: failed to build shared library
>   ERROR tests/rm/r-root.sh (exit status: 99)
>   --
> 
> reason:
>   In these cases, k.c file is created and compiled by gcc before run.
>   There is a stdio.h file in /usr/include/ directory,
>   but gcc parameter is not set it.
> 
> solution:
>   Add "-l /usr/include/" in gcc parameter.
> 
> other:
>   If gcc is not installed in image, these cases will be skipped.
> 
> Signed-off-by: Qiu Tingting 
> ---
>  meta/recipes-core/coreutils/coreutils_9.1.bb | 1 +
>  1 file changed, 1 insertion(+)


I'm a bit puzzled by this. Wouldn't on target gcc have /usr/include as
part of it's default search path? Why isn't the default search path
working?

Cheers,

Richard


> 
> diff --git a/meta/recipes-core/coreutils/coreutils_9.1.bb 
> b/meta/recipes-core/coreutils/coreutils_9.1.bb
> index 4807eefd04..fe785b673d 100644
> --- a/meta/recipes-core/coreutils/coreutils_9.1.bb
> +++ b/meta/recipes-core/coreutils/coreutils_9.1.bb
> @@ -184,6 +184,7 @@ do_install_ptest () {
>  install ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
>  cp ${B}/Makefile ${D}${PTEST_PATH}/
>  cp ${S}/init.cfg ${D}${PTEST_PATH}/
> +sed -i 's/CC -Wall -shared/CC -Wall -shared -l \/usr\/include\//g' 
> ${D}${PTEST_PATH}/init.cfg
>  cp -r ${B}/src ${D}${PTEST_PATH}/
>  cp -r ${S}/src/*.c ${D}${PTEST_PATH}/src
>  sed -i '/^VPATH/s/= .*$/= ./g' ${D}${PTEST_PATH}/Makefile
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#179996): 
https://lists.openembedded.org/g/openembedded-core/message/179996
Mute This Topic: https://lists.openembedded.org/mt/98258324/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH V1] coreutils: Add gcc parameter for ptest

2023-04-14 Thread Luca Ceresoli via lists.openembedded.org
Hello Qiu,

On Fri, 14 Apr 2023 16:53:20 +0800
"qi...@fujitsu.com"  wrote:

> From: Qiu Tingting 
> 
> If gcc is installed in image, ptest result has 4 ERROR.
>   ERROR: tests/rm/r-root.sh
>   ERROR: tests/rm/rm-readdir-fail.sh
>   ERROR: tests/cp/nfs-removal-race.sh
>   ERROR: tests/ls/getxattr-speedup.sh
> 
> r-root.log as an example:
>   --
>   k.c:1:10: fatal error: stdio.h: No such file or directory
>   1 | #include 
> |  ^
>   compilation terminated.
>   r-root.sh: set-up failure: failed to build shared library
>   ERROR tests/rm/r-root.sh (exit status: 99)
>   --
> 
> reason:
>   In these cases, k.c file is created and compiled by gcc before run.
>   There is a stdio.h file in /usr/include/ directory,
>   but gcc parameter is not set it.
> 
> solution:
>   Add "-l /usr/include/" in gcc parameter.

Why "-l"? Shouldn't it be "-I"?

Best regards,
Luca

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#179995): 
https://lists.openembedded.org/g/openembedded-core/message/179995
Mute This Topic: https://lists.openembedded.org/mt/98258324/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] report-error: make it catch ParseError error

2023-04-14 Thread Luca Ceresoli via lists.openembedded.org
Hi Mingli,

I'm taking this patch for AB testing, however I have a couple remarks
that might turn into a new version of your patch or in a follow-up
cleanup patch, see below.

On Fri, 14 Apr 2023 10:08:38 +0800
"Yu, Mingli"  wrote:

> From: Mingli Yu 
> 
> Make the report-error catch ParseError error as below and then
> we can check it directly via error report web.
> 
> ParseError at 
> /build/layers/oe-core/meta/recipes-support/curl/curl_7.88.1.bb:32: unparsed 
> line: 'PACKAGECONFIG[ares] = 
> "--enable-ares,--disable-ares,c-ares,,,threaded-resolver'
> 
> Signed-off-by: Mingli Yu 
> ---
>  meta/classes/report-error.bbclass | 26 +-
>  1 file changed, 25 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/classes/report-error.bbclass 
> b/meta/classes/report-error.bbclass
> index 2b2ad56514..041db44941 100644
> --- a/meta/classes/report-error.bbclass
> +++ b/meta/classes/report-error.bbclass
> @@ -132,6 +132,30 @@ python errorreport_handler () {
>  errorreport_savedata(e, data, "error-report.txt")
>  bb.utils.unlockfile(lock)
>  
> +elif isinstance(e, bb.event.ParseError):
> +bb.utils.mkdirhier(logpath)
> +data = {}
> +machine = e.data.getVar("MACHINE")
> +data['machine'] = machine

These two lines could become one line, removing the 'machine' variable:

  data['machine'] = e.data.getVar("MACHINE")

I see you used the same pattern as other if/elif branches in the
surrounding code, so they could also be simplified.

> +data['build_sys'] = e.data.getVar("BUILD_SYS")
> +data['nativelsb'] = nativelsb()
> +data['distro'] = e.data.getVar("DISTRO")
> +data['target_sys'] = e.data.getVar("TARGET_SYS")
> +data['failures'] = []
> +data['component'] = "parse"
> +data['branch_commit'] = str(oe.buildcfg.detect_branch(e.data)) + 
> ": " + str(oe.buildcfg.detect_revision(e.data))
> +data['bitbake_version'] = e.data.getVar("BB_VERSION")
> +data['layer_version'] = get_layers_branch_rev(e.data)
> +data['local_conf'] = get_conf_data(e, 'local.conf')
> +data['auto_conf'] = get_conf_data(e, 'auto.conf')
> +taskdata={}
> +taskdata['log'] = str(e._msg)
> +taskdata['task'] = str(e._msg)
> +data['failures'].append(taskdata)
> +lock = bb.utils.lockfile(datafile + '.lock')
> +errorreport_savedata(e, data, "error-report.txt")
> +bb.utils.unlockfile(lock)

Most of this code is already duplicated in two branches already, and
with your patch there will be three copies. Can the common lines be
moved to a helper function?

Best regards,
Luca

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#179994): 
https://lists.openembedded.org/g/openembedded-core/message/179994
Mute This Topic: https://lists.openembedded.org/mt/98254507/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH V1] coreutils: Add gcc parameter for ptest

2023-04-14 Thread qi...@fujitsu.com
From: Qiu Tingting 

If gcc is installed in image, ptest result has 4 ERROR.
  ERROR: tests/rm/r-root.sh
  ERROR: tests/rm/rm-readdir-fail.sh
  ERROR: tests/cp/nfs-removal-race.sh
  ERROR: tests/ls/getxattr-speedup.sh

r-root.log as an example:
  --
  k.c:1:10: fatal error: stdio.h: No such file or directory
  1 | #include 
|  ^
  compilation terminated.
  r-root.sh: set-up failure: failed to build shared library
  ERROR tests/rm/r-root.sh (exit status: 99)
  --

reason:
  In these cases, k.c file is created and compiled by gcc before run.
  There is a stdio.h file in /usr/include/ directory,
  but gcc parameter is not set it.

solution:
  Add "-l /usr/include/" in gcc parameter.

other:
  If gcc is not installed in image, these cases will be skipped.

Signed-off-by: Qiu Tingting 
---
 meta/recipes-core/coreutils/coreutils_9.1.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-core/coreutils/coreutils_9.1.bb 
b/meta/recipes-core/coreutils/coreutils_9.1.bb
index 4807eefd04..fe785b673d 100644
--- a/meta/recipes-core/coreutils/coreutils_9.1.bb
+++ b/meta/recipes-core/coreutils/coreutils_9.1.bb
@@ -184,6 +184,7 @@ do_install_ptest () {
 install ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
 cp ${B}/Makefile ${D}${PTEST_PATH}/
 cp ${S}/init.cfg ${D}${PTEST_PATH}/
+sed -i 's/CC -Wall -shared/CC -Wall -shared -l \/usr\/include\//g' 
${D}${PTEST_PATH}/init.cfg
 cp -r ${B}/src ${D}${PTEST_PATH}/
 cp -r ${S}/src/*.c ${D}${PTEST_PATH}/src
 sed -i '/^VPATH/s/= .*$/= ./g' ${D}${PTEST_PATH}/Makefile
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#179993): 
https://lists.openembedded.org/g/openembedded-core/message/179993
Mute This Topic: https://lists.openembedded.org/mt/98258324/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [RFT][PATCH 1/3] autoconf: Test 2.72c

2023-04-14 Thread Luca Ceresoli via lists.openembedded.org
Hello Khem, Richard,

On Wed, 12 Apr 2023 14:41:00 -0700
"Khem Raj"  wrote:

> From: Richard Purdie 
> 
> Signed-off-by: Richard Purdie 
> Signed-off-by: Khem Raj 

I ran a-full builds on the exact same tree with or without this series,
and the build with this series fails do_compile of two autotools
packages in qemux86-64-x32:

The successful build (without this series):
https://autobuilder.yoctoproject.org/typhoon/#/builders/57/builds/6846/steps/12/logs/stdio

The failing build (same code + this series):
https://autobuilder.yoctoproject.org/typhoon/#/builders/57/builds/6849/steps/12/logs/stdio

No other failures at the moment, but the qemux86-world-alt is still in
progress.

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#179992): 
https://lists.openembedded.org/g/openembedded-core/message/179992
Mute This Topic: https://lists.openembedded.org/mt/98229134/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH 2/2] gawk: Fix ptests on musl

2023-04-14 Thread Khem Raj
On Thu, Apr 13, 2023 at 9:06 AM Richard Purdie
 wrote:
>
> On Thu, 2023-04-13 at 08:29 -0700, Khem Raj wrote:
> > On Thu, Apr 13, 2023 at 6:44 AM Richard Purdie
> >  wrote:
> > >
> > > On Thu, 2023-04-13 at 06:16 -0700, Khem Raj wrote:
> > > > On Thu, Apr 13, 2023 at 3:14 AM Richard Purdie
> > > >  wrote:
> > > > >
> > > > > On Wed, 2023-04-12 at 22:54 -0700, Khem Raj wrote:
> > > > > > Signed-off-by: Khem Raj 
> > > > > > ---
> > > > > >  ...0001-Provide-fixes-for-tests-on-musl.patch | 73 
> > > > > > +++
> > > > > >  meta/recipes-extended/gawk/gawk_5.2.1.bb  |  7 +-
> > > > > >  2 files changed, 77 insertions(+), 3 deletions(-)
> > > > > >  create mode 100644 
> > > > > > meta/recipes-extended/gawk/gawk/0001-Provide-fixes-for-tests-on-musl.patch
> > > > > >
> > > > > > diff --git 
> > > > > > a/meta/recipes-extended/gawk/gawk/0001-Provide-fixes-for-tests-on-musl.patch
> > > > > >  
> > > > > > b/meta/recipes-extended/gawk/gawk/0001-Provide-fixes-for-tests-on-musl.patch
> > > > > > new file mode 100644
> > > > > > index 00..4ff2466c0e
> > > > > > --- /dev/null
> > > > > > +++ 
> > > > > > b/meta/recipes-extended/gawk/gawk/0001-Provide-fixes-for-tests-on-musl.patch
> > > > > > @@ -0,0 +1,73 @@
> > > > > > +From 95bcf4397b6f727208f3c627b7d00dacec406d02 Mon Sep 17 00:00:00 
> > > > > > 2001
> > > > > > +From: Khem Raj 
> > > > > > +Date: Wed, 12 Apr 2023 21:57:18 -0700
> > > > > > +Subject: [PATCH] Provide fixes for tests on musl
> > > > > > +
> > > > > > +Fixes rebt8b1 and regx8bit
> > > > > > +Disable clos1way6 [1]
> > > > > > +
> > > > > > +Disable commas and backsmalls1, they do not work
> > > > > > +with musl-locales somehow even though we do isntall
> > > > > > +en_US.UTF-8 on target
> > > > > > +
> > > > > > +[1] 
> > > > > > https://lists.gnu.org/archive/html/bug-gawk/2021-02/msg5.html
> > > > > > +
> > > > > > +Upstream-Status: Inappropriate [musl-specific]
> > > > > > +Signed-off-by: Khem Raj 
> > > > > > +---
> > > > > > + test/Maketests | 11 ---
> > > > > > +
> > > > >
> > > > > Carrying a patch like this makes me a bit nervous as:
> > > > >
> > > > > a) it is only applied for musl so it makes recipe upgrade testing a
> > > > > nightmare
> > > > >
> > > > > b) there doesn't appear to be any path to upstream it, we'd just have
> > > > > to carry it indefinitely.
> > > > >
> > > > > c) the reasons for the failure don't seem to be understood.
> > > >
> > > > reasons are clear,  these tests need full locale support which we do
> > > > not have with musl.
> > >
> > > The above says something quite different to what the patch says:
> > >
> > > "they do not work with musl-locales somehow"
> >
> > yeah the metadata patch subject should be improved to say disable tests
>
> That would be clearer, yes.
>
> > >
> > > which sounds like nobody has looked into it.
> >
> > yes, and my localedata knowledge is limited to root cause this further 
> > sadly.
>
> Fair enough, we just need to be clear about that.
>
> > > > > Is there something we can do to avoid having to carry this
> > > > > indefinitely?
> >
> > You can do sed operations from the recipe. I don't know how that will be 
> > better
> > than patch. btw. we are already carrying another patch to disable other 
> > tests
> > because I guess they fail on Autobuilder on stress but not always,
> > because they worked
> > fine on my ptest run.
> >
> > https://git.openembedded.org/openembedded-core/tree/meta/recipes-extended/gawk/gawk/remove-sensitive-tests.patch
> >
> > Do we have plans to address this with upstream as well ?
>
> The difference between that patch and the one proposed is that the one
> above:
>
> a) is unconditional
> b) is clear and simple, it just deletes the tests
>
> This means when the recipe is upgraded, the patch is obvious and
> therefore straight forward to port.
>
> Ideas:
>
> Can we simplify the musl one to delete the tests in question?
>
> Could we get a patch upstream which allowed us to disable tests from
> the commandline to improve both cases?
>
> I think we should be able to work something out but I just wanted to
> make it clear the patch as it stands isn't clear enough and will cause
> maintenance issues so we need to work out something better.
>

if you run make check on musl/emux86-64 then we only get one failure clos1way6
and others pass. Which matches alpine. However, I think the way ptest is copying
partially the test environment seems to be the cause. I tried to pass LANG=C etc
but it did not help. Secondly, there are some surgeries the run-ptest
is also doing
which makes the test environment quite unique to yocto ptests.

Its fine to ignore this patch. I have already drove into weeds trying
to fix it, not worth it.

> Cheers,
>
> Richard
>
>
> > > > > Out of interest did alpine do anything for this?
> > > >
> > > > they have patches.
> > >
> > > The same as ours or different? Was there any discussion with upstream
> > > on this?
> >
> > There is one failure which is common and I 

Re: [OE-core] FW: GCC patch "[PATCH] Share work directories" to be discussed after GCC upstream denial

2023-04-14 Thread Richard Purdie
On Fri, 2023-04-14 at 06:20 +, Shinde, Yash wrote:
> As discussed in the meeting, sharing the GCC upstream’s reply for the
> “Share work directories” patch.

Thanks for sharing this. With a few of these patches we need to
understand the history of them and why we're doing what we do.

Since we share ${S}, the source directory between multiple gcc builds
and multiple target builds, the configuration can vary but we can't
change files in ${S} as that would cause races. I believe we therefore
take a copy of defaults.h into ${B} and that is a copy we can modify in
different builds.

grepping the gcc recipes for defaults.h, we find this:

gcc-configure-common.inc-do_configure:prepend () {
gcc-configure-common.inc-   # teach gcc to find correct target includedir 
when checking libc ssp support
gcc-configure-common.inc-   mkdir -p ${B}/gcc
gcc-configure-common.inc-   echo "NATIVE_SYSTEM_HEADER_DIR = 
${SYSTEMHEADERS}" > ${B}/gcc/t-oe
gcc-configure-common.inc:   cat ${S}/gcc/defaults.h | grep -v 
"\#endif.*GCC_DEFAULTS_H" > ${B}/gcc/defaults.h.new
gcc-configure-common.inc:   cat >>${B}/gcc/defaults.h.new <<_EOF
gcc-configure-common.inc-#define NATIVE_SYSTEM_HEADER_DIR "${SYSTEMHEADERS}"
gcc-configure-common.inc-#define STANDARD_STARTFILE_PREFIX_1 "${SYSTEMLIBS}"
gcc-configure-common.inc-#define STANDARD_STARTFILE_PREFIX_2 "${SYSTEMLIBS1}"
gcc-configure-common.inc-#define SYSTEMLIBS_DIR "${SYSTEMLIBS}"
gcc-configure-common.inc-#endif /* ! GCC_DEFAULTS_H */
gcc-configure-common.inc-_EOF
gcc-configure-common.inc:   mv ${B}/gcc/defaults.h.new ${B}/gcc/defaults.h
gcc-configure-common.inc-}

which is the code taking the copy. The patch you mention then causes
gcc to use the copy rather than the one in ${S}.

The patch as it stands will break gcc since there is no file copy in
upstream so it is not surprisingly upstream wouldn't take it. Proposing
a change like this which breaks things for them will undermine our
relationship with them too, so we need to be careful with this.

The question then becomes can we override the values we want to set
here without changing defaults.h? I think we struggled to find a way to
change these defines so that gcc always used the new values which is
why we have the patch.

Our goal is to stop patching gcc with as many patches. The question is
therefore, can we find a way to keep this working without a patch.

At the very least we should update the patch with the information I've
collected above.

Cheers,

Richard

>  
> Regards,
> Yash
>  
> From: Andrew Pinski
> Sent: 22 February 2023 21:34
> To: Shinde, Yash
> Cc: gcc-patc...@gcc.gnu.org; raj.k...@gmail.com; MacLeod,
> Randy;Kokkonda, Sundeep
> Subject: Re: [PATCH] Share work directories
>  
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the
> sender and know the content is safe.
> 
> On Wed, Feb 22, 2023 at 4:22 AM Yash Shinde
>  wrote:
> > 
> > From: Khem Raj 
> > 
> > Fix configure and Makefile files to read the defaults.hand t-oe
> > from build directory,
> > so that the source can be shared between gcc-cross-initial, gcc-
> > cross-intermediate, gcc-cross, gcc-runtime,
> > and also the sdk build which use a separate build directory
> > compared to source directory.
> 
> > 
> > While compiling gcc-crosssdk-initial-x86_64 on some host, there is
> > occasionally failure that test the existance of default.h doesn't
> > work,
> > the reason is tm_include_list='** defaults.h' rather than
> > tm_include_list='** ./defaults.h'.
> > So we add the test condition for this situation.
> 
> This patch does not make sense because $(srcdir)/defaults.h will
> always exist.
> I build all the time with different object directories and I know of
> many people who build with a read only source directory; explicitly
> so
> they can test that way.
> You are going to have to expand on why you need defaults.h from the
> build directory and not the source directory?
> As far as I Know there is no defaults.h in the build directory even.
> Do you have another patch which changes that?
> 
> 
> Thanks,
> Andrew Pinski
> 
> > 
> > gcc/ChangeLog:
> > 
> >  * configure
> >  * configure.ac
> >  * mkconfig.sh
> > 
> > Signed-off-by: Khem Raj 
> > Signed-off-by: Hongxu Jia 
> > ---
> >   gcc/configure    | 4 ++--
> >   gcc/configure.ac | 4 ++--
> >   gcc/mkconfig.sh  | 4 ++--
> >   3 files changed, 6 insertions(+), 6 deletions(-)
> > 
> > diff --git a/gcc/configure b/gcc/configure
> > index 254f9b6c943..ff2a3e26049 100755
> > --- a/gcc/configure
> > +++ b/gcc/configure
> > @@ -13471,8 +13471,8 @@ for f in $tm_file; do
> >  tm_include_list="${tm_include_list} $f"
> >  ;;
> >   defaults.h )
> > -   tm_file_list="${tm_file_list} \$(srcdir)/$f"
> > -   tm_include_list="${tm_include_list} $f"
> > +   tm_file_list="${tm_file_list} ./$f"
> > +   tm_include_list="${tm_include_list} ./$f"
> >  ;;
> >   

[OE-core] FW: GCC patch "[PATCH] Share work directories" to be discussed after GCC upstream denial

2023-04-14 Thread Shinde, Yash
As discussed in the meeting, sharing the GCC upstream’s reply for the “Share 
work directories” patch.

Regards,
Yash

From: Andrew Pinski
Sent: 22 February 2023 21:34
To: Shinde, Yash
Cc: gcc-patc...@gcc.gnu.org; 
raj.k...@gmail.com; MacLeod, 
Randy; Kokkonda, 
Sundeep
Subject: Re: [PATCH] Share work directories

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know 
the content is safe.

On Wed, Feb 22, 2023 at 4:22 AM Yash Shinde  wrote:
>
> From: Khem Raj 
>
> Fix configure and Makefile files to read the defaults.hand t-oe from build 
> directory,
> so that the source can be shared between gcc-cross-initial, 
> gcc-cross-intermediate, gcc-cross, gcc-runtime,
> and also the sdk build which use a separate build directory compared to 
> source directory.

>
> While compiling gcc-crosssdk-initial-x86_64 on some host, there is
> occasionally failure that test the existance of default.h doesn't work,
> the reason is tm_include_list='** defaults.h' rather than tm_include_list='** 
> ./defaults.h'.
> So we add the test condition for this situation.

This patch does not make sense because $(srcdir)/defaults.h will always exist.
I build all the time with different object directories and I know of
many people who build with a read only source directory; explicitly so
they can test that way.
You are going to have to expand on why you need defaults.h from the
build directory and not the source directory?
As far as I Know there is no defaults.h in the build directory even.
Do you have another patch which changes that?


Thanks,
Andrew Pinski

>
> gcc/ChangeLog:
>
> * configure
> * configure.ac
> * mkconfig.sh
>
> Signed-off-by: Khem Raj 
> Signed-off-by: Hongxu Jia 
> ---
>  gcc/configure| 4 ++--
>  gcc/configure.ac | 4 ++--
>  gcc/mkconfig.sh  | 4 ++--
>  3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/gcc/configure b/gcc/configure
> index 254f9b6c943..ff2a3e26049 100755
> --- a/gcc/configure
> +++ b/gcc/configure
> @@ -13471,8 +13471,8 @@ for f in $tm_file; do
> tm_include_list="${tm_include_list} $f"
> ;;
>  defaults.h )
> -   tm_file_list="${tm_file_list} \$(srcdir)/$f"
> -   tm_include_list="${tm_include_list} $f"
> +   tm_file_list="${tm_file_list} ./$f"
> +   tm_include_list="${tm_include_list} ./$f"
> ;;
>  * )
> tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
> diff --git a/gcc/configure.ac b/gcc/configure.ac
> index 62bc908b991..d36830cf2fb 100644
> --- a/gcc/configure.ac
> +++ b/gcc/configure.ac
> @@ -2336,8 +2336,8 @@ for f in $tm_file; do
> tm_include_list="${tm_include_list} $f"
> ;;
>  defaults.h )
> -   tm_file_list="${tm_file_list} \$(srcdir)/$f"
> -   tm_include_list="${tm_include_list} $f"
> +   tm_file_list="${tm_file_list} ./$f"
> +   tm_include_list="${tm_include_list} ./$f"
> ;;
>  * )
> tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
> diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh
> index 054ede89647..3b2c2b9df37 100644
> --- a/gcc/mkconfig.sh
> +++ b/gcc/mkconfig.sh
> @@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then
>  if [ $# -ge 1 ]; then
> echo '#ifdef IN_GCC' >> ${output}T
> for file in "$@"; do
> -   if test x"$file" = x"defaults.h"; then
> +   if test x"$file" = x"./defaults.h" -o x"$file" = x"defaults.h"; 
> then
> postpone_defaults_h="yes"
> else
> echo "# include \"$file\"" >> ${output}T
> @@ -106,7 +106,7 @@ esac
>
>  # If we postponed including defaults.h, add the #include now.
>  if test x"$postpone_defaults_h" = x"yes"; then
> -echo "# include \"defaults.h\"" >> ${output}T
> +echo "# include \"./defaults.h\"" >> ${output}T
>  fi
>
>  # Add multiple inclusion protection guard, part two.
> --
> 2.39.0
>


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#179989): 
https://lists.openembedded.org/g/openembedded-core/message/179989
Mute This Topic: https://lists.openembedded.org/mt/98257029/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] FW: GCC patch "[PATCH] Share work directories" to be discussed after GCC upstream denial

2023-04-14 Thread Shinde, Yash


From: Shinde, Yash
Sent: 14 April 2023 11:45
To: Patches and discussions about the oe-core 
layer; 
yashinde...@gmail.com
Subject: FW: GCC patch "[PATCH] Share work directories" to be discussed after 
GCC upstream denial

As discussed in the meeting, sharing the GCC upstream’s reply for “Share work 
directories” patch.

Regards,
Yash

From: Andrew Pinski
Sent: 22 February 2023 21:34
To: Shinde, Yash
Cc: gcc-patc...@gcc.gnu.org; 
raj.k...@gmail.com; MacLeod, 
Randy; Kokkonda, 
Sundeep
Subject: Re: [PATCH] Share work directories

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know 
the content is safe.

On Wed, Feb 22, 2023 at 4:22 AM Yash Shinde  wrote:
>
> From: Khem Raj 
>
> Fix configure and Makefile files to read the defaults.hand t-oe from build 
> directory,
> so that the source can be shared between gcc-cross-initial, 
> gcc-cross-intermediate, gcc-cross, gcc-runtime,
> and also the sdk build which use a separate build directory compared to 
> source directory.

>
> While compiling gcc-crosssdk-initial-x86_64 on some host, there is
> occasionally failure that test the existance of default.h doesn't work,
> the reason is tm_include_list='** defaults.h' rather than tm_include_list='** 
> ./defaults.h'.
> So we add the test condition for this situation.

This patch does not make sense because $(srcdir)/defaults.h will always exist.
I build all the time with different object directories and I know of
many people who build with a read only source directory; explicitly so
they can test that way.
You are going to have to expand on why you need defaults.h from the
build directory and not the source directory?
As far as I Know there is no defaults.h in the build directory even.
Do you have another patch which changes that?


Thanks,
Andrew Pinski

>
> gcc/ChangeLog:
>
> * configure
> * configure.ac
> * mkconfig.sh
>
> Signed-off-by: Khem Raj 
> Signed-off-by: Hongxu Jia 
> ---
>  gcc/configure| 4 ++--
>  gcc/configure.ac | 4 ++--
>  gcc/mkconfig.sh  | 4 ++--
>  3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/gcc/configure b/gcc/configure
> index 254f9b6c943..ff2a3e26049 100755
> --- a/gcc/configure
> +++ b/gcc/configure
> @@ -13471,8 +13471,8 @@ for f in $tm_file; do
> tm_include_list="${tm_include_list} $f"
> ;;
>  defaults.h )
> -   tm_file_list="${tm_file_list} \$(srcdir)/$f"
> -   tm_include_list="${tm_include_list} $f"
> +   tm_file_list="${tm_file_list} ./$f"
> +   tm_include_list="${tm_include_list} ./$f"
> ;;
>  * )
> tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
> diff --git a/gcc/configure.ac b/gcc/configure.ac
> index 62bc908b991..d36830cf2fb 100644
> --- a/gcc/configure.ac
> +++ b/gcc/configure.ac
> @@ -2336,8 +2336,8 @@ for f in $tm_file; do
> tm_include_list="${tm_include_list} $f"
> ;;
>  defaults.h )
> -   tm_file_list="${tm_file_list} \$(srcdir)/$f"
> -   tm_include_list="${tm_include_list} $f"
> +   tm_file_list="${tm_file_list} ./$f"
> +   tm_include_list="${tm_include_list} ./$f"
> ;;
>  * )
> tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
> diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh
> index 054ede89647..3b2c2b9df37 100644
> --- a/gcc/mkconfig.sh
> +++ b/gcc/mkconfig.sh
> @@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then
>  if [ $# -ge 1 ]; then
> echo '#ifdef IN_GCC' >> ${output}T
> for file in "$@"; do
> -   if test x"$file" = x"defaults.h"; then
> +   if test x"$file" = x"./defaults.h" -o x"$file" = x"defaults.h"; 
> then
> postpone_defaults_h="yes"
> else
> echo "# include \"$file\"" >> ${output}T
> @@ -106,7 +106,7 @@ esac
>
>  # If we postponed including defaults.h, add the #include now.
>  if test x"$postpone_defaults_h" = x"yes"; then
> -echo "# include \"defaults.h\"" >> ${output}T
> +echo "# include \"./defaults.h\"" >> ${output}T
>  fi
>
>  # Add multiple inclusion protection guard, part two.
> --
> 2.39.0
>



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#179988): 
https://lists.openembedded.org/g/openembedded-core/message/179988
Mute This Topic: https://lists.openembedded.org/mt/98257021/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] FW: GCC patch "[PATCH] Share work directories" to be discussed after GCC upstream denial

2023-04-14 Thread Shinde, Yash
As discussed in the meeting, sharing the GCC upstream’s reply for “Share work 
directories” patch.

Regards,
Yash

From: Andrew Pinski
Sent: 22 February 2023 21:34
To: Shinde, Yash
Cc: gcc-patc...@gcc.gnu.org; 
raj.k...@gmail.com; MacLeod, 
Randy; Kokkonda, 
Sundeep
Subject: Re: [PATCH] Share work directories

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know 
the content is safe.

On Wed, Feb 22, 2023 at 4:22 AM Yash Shinde  wrote:
>
> From: Khem Raj 
>
> Fix configure and Makefile files to read the defaults.hand t-oe from build 
> directory,
> so that the source can be shared between gcc-cross-initial, 
> gcc-cross-intermediate, gcc-cross, gcc-runtime,
> and also the sdk build which use a separate build directory compared to 
> source directory.

>
> While compiling gcc-crosssdk-initial-x86_64 on some host, there is
> occasionally failure that test the existance of default.h doesn't work,
> the reason is tm_include_list='** defaults.h' rather than tm_include_list='** 
> ./defaults.h'.
> So we add the test condition for this situation.

This patch does not make sense because $(srcdir)/defaults.h will always exist.
I build all the time with different object directories and I know of
many people who build with a read only source directory; explicitly so
they can test that way.
You are going to have to expand on why you need defaults.h from the
build directory and not the source directory?
As far as I Know there is no defaults.h in the build directory even.
Do you have another patch which changes that?


Thanks,
Andrew Pinski

>
> gcc/ChangeLog:
>
> * configure
> * configure.ac
> * mkconfig.sh
>
> Signed-off-by: Khem Raj 
> Signed-off-by: Hongxu Jia 
> ---
>  gcc/configure| 4 ++--
>  gcc/configure.ac | 4 ++--
>  gcc/mkconfig.sh  | 4 ++--
>  3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/gcc/configure b/gcc/configure
> index 254f9b6c943..ff2a3e26049 100755
> --- a/gcc/configure
> +++ b/gcc/configure
> @@ -13471,8 +13471,8 @@ for f in $tm_file; do
> tm_include_list="${tm_include_list} $f"
> ;;
>  defaults.h )
> -   tm_file_list="${tm_file_list} \$(srcdir)/$f"
> -   tm_include_list="${tm_include_list} $f"
> +   tm_file_list="${tm_file_list} ./$f"
> +   tm_include_list="${tm_include_list} ./$f"
> ;;
>  * )
> tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
> diff --git a/gcc/configure.ac b/gcc/configure.ac
> index 62bc908b991..d36830cf2fb 100644
> --- a/gcc/configure.ac
> +++ b/gcc/configure.ac
> @@ -2336,8 +2336,8 @@ for f in $tm_file; do
> tm_include_list="${tm_include_list} $f"
> ;;
>  defaults.h )
> -   tm_file_list="${tm_file_list} \$(srcdir)/$f"
> -   tm_include_list="${tm_include_list} $f"
> +   tm_file_list="${tm_file_list} ./$f"
> +   tm_include_list="${tm_include_list} ./$f"
> ;;
>  * )
> tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
> diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh
> index 054ede89647..3b2c2b9df37 100644
> --- a/gcc/mkconfig.sh
> +++ b/gcc/mkconfig.sh
> @@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then
>  if [ $# -ge 1 ]; then
> echo '#ifdef IN_GCC' >> ${output}T
> for file in "$@"; do
> -   if test x"$file" = x"defaults.h"; then
> +   if test x"$file" = x"./defaults.h" -o x"$file" = x"defaults.h"; 
> then
> postpone_defaults_h="yes"
> else
> echo "# include \"$file\"" >> ${output}T
> @@ -106,7 +106,7 @@ esac
>
>  # If we postponed including defaults.h, add the #include now.
>  if test x"$postpone_defaults_h" = x"yes"; then
> -echo "# include \"defaults.h\"" >> ${output}T
> +echo "# include \"./defaults.h\"" >> ${output}T
>  fi
>
>  # Add multiple inclusion protection guard, part two.
> --
> 2.39.0
>


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#179987): 
https://lists.openembedded.org/g/openembedded-core/message/179987
Mute This Topic: https://lists.openembedded.org/mt/98256991/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] cargo patching git path

2023-04-14 Thread Frederic Martinsons
I opened a dedicated ticket (
https://bugzilla.yoctoproject.org/show_bug.cgi?id=15104) for this issue.

On Thu, 13 Apr 2023 at 13:50, Frederic Martinsons via lists.openembedded.org
 wrote:

> By the way, it was way simpler to update my cargo to 1.68.2 and I confirm
> the patching still works like a charm.
>
> On Thu, 13 Apr 2023 at 13:40, Frederic Martinsons via
> lists.openembedded.org  gmail@lists.openembedded.org> wrote:
>
>> Hello,
>>
>> Since I didn't manage to make any progress on the reproducibility issue
>> of zvariant (https://bugzilla.yoctoproject.org/show_bug.cgi?id=15090) i
>> decided to try another rust project to see their reproducibility state.
>>
>> I went with zbus (https://github.com/zeenix/zbus) which use zvariant
>> (because one of my hypothesis is that zvariant was not aimed to be build
>> standalone) and I came into another issue which is the subject of this
>> mail. I cannot make the zbus recipe to be built:
>>
>> | error: failed to get `glib` as a dependency of package `zvariant
>> v3.12.0
>> (/home/jenkins/yocto-poky-master/poky/build/tmp/work/core2-64-poky-linux/zbus/3.11.0-r0/git/zvariant)`
>> |
>> | Caused by:
>> |   failed to load source for dependency `glib`
>> |
>> | Caused by:
>> |   Unable to update https://github.com/gtk-rs/glib?rev=c9ee583cea0
>> |
>> | Caused by:
>> |   can't checkout from 'https://github.com/gtk-rs/glib': you are in the
>> offline mode (--offline)
>>
>> I looked at the patching process of cargo_common.class and it is
>> correctly applied and the cargo config file contains the following content:
>>
>> [patch."https://github.com/gtk-rs/glib;]
>> glib = { path =
>> "/home/jenkins/yocto-poky-master/poky/build/tmp/work/core2-64-poky-linux/zbus/3.11.0-r0/glib"
>> }
>> glib-macros = { path =
>> "/home/jenkins/yocto-poky-master/poky/build/tmp/work/core2-64-poky-linux/zbus/3.11.0-r0/glib-macros"
>> }
>>
>> [patch."https://github.com/gtk-rs/sys;]
>> glib-sys = { path =
>> "/home/jenkins/yocto-poky-master/poky/build/tmp/work/core2-64-poky-linux/zbus/3.11.0-r0/glib-sys"
>> }
>> gobject-sys = { path =
>> "/home/jenkins/yocto-poky-master/poky/build/tmp/work/core2-64-poky-linux/zbus/3.11.0-r0/gobject-sys"
>> }
>>
>> I first think about what @Alex Kiernan  said on
>> its commit message (
>> https://git.openembedded.org/openembedded-core/commit/?id=684a8af41c5bb70db68e75f72bdc4c9b09630810)
>> about patching not working with virtual manifest since the zbus project use
>> of this.
>>
>> But I managed to make this patching work with the zbus project locally
>> (by the way I notified the upstream about that:
>> https://github.com/rust-lang/cargo/issues/4934).
>>
>> I cannot understand why this does not work under yocto despite the
>> correct cargo config file for patching.
>>
>> On my ubuntu, I used cargo 1.67.1 and oe has 1.68.2, will try a downgrade
>> but I feel that this is not the issue.
>>
>> Any ideas ?
>>
>>
>>
>>
>>
>>
>>
>>
>>
> 
>
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#179986): 
https://lists.openembedded.org/g/openembedded-core/message/179986
Mute This Topic: https://lists.openembedded.org/mt/98238501/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-