Re: [OE-core] [PATCH] gcc: Upgrade to GCC 13.1 release

2023-04-27 Thread Khem Raj
On Thu, Apr 27, 2023 at 2:45 PM Richard Purdie
 wrote:
>
> On Thu, 2023-04-27 at 11:52 -0700, Khem Raj wrote:
> > > - Package libhwasan_preinit.o, its available on some arches e.g. x86_64 on
> > >   gcc13+
> > > - GCC 13 Porting guide [1] and major changes [2] and detailed 
> > > documentation [3]
> > > - Fix aarch64 cross build when S != B
> > >
> > > [1] https://www.gnu.org/software/gcc/gcc-13/porting_to.html
> > > [2] https://www.gnu.org/software/gcc/gcc-13/changes.html
> > > [3] https://gcc.gnu.org/onlinedocs/13.1.0/
> > >
> > > Signed-off-by: Khem Raj 
>
> Doesn't this need the prefix mapping parameter changes to bitbake.conf
> since one of the patches did merge but was altered by upstream?
>

Right you are. I have sent a separate for to enable -fcanon-prefix-map globally.

> Cheers,
>
> Richard
>
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180505): 
https://lists.openembedded.org/g/openembedded-core/message/180505
Mute This Topic: https://lists.openembedded.org/mt/98543627/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 11/11] insane.bbclass: enable 32 bit time API check on affected architectures

2023-04-27 Thread Khem Raj
I see this error triggering for meta-openembedded builds

qemuarm - https://errors.yoctoproject.org/Errors/Build/163136/

On Wed, Apr 26, 2023 at 2:50 AM Alexander Kanavin
 wrote:
>
> Signed-off-by: Alexander Kanavin 
> ---
>  meta/classes-global/insane.bbclass | 7 ++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes-global/insane.bbclass 
> b/meta/classes-global/insane.bbclass
> index 8788f58fc5b..38126d89a58 100644
> --- a/meta/classes-global/insane.bbclass
> +++ b/meta/classes-global/insane.bbclass
> @@ -44,7 +44,7 @@ ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch 
> pkgconfig la \
>  already-stripped installed-vs-shipped ldflags compile-host-path \
>  install-host-path pn-overrides unknown-configure-option \
>  useless-rpaths rpaths staticdev empty-dirs \
> -patch-fuzz patch-status-core\
> +patch-fuzz patch-status-core 32bit-time \
>  "
>  # Add usrmerge QA check based on distro feature
>  ERROR_QA:append = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', ' 
> usrmerge', '', d)}"
> @@ -512,6 +512,11 @@ def check_32bit_symbols(path, packagename, d, elf, 
> messages):
>  """
>  Check that ELF files do not use any 32 bit time APIs from glibc.
>  """
> +thirtytwo_bit_time_archs = 
> set(('arm','armeb','mipsarcho32','powerpc','x86'))
> +overrides = set(d.getVar('OVERRIDES').split(':'))
> +if not(thirtytwo_bit_time_archs & overrides):
> +return
> +
>  import re
>  # This list is manually constructed by searching the image folder of the
>  # glibc recipe for __USE_TIME_BITS64.  There is no good way to do this
> --
> 2.30.2
>
>
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180503): 
https://lists.openembedded.org/g/openembedded-core/message/180503
Mute This Topic: https://lists.openembedded.org/mt/98511413/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] bitbake.conf: Add -fcanon-prefix-map to DEBUG_PREFIX_MAP

2023-04-27 Thread Khem Raj
This should help canonicalize the relative paths and symlinks
during cross compile, -fcanon-prefix-map is newly added in gcc-13+ [1]

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108464#c8
Signed-off-by: Khem Raj 
---
 meta/conf/bitbake.conf | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index d94ffe1df9..453bef37a9 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -644,7 +644,8 @@ EXTRA_OEMAKE:prepend:task-install = "${PARALLEL_MAKEINST} "
 # Optimization flags.
 ##
 # Beware: applied last to first
-DEBUG_PREFIX_MAP ?= 
"-fmacro-prefix-map=${S}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
+DEBUG_PREFIX_MAP ?= "-fcanon-prefix-map \
+ -fmacro-prefix-map=${S}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
  -fdebug-prefix-map=${S}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
  -fmacro-prefix-map=${B}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
  -fdebug-prefix-map=${B}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
-- 
2.40.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180504): 
https://lists.openembedded.org/g/openembedded-core/message/180504
Mute This Topic: https://lists.openembedded.org/mt/98551742/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] make-mod-scripts: preserve libraries when rm_work is used

2023-04-27 Thread Bruce Ashfield
On Thu, Apr 27, 2023 at 6:32 PM Jose Quaresma  wrote:
>
> Hi Bruce,
>
> I have been testing your patch and have some comments.
> In some of my kernels I don't have the pkg-config changes and so I have some 
> fails linking the scripts/sign-file
> because for static linking with the libcrypto we need the -ldl -pthread.
>
> To fix my build I need to override the CRYPTO_LIBS in my kernel because they 
> use the hardcoded pkg-config
> where it is not possible to pass the --static argument.
>
> With following change on top of your patch I can build moist of my kernels:
>
> export HOSTLDFLAGS="-lz"
>
> +   HOSTPKG_CONFIG="pkg-config --static"
> +   # override CRYPTO_LIBS since HOSTPKG_CONFIG lands only in v5.19-rc1
> +   # 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d5ea4fece4508bf8e72b659cd22fa4840d8d61e5
> +   CRYPTO_LIBS="$(pkg-config --static --libs libcrypto 2>/dev/null || 
> echo -lcrypto)"
> +
> unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
> for t in prepare scripts_basic scripts; do
> oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
> AR="${KERNEL_AR}" OBJCOPY="${KERNEL_OBJCOPY}" \
> -   HOSTPKG_CONFIG="pkg-config --static" \
> +   HOSTPKG_CONFIG="${HOSTPKG_CONFIG}" 
> CRYPTO_LIBS="${CRYPTO_LIBS}" \
> -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} $t
> done
>
>
> I think belive that the LIBELF_LIBS needs the same fix for the cases where 
> HOSTPKG_CONFIG is not available.
> Also I think there is a typo in the LIBELF_LIBS because you first populate it 
> with pkg-config but on the export the variable is redefined
> with the HOST_LIBELF_LIBS. I made a litle change too on that:
>
> # for pre-5.15 kernels
> -   LIBELF_LIBS=$(pkg-config libelf --libs 2>/dev/null || echo -lelf)
> -   export LIBELF_LIBS="$HOST_LIBELF_LIBS -lz"
> +   LIBELF_LIBS=$(pkg-config --static libelf --libs 2>/dev/null || echo 
> -lelf)
> +   export LIBELF_LIBS="$LIBELF_LIBS -lz"
> export HOSTLDFLAGS="-lz"
>
> Thanks for you help.

Those are definitely plausible tweaks to the patch, I was providing
the two techniques for that reason, and you've used them
appropriately.

Let me roll your changes into my patch, re-test and I'll submit it to
the mailing list as a v2.

Thanks for the testing, and fixup, I knew there would be things missing! :)

Bruce

>
> Jose
>
> Bruce Ashfield  escreveu no dia segunda, 24/04/2023 
> à(s) 20:25:
>>
>> On Mon, Apr 24, 2023 at 6:30 AM Jose Quaresma  
>> wrote:
>> >
>> >
>> >
>> > Bruce Ashfield  escreveu no dia domingo, 
>> > 23/04/2023 à(s) 20:55:
>> >>
>> >> On Sat, Apr 22, 2023 at 9:06 AM Christoph Lauer
>> >>  wrote:
>> >> >
>> >> > Am 21.04.23 um 22:28 schrieb Bruce Ashfield:
>> >> > > On Wed, Apr 19, 2023 at 11:03 PM Bruce Ashfield via
>> >> > > lists.openembedded.org
>> >> > >  wrote:
>> >> > >>
>> >> > >> On Wed, Apr 19, 2023 at 6:54 PM Richard Purdie
>> >> > >>  wrote:
>> >> > >>>
>> >> > >>> On Wed, 2023-04-19 at 23:34 +0100, Jose Quaresma wrote:
>> >> >  Hi,
>> >> > 
>> >> >  Not related with the previous discussion but just for
>> >> >  your information.
>> >> >  The rm_work.bbclass has an exception for the kernel recipes [1].
>> >> >  So I don't understand why we can't do the same for the make-mod-
>> >> >  scripts
>> >> >  who is the twin brother of all these kernel recipes.
>> >> > 
>> >> >  [1]
>> >> >  https://git.openembedded.org/openembedded-core/tree/meta/classes/rm_work.bbclass#n168
>> >> > >>>
>> >> > >>> Ideally we wouldn't be doing this for the kernel recipes.
>> >> > >>>
>> >> > >>> There is also a big difference to that and the proposed patch. The
>> >> > >>> proposed patch was preserving a specific directory rather than an
>> >> > >>> entire recipe. Removing the task stamps but leaving a small piece of
>> >> > >>> WORKDIR is quite different to preserving WORKDIR and STAMPS for a
>> >> > >>> specific recipe. The former is not tested and will break things. The
>> >> > >>> latter is better tolerated by bitbake.
>> >> > >>
>> >> > >> Agreed.
>> >> > >>
>> >> > >> Plus, I am working on this now.
>> >> > >>
>> >> > >> I have static linking of the scripts/tools working, but what I 
>> >> > >> haven't
>> >> > >> figured out is how to do that without patching the Makefiles.
>> >> > >>
>> >> > >
>> >> > > It turned out to be quite the battle to get older kernels what was
>> >> > > required for static linking of the tools.
>> >> > >
>> >> > > Attached is my WIP patch. I'm out of the office early next week, but
>> >> > > will revisit it once I'm back.
>> >> > >
>> >> > > Bruce
>> >> > >
>> >> > >> Next up will be some rpath trickery.
>> >> > >>
>> >> > >> Bruce
>> >> > >>
>> >> > >>>
>> >> > >>> So yes, we could do the same. I'm sure there will be other recipes
>> >> > >>> people want to preserve for other reasons. Where do we draw the 
>> >> > >>> line?
>> >> > 

Re: [OE-core] [PATCH] make-mod-scripts: preserve libraries when rm_work is used

2023-04-27 Thread Jose Quaresma
Hi Bruce,

I have been testing your patch and have some comments.
In some of my kernels I don't have the pkg-config changes and so I have
some fails linking the scripts/sign-file
because for static linking with the libcrypto we need the -ldl -pthread.

To fix my build I need to override the CRYPTO_LIBS in my kernel because
they use the hardcoded pkg-config
where it is not possible to pass the --static argument.

With following change on top of your patch I can build moist of my kernels:

export HOSTLDFLAGS="-lz"

+   HOSTPKG_CONFIG="pkg-config --static"
+   # override CRYPTO_LIBS since HOSTPKG_CONFIG lands only in v5.19-rc1
+   #
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d5ea4fece4508bf8e72b659cd22fa4840d8d61e5
+   CRYPTO_LIBS="$(pkg-config --static --libs libcrypto 2>/dev/null ||
echo -lcrypto)"
+
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
for t in prepare scripts_basic scripts; do
oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
AR="${KERNEL_AR}" OBJCOPY="${KERNEL_OBJCOPY}" \
-   HOSTPKG_CONFIG="pkg-config --static" \
+   HOSTPKG_CONFIG="${HOSTPKG_CONFIG}"
CRYPTO_LIBS="${CRYPTO_LIBS}" \
-C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} $t
done


