[OE-core] [PATCH 0/1] ccache no longer supports FORTRAN, so remove it from the compiler specification

2023-10-27 Thread david zuhn via lists.openembedded.org
For a time, ccache did support FORTRAN (versions 3.3-3.6), but that support was
removed.   As of this patch, the version of ccache in use in OE-core is 4.8.3.

david d zuhn (1):
  bitbake.conf: remove ${CCACHE} from FORTRAN compiler

 meta/conf/bitbake.conf | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.26.2


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189757): 
https://lists.openembedded.org/g/openembedded-core/message/189757
Mute This Topic: https://lists.openembedded.org/mt/102234009/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/1] bitbake.conf: remove ${CCACHE} from FORTRAN compiler

2023-10-27 Thread david zuhn via lists.openembedded.org
ccache used to support FORTRAN (versions 3.3-3.6) but no longer does

Signed-off-by: david d zuhn 
---
 meta/conf/bitbake.conf | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 2900a8bdba..67ff769046 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -553,7 +553,7 @@ TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"
 
 export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
 export CXX = "${CCACHE}${HOST_PREFIX}g++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
-export FC = "${CCACHE}${HOST_PREFIX}gfortran 
${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
+export FC = "${HOST_PREFIX}gfortran ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
 export CPP = "${HOST_PREFIX}gcc -E${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH}"
 export LD = "${HOST_PREFIX}ld${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}"
 export CCLD = "${CC}"
@@ -570,7 +570,7 @@ PYTHON = "${@sys.executable}"
 
 export BUILD_CC = "${CCACHE}${BUILD_PREFIX}gcc ${BUILD_CC_ARCH}"
 export BUILD_CXX = "${CCACHE}${BUILD_PREFIX}g++ ${BUILD_CC_ARCH}"
-export BUILD_FC = "${CCACHE}${BUILD_PREFIX}gfortran ${BUILD_CC_ARCH}"
+export BUILD_FC = "${BUILD_PREFIX}gfortran ${BUILD_CC_ARCH}"
 export BUILD_CPP = "${BUILD_PREFIX}gcc ${BUILD_CC_ARCH} -E"
 export BUILD_LD = "${BUILD_PREFIX}ld ${BUILD_LD_ARCH}"
 export BUILD_CCLD = "${BUILD_PREFIX}gcc ${BUILD_CC_ARCH}"
-- 
2.26.2


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189758): 
https://lists.openembedded.org/g/openembedded-core/message/189758
Mute This Topic: https://lists.openembedded.org/mt/102234010/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] meta: classes-recipe: A class for simple Kernel modules

2023-10-27 Thread BELHADJ SALEM Talel
The module class provides what is needed to compile a Linux Kernel module
but since the Makefile is always the same for simple modules that have
their sources in one directory level, I thought of creating new class wrapper
to automatically prepare the Makefile.
Also, using variable flag feature, a recipe can provide multiple modules
and can be handled the same way as PACKAGECONFIG is used to enabled/disable
features.

Signed-off-by: Talel BELHAJSALEM 
---
 .../recipes-kernel/hello-mod/hello-mod_0.1.bb |  11 +-
 meta/classes-recipe/simple-module.bbclass | 116 ++
 2 files changed, 120 insertions(+), 7 deletions(-)
 create mode 100644 meta/classes-recipe/simple-module.bbclass

diff --git a/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb 
b/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb
index a2fb212a68..f191b08be5 100644
--- a/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb
+++ b/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb
@@ -3,16 +3,13 @@ DESCRIPTION = "${SUMMARY}"
 LICENSE = "GPL-2.0-only"
 LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
 
-inherit module
+inherit simple-module
 
-SRC_URI = "file://Makefile \
-   file://hello.c \
+SRC_URI = "file://hello.c \
file://COPYING \
   "
 
 S = "${WORKDIR}"
 