I think belive that the LIBELF_LIBS needs the same fix for the cases where
HOSTPKG_CONFIG is not available.
Also I think there is a typo in the LIBELF_LIBS because you first populate
it with pkg-config but on the export the variable is redefined
with the HOST_LIBELF_LIBS. I made a litle change too on that:

# for pre-5.15 kernels
-   LIBELF_LIBS=$(pkg-config libelf --libs 2>/dev/null || echo -lelf)
-   export LIBELF_LIBS="$HOST_LIBELF_LIBS -lz"
+   LIBELF_LIBS=$(pkg-config --static libelf --libs 2>/dev/null || echo
-lelf)
+   export LIBELF_LIBS="$LIBELF_LIBS -lz"
export HOSTLDFLAGS="-lz"

Thanks for you help.

Jose

Bruce Ashfield  escreveu no dia segunda,
24/04/2023 à(s) 20:25:

> On Mon, Apr 24, 2023 at 6:30 AM Jose Quaresma 
> wrote:
> >
> >
> >
> > Bruce Ashfield  escreveu no dia domingo,
> 23/04/2023 à(s) 20:55:
> >>
> >> On Sat, Apr 22, 2023 at 9:06 AM Christoph Lauer
> >>  wrote:
> >> >
> >> > Am 21.04.23 um 22:28 schrieb Bruce Ashfield:
> >> > > On Wed, Apr 19, 2023 at 11:03 PM Bruce Ashfield via
> >> > > lists.openembedded.org
> >> > >  wrote:
> >> > >>
> >> > >> On Wed, Apr 19, 2023 at 6:54 PM Richard Purdie
> >> > >>  wrote:
> >> > >>>
> >> > >>> On Wed, 2023-04-19 at 23:34 +0100, Jose Quaresma wrote:
> >> >  Hi,
> >> > 
> >> >  Not related with the previous discussion but just for
> >> >  your information.
> >> >  The rm_work.bbclass has an exception for the kernel recipes [1].
> >> >  So I don't understand why we can't do the same for the make-mod-
> >> >  scripts
> >> >  who is the twin brother of all these kernel recipes.
> >> > 
> >> >  [1]
> >> > 
> https://git.openembedded.org/openembedded-core/tree/meta/classes/rm_work.bbclass#n168
> >> > >>>
> >> > >>> Ideally we wouldn't be doing this for the kernel recipes.
> >> > >>>
> >> > >>> There is also a big difference to that and the proposed patch. The
> >> > >>> proposed patch was preserving a specific directory rather than an
> >> > >>> entire recipe. Removing the task stamps but leaving a small piece
> of
> >> > >>> WORKDIR is quite different to preserving WORKDIR and STAMPS for a
> >> > >>> specific recipe. The former is not tested and will break things.
> The
> >> > >>> latter is better tolerated by bitbake.
> >> > >>
> >> > >> Agreed.
> >> > >>
> >> > >> Plus, I am working on this now.
> >> > >>
> >> > >> I have static linking of the scripts/tools working, but what I
> haven't
> >> > >> figured out is how to do that without patching the Makefiles.
> >> > >>
> >> > >
> >> > > It turned out to be quite the battle to get older kernels what was
> >> > > required for static linking of the tools.
> >> > >
> >> > > Attached is my WIP patch. I'm out of the office early next week, but
> >> > > will revisit it once I'm back.
> >> > >
> >> > > Bruce
> >> > >
> >> > >> Next up will be some rpath trickery.
> >> > >>
> >> > >> Bruce
> >> > >>
> >> > >>>
> >> > >>> So yes, we could do the same. I'm sure there will be other recipes
> >> > >>> people want to preserve for other reasons. Where do we draw the
> line?
> >> > >>> We could preserve everything and drop rm_work, then we wouldn't
> have
> >> > >>> these problems? :)
> >> > >>>
> >> > >>> Cheers,
> >> > >>>
> >> > >>> Richard
> >> > >>
> >> > >>
> >> > >>
> >> > >> --
> >> > >> - Thou shalt not follow the NULL pointer, for chaos and madness
> await
> >> > >> thee at its end
> >> > >> - "Use the force Harry" - Gandalf, Star Trek II
> >> > >>
> >> > >> 
> >> > >>
> >> > >
> >> > >
> >> >
> >> > Thank you for your work, I see you put some time and effort into it.
> >> > HOSTPKG_CONFIG is, as you mentioned, available since 

Re: [OE-core] [PATCH] gcc: Upgrade to GCC 13.1 release

2023-04-27 Thread Richard Purdie
On Thu, 2023-04-27 at 11:52 -0700, Khem Raj wrote:
> > - Package libhwasan_preinit.o, its available on some arches e.g. x86_64 on
> >   gcc13+
> > - GCC 13 Porting guide [1] and major changes [2] and detailed documentation 
> > [3]
> > - Fix aarch64 cross build when S != B
> > 
> > [1] https://www.gnu.org/software/gcc/gcc-13/porting_to.html
> > [2] https://www.gnu.org/software/gcc/gcc-13/changes.html
> > [3] https://gcc.gnu.org/onlinedocs/13.1.0/
> > 
> > Signed-off-by: Khem Raj 

Doesn't this need the prefix mapping parameter changes to bitbake.conf
since one of the patches did merge but was altered by upstream?

Cheers,

Richard



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180500): 
https://lists.openembedded.org/g/openembedded-core/message/180500
Mute This Topic: https://lists.openembedded.org/mt/98543627/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] license.bbclass: Include LICENSE in the output when it fails to parse

2023-04-27 Thread Peter Kjellerstedt
Signed-off-by: Peter Kjellerstedt 
---
 meta/classes-global/license.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes-global/license.bbclass 
b/meta/classes-global/license.bbclass
index 560acb8b6f..23625f0104 100644
--- a/meta/classes-global/license.bbclass
+++ b/meta/classes-global/license.bbclass
@@ -229,7 +229,7 @@ def find_license_files(d):
 bb.fatal('%s: %s' % (d.getVar('PF'), exc))
 except SyntaxError:
 oe.qa.handle_error("license-syntax",
-"%s: Failed to parse it's LICENSE field." % (d.getVar('PF')), d)
+"%s: Failed to parse LICENSE: %s" % (d.getVar('PF'), 
d.getVar('LICENSE')), d)
 # Add files from LIC_FILES_CHKSUM to list of license files
 lic_chksum_paths = defaultdict(OrderedDict)
 for path, data in sorted(lic_chksums.items()):

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180499): 
https://lists.openembedded.org/g/openembedded-core/message/180499
Mute This Topic: https://lists.openembedded.org/mt/98543807/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] gcc: Upgrade to GCC 13.1 release

2023-04-27 Thread Khem Raj
- Package libhwasan_preinit.o, its available on some arches e.g. x86_64 on
  gcc13+
- GCC 13 Porting guide [1] and major changes [2] and detailed documentation [3]
- Fix aarch64 cross build when S != B

[1] https://www.gnu.org/software/gcc/gcc-13/porting_to.html
[2] https://www.gnu.org/software/gcc/gcc-13/changes.html
[3] https://gcc.gnu.org/onlinedocs/13.1.0/

Signed-off-by: Khem Raj 
---
 meta/conf/distro/include/maintainers.inc  |  2 +-
 meta/conf/distro/include/tcmode-default.inc   |  2 +-
 .../gcc/{gcc-12.2.inc => gcc-13.1.inc}| 25 ++---
 ...ian_12.2.bb => gcc-cross-canadian_13.1.bb} |  0
 .../{gcc-cross_12.2.bb => gcc-cross_13.1.bb}  |  0
 ...-crosssdk_12.2.bb => gcc-crosssdk_13.1.bb} |  0
 ...cc-runtime_12.2.bb => gcc-runtime_13.1.bb} |  0
 meta/recipes-devtools/gcc/gcc-sanitizers.inc  |  1 +
 ...itizers_12.2.bb => gcc-sanitizers_13.1.bb} |  0
 ...{gcc-source_12.2.bb => gcc-source_13.1.bb} |  0
 ...0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch | 10 +-
 .../0002-gcc-poison-system-directories.patch  | 96 ---
 .../gcc/gcc/0003-64-bit-multilib-hack.patch   | 51 ++
 ...R_BUILD-in-a-couple-of-places-to-avo.patch | 14 +--
 ...ts.h-in-B-instead-of-S-and-t-oe-in-B.patch | 24 ++---
 .../gcc/gcc/0006-cpp-honor-sysroot.patch  | 14 +--
 ...AMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch | 54 +--
 .../gcc/gcc/0008-libtool.patch|  5 +-
 ...s-fix-v4bx-to-linker-to-support-EABI.patch |  9 +-
 ...-config-files-from-B-instead-of-usin.patch | 14 +--
 ...1-aarch64-Fix-include-paths-when-S-B.patch | 55 +++
 ...r-from-.la-which-usually-points-to-.patch} |  2 +-
 ...e-target-gcc-headers-can-be-included.patch | 22 ++---
 ...t-directory-during-relink-if-inst_pr.patch |  2 +-
 ...-fix-libcc1-s-install-path-and-rpath.patch |  4 +-
 ...le-sysroot-support-for-nativesdk-gcc.patch | 56 ++-
 ...sroot-gcc-version-specific-dirs-with.patch | 11 ++-
 ...d-to-link-commandline-for-musl-targe.patch | 10 +-
 ...Re-introduce-spe-commandline-options.patch |  6 +-
 ...as-for-__cpu_indicator_init-instead-.patch |  8 +-
 ...s-Do-not-use-__LINE__-for-maintainin.patch | 38 
 ...mic-Do-not-enforce-march-on-aarch64.patch} | 16 ++--
 ... 0023-Fix-install-path-of-linux64.h.patch} |  6 +-
 ...ardcoded-build-paths-into-ppc-libgcc.patch | 28 ++
 .../gcc/gcc/0026-rust-recursion-limit.patch   | 92 --
 .../gcc/gcc/hardcoded-paths.patch | 19 
 .../gcc/gcc/prefix-map-realpath.patch | 64 -
 .../gcc/{gcc_12.2.bb => gcc_13.1.bb}  |  0
 ...initial_12.2.bb => libgcc-initial_13.1.bb} |  0
 .../gcc/{libgcc_12.2.bb => libgcc_13.1.bb}|  0
 ...ibgfortran_12.2.bb => libgfortran_13.1.bb} |  0
 41 files changed, 337 insertions(+), 423 deletions(-)
 rename meta/recipes-devtools/gcc/{gcc-12.2.inc => gcc-13.1.inc} (84%)
 rename meta/recipes-devtools/gcc/{gcc-cross-canadian_12.2.bb => 
gcc-cross-canadian_13.1.bb} (100%)
 rename meta/recipes-devtools/gcc/{gcc-cross_12.2.bb => gcc-cross_13.1.bb} 
(100%)
 rename meta/recipes-devtools/gcc/{gcc-crosssdk_12.2.bb => 
gcc-crosssdk_13.1.bb} (100%)
 rename meta/recipes-devtools/gcc/{gcc-runtime_12.2.bb => gcc-runtime_13.1.bb} 
(100%)
 rename meta/recipes-devtools/gcc/{gcc-sanitizers_12.2.bb => 
gcc-sanitizers_13.1.bb} (100%)
 rename meta/recipes-devtools/gcc/{gcc-source_12.2.bb => gcc-source_13.1.bb} 
(100%)
 create mode 100644 
meta/recipes-devtools/gcc/gcc/0011-aarch64-Fix-include-paths-when-S-B.patch
 rename 
meta/recipes-devtools/gcc/gcc/{0011-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
 => 0012-Avoid-using-libdir-from-.la-which-usually-points-to-.patch} (92%)
 rename 
meta/recipes-devtools/gcc/gcc/{0023-libatomic-Do-not-enforce-march-on-aarch64.patch
 => 0022-libatomic-Do-not-enforce-march-on-aarch64.patch} (81%)
 rename meta/recipes-devtools/gcc/gcc/{0024-Fix-install-path-of-linux64.h.patch 
=> 0023-Fix-install-path-of-linux64.h.patch} (85%)
 create mode 100644 
meta/recipes-devtools/gcc/gcc/0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch
 delete mode 100644 
meta/recipes-devtools/gcc/gcc/0026-rust-recursion-limit.patch
 delete mode 100644 meta/recipes-devtools/gcc/gcc/hardcoded-paths.patch
 delete mode 100644 meta/recipes-devtools/gcc/gcc/prefix-map-realpath.patch
 rename meta/recipes-devtools/gcc/{gcc_12.2.bb => gcc_13.1.bb} (100%)
 rename meta/recipes-devtools/gcc/{libgcc-initial_12.2.bb => 
libgcc-initial_13.1.bb} (100%)
 rename meta/recipes-devtools/gcc/{libgcc_12.2.bb => libgcc_13.1.bb} (100%)
 rename meta/recipes-devtools/gcc/{libgfortran_12.2.bb => libgfortran_13.1.bb} 
(100%)

diff --git a/meta/conf/distro/include/maintainers.inc 
b/meta/conf/distro/include/maintainers.inc
index 66f8eb6af3..a523148e2f 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -189,7 +189,7 @@ 
RECIPE_MAINTAINER:pn-gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "Khem Raj 

Re: [OE-core] [dunfell][PATCH 2/3] lcov: Upgrade 1.14 -> 1.16

2023-04-27 Thread Steve Sakoman
On Wed, Apr 26, 2023 at 8:43 AM Steve Sakoman via
lists.openembedded.org 
wrote:
>
> I can take version updates in an LTS branch if they contain only bug
> and security fixes.

I just noticed that this is a patch for meta-oe not oe-core.

My comment on version bump policy still applies, but you should be
sending meta-oe patches to the correct list:
openembedded-de...@lists.openembedded.org

Steve


> Can you confirm that this is the case for the 1.14 -> 1.15 -> 1.16
> version bumps?
>
> In the future including this information in the commit message will
> speed things along!
>
> Thanks!
>
> Steve
>
> On Wed, Apr 26, 2023 at 8:06 AM alexyao1 via lists.openembedded.org
>  wrote:
> >
> > From: Alex Yao 
> >
> > This upgrades lcov to 1.16 and removes backported patches which are
> > now included since 1.15. This also removes dependencies added from
> > backported patches since the new version removes the need for these
> > dependencies.
> >
> > Signed-off-by: Alex Yao 
> > Signed-off-by: Khem Raj 
> > ---
> >  ...Add-intermediate-text-format-support.patch | 898 --
> >  ...Add-intermediate-JSON-format-support.patch | 247 -
> >  .../lcov/{lcov_1.14.bb => lcov_1.16.bb}   |  16 +-
> >  3 files changed, 4 insertions(+), 1157 deletions(-)
> >  delete mode 100644 
> > meta-oe/recipes-support/lcov/files/0001-geninfo-Add-intermediate-text-format-support.patch
> >  delete mode 100644 
> > meta-oe/recipes-support/lcov/files/0002-geninfo-Add-intermediate-JSON-format-support.patch
> >  rename meta-oe/recipes-support/lcov/{lcov_1.14.bb => lcov_1.16.bb} (78%)
> >
> > diff --git 
> > a/meta-oe/recipes-support/lcov/files/0001-geninfo-Add-intermediate-text-format-support.patch
> >  
> > b/meta-oe/recipes-support/lcov/files/0001-geninfo-Add-intermediate-text-format-support.patch
> > deleted file mode 100644
> > index 9ac0770f96..00
> > --- 
> > a/meta-oe/recipes-support/lcov/files/0001-geninfo-Add-intermediate-text-format-support.patch
> > +++ /dev/null
> > @@ -1,898 +0,0 @@
> > -From ec3e1f411c332cbc2f2bc7ab7e2175ebf918b37a Mon Sep 17 00:00:00 2001
> > -From: Peter Oberparleiter 
> > -Date: Fri, 24 May 2019 16:56:52 +0200
> > -Subject: [PATCH 1/2] geninfo: Add intermediate text format support
> > -
> > -This change adds support for parsing the output of gcov's intermediate
> > -text file format as implemented by GCC versions 5 to 8.  The use of the
> > -gcov intermediate format should increase processing speed. It also
> > -provides branch coverage data when using the --initial command line
> > -option.
> > -
> > -Users can control whether geninfo uses the intermediate format via the
> > -geninfo_intermediate configuration file option. Valid values are:
> > -
> > - 0: Use normal text format
> > - 1: Use intermediate format
> > -  auto: Use intermediate format if available. This is the default.
> > -
> > -Signed-off-by: Peter Oberparleiter 
> > 
> > - bin/geninfo  | 567 ---
> > - lcovrc   |   3 +
> > - man/lcovrc.5 |  24 +++
> > - 3 files changed, 521 insertions(+), 73 deletions(-)
> > -
> > -Upstream-Status: Backport
> > -Download URL: 
> > https://github.com/linux-test-project/lcov/commit/ebfeb3e179e450c69c3532f98cd5ea1fbf6ccba7
> > -
> > -diff --git a/bin/geninfo b/bin/geninfo
> > -index f41eaec..027 100755
> >  a/bin/geninfo
> > -+++ b/bin/geninfo
> > -@@ -54,6 +54,8 @@ use warnings;
> > - use File::Basename;
> > - use File::Spec::Functions qw /abs2rel catdir file_name_is_absolute 
> > splitdir
> > - splitpath catpath/;
> > -+use File::Temp qw(tempfile tempdir);
> > -+use File::Copy qw(copy);
> > - use Getopt::Long;
> > - use Digest::MD5 qw(md5_base64);
> > - use Cwd qw/abs_path/;
> > -@@ -163,13 +165,13 @@ sub solve_relative_path($$);
> > - sub read_gcov_header($);
> > - sub read_gcov_file($);
> > - sub info(@);
> > -+sub process_intermediate($$$);
> > - sub map_llvm_version($);
> > - sub version_to_str($);
> > - sub get_gcov_version();
> > - sub system_no_output($@);
> > - sub read_config($);
> > - sub apply_config($);
> > --sub get_exclusion_data($);
> > - sub apply_exclusion_data($$);
> > - sub process_graphfile($$);
> > - sub filter_fn_name($);
> > -@@ -264,6 +266,8 @@ our $gcno_split_crc;
> > - our $func_coverage = 1;
> > - our $br_coverage = 0;
> > - our $rc_auto_base = 1;
> > -+our $rc_intermediate = "auto";
> > -+our $intermediate;
> > - our $excl_line = "LCOV_EXCL_LINE";
> > - our $excl_br_line = "LCOV_EXCL_BR_LINE";
> > -
> > -@@ -331,6 +335,7 @@ if ($config || %opt_rc)
> > -   "geninfo_compat"=> \$opt_compat,
> > -   "geninfo_adjust_src_path"   => \$rc_adjust_src_path,
> > -   "geninfo_auto_base" => \$rc_auto_base,
> > -+  "geninfo_intermediate"  => \$rc_intermediate,
> > -   "lcov_function_coverage"=> \$func_coverage,
> > -   "lcov_branch_coverage"  => 

[OE-core] [PATCHV4 3/3] zvariant: add ptest feature for zvariant test suite

2023-04-27 Thread Frederic Martinsons
From: Frederic Martinsons 

Below is the output of run-ptest script under qemu

root@qemux86-64:~# /usr/lib/zvariant/ptest/run-ptest

running 37 tests
test framing_offset_size::tests::framing_offset_size_bump ... ok$<2>
test owned_value::tests::from_value ... ok$<2>
test object_path::unit::owned_from_reader ... ok$<2>
test str::tests::from_string ... ok$<2>
test signature::tests::signature_slicing ... ok$<2>
test str::tests::test_ordering ... ok$<2>
test owned_value::tests::map_conversion ... ok$<2>
test owned_value::tests::serde ... ok$<2>
test tests::enums ... ok$<2>
test tests::derive ... ok$<2>
test tests::f64_value ... ok$<2>
test tests::i16_value ... ok$<2>
test tests::fd_value ... ok$<2>
test tests::i32_value ... ok$<2>
test tests::i8_value ... ok$<2>
test tests::i64_value ... ok$<2>
test tests::ip_addr ... ok$<2>
test tests::issue_59 ... ok$<2>
test tests::issue_99 ... ok$<2>
test tests::array_value ... ok$<2>
test tests::object_path_value ... ok$<2>
test tests::dict_value ... ok$<2>
test tests::signature_value ... ok$<2>
test tests::serialized_size ... ok$<2>
test tests::struct_byte_array ... ok$<2>
test tests::struct_ref ... ok$<2>
test tests::str_value ... ok$<2>
test tests::option_value ... ok$<2>
test tests::struct_value ... ok$<2>
test tests::struct_with_hashmap ... ok$<2>
test tests::u16_value ... ok$<2>
test tests::u32_value ... ok$<2>
test tests::unit ... ok$<2>
test tests::u8_value ... ok$<2>
test tests::unit_fds ... ok$<2>
test tests::value_value ... ok$<2>
test tests::recursion_limits ... ok$<2>

test result: ok$<2>. 37 passed; 0 failed; 0 ignored; 0 measured; 0 filtered 
out; finished in 0.21s

root@qemux86-64:~#

Signed-off-by: Frederic Martinsons 
---
 .../recipes-extended/zvariant/zvariant_3.12.0.bb | 9 -
 meta/lib/oeqa/selftest/cases/devtool.py  | 2 +-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/meta-selftest/recipes-extended/zvariant/zvariant_3.12.0.bb 
b/meta-selftest/recipes-extended/zvariant/zvariant_3.12.0.bb
index 4285d11b72..36f2a07ecf 100644
--- a/meta-selftest/recipes-extended/zvariant/zvariant_3.12.0.bb
+++ b/meta-selftest/recipes-extended/zvariant/zvariant_3.12.0.bb
@@ -7,6 +7,8 @@ HOMEPAGE = "https://gitlab.freedesktop.org/dbus/zbus/;
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=b377b220f43d747efdec40d69fcaa69d"
 
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'glib-2.0', '', 
d)}"
+
 SRC_URI = " \
 
git://gitlab.freedesktop.org/dbus/zbus;protocol=https;branch=main;subpath=zvariant
 \
 file://0001-Tweak-zvariant-crate-config.patch;striplevel=2 \