-# The inherit of module.bbclass will automatically name module packages with
-# "kernel-module-" prefix as required by the oe-core build environment.
-
-RPROVIDES:${PN} += "kernel-module-hello"
+MODULE_SRC = "hello"
+MODULE_SRC[hello] = ""
\ No newline at end of file
diff --git a/meta/classes-recipe/simple-module.bbclass 
b/meta/classes-recipe/simple-module.bbclass
new file mode 100644
index 00..a837dec848
--- /dev/null
+++ b/meta/classes-recipe/simple-module.bbclass
@@ -0,0 +1,116 @@
+#
+# Copyright OpenEmbedded Contributors
+#
+# SPDX-License-Identifier: MIT
+#
+
+# Class to generate Makefile for Linux Kernel modules
+#
+# The aim of this class is to provide a way to gain time
+# when creating recipes for Linux Kernel modules
+#
+# Required variable:
+#   MODULE_SRC
+#
+# This variable itself counts on flags to know what files
+# to use for .ko generation and their .o dependencies
+#
+# Usage:
+#   If you have the following module structure:
+#   |-- module.c
+#   |-- dep1.c
+#   `-- dep2.c
+#   then you set:
+#   MODULE_SRC[module] = "dep1 dep2"
+#
+# This will generate:
+#   obj-m += module.o
+#   module-objs += dep1.o dep2.o
+#
+# This class supports multiple modules as well
+# each module will be added to obj-m and if it has dependencies
+# an -objs variable will be created.
+#
+# A module can be enabled or disabled by adding or removing
+# the module name from MODULE_SRC
+#
+# Limitations:
+#   - All modules source files should exist in the same folder level
+
+inherit module
+
+python do_prepare_makefile() {
+
+if not (d.getVar('MODULE_SRC') or "").split():
+bb.warn("You inherited easy-module but did not set drivers in 
MODULE_SRC")
+
+kernel_modules = (d.getVar('MODULE_SRC') or "").split()
+
+if kernel_modules:
+kernel_modules_flags = d.getVarFlags('MODULE_SRC') or []
+
+objs_data = {}
+for k_module in kernel_modules:
+
+# Check if all enabled drivers have corresponding flag
+if not k_module in kernel_modules_flags:
+bb.fatal(f"Driver {k_module} is enabled but does not have a 
flag entry")
+
+k_module_file = f"{k_module}.c"
+if not os.path.isfile(k_module_file):
+bb.fatal(f"Source file {k_module_file} is not found")
+
+k_module_o = f"{k_module}.o"
+objs_data[k_module] = []
+
+k_module_deps = (d.getVarFlag('MODULE_SRC', k_module) or 
"").split()
+for dep in k_module_deps:
+dep_file = f"{dep}.c"
+dep_o = f"{dep}.o"
+
+if not os.path.isfile(dep_file):
+bb.fatal(f"Dependency file {dep_file} for the 
{k_module_file} is not found")
+
+objs_data[k_module].append(dep_o)
+
+with open('Makefile', 'w') as mf:
+# Main modules
+mf.write(
+f"""
+# This Makefile is generated automatically by easy-module class
+obj-m += {' '.join([objm + '.o' for objm in objs_data.keys()])}
+""")
+
+# Modules dependencies
+for k_module, deps in objs_data.items():
+if deps:
+mf.write(
+f"""
+{k_module}-objs += {' '.join([dep for dep in deps])}
+""")
+
+# Rest of Makefile
+mf.write(
+"""
+SRC := $(shell pwd)
+
+all:
+\t$(MAKE) -C $(KERNEL_SRC) M=$(SRC)
+
+modules_install:
+\t$(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
+
+clean:
+\trm -f *.o *~ core .depend .*.cmd *.ko *.mod.c
+\trm -f Module.markers Module.symvers modules.order
+\trm -rf .tmp_versions Modules.symvers
+""")
+}
+

Re: [OE-core] [PATCH] kernel: Commit without running hooks

2023-10-27 Thread Peter Kjellerstedt
> -Original Message-
> From: openembedded-core@lists.openembedded.org  c...@lists.openembedded.org> On Behalf Of Bruce Ashfield
> Sent: den 26 oktober 2023 16:26
> To: William Kennington ; Richard Purdie
> 
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH] kernel: Commit without running hooks
> 
> On Thu, Oct 26, 2023 at 6:38 AM William Kennington  wrote:
> >
> > On Wed, Oct 25, 2023 at 7:08 PM Bruce Ashfield
>  wrote:
> > >
> > > On Wed, Oct 25, 2023 at 6:37 PM William A. Kennington III via
> > > lists.openembedded.org  wrote:
> > > >
> > > > The hooks are pulled from the impure environment and are often
> broken in
> > > > our environments. There is no reason to add extra metadata or verify
> the
> > > > commit message as its arbitrary to turn the tarball into a git repo.
> > >
> > > But what about the other uses of git ? If the hooks are broken during
> > > the creation step, other uses of git should also be broken.
> >
> > The only time hooks are run is for `git commit`. AFAIK our build
> > process has no other invocations of `git commit`. All other git
> > operations work fine.
> 
> Right. There are a few others that you just aren't hitting. There's
> the git option for patching (for any recipe), and also some use in the
> kern-tools that you wouldn't see unless you are also patching or
> doing merges as part of the kernel patch phase.
> 
> It would be nice to fix them all at the same time.
> 
> >
> > >
> > > We've had the ability to check the git config for quite some time, we
> > > could take it further an inhibit the use of the host config if we are
> > > worried about breakage like this.
> >
> > Maybe this would be the best idea overall for our git support inside
> > the build system, avoiding the build user global git config. That
> > probably solves the issue we generally have. I'm okay either way.
> >
> 
> Agreed.
> 
> There's some complexity with git versions and the variables that
> are available to inhibit local/host/system configuration, but really,
> if we want to have isolated and reproducible builds, we should
> provide our own configuration.
> 
> Richard: Does that sound reasonable to you ? If you want to fix
> this immediate problem, i don't see any harm in the patch, but it
> may just mask things and ensure we don't ever fix it fully.
> 
> William: could you raise a bugzilla (and assign it to me) about
> git configuration from the user/system influencing our build ? That
> would ensure we don't forget it completely :)
> 
> Bruce

I would argue that it can be a bad idea to ignore the user's Git 
configuration. It may, e.g., contain insteadOf settings, which if 
ignored, prevents the build from fetching from the correct sources.
There may be proxy settings that are needed. There may be hooks 
that are needed. And the list goes on. Trying to avoid problems 
by completely ignoring the user's configuration is likely to open 
up another can of problems.

That said, specifically ignoring the pre-commit and commit-msg 
hooks by specifying -n (or --no-verify as I prefer) to git commit 
is probably a good idea. At least if others are like us and have 
global Git hooks that verify that the commit message follows our 
rules...

//Peter

> > >
> > > Bruce
> > >
> > > >
> > > > Signed-off-by: William A. Kennington III 
> > > > ---
> > > >  meta/classes-recipe/kernel-yocto.bbclass | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/meta/classes-recipe/kernel-yocto.bbclass 
> > > > b/meta/classes-recipe/kernel-yocto.bbclass
> > > > index 4ac977b122..cb9cd26b09 100644
> > > > --- a/meta/classes-recipe/kernel-yocto.bbclass
> > > > +++ b/meta/classes-recipe/kernel-yocto.bbclass
> > > > @@ -408,7 +408,7 @@ do_kernel_checkout() {
> > > > git init
> > > > check_git_config
> > > > git add .
> > > > -   git commit -q -m "baseline commit: creating repo for 
> > > > ${PN}-${PV}"
> > > > +   git commit -q -n -m "baseline commit: creating repo for 
> > > > ${PN}-${PV}"
> > > > git clean -d -f
> > > > fi
> > > >
> > > > --
> > > > 2.42.0.820.g83a721a137-goog
> > >
> > > --
> > > - Thou shalt not follow the NULL pointer, for chaos and madness await 
> > > thee at its end
> > > - "Use the force Harry" - Gandalf, Star Trek II
> 
> --
> - Thou shalt not follow the NULL pointer, for chaos and madness await thee at 
> its end
> - "Use the force Harry" - Gandalf, Star Trek II


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189755): 
https://lists.openembedded.org/g/openembedded-core/message/189755
Mute This Topic: https://lists.openembedded.org/mt/102189231/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] kernel: Commit without running hooks

2023-10-27 Thread William A. Kennington III via lists.openembedded.org
On Fri, Oct 27, 2023 at 3:08 AM Luca Ceresoli  wrote:
>
> Hello William,
>
> On Wed, 25 Oct 2023 15:37:10 -0700
> "William A. Kennington III via lists.openembedded.org"
>  wrote:
>  ^
>
> As you can see your sender address has been mangled, and as a result
> the patch is rejected by the the openembedded git server. This is not
> your fault, but we need you to modify your git configuration to prevent
> this from happening in the future. Have a look at the Contributor Guide
> for more info:
>
> https://docs.yoctoproject.org/contributor-guide/submit-changes.html#fixing-your-from-identity

Ah interesting, I didn't know there was a missing setting and assumed
it was our special mail server config that always caused the issue.

>
> I'm taking your patch for testing on the autobuilders, fixing it
> manually so you don't need to resend your patch this time.
>
> 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 (#189754): 
https://lists.openembedded.org/g/openembedded-core/message/189754
Mute This Topic: https://lists.openembedded.org/mt/102189231/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 0/4] recipetool: Add handler to create go recipes

2023-10-27 Thread Peter Kjellerstedt
> -Original Message-
> From: openembedded-core@lists.openembedded.org  c...@lists.openembedded.org> On Behalf Of Lukas Funke
> Sent: den 17 oktober 2023 15:27
> To: openembedded-core@lists.openembedded.org
> Cc: Bruce Ashfield ; Vyacheslav Yurkov
> ; Martin Jansa ; Lukas Funke
> 
> Subject: [OE-Core][PATCH v2 0/4] recipetool: Add handler to create go
> recipes
> 
> From: Lukas Funke 
> 
> This patch series adds a recipetool handler in order to create 'go' recipes.
> Each recipe contains a list of dependencies in their SRC_URI
> variable which are derived from the projects `go.mod` file. For each
> dependency the corresponding license file uri/hash is added.
> 
> The recipe may not work ad-hoc, but is a good starting point to create
> a working recipe and have a working offline-build.
> 
> Lukas Funke (4):
>   classes: go-vendor: Add go-vendor class
>   selftest: recipetool: Add test for go recipe handler
>   recipetool: Ignore *.go files while scanning for licenses
>   recipetool: Add handler to create go recipes
> 
>  meta/classes/go-vendor.bbclass | 135 
>  meta/lib/oeqa/selftest/cases/recipetool.py | 163 +
>  scripts/lib/recipetool/create.py   |   2 +-
>  scripts/lib/recipetool/create_go.py| 730 +
>  4 files changed, 1029 insertions(+), 1 deletion(-)
>  create mode 100644 meta/classes/go-vendor.bbclass
>  create mode 100644 scripts/lib/recipetool/create_go.py
> 
> --
> 2.30.2

I do not know much (anything) about Go modules, but we have a couple of 
recipes that use Go modules, and I would like to offer some suggestions. 

I would recommend to separate the recipe and the main Go module from 
the dependencies similar to how it is done for Rust by the 
cargo-update-recipe-crates bbclass, which puts the dependencies in a 
separate include file.

In our recipes we use the following pattern:

LICENSE = "... & ${GO_MOD_LICENSES}"
LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=..."
require ${BPN}-licenses.inc

...

SRC_URI = "..."
require ${BPN}-go-mods.inc

and then in the ${BPN}-licenses.inc file we have something like:

GO_MOD_LICENSES = "Apache-2.0 & BSD-2-Clause & BSD-3-Clause & MIT"

LIC_FILES_CHKSUM += "\
...
"

and in the ${BPN}-go-mods.inc file:

SRC_URI += "\
...
"

Separating the three files like the above keeps the automatically 
generated parts out of the main recipe, which I believe is a good 
thing.

And yes, we have some bbclass and some tool to help with the above, 
similar to what you are adding in this series.

//Peter


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



Re: [oe][OE-core][Patch 1/1] Revert "bin_package.bbclass: Inhibit the default dependencies"

2023-10-27 Thread Peter Kjellerstedt
*ping* This needs to be applied to both master and nanbield.

//Peter

> -Original Message-
> From: Max Krummenacher 
> Sent: den 27 augusti 2023 10:10
> To: openembedded-core@lists.openembedded.org; Peter Kjellerstedt 
> 
> Cc: Max Krummenacher ; Randolph Sapp 
> 
> Subject: [oe][OE-core][Patch 1/1] Revert "bin_package.bbclass: Inhibit the 
> default dependencies"
> 
> From: Max Krummenacher 
> 
> This reverts commit d1d09bd4d7be88f0e341d5fccbfbefeb98d4b727.
> 
> The commit not only removes the dependencies on the cross compiler
> but also does not depend on e.g. virtual/${TARGET_PREFIX}compilerlibs
> and virtual/libc which in turn makes the file-rdeps qa check fail
> if installing binaries linked against e.g. libc or libstdc++.
> 
> Signed-off-by: Max Krummenacher 
> ---
>  meta/classes-recipe/bin_package.bbclass | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/meta/classes-recipe/bin_package.bbclass 
> b/meta/classes-recipe/bin_package.bbclass
> index 9dd2489725..3a1befc29c 100644
> --- a/meta/classes-recipe/bin_package.bbclass
> +++ b/meta/classes-recipe/bin_package.bbclass
> @@ -20,9 +20,6 @@
>  # they would be in ${WORKDIR}.
>  #
> 
> -# Nothing is being built so there is no need for the cross-compiler.
> -INHIBIT_DEFAULT_DEPS = "1"
> -
>  # Skip the unwanted steps
>  do_configure[noexec] = "1"
>  do_compile[noexec] = "1"
> --
> 2.35.3


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189752): 
https://lists.openembedded.org/g/openembedded-core/message/189752
Mute This Topic: https://lists.openembedded.org/mt/100987456/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] recipetool: add python_hatchling support

2023-10-27 Thread Tim Orling
One of the newer PEP-517 backends to be added was python_hatchling.bbclass
but it was not included in the recent improvements.

Add selftest for 'jsonschema' pypi package.

Signed-off-by: Tim Orling 
---
 meta/lib/oeqa/selftest/cases/recipetool.py| 35 +++
 .../lib/recipetool/create_buildsys_python.py  |  6 +++-
 2 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py 
b/meta/lib/oeqa/selftest/cases/recipetool.py
index 8e0fc995f7e..b64f724b8f0 100644
--- a/meta/lib/oeqa/selftest/cases/recipetool.py
+++ b/meta/lib/oeqa/selftest/cases/recipetool.py
@@ -576,6 +576,41 @@ class RecipetoolCreateTests(RecipetoolBase):
 
 self._test_recipe_contents(recipefile, checkvars, inherits)
 
+def test_recipetool_create_python3_pep517_hatchling(self):
+# This test require python 3.11 or above for the tomllib module
+# or tomli module to be installed
+try:
+import tomllib
+except ImportError:
+try:
+import tomli
+except ImportError:
+self.skipTest('Test requires python 3.11 or above for tomllib 
module or tomli module')
+
+# Test creating python3 package from tarball (using hatchling class)
+temprecipe = os.path.join(self.tempdir, 'recipe')
+os.makedirs(temprecipe)
+pn = 'jsonschema'
+pv = '4.19.1'
+recipefile = os.path.join(temprecipe, 'python3-%s_%s.bb' % (pn, pv))
+srcuri = 
'https://files.pythonhosted.org/packages/e4/43/087b24516db11722c8687e0caf0f66c7785c0b1c51b0ab951dfde924e3f5/jsonschema-%s.tar.gz'
 % pv
+result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri))
+self.assertTrue(os.path.isfile(recipefile))
+checkvars = {}
+checkvars['SUMMARY'] = 'An implementation of JSON Schema validation 
for Python'
+checkvars['HOMEPAGE'] = 
'https://github.com/python-jsonschema/jsonschema'
+checkvars['LICENSE'] = set(['MIT'])
+checkvars['LIC_FILES_CHKSUM'] = 
'file://COPYING;md5=7a60a81c146ec25599a3e1dabb8610a8 
file://json/LICENSE;md5=9d4de43111d33570c8fe49b4cb0e01af'
+checkvars['SRC_URI'] = 
'https://files.pythonhosted.org/packages/e4/43/087b24516db11722c8687e0caf0f66c7785c0b1c51b0ab951dfde924e3f5/jsonschema-${PV}.tar.gz'
+checkvars['SRC_URI[md5sum]'] = '4d6667ce76f820c35082c2d60a4896ab'
+checkvars['SRC_URI[sha1sum]'] = 
'9173714cb88964d07f3a3f4fcaaef638b8ceac0c'
+checkvars['SRC_URI[sha256sum]'] = 
'ec84cc37cfa703ef7cd4928db24f9cb31428a5d0fa77747b8b51a847458e0bbf'
+checkvars['SRC_URI[sha384sum]'] = 
'7a53181f0e679aa3dc3eb4d05a420877b7b9bff2d02e81f5c289a37ed1127d6c0cca1f5a5f9e4e166f089ab36bcc2be9'
+checkvars['SRC_URI[sha512sum]'] = 
'60fa769faf6e3fc2c14eb9acd189c86e9d366b157230a5681d36552af0c159cb1ad33fd920668a36afdab98bc97253f91501704c5c07b5009fdaf9d29b52060d'
+inherits = ['python_hatchling']
+
+self._test_recipe_contents(recipefile, checkvars, inherits)
+
 def test_recipetool_create_github_tarball(self):
 # Basic test to ensure github URL mangling doesn't apply to release 
tarballs
 temprecipe = os.path.join(self.tempdir, 'recipe')
diff --git a/scripts/lib/recipetool/create_buildsys_python.py 
b/scripts/lib/recipetool/create_buildsys_python.py
index 9e7f22c0db0..9312e4abf13 100644
--- a/scripts/lib/recipetool/create_buildsys_python.py
+++ b/scripts/lib/recipetool/create_buildsys_python.py
@@ -662,11 +662,12 @@ class 
PythonPyprojectTomlRecipeHandler(PythonRecipeHandler):
 PEP517 https://peps.python.org/pep-0517/#source-trees
 PEP518 https://peps.python.org/pep-0518/#build-system-table
 """
-# bitbake currently support the 3 following backends
+# bitbake currently supports the 4 following backends
 build_backend_map = {
 "setuptools.build_meta": "python_setuptools_build_meta",
 "poetry.core.masonry.api": "python_poetry_core",
 "flit_core.buildapi": "python_flit_core",
+"hatchling.build": "python_hatchling",
 }
 
 # setuptools.build_meta and flit declare project metadata into the 
"project" section of pyproject.toml
@@ -716,6 +717,8 @@ class PythonPyprojectTomlRecipeHandler(PythonRecipeHandler):
 "poetry-core": "python3-poetry-core",
 "flit_core": "python3-flit-core",
 "setuptools-scm": "python3-setuptools-scm",
+"hatchling": "python3-hatchling",
+"hatch-vcs": "python3-hatch-vcs",
 }
 
 def __init__(self):
@@ -776,6 +779,7 @@ class PythonPyprojectTomlRecipeHandler(PythonRecipeHandler):
 if field == "license":
 # For setuptools.build_meta and flit, licence is a 
table
 # but for poetry licence is a string
+# for hatchling, both table (jsonschema) and string 
(iniconfig) have been used
 if build_backend == 

[OE-core][PATCH] patchtest: reduce checksum test output length

2023-10-27 Thread Trevor Gamblin
The test_lic_files_chksum_modified_not_mentioned test in TestMetadata is
outputting very long lines that fail the maximum length check when
sending email results, preventing the actual errors from being
displayed. Reduce the length of the failure message by rewording and
removing redundant information.

Signed-off-by: Trevor Gamblin 
---
 meta/lib/patchtest/tests/test_metadata.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/patchtest/tests/test_metadata.py 
b/meta/lib/patchtest/tests/test_metadata.py
index 34e119174fe..3742760b451 100644
--- a/meta/lib/patchtest/tests/test_metadata.py
+++ b/meta/lib/patchtest/tests/test_metadata.py
@@ -116,7 +116,7 @@ class TestMetadata(base.Metadata):
 if self.lictag_re.search_string(commit.commit_message):
break
 else:
-self.fail('LIC_FILES_CHKSUM changed on target %s but there 
is no "License-Update:" tag in commit message. Include it with a brief 
description' % pn,
+self.fail('LIC_FILES_CHKSUM changed without 
"License-Update:" tag and description in commit message',
   data=[('Current checksum', pretest), ('New 
checksum', test)])
 
 def test_max_line_length(self):
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189750): 
https://lists.openembedded.org/g/openembedded-core/message/189750
Mute This Topic: https://lists.openembedded.org/mt/102224001/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/3] scripts/contrib/patchreview: consolidate imports

2023-10-27 Thread Ross Burton
From: Ross Burton 

Move most imports to the top of the file.

Signed-off-by: Ross Burton 
---
 scripts/contrib/patchreview.py | 15 ++-
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/scripts/contrib/patchreview.py b/scripts/contrib/patchreview.py
index 36038d06d2e..f95cadab0c6 100755
--- a/scripts/contrib/patchreview.py
+++ b/scripts/contrib/patchreview.py
@@ -5,6 +5,15 @@
 # SPDX-License-Identifier: GPL-2.0-only
 #
 
+import argparse
+import collections
+import json
+import os
+import os.path
+import pathlib
+import re
+import subprocess
+
 # TODO
 # - option to just list all broken files
 # - test suite
@@ -35,14 +44,12 @@ def blame_patch(patch):
 From a patch filename, return a list of "commit summary (author name 
)" strings representing the history.
 """
-import subprocess
 return subprocess.check_output(("git", "log",
 "--follow", "--find-renames", 
"--diff-filter=A",
 "--format=%s (%aN <%aE>)",
 "--", patch)).decode("utf-8").splitlines()
 
 def patchreview(patches):
-import re, os.path
 
 # General pattern: start of line, optional whitespace, tag with optional
 # hyphen or spaces, maybe a colon, some whitespace, then the value, all 
case
@@ -192,6 +199,7 @@ Patches in Pending state: %s""" % (total_patches,
 def histogram(results):
 from toolz import recipes, dicttoolz
 import math
+
 counts = recipes.countby(lambda r: r.upstream_status, results.values())
 bars = dicttoolz.valmap(lambda v: "#" * int(math.ceil(float(v) / 
len(results) * 100)), counts)
 for k in bars:
@@ -226,8 +234,6 @@ def count_recipes(layers):
 return count
 
 if __name__ == "__main__":
-import argparse, subprocess, os, pathlib
-
 args = argparse.ArgumentParser(description="Patch Review Tool")
 args.add_argument("-b", "--blame", action="store_true", help="show blame 
for malformed patches")
 args.add_argument("-v", "--verbose", action="store_true", help="show 
per-patch results")
@@ -243,7 +249,6 @@ if __name__ == "__main__":
 analyse(results, want_blame=args.blame, verbose=args.verbose)
 
 if args.json:
-import json, os.path, collections
 if os.path.isfile(args.json):
 data = json.load(open(args.json))
 else:
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189749): 
https://lists.openembedded.org/g/openembedded-core/message/189749
Mute This Topic: https://lists.openembedded.org/mt/102223659/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/3] scripts/patchreview: rework patch detection

2023-10-27 Thread Ross Burton
From: Ross Burton 

A previous patch[1] added the ability to allow the search pattern for
patches to be changed, so that patchreview can be used across the entire
meta-oe repository by changing the patterns.

However, this means the caller needs to write long patterns when calling
patchreview.

Instead, we can see if the specified directory contains a layer by
checking if conf/layer.conf exists.  If it does, then search for patches
inside this directory.  If it doesn't, assume that the specified
directory is a repository that contains sublayers (such as
meta-openembedded) and look through each of the directories that match
the pattern meta-*.

This means patchreview can both scan either a single layer (eg
.../poky/meta) or a repository of sublayers (eg .../meta-openembedded).

[1] oe-core 599046ea9302af0cf856d3fcd827f6a2be75b7e1

Signed-off-by: Ross Burton 
---
 scripts/contrib/patchreview.py | 36 +-
 1 file changed, 27 insertions(+), 9 deletions(-)

diff --git a/scripts/contrib/patchreview.py b/scripts/contrib/patchreview.py
index 43de105adc2..af66e32e02e 100755
--- a/scripts/contrib/patchreview.py
+++ b/scripts/contrib/patchreview.py
@@ -41,7 +41,7 @@ def blame_patch(patch):
 "--format=%s (%aN <%aE>)",
 "--", patch)).decode("utf-8").splitlines()
 
-def patchreview(path, patches):
+def patchreview(patches):
 import re, os.path
 
 # General pattern: start of line, optional whitespace, tag with optional
@@ -56,11 +56,10 @@ def patchreview(path, patches):
 
 for patch in patches:
 
-fullpath = os.path.join(path, patch)
 result = Result()
-results[fullpath] = result
+results[patch] = result
 
-content = open(fullpath, encoding='ascii', errors='ignore').read()
+content = open(patch, encoding='ascii', errors='ignore').read()
 
 # Find the Signed-off-by tag
 match = sob_re.search(content)
@@ -198,21 +197,40 @@ def histogram(results):
 for k in bars:
 print("%-20s %s (%d)" % (k.capitalize() if k else "No status", 
bars[k], counts[k]))
 
+def gather_patches(candidate):
+# candidate can either be the path to a layer directly (eg meta-intel), or 
a
+# repository that contains other layers (meta-arm). We can determine what 
by
+# looking for a conf/layer.conf file. If that file exists then it's a 
layer,
+# otherwise its a repository of layers and we can assume they're called
+# meta-*.
+
+if (candidate / "conf" / "layer.conf").exists():
+print(f"{candidate} is a layer")
+scan = [candidate]
+else:
+print(f"{candidate} is not a layer, checking for sub-layers")
+scan = [d for d in candidate.iterdir() if d.is_dir() and (d.name == 
"meta" or d.name.startswith("meta-"))]
+print(f"Found layers {' '.join((d.name for d in scan))}")
+
+patches = []
+for directory in scan:
+filenames = subprocess.check_output(("git", "-C", directory, 
"ls-files", "recipes-*/**/*.patch", "recipes-*/**/*.diff"), 
universal_newlines=True).split()
+patches += [os.path.join(directory, f) for f in filenames]
+return patches
 
 if __name__ == "__main__":
-import argparse, subprocess, os
+import argparse, subprocess, os, pathlib
 
 args = argparse.ArgumentParser(description="Patch Review Tool")
 args.add_argument("-b", "--blame", action="store_true", help="show blame 
for malformed patches")
 args.add_argument("-v", "--verbose", action="store_true", help="show 
per-patch results")
 args.add_argument("-g", "--histogram", action="store_true", help="show 
patch histogram")
 args.add_argument("-j", "--json", help="update JSON")
-args.add_argument("-p", "--pattern", nargs=1, action="extend", 
default=["recipes-*/**/*.patch", "recipes-*/**/*.diff"], help="pattern to 
search recipes patch")
-args.add_argument("directory", help="directory to scan")
+args.add_argument("directory", type=pathlib.Path, metavar="DIRECTORY", 
help="directory to scan (layer, or repository of layers)")
 args = args.parse_args()
 
-patches = subprocess.check_output(("git", "-C", args.directory, 
"ls-files") + tuple(args.pattern)).decode("utf-8").split()
-results = patchreview(args.directory, patches)
+patches = gather_patches(args.directory)
+results = patchreview(patches)
 analyse(results, want_blame=args.blame, verbose=args.verbose)
 
 if args.json:
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189747): 
https://lists.openembedded.org/g/openembedded-core/message/189747
Mute This Topic: https://lists.openembedded.org/mt/102223656/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 2/3] scripts/contrib/patchreview: add commit and recipe count fields to JSON

2023-10-27 Thread Ross Burton
From: Ross Burton 

The autobuilder scripts post-process the generated JSON to inject recipe
and commit counts into the data.  We can do this easily in patchreview
instead.

Signed-off-by: Ross Burton 
---
 scripts/contrib/patchreview.py | 32 ++--
 1 file changed, 22 insertions(+), 10 deletions(-)

diff --git a/scripts/contrib/patchreview.py b/scripts/contrib/patchreview.py
index af66e32e02e..36038d06d2e 100755
--- a/scripts/contrib/patchreview.py
+++ b/scripts/contrib/patchreview.py
@@ -197,7 +197,7 @@ def histogram(results):
 for k in bars:
 print("%-20s %s (%d)" % (k.capitalize() if k else "No status", 
bars[k], counts[k]))
 
-def gather_patches(candidate):
+def find_layers(candidate):
 # candidate can either be the path to a layer directly (eg meta-intel), or 
a
 # repository that contains other layers (meta-arm). We can determine what 
by
 # looking for a conf/layer.conf file. If that file exists then it's a 
layer,
@@ -205,19 +205,26 @@ def gather_patches(candidate):
 # meta-*.
 
 if (candidate / "conf" / "layer.conf").exists():
-print(f"{candidate} is a layer")
-scan = [candidate]
+return [candidate.absolute()]
 else:
-print(f"{candidate} is not a layer, checking for sub-layers")
-scan = [d for d in candidate.iterdir() if d.is_dir() and (d.name == 
"meta" or d.name.startswith("meta-"))]
-print(f"Found layers {' '.join((d.name for d in scan))}")
+return [d.absolute() for d in candidate.iterdir() if d.is_dir() and 
(d.name == "meta" or d.name.startswith("meta-"))]
 
+# TODO these don't actually handle dynamic-layers/
+
+def gather_patches(layers):
 patches = []
-for directory in scan:
+for directory in layers:
 filenames = subprocess.check_output(("git", "-C", directory, 
"ls-files", "recipes-*/**/*.patch", "recipes-*/**/*.diff"), 
universal_newlines=True).split()
 patches += [os.path.join(directory, f) for f in filenames]
 return patches
 
+def count_recipes(layers):
+count = 0
+for directory in layers:
+output = subprocess.check_output(["git", "-C", directory, "ls-files", 
"recipes-*/**/*.bb"], universal_newlines=True)
+count += len(output.splitlines())
+return count
+
 if __name__ == "__main__":
 import argparse, subprocess, os, pathlib
 
@@ -229,7 +236,9 @@ if __name__ == "__main__":
 args.add_argument("directory", type=pathlib.Path, metavar="DIRECTORY", 
help="directory to scan (layer, or repository of layers)")
 args = args.parse_args()
 
-patches = gather_patches(args.directory)
+layers = find_layers(args.directory)
+print(f"Found layers {' '.join((d.name for d in layers))}")
+patches = gather_patches(layers)
 results = patchreview(patches)
 analyse(results, want_blame=args.blame, verbose=args.verbose)
 
@@ -242,8 +251,11 @@ if __name__ == "__main__":
 
 row = collections.Counter()
 row["total"] = len(results)
-row["date"] = subprocess.check_output(["git", "-C", args.directory, 
"show", "-s", "--pretty=format:%cd", 
"--date=format:%s"]).decode("utf-8").strip()
-row["commit"] = subprocess.check_output(["git", "-C", args.directory, 
"show", "-s", "--pretty=format:%H"]).decode("utf-8").strip()
+row["date"] = subprocess.check_output(["git", "-C", args.directory, 
"show", "-s", "--pretty=format:%cd", "--date=format:%s"], 
universal_newlines=True).strip()
+row["commit"] = subprocess.check_output(["git", "-C", args.directory, 
"show-ref", "--hash", "HEAD"], universal_newlines=True).strip()
+row['commit_count'] = subprocess.check_output(["git", "-C", 
args.directory, "rev-list", "--count", "HEAD"], universal_newlines=True).strip()
+row['recipe_count'] = count_recipes(layers)
+
 for r in results.values():
 if r.upstream_status in status_values:
 row[r.upstream_status] += 1
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189748): 
https://lists.openembedded.org/g/openembedded-core/message/189748
Mute This Topic: https://lists.openembedded.org/mt/102223658/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 2/2] linux-firmware: create separate packages

2023-10-27 Thread Fahad Arslan
This is backport of commit dfb7d2c426b46502784bc9e199a468e6c1 from poky master.

This is in continuation of earlier commit:
3fc14f805fe7572bba129605869fb848fed4
linux-firmware: create separate package for cirrus and cnm firmwares

And creates separate sub packages for firmwares corresponding to following list 
of
licenses:
LICENSE.amphion_vpu
LICENCE.cw1200
LICENSE.ice_enhanced
LICENCE.mediatek
LICENCE.microchip
LICENCE.moxa
LICENSE.nxp_mc_firmware
LICENCE.OLPC
LICENCE.phanfw
LICENCE.qla2xxx
LICENCE.ti-keystone
LICENCE.wl1251
LICENCE.xc4000
LICENCE.xc5000
LICENCE.xc5000c

(From OE-Core rev: c110e5708465a6becc611acf97f166302a17ebdf)

Signed-off-by: Fahad Arslan 
Signed-off-by: Alexandre Belloni 
Signed-off-by: Richard Purdie 
---
 .../linux-firmware/linux-firmware_20230804.bb | 232 +-
 1 file changed, 228 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_20230804.bb 
b/meta/recipes-kernel/linux-firmware/linux-firmware_20230804.bb
index d87f30b8d9..506182c9c1 100644
--- a/meta/recipes-kernel/linux-firmware/linux-firmware_20230804.bb
+++ b/meta/recipes-kernel/linux-firmware/linux-firmware_20230804.bb
@@ -12,6 +12,7 @@ LICENSE = "\
 & Firmware-amdgpu \
 & Firmware-amd-ucode \
 & Firmware-amlogic_vdec \
+& Firmware-amphion_vpu \
 & Firmware-atheros_firmware \
 & Firmware-atmel \
 & Firmware-broadcom_bcm43xx \
@@ -32,16 +33,20 @@ LICENSE = "\
 & Firmware-i915 \
 & Firmware-ibt_firmware \
 & Firmware-ice \
+& Firmware-ice_enhanced \
 & Firmware-it913x \
 & Firmware-iwlwifi_firmware \
 & Firmware-IntcSST2 \
 & Firmware-kaweth \
 & Firmware-Lontium \
 & Firmware-Marvell \
+& Firmware-mediatek \
+& Firmware-microchip \
 & Firmware-moxa \
 & Firmware-myri10ge_firmware \
 & Firmware-netronome \
 & Firmware-nvidia \
+& Firmware-nxp_mc_firmware \
 & Firmware-OLPC \
 & Firmware-ath9k-htc \
 & Firmware-phanfw \
@@ -76,6 +81,7 @@ LIC_FILES_CHKSUM = 
"file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
 file://LICENSE.amdgpu;md5=a2589a05ea5b6bd2b7f4f623c7e7a649 
\
 
file://LICENSE.amd-ucode;md5=6ca90c57f7b248de1e25c7f68ffc4698 \
 
file://LICENSE.amlogic_vdec;md5=dc44f59bf64a81643e500ad3f39a468a \
+
file://LICENSE.amphion_vpu;md5=2bcdc00527b2d0542bd92b52aaec2b60 \
 
file://LICENCE.atheros_firmware;md5=30a14c7823beedac9fa39c64fdd01a13 \
 file://LICENSE.atmel;md5=aa74ac0c60595dee4d4e239107ea77a3 \
 
file://LICENCE.broadcom_bcm43xx;md5=3160c14df7228891b868060e1951dfbc \
@@ -97,6 +103,7 @@ LIC_FILES_CHKSUM = 
"file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
 file://LICENSE.i915;md5=2b0b2e0d20984affd4490ba2cba02570 \
 
file://LICENCE.ibt_firmware;md5=fdbee1ddfe0fb7ab0b2fcd6b454a366b \
 file://LICENSE.ice;md5=742ab4850f2670792940e6d15c974b2f \
+
file://LICENSE.ice_enhanced;md5=f305cfc31b64f95f774f9edd9df0224d \
 
file://LICENCE.IntcSST2;md5=9e7d8bea77612d7cc7d9e9b54b623062 \
 file://LICENCE.it913x;md5=1fbf727bfb6a949810c4dbfa7e6ce4f8 
\
 
file://LICENCE.iwlwifi_firmware;md5=2ce6786e0fc11ac6e36b54bb9b799f1b \
@@ -104,11 +111,13 @@ LIC_FILES_CHKSUM = 
"file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
 
file://LICENSE.Lontium;md5=4ec8dc582ff7295f39e2ca6a7b0be2b6 \
 
file://LICENCE.Marvell;md5=28b6ed8bd04ba105af6e4dcd6e997772 \
 
file://LICENCE.mediatek;md5=7c1976b63217d76ce47d0a11d8a79cf2 \
+
file://LICENCE.microchip;md5=db753b00305675dfbf120e3f24a47277 \
 file://LICENCE.moxa;md5=1086614767d8ccf744a923289d3d4261 \
 
file://LICENCE.myri10ge_firmware;md5=42e32fb89f6b959ca222e25ac8df8fed \
 
file://LICENCE.Netronome;md5=4add08f2577086d7996503cddf5f \
 file://LICENCE.nvidia;md5=4428a922ed3ba2ceec95f076a488ce07 
\
 file://LICENCE.NXP;md5=58bb8ba632cd729b9ba6183bc6aed36f \
+
file://LICENSE.nxp_mc_firmware;md5=9dc97e4b279b3858cae8879ae2fe5dd7 \
 file://LICENCE.OLPC;md5=5b917f9d8c061991be4f6f5f108719cd \
 
file://LICENCE.open-ath9k-htc-firmware;md5=1b33c9f4d17bc4d457bdb23727046837 \
 file://LICENCE.phanfw;md5=954dcec0e051f9409812b561ea743bfa 
\
@@ -148,6 +157,7 @@ NO_GENERIC_LICENSE[Firmware-agere] = "LICENCE.agere"
 NO_GENERIC_LICENSE[Firmware-amdgpu] = "LICENSE.amdgpu"
 NO_GENERIC_LICENSE[Firmware-amd-ucode] = "LICENSE.amd-ucode"
 NO_GENERIC_LICENSE[Firmware-amlogic_vdec] = "LICENSE.amlogic_vdec"
+NO_GENERIC_LICENSE[Firmware-amphion_vpu] = "LICENSE.amphion_vpu"
 

[OE-core] [kirkstone][PATCH 1/2] linux-firmware: create separate package for cirrus and cnm firmwares

2023-10-27 Thread Fahad Arslan
From: Fahad Arslan 

This is cherry-pick of commit 3fc14f805fe7572bba129605869fb848fed4 from
poky master.

Some licenses only allow usage of corresponding firmwares when a specific
hardware is present. This requires split of such firmwares from linux-firmware
package to firmware specific sub package. As this split is based off of
licensing, it makes sense to group firmware blobs having the same license in the
same package. This commit is a first step in this direction, and creates
separate packages for cirrus and cnm firmware.

(From OE-Core rev: 53d9d8789efc701609a5a1e985287344c2209d62)

Signed-off-by: Fahad Arslan 
Signed-off-by: Alexandre Belloni 
Signed-off-by: Richard Purdie 
---
 .../linux-firmware/linux-firmware_20230804.bb | 28 +++
 1 file changed, 28 insertions(+)

diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_20230804.bb 
b/meta/recipes-kernel/linux-firmware/linux-firmware_20230804.bb
index 4defab434d..d87f30b8d9 100644
--- a/meta/recipes-kernel/linux-firmware/linux-firmware_20230804.bb
+++ b/meta/recipes-kernel/linux-firmware/linux-firmware_20230804.bb
@@ -18,6 +18,8 @@ LICENSE = "\
 & Firmware-ca0132 \
 & Firmware-cavium \
 & Firmware-chelsio_firmware \
+& Firmware-cirrus \
+& Firmware-cnm \
 & Firmware-cw1200 \
 & Firmware-cypress \
 & Firmware-dib0700 \
@@ -81,6 +83,8 @@ LIC_FILES_CHKSUM = 
"file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
 
file://LICENCE.cadence;md5=009f46816f6956cfb75ede13d3e1cee0 \
 file://LICENCE.cavium;md5=c37aaffb1ebe5939b2580d073a95daea 
\
 
file://LICENCE.chelsio_firmware;md5=819aa8c3fa453f1b258ed8d168a9d903 \
+file://LICENSE.cirrus;md5=bb18d943382abf8e8232a9407bfdafe0 
\
+file://LICENCE.cnm;md5=93b67e6bac7f8fec22b96b8ad0a1a9d0 \
 file://LICENCE.cw1200;md5=f0f770864e7a8444a5c5aa9d12a3a7ed 
\
 
file://LICENCE.cypress;md5=48cd9436c763bf873961f9ed7b5c147b \
 
file://LICENSE.dib0700;md5=f7411825c8a555a1a3e5eab9ca773431 \
@@ -151,6 +155,8 @@ NO_GENERIC_LICENSE[Firmware-ca0132] = "LICENCE.ca0132"
 NO_GENERIC_LICENSE[Firmware-cadence] = "LICENCE.cadence"
 NO_GENERIC_LICENSE[Firmware-cavium] = "LICENCE.cavium"
 NO_GENERIC_LICENSE[Firmware-chelsio_firmware] = "LICENCE.chelsio_firmware"
+NO_GENERIC_LICENSE[Firmware-cirrus] = "LICENSE.cirrus"
+NO_GENERIC_LICENSE[Firmware-cnm] = "LICENCE.cnm"
 NO_GENERIC_LICENSE[Firmware-cw1200] = "LICENCE.cw1200"
 NO_GENERIC_LICENSE[Firmware-cypress] = "LICENCE.cypress"
 NO_GENERIC_LICENSE[Firmware-dib0700] = "LICENSE.dib0700"
@@ -277,6 +283,8 @@ PACKAGES =+ "${PN}-ralink-license ${PN}-ralink \
  ${PN}-bcm4373 \
  ${PN}-bcm43xx \
  ${PN}-bcm43xx-hdr \
+ ${PN}-cirrus-license ${PN}-cirrus \
+ ${PN}-cnm-license ${PN}-cnm \
  ${PN}-atheros-license ${PN}-ar9170 ${PN}-ath6k ${PN}-ath9k 
${PN}-ath3k \
  ${PN}-gplv2-license ${PN}-carl9170 \
  ${PN}-ar3k-license ${PN}-ar3k ${PN}-ath10k-license ${PN}-ath10k 
${PN}-ath11k ${PN}-qca \
@@ -826,6 +834,24 @@ FILES:${PN}-whence-license = 
"${nonarch_base_libdir}/firmware/WHENCE"
 
 RDEPENDS:${PN}-bnx2-mips += "${PN}-whence-license"
 
+# For cirrus
+LICENSE:${PN}-cirrus = "Firmware-cirrus"
+LICENSE:${PN}-cirrus-license = "Firmware-cirrus"
+
+FILES:${PN}-cirrus = "${nonarch_base_libdir}/firmware/cirrus/*"
+FILES:${PN}-cirrus-license = "${nonarch_base_libdir}/firmware/LICENSE.cirrus"
+
+RDEPENDS:${PN}-cirrus += "${PN}-cirrus-license"
+
+# For cnm
+LICENSE:${PN}-cnm = "Firmware-cnm"
+LICENSE:${PN}-cnm-license = "Firmware-cnm"
+
+FILES:${PN}-cnm = 
"${nonarch_base_libdir}/firmware/cnm/wave521c_k3_codec_fw.bin"
+FILES:${PN}-cnm-license = "${nonarch_base_libdir}/firmware/LICENCE.cnm"
+
+RDEPENDS:${PN}-cnm += "${PN}-cnm-license"
+
 # For imx-sdma
 LICENSE:${PN}-imx-sdma-imx6q   = "Firmware-imx-sdma_firmware"
 LICENSE:${PN}-imx-sdma-imx7d   = "Firmware-imx-sdma_firmware"
@@ -,6 +1137,8 @@ LICENSE:${PN} = "\
 & Firmware-ca0132 \
 & Firmware-cavium \
 & Firmware-chelsio_firmware \
+& Firmware-cirrus \
+& Firmware-cnm \
 & Firmware-cw1200 \
 & Firmware-dib0700 \
 & Firmware-e100 \
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189745): 
https://lists.openembedded.org/g/openembedded-core/message/189745
Mute This Topic: https://lists.openembedded.org/mt/10088/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 3/3] selftest/sstatetests: add a test for CDN sstate cache

2023-10-27 Thread Alexander Kanavin
On Thu, 26 Oct 2023 at 18:13, Richard Purdie
 wrote:
> Lets make the test print the hashes it can't find?
>
> It would be useful to know if they're perhaps delayed somehow on the
> CDN?
>
> Seems odd it is the same list of things though.
>
> We need to find the hashes we build, and the ones we can't find and see
> if they're the same. If we get the siginfo files for them, we can
> compare and see why they're changing.

I've just submitted a modified patch for the test that prints hashes
that were requested if the test fails.

I've also done two run-throughs of the standalone builder for it:
https://autobuilder.yoctoproject.org/typhoon/#/builders/158

The first one failed (which was expected), then I ran two standalone
qemuarm64/qemux86-64 jobs (which did actually rebuild the missing
stuff like perf etc.), and the second run succeeded.

So let's see it fail mysteriously again in a-full or a-quick; there
should now be more info to try and dig into that.

Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189744): 
https://lists.openembedded.org/g/openembedded-core/message/189744
Mute This Topic: https://lists.openembedded.org/mt/102132786/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] selftest/sstatetests: add a test for CDN sstate cache

2023-10-27 Thread Alexander Kanavin
Specifically, the test checks that everything needed for building
standard oe-core images for x86_64 and arm64 is available from
the cache (with minor exceptions). Going forward, a complete
world check could be enabled and additional configurations,
but that requires improvements to performance of hash equivalence
server in particular.

Signed-off-by: Alexander Kanavin 

---
changes 27102023:
- print a list of cache paths that were requested from the server if test fails
---
 meta/lib/oeqa/selftest/cases/sstatetests.py | 48 +
 1 file changed, 48 insertions(+)

diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py 
b/meta/lib/oeqa/selftest/cases/sstatetests.py
index b96eacc9ad8..329822a5e1e 100644
--- a/meta/lib/oeqa/selftest/cases/sstatetests.py
+++ b/meta/lib/oeqa/selftest/cases/sstatetests.py
@@ -14,6 +14,7 @@ import re
 
 from oeqa.utils.commands import runCmd, bitbake, get_bb_var, 
create_temp_layer, get_bb_vars
 from oeqa.selftest.case import OESelftestTestCase
+from oeqa.core.decorator import OETestTag
 
 import oe
 import bb.siggen
@@ -886,3 +887,50 @@ expected_sametmp_output, expected_difftmp_output)
 INHERIT += "base-do-configure-modified"
 """,
 expected_sametmp_output, expected_difftmp_output)