@@ -21,10 +23,15 @@ python do_clean_lic_file_symlink() {
 
 addtask clean_lic_file_symlink after do_unpack before do_patch
 
-inherit cargo cargo-update-recipe-crates
+inherit ptest-cargo pkgconfig cargo-update-recipe-crates
 
 # Remove this when the recipe is reproducible
 EXCLUDE_FROM_WORLD = "1"
 
 require ${BPN}-crates.inc
 require ${BPN}-git-crates.inc
+
+# zvariant is an indermediate product for the zbus project
+# and so, it provided only a static lib (rlib) which fall only
+# in -dev package
+ALLOW_EMPTY:${PN} = "1"
diff --git a/meta/lib/oeqa/selftest/cases/devtool.py 
b/meta/lib/oeqa/selftest/cases/devtool.py
index 94873fd19f..1896944250 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -876,7 +876,7 @@ class DevtoolModifyTests(DevtoolBase):
 self.assertTrue(any([uri.startswith('file://') and '.patch' in uri for 
uri in src_uri]),
 'This test expects the %s recipe to have a patch in 
its src uris' % testrecipe)
 
-self._test_recipe_contents(recipefile, {}, ['cargo'])
+self._test_recipe_contents(recipefile, {}, ['ptest-cargo'])
 
 # Clean up anything in the workdir/sysroot/sstate cache
 bitbake('%s -c cleansstate' % testrecipe)
-- 
2.34.1


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



[OE-core] [PATCHV4 2/3] python3-bcrypt: enable build of unit tests

2023-04-27 Thread Frederic Martinsons
From: Frederic Martinsons 

The source code of bcrypt extension doesn't define any tests
but it is to show the ptest-cargo usage

Below is the updated test suite output for the recipe (cut):

PASS: 
tests/test_bcrypt.py:test_invalid_params[password-$2b$04$cVWp4XaNU8a4v1uMRum2SO-513-10-ValueError]
PASS: 
tests/test_bcrypt.py:test_invalid_params[password-$2b$04$cVWp4XaNU8a4v1uMRum2SO-20-0-ValueError]
PASS: tests/test_bcrypt.py:test_2a_wraparound_bug

Testsuite summary

running 0 tests

test result: ok$<2>. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; 
finished in 0.01s

root@qemux86-64:/usr/lib/python3-bcrypt/ptest#

Signed-off-by: Frederic Martinsons 
---
 meta/recipes-devtools/python/python3-bcrypt_4.0.1.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/python/python3-bcrypt_4.0.1.bb 
b/meta/recipes-devtools/python/python3-bcrypt_4.0.1.bb
index 21f2eb6ba4..b4f245530d 100644
--- a/meta/recipes-devtools/python/python3-bcrypt_4.0.1.bb
+++ b/meta/recipes-devtools/python/python3-bcrypt_4.0.1.bb
@@ -7,12 +7,14 @@ DEPENDS += "${PYTHON_PN}-cffi-native"
 
 SRC_URI[sha256sum] = 
"27d375903ac8261cfe4047f6709d16f7d18d39b1ec92aaf72af989552a650ebd"
 
-inherit pypi python_setuptools3_rust ptest cargo-update-recipe-crates
+inherit pypi python_setuptools3_rust ptest-cargo cargo-update-recipe-crates
 
 SRC_URI += " \
file://run-ptest \
 "
 
+CARGO_SRC_DIR = "src/_bcrypt"
+
 require ${BPN}-crates.inc
 
 RDEPENDS:${PN}-ptest += " \
-- 
2.34.1


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



[OE-core] [PATCHV4 0/3] Create class for building rust unit test

2023-04-27 Thread Frederic Martinsons
From: Frederic Martinsons 

This brings the possibility to use this class to build and ship
unit tests of rust projects, the class also create (or modified)
standard run-ptest script to run the generated rust test suite.

It has been tested successfully with core-image-sato under qemu
for zvariant-ptest and python3-bcrypt-ptest (though the last one
didn't define any unit tests).

Note that I tried to do the same with python3-cryptography but fail
to build the test suite and I don't know how to do it with the rust
extension module build by python setuptools. There must be some kind
of way for doing that so maybe someone will put some work in it (
because python3-cryptography rust extension do have unit tests).

Moreover, in the ptest-cargo class, I didn't manage to share data between
do_compile_ptest_cargo and do_install_ptest_cargo cleanly (I tried
to d.setVar in compile and d.getVar in install but it seems that
the data store doens't recognize my new variable) so I used a file
for that. I'm sure there is a clever way for doing that, so feel
free to tell me.

The following changes since commit 45a8bb6e4676899d40525e7d5ad1c1ddefee3185:

  apt-util: Fix ptest on musl (2023-04-20 11:56:03 +0100)

are available in the Git repository at:

  https://gitlab.com/fmartinsons/openembedded-core cargo-add-ptest

Frederic Martinsons (3):
  ptest-cargo.bbclass: create class
  python3-bcrypt: enable build of unit tests
  zvariant: add ptest feature for zvariant test suite

 .../zvariant/zvariant_3.12.0.bb   |   9 +-
 meta/classes-recipe/ptest-cargo.bbclass   | 130 ++
 meta/lib/oeqa/selftest/cases/devtool.py   |   2 +-
 .../python/python3-bcrypt_4.0.1.bb|   4 +-
 4 files changed, 142 insertions(+), 3 deletions(-)
 create mode 100644 meta/classes-recipe/ptest-cargo.bbclass

-- 
2.34.1


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



[OE-core] [PATCHV4 1/3] ptest-cargo.bbclass: create class

2023-04-27 Thread Frederic Martinsons
From: Frederic Martinsons 

This new class offers the possibility to build rust unit tests
(and integration tests) and find them correctly.
Due to non deterministic names of generated binaries, a custom
parsing of build result must be performed.
See https://github.com/rust-lang/cargo/issues/1924

All rust projects will generate a test binary with "cargo build --tests"
command, even if there are no test defined in source code.
The binary will just output that it ran 0 tests.

Signed-off-by: Frederic Martinsons 
---
 meta/classes-recipe/ptest-cargo.bbclass | 130 
 1 file changed, 130 insertions(+)
 create mode 100644 meta/classes-recipe/ptest-cargo.bbclass

diff --git a/meta/classes-recipe/ptest-cargo.bbclass 
b/meta/classes-recipe/ptest-cargo.bbclass
new file mode 100644
index 00..f28bc7a826
--- /dev/null
+++ b/meta/classes-recipe/ptest-cargo.bbclass
@@ -0,0 +1,130 @@
+inherit cargo ptest
+
+# I didn't find a cleaner way to share data between compile and install tasks
+CARGO_TEST_BINARIES_FILES ?= "${B}/test_binaries_list"
+
+# Sadly, generated test binaries have no deterministic names 
(https://github.com/rust-lang/cargo/issues/1924)
+# This forces us to parse the cargo output in json format to find those test 
binaries.
+python do_compile_ptest_cargo() {
+import subprocess
+import json
+
+cargo = bb.utils.which(d.getVar("PATH"), d.getVar("CARGO", True))
+cargo_build_flags = d.getVar("CARGO_BUILD_FLAGS", True)
+rust_flags = d.getVar("RUSTFLAGS", True)
+manifest_path = d.getVar("MANIFEST_PATH", True)
+
+env = os.environ.copy()
+env['RUSTFLAGS'] = rust_flags
+cmd = f"{cargo} build --tests --message-format json {cargo_build_flags}"
+bb.note(f"Building tests with cargo ({cmd})")
+
+try:
+proc = subprocess.Popen(cmd, shell=True, env=env, 
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+except subprocess.CalledProcessError as e:
+bb.fatal(f"Cannot build test with cargo: {e}")
+
+lines = []
+for line in proc.stdout:
+data = line.decode('utf-8').strip('\n')
+lines.append(data)
+bb.note(data)
+proc.communicate()
+if proc.returncode != 0:
+bb.fatal(f"Unable to compile test with cargo, '{cmd}' failed")
+
+# Definition of the format: 
https://doc.rust-lang.org/cargo/reference/external-tools.html#json-messages
+test_bins = []
+for line in lines:
+try:
+data = json.loads(line)
+except json.JSONDecodeError:
+# skip lines that are not a json
+pass
+else:
+try:
+# Filter the test packages coming from the current manifest
+current_manifest_path = os.path.normpath(data['manifest_path'])
+project_manifest_path = os.path.normpath(manifest_path)
+if current_manifest_path == project_manifest_path:
+if data['target']['test'] or data['target']['doctest'] and 
data['executable']:
+test_bins.append(data['executable'])
+except KeyError as e:
+# skip lines that do not meet the requirements
+pass
+
+# All rust project will generate at least one unit test binary
+# It will just run a test suite with 0 tests, if the project didn't define 
some
+# So it is not expected to have an empty list here
+if not test_bins:
+bb.fatal("Unable to find any test binaries")
+
+cargo_test_binaries_file = d.getVar('CARGO_TEST_BINARIES_FILES', True)
+bb.note(f"Found {len(test_bins)} tests, write their paths into 
{cargo_test_binaries_file}")
+with open(cargo_test_binaries_file, "w") as f:
+for test_bin in test_bins:
+f.write(f"{test_bin}\n")
+
+}
+
+python do_install_ptest_cargo() {
+import shutil
+
+dest_dir = d.getVar("D", True)
+pn = d.getVar("PN", True)
+ptest_path = d.getVar("PTEST_PATH", True)
+cargo_test_binaries_file = d.getVar('CARGO_TEST_BINARIES_FILES', True)
+
+ptest_dir = os.path.join(dest_dir, ptest_path.lstrip('/'))
+os.makedirs(ptest_dir, exist_ok=True)
+
+test_bins = []
+with open(cargo_test_binaries_file, "r") as f:
+for line in f.readlines():
+test_bins.append(line.strip('\n'))
+
+test_paths = []
+for test_bin in test_bins:
+shutil.copy2(test_bin, ptest_dir)
+test_paths.append(os.path.join(ptest_path, os.path.basename(test_bin)))
+
+ptest_script = os.path.join(ptest_dir, "run-ptest")
+if os.path.exists(ptest_script):
+with open(ptest_script, "a") as f:
+f.write(f"\necho \"\"\n")
+f.write(f"echo \"## starting to run rust tests ##\"\n")
+for test_path in test_paths:
+f.write(f"{test_path}\n")
+else:
+with open(ptest_script, "a") as f:
+f.write("#!/bin/sh\n")
+for test_path in test_paths:
+

Re: [OE-core] [PATCHV3 1/3] ptest-cargo.bbclass: create class

2023-04-27 Thread Frederic Martinsons
Le jeu. 27 avr. 2023, 07:21,  a écrit :

> From: Frederic Martinsons 
>
> This new class offer the capbility to build rust tests and
> find them correctly.
> Due to non deterministic name of generated binaries, a custom
> parsing of build result must be performed.
> See https://github.com/rust-lang/cargo/issues/1924
>
> All rust project will generate a test binary even if there are
> not test defined in source code (the binary will just output
> that it ran 0 tests)
>
> Signed-off-by: Frederic Martinsons 
> ---
>  meta/classes-recipe/ptest-cargo.bbclass | 129 
>  1 file changed, 129 insertions(+)
>  create mode 100644 meta/classes-recipe/ptest-cargo.bbclass
>
> diff --git a/meta/classes-recipe/ptest-cargo.bbclass
> b/meta/classes-recipe/ptest-cargo.bbclass
> new file mode 100644
> index 00..f26d4225d3
> --- /dev/null
> +++ b/meta/classes-recipe/ptest-cargo.bbclass
> @@ -0,0 +1,129 @@
> +inherit cargo ptest
> +
> +CARGO_TEST_BINARIES_FILES ?= "${B}/test_binaries_list"
> +
> +# sadly generated test binary have no deterministic names (
> https://github.com/rust-lang/cargo/issues/1924)
> +# which force us to parse the cargo output in json format to find those
> test binaries
> +python do_compile_ptest_cargo() {
> +import subprocess
> +import json
> +
> +cargo = bb.utils.which(d.getVar("PATH"), d.getVar("CARGO", True))
> +cargo_build_flags = d.getVar("CARGO_BUILD_FLAGS", True)
> +rust_flags = d.getVar("RUSTFLAGS", True)
> +manifest_path = d.getVar("MANIFEST_PATH", True)
> +
> +env = os.environ.copy()
> +env['RUSTFLAGS'] = rust_flags
> +cmd = f"{cargo} build --tests --message-format json
> {cargo_build_flags}"
> +bb.note(f"Building tests with cargo ({cmd})")
> +
> +try:
> +proc = subprocess.Popen(cmd, shell=True, env=env,
> stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
> +except subprocess.CalledProcessError as e:
> +bb.fatal(f"Cannot build test with cargo: {e}")
> +
> +lines = []
> +for line in proc.stdout:
> +data = line.decode('utf-8').strip('\n')
> +lines.append(data)
> +bb.note(data)
> +proc.communicate()
> +if proc.returncode != 0:
> +bb.fatal(f"Unable to compile test with cargo, '{cmd}' failed")
> +
> +# Definition of the format:
> https://doc.rust-lang.org/cargo/reference/external-tools.html#json-messages
> +test_bins = []
> +for line in lines:
> +try:
> +data = json.loads(line)
> +except json.JSONDecodeError:
> +# skip lines that are not a json
> +pass
> +else:
> +try:
> +# Filter the test packages coming from the current
> manifest
> +current_manifest_path =
> os.path.normpath(data['manifest_path'])
> +project_manifest_path = os.path.normpath(manifest_path)
> +if current_manifest_path == project_manifest_path:
> +if data['target']['test'] or
> data['target']['doctest'] and data['executable']:
> +test_bins.append(data['executable'])
> +except KeyError as e:
> +# skip lines that do not meet the requirements
> +pass
> +
> +# All rust project will genrate at least one unit test binary
> +# It will just run a test suite with 0 tests if the project didn't
> define some
> +# So it is not expected to have an empty list here
> +if not test_bins:
> +bb.fatal("Unable to find any test binaries")
> +
> +cargo_test_binaries_file = d.getVar('CARGO_TEST_BINARIES_FILES', True)
> +bb.note(f"Found {len(test_bins)} tests, write their path into
> {cargo_test_binaries_file}")
> +with open(cargo_test_binaries_file, "w") as f:
> +for test_bin in test_bins:
> +f.write(f"{test_bin}\n")
> +
> +}
> +
> +python do_install_ptest_cargo() {
> +import shutil
> +
> +dest_dir = d.getVar("D", True)
> +pn = d.getVar("PN", True)
> +ptest_path = d.getVar("PTEST_PATH", True)
> +cargo_test_binaries_file = d.getVar('CARGO_TEST_BINARIES_FILES', True)
> +
> +ptest_dir = os.path.join(dest_dir, ptest_path.lstrip('/'))
> +os.makedirs(ptest_dir, exist_ok=True)
> +
> +test_bins = []
> +with open(cargo_test_binaries_file, "r") as f:
> +for line in f.readlines():
> +test_bins.append(line.strip('\n'))
> +
> +test_paths = []
> +for test_bin in test_bins:
> +shutil.copy2(test_bin, ptest_dir)
> +test_paths.append(os.path.join(ptest_path,
> os.path.basename(test_bin)))
> +
> +ptest_script = os.path.join(ptest_dir, "run-ptest")
> +if os.path.exists(ptest_script):
> +with open(ptest_script, "a") as f:
> +f.write(f"\necho \"\"\n")
> +f.write(f"echo \"## starting to run rust tests ##\"\n")
> +for test_path in test_paths:
> +f.write(f"{test_path}\n")
> +else:
> +with 

[OE-core] [meta][master][PATCH] qemu: Whitelist CVE-2023-0664

2023-04-27 Thread virendra thakur
From: Virendra Thakur 

This CVE is related to Windows.

Link: https://nvd.nist.gov/vuln/detail/CVE-2023-0664

Signed-off-by: Virendra Thakur 
---
 meta/recipes-devtools/qemu/qemu.inc | 5 +
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-devtools/qemu/qemu.inc 
b/meta/recipes-devtools/qemu/qemu.inc
index e2453dd8bc..c755d0dca3 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -54,6 +54,11 @@ CVE_CHECK_IGNORE += "CVE-2007-0998"
 # https://bugzilla.redhat.com/show_bug.cgi?id=1609015#c11
 CVE_CHECK_IGNORE += "CVE-2018-18438"
 
+# As per https://nvd.nist.gov/vuln/detail/CVE-2023-0664
+# https://bugzilla.redhat.com/show_bug.cgi?id=2167423
+# this bug related to windows specific.
+CVE_CHECK_IGNORE += "CVE-2023-0664"
+
 COMPATIBLE_HOST:mipsarchn32 = "null"
 COMPATIBLE_HOST:mipsarchn64 = "null"
 COMPATIBLE_HOST:riscv32 = "null"
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180491): 
https://lists.openembedded.org/g/openembedded-core/message/180491
Mute This Topic: https://lists.openembedded.org/mt/98533351/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] [meta][kirkstone][PATCH] qemu: Whitelist CVE-2023-0664

2023-04-27 Thread Virendra Thakur via lists.openembedded.org
please ignore this patch

From: virendra thakur 
Sent: Thursday, April 27, 2023 2:36 PM
To: openembedded-core@lists.openembedded.org 

Cc: Virendra Kumar Thakur 
Subject: [meta][kirkstone][PATCH] qemu: Whitelist CVE-2023-0664

Caution: This email originated from outside of the KPIT. Do not click links or 
open attachments unless you recognize the sender and know the content is safe.

From: Virendra Thakur 

This CVE is related to Windows.

Link: 
https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fnvd.nist.gov%2Fvuln%2Fdetail%2FCVE-2023-0664=05%7C01%7CVirendra.Thakur%40kpit.com%7C6a79de45761d49fb5d6608db46fecf4f%7C3539451eb46e4a26a242ff61502855c7%7C0%7C0%7C638181832489901831%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C=xXSAxOehMYxawXB12m6bE%2BgZY5RO6U9ABlUSDhL%2BeRo%3D=0

Signed-off-by: Virendra Thakur 
---
 meta/recipes-devtools/qemu/qemu.inc | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/qemu/qemu.inc 
b/meta/recipes-devtools/qemu/qemu.inc
index a6ee958e4b..2517fccf93 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -112,8 +112,13 @@ CVE_CHECK_IGNORE += "CVE-2007-0998"
 # 
https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.redhat.com%2Fshow_bug.cgi%3Fid%3D1609015%23c11=05%7C01%7CVirendra.Thakur%40kpit.com%7C6a79de45761d49fb5d6608db46fecf4f%7C3539451eb46e4a26a242ff61502855c7%7C0%7C0%7C638181832489901831%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C=H7T6fq5I5sFUvNSDuE9GTkAxontU9MO8O5m%2Bvoqjp1A%3D=0
 CVE_CHECK_IGNORE += "CVE-2018-18438"

-COMPATIBLE_HOST:mipsarchn32 = "null"
-COMPATIBLE_HOST:mipsarchn64 = "null"
+# As per 
https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fnvd.nist.gov%2Fvuln%2Fdetail%2FCVE-2023-0664=05%7C01%7CVirendra.Thakur%40kpit.com%7C6a79de45761d49fb5d6608db46fecf4f%7C3539451eb46e4a26a242ff61502855c7%7C0%7C0%7C638181832490058063%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C=rfqpcETziItn7gIUQX24YmfRaYDgdpjD79%2BXY8IKcOE%3D=0
+# 
https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.redhat.com%2Fshow_bug.cgi%3Fid%3D2167423=05%7C01%7CVirendra.Thakur%40kpit.com%7C6a79de45761d49fb5d6608db46fecf4f%7C3539451eb46e4a26a242ff61502855c7%7C0%7C0%7C638181832490058063%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C=ik0WJ0BmNJFP5iid0HYWobhDvZLde0SA5sUSCdjAPCU%3D=0
+# this bug related to windows specific.
+CVE_CHECK_IGNORE += "CVE-2023-0664"
+
+COMPATIBLE_HOST_mipsarchn32 = "null"
+COMPATIBLE_HOST_mipsarchn64 = "null"
 COMPATIBLE_HOST:riscv32 = "null"

 # Per 
https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.nongnu.org%2Farchive%2Fhtml%2Fqemu-devel%2F2020-09%2Fmsg03873.html=05%7C01%7CVirendra.Thakur%40kpit.com%7C6a79de45761d49fb5d6608db46fecf4f%7C3539451eb46e4a26a242ff61502855c7%7C0%7C0%7C638181832490058063%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C=P667j7d18q0rpZfx6ojcRlyZxrtQ%2Ben0uX1D3TukZ1s%3D=0
--
2.25.1

This message contains information that may be privileged or confidential and is 
the property of the KPIT Technologies Ltd. It is intended only for the person 
to whom it is addressed. If you are not the intended recipient, you are not 
authorized to read, print, retain copy, disseminate, distribute, or use this 
message or any part thereof. If you receive this message in error, please 
notify the sender immediately and delete all copies of this message. KPIT 
Technologies Ltd. does not accept any liability for virus infected mails.

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



[OE-core] [meta][kirkstone][PATCH v2] qemu: Whitelist CVE-2023-0664

2023-04-27 Thread virendra thakur
From: Virendra Thakur 

This CVE is related to Windows.

Link: https://nvd.nist.gov/vuln/detail/CVE-2023-0664

Signed-off-by: Virendra Thakur 
---
 meta/recipes-devtools/qemu/qemu.inc | 5 +
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-devtools/qemu/qemu.inc 
b/meta/recipes-devtools/qemu/qemu.inc
index a6ee958e4b..7f2b52fa88 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -112,6 +112,11 @@ CVE_CHECK_IGNORE += "CVE-2007-0998"
 # https://bugzilla.redhat.com/show_bug.cgi?id=1609015#c11
 CVE_CHECK_IGNORE += "CVE-2018-18438"
 
+# As per https://nvd.nist.gov/vuln/detail/CVE-2023-0664
+# https://bugzilla.redhat.com/show_bug.cgi?id=2167423
+# this bug related to windows specific.
+CVE_CHECK_IGNORE += "CVE-2023-0664"
+
 COMPATIBLE_HOST:mipsarchn32 = "null"
 COMPATIBLE_HOST:mipsarchn64 = "null"
 COMPATIBLE_HOST:riscv32 = "null"
-- 
2.25.1


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



[OE-core] [meta][kirkstone][PATCH] qemu: Whitelist CVE-2023-0664

2023-04-27 Thread virendra thakur
From: Virendra Thakur 

This CVE is related to Windows.

Link: https://nvd.nist.gov/vuln/detail/CVE-2023-0664

Signed-off-by: Virendra Thakur 
---
 meta/recipes-devtools/qemu/qemu.inc | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/qemu/qemu.inc 
b/meta/recipes-devtools/qemu/qemu.inc
index a6ee958e4b..2517fccf93 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -112,8 +112,13 @@ CVE_CHECK_IGNORE += "CVE-2007-0998"
 # https://bugzilla.redhat.com/show_bug.cgi?id=1609015#c11
 CVE_CHECK_IGNORE += "CVE-2018-18438"
 
-COMPATIBLE_HOST:mipsarchn32 = "null"
-COMPATIBLE_HOST:mipsarchn64 = "null"
+# As per https://nvd.nist.gov/vuln/detail/CVE-2023-0664
+# https://bugzilla.redhat.com/show_bug.cgi?id=2167423
+# this bug related to windows specific.
+CVE_CHECK_IGNORE += "CVE-2023-0664"
+
+COMPATIBLE_HOST_mipsarchn32 = "null"
+COMPATIBLE_HOST_mipsarchn64 = "null"
 COMPATIBLE_HOST:riscv32 = "null"
 
 # Per https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03873.html
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180488): 
https://lists.openembedded.org/g/openembedded-core/message/180488
Mute This Topic: https://lists.openembedded.org/mt/98533138/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] e2fsprogs: fix ptest bug for second running

2023-04-27 Thread qi...@fujitsu.com
>From db4b5e31703e4143450b1e7239b2502a89ed042a Mon Sep 17 00:00:00 2001
From: Qiu Tingting 
Date: Thu, 27 Apr 2023 15:29:14 +0800
Subject: [PATCH V1] e2fsprogs: fix ptest bug for second running

At second running, there are four new failed case:
d_loaddump f_bigalloc_badinode f_bigalloc_orphan_list f_dup_resize

The test_data.tmp is necessary, but it is deleted by run-ptest.
So it should be restored after testing.

Signed-off-by: Qiu Tingting 
---
meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest | 1 +
meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb | 3 +++
2 files changed, 4 insertions(+)

diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest 
b/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
index c97c0377e9..279923db8e 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
@@ -8,3 +8,4 @@ rm -f *.tmp
rm -f *.ok
rm -f *.failed
rm -f *.log
+cp ../data/test_data.tmp ./
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb 
b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb
index a2eb4f8f8f..87e13d744b 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb
@@ -143,4 +143,7 @@ do_install_ptest() {

install -d ${D}${PTEST_PATH}/lib
install -m 0644 ${B}/lib/config.h  ${D}${PTEST_PATH}/lib/
+
+        install -d ${D}${PTEST_PATH}/data
+        install -m 0644 ${B}/tests/test_data.tmp ${D}${PTEST_PATH}/data/
}
--
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180487): 
https://lists.openembedded.org/g/openembedded-core/message/180487
Mute This Topic: https://lists.openembedded.org/mt/98532860/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] Fix error SRCDIR when using usrmerge DISTRO_FEATURES

2023-04-27 Thread qi...@fujitsu.com
>From 3b1c081d4efffe83f3a63184450cc79bf16356dc Mon Sep 17 00:00:00 2001
From: Qiu Tingting 
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 
---
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

-=-=-=-=-=-=-=-=-=-=-=-
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/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 v4] binutils: stable 2.40 branch updates

2023-04-27 Thread Khem Raj
From: Deepthi Hemraj 

- Rebase existing patches
- Drop 0014-configure-remove-dependencies-on-gmp-and-mpfr-when-g.patch
  which is already in
- Correct packaging path to libgprofng.so
- Correct packaging
- Below commits on binutils-2.40 stable branch are updated.

4671be001eb Updated Hungarian translation for the gprof directory
ded035f913e lto: Don't add indirect symbols for versioned aliases in IR
74cb2ddeabc gas: arm: Change warning message to not reference specific A-class 
architecture revision
570b9c09bbf gas: arm: Fix a further IT-predicated vcvt issue in the presense of 
MVE vcvtn
bddd62e188c libctf: get the offsets of fields of unnamed structs/unions right
7aa47eafcce libctf: fix assertion failure with no system qsort_r
165accf0752 coff_get_normalized_symtab bfd_release
af35798e957 PR30217, dynamic relocations using local dynamic symbols
18bb604f1e1 PR30198, Assertion and segfault when linking x86_64 elf and coff
34a2b4a0e21 PR30155, ld segfault in _bfd_nearby_section
3d0046f39aa PR30046, power cmpi leads to unknown architecture
5c87fb1d59b ppc32 and "LOAD segment with RWX permissions"
11f5c1ebf14 Updated Serbian translations for gold, gprof and opcodes 
sub-directories
38e455b1d9a Updated translations for the bfd and gprof directories.
b2bc62b7b4e gas: correct symbol name comparison in .startof./.sizeof. handling
17294931e3e configure: remove dependencies on gmp and mpfr when gdb is disabled
1fc096a4c59 Regen config files
e1815414077 Pass $JANSSON_LIBS and $ZSTD_LIBS to ld-bootstrap/bootrap.exp
3e888977f16 bpf: fix error conversion from long unsigned int to unsigned int 
[-Werror=overflow]
65dbb942145 Updated Swedish translation for the binutils sub-directory
27f59ec47a1 RISC-V: make C-extension JAL available again for (32-bit) assembly
edd36b26f35 gprofng: PR30043 libgprofng.so.* are installed to a wrong location
c6e269febbc gprofng: PR29521 [docs] man pages are not in the release tarball
bcea253f5fa toplevel: Makefile.def: add install-strip dependency on libsframe

Signed-off-by: Deepthi Hemraj 
Signed-off-by: Khem Raj 
---
v2: Rebase existing patches to apply on top
v3: Drop upstreamed patch
v4: Fix packaging libgprofng.so

 .../binutils/binutils-2.40.inc|   1 -
 ...s-crosssdk-Generate-relocatable-SDKs.patch |   2 +-
 ...o-not-generate-linker-script-directo.patch |   2 +-
 ...dk-Search-for-alternative-ld.so.conf.patch |   8 +-
 ...004-Point-scripts-location-to-libdir.patch |   6 +-
 ...stro-compiler-point-to-the-wrong-ins.patch |   2 +-
 ...-system-directories-when-cross-linki.patch |   8 +-
 ...ect-assembling-for-ppc-wait-mnemonic.patch |   2 +-
 .../binutils/0008-Use-libtool-2.4.patch   | 252 +-
 ...h-in-libtool-when-sysroot-is-enabled.patch |   2 +-
 .../0010-sync-with-OE-libtool-changes.patch   |   2 +-
 ...or-clang-before-checking-gcc-version.patch |   6 +-
 ...-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch |   2 +-
 ...sing-_Alignof-when-using-C11-or-newe.patch |   2 +-
 ...-dependencies-on-gmp-and-mpfr-when-g.patch |  56 
 .../binutils/binutils_2.40.bb |   2 +-
 16 files changed, 149 insertions(+), 206 deletions(-)
 delete mode 100644 
meta/recipes-devtools/binutils/binutils/0014-configure-remove-dependencies-on-gmp-and-mpfr-when-g.patch

diff --git a/meta/recipes-devtools/binutils/binutils-2.40.inc 
b/meta/recipes-devtools/binutils/binutils-2.40.inc
index 924cc95669..e925a182ad 100644
--- a/meta/recipes-devtools/binutils/binutils-2.40.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.40.inc
@@ -32,7 +32,6 @@ SRC_URI = "\
  file://0011-Check-for-clang-before-checking-gcc-version.patch \
  file://0012-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \
  file://0013-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch \
- file://0014-configure-remove-dependencies-on-gmp-and-mpfr-when-g.patch \
  file://0015-Remove-duplicate-pe-dll.o-entry-deom-targ_extra_ofil.patch \
  file://0016-CVE-2023-25586.patch \
  file://fix-time64.patch \
diff --git 
a/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
 
b/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
index 7fffa81724..ca249834ea 100644
--- 
a/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
+++ 
b/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
@@ -1,4 +1,4 @@
-From 25e715730ddcca37021fa4876aed4fa91d5dea25 Mon Sep 17 00:00:00 2001
+From 4bdab425bdd7dc52c95bfd62e035c1b9abe9595e Mon Sep 17 00:00:00 2001
 From: Khem Raj 
 Date: Mon, 2 Mar 2015 01:58:54 +
 Subject: [PATCH] binutils-crosssdk: Generate relocatable SDKs
diff --git 
a/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch
 
b/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch
index 

[OE-core] [meta][dunfell][PATCH] qemu: Whitelist CVE-2023-0664

2023-04-27 Thread virendra thakur
From: Virendra Thakur 

This CVE is related to Windows.

Link: https://nvd.nist.gov/vuln/detail/CVE-2023-0664

Signed-off-by: Virendra Thakur 
---
 meta/recipes-devtools/qemu/qemu.inc | 5 +
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-devtools/qemu/qemu.inc 
b/meta/recipes-devtools/qemu/qemu.inc
index 3b1bd3b656..8d6c4050f7 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -157,6 +157,11 @@ CVE_CHECK_WHITELIST += "CVE-2018-18438"
 # the issue introduced in v5.1.0-rc0
 CVE_CHECK_WHITELIST += "CVE-2020-27661"
 
+# As per https://nvd.nist.gov/vuln/detail/CVE-2023-0664
+# https://bugzilla.redhat.com/show_bug.cgi?id=2167423
+# this bug related to windows specific.
+CVE_CHECK_WHITELIST += "CVE-2023-0664"
+
 COMPATIBLE_HOST_mipsarchn32 = "null"
 COMPATIBLE_HOST_mipsarchn64 = "null"
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180484): 
https://lists.openembedded.org/g/openembedded-core/message/180484
Mute This Topic: https://lists.openembedded.org/mt/98532708/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 v3] binutils: stable 2.40 branch updates

2023-04-27 Thread Luca Ceresoli via lists.openembedded.org
Hello Deepthi, Khem,

On Wed, 26 Apr 2023 10:18:23 -0700
"Khem Raj"  wrote:

> From: Deepthi Hemraj 
> 
> - Rebase existing patches
> - Drop 0014-configure-remove-dependencies-on-gmp-and-mpfr-when-g.patch
>   which is already in
> 
> - Below commits on binutils-2.40 stable branch are updated.

AB testing with this patch produces lots of failures:

ERROR: binutils-2.40-r0 do_package: QA Issue: binutils: Files/directories were 
installed but not shipped in any package:
  /usr/lib/libgprofng.so

https://autobuilder.yoctoproject.org/typhoon/#/builders/89/builds/7055/steps/13/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/82/builds/4786/steps/11/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/23/builds/7339/steps/13/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/127/builds/1325/steps/14/logs/stdio

ERROR: nativesdk-binutils-2.40-r0 do_package: QA Issue: nativesdk-binutils: 
Files/directories were installed but not shipped in any package:
  
/usr/local/oe-sdk-hardcoded-buildpath/sysroots/i686-pokysdk-linux/usr/lib/libgprofng.so

https://autobuilder.yoctoproject.org/typhoon/#/builders/63/builds/6978/steps/11/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/65/builds/7079/steps/11/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/20/builds/7416/steps/11/logs/stdio

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 (#180483): 
https://lists.openembedded.org/g/openembedded-core/message/180483
Mute This Topic: https://lists.openembedded.org/mt/98519843/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 05/11] bitbake.conf: set minimum required kernel to 5.15

2023-04-27 Thread Alexander Kanavin
On Thu, 27 Apr 2023 at 09:48, Khem Raj  wrote:

> It will break compatibility with older kernels because we are telling glibc 
> that
> we have 5.15 at minimum so it will assume system calls which are available
> upto and including 5.15 and some of these syscalls may not be
> available in older kernels
> by next LTS it might be that 5.15 is commonly used but it still
> remains a problem for
> precompiled binaries and libraries etc. sadly

Once again, this affects target kernels only. There are no new
restrictions on the build host or sdk host kernel versions.

If you are using an older target kernel, set OLDEST_KERNEL to match.
If you are using precompiled items, I'm not sure what the problem
would be for them?

Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180482): 
https://lists.openembedded.org/g/openembedded-core/message/180482
Mute This Topic: https://lists.openembedded.org/mt/98511406/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 05/11] bitbake.conf: set minimum required kernel to 5.15

2023-04-27 Thread Khem Raj
On Thu, Apr 27, 2023 at 12:20 AM Alexander Kanavin
 wrote:
>
> On Thu, 27 Apr 2023 at 09:04, Khem Raj  wrote:
> > While this might be good, does this fix anything specific for enabling
> > 64bit time_t.
>
> Yes; please see the link.
>
> > This change means we are implying that yocto wont work with kernels
> > older than 5.15  and maybe SDK would also need
> > 5.15 on SDK hosts and similar need for build hosts might be imposed
> > too. Perhaps it would be good to do some due diligence before
> > applying this.
>
> I was waiting for someone to say something like this. :)
>
> SDKs are not affected. There's a separate setting for them,
> SDK_OLDEST_KERNEL which stays as it was, at 3.2.0. Kernels versions on
> build hosts don't have a setting or check, and that never causes
> trouble. The focus here is specifically on removing all uses of 32 bit
> time on 32 bit targets, and as a bonus, enabling other optimized paths
> in glibc that are only supported with newer kernels.
>
> The implication is not that yocto won't work with < 5.15, it's that it
> is not tested with such kernels. Which is fair enough, isn't it? If
> someone does need an older kernel (and yes, I'm waiting for the
> 'outdated vendor kernels' squad to come out and lynch me for this
> change), they can reset OLDEST_KERNEL locally, which would confirm
> that they should be doing their own testing.
>

It will break compatibility with older kernels because we are telling glibc that
we have 5.15 at minimum so it will assume system calls which are available
upto and including 5.15 and some of these syscalls may not be
available in older kernels

by next LTS it might be that 5.15 is commonly used but it still
remains a problem for
precompiled binaries and libraries etc. sadly

> Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180481): 
https://lists.openembedded.org/g/openembedded-core/message/180481
Mute This Topic: https://lists.openembedded.org/mt/98511406/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 05/11] bitbake.conf: set minimum required kernel to 5.15

2023-04-27 Thread Alexander Kanavin
On Thu, 27 Apr 2023 at 09:31, Alexander Kanavin via
lists.openembedded.org 
wrote:
> > Does this mean that SANITY_TESTED_DISTROS should also be updated to remove 
> > all distros with kernel older than 5.15?
>
> No. This check only applies to target kernels built by yocto, not any
> of the build host or sdk host kernels.

I should however expand the commit message to make this clear, and
better explain where OLDEST_KERNEL is used inside oe-core.

Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180480): 
https://lists.openembedded.org/g/openembedded-core/message/180480
Mute This Topic: https://lists.openembedded.org/mt/98511406/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 5/5] perl: patch out build paths from native binaries

2023-04-27 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 meta/recipes-devtools/perl/perl_5.36.0.bb | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-devtools/perl/perl_5.36.0.bb 
b/meta/recipes-devtools/perl/perl_5.36.0.bb
index 4d8a919d1ee..b8dba00f188 100644
--- a/meta/recipes-devtools/perl/perl_5.36.0.bb
+++ b/meta/recipes-devtools/perl/perl_5.36.0.bb
@@ -109,6 +109,10 @@ do_configure:class-native() {
 -Ui_xlocale \
 -Alddlflags=' ${LDFLAGS}' \
 ${PACKAGECONFIG_CONFARGS}
+
+# This prevents leakage of build paths into perl-native binaries, which
+# causes non-deterministic troubles when those paths no longer exist or 
aren't accessible.
+sed -i -e "s,${STAGING_LIBDIR},/completelyboguspath,g" config.h
 }
 
 do_configure:append() {
-- 
2.30.2


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180479): 
https://lists.openembedded.org/g/openembedded-core/message/180479
Mute This Topic: https://lists.openembedded.org/mt/98532473/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 4/5] dhcpcd: use git instead of tarballs

2023-04-27 Thread Alexander Kanavin
As announced here:
https://roy.marples.name/downloads/dhcpcd/

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-connectivity/dhcpcd/dhcpcd_9.4.1.bb | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-connectivity/dhcpcd/dhcpcd_9.4.1.bb 
b/meta/recipes-connectivity/dhcpcd/dhcpcd_9.4.1.bb
index 579fa95df70..21b2eebbd8a 100644
--- a/meta/recipes-connectivity/dhcpcd/dhcpcd_9.4.1.bb
+++ b/meta/recipes-connectivity/dhcpcd/dhcpcd_9.4.1.bb
@@ -9,9 +9,7 @@ HOMEPAGE = "http://roy.marples.name/projects/dhcpcd/;
 LICENSE = "BSD-2-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=d148485768fe85b9f1072b186a7e9b4d"
 
-UPSTREAM_CHECK_URI = "https://roy.marples.name/downloads/dhcpcd/;
-
-SRC_URI = "https://roy.marples.name/downloads/${BPN}/${BPN}-${PV}.tar.xz \
+SRC_URI = 
"git://github.com/NetworkConfiguration/dhcpcd;protocol=https;branch=dhcpcd-9 \
file://0001-remove-INCLUDEDIR-to-prevent-build-issues.patch \

file://0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch \
file://0001-privsep-Allow-getrandom-sysctl-for-newer-glibc.patch \
@@ -22,7 +20,8 @@ SRC_URI = 
"https://roy.marples.name/downloads/${BPN}/${BPN}-${PV}.tar.xz \
file://0001-dhcpcd.8-Fix-conflict-error-when-enable-multilib.patch \
"
 
-SRC_URI[sha256sum] = 
"819357634efed1ea5cf44ec01b24d3d3f8852fec8b4249925dcc5667c54e376c"
+SRCREV = "3c458fc7fa4146029a1e4f9e98cd7e7adf03081a"
+S = "${WORKDIR}/git"
 
 inherit pkgconfig autotools-brokensep systemd useradd
 
-- 
2.30.2


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180478): 
https://lists.openembedded.org/g/openembedded-core/message/180478
Mute This Topic: https://lists.openembedded.org/mt/98532472/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 1/5] insane.bbclass: add a SUMMARY/HOMEPAGE check (oe-core recipes only)

2023-04-27 Thread Alexander Kanavin
This was done in a selftest, but that is too late and creates
friction in integration as errors are not seen until autobuilder fails.

Bonus fix: SUMMARY check wasn't even working, as in the absence
of one set in the recipe there is a default value set from bitbake.conf.

I left DESCRIPTION check out for now, as many recipes don't actually
have it, and it's set from SUMMARY (plus a dot) if absent.

Signed-off-by: Alexander Kanavin 
---
 meta/classes-global/insane.bbclass | 27 +++-
 meta/lib/oeqa/selftest/cases/distrodata.py | 36 --
 2 files changed, 26 insertions(+), 37 deletions(-)

diff --git a/meta/classes-global/insane.bbclass 
b/meta/classes-global/insane.bbclass
index ee34d5208d1..64ad76c48e9 100644
--- a/meta/classes-global/insane.bbclass
+++ b/meta/classes-global/insane.bbclass
@@ -44,7 +44,7 @@ ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch 
pkgconfig la \
 already-stripped installed-vs-shipped ldflags compile-host-path \
 install-host-path pn-overrides unknown-configure-option \
 useless-rpaths rpaths staticdev empty-dirs \
-patch-fuzz patch-status-core\
+patch-fuzz patch-status-core missing-metadata \
 "
 # Add usrmerge QA check based on distro feature
 ERROR_QA:append = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', ' 
usrmerge', '', d)}"
@@ -1481,6 +1481,28 @@ python do_qa_unpack() {
 unpack_check_src_uri(d.getVar('PN'), d)
 }
 
+python do_qa_fetch() {
+def test_missing_metadata(d):
+fn = d.getVar("FILE")
+if not '/meta/recipes-' in fn:
+# We are only interested in OE-Core
+return
+pn = d.getVar('BPN')
+srcfile = d.getVar('SRC_URI').split()
+# Check that SUMMARY is not the same as the default from bitbake.conf
+if d.getVar('SUMMARY') == d.expand("${PN} version ${PV}-${PR}"):
+oe.qa.handle_error("missing-metadata", "Recipe {} in {} does not 
contain a SUMMARY. Please add an entry.".format(pn, fn), d)
+if not d.getVar('HOMEPAGE'):
+if srcfile and srcfile[0].startswith('file') or not 
d.getVar('SRC_URI'):
+# We are only interested in recipes SRC_URI fetched from 
external sources
+pass
+else:
+oe.qa.handle_error("missing-metadata", "Recipe {} in {} does 
not contain a HOMEPAGE. Please add an entry.".format(pn, fn), d)
+
+test_missing_metadata(d)
+oe.qa.exit_if_errors(d)
+}
+
 # Check for patch fuzz
 do_patch[postfuncs] += "do_qa_patch "
 
@@ -1492,6 +1514,9 @@ do_configure[postfuncs] += "do_qa_configure "
 # Check does S exist.
 do_unpack[postfuncs] += "do_qa_unpack"
 
+# Check basic recipe metadata (e.g. SUMMARY/HOMEPAGE/RECIPE_MAINTAINER)
+do_fetch[postfuncs] += "do_qa_fetch"
+
 python () {
 import re
 
diff --git a/meta/lib/oeqa/selftest/cases/distrodata.py 
b/meta/lib/oeqa/selftest/cases/distrodata.py
index b5554a6c3c3..b443f2d3af6 100644
--- a/meta/lib/oeqa/selftest/cases/distrodata.py
+++ b/meta/lib/oeqa/selftest/cases/distrodata.py
@@ -39,42 +39,6 @@ but their recipes claim otherwise by setting 
UPSTREAM_VERSION_UNKNOWN. Please re
 """ + "\n".join(regressed_successes)
 self.assertTrue(len(regressed_failures) == 0 and 
len(regressed_successes) == 0, msg)
 
-def test_missing_homepg(self):
-"""
-Summary: Test for oe-core recipes that don't have a HOMEPAGE or 
DESCRIPTION
-Expected:All oe-core recipes should have a DESCRIPTION entry
-Expected:All oe-core recipes should have a HOMEPAGE entry except 
for recipes that are not fetched from external sources.
-Product: oe-core
-"""
-with bb.tinfoil.Tinfoil() as tinfoil:
-tinfoil.prepare(config_only=False)
-no_description = []
-no_homepage = []
-for fn in tinfoil.all_recipe_files(variants=False):
-if not '/meta/recipes-' in fn:
-# We are only interested in OE-Core
-continue
-rd = tinfoil.parse_recipe_file(fn, appends=False)
-pn = rd.getVar('BPN')
-srcfile = rd.getVar('SRC_URI').split()
-#Since DESCRIPTION defaults to SUMMARY if not set, we are only 
interested in recipes without DESCRIPTION or SUMMARY
-if not (rd.getVar('SUMMARY') or rd.getVar('DESCRIPTION')):
-no_description.append((pn, fn))
-if not rd.getVar('HOMEPAGE'):
-if srcfile and srcfile[0].startswith('file') or not 
rd.getVar('SRC_URI'):
-# We are only interested in recipes SRC_URI fetched 
from external sources
-continue
-no_homepage.append((pn, fn))
-if no_homepage:
-self.fail("""
-The following recipes do not have a HOMEPAGE. Please add an entry for HOMEPAGE 
in the 

[OE-core] [PATCH 2/5] selftest/distrodata: clean up exception lists in recipe maintainers test

2023-04-27 Thread Alexander Kanavin
Specifically:
- add missing maintainer.inc entries for initramfs-module-*, 
systemd-machine-units and
target-sdk-provides-dummy and drop them from exception list.

- remove rust from exception list for unbuildable-by-default recipes as it is 
now buildable.

- add missing maintainer.inc entry for libx11-compose-data and 
cve-update-nvd2-native;
as they are also unbuildable by default, they needs to be in exception list as 
well.

Signed-off-by: Alexander Kanavin 
---
 meta/conf/distro/include/maintainers.inc   | 7 +++
 meta/lib/oeqa/selftest/cases/distrodata.py | 6 +++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/meta/conf/distro/include/maintainers.inc 
b/meta/conf/distro/include/maintainers.inc
index 682ec2cfdfb..66f8eb6af3e 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -129,6 +129,7 @@ RECIPE_MAINTAINER:pn-cryptodev-tests = "Robert Yang 
"
 RECIPE_MAINTAINER:pn-cups = "Chen Qi "
 RECIPE_MAINTAINER:pn-curl = "Robert Joslyn "
 RECIPE_MAINTAINER:pn-cve-update-db-native = "Ross Burton "
+RECIPE_MAINTAINER:pn-cve-update-nvd2-native = "Ross Burton 
"
 RECIPE_MAINTAINER:pn-cwautomacros = "Ross Burton "
 RECIPE_MAINTAINER:pn-db = "Unassigned "
 RECIPE_MAINTAINER:pn-dbus = "Chen Qi "
@@ -278,6 +279,9 @@ RECIPE_MAINTAINER:pn-initramfs-live-install = "Anuj Mittal 

 """
 def is_exception(pkg):
-exceptions = ["packagegroup-", "initramfs-", 
"systemd-machine-units", "target-sdk-provides-dummy"]
+exceptions = ["packagegroup-",]
 for i in exceptions:
  if i in pkg:
  return True
 return False
 
 def is_maintainer_exception(entry):
-exceptions = ["musl", "newlib", "linux-yocto", "linux-dummy", 
"mesa-gl", "libgfortran",
-  "cve-update-db-native", "rust"]
+exceptions = ["musl", "newlib", "linux-yocto", "linux-dummy", 
"mesa-gl", "libgfortran", "libx11-compose-data",
+  "cve-update-db-native","cve-update-nvd2-native",]
 for i in exceptions:
  if i in entry:
  return True
-- 
2.30.2


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180476): 
https://lists.openembedded.org/g/openembedded-core/message/180476
Mute This Topic: https://lists.openembedded.org/mt/98532470/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 3/5] insane.bbclass: add a RECIPE_MAINTAINER check (oe-core recipes only)

2023-04-27 Thread Alexander Kanavin
Absent maintainer entries are as well a frequent source of friction, as they 
are checked
only in selftest, and so aren't revealed until autobuilder runs.

The selftest is retained as it also checks for obsolete entries in 
maintainers.inc
(not possible to do in insane class).

Signed-off-by: Alexander Kanavin 
---
 meta/classes-global/insane.bbclass | 12 
 1 file changed, 12 insertions(+)

diff --git a/meta/classes-global/insane.bbclass 
b/meta/classes-global/insane.bbclass
index 64ad76c48e9..0847fb0807a 100644
--- a/meta/classes-global/insane.bbclass
+++ b/meta/classes-global/insane.bbclass
@@ -1499,7 +1499,19 @@ python do_qa_fetch() {
 else:
 oe.qa.handle_error("missing-metadata", "Recipe {} in {} does 
not contain a HOMEPAGE. Please add an entry.".format(pn, fn), d)
 
+def test_missing_maintainer(d):
+fn = d.getVar("FILE")
+if not '/meta/recipes-' in fn:
+# We are only interested in OE-Core
+return
+pn = d.getVar("PN")
+if pn.endswith("-native") or pn.startswith("nativesdk-"):
+return
+if not d.getVar('RECIPE_MAINTAINER'):
+oe.qa.handle_error("missing-metadata", "Recipe {} in {} does not 
have an assigned maintainer. Please add an entry into 
meta/conf/distro/include/maintainers.inc.".format(pn, fn), d)
+
 test_missing_metadata(d)
+test_missing_maintainer(d)
 oe.qa.exit_if_errors(d)
 }
 
-- 
2.30.2


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180477): 
https://lists.openembedded.org/g/openembedded-core/message/180477
Mute This Topic: https://lists.openembedded.org/mt/98532471/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 05/11] bitbake.conf: set minimum required kernel to 5.15

2023-04-27 Thread Alexander Kanavin
On Thu, 27 Apr 2023 at 09:30, Chen, Qi  wrote:
> Does this mean that SANITY_TESTED_DISTROS should also be updated to remove 
> all distros with kernel older than 5.15?

No. This check only applies to target kernels built by yocto, not any
of the build host or sdk host kernels.

Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180474): 
https://lists.openembedded.org/g/openembedded-core/message/180474
Mute This Topic: https://lists.openembedded.org/mt/98511406/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 11/11] insane.bbclass: enable 32 bit time API check on affected architectures

2023-04-27 Thread Alexander Kanavin
On Wed, 26 Apr 2023 at 23:18, Luca Ceresoli  wrote:
> >  already-stripped installed-vs-shipped ldflags 
> > compile-host-path \
> >  install-host-path pn-overrides unknown-configure-option \
> >  useless-rpaths rpaths staticdev empty-dirs \
> > -patch-fuzz patch-status-core\
> > +patch-fuzz patch-status-core 32bit-time \
>
> This line conflicted with another patch you sent earlier and which is
> on my branch. You may want to double check whether
> lucaceresoli/master-next is still consistent with what you had in mind.

The patchsets independently add entries to this list, so yes the
correct resolution is to add them both in any order.

I'll send a newer version of the other patchset now (with recipe
metadata tests).

Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180473): 
https://lists.openembedded.org/g/openembedded-core/message/180473
Mute This Topic: https://lists.openembedded.org/mt/98511413/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 05/11] bitbake.conf: set minimum required kernel to 5.15

2023-04-27 Thread Chen Qi via lists.openembedded.org
Does this mean that SANITY_TESTED_DISTROS should also be updated to remove all 
distros with kernel older than 5.15?

Regards,
Qi

-Original Message-
From: openembedded-core@lists.openembedded.org 
 On Behalf Of Alexander Kanavin
Sent: Thursday, April 27, 2023 3:20 PM
To: Khem Raj 
Cc: openembedded-core@lists.openembedded.org; Alexander Kanavin 

Subject: Re: [OE-core] [PATCH 05/11] bitbake.conf: set minimum required kernel 
to 5.15

On Thu, 27 Apr 2023 at 09:04, Khem Raj  wrote:
> While this might be good, does this fix anything specific for enabling 
> 64bit time_t.

Yes; please see the link.

> This change means we are implying that yocto wont work with kernels 
> older than 5.15  and maybe SDK would also need
> 5.15 on SDK hosts and similar need for build hosts might be imposed 
> too. Perhaps it would be good to do some due diligence before applying 
> this.

I was waiting for someone to say something like this. :)

SDKs are not affected. There's a separate setting for them, SDK_OLDEST_KERNEL 
which stays as it was, at 3.2.0. Kernels versions on build hosts don't have a 
setting or check, and that never causes trouble. The focus here is specifically 
on removing all uses of 32 bit time on 32 bit targets, and as a bonus, enabling 
other optimized paths in glibc that are only supported with newer kernels.

The implication is not that yocto won't work with < 5.15, it's that it is not 
tested with such kernels. Which is fair enough, isn't it? If someone does need 
an older kernel (and yes, I'm waiting for the 'outdated vendor kernels' squad 
to come out and lynch me for this change), they can reset OLDEST_KERNEL 
locally, which would confirm that they should be doing their own testing.

Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180472): 
https://lists.openembedded.org/g/openembedded-core/message/180472
Mute This Topic: https://lists.openembedded.org/mt/98511406/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 05/11] bitbake.conf: set minimum required kernel to 5.15

2023-04-27 Thread Alexander Kanavin
On Thu, 27 Apr 2023 at 09:04, Khem Raj  wrote:
> While this might be good, does this fix anything specific for enabling
> 64bit time_t.

Yes; please see the link.

> This change means we are implying that yocto wont work with kernels
> older than 5.15  and maybe SDK would also need
> 5.15 on SDK hosts and similar need for build hosts might be imposed
> too. Perhaps it would be good to do some due diligence before
> applying this.

I was waiting for someone to say something like this. :)

SDKs are not affected. There's a separate setting for them,
SDK_OLDEST_KERNEL which stays as it was, at 3.2.0. Kernels versions on
build hosts don't have a setting or check, and that never causes
trouble. The focus here is specifically on removing all uses of 32 bit
time on 32 bit targets, and as a bonus, enabling other optimized paths
in glibc that are only supported with newer kernels.

The implication is not that yocto won't work with < 5.15, it's that it
is not tested with such kernels. Which is fair enough, isn't it? If
someone does need an older kernel (and yes, I'm waiting for the
'outdated vendor kernels' squad to come out and lynch me for this
change), they can reset OLDEST_KERNEL locally, which would confirm
that they should be doing their own testing.

Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180471): 
https://lists.openembedded.org/g/openembedded-core/message/180471
Mute This Topic: https://lists.openembedded.org/mt/98511406/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 05/11] bitbake.conf: set minimum required kernel to 5.15

2023-04-27 Thread Khem Raj
On Wed, Apr 26, 2023 at 2:50 AM Alexander Kanavin
 wrote:
>
> In particular this enables a number of useful features in glibc, such
> as actually using 64 bit time_t versions of kernel syscalls:
>
> https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/kernel-features.h;h=07b440f4eea364b05fa49bf71ceebf78f80efe13;hb=HEAD#l164
>
> Signed-off-by: Alexander Kanavin 
> ---
>  meta/conf/bitbake.conf | 7 +--
>  1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index afd9e2f5527..2db84a46eed 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -469,12 +469,7 @@ SDKPATHINSTALL = 
> "/usr/local/${SDK_NAME_PREFIX}-${SDK_ARCH}"
>  # Kernel info.
>  ##
>
> -OLDEST_KERNEL = "3.2.0"
> -OLDEST_KERNEL:aarch64 = "3.14"
> -OLDEST_KERNEL:nios2 = "3.19"
> -OLDEST_KERNEL:powerpc64le = "3.10.0"
> -OLDEST_KERNEL:riscv32 = "5.4"
> -OLDEST_KERNEL:riscv64 = "4.15"
> +OLDEST_KERNEL = "5.15"
>

While this might be good, does this fix anything specific for enabling
64bit time_t.
This change means we are implying that yocto wont work with kernels
older than 5.15  and maybe SDK would also need
5.15 on SDK hosts and similar need for build hosts might be imposed
too. Perhaps it would be good to do some due diligence before
applying this.

>  # SDK_OLDEST_KERNEL can't be set using overrides since there are
>  # none for the SDK architecture. Best to set it from a machine-sdk
> --
> 2.30.2
>
>
> 
>

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