+
+@OETestTag("yocto-mirrors")
+class SStateMirrors(SStateBase):
+def check_bb_output(self, output, exceptions):
+in_tasks = False
+missing_objects = []
+checked_urls = []
+for l in output.splitlines():
+if "Testing URL" in l:
+checked_urls.append(l.split()[3])
+if "The differences between the current build and any cached tasks 
start at the following tasks" in l:
+in_tasks = True
+continue
+if "Writing task signature files" in l:
+in_tasks = False
+continue
+if in_tasks:
+recipe_task = l.split("/")[-1]
+recipe, task = recipe_task.split(":")
+for e in exceptions:
+if e[0] in recipe and task == e[1]:
+break
+else:
+missing_objects.append(recipe_task)
+self.assertTrue(len(missing_objects) == 0, "URLs checked:\n{}\nMissing 
objects in the cache:\n{}".format("\n".join(checked_urls), 
"\n".join(missing_objects)))
+
+def run_test_cdn_mirror(self, machine, targets, exceptions):
+exceptions = exceptions + [[t, "do_deploy_source_date_epoch"] for t in 
targets.split()]
+exceptions = exceptions + [[t, "do_image_qa"] for t in targets.split()]
+self.config_sstate(True)
+self.append_config("""
+MACHINE = "{}"
+BB_HASHSERVE_UPSTREAM = "hashserv.yocto.io:8687"
+SSTATE_MIRRORS ?= "file://.* 
http://cdn.jsdelivr.net/yocto/sstate/all/PATH;downloadfilename=PATH;
+""".format(machine))
+result = bitbake("-D -S printdiff {}".format(targets))
+self.check_bb_output(result.output, exceptions)
+
+def test_cdn_mirror_qemux86_64(self):
+# Example:
+# exceptions = [ ["packagegroup-core-sdk","do_package"] ]
+exceptions = []
+self.run_test_cdn_mirror("qemux86-64", "core-image-minimal 
core-image-full-cmdline core-image-sato-sdk", exceptions)
+
+def test_cdn_mirror_qemuarm64(self):
+exceptions = []
+self.run_test_cdn_mirror("qemuarm64", "core-image-minimal 
core-image-full-cmdline core-image-sato-sdk", exceptions)
-- 
2.39.2


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189743): 
https://lists.openembedded.org/g/openembedded-core/message/189743
Mute This Topic: https://lists.openembedded.org/mt/102220188/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] kernel: Commit without running hooks

2023-10-27 Thread Luca Ceresoli via lists.openembedded.org
Hello William,

On Wed, 25 Oct 2023 15:37:10 -0700
"William A. Kennington III via lists.openembedded.org"
 wrote:
 ^

As you can see your sender address has been mangled, and as a result
the patch is rejected by the the openembedded git server. This is not
your fault, but we need you to modify your git configuration to prevent
this from happening in the future. Have a look at the Contributor Guide
for more info:

https://docs.yoctoproject.org/contributor-guide/submit-changes.html#fixing-your-from-identity

I'm taking your patch for testing on the autobuilders, fixing it
manually so you don't need to resend your patch this time.

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 (#189742): 
https://lists.openembedded.org/g/openembedded-core/message/189742
Mute This Topic: https://lists.openembedded.org/mt/102189231/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 1/3] selftest/sstatetests: add tests for 'bitbake -S printdiff'

2023-10-27 Thread Luca Ceresoli via lists.openembedded.org
Hello Alex,

On Fri, 27 Oct 2023 07:29:28 +0200
"Alexander Kanavin"  wrote:

> On Thu, 26 Oct 2023 at 22:02, Luca Ceresoli  wrote:
> > Is this different from the series you sent on the 23rd? There is no
> > vN tag and no ChangeLog, so it's not obvious.  
> 
> Only the third patch should be different, and it has core-image-weston
> removed (as it was causing missing objects, as reported by you). I'll
> try to include changes under --- in each commit going forward.

That will be useful here, thanks! Without it, at least a v in the
subject would be good to help keeping track of the current iteration.

Luca

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

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189741): 
https://lists.openembedded.org/g/openembedded-core/message/189741
Mute This Topic: https://lists.openembedded.org/mt/102197154/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] [RFC][OE-core 0/7] SPDX3 Proof-of-Concept

2023-10-27 Thread Luca Ceresoli via lists.openembedded.org
On Fri, 27 Oct 2023 09:37:28 +0200
"Luca Ceresoli via lists.openembedded.org"
 wrote:

> Hello Marta,
> 
> On Thu, 26 Oct 2023 12:48:40 +0200
> "Marta Rybczynska"  wrote:
> 
> > This patch-set adds a proof-of-concept implementation of the upcoming
> > SPDX3 standard to the SBOM generation of the Yocto Project/OpenEmbedded.
> > 
> > The current code delivers an equivalent of what is produced for SPDX2.2.
> > The standard has not been released yet, and there is some specification
> > work in progress still. Our questions and open points are available
> > in the README.SPDX3 file.
> > 
> > Also, this first RFC delivery will be followed by another one with
> > SPDX assembly and the Licensing profile.  
> 
> I ran this series on the autobuilders and it's triggering:
> 
> 2023-10-26 22:30:42,532 - oe-selftest - INFO - 2: 27/33 214/548 (53.63s) (0 
> failed) (spdx.SPDXCheck.test_spdx_base_files)
> 2023-10-26 22:30:42,532 - oe-selftest - INFO - 
> testtools.testresult.real._StringException: Traceback (most recent call last):
>   File 
> "/home/pokybuild/yocto-worker/oe-selftest-fedora/build/meta/lib/oeqa/selftest/cases/spdx.py",
>  line 54, in test_spdx_base_files
> self.check_recipe_spdx("packages", "base-files.spdx.json", "base-files")
>   File 
> "/home/pokybuild/yocto-worker/oe-selftest-fedora/build/meta/lib/oeqa/selftest/cases/spdx.py",
>  line 51, in check_recipe_spdx
> result = check_spdx_json(full_file_path)
>  ^^^
>   File 
> "/home/pokybuild/yocto-worker/oe-selftest-fedora/build/meta/lib/oeqa/selftest/cases/spdx.py",
>  line 44, in check_spdx_json
> self.assertNotEqual(report["SPDXID"], None)
> ~~^^
> KeyError: 'SPDXID'
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/5969/steps/14/logs/stdio
> https://autobuilder.yoctoproject.org/typhoon/#/builders/79/builds/5969/steps/14/logs/stdio

And also, noticed after sending the previous e-mail:

ERROR: libtool-native-2.4.7-r0 do_create_spdx: Recipe libtool-native is trying 
to create package libltdl which was already written by recipe libtool. This 
will cause corruption, please resolve this and only provide the package from 
one recipe or the other or only build one of the recipes.
ERROR: quilt-native-0.67-r0 do_create_spdx: Recipe quilt-native is trying to 
create package guards which was already written by recipe quilt. This will 
cause corruption, please resolve this and only provide the package from one 
recipe or the other or only build one of the recipes.

https://autobuilder.yoctoproject.org/typhoon/#/builders/97/builds/7390/steps/16/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/82/builds/5639/steps/12/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/96/builds/5527/steps/12/logs/stdio

Luca

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

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189740): 
https://lists.openembedded.org/g/openembedded-core/message/189740
Mute This Topic: https://lists.openembedded.org/mt/102197338/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] [RFC][OE-core 0/7] SPDX3 Proof-of-Concept

2023-10-27 Thread Luca Ceresoli via lists.openembedded.org
Hello Marta,

On Thu, 26 Oct 2023 12:48:40 +0200
"Marta Rybczynska"  wrote:

> This patch-set adds a proof-of-concept implementation of the upcoming
> SPDX3 standard to the SBOM generation of the Yocto Project/OpenEmbedded.
> 
> The current code delivers an equivalent of what is produced for SPDX2.2.
> The standard has not been released yet, and there is some specification
> work in progress still. Our questions and open points are available
> in the README.SPDX3 file.
> 
> Also, this first RFC delivery will be followed by another one with
> SPDX assembly and the Licensing profile.

I ran this series on the autobuilders and it's triggering:

2023-10-26 22:30:42,532 - oe-selftest - INFO - 2: 27/33 214/548 (53.63s) (0 
failed) (spdx.SPDXCheck.test_spdx_base_files)
2023-10-26 22:30:42,532 - oe-selftest - INFO - 
testtools.testresult.real._StringException: Traceback (most recent call last):
  File 
"/home/pokybuild/yocto-worker/oe-selftest-fedora/build/meta/lib/oeqa/selftest/cases/spdx.py",
 line 54, in test_spdx_base_files
self.check_recipe_spdx("packages", "base-files.spdx.json", "base-files")
  File 
"/home/pokybuild/yocto-worker/oe-selftest-fedora/build/meta/lib/oeqa/selftest/cases/spdx.py",
 line 51, in check_recipe_spdx
result = check_spdx_json(full_file_path)
 ^^^
  File 
"/home/pokybuild/yocto-worker/oe-selftest-fedora/build/meta/lib/oeqa/selftest/cases/spdx.py",
 line 44, in check_spdx_json
self.assertNotEqual(report["SPDXID"], None)
~~^^
KeyError: 'SPDXID'

https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/5969/steps/14/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/79/builds/5969/steps/14/logs/stdio

Luca

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

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