[OE-core] [PATCH v2 4/6] recipetool: add python_maturin support
Add the new python_maturin PEP-517 backend Add selftest for 'pydantic-core' pypi package. Signed-off-by: Tim Orling --- Changes in v2: - drop all SRC_URI checksums except sha256sum (Peter's change) * requires "[PATCH v2] recipetool: pypi: do not clobber SRC_URI checksums" - drop SRC_URI (Julien's change) - add "inherit pypi" (Julien's change) meta/lib/oeqa/selftest/cases/recipetool.py| 29 +++ .../lib/recipetool/create_buildsys_python.py | 1 + 2 files changed, 30 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py index d10d61bc5b0..8d39f639acf 100644 --- a/meta/lib/oeqa/selftest/cases/recipetool.py +++ b/meta/lib/oeqa/selftest/cases/recipetool.py @@ -663,6 +663,35 @@ class RecipetoolCreateTests(RecipetoolBase): self._test_recipe_contents(recipefile, checkvars, inherits) +def test_recipetool_create_python3_pep517_maturin(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 maturin class) +temprecipe = os.path.join(self.tempdir, 'recipe') +os.makedirs(temprecipe) +pn = 'pydantic-core' +pv = '2.14.5' +recipefile = os.path.join(temprecipe, 'python3-%s_%s.bb' % (pn, pv)) +srcuri = 'https://files.pythonhosted.org/packages/64/26/cffb93fe9c6b5a91c497f37fae14a4b073ecbc47fc36a9979c7aa888b245/pydantic_core-%s.tar.gz' % pv +result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri)) +self.assertTrue(os.path.isfile(recipefile)) +checkvars = {} +checkvars['HOMEPAGE'] = 'https://github.com/pydantic/pydantic-core' +checkvars['LICENSE'] = set(['MIT']) +checkvars['LIC_FILES_CHKSUM'] = 'file://LICENSE;md5=ab599c188b4a314d2856b3a55030c75c' +checkvars['SRC_URI[sha256sum]'] = '6d30226dfc816dd0fdf120cae611dd2215117e4f9b124af8c60ab9093b6e8e71' +inherits = ['python_maturin', 'pypi'] + +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 a2af41fdda8..60c59034504 100644 --- a/scripts/lib/recipetool/create_buildsys_python.py +++ b/scripts/lib/recipetool/create_buildsys_python.py @@ -735,6 +735,7 @@ class PythonPyprojectTomlRecipeHandler(PythonRecipeHandler): "poetry.core.masonry.api": "python_poetry_core", "flit_core.buildapi": "python_flit_core", "hatchling.build": "python_hatchling", +"maturin": "python_maturin", } # setuptools.build_meta and flit declare project metadata into the "project" section of pyproject.toml -- 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192096): https://lists.openembedded.org/g/openembedded-core/message/192096 Mute This Topic: https://lists.openembedded.org/mt/103067787/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] recipetool: pypi: do not clobber SRC_URI checksums
> -Original Message- > From: openembedded-core@lists.openembedded.org > On Behalf Of Tim Orling > Sent: den 9 december 2023 02:37 > To: openembedded-core@lists.openembedded.org > Cc: Tim Orling > Subject: [OE-core] [PATCH] recipetool: pypi: do not clobber SRC_URI checksums > > The pypi change: > "85a2a6f68af recipetool: create_buildsys_python: add pypi support" > deleted all the SRC_URI variables, including the SRC_URI checksums. > These are not generated by the pypi.bbclass (how could they be trusted?) > > Without the checksum(s), we are vulnerable to a man-in-the-middle attack > and zero checks on the validity of the downloaded tarball from pypi.org. > > Fix by only setting S and SRC_URI to None. > > Signed-off-by: Tim Orling > --- > scripts/lib/recipetool/create_buildsys_python.py | 5 - > 1 file changed, 5 deletions(-) > > diff --git a/scripts/lib/recipetool/create_buildsys_python.py > b/scripts/lib/recipetool/create_buildsys_python.py > index 5e07222ece1..66de36ba3e4 100644 > --- a/scripts/lib/recipetool/create_buildsys_python.py > +++ b/scripts/lib/recipetool/create_buildsys_python.py > @@ -172,11 +172,6 @@ class PythonRecipeHandler(RecipeHandler): > # extravalues['SRC_URI(?:\[.*?\])?'] = None The TODO comment above should also be removed as it should not be done. > extravalues['S'] = None > extravalues['SRC_URI'] = None > -extravalues['SRC_URI[md5sum]'] = None > -extravalues['SRC_URI[sha1sum]'] = None > -extravalues['SRC_URI[sha256sum]'] = None > -extravalues['SRC_URI[sha384sum]'] = None > -extravalues['SRC_URI[sha512sum]'] = None > > classes.append('pypi') > > -- > 2.34.1 //Peter -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192095): https://lists.openembedded.org/g/openembedded-core/message/192095 Mute This Topic: https://lists.openembedded.org/mt/103067452/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] recipetool: pypi: do not clobber SRC_URI checksums
The pypi change: "85a2a6f68af recipetool: create_buildsys_python: add pypi support" deleted all the SRC_URI variables, including the SRC_URI checksums. These are not generated by the pypi.bbclass (how could they be trusted?) Without the checksum(s), we are vulnerable to a man-in-the-middle attack and zero checks on the validity of the downloaded tarball from pypi.org. Fix by only setting S and SRC_URI to None. Signed-off-by: Tim Orling --- Changes in v2: - clarify the pypi.bbclass comment scripts/lib/recipetool/create_buildsys_python.py | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/scripts/lib/recipetool/create_buildsys_python.py b/scripts/lib/recipetool/create_buildsys_python.py index 5e07222ece1..a2af41fdda8 100644 --- a/scripts/lib/recipetool/create_buildsys_python.py +++ b/scripts/lib/recipetool/create_buildsys_python.py @@ -167,16 +167,11 @@ class PythonRecipeHandler(RecipeHandler): if pypi_package_ext != "tar.gz": extravalues["PYPI_PACKAGE_EXT"] = pypi_package_ext -# Pypi class will handle S and SRC_URIxxx variables, so remove them +# Pypi class will handle S and SRC_URI variables, so remove them # TODO: allow oe.recipeutils.patch_recipe_lines() to accept regexp so we can simplify the following to: # extravalues['SRC_URI(?:\[.*?\])?'] = None extravalues['S'] = None extravalues['SRC_URI'] = None -extravalues['SRC_URI[md5sum]'] = None -extravalues['SRC_URI[sha1sum]'] = None -extravalues['SRC_URI[sha256sum]'] = None -extravalues['SRC_URI[sha384sum]'] = None -extravalues['SRC_URI[sha512sum]'] = None classes.append('pypi') -- 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192094): https://lists.openembedded.org/g/openembedded-core/message/192094 Mute This Topic: https://lists.openembedded.org/mt/103067489/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: pypi: do not clobber SRC_URI checksums
The pypi change: "85a2a6f68af recipetool: create_buildsys_python: add pypi support" deleted all the SRC_URI variables, including the SRC_URI checksums. These are not generated by the pypi.bbclass (how could they be trusted?) Without the checksum(s), we are vulnerable to a man-in-the-middle attack and zero checks on the validity of the downloaded tarball from pypi.org. Fix by only setting S and SRC_URI to None. Signed-off-by: Tim Orling --- scripts/lib/recipetool/create_buildsys_python.py | 5 - 1 file changed, 5 deletions(-) diff --git a/scripts/lib/recipetool/create_buildsys_python.py b/scripts/lib/recipetool/create_buildsys_python.py index 5e07222ece1..66de36ba3e4 100644 --- a/scripts/lib/recipetool/create_buildsys_python.py +++ b/scripts/lib/recipetool/create_buildsys_python.py @@ -172,11 +172,6 @@ class PythonRecipeHandler(RecipeHandler): # extravalues['SRC_URI(?:\[.*?\])?'] = None extravalues['S'] = None extravalues['SRC_URI'] = None -extravalues['SRC_URI[md5sum]'] = None -extravalues['SRC_URI[sha1sum]'] = None -extravalues['SRC_URI[sha256sum]'] = None -extravalues['SRC_URI[sha384sum]'] = None -extravalues['SRC_URI[sha512sum]'] = None classes.append('pypi') -- 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192093): https://lists.openembedded.org/g/openembedded-core/message/192093 Mute This Topic: https://lists.openembedded.org/mt/103067452/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] [RESEND][PATCH 5/7] recipetool: create_buildsys_python: add pypi support
On Mon, Dec 4, 2023 at 7:59 AM Julien Stephan wrote: > Today, we can use devtool/recipetool to create recipes for python projects > using the github url or the direct release tarball of the project, but the > create_buildsys_python plugin doesn't support the pypi class, since we > cannot > know from the extracted source if the package is available on pypi or not. > > By implementing the new optional process_url callback, we can detect > that the url is a pypi one (i.e 'https://pypi.org/project/') > and retrieve the release tarball location. > Also detect if the url points to a release tarball hosted on > "files.pythonhosted.iorg" (i.e https://files.pythonhosted.org/packages/.. > .) > > In both cases, adds the pypi class, remove 'S' and 'SRC_URIxxx' > variables from the created recipe as they will be handled by the pypi class > and add the PYPI_PACKAGE variable > > This helps to produce cleaner recipes when package is hosted on pypi. > > If the url points to a github url or a release tarball not coming from > "files.pythonhosted.org", the created recipe is the same as before. > One can also use the newly added "--no-pypi" switch to NOT inherit > from pypi class on matching url, to keep legacy behaviour. > > To create a recipe for a pypi package, one can now use one of the > new following syntax (using recipetool create / devtool add): > > * recipetool create https://pypi.org/project/ > * recipetool create https://pypi.org/project// > * recipetool create https://pypi.org/project/ --version > > or the old syntax: > * recipetool create https://files.pythonhosted.org/packages/<...> > > Signed-off-by: Julien Stephan > --- > scripts/lib/devtool/standard.py | 3 + > scripts/lib/recipetool/create.py | 1 + > .../lib/recipetool/create_buildsys_python.py | 72 +++ > 3 files changed, 76 insertions(+) > > diff --git a/scripts/lib/devtool/standard.py > b/scripts/lib/devtool/standard.py > index d53fb810071..f18ebaa70d3 100644 > --- a/scripts/lib/devtool/standard.py > +++ b/scripts/lib/devtool/standard.py > @@ -147,6 +147,8 @@ def add(args, config, basepath, workspace): > extracmdopts += ' -a' > if args.npm_dev: > extracmdopts += ' --npm-dev' > +if args.no_pypi: > +extracmdopts += ' --no-pypi' > if args.mirrors: > extracmdopts += ' --mirrors' > if args.srcrev: > @@ -2260,6 +2262,7 @@ def register_commands(subparsers, context): > group.add_argument('--no-same-dir', help='Force build in a separate > build directory', action="store_true") > parser_add.add_argument('--fetch', '-f', help='Fetch the specified > URI and extract it to create the source tree (deprecated - pass as > positional argument instead)', metavar='URI') > parser_add.add_argument('--npm-dev', help='For npm, also fetch > devDependencies', action="store_true") > +parser_add.add_argument('--no-pypi', help='Do not inherit pypi > class', action="store_true") > parser_add.add_argument('--version', '-V', help='Version to use > within recipe (PV)') > parser_add.add_argument('--no-git', '-g', help='If fetching source, > do not set up source tree as a git repository', action="store_true") > group = parser_add.add_mutually_exclusive_group() > diff --git a/scripts/lib/recipetool/create.py > b/scripts/lib/recipetool/create.py > index 5c5ac7ae403..963aa91421e 100644 > --- a/scripts/lib/recipetool/create.py > +++ b/scripts/lib/recipetool/create.py > @@ -1413,6 +1413,7 @@ def register_commands(subparsers): > parser_create.add_argument('-B', '--srcbranch', help='Branch in > source repository if fetching from an SCM such as git (default master)') > parser_create.add_argument('--keep-temp', action="store_true", > help='Keep temporary directory (for debugging)') > parser_create.add_argument('--npm-dev', action="store_true", > help='For npm, also fetch devDependencies') > +parser_create.add_argument('--no-pypi', action="store_true", help='Do > not inherit pypi class') > parser_create.add_argument('--devtool', action="store_true", > help=argparse.SUPPRESS) > parser_create.add_argument('--mirrors', action="store_true", > help='Enable PREMIRRORS and MIRRORS for source tree fetching (disabled by > default).') > parser_create.set_defaults(func=create_recipe) > diff --git a/scripts/lib/recipetool/create_buildsys_python.py > b/scripts/lib/recipetool/create_buildsys_python.py > index b620e3271b1..5e07222ece1 100644 > --- a/scripts/lib/recipetool/create_buildsys_python.py > +++ b/scripts/lib/recipetool/create_buildsys_python.py > @@ -18,7 +18,11 @@ import os > import re > import sys > import subprocess > +import json > +import urllib.request > from recipetool.create import RecipeHandler > +from urllib.parse import urldefrag > +from recipetool.create import determine_from_url > > logger = logging.getLogger('recipetool') > > @@ -111,6 +115,74 @@ class PythonRecipeHandler(RecipeHandler): > def __init__(self):
Re: [OE-core] [PATCH 0/6] Add 'maturin' python backend support
On Fri, Dec 8, 2023 at 3:58 PM Tim Orling via lists.openembedded.org wrote: > > > On Fri, Dec 8, 2023 at 2:50 PM Alexandre Belloni < > alexandre.bell...@bootlin.com> wrote: > >> Hello Tim, >> >> I got this failure, can you check? >> >> >> https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/6166/steps/14/logs/stdio >> >> https://autobuilder.yoctoproject.org/typhoon/#/builders/79/builds/6159/steps/14/logs/stdio >> >> this is from Peter’s change which had not been merged when I sent this > series. > Correction: it is from Julien’s pypi recipetool change. The pypi.bbclass does not create SRC_URI checksums. The inly test case other than mine with SRC_URI checksums was for —no-pypi setuptools3 and do we have zero coverage. > >> 2023-12-08 22:03:18,822 - oe-selftest - INFO - FAIL: >> recipetool.RecipetoolCreateTests.test_recipetool_create_python3_pep517_maturin >> (subunit.RemotedTestCase) >> 2023-12-08 22:03:18,822 - oe-selftest - INFO - >> -- >> 2023-12-08 22:03:18,823 - 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/recipetool.py", >> line 698, in test_recipetool_create_python3_pep517_maturin >> self._test_recipe_contents(recipefile, checkvars, inherits) >> File >> "/home/pokybuild/yocto-worker/oe-selftest-fedora/build/meta/lib/oeqa/selftest/cases/devtool.py", >> line 178, in _test_recipe_contents >> self.assertEqual(missingvars, {}, 'Some expected variables not found >> in recipe: %s' % checkvars) >> File "/usr/lib64/python3.11/unittest/case.py", line 873, in assertEqual >> assertion_func(first, second, msg=msg) >> File "/usr/lib64/python3.11/unittest/case.py", line 1172, in >> assertDictEqual >> self.fail(self._formatMessage(msg, standardMsg)) >> File "/usr/lib64/python3.11/unittest/case.py", line 703, in fail >> raise self.failureException(msg) >> AssertionError: {'SRC_URI': 'https://files.pythonhosted.or[586 >> chars]238'} != {} >> Diff is 656 characters long. Set self.maxDiff to None to see it. : Some >> expected variables not found in recipe: {'SRC_URI': ' >> https://files.pythonhosted.org/packages/64/26/cffb93fe9c6b5a91c497f37fae14a4b073ecbc47fc36a9979c7aa888b245/pydantic_core-${PV}.tar.gz', >> 'SRC_URI[md5sum]': '1eb13c211147496c1c9484ff7f8ac438', 'SRC_URI[sha1sum]': >> '0803a731aa793f3eaf4d52f656d7300408ca0b36', 'SRC_URI[sha256sum]': >> '6d30226dfc816dd0fdf120cae611dd2215117e4f9b124af8c60ab9093b6e8e71', >> 'SRC_URI[sha384sum]': >> 'cca6d9f0ba72ff92e16aaf3d6c628b8df33bdf244cc39c9d59cff9d541f35d4e87ec136e60e4b040ad73c5c69b27cec6', >> 'SRC_URI[sha512sum]': >> 'e6c3081dfa58d9b59f8c33dfe80712d732ac3048a2f8240f9a0f5448d9bfc83e222c1e08b8bb49779b84f685c3bec3060cc935c113a818b1ab8aa955f3df2238'} >> >> >> >> >> On 07/12/2023 15:13:17-0800, Tim Orling wrote: >> > We are increasingly seeing Rust extensions for Python added in the >> > ecosystem. The current best practices approach has moved from using >> > 'setuptools-rust' to using 'maturin'. >> > >> > * Add python3-maturin, including 'native' and 'nativesdk' support. >> > * Add a 'python_maturin' bbclass for the PEP-517 backend. >> > * Add recipetool support for the 'maturin' PEP-517 backend. >> > * Add a very basic 'maturin list-python' smoke test added to oeqa for >> > both 'runtime' (-c testimage) and 'sdk' (-c testsdk). >> > >> > The following changes since commit >> 70ad9b9b309575134834757468cb32c9e3b87448: >> > >> > bitbake: hashserv: sqlite: Ensure sync propagates to database >> connections (2023-12-04 22:36:09 +) >> > >> > are available in the Git repository at: >> > >> > https://git.yoctoproject.org/poky-contrib timo/maturin_1.3.2 >> > https://git.yoctoproject.org/poky-contrib/log/?h=timo/maturin_1.3.2 >> > >> > Tim Orling (6): >> > python3-setuptools-rust: BBCLASSEXTEND + nativesdk >> > python3-maturin: add v1.3.2 >> > classes-recipe: add python_maturin.bbclass >> > recipetool: add python_maturin support >> > oe-selfest: add maturn runtime (testimage) test >> > python3-maturin: add sdk (testsdk) test case >> > >> > meta/classes-recipe/python_maturin.bbclass| 17 + >> > meta/conf/distro/include/maintainers.inc | 1 + >> > meta/lib/oeqa/runtime/cases/maturin.py| 23 + >> > meta/lib/oeqa/sdk/cases/maturin.py| 33 + >> > meta/lib/oeqa/selftest/cases/recipetool.py| 34 ++ >> > .../python/python3-maturin-crates.inc | 572 ++ >> > .../python/python3-maturin_1.3.2.bb | 40 ++ >> > .../python/python3-setuptools-rust_1.8.1.bb | 2 +- >> > .../lib/recipetool/create_buildsys_python.py | 1 + >> > 9 files changed, 722 insertions(+), 1 deletion(-) >> > create mode 100644 meta/classes-recipe/python_maturin.bbclass >> > create mode 100644 meta/lib/oeqa/runtime/cases/maturin.py >> > create mode
Re: [OE-core] [PATCH 4/6] gnu-config: add a do_compile task
On Fri, 2023-12-08 at 23:46 +, Peter Kjellerstedt wrote: > > -Original Message- > > From: openembedded-core@lists.openembedded.org > > On Behalf Of Richard > > Purdie > > Sent: den 8 december 2023 12:35 > > To: Alexander Kanavin ; > > openembedded-core@lists.openembedded.org > > Cc: Alexander Kanavin > > Subject: Re: [OE-core] [PATCH 4/6] gnu-config: add a do_compile > > task > > > > On Fri, 2023-12-08 at 11:15 +0100, Alexander Kanavin wrote: > > > noexec flag has an unfortunate side effect of not writing out the > > > .siginfo > > > file into sstate (because that is done in sstate bbclass > > > from a task-completed event handler). > > > > > > In the absence of the siginfo file, diffsigs code is unable to > > > trace back > > > the change in task signatures if the change is really basic and > > > affects tasks coming ahead of gnu-config-native:do_compile. > > > > > > Signed-off-by: Alexander Kanavin > > > --- > > > meta/recipes-devtools/gnu-config/gnu-config_git.bb | 3 ++- > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > diff --git a/meta/recipes-devtools/gnu-config/gnu-config_git.bb > > > b/meta/recipes-devtools/gnu-config/gnu-config_git.bb > > > index 718f798a00e..c72de159ce2 100644 > > > --- a/meta/recipes-devtools/gnu-config/gnu-config_git.bb > > > +++ b/meta/recipes-devtools/gnu-config/gnu-config_git.bb > > > @@ -19,7 +19,8 @@ UPSTREAM_CHECK_COMMITS = "1" > > > > > > CLEANBROKEN = "1" > > > > > > -do_compile[noexec] = "1" > > > +do_compile () { > > > +} > > > > > > do_install () { > > > install -d ${D}${datadir}/gnu-config \ > > > > > > > You have a good point here but by this logic, we need to remove > > *all* > > noexec tasks. We don't really want to do that and I'm not sure we > > want > > to set this precedent. > > > > I wonder if we could just remove the compile task entirely and what > > that would break... > > > > Cheers, > > > > Richard > > Would it be possible to change the code so that the .siginfo files > are > still produced for noexec tasks? Otherwise it seems using noexec > tasks > is a real blocker for being able to trace the signatures for any > subsequent task. Producing the siginfo files requires a full data store and bitbake doesn't retain that information for every recipe, just a summary of the data it needs. It is therefore currently produced in the task execution context currently. With a noexec task, the win is that we never need that context. So this does need some thought. Cheers, Richard -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192090): https://lists.openembedded.org/g/openembedded-core/message/192090 Mute This Topic: https://lists.openembedded.org/mt/103052553/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 0/6] Add 'maturin' python backend support
On Fri, Dec 8, 2023 at 2:50 PM Alexandre Belloni < alexandre.bell...@bootlin.com> wrote: > Hello Tim, > > I got this failure, can you check? > > > https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/6166/steps/14/logs/stdio > > https://autobuilder.yoctoproject.org/typhoon/#/builders/79/builds/6159/steps/14/logs/stdio > > this is from Peter’s change which had not been merged when I sent this series. > > 2023-12-08 22:03:18,822 - oe-selftest - INFO - FAIL: > recipetool.RecipetoolCreateTests.test_recipetool_create_python3_pep517_maturin > (subunit.RemotedTestCase) > 2023-12-08 22:03:18,822 - oe-selftest - INFO - > -- > 2023-12-08 22:03:18,823 - 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/recipetool.py", > line 698, in test_recipetool_create_python3_pep517_maturin > self._test_recipe_contents(recipefile, checkvars, inherits) > File > "/home/pokybuild/yocto-worker/oe-selftest-fedora/build/meta/lib/oeqa/selftest/cases/devtool.py", > line 178, in _test_recipe_contents > self.assertEqual(missingvars, {}, 'Some expected variables not found > in recipe: %s' % checkvars) > File "/usr/lib64/python3.11/unittest/case.py", line 873, in assertEqual > assertion_func(first, second, msg=msg) > File "/usr/lib64/python3.11/unittest/case.py", line 1172, in > assertDictEqual > self.fail(self._formatMessage(msg, standardMsg)) > File "/usr/lib64/python3.11/unittest/case.py", line 703, in fail > raise self.failureException(msg) > AssertionError: {'SRC_URI': 'https://files.pythonhosted.or[586 > chars]238'} != {} > Diff is 656 characters long. Set self.maxDiff to None to see it. : Some > expected variables not found in recipe: {'SRC_URI': ' > https://files.pythonhosted.org/packages/64/26/cffb93fe9c6b5a91c497f37fae14a4b073ecbc47fc36a9979c7aa888b245/pydantic_core-${PV}.tar.gz', > 'SRC_URI[md5sum]': '1eb13c211147496c1c9484ff7f8ac438', 'SRC_URI[sha1sum]': > '0803a731aa793f3eaf4d52f656d7300408ca0b36', 'SRC_URI[sha256sum]': > '6d30226dfc816dd0fdf120cae611dd2215117e4f9b124af8c60ab9093b6e8e71', > 'SRC_URI[sha384sum]': > 'cca6d9f0ba72ff92e16aaf3d6c628b8df33bdf244cc39c9d59cff9d541f35d4e87ec136e60e4b040ad73c5c69b27cec6', > 'SRC_URI[sha512sum]': > 'e6c3081dfa58d9b59f8c33dfe80712d732ac3048a2f8240f9a0f5448d9bfc83e222c1e08b8bb49779b84f685c3bec3060cc935c113a818b1ab8aa955f3df2238'} > > > > > On 07/12/2023 15:13:17-0800, Tim Orling wrote: > > We are increasingly seeing Rust extensions for Python added in the > > ecosystem. The current best practices approach has moved from using > > 'setuptools-rust' to using 'maturin'. > > > > * Add python3-maturin, including 'native' and 'nativesdk' support. > > * Add a 'python_maturin' bbclass for the PEP-517 backend. > > * Add recipetool support for the 'maturin' PEP-517 backend. > > * Add a very basic 'maturin list-python' smoke test added to oeqa for > > both 'runtime' (-c testimage) and 'sdk' (-c testsdk). > > > > The following changes since commit > 70ad9b9b309575134834757468cb32c9e3b87448: > > > > bitbake: hashserv: sqlite: Ensure sync propagates to database > connections (2023-12-04 22:36:09 +) > > > > are available in the Git repository at: > > > > https://git.yoctoproject.org/poky-contrib timo/maturin_1.3.2 > > https://git.yoctoproject.org/poky-contrib/log/?h=timo/maturin_1.3.2 > > > > Tim Orling (6): > > python3-setuptools-rust: BBCLASSEXTEND + nativesdk > > python3-maturin: add v1.3.2 > > classes-recipe: add python_maturin.bbclass > > recipetool: add python_maturin support > > oe-selfest: add maturn runtime (testimage) test > > python3-maturin: add sdk (testsdk) test case > > > > meta/classes-recipe/python_maturin.bbclass| 17 + > > meta/conf/distro/include/maintainers.inc | 1 + > > meta/lib/oeqa/runtime/cases/maturin.py| 23 + > > meta/lib/oeqa/sdk/cases/maturin.py| 33 + > > meta/lib/oeqa/selftest/cases/recipetool.py| 34 ++ > > .../python/python3-maturin-crates.inc | 572 ++ > > .../python/python3-maturin_1.3.2.bb | 40 ++ > > .../python/python3-setuptools-rust_1.8.1.bb | 2 +- > > .../lib/recipetool/create_buildsys_python.py | 1 + > > 9 files changed, 722 insertions(+), 1 deletion(-) > > create mode 100644 meta/classes-recipe/python_maturin.bbclass > > create mode 100644 meta/lib/oeqa/runtime/cases/maturin.py > > create mode 100644 meta/lib/oeqa/sdk/cases/maturin.py > > create mode 100644 > meta/recipes-devtools/python/python3-maturin-crates.inc > > create mode 100644 meta/recipes-devtools/python/ > python3-maturin_1.3.2.bb > > > > -- > > 2.34.1 > > > > > > > > > > > > -- > Alexandre Belloni, co-owner and COO, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive
Re: [OE-core] [PATCH 4/6] gnu-config: add a do_compile task
> -Original Message- > From: openembedded-core@lists.openembedded.org > On Behalf Of Richard Purdie > Sent: den 8 december 2023 12:35 > To: Alexander Kanavin ; > openembedded-core@lists.openembedded.org > Cc: Alexander Kanavin > Subject: Re: [OE-core] [PATCH 4/6] gnu-config: add a do_compile task > > On Fri, 2023-12-08 at 11:15 +0100, Alexander Kanavin wrote: > > noexec flag has an unfortunate side effect of not writing out the .siginfo > > file into sstate (because that is done in sstate bbclass > > from a task-completed event handler). > > > > In the absence of the siginfo file, diffsigs code is unable to trace back > > the change in task signatures if the change is really basic and > > affects tasks coming ahead of gnu-config-native:do_compile. > > > > Signed-off-by: Alexander Kanavin > > --- > > meta/recipes-devtools/gnu-config/gnu-config_git.bb | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/meta/recipes-devtools/gnu-config/gnu-config_git.bb > > b/meta/recipes-devtools/gnu-config/gnu-config_git.bb > > index 718f798a00e..c72de159ce2 100644 > > --- a/meta/recipes-devtools/gnu-config/gnu-config_git.bb > > +++ b/meta/recipes-devtools/gnu-config/gnu-config_git.bb > > @@ -19,7 +19,8 @@ UPSTREAM_CHECK_COMMITS = "1" > > > > CLEANBROKEN = "1" > > > > -do_compile[noexec] = "1" > > +do_compile () { > > +} > > > > do_install () { > > install -d ${D}${datadir}/gnu-config \ > > > > You have a good point here but by this logic, we need to remove *all* > noexec tasks. We don't really want to do that and I'm not sure we want > to set this precedent. > > I wonder if we could just remove the compile task entirely and what > that would break... > > Cheers, > > Richard Would it be possible to change the code so that the .siginfo files are still produced for noexec tasks? Otherwise it seems using noexec tasks is a real blocker for being able to trace the signatures for any subsequent task. //Peter -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192088): https://lists.openembedded.org/g/openembedded-core/message/192088 Mute This Topic: https://lists.openembedded.org/mt/103052553/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 4/6] recipetool: add python_maturin support
> -Original Message- > From: openembedded-core@lists.openembedded.org > On Behalf Of Tim Orling > Sent: den 8 december 2023 00:13 > To: openembedded-core@lists.openembedded.org > Subject: [OE-core] [PATCH 4/6] recipetool: add python_maturin support > > Add the new python_maturin PEP-517 backend > > Add selftest for 'pydantic-core' pypi package. > > [YOCTO #15312] > > Signed-off-by: Tim Orling > --- > meta/lib/oeqa/selftest/cases/recipetool.py| 34 +++ > .../lib/recipetool/create_buildsys_python.py | 1 + > 2 files changed, 35 insertions(+) > > diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py > b/meta/lib/oeqa/selftest/cases/recipetool.py > index 55cbba9ca74..ddcacaa73c7 100644 > --- a/meta/lib/oeqa/selftest/cases/recipetool.py > +++ b/meta/lib/oeqa/selftest/cases/recipetool.py > @@ -611,6 +611,40 @@ class RecipetoolCreateTests(RecipetoolBase): > > self._test_recipe_contents(recipefile, checkvars, inherits) > > +def test_recipetool_create_python3_pep517_maturin(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 maturin class) > +temprecipe = os.path.join(self.tempdir, 'recipe') > +os.makedirs(temprecipe) > +pn = 'pydantic-core' > +pv = '2.14.5' > +recipefile = os.path.join(temprecipe, 'python3-%s_%s.bb' % (pn, pv)) > +srcuri = > 'https://files.pythonhosted.org/packages/64/26/cffb93fe9c6b5a91c497f37fae14a4b073ecbc47fc36a9979c7aa888b245/pydantic_core-%s.tar.gz' > % pv > +result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri)) > +self.assertTrue(os.path.isfile(recipefile)) > +checkvars = {} > +checkvars['HOMEPAGE'] = 'https://github.com/pydantic/pydantic-core' > +checkvars['LICENSE'] = set(['MIT']) > +checkvars['LIC_FILES_CHKSUM'] = > 'file://LICENSE;md5=ab599c188b4a314d2856b3a55030c75c' > +checkvars['SRC_URI'] = > 'https://files.pythonhosted.org/packages/64/26/cffb93fe9c6b5a91c497f37fae14a4b073ecbc47fc36a9979c7aa888b245/pydantic_core-${PV}.tar.gz' > +checkvars['SRC_URI[md5sum]'] = '1eb13c211147496c1c9484ff7f8ac438' > +checkvars['SRC_URI[sha1sum]'] = > '0803a731aa793f3eaf4d52f656d7300408ca0b36' > +checkvars['SRC_URI[sha256sum]'] = > '6d30226dfc816dd0fdf120cae611dd2215117e4f9b124af8c60ab9093b6e8e71' > +checkvars['SRC_URI[sha384sum]'] = > 'cca6d9f0ba72ff92e16aaf3d6c628b8df33bdf244cc39c9d59cff9d541f35d4e87ec136e6 > 0e4b040ad73c5c69b27cec6' > +checkvars['SRC_URI[sha512sum]'] = > 'e6c3081dfa58d9b59f8c33dfe80712d732ac3048a2f8240f9a0f5448d9bfc83e222c1e08b8bb49779b84f685c3bec3060cc935c113a818b1ab8aa955f3df2238' After my recent changes to recipetool, only the sha256sum shall be present here. > +inherits = ['python_maturin'] > + > +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 9312e4abf13..9bebb3061b1 100644 > --- a/scripts/lib/recipetool/create_buildsys_python.py > +++ b/scripts/lib/recipetool/create_buildsys_python.py > @@ -668,6 +668,7 @@ class > PythonPyprojectTomlRecipeHandler(PythonRecipeHandler): > "poetry.core.masonry.api": "python_poetry_core", > "flit_core.buildapi": "python_flit_core", > "hatchling.build": "python_hatchling", > +"maturin": "python_maturin", > } > > # setuptools.build_meta and flit declare project metadata into the > "project" section of pyproject.toml > -- > 2.34.1 //Peter -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192087): https://lists.openembedded.org/g/openembedded-core/message/192087 Mute This Topic: https://lists.openembedded.org/mt/103045101/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH 2/5] base-files: update dirs1777 and volatiles according to VOLATILE_TMP_DIR
> -Original Message- > From: openembedded-core@lists.openembedded.org > On Behalf Of Changqing Li > Sent: den 8 december 2023 11:13 > To: openembedded-core@lists.openembedded.org > Subject: [OE-core] [PATCH 2/5] base-files: update dirs1777 and volatiles > according to VOLATILE_TMP_DIR > > From: Changqing Li > > * update dirs1777 so that only create /var/volatiles/tmp when > VOLATILE_TMP_DIR set to yes, create /var/tmp when VOLATILE_TMP_DIR set > to no > > * update volatiles so that only symlink /var/tmp to /var/volatiles/tmp > when VOLATILE_TMP_DIR set to yes > > * mount /tmp as tmpfs fs when VOLATILE_TMP_DIR set to no and init > manager is sysvinit > > Signed-off-by: Changqing Li > --- > meta/recipes-core/base-files/base-files_3.0.14.bb | 8 ++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb > b/meta/recipes-core/base-files/base-files_3.0.14.bb > index 9fab53ce63..01d076369d 100644 > --- a/meta/recipes-core/base-files/base-files_3.0.14.bb > +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb > @@ -30,7 +30,7 @@ S = "${WORKDIR}" > INHIBIT_DEFAULT_DEPS = "1" > > docdir:append = "/${P}" > -dirs1777 = "/tmp ${localstatedir}/volatile/tmp" > +dirs1777 = "/tmp ${localstatedir}/${@'volatile/' if > oe.types.boolean('${VOLATILE_TMP_DIR}') else ''}tmp" > dirs2775 = "" > dirs555 = "/sys /proc" > dirs755 = "/boot /dev ${base_bindir} ${base_sbindir} ${base_libdir} \ > @@ -54,7 +54,8 @@ dirs755-lsb = "/srv \ > ${prefix}/lib/locale" > dirs2775-lsb = "/var/mail" > > -volatiles = "${@'log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''} > tmp" > +volatiles = "${@'log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''} \ > + ${@'tmp' if oe.types.boolean('${VOLATILE_TMP_DIR}') else ''}" > conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \ > ${sysconfdir}/issue /${sysconfdir}/issue.net \ > ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile \ > @@ -122,6 +123,9 @@ do_install () { > fi > > install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir}/fstab > +if [ ${@ oe.types.boolean('${VOLATILE_TMP_DIR}') } = False ] && > ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'false', 'true', d)} ;then > +echo "tmpfs /tmp tmpfs > mode=1777,strictatime,nosuid,nodev,size=50%,nr_inodes=1m 0 0" >> > ${D}${sysconfdir}/fstab > +fi Inconsistent indentation. Please use tabs to indent shell code in recipes in OE-Core. This also applies to patches 4 and 5 in this series. > install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/profile > sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}${sysconfdir}/profile > sed -i 's#@BINDIR@#${bindir}#g' ${D}${sysconfdir}/profile > -- > 2.25.1 //Peter -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192086): https://lists.openembedded.org/g/openembedded-core/message/192086 Mute This Topic: https://lists.openembedded.org/mt/103052519/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 0/6] Add 'maturin' python backend support
Hello Tim, I got this failure, can you check? https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/6166/steps/14/logs/stdio https://autobuilder.yoctoproject.org/typhoon/#/builders/79/builds/6159/steps/14/logs/stdio 2023-12-08 22:03:18,822 - oe-selftest - INFO - FAIL: recipetool.RecipetoolCreateTests.test_recipetool_create_python3_pep517_maturin (subunit.RemotedTestCase) 2023-12-08 22:03:18,822 - oe-selftest - INFO - -- 2023-12-08 22:03:18,823 - 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/recipetool.py", line 698, in test_recipetool_create_python3_pep517_maturin self._test_recipe_contents(recipefile, checkvars, inherits) File "/home/pokybuild/yocto-worker/oe-selftest-fedora/build/meta/lib/oeqa/selftest/cases/devtool.py", line 178, in _test_recipe_contents self.assertEqual(missingvars, {}, 'Some expected variables not found in recipe: %s' % checkvars) File "/usr/lib64/python3.11/unittest/case.py", line 873, in assertEqual assertion_func(first, second, msg=msg) File "/usr/lib64/python3.11/unittest/case.py", line 1172, in assertDictEqual self.fail(self._formatMessage(msg, standardMsg)) File "/usr/lib64/python3.11/unittest/case.py", line 703, in fail raise self.failureException(msg) AssertionError: {'SRC_URI': 'https://files.pythonhosted.or[586 chars]238'} != {} Diff is 656 characters long. Set self.maxDiff to None to see it. : Some expected variables not found in recipe: {'SRC_URI': 'https://files.pythonhosted.org/packages/64/26/cffb93fe9c6b5a91c497f37fae14a4b073ecbc47fc36a9979c7aa888b245/pydantic_core-${PV}.tar.gz', 'SRC_URI[md5sum]': '1eb13c211147496c1c9484ff7f8ac438', 'SRC_URI[sha1sum]': '0803a731aa793f3eaf4d52f656d7300408ca0b36', 'SRC_URI[sha256sum]': '6d30226dfc816dd0fdf120cae611dd2215117e4f9b124af8c60ab9093b6e8e71', 'SRC_URI[sha384sum]': 'cca6d9f0ba72ff92e16aaf3d6c628b8df33bdf244cc39c9d59cff9d541f35d4e87ec136e60e4b040ad73c5c69b27cec6', 'SRC_URI[sha512sum]': 'e6c3081dfa58d9b59f8c33dfe80712d732ac3048a2f8240f9a0f5448d9bfc83e222c1e08b8bb49779b84f685c3bec3060cc935c113a818b1ab8aa955f3df2238'} On 07/12/2023 15:13:17-0800, Tim Orling wrote: > We are increasingly seeing Rust extensions for Python added in the > ecosystem. The current best practices approach has moved from using > 'setuptools-rust' to using 'maturin'. > > * Add python3-maturin, including 'native' and 'nativesdk' support. > * Add a 'python_maturin' bbclass for the PEP-517 backend. > * Add recipetool support for the 'maturin' PEP-517 backend. > * Add a very basic 'maturin list-python' smoke test added to oeqa for > both 'runtime' (-c testimage) and 'sdk' (-c testsdk). > > The following changes since commit 70ad9b9b309575134834757468cb32c9e3b87448: > > bitbake: hashserv: sqlite: Ensure sync propagates to database connections > (2023-12-04 22:36:09 +) > > are available in the Git repository at: > > https://git.yoctoproject.org/poky-contrib timo/maturin_1.3.2 > https://git.yoctoproject.org/poky-contrib/log/?h=timo/maturin_1.3.2 > > Tim Orling (6): > python3-setuptools-rust: BBCLASSEXTEND + nativesdk > python3-maturin: add v1.3.2 > classes-recipe: add python_maturin.bbclass > recipetool: add python_maturin support > oe-selfest: add maturn runtime (testimage) test > python3-maturin: add sdk (testsdk) test case > > meta/classes-recipe/python_maturin.bbclass| 17 + > meta/conf/distro/include/maintainers.inc | 1 + > meta/lib/oeqa/runtime/cases/maturin.py| 23 + > meta/lib/oeqa/sdk/cases/maturin.py| 33 + > meta/lib/oeqa/selftest/cases/recipetool.py| 34 ++ > .../python/python3-maturin-crates.inc | 572 ++ > .../python/python3-maturin_1.3.2.bb | 40 ++ > .../python/python3-setuptools-rust_1.8.1.bb | 2 +- > .../lib/recipetool/create_buildsys_python.py | 1 + > 9 files changed, 722 insertions(+), 1 deletion(-) > create mode 100644 meta/classes-recipe/python_maturin.bbclass > create mode 100644 meta/lib/oeqa/runtime/cases/maturin.py > create mode 100644 meta/lib/oeqa/sdk/cases/maturin.py > create mode 100644 meta/recipes-devtools/python/python3-maturin-crates.inc > create mode 100644 meta/recipes-devtools/python/python3-maturin_1.3.2.bb > > -- > 2.34.1 > > > > -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192085): https://lists.openembedded.org/g/openembedded-core/message/192085 Mute This Topic: https://lists.openembedded.org/mt/103045095/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 0/8] Add new packagefeed recipe class - RETRACTED
Sure. I've pushed the patchset here. https://github.com/amstewart/openembedded-core/tree/dev/packagefeed On 12/8/23 14:28, Alexander Kanavin wrote: Perhaps you can publish the final version somewhere like github so we can easily refer to it, should someone express interest in it? Alex On Fri, 8 Dec 2023 at 17:56, Alex Stewart wrote: Hopefully, the reply-to has worked here. This patchset was originally submitted by Charlie Johnston while he worked at NI, and was then adopted by me after he left. Now adjustments within NI have left me with much less bandwidth and I cannot continue to support getting this patchset upstreamed. https://lists.openembedded.org/g/openembedded-core/message/186383 So unfortunately, I'm retracting this patchset indefinitely. Thank you to everyone who has helped along the way. Thanks, -- Alex Stewart Software Engineer - NI Real-Time OS NI (National Instruments) alex.stew...@ni.com -- Alex Stewart Software Engineer - NI Real-Time OS NI (National Instruments) alex.stew...@ni.com -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192084): https://lists.openembedded.org/g/openembedded-core/message/192084 Mute This Topic: https://lists.openembedded.org/mt/103058646/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 0/8] Add new packagefeed recipe class - RETRACTED
Perhaps you can publish the final version somewhere like github so we can easily refer to it, should someone express interest in it? Alex On Fri, 8 Dec 2023 at 17:56, Alex Stewart wrote: > > Hopefully, the reply-to has worked here. > > This patchset was originally submitted by Charlie Johnston while he > worked at NI, and was then adopted by me after he left. Now adjustments > within NI have left me with much less bandwidth and I cannot continue to > support getting this patchset upstreamed. > > https://lists.openembedded.org/g/openembedded-core/message/186383 > > So unfortunately, I'm retracting this patchset indefinitely. > > Thank you to everyone who has helped along the way. > > Thanks, > > -- > Alex Stewart > Software Engineer - NI Real-Time OS > NI (National Instruments) > > alex.stew...@ni.com > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192083): https://lists.openembedded.org/g/openembedded-core/message/192083 Mute This Topic: https://lists.openembedded.org/mt/103058646/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] pseudo: Update to pull in syncfs probe fix
Pulls in the changes: Eilís 'pidge' Ní Fhlannagáin (1): subports: Add _GNU_SOURCE for syncfs probe Richard Purdie (1): SECURITY.md: Add file Wu Zhenyu (1): pseudo.1: Fix a typo Signed-off-by: Richard Purdie --- meta/recipes-devtools/pseudo/pseudo_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb index 4a894ebdd0b..699cab11c66 100644 --- a/meta/recipes-devtools/pseudo/pseudo_git.bb +++ b/meta/recipes-devtools/pseudo/pseudo_git.bb @@ -14,7 +14,7 @@ SRC_URI:append:class-nativesdk = " \ file://older-glibc-symbols.patch" SRC_URI[prebuilt.sha256sum] = "ed9f456856e9d86359f169f46a70ad7be4190d6040282b84c8d97b99072485aa" -SRCREV = "ec6151a2b057109b3f798f151a36690af582e166" +SRCREV = "a8453eea4d902bbb0e01c786f1cb4a178c3bbee3" S = "${WORKDIR}/git" PV = "1.9.0+git" -- 2.39.2 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192082): https://lists.openembedded.org/g/openembedded-core/message/192082 Mute This Topic: https://lists.openembedded.org/mt/103059420/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] cairo: upgrade 1.16.0 -> 1.18.0
On 6 Dec 2023, at 01:04, qi...@fujitsu.com via lists.openembedded.org wrote: > +- prop = meson.get_external_property('ipc_rmid_deferred_release', 'auto') > ++ prop = meson.get_external_property('ipc_rmid_deferred_release', 'false’) Big NAK from me here. This meson code _explicitly and intentionally_ doesn’t set a default. If it can’t auto-detect then it’s on the builder to provide the right answer via a cross file. I really dislike autoconf’s idiom of providing a default value and not making it clear unless you read the logs very carefully that a default was used which may be entirely incorrect: this behaviour is much better. Running the test on my machine I discover that should be set to true, and this appears to be a Linux feature[1] instead of being specific to an architecture or libc. So I recommend providing a cross file to Meson in target builds that sets this value to true. systemd-boot, glib-2.0, and libsoup are all examples of recipes that already do this. Ross [1] https://gitlab.freedesktop.org/cairo/cairo/-/commit/5041b462d084de8552336275914d30c23bf5dd35 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192081): https://lists.openembedded.org/g/openembedded-core/message/192081 Mute This Topic: https://lists.openembedded.org/mt/103004857/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] [PATCH] oeqa/runtime/systemd: Ensure test runs only on systemd images
When enabled in DISTRO_FEATURES the test may run on a system without systemd. Fix this. Signed-off-by: Richard Purdie --- meta/lib/oeqa/runtime/cases/systemd.py | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/lib/oeqa/runtime/cases/systemd.py b/meta/lib/oeqa/runtime/cases/systemd.py index 4c581ba396e..2865887959a 100644 --- a/meta/lib/oeqa/runtime/cases/systemd.py +++ b/meta/lib/oeqa/runtime/cases/systemd.py @@ -137,6 +137,7 @@ class SystemdServiceTests(SystemdTest): status = self.target.run('mount -oro,remount /')[0] self.assertTrue(status == 0, msg='Remounting / as r/o failed') +@OETestDepends(['systemd.SystemdBasicTests.test_systemd_basic']) @skipIfNotFeature('minidebuginfo', 'Test requires minidebuginfo to be in DISTRO_FEATURES') @OEHasPackage(['busybox']) def test_systemd_coredump_minidebuginfo(self): -- 2.39.2 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192080): https://lists.openembedded.org/g/openembedded-core/message/192080 Mute This Topic: https://lists.openembedded.org/mt/103058961/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] [PATCH v3 0/8] Add new packagefeed recipe class - RETRACTED
Hopefully, the reply-to has worked here. This patchset was originally submitted by Charlie Johnston while he worked at NI, and was then adopted by me after he left. Now adjustments within NI have left me with much less bandwidth and I cannot continue to support getting this patchset upstreamed. https://lists.openembedded.org/g/openembedded-core/message/186383 So unfortunately, I'm retracting this patchset indefinitely. Thank you to everyone who has helped along the way. Thanks, -- Alex Stewart Software Engineer - NI Real-Time OS NI (National Instruments) alex.stew...@ni.com -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192079): https://lists.openembedded.org/g/openembedded-core/message/192079 Mute This Topic: https://lists.openembedded.org/mt/103058646/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] [PATCH] oeqa/selftest/recipetool: stop looking for md5sum
From: Alexandre Belloni The md5sum is no longer generated by recipetool, stop expecting it. Signed-off-by: Alexandre Belloni --- meta/lib/oeqa/selftest/cases/recipetool.py | 1 - 1 file changed, 1 deletion(-) diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py index 08da029e6eb9..d10d61bc5b07 100644 --- a/meta/lib/oeqa/selftest/cases/recipetool.py +++ b/meta/lib/oeqa/selftest/cases/recipetool.py @@ -470,7 +470,6 @@ class RecipetoolCreateTests(RecipetoolBase): checkvars['LICENSE'] = set(['MIT']) checkvars['LIC_FILES_CHKSUM'] = 'file://LICENSE;md5=16a934f165e8c3245f241e77d401bb88' checkvars['SRC_URI'] = 'https://files.pythonhosted.org/packages/84/30/80932401906eaf787f2e9bd86dc458f1d2e75b064b4c187341f29516945c/python-magic-${PV}.tar.gz' -checkvars['SRC_URI[md5sum]'] = 'e384c95a47218f66c6501cd6dd45ff59' checkvars['SRC_URI[sha256sum]'] = 'f3765c0f582d2dfc72c15f3b5a82aecfae9498bd29ca840d72f37d7bd38bfcd5' inherits = ['setuptools3'] self._test_recipe_contents(recipefile, checkvars, inherits) -- 2.43.0 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192078): https://lists.openembedded.org/g/openembedded-core/message/192078 Mute This Topic: https://lists.openembedded.org/mt/103056645/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] recipetool: limit added checksums
Hello, I realized I didn't reply but this was causing failures on the autobuilders: https://autobuilder.yoctoproject.org/typhoon/#/builders/80/builds/6088/steps/14/logs/stdio https://autobuilder.yoctoproject.org/typhoon/#/builders/79/builds/6138/steps/15/logs/stdio https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/6153/steps/14/logs/stdio https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/6143/steps/14/logs/stdio And we now have another submission doing the same thing (that I also fixed later on). On 03/12/2023 10:36:14+, Konrad Weihmann wrote: > to the same values that are used in bb.fetch. > Currently that would only add sha256sum to the created recipe, > which is the preferred choice over md5 > > Signed-off-by: Konrad Weihmann > --- > scripts/lib/recipetool/create.py | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/scripts/lib/recipetool/create.py > b/scripts/lib/recipetool/create.py > index 293198d1c8..0016be3e7b 100644 > --- a/scripts/lib/recipetool/create.py > +++ b/scripts/lib/recipetool/create.py > @@ -677,7 +677,10 @@ def create_recipe(args): > if not srcuri: > lines_before.append('# No information for SRC_URI yet (only an > external source tree was specified)') > lines_before.append('SRC_URI = "%s"' % srcuri) > +checksums_shown_list = ["%ssum" % x for x in > bb.fetch2.SHOWN_CHECKSUM_LIST] > for key, value in sorted(checksums.items()): > +if key not in checksums_shown_list: > +continue > lines_before.append('SRC_URI[%s] = "%s"' % (key, value)) > if srcuri and supports_srcrev(srcuri): > lines_before.append('') > -- > 2.34.1 > > > > -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192077): https://lists.openembedded.org/g/openembedded-core/message/192077 Mute This Topic: https://lists.openembedded.org/mt/102949370/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH 2/2] rust: Disable rust oe-selftest
On 2023-12-08 9:46 a.m., Alexandre Belloni wrote: On 08/12/2023 09:05:51-0500, Randy MacLeod wrote: On 2023-12-08 5:48 a.m.,yash.shi...@windriver.com wrote: From: Yash Shinde After rust is upgraded to 1.71 and later versions, the rust oe-selftest gives build errors due to unstable nightly options(see the error mentioned below). Thus, disable the test suite until the issue is fixed error: the option `Z` is only accepted on the nightly compiler thread 'main' panicked at 'failed to gather the target spec for x86_64-poky-linux-gnu', synthetic_targets.rs:66:9 Following issues are created in Yocto bugzilla and rust upstream to track this issue- https://bugzilla.yoctoproject.org/show_bug.cgi?id=15275 https://github.com/rust-lang/rust/issues/115642 https://users.rust-lang.org/t/does-rust-test-suite-supports-nightly-options-during-bootstrapping-in-rust/103108 https://users.rust-lang.org/t/unable-to-read-target-specs-when-rust-1-73-is-bootstrapped-in-yocto-poky/102959 Signed-off-by: Yash Shinde --- meta/lib/oeqa/selftest/cases/rust.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/rust.py b/meta/lib/oeqa/selftest/cases/rust.py index 7d148142fc..6dbc517006 100644 --- a/meta/lib/oeqa/selftest/cases/rust.py +++ b/meta/lib/oeqa/selftest/cases/rust.py @@ -39,6 +39,9 @@ def parse_results(filename): @OETestTag("runqemu") class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase): def test_rust(self, *args, **kwargs): +# Disable Rust Oe-selftest +self.skipTest("The Rust Oe-selftest is disabled.") + # build remote-test-server before image build recipe = "rust" start_time = time.time() Thanks for the Rust update Yash and it's unfortunate that we haven't resolved the problems with the test suite. We decided to diskable the tests and do the update because some changes were blocked waiting for a newer version of Rust according to Tim. Yash, It would be better to disable (skip) the test suite first so that there isn't a commit with the testsuite broken. Alex, the commits are independent, will you please re-order them before merging? Sure! In case anyone doesn't read the other thread/messages, we're going with Alex Kiernan's patchset that starts with Yash's patch: [OE-Core][PATCH 1/7] rust: Disable rust oe-selftest ../Randy ../Randy -- # Randy MacLeod # Wind River Linux -- # Randy MacLeod # Wind River Linux -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192076): https://lists.openembedded.org/g/openembedded-core/message/192076 Mute This Topic: https://lists.openembedded.org/mt/103052789/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] [master] [PATCH] cve-update-nvd2-native: faster requests with API keys
Please follow https://docs.yoctoproject.org/dev/contributor-guide/submit-changes.html#fixing-your-from-identity On 07/12/2023 18:53:22-0800, Dhairya Nagodra via lists.openembedded.org wrote: > As per NVD, the public rate limit is 5 requests in 30s (6s delay). > Using an API key increases the limit to 50 requests in 30s (0.6s delay). > However, NVD still recommends sleeping for several seconds so that the > other legitimate requests are serviced without denial or interruption. > Keeping the default sleep at 6 seconds and 2 seconds with an API key. > > For failures, the wait time is unchanged (6 seconds). > > Reference: https://nvd.nist.gov/developers/start-here#RateLimits > > Signed-off-by: Dhairya Nagodra > --- > meta/recipes-core/meta/cve-update-nvd2-native.bb | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/meta/recipes-core/meta/cve-update-nvd2-native.bb > b/meta/recipes-core/meta/cve-update-nvd2-native.bb > index 9ab8dc6050..941fca34c6 100644 > --- a/meta/recipes-core/meta/cve-update-nvd2-native.bb > +++ b/meta/recipes-core/meta/cve-update-nvd2-native.bb > @@ -188,6 +188,11 @@ def update_db_file(db_tmp_file, d, database_time): > api_key = d.getVar("NVDCVE_API_KEY") or None > attempts = int(d.getVar("CVE_DB_UPDATE_ATTEMPTS")) > > +# Recommended by NVD > +wait_time = 6 > +if api_key: > +wait_time = 2 > + > while True: > req_args['startIndex'] = index > raw_data = nvd_request_next(url, attempts, api_key, req_args) > @@ -210,7 +215,7 @@ def update_db_file(db_tmp_file, d, database_time): > break > > # Recommended by NVD > -time.sleep(6) > +time.sleep(wait_time) > > # Update success, set the date to cve_check file. > cve_f.write('CVE database update : %s\n\n' % datetime.date.today()) > -- > 2.35.6 > > > > -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192075): https://lists.openembedded.org/g/openembedded-core/message/192075 Mute This Topic: https://lists.openembedded.org/mt/103048465/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/2] rust: Upgrade 1.70.0 -> 1.73.0
On 08-12-2023 19:37, Alex Kiernan wrote: CAUTION: This email comes from a non Wind River email account! Do not click links or open attachments unless you recognize the sender and know the content is safe. On Fri, Dec 8, 2023 at 1:55 PM Richard Purdie wrote: On Fri, 2023-12-08 at 13:47 +, Alex Kiernan wrote: On Fri, Dec 8, 2023 at 9:56 AM Shinde, Yash via lists.openembedded.org wrote: From: Yash Shinde In rust 1.72.0 the 'mips*-unknown-linux-gnu*' support demoted from tier2 to tier3. The mips bootstrap compiler is removed from src/stage0.json file and so the same are removed from rust-snapshot.inc. [https://github.com/rust-lang/rust/releases/tag/1.72.0] Drop bootstrap_fail.patch, getrandom-open64.patch as they are merged in upstream rust. ]> Signed-off-by: Yash Shinde --- If we're going to go down the road of disabling the rust oe-selftest (and I don't see a better option right now as we're well behind), I have a series which steps us through each of the releases up to 1.74.0. It also avoids the need for the library/test hack (upstream has a new target we can use for libstd). This sounds useful, particularly this last piece. Can you send it? We could probably combine it with 2/2 in this series if Yash/Randy agree. I've pulled that in as the first patch in the series so if you were bisecting you wouldn't see the oe-selftest fail on upgrade to 1.71. It's on top of the cargo cleanups I posted yesterday, so I suspect those are prerequisites (or I could combine the two into one series?) I've not tested every step extensively, but they all build and I've tested cargo in most of them manually inside qemu. Thanks Alex for re-ordering my patch with your patches. Regards, Yash. -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192074): https://lists.openembedded.org/g/openembedded-core/message/192074 Mute This Topic: https://lists.openembedded.org/mt/103052790/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH 2/2] rust: Disable rust oe-selftest
On 08/12/2023 09:05:51-0500, Randy MacLeod wrote: > On 2023-12-08 5:48 a.m., yash.shi...@windriver.com wrote: > > From: Yash Shinde > > > > After rust is upgraded to 1.71 and later versions, the rust oe-selftest > > gives > > build errors due to unstable nightly options(see the error mentioned > > below). Thus, disable the test suite > > until the issue is fixed > > > > error: the option `Z` is only accepted on the nightly compiler > > thread 'main' panicked at 'failed to gather the target spec for > > x86_64-poky-linux-gnu', synthetic_targets.rs:66:9 > > > > Following issues are created in Yocto bugzilla and rust upstream to track > > this issue- > > > > https://bugzilla.yoctoproject.org/show_bug.cgi?id=15275 > > https://github.com/rust-lang/rust/issues/115642 > > https://users.rust-lang.org/t/does-rust-test-suite-supports-nightly-options-during-bootstrapping-in-rust/103108 > > https://users.rust-lang.org/t/unable-to-read-target-specs-when-rust-1-73-is-bootstrapped-in-yocto-poky/102959 > > > > Signed-off-by: Yash Shinde > > --- > > meta/lib/oeqa/selftest/cases/rust.py | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/meta/lib/oeqa/selftest/cases/rust.py > > b/meta/lib/oeqa/selftest/cases/rust.py > > index 7d148142fc..6dbc517006 100644 > > --- a/meta/lib/oeqa/selftest/cases/rust.py > > +++ b/meta/lib/oeqa/selftest/cases/rust.py > > @@ -39,6 +39,9 @@ def parse_results(filename): > > @OETestTag("runqemu") > > class RustSelfTestSystemEmulated(OESelftestTestCase, > > OEPTestResultTestCase): > > def test_rust(self, *args, **kwargs): > > +# Disable Rust Oe-selftest > > +self.skipTest("The Rust Oe-selftest is disabled.") > > + > > # build remote-test-server before image build > > recipe = "rust" > > start_time = time.time() > > Thanks for the Rust update Yash and it's unfortunate that we haven't > resolved the problems > with the test suite. We decided to diskable the tests and do the update > because some changes > were blocked waiting for a newer version of Rust according to Tim. > > Yash, > It would be better to disable (skip) the test suite first so that there > isn't a commit with the testsuite > broken. > > Alex, the commits are independent, will you please re-order them before > merging? Sure! > > ../Randy > > -- > # Randy MacLeod > # Wind River Linux -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192073): https://lists.openembedded.org/g/openembedded-core/message/192073 Mute This Topic: https://lists.openembedded.org/mt/103052789/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/2] rust: Upgrade 1.70.0 -> 1.73.0
On 2023-12-08 9:07 a.m., Alex Kiernan wrote: On Fri, Dec 8, 2023 at 1:55 PM Richard Purdie wrote: On Fri, 2023-12-08 at 13:47 +, Alex Kiernan wrote: On Fri, Dec 8, 2023 at 9:56 AM Shinde, Yash via lists.openembedded.org wrote: From: Yash Shinde In rust 1.72.0 the 'mips*-unknown-linux-gnu*' support demoted from tier2 to tier3. The mips bootstrap compiler is removed from src/stage0.json file and so the same are removed from rust-snapshot.inc. [https://github.com/rust-lang/rust/releases/tag/1.72.0] Drop bootstrap_fail.patch, getrandom-open64.patch as they are merged in upstream rust. ]> Signed-off-by: Yash Shinde --- If we're going to go down the road of disabling the rust oe-selftest (and I don't see a better option right now as we're well behind), I have a series which steps us through each of the releases up to 1.74.0. It also avoids the need for the library/test hack (upstream has a new target we can use for libstd). This sounds useful, particularly this last piece. Can you send it? We could probably combine it with 2/2 in this series if Yash/Randy agree. I've pulled that in as the first patch in the series so if you were bisecting you wouldn't see the oe-selftest fail on upgrade to 1.71. I was just about to ask you to do that! Thanks for being one step ahead of me! It's on top of the cargo cleanups I posted yesterday, so I suspect those are prerequisites (or I could combine the two into one series?) I'm not sure, let's see it on the list and review there. I've not tested every step extensively, but they all build and I've tested cargo in most of them manually inside qemu. Thanks Alex. -- # Randy MacLeod # Wind River Linux -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192072): https://lists.openembedded.org/g/openembedded-core/message/192072 Mute This Topic: https://lists.openembedded.org/mt/103052790/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/2] rust: Upgrade 1.70.0 -> 1.73.0
On Fri, Dec 8, 2023 at 1:55 PM Richard Purdie wrote: > > On Fri, 2023-12-08 at 13:47 +, Alex Kiernan wrote: > > On Fri, Dec 8, 2023 at 9:56 AM Shinde, Yash via lists.openembedded.org > > wrote: > > > > > > From: Yash Shinde > > > > > > In rust 1.72.0 the 'mips*-unknown-linux-gnu*' support demoted from tier2 > > > to tier3. > > > The mips bootstrap compiler is removed from src/stage0.json file and > > > so the same are removed from rust-snapshot.inc. > > > [https://github.com/rust-lang/rust/releases/tag/1.72.0] > > > > > > Drop bootstrap_fail.patch, getrandom-open64.patch > > > as they are merged in upstream rust. > > ]> > > > Signed-off-by: Yash Shinde > > > --- > > > > If we're going to go down the road of disabling the rust oe-selftest > > (and I don't see a better option right now as we're well behind), I > > have a series which steps us through each of the releases up to > > 1.74.0. > > > > It also avoids the need for the library/test hack (upstream has a new > > target we can use for libstd). > > This sounds useful, particularly this last piece. Can you send it? We > could probably combine it with 2/2 in this series if Yash/Randy agree. > I've pulled that in as the first patch in the series so if you were bisecting you wouldn't see the oe-selftest fail on upgrade to 1.71. It's on top of the cargo cleanups I posted yesterday, so I suspect those are prerequisites (or I could combine the two into one series?) I've not tested every step extensively, but they all build and I've tested cargo in most of them manually inside qemu. -- Alex Kiernan -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192071): https://lists.openembedded.org/g/openembedded-core/message/192071 Mute This Topic: https://lists.openembedded.org/mt/103052790/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH 2/2] rust: Disable rust oe-selftest
On 2023-12-08 5:48 a.m., yash.shi...@windriver.com wrote: From: Yash Shinde After rust is upgraded to 1.71 and later versions, the rust oe-selftest gives build errors due to unstable nightly options(see the error mentioned below). Thus, disable the test suite until the issue is fixed error: the option `Z` is only accepted on the nightly compiler thread 'main' panicked at 'failed to gather the target spec for x86_64-poky-linux-gnu', synthetic_targets.rs:66:9 Following issues are created in Yocto bugzilla and rust upstream to track this issue- https://bugzilla.yoctoproject.org/show_bug.cgi?id=15275 https://github.com/rust-lang/rust/issues/115642 https://users.rust-lang.org/t/does-rust-test-suite-supports-nightly-options-during-bootstrapping-in-rust/103108 https://users.rust-lang.org/t/unable-to-read-target-specs-when-rust-1-73-is-bootstrapped-in-yocto-poky/102959 Signed-off-by: Yash Shinde --- meta/lib/oeqa/selftest/cases/rust.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/rust.py b/meta/lib/oeqa/selftest/cases/rust.py index 7d148142fc..6dbc517006 100644 --- a/meta/lib/oeqa/selftest/cases/rust.py +++ b/meta/lib/oeqa/selftest/cases/rust.py @@ -39,6 +39,9 @@ def parse_results(filename): @OETestTag("runqemu") class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase): def test_rust(self, *args, **kwargs): +# Disable Rust Oe-selftest +self.skipTest("The Rust Oe-selftest is disabled.") + # build remote-test-server before image build recipe = "rust" start_time = time.time() Thanks for the Rust update Yash and it's unfortunate that we haven't resolved the problems with the test suite. We decided to diskable the tests and do the update because some changes were blocked waiting for a newer version of Rust according to Tim. Yash, It would be better to disable (skip) the test suite first so that there isn't a commit with the testsuite broken. Alex, the commits are independent, will you please re-order them before merging? ../Randy -- # Randy MacLeod # Wind River Linux -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192070): https://lists.openembedded.org/g/openembedded-core/message/192070 Mute This Topic: https://lists.openembedded.org/mt/103052789/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 6/7] rust: Upgrade 1.72.1 -> 1.73.0
https://blog.rust-lang.org/2023/10/05/Rust-1.73.0.html Signed-off-by: Alex Kiernan --- meta/conf/distro/include/tcmode-default.inc | 2 +- .../rust/{cargo_1.72.1.bb => cargo_1.73.0.bb} | 0 ...-Do-not-use-LFS64-on-linux-with-musl.patch | 36 +- .../rust/files/hardcodepaths.patch| 8 ++- ...ibstd-rs_1.72.1.bb => libstd-rs_1.73.0.bb} | 0 72.1.bb => rust-cross-canadian_1.73.0.bb} | 0 ...ust-llvm_1.72.1.bb => rust-llvm_1.73.0.bb} | 0 meta/recipes-devtools/rust/rust-snapshot.inc | 68 --- meta/recipes-devtools/rust/rust-source.inc| 2 +- .../rust/{rust_1.72.1.bb => rust_1.73.0.bb} | 0 10 files changed, 55 insertions(+), 61 deletions(-) rename meta/recipes-devtools/rust/{cargo_1.72.1.bb => cargo_1.73.0.bb} (100%) rename meta/recipes-devtools/rust/{libstd-rs_1.72.1.bb => libstd-rs_1.73.0.bb} (100%) rename meta/recipes-devtools/rust/{rust-cross-canadian_1.72.1.bb => rust-cross-canadian_1.73.0.bb} (100%) rename meta/recipes-devtools/rust/{rust-llvm_1.72.1.bb => rust-llvm_1.73.0.bb} (100%) rename meta/recipes-devtools/rust/{rust_1.72.1.bb => rust_1.73.0.bb} (100%) diff --git a/meta/conf/distro/include/tcmode-default.inc b/meta/conf/distro/include/tcmode-default.inc index cdadaef2be34..4219a9b56823 100644 --- a/meta/conf/distro/include/tcmode-default.inc +++ b/meta/conf/distro/include/tcmode-default.inc @@ -25,7 +25,7 @@ LINUXLIBCVERSION ?= "6.5%" QEMUVERSION ?= "8.1%" GOVERSION ?= "1.20%" LLVMVERSION ?= "17.%" -RUSTVERSION ?= "1.72%" +RUSTVERSION ?= "1.73%" PREFERRED_VERSION_gcc ?= "${GCCVERSION}" PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}" diff --git a/meta/recipes-devtools/rust/cargo_1.72.1.bb b/meta/recipes-devtools/rust/cargo_1.73.0.bb similarity index 100% rename from meta/recipes-devtools/rust/cargo_1.72.1.bb rename to meta/recipes-devtools/rust/cargo_1.73.0.bb diff --git a/meta/recipes-devtools/rust/files/0001-Do-not-use-LFS64-on-linux-with-musl.patch b/meta/recipes-devtools/rust/files/0001-Do-not-use-LFS64-on-linux-with-musl.patch index dd23d09101ef..794ad804f0dc 100644 --- a/meta/recipes-devtools/rust/files/0001-Do-not-use-LFS64-on-linux-with-musl.patch +++ b/meta/recipes-devtools/rust/files/0001-Do-not-use-LFS64-on-linux-with-musl.patch @@ -19,10 +19,10 @@ Signed-off-by: Khem Raj library/std/src/sys/unix/fs.rs | 27 --- 3 files changed, 38 insertions(+), 12 deletions(-) -Index: rustc-1.72.0-src/library/std/src/os/linux/fs.rs +Index: rustc-1.73.0-src/library/std/src/os/linux/fs.rs === rustc-1.72.0-src.orig/library/std/src/os/linux/fs.rs -+++ rustc-1.72.0-src/library/std/src/os/linux/fs.rs +--- rustc-1.73.0-src.orig/library/std/src/os/linux/fs.rs rustc-1.73.0-src/library/std/src/os/linux/fs.rs @@ -329,7 +329,14 @@ pub trait MetadataExt { impl MetadataExt for Metadata { #[allow(deprecated)] @@ -39,10 +39,10 @@ Index: rustc-1.72.0-src/library/std/src/os/linux/fs.rs } fn st_dev() -> u64 { self.as_inner().as_inner().st_dev as u64 -Index: rustc-1.72.0-src/library/std/src/sys/unix/fd.rs +Index: rustc-1.73.0-src/library/std/src/sys/unix/fd.rs === rustc-1.72.0-src.orig/library/std/src/sys/unix/fd.rs -+++ rustc-1.72.0-src/library/std/src/sys/unix/fd.rs +--- rustc-1.73.0-src.orig/library/std/src/sys/unix/fd.rs rustc-1.73.0-src/library/std/src/sys/unix/fd.rs @@ -124,9 +124,12 @@ impl FileDesc { } @@ -73,11 +73,11 @@ Index: rustc-1.72.0-src/library/std/src/sys/unix/fd.rs use libc::pwrite64; unsafe { -Index: rustc-1.72.0-src/library/std/src/sys/unix/fs.rs +Index: rustc-1.73.0-src/library/std/src/sys/unix/fs.rs === rustc-1.72.0-src.orig/library/std/src/sys/unix/fs.rs -+++ rustc-1.72.0-src/library/std/src/sys/unix/fs.rs -@@ -50,9 +50,13 @@ use libc::{c_int, mode_t}; +--- rustc-1.73.0-src.orig/library/std/src/sys/unix/fs.rs rustc-1.73.0-src/library/std/src/sys/unix/fs.rs +@@ -39,9 +39,13 @@ use libc::{c_int, mode_t}; all(target_os = "linux", target_env = "gnu") ))] use libc::c_char; @@ -93,7 +93,7 @@ Index: rustc-1.72.0-src/library/std/src/sys/unix/fs.rs use libc::fstatat64; #[cfg(any( target_os = "android", -@@ -64,7 +68,7 @@ use libc::fstatat64; +@@ -53,7 +57,7 @@ use libc::fstatat64; target_os = "vita", ))] use libc::readdir as readdir64; @@ -102,7 +102,7 @@ Index: rustc-1.72.0-src/library/std/src/sys/unix/fs.rs use libc::readdir64; #[cfg(any(target_os = "emscripten", target_os = "l4re"))] use libc::readdir64_r; -@@ -79,6 +83,7 @@ use libc::readdir64_r; +@@ -68,6 +72,7 @@ use libc::readdir64_r; target_os = "redox", target_os = "nto", target_os = "vita", @@ -110,7 +110,7 @@ Index: rustc-1.72.0-src/library/std/src/sys/unix/fs.rs )))] use
[OE-Core][PATCH 5/7] rust: Upgrade 1.72.0 -> 1.72.1
https://blog.rust-lang.org/2023/09/19/Rust-1.72.1.html Signed-off-by: Alex Kiernan --- meta/recipes-devtools/rust/{cargo_1.72.0.bb => cargo_1.72.1.bb} | 0 .../rust/{libstd-rs_1.72.0.bb => libstd-rs_1.72.1.bb} | 0 ...t-cross-canadian_1.72.0.bb => rust-cross-canadian_1.72.1.bb} | 0 .../rust/{rust-llvm_1.72.0.bb => rust-llvm_1.72.1.bb} | 0 meta/recipes-devtools/rust/rust-source.inc | 2 +- meta/recipes-devtools/rust/{rust_1.72.0.bb => rust_1.72.1.bb} | 0 6 files changed, 1 insertion(+), 1 deletion(-) rename meta/recipes-devtools/rust/{cargo_1.72.0.bb => cargo_1.72.1.bb} (100%) rename meta/recipes-devtools/rust/{libstd-rs_1.72.0.bb => libstd-rs_1.72.1.bb} (100%) rename meta/recipes-devtools/rust/{rust-cross-canadian_1.72.0.bb => rust-cross-canadian_1.72.1.bb} (100%) rename meta/recipes-devtools/rust/{rust-llvm_1.72.0.bb => rust-llvm_1.72.1.bb} (100%) rename meta/recipes-devtools/rust/{rust_1.72.0.bb => rust_1.72.1.bb} (100%) diff --git a/meta/recipes-devtools/rust/cargo_1.72.0.bb b/meta/recipes-devtools/rust/cargo_1.72.1.bb similarity index 100% rename from meta/recipes-devtools/rust/cargo_1.72.0.bb rename to meta/recipes-devtools/rust/cargo_1.72.1.bb diff --git a/meta/recipes-devtools/rust/libstd-rs_1.72.0.bb b/meta/recipes-devtools/rust/libstd-rs_1.72.1.bb similarity index 100% rename from meta/recipes-devtools/rust/libstd-rs_1.72.0.bb rename to meta/recipes-devtools/rust/libstd-rs_1.72.1.bb diff --git a/meta/recipes-devtools/rust/rust-cross-canadian_1.72.0.bb b/meta/recipes-devtools/rust/rust-cross-canadian_1.72.1.bb similarity index 100% rename from meta/recipes-devtools/rust/rust-cross-canadian_1.72.0.bb rename to meta/recipes-devtools/rust/rust-cross-canadian_1.72.1.bb diff --git a/meta/recipes-devtools/rust/rust-llvm_1.72.0.bb b/meta/recipes-devtools/rust/rust-llvm_1.72.1.bb similarity index 100% rename from meta/recipes-devtools/rust/rust-llvm_1.72.0.bb rename to meta/recipes-devtools/rust/rust-llvm_1.72.1.bb diff --git a/meta/recipes-devtools/rust/rust-source.inc b/meta/recipes-devtools/rust/rust-source.inc index 8860d116c872..61340f817446 100644 --- a/meta/recipes-devtools/rust/rust-source.inc +++ b/meta/recipes-devtools/rust/rust-source.inc @@ -6,7 +6,7 @@ SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;n file://zlib-off64_t.patch;patchdir=${RUSTSRC} \ file://0001-musl-Define-SOCK_SEQPACKET-in-common-place.patch;patchdir=${RUSTSRC} \ " -SRC_URI[rust.sha256sum] = "d307441f8ee78a7e94f72cb5c81383822f13027f79e67a5551bfd2c2d2db3014" +SRC_URI[rust.sha256sum] = "aea58d962ff1c19521b9f587aad88285f0fd35b6b6738b031a7a15bb1b70a7c3" RUSTSRC = "${WORKDIR}/rustc-${RUST_VERSION}-src" diff --git a/meta/recipes-devtools/rust/rust_1.72.0.bb b/meta/recipes-devtools/rust/rust_1.72.1.bb similarity index 100% rename from meta/recipes-devtools/rust/rust_1.72.0.bb rename to meta/recipes-devtools/rust/rust_1.72.1.bb -- 2.39.0 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192066): https://lists.openembedded.org/g/openembedded-core/message/192066 Mute This Topic: https://lists.openembedded.org/mt/103055166/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/7] rust: Upgrade 1.71.0 -> 1.71.1
https://blog.rust-lang.org/2023/08/03/Rust-1.71.1.html Signed-off-by: Alex Kiernan --- meta/recipes-devtools/rust/{cargo_1.71.0.bb => cargo_1.71.1.bb} | 0 .../rust/{libstd-rs_1.71.0.bb => libstd-rs_1.71.1.bb} | 0 ...t-cross-canadian_1.71.0.bb => rust-cross-canadian_1.71.1.bb} | 0 .../rust/{rust-llvm_1.71.0.bb => rust-llvm_1.71.1.bb} | 0 meta/recipes-devtools/rust/rust-source.inc | 2 +- meta/recipes-devtools/rust/{rust_1.71.0.bb => rust_1.71.1.bb} | 0 6 files changed, 1 insertion(+), 1 deletion(-) rename meta/recipes-devtools/rust/{cargo_1.71.0.bb => cargo_1.71.1.bb} (100%) rename meta/recipes-devtools/rust/{libstd-rs_1.71.0.bb => libstd-rs_1.71.1.bb} (100%) rename meta/recipes-devtools/rust/{rust-cross-canadian_1.71.0.bb => rust-cross-canadian_1.71.1.bb} (100%) rename meta/recipes-devtools/rust/{rust-llvm_1.71.0.bb => rust-llvm_1.71.1.bb} (100%) rename meta/recipes-devtools/rust/{rust_1.71.0.bb => rust_1.71.1.bb} (100%) diff --git a/meta/recipes-devtools/rust/cargo_1.71.0.bb b/meta/recipes-devtools/rust/cargo_1.71.1.bb similarity index 100% rename from meta/recipes-devtools/rust/cargo_1.71.0.bb rename to meta/recipes-devtools/rust/cargo_1.71.1.bb diff --git a/meta/recipes-devtools/rust/libstd-rs_1.71.0.bb b/meta/recipes-devtools/rust/libstd-rs_1.71.1.bb similarity index 100% rename from meta/recipes-devtools/rust/libstd-rs_1.71.0.bb rename to meta/recipes-devtools/rust/libstd-rs_1.71.1.bb diff --git a/meta/recipes-devtools/rust/rust-cross-canadian_1.71.0.bb b/meta/recipes-devtools/rust/rust-cross-canadian_1.71.1.bb similarity index 100% rename from meta/recipes-devtools/rust/rust-cross-canadian_1.71.0.bb rename to meta/recipes-devtools/rust/rust-cross-canadian_1.71.1.bb diff --git a/meta/recipes-devtools/rust/rust-llvm_1.71.0.bb b/meta/recipes-devtools/rust/rust-llvm_1.71.1.bb similarity index 100% rename from meta/recipes-devtools/rust/rust-llvm_1.71.0.bb rename to meta/recipes-devtools/rust/rust-llvm_1.71.1.bb diff --git a/meta/recipes-devtools/rust/rust-source.inc b/meta/recipes-devtools/rust/rust-source.inc index 3a192e42db7d..0729db6f0b45 100644 --- a/meta/recipes-devtools/rust/rust-source.inc +++ b/meta/recipes-devtools/rust/rust-source.inc @@ -7,7 +7,7 @@ SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;n file://zlib-off64_t.patch;patchdir=${RUSTSRC} \ file://0001-musl-Define-SOCK_SEQPACKET-in-common-place.patch;patchdir=${RUSTSRC} \ " -SRC_URI[rust.sha256sum] = "5814699031aafdcc2e2f71fc9b389678cd7042350d1583da061463d8e88681c7" +SRC_URI[rust.sha256sum] = "371af0fbe04051e20a74dbea6d4e4e548f10f15309c49cae2688afb882b6c7f1" RUSTSRC = "${WORKDIR}/rustc-${RUST_VERSION}-src" diff --git a/meta/recipes-devtools/rust/rust_1.71.0.bb b/meta/recipes-devtools/rust/rust_1.71.1.bb similarity index 100% rename from meta/recipes-devtools/rust/rust_1.71.0.bb rename to meta/recipes-devtools/rust/rust_1.71.1.bb -- 2.39.0 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192064): https://lists.openembedded.org/g/openembedded-core/message/192064 Mute This Topic: https://lists.openembedded.org/mt/103055164/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/7] rust: Disable rust oe-selftest
From: Yash Shinde After rust is upgraded to 1.71 and later versions, the rust oe-selftest gives build errors due to unstable nightly options(see the error mentioned below). Thus, disable the test suite until the issue is fixed error: the option `Z` is only accepted on the nightly compiler thread 'main' panicked at 'failed to gather the target spec for x86_64-poky-linux-gnu', synthetic_targets.rs:66:9 Following issues are created in Yocto bugzilla and rust upstream to track this issue- https://bugzilla.yoctoproject.org/show_bug.cgi?id=15275 https://github.com/rust-lang/rust/issues/115642 https://users.rust-lang.org/t/does-rust-test-suite-supports-nightly-options-during-bootstrapping-in-rust/103108 https://users.rust-lang.org/t/unable-to-read-target-specs-when-rust-1-73-is-bootstrapped-in-yocto-poky/102959 Signed-off-by: Yash Shinde Signed-off-by: Alex Kiernan --- meta/lib/oeqa/selftest/cases/rust.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/rust.py b/meta/lib/oeqa/selftest/cases/rust.py index 7d148142fc78..6dbc51700689 100644 --- a/meta/lib/oeqa/selftest/cases/rust.py +++ b/meta/lib/oeqa/selftest/cases/rust.py @@ -39,6 +39,9 @@ def parse_results(filename): @OETestTag("runqemu") class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase): def test_rust(self, *args, **kwargs): +# Disable Rust Oe-selftest +self.skipTest("The Rust Oe-selftest is disabled.") + # build remote-test-server before image build recipe = "rust" start_time = time.time() -- 2.39.0 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192063): https://lists.openembedded.org/g/openembedded-core/message/192063 Mute This Topic: https://lists.openembedded.org/mt/103055162/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/2] rust: Upgrade 1.70.0 -> 1.73.0
On Fri, 2023-12-08 at 13:47 +, Alex Kiernan wrote: > On Fri, Dec 8, 2023 at 9:56 AM Shinde, Yash via lists.openembedded.org > wrote: > > > > From: Yash Shinde > > > > In rust 1.72.0 the 'mips*-unknown-linux-gnu*' support demoted from tier2 to > > tier3. > > The mips bootstrap compiler is removed from src/stage0.json file and > > so the same are removed from rust-snapshot.inc. > > [https://github.com/rust-lang/rust/releases/tag/1.72.0] > > > > Drop bootstrap_fail.patch, getrandom-open64.patch > > as they are merged in upstream rust. > ]> > > Signed-off-by: Yash Shinde > > --- > > If we're going to go down the road of disabling the rust oe-selftest > (and I don't see a better option right now as we're well behind), I > have a series which steps us through each of the releases up to > 1.74.0. > > It also avoids the need for the library/test hack (upstream has a new > target we can use for libstd). This sounds useful, particularly this last piece. Can you send it? We could probably combine it with 2/2 in this series if Yash/Randy agree. Cheers, Richard -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192062): https://lists.openembedded.org/g/openembedded-core/message/192062 Mute This Topic: https://lists.openembedded.org/mt/103052790/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/2] rust: Upgrade 1.70.0 -> 1.73.0
On Fri, Dec 8, 2023 at 9:56 AM Shinde, Yash via lists.openembedded.org wrote: > > From: Yash Shinde > > In rust 1.72.0 the 'mips*-unknown-linux-gnu*' support demoted from tier2 to > tier3. > The mips bootstrap compiler is removed from src/stage0.json file and > so the same are removed from rust-snapshot.inc. > [https://github.com/rust-lang/rust/releases/tag/1.72.0] > > Drop bootstrap_fail.patch, getrandom-open64.patch > as they are merged in upstream rust. ]> > Signed-off-by: Yash Shinde > --- If we're going to go down the road of disabling the rust oe-selftest (and I don't see a better option right now as we're well behind), I have a series which steps us through each of the releases up to 1.74.0. It also avoids the need for the library/test hack (upstream has a new target we can use for libstd). -- Alex Kiernan -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192061): https://lists.openembedded.org/g/openembedded-core/message/192061 Mute This Topic: https://lists.openembedded.org/mt/103052790/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] bbtests.py: Add test for unexpanded variables in the dirname
Regression test for [Yocto #15255] Signed-off-by: Pavel Zhukov --- meta/lib/oeqa/selftest/cases/bbtests.py | 11 +++ 1 file changed, 11 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py b/meta/lib/oeqa/selftest/cases/bbtests.py index d242352ea2..0da59e0f58 100644 --- a/meta/lib/oeqa/selftest/cases/bbtests.py +++ b/meta/lib/oeqa/selftest/cases/bbtests.py @@ -362,3 +362,14 @@ INHERIT:remove = \"report-error\" result = bitbake('gitunpackoffline-fail -c fetch', ignore_status=True) self.assertTrue(re.search("Recipe uses a floating tag/branch .* for repo .* without a fixed SRCREV yet doesn't call bb.fetch2.get_srcrev()", result.output), msg = "Recipe without PV set to SRCPV should have failed: %s" % result.output) + +def test_unexpanded_variable_in_path(self): +""" +Test that bitbake fails if directory contains unexpanded bitbake variable in the name +""" +recipe_name = "gitunpackoffline" +self.write_config('PV:pn-gitunpackoffline:append = "+${UNDEFVAL}"') +result = bitbake('{}'.format(recipe_name), ignore_status=True) +self.assertGreater(result.status, 0, "Build should have failed if ${ is in the path") +self.assertTrue(re.search("ERROR: Directory name /.* contains unexpanded bitbake variable. This may cause build failures and WORKDIR polution", + result.output), msg = "mkdirhier with unexpanded variable should have failed: %s" % result.output) -- 2.41.0 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192060): https://lists.openembedded.org/g/openembedded-core/message/192060 Mute This Topic: https://lists.openembedded.org/mt/103054441/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] Patchtest results for [PATCH v3] bbtests.py: Add test for unexpanded variables in the dirname
Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information: --- Testing patch /home/patchtest/share/mboxes/v3-bbtests.py-Add-test-for-unexpanded-variables-in-the-dirname.patch FAIL: test max line length: Patch line too long (current length 250, maximum is 200) (test_metadata.TestMetadata.test_max_line_length) PASS: pretest pylint (test_python_pylint.PyLint.pretest_pylint) PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence) PASS: test author valid (test_mbox.TestMbox.test_author_valid) PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence) PASS: test mbox format (test_mbox.TestMbox.test_mbox_format) PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade) PASS: test pylint (test_python_pylint.PyLint.test_pylint) PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format) PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length) SKIP: pretest src uri left files: No modified recipes, skipping pretest (test_metadata.TestMetadata.pretest_src_uri_left_files) SKIP: test CVE tag format: No new CVE patches introduced (test_patch.TestPatch.test_cve_tag_format) SKIP: test Signed-off-by presence: No new CVE patches introduced (test_patch.TestPatch.test_signed_off_by_presence) SKIP: test Upstream-Status presence: No new CVE patches introduced (test_patch.TestPatch.test_upstream_status_presence_format) SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format) SKIP: test lic files chksum modified not mentioned: No modified recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned) SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence) SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence) SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head) SKIP: test src uri left files: No modified recipes, skipping pretest (test_metadata.TestMetadata.test_src_uri_left_files) SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence) SKIP: test target mailing list: Series merged, no reason to check other mailing lists (test_mbox.TestMbox.test_target_mailing_list) --- Please address the issues identified and submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you! -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192059): https://lists.openembedded.org/g/openembedded-core/message/192059 Mute This Topic: https://lists.openembedded.org/mt/103054362/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] Patchtest results for [PATCH] bbtests.py: Add test for unexpanded variables in the dirname
Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information: --- Testing patch /home/patchtest/share/mboxes/bbtests.py-Add-test-for-unexpanded-variables-in-the-dirname.patch FAIL: test max line length: Patch line too long (current length 250, maximum is 200) (test_metadata.TestMetadata.test_max_line_length) PASS: pretest pylint (test_python_pylint.PyLint.pretest_pylint) PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence) PASS: test author valid (test_mbox.TestMbox.test_author_valid) PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence) PASS: test mbox format (test_mbox.TestMbox.test_mbox_format) PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade) PASS: test pylint (test_python_pylint.PyLint.test_pylint) PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format) PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length) SKIP: pretest src uri left files: No modified recipes, skipping pretest (test_metadata.TestMetadata.pretest_src_uri_left_files) SKIP: test CVE tag format: No new CVE patches introduced (test_patch.TestPatch.test_cve_tag_format) SKIP: test Signed-off-by presence: No new CVE patches introduced (test_patch.TestPatch.test_signed_off_by_presence) SKIP: test Upstream-Status presence: No new CVE patches introduced (test_patch.TestPatch.test_upstream_status_presence_format) SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format) SKIP: test lic files chksum modified not mentioned: No modified recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned) SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence) SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence) SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head) SKIP: test src uri left files: No modified recipes, skipping pretest (test_metadata.TestMetadata.test_src_uri_left_files) SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence) SKIP: test target mailing list: Series merged, no reason to check other mailing lists (test_mbox.TestMbox.test_target_mailing_list) --- Please address the issues identified and submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you! -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192057): https://lists.openembedded.org/g/openembedded-core/message/192057 Mute This Topic: https://lists.openembedded.org/mt/103054293/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] Patchtest results for [PATCH v2] bbtests.py: Add test for unexpanded variables in the dirname
Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information: --- Testing patch /home/patchtest/share/mboxes/v2-bbtests.py-Add-test-for-unexpanded-variables-in-the-dirname.patch FAIL: test max line length: Patch line too long (current length 250, maximum is 200) (test_metadata.TestMetadata.test_max_line_length) PASS: pretest pylint (test_python_pylint.PyLint.pretest_pylint) PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence) PASS: test author valid (test_mbox.TestMbox.test_author_valid) PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence) PASS: test mbox format (test_mbox.TestMbox.test_mbox_format) PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade) PASS: test pylint (test_python_pylint.PyLint.test_pylint) PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format) PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length) SKIP: pretest src uri left files: No modified recipes, skipping pretest (test_metadata.TestMetadata.pretest_src_uri_left_files) SKIP: test CVE tag format: No new CVE patches introduced (test_patch.TestPatch.test_cve_tag_format) SKIP: test Signed-off-by presence: No new CVE patches introduced (test_patch.TestPatch.test_signed_off_by_presence) SKIP: test Upstream-Status presence: No new CVE patches introduced (test_patch.TestPatch.test_upstream_status_presence_format) SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format) SKIP: test lic files chksum modified not mentioned: No modified recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned) SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence) SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence) SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head) SKIP: test src uri left files: No modified recipes, skipping pretest (test_metadata.TestMetadata.test_src_uri_left_files) SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence) SKIP: test target mailing list: Series merged, no reason to check other mailing lists (test_mbox.TestMbox.test_target_mailing_list) --- Please address the issues identified and submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you! -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192058): https://lists.openembedded.org/g/openembedded-core/message/192058 Mute This Topic: https://lists.openembedded.org/mt/103054294/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] [PATCH v3] bbtests.py: Add test for unexpanded variables in the dirname
Regression test for [Yocto #15255] Signed-off-by: Pavel Zhukov --- meta/lib/oeqa/selftest/cases/bbtests.py | 10 ++ 1 file changed, 10 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py b/meta/lib/oeqa/selftest/cases/bbtests.py index d242352ea2..2bc1898f2b 100644 --- a/meta/lib/oeqa/selftest/cases/bbtests.py +++ b/meta/lib/oeqa/selftest/cases/bbtests.py @@ -362,3 +362,13 @@ INHERIT:remove = \"report-error\" result = bitbake('gitunpackoffline-fail -c fetch', ignore_status=True) self.assertTrue(re.search("Recipe uses a floating tag/branch .* for repo .* without a fixed SRCREV yet doesn't call bb.fetch2.get_srcrev()", result.output), msg = "Recipe without PV set to SRCPV should have failed: %s" % result.output) + +def test_unexpanded_variable_in_path(self): +""" +Test that bitbake fails if directory contains unexpanded bitbake variable in the name +""" +recipe_name = "gitunpackoffline" +self.write_config('PV:pn-gitunpackoffline:append = "+${UNDEFVAL}"') +result = bitbake('{}'.format(recipe_name), ignore_status=True) +self.assertGreater(result.status, 0, "Build should have failed if ${ is in the path") +self.assertTrue(re.search("ERROR: Directory name /.* contains unexpanded bitbake variable. This may cause build failures and WORKDIR polution", result.output), msg = "mkdirhier with unexpanded variable should have failed: %s" % result.output) -- 2.41.0 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192056): https://lists.openembedded.org/g/openembedded-core/message/192056 Mute This Topic: https://lists.openembedded.org/mt/103054038/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] bbtests.py: Add test for unexpanded variables in the dirname
Regression test for [Yocto #15255] Signed-off-by: Pavel Zhukov --- meta/lib/oeqa/selftest/cases/bbtests.py | 9 + 1 file changed, 9 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py b/meta/lib/oeqa/selftest/cases/bbtests.py index d242352ea2..03faf1a881 100644 --- a/meta/lib/oeqa/selftest/cases/bbtests.py +++ b/meta/lib/oeqa/selftest/cases/bbtests.py @@ -362,3 +362,12 @@ INHERIT:remove = \"report-error\" result = bitbake('gitunpackoffline-fail -c fetch', ignore_status=True) self.assertTrue(re.search("Recipe uses a floating tag/branch .* for repo .* without a fixed SRCREV yet doesn't call bb.fetch2.get_srcrev()", result.output), msg = "Recipe without PV set to SRCPV should have failed: %s" % result.output) + +def test_unexpanded_variable_in_path(self): +""" +Test if typo SRC_URI => SRC_URL causes bitbake to explode +""" +recipe_name = "gitunpackoffline" +self.write_config('PV:pn-gitunpackoffline:append = "+${UNDEFVAL}"') +result = bitbake('{}'.format(recipe_name), ignore_status=True) +self.assertTrue(re.search("ERROR: Directory name /.* contains unexpanded bitbake variable. This may cause build failures and WORKDIR polution", result.output), msg = "mkdirhier with unexpanded variable should have failed: %s" % result.output) -- 2.41.0 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192055): https://lists.openembedded.org/g/openembedded-core/message/192055 Mute This Topic: https://lists.openembedded.org/mt/103054007/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 6/6] oeqa/selftest/sstatetests: re-disable CDN tests
On Fri, 2023-12-08 at 13:24 +0100, Alexander Kanavin wrote: > On Fri, 8 Dec 2023 at 13:22, Richard Purdie > wrote: > > > Crazy question - for the CDN tests, why don't we try just setting a > > dummy SSTATE_DIR, then "bitbake -n" and check the "State > > Summary:" line in the output? > > It would be good to know what is missing though, not just how many? Ideally, yes. You could do that with a -DD option added and filter the output for the misses? Cheers, Richard -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192054): https://lists.openembedded.org/g/openembedded-core/message/192054 Mute This Topic: https://lists.openembedded.org/mt/103052555/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 6/6] oeqa/selftest/sstatetests: re-disable CDN tests
On Fri, 8 Dec 2023 at 13:22, Richard Purdie wrote: > Crazy question - for the CDN tests, why don't we try just setting a > dummy SSTATE_DIR, then "bitbake -n" and check the "State > Summary:" line in the output? It would be good to know what is missing though, not just how many? Alex -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192053): https://lists.openembedded.org/g/openembedded-core/message/192053 Mute This Topic: https://lists.openembedded.org/mt/103052555/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] bbtests.py: Add test for unexpanded variables in the dirname
On Fri, 2023-12-08 at 12:38 +0100, Pavel Zhukov wrote: > Regression test for [Yocto #15255] > > Signed-off-by: Pavel Zhukov > --- > meta/lib/oeqa/selftest/cases/bbtests.py | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py > b/meta/lib/oeqa/selftest/cases/bbtests.py > index d242352ea2..03faf1a881 100644 > --- a/meta/lib/oeqa/selftest/cases/bbtests.py > +++ b/meta/lib/oeqa/selftest/cases/bbtests.py > @@ -362,3 +362,12 @@ INHERIT:remove = \"report-error\" > > result = bitbake('gitunpackoffline-fail -c fetch', > ignore_status=True) > self.assertTrue(re.search("Recipe uses a floating tag/branch .* for > repo .* without a fixed SRCREV yet doesn't call bb.fetch2.get_srcrev()", > result.output), msg = "Recipe without PV set to SRCPV should have failed: %s" > % result.output) > + > +def test_unexpanded_variable_in_path(self): > +""" > +Test if typo SRC_URI => SRC_URL causes bitbake to explode This is a little confusing since this isn't what the test actually does! > +""" > +recipe_name = "gitunpackoffline" > +self.write_config('PV:pn-gitunpackoffline:append = "+${UNDEFVAL}"') > +result = bitbake('{}'.format(recipe_name), ignore_status=True) > +self.assertTrue(re.search("ERROR: Directory name /.* contains > unexpanded bitbake variable. This may cause build failures and WORKDIR > polution", result.output), msg = "mkdirhier with unexpanded variable should > have failed: %s" % result.output) We also want to check the result was an error (failed) build? Cheers, Richard -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192052): https://lists.openembedded.org/g/openembedded-core/message/192052 Mute This Topic: https://lists.openembedded.org/mt/103053151/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 6/6] oeqa/selftest/sstatetests: re-disable CDN tests
On Fri, 2023-12-08 at 11:15 +0100, Alexander Kanavin wrote: > With the rework of printdiff, it is not longer useful for checking > absence of sstate objects in a remote http cache, as it would only > report the top level missing signatures, and leave the recursive > investigation to diffsigs (which relies on ability to list cache > files - not available over http). > > The CDN check will be performed via a separate 'printmissing' > function, which would be written specifically for the purpose, > and so until then disable the test as it would only persistently fail. > > Signed-off-by: Alexander Kanavin > --- > meta/lib/oeqa/selftest/cases/sstatetests.py | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py > b/meta/lib/oeqa/selftest/cases/sstatetests.py > index 07e82d25c62..97ac0d2e9d9 100644 > --- a/meta/lib/oeqa/selftest/cases/sstatetests.py > +++ b/meta/lib/oeqa/selftest/cases/sstatetests.py > @@ -930,12 +930,12 @@ SSTATE_MIRRORS ?= "file://.* > http://cdn.jsdelivr.net/yocto/sstate/all/PATH;downl > result = bitbake("-D -S printdiff {}".format(targets)) > self.check_bb_output(result.output, exceptions) > > -def test_cdn_mirror_qemux86_64(self): > +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): > +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) Crazy question - for the CDN tests, why don't we try just setting a dummy SSTATE_DIR, then "bitbake -n" and check the "State Summary:" line in the output? Cheers, Richard -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192051): https://lists.openembedded.org/g/openembedded-core/message/192051 Mute This Topic: https://lists.openembedded.org/mt/103052555/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 4/4] cargo: Add CARGO_LOCK_PATH for path to Cargo.lock
When building a workspace enabled project, the Cargo.lock is found at the root of the project, not alongside the Cargo.toml. Expose CARGO_LOCK_PATH so it can be explicitly configured. Signed-off-by: Alex Kiernan --- Changes in v2: - Change CARGO_LOCK_PATH to a weak-default meta/classes-recipe/cargo_common.bbclass | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meta/classes-recipe/cargo_common.bbclass b/meta/classes-recipe/cargo_common.bbclass index 48cdd69bca13..0fb443edbdde 100644 --- a/meta/classes-recipe/cargo_common.bbclass +++ b/meta/classes-recipe/cargo_common.bbclass @@ -40,6 +40,9 @@ CARGO_SRC_DIR ??= "" # The actual path to the Cargo.toml CARGO_MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml" +# Path to Cargo.lock +CARGO_LOCK_PATH ??= "${@ os.path.join(os.path.dirname(d.getVar('CARGO_MANIFEST_PATH', True)), 'Cargo.lock')}" + CARGO_RUST_TARGET_CCLD ??= "${RUST_TARGET_CCLD}" cargo_common_do_configure () { mkdir -p ${CARGO_HOME}/bitbake @@ -168,8 +171,7 @@ python cargo_common_do_patch_paths() { # here is better than letting cargo tell (in case the file is missing) # "Cargo.lock should be modified but --frozen was given" -manifest_path = d.getVar("CARGO_MANIFEST_PATH", True) -lockfile = os.path.join(os.path.dirname(manifest_path), "Cargo.lock") +lockfile = d.getVar("CARGO_LOCK_PATH", True) if not os.path.exists(lockfile): bb.fatal(f"{lockfile} file doesn't exist") -- 2.39.0 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192050): https://lists.openembedded.org/g/openembedded-core/message/192050 Mute This Topic: https://lists.openembedded.org/mt/103053307/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 3/4] rust: cargo: Convert single-valued variables to weak defaults
All of these variables are single-valued, so we can use weak-defaults for them and only see the final assignment after parsing. Signed-off-by: Alex Kiernan --- Changes in v2: - New in v2 meta/classes-recipe/cargo_common.bbclass | 6 +++--- meta/classes-recipe/rust-common.bbclass | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/meta/classes-recipe/cargo_common.bbclass b/meta/classes-recipe/cargo_common.bbclass index 509aa195c5fa..48cdd69bca13 100644 --- a/meta/classes-recipe/cargo_common.bbclass +++ b/meta/classes-recipe/cargo_common.bbclass @@ -28,10 +28,10 @@ export PKG_CONFIG_ALLOW_CROSS = "1" # Don't instruct cargo to use crates downloaded by bitbake. Some rust packages, # for example the rust compiler itself, come with their own vendored sources. # Specifying two [source.crates-io] will not work. -CARGO_DISABLE_BITBAKE_VENDORING ?= "0" +CARGO_DISABLE_BITBAKE_VENDORING ??= "0" # Used by libstd-rs to point to the vendor dir included in rustc src -CARGO_VENDORING_DIRECTORY ?= "${CARGO_HOME}/bitbake" +CARGO_VENDORING_DIRECTORY ??= "${CARGO_HOME}/bitbake" # The directory of the Cargo.toml relative to the root directory, per default # assume there's a Cargo.toml directly in the root directory @@ -40,7 +40,7 @@ CARGO_SRC_DIR ??= "" # The actual path to the Cargo.toml CARGO_MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml" -CARGO_RUST_TARGET_CCLD ?= "${RUST_TARGET_CCLD}" +CARGO_RUST_TARGET_CCLD ??= "${RUST_TARGET_CCLD}" cargo_common_do_configure () { mkdir -p ${CARGO_HOME}/bitbake diff --git a/meta/classes-recipe/rust-common.bbclass b/meta/classes-recipe/rust-common.bbclass index ae96d9c5b1ff..6940093e59bf 100644 --- a/meta/classes-recipe/rust-common.bbclass +++ b/meta/classes-recipe/rust-common.bbclass @@ -16,8 +16,8 @@ FILES:${PN}-dbg += "${rustlibdir}/.debug" RUSTLIB = "-L ${STAGING_DIR_HOST}${rustlibdir}" RUST_DEBUG_REMAP = "--remap-path-prefix=${WORKDIR}=${TARGET_DBGSRC_DIR}" RUSTFLAGS += "${RUSTLIB} ${RUST_DEBUG_REMAP}" -RUSTLIB_DEP ?= "libstd-rs" -RUST_PANIC_STRATEGY ?= "unwind" +RUSTLIB_DEP ??= "libstd-rs" +RUST_PANIC_STRATEGY ??= "unwind" def target_is_armv7(d): '''Determine if target is armv7''' -- 2.39.0 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192049): https://lists.openembedded.org/g/openembedded-core/message/192049 Mute This Topic: https://lists.openembedded.org/mt/103053306/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-Core][PATCH v2 1/4] cargo: Rename MANIFEST_PATH -> CARGO_MANIFEST_PATH
This variable is a piece of recipe configurable interface, scope it with the class name to make that clear. Signed-off-by: Alex Kiernan --- (no changes since v1) meta/classes-recipe/cargo.bbclass| 4 ++-- meta/classes-recipe/cargo_common.bbclass | 2 +- meta/classes-recipe/ptest-cargo.bbclass | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meta/classes-recipe/cargo.bbclass b/meta/classes-recipe/cargo.bbclass index 8c0b92df8d33..96a74e2ef1ec 100644 --- a/meta/classes-recipe/cargo.bbclass +++ b/meta/classes-recipe/cargo.bbclass @@ -35,7 +35,7 @@ export RUST_BACKTRACE = "1" CARGO_SRC_DIR ??= "" # The actual path to the Cargo.toml -MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml" +CARGO_MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml" RUSTFLAGS ??= "" BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}" @@ -44,7 +44,7 @@ BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}" # and will require an up to date Cargo.lock file. # This force the package being built to already ship a Cargo.lock, in the end # this is what we want, at least, for reproducibility of the build. -CARGO_BUILD_FLAGS = "-v --frozen --target ${RUST_HOST_SYS} ${BUILD_MODE} --manifest-path=${MANIFEST_PATH}" +CARGO_BUILD_FLAGS = "-v --frozen --target ${RUST_HOST_SYS} ${BUILD_MODE} --manifest-path=${CARGO_MANIFEST_PATH}" # This is based on the content of CARGO_BUILD_FLAGS and generally will need to # change if CARGO_BUILD_FLAGS changes. diff --git a/meta/classes-recipe/cargo_common.bbclass b/meta/classes-recipe/cargo_common.bbclass index b732a1bd9538..bf298e96c745 100644 --- a/meta/classes-recipe/cargo_common.bbclass +++ b/meta/classes-recipe/cargo_common.bbclass @@ -161,7 +161,7 @@ python cargo_common_do_patch_paths() { # here is better than letting cargo tell (in case the file is missing) # "Cargo.lock should be modified but --frozen was given" -manifest_path = d.getVar("MANIFEST_PATH", True) +manifest_path = d.getVar("CARGO_MANIFEST_PATH", True) lockfile = os.path.join(os.path.dirname(manifest_path), "Cargo.lock") if not os.path.exists(lockfile): bb.fatal(f"{lockfile} file doesn't exist") diff --git a/meta/classes-recipe/ptest-cargo.bbclass b/meta/classes-recipe/ptest-cargo.bbclass index ff57be852508..c46df362bfee 100644 --- a/meta/classes-recipe/ptest-cargo.bbclass +++ b/meta/classes-recipe/ptest-cargo.bbclass @@ -15,7 +15,7 @@ python do_compile_ptest_cargo() { 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) +manifest_path = d.getVar("CARGO_MANIFEST_PATH", True) project_manifest_path = os.path.normpath(manifest_path) manifest_dir = os.path.dirname(manifest_path) -- 2.39.0 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192047): https://lists.openembedded.org/g/openembedded-core/message/192047 Mute This Topic: https://lists.openembedded.org/mt/103053302/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-Core][PATCH v2 2/4] cargo: Move CARGO_MANIFEST_PATH/CARGO_SRC_DIR to cargo_common
cargo_common_do_configure uses CARGO_MANIFEST_PATH (which depends on CARGO_SRC_DIR), but their definition was in cargo.bbclass. Signed-off-by: Alex Kiernan --- Changes in v2: - Drop change from default to weak-defaults meta/classes-recipe/cargo.bbclass| 7 --- meta/classes-recipe/cargo_common.bbclass | 7 +++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/meta/classes-recipe/cargo.bbclass b/meta/classes-recipe/cargo.bbclass index 96a74e2ef1ec..0829a58dd90f 100644 --- a/meta/classes-recipe/cargo.bbclass +++ b/meta/classes-recipe/cargo.bbclass @@ -30,13 +30,6 @@ B = "${WORKDIR}/build" # where the issue occured export RUST_BACKTRACE = "1" -# The directory of the Cargo.toml relative to the root directory, per default -# assume there's a Cargo.toml directly in the root directory -CARGO_SRC_DIR ??= "" - -# The actual path to the Cargo.toml -CARGO_MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml" - RUSTFLAGS ??= "" BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}" # --frozen flag will prevent network access (which is required since only diff --git a/meta/classes-recipe/cargo_common.bbclass b/meta/classes-recipe/cargo_common.bbclass index bf298e96c745..509aa195c5fa 100644 --- a/meta/classes-recipe/cargo_common.bbclass +++ b/meta/classes-recipe/cargo_common.bbclass @@ -33,6 +33,13 @@ CARGO_DISABLE_BITBAKE_VENDORING ?= "0" # Used by libstd-rs to point to the vendor dir included in rustc src CARGO_VENDORING_DIRECTORY ?= "${CARGO_HOME}/bitbake" +# The directory of the Cargo.toml relative to the root directory, per default +# assume there's a Cargo.toml directly in the root directory +CARGO_SRC_DIR ??= "" + +# The actual path to the Cargo.toml +CARGO_MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml" + CARGO_RUST_TARGET_CCLD ?= "${RUST_TARGET_CCLD}" cargo_common_do_configure () { mkdir -p ${CARGO_HOME}/bitbake -- 2.39.0 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192048): https://lists.openembedded.org/g/openembedded-core/message/192048 Mute This Topic: https://lists.openembedded.org/mt/103053304/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 1/1] bluez5: fix CVE-2023-45866
From: Archana Polampalli Bluetooth HID Hosts in BlueZ may permit an unauthenticated Peripheral role HID Device to initiate and establish an encrypted connection, and accept HID keyboard reports,potentially permitting injection of HID messages when no user interaction has occurred in the Central role to authorize such access. An example affected package is bluez 5.64-0ubuntu1 in Ubuntu 22.04LTS. NOTE: in some cases, a CVE-2020-0556 mitigation would have already addressed this Bluetooth HID Hosts issue. References: https://nvd.nist.gov/vuln/detail/CVE-2023-45866 Upstream patches: https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/profiles/input?id=25a471a83e02e1effb15d5a488b3f0085eaeb675 Signed-off-by: Archana Polampalli --- meta/recipes-connectivity/bluez5/bluez5.inc | 1 + .../bluez5/bluez5/CVE-2023-45866.patch| 56 +++ 2 files changed, 57 insertions(+) create mode 100644 meta/recipes-connectivity/bluez5/bluez5/CVE-2023-45866.patch diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc b/meta/recipes-connectivity/bluez5/bluez5.inc index a8eaba1dd6..7786b65670 100644 --- a/meta/recipes-connectivity/bluez5/bluez5.inc +++ b/meta/recipes-connectivity/bluez5/bluez5.inc @@ -54,6 +54,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch', d)} \ file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \ file://0001-test-gatt-Fix-hung-issue.patch \ + file://CVE-2023-45866.patch \ " S = "${WORKDIR}/bluez-${PV}" diff --git a/meta/recipes-connectivity/bluez5/bluez5/CVE-2023-45866.patch b/meta/recipes-connectivity/bluez5/bluez5/CVE-2023-45866.patch new file mode 100644 index 00..5bb31d866a --- /dev/null +++ b/meta/recipes-connectivity/bluez5/bluez5/CVE-2023-45866.patch @@ -0,0 +1,56 @@ +From 25a471a83e02e1effb15d5a488b3f0085eaeb675 Mon Sep 17 00:00:00 2001 +From: Luiz Augusto von Dentz +Date: Tue, 10 Oct 2023 13:03:12 -0700 +Subject: [PATCH] input.conf: Change default of ClassicBondedOnly + +This changes the default of ClassicBondedOnly since defaulting to false +is not inline with HID specification which mandates the of Security Mode +4: + +BLUETOOTH SPECIFICATION Page 84 of 123 +Human Interface Device (HID) Profile: + + 5.4.3.4.2 Security Modes + Bluetooth HID Hosts shall use Security Mode 4 when interoperating with + Bluetooth HID devices that are compliant to the Bluetooth Core + Specification v2.1+EDR[6]. + +Upstream-Status: Backport +[https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/profiles/input?id=25a471a83e02e1effb15d5a488b3f0085eaeb675] + +CVE: CVE-2023-45866 + +Signed-off-by: Archana Polampalli +--- + profiles/input/device.c | 2 +- + profiles/input/input.conf | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/profiles/input/device.c b/profiles/input/device.c +index 4a50ea9..4310dd1 100644 +--- a/profiles/input/device.c b/profiles/input/device.c +@@ -81,7 +81,7 @@ struct input_device { + + static int idle_timeout = 0; + static bool uhid_enabled = false; +-static bool classic_bonded_only = false; ++static bool classic_bonded_only = true; + + void input_set_idle_timeout(int timeout) + { +diff --git a/profiles/input/input.conf b/profiles/input/input.conf +index 4c70bc5..d8645f3 100644 +--- a/profiles/input/input.conf b/profiles/input/input.conf +@@ -17,7 +17,7 @@ + # platforms may want to make sure that input connections only come from bonded + # device connections. Several older mice have been known for not supporting + # pairing/encryption. +-# Defaults to false to maximize device compatibility. ++# Defaults to true for security. + #ClassicBondedOnly=true + + # LE upgrade security +-- +2.40.0 -- 2.40.0 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192046): https://lists.openembedded.org/g/openembedded-core/message/192046 Mute This Topic: https://lists.openembedded.org/mt/103053193/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] bluez5: fix CVE-2023-45866
From: Archana Polampalli Bluetooth HID Hosts in BlueZ may permit an unauthenticated Peripheral role HID Device to initiate and establish an encrypted connection, and accept HID keyboard reports,potentially permitting injection of HID messages when no user interaction has occurred in the Central role to authorize such access. An example affected package is bluez 5.64-0ubuntu1 in Ubuntu 22.04LTS. NOTE: in some cases, a CVE-2020-0556 mitigation would have already addressed this Bluetooth HID Hosts issue. References: https://nvd.nist.gov/vuln/detail/CVE-2023-45866 Upstream patches: https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/profiles/input?id=25a471a83e02e1effb15d5a488b3f0085eaeb675 Signed-off-by: Archana Polampalli --- meta/recipes-connectivity/bluez5/bluez5.inc | 1 + .../bluez5/bluez5/CVE-2023-45866.patch| 56 +++ 2 files changed, 57 insertions(+) create mode 100644 meta/recipes-connectivity/bluez5/bluez5/CVE-2023-45866.patch diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc b/meta/recipes-connectivity/bluez5/bluez5.inc index a23e4e58a6..0bb157e202 100644 --- a/meta/recipes-connectivity/bluez5/bluez5.inc +++ b/meta/recipes-connectivity/bluez5/bluez5.inc @@ -56,6 +56,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \ file://0001-test-gatt-Fix-hung-issue.patch \ file://0004-src-shared-util.c-include-linux-limits.h.patch \ file://0002-input-Fix-.device_probe-failing-if-SDP-record-is-not.patch \ + file://CVE-2023-45866.patch \ " S = "${WORKDIR}/bluez-${PV}" diff --git a/meta/recipes-connectivity/bluez5/bluez5/CVE-2023-45866.patch b/meta/recipes-connectivity/bluez5/bluez5/CVE-2023-45866.patch new file mode 100644 index 00..5bb31d866a --- /dev/null +++ b/meta/recipes-connectivity/bluez5/bluez5/CVE-2023-45866.patch @@ -0,0 +1,56 @@ +From 25a471a83e02e1effb15d5a488b3f0085eaeb675 Mon Sep 17 00:00:00 2001 +From: Luiz Augusto von Dentz +Date: Tue, 10 Oct 2023 13:03:12 -0700 +Subject: [PATCH] input.conf: Change default of ClassicBondedOnly + +This changes the default of ClassicBondedOnly since defaulting to false +is not inline with HID specification which mandates the of Security Mode +4: + +BLUETOOTH SPECIFICATION Page 84 of 123 +Human Interface Device (HID) Profile: + + 5.4.3.4.2 Security Modes + Bluetooth HID Hosts shall use Security Mode 4 when interoperating with + Bluetooth HID devices that are compliant to the Bluetooth Core + Specification v2.1+EDR[6]. + +Upstream-Status: Backport +[https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/profiles/input?id=25a471a83e02e1effb15d5a488b3f0085eaeb675] + +CVE: CVE-2023-45866 + +Signed-off-by: Archana Polampalli +--- + profiles/input/device.c | 2 +- + profiles/input/input.conf | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/profiles/input/device.c b/profiles/input/device.c +index 4a50ea9..4310dd1 100644 +--- a/profiles/input/device.c b/profiles/input/device.c +@@ -81,7 +81,7 @@ struct input_device { + + static int idle_timeout = 0; + static bool uhid_enabled = false; +-static bool classic_bonded_only = false; ++static bool classic_bonded_only = true; + + void input_set_idle_timeout(int timeout) + { +diff --git a/profiles/input/input.conf b/profiles/input/input.conf +index 4c70bc5..d8645f3 100644 +--- a/profiles/input/input.conf b/profiles/input/input.conf +@@ -17,7 +17,7 @@ + # platforms may want to make sure that input connections only come from bonded + # device connections. Several older mice have been known for not supporting + # pairing/encryption. +-# Defaults to false to maximize device compatibility. ++# Defaults to true for security. + #ClassicBondedOnly=true + + # LE upgrade security +-- +2.40.0 -- 2.40.0 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192045): https://lists.openembedded.org/g/openembedded-core/message/192045 Mute This Topic: https://lists.openembedded.org/mt/103053192/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] bbtests.py: Add test for unexpanded variables in the dirname
Regression test for [Yocto #15255] Signed-off-by: Pavel Zhukov --- meta/lib/oeqa/selftest/cases/bbtests.py | 9 + 1 file changed, 9 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py b/meta/lib/oeqa/selftest/cases/bbtests.py index d242352ea2..03faf1a881 100644 --- a/meta/lib/oeqa/selftest/cases/bbtests.py +++ b/meta/lib/oeqa/selftest/cases/bbtests.py @@ -362,3 +362,12 @@ INHERIT:remove = \"report-error\" result = bitbake('gitunpackoffline-fail -c fetch', ignore_status=True) self.assertTrue(re.search("Recipe uses a floating tag/branch .* for repo .* without a fixed SRCREV yet doesn't call bb.fetch2.get_srcrev()", result.output), msg = "Recipe without PV set to SRCPV should have failed: %s" % result.output) + +def test_unexpanded_variable_in_path(self): +""" +Test if typo SRC_URI => SRC_URL causes bitbake to explode +""" +recipe_name = "gitunpackoffline" +self.write_config('PV:pn-gitunpackoffline:append = "+${UNDEFVAL}"') +result = bitbake('{}'.format(recipe_name), ignore_status=True) +self.assertTrue(re.search("ERROR: Directory name /.* contains unexpanded bitbake variable. This may cause build failures and WORKDIR polution", result.output), msg = "mkdirhier with unexpanded variable should have failed: %s" % result.output) -- 2.41.0 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192044): https://lists.openembedded.org/g/openembedded-core/message/192044 Mute This Topic: https://lists.openembedded.org/mt/103053151/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 4/6] gnu-config: add a do_compile task
On Fri, 2023-12-08 at 11:15 +0100, Alexander Kanavin wrote: > noexec flag has an unfortunate side effect of not writing out the .siginfo > file into sstate (because that is done in sstate bbclass > from a task-completed event handler). > > In the absence of the siginfo file, diffsigs code is unable to trace back > the change in task signatures if the change is really basic and > affects tasks coming ahead of gnu-config-native:do_compile. > > Signed-off-by: Alexander Kanavin > --- > meta/recipes-devtools/gnu-config/gnu-config_git.bb | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/meta/recipes-devtools/gnu-config/gnu-config_git.bb > b/meta/recipes-devtools/gnu-config/gnu-config_git.bb > index 718f798a00e..c72de159ce2 100644 > --- a/meta/recipes-devtools/gnu-config/gnu-config_git.bb > +++ b/meta/recipes-devtools/gnu-config/gnu-config_git.bb > @@ -19,7 +19,8 @@ UPSTREAM_CHECK_COMMITS = "1" > > CLEANBROKEN = "1" > > -do_compile[noexec] = "1" > +do_compile () { > +} > > do_install () { > install -d ${D}${datadir}/gnu-config \ > You have a good point here but by this logic, we need to remove *all* noexec tasks. We don't really want to do that and I'm not sure we want to set this precedent. I wonder if we could just remove the compile task entirely and what that would break... Cheers, Richard -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192043): https://lists.openembedded.org/g/openembedded-core/message/192043 Mute This Topic: https://lists.openembedded.org/mt/103052553/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] insane: ensure more paths have the workdir removed
From: Ross Burton When showing paths to the user we don't want to include the whole build directory. Passing the package name to package_qa_clean_path strips this completely. Signed-off-by: Ross Burton --- meta/classes-global/insane.bbclass | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass index b78bb6f445d..72fcf6b2544 100644 --- a/meta/classes-global/insane.bbclass +++ b/meta/classes-global/insane.bbclass @@ -104,7 +104,7 @@ def package_qa_check_shebang_size(path, name, d, elf, messages): return if len(stanza) > 129: -oe.qa.add_message(messages, "shebang-size", "%s: %s maximum shebang size exceeded, the maximum size is 128." % (name, package_qa_clean_path(path, d))) +oe.qa.add_message(messages, "shebang-size", "%s: %s maximum shebang size exceeded, the maximum size is 128." % (name, package_qa_clean_path(path, d, name))) return QAPATHTEST[libexec] = "package_qa_check_libexec" @@ -116,7 +116,7 @@ def package_qa_check_libexec(path,name, d, elf, messages): return True if 'libexec' in path.split(os.path.sep): -oe.qa.add_message(messages, "libexec", "%s: %s is using libexec please relocate to %s" % (name, package_qa_clean_path(path, d), libexec)) +oe.qa.add_message(messages, "libexec", "%s: %s is using libexec please relocate to %s" % (name, package_qa_clean_path(path, d, name), libexec)) return False return True @@ -208,7 +208,7 @@ def package_qa_check_staticdev(path, name, d, elf, messages): if not name.endswith("-pic") and not name.endswith("-staticdev") and not name.endswith("-ptest") and path.endswith(".a") and not path.endswith("_nonshared.a") and not '/usr/lib/debug-static/' in path and not '/.debug-static/' in path: oe.qa.add_message(messages, "staticdev", "non -staticdev package contains static .a library: %s path '%s'" % \ - (name, package_qa_clean_path(path,d, name))) + (name, package_qa_clean_path(path, d, name))) QAPATHTEST[mime] = "package_qa_check_mime" def package_qa_check_mime(path, name, d, elf, messages): @@ -219,7 +219,7 @@ def package_qa_check_mime(path, name, d, elf, messages): if d.getVar("datadir") + "/mime/packages" in path and path.endswith('.xml') and not bb.data.inherits_class("mime", d): oe.qa.add_message(messages, "mime", "package contains mime types but does not inherit mime: %s path '%s'" % \ - (name, package_qa_clean_path(path,d))) + (name, package_qa_clean_path(path, d, name))) QAPATHTEST[mime-xdg] = "package_qa_check_mime_xdg" def package_qa_check_mime_xdg(path, name, d, elf, messages): @@ -239,7 +239,7 @@ def package_qa_check_mime_xdg(path, name, d, elf, messages): except: # At least libreoffice installs symlinks with absolute paths that are dangling here. # We could implement some magic but for few (one) recipes it is not worth the effort so just warn: -wstr = "%s cannot open %s - is it a symlink with absolute path?\n" % (name, package_qa_clean_path(path,d)) +wstr = "%s cannot open %s - is it a symlink with absolute path?\n" % (name, package_qa_clean_path(path, d, name)) wstr += "Please check if (linked) file contains key 'MimeType'.\n" pkgname = name if name == d.getVar('PN'): @@ -247,8 +247,8 @@ def package_qa_check_mime_xdg(path, name, d, elf, messages): wstr += "If yes: add \'inhert mime-xdg\' and \'MIME_XDG_PACKAGES += \"%s\"\' / if no add \'INSANE_SKIP:%s += \"mime-xdg\"\' to recipe." % (pkgname, pkgname) oe.qa.add_message(messages, "mime-xdg", wstr) if mime_type_found: -oe.qa.add_message(messages, "mime-xdg", "package contains desktop file with key 'MimeType' but does not inhert mime-xdg: %s path '%s'" % \ -(name, package_qa_clean_path(path,d))) +oe.qa.add_message(messages, "mime-xdg", "%s: contains desktop file with key 'MimeType' but does not inhert mime-xdg: %s" % \ +(name, package_qa_clean_path(path, d, name))) def package_qa_check_libdir(d): """ @@ -321,8 +321,8 @@ def package_qa_check_dbg(path, name, d, elf, messages): if not "-dbg" in name and not "-ptest" in name: if '.debug' in path.split(os.path.sep): -oe.qa.add_message(messages, "debug-files", "non debug package contains .debug directory: %s path %s" % \ - (name, package_qa_clean_path(path,d))) +oe.qa.add_message(messages, "debug-files", "%s: non debug package contains .debug directory %s" % \ + (name, package_qa_clean_path(path, d, name))) QAPATHTEST[arch] = "package_qa_check_arch" def package_qa_check_arch(path,name,d, elf, messages): @@ -371,7 +371,7 @@ def
[OE-core] [PATCH] images: remove redundant IMAGE_BASENAME assignments
From: Ross Burton core-image-tiny-initramfs and core-image-testcontroller-initramfs just repeat PN, which is the default value. core-image-minimal-initramfs adds MLPREFIX, but that's also covered by PN: $ bitbake-getvar -r lib32-core-image-minimal-initramfs IMAGE_BASENAME IMAGE_BASENAME="lib32-core-image-minimal-initramfs" As these assignments are all redundant, remove them. Signed-off-by: Ross Burton --- meta/recipes-core/images/core-image-minimal-initramfs.bb | 1 - meta/recipes-core/images/core-image-tiny-initramfs.bb| 1 - .../images/core-image-testcontroller-initramfs.bb| 1 - 3 files changed, 3 deletions(-) diff --git a/meta/recipes-core/images/core-image-minimal-initramfs.bb b/meta/recipes-core/images/core-image-minimal-initramfs.bb index 7bb0b2738c7..36e8771c4ab 100644 --- a/meta/recipes-core/images/core-image-minimal-initramfs.bb +++ b/meta/recipes-core/images/core-image-minimal-initramfs.bb @@ -20,7 +20,6 @@ IMAGE_FEATURES = "" # Don't allow the initramfs to contain a kernel PACKAGE_EXCLUDE = "kernel-image-*" -export IMAGE_BASENAME = "${MLPREFIX}core-image-minimal-initramfs" IMAGE_NAME_SUFFIX ?= "" IMAGE_LINGUAS = "" diff --git a/meta/recipes-core/images/core-image-tiny-initramfs.bb b/meta/recipes-core/images/core-image-tiny-initramfs.bb index 8af25f1b1fe..7a71d55b1e8 100644 --- a/meta/recipes-core/images/core-image-tiny-initramfs.bb +++ b/meta/recipes-core/images/core-image-tiny-initramfs.bb @@ -13,7 +13,6 @@ PACKAGE_INSTALL = "initramfs-live-boot-tiny packagegroup-core-boot dropbear ${VI # Do not pollute the initrd image with rootfs features IMAGE_FEATURES = "" -export IMAGE_BASENAME = "core-image-tiny-initramfs" IMAGE_NAME_SUFFIX ?= "" IMAGE_LINGUAS = "" diff --git a/meta/recipes-extended/images/core-image-testcontroller-initramfs.bb b/meta/recipes-extended/images/core-image-testcontroller-initramfs.bb index a5b3d10205c..3b81afd7c07 100644 --- a/meta/recipes-extended/images/core-image-testcontroller-initramfs.bb +++ b/meta/recipes-extended/images/core-image-testcontroller-initramfs.bb @@ -7,7 +7,6 @@ PACKAGE_INSTALL = "initramfs-live-boot initramfs-live-install-testfs initramfs-l # Do not pollute the initrd image with rootfs features IMAGE_FEATURES = "" -export IMAGE_BASENAME = "core-image-testcontroller-initramfs" IMAGE_NAME_SUFFIX ?= "" IMAGE_LINGUAS = "" -- 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192041): https://lists.openembedded.org/g/openembedded-core/message/192041 Mute This Topic: https://lists.openembedded.org/mt/103052823/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/2] rust: Disable rust oe-selftest
From: Yash Shinde After rust is upgraded to 1.71 and later versions, the rust oe-selftest gives build errors due to unstable nightly options(see the error mentioned below). Thus, disable the test suite until the issue is fixed error: the option `Z` is only accepted on the nightly compiler thread 'main' panicked at 'failed to gather the target spec for x86_64-poky-linux-gnu', synthetic_targets.rs:66:9 Following issues are created in Yocto bugzilla and rust upstream to track this issue- https://bugzilla.yoctoproject.org/show_bug.cgi?id=15275 https://github.com/rust-lang/rust/issues/115642 https://users.rust-lang.org/t/does-rust-test-suite-supports-nightly-options-during-bootstrapping-in-rust/103108 https://users.rust-lang.org/t/unable-to-read-target-specs-when-rust-1-73-is-bootstrapped-in-yocto-poky/102959 Signed-off-by: Yash Shinde --- meta/lib/oeqa/selftest/cases/rust.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/rust.py b/meta/lib/oeqa/selftest/cases/rust.py index 7d148142fc..6dbc517006 100644 --- a/meta/lib/oeqa/selftest/cases/rust.py +++ b/meta/lib/oeqa/selftest/cases/rust.py @@ -39,6 +39,9 @@ def parse_results(filename): @OETestTag("runqemu") class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase): def test_rust(self, *args, **kwargs): +# Disable Rust Oe-selftest +self.skipTest("The Rust Oe-selftest is disabled.") + # build remote-test-server before image build recipe = "rust" start_time = time.time() -- 2.42.0 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192039): https://lists.openembedded.org/g/openembedded-core/message/192039 Mute This Topic: https://lists.openembedded.org/mt/103052789/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core][PATCH v2 1/1] go: ignore CVE-2023-45283 and CVE-2023-45284
From: Soumya Sambu These CVEs affect path handling on Windows. References: https://nvd.nist.gov/vuln/detail/CVE-2023-45283 https://nvd.nist.gov/vuln/detail/CVE-2023-45284 Signed-off-by: Soumya Sambu --- meta/recipes-devtools/go/go-1.20.10.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/recipes-devtools/go/go-1.20.10.inc b/meta/recipes-devtools/go/go-1.20.10.inc index 39509ed986..0c0a736084 100644 --- a/meta/recipes-devtools/go/go-1.20.10.inc +++ b/meta/recipes-devtools/go/go-1.20.10.inc @@ -16,3 +16,6 @@ SRC_URI += "\ file://0009-go-Filter-build-paths-on-staticly-linked-arches.patch \ " SRC_URI[main.sha256sum] = "72d2f51805c47150066c103754c75fddb2c19d48c9219fa33d1e46696c841dbb" + +CVE_STATUS[CVE-2023-45283] = "not-applicable-platform: Issue only applies on Windows" +CVE_STATUS[CVE-2023-45284] = "not-applicable-platform: Issue only applies on Windows" -- 2.40.0 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192038): https://lists.openembedded.org/g/openembedded-core/message/192038 Mute This Topic: https://lists.openembedded.org/mt/103052741/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 5/6] runqueue: rework 'bitbake -S printdiff' logic
On Fri, 2023-12-08 at 11:15 +0100, Alexander Kanavin wrote: > Previously printdiff code would iterate over tasks that were reported as > invalid or absent, > trying to follow dependency chains that would reach the most basic invalid > items in the tree. > > While this works in tightly controlled local builds, it can lead to bizarre > reports > against industrial-sized sstate caches, as the code would not consider > whether the > overall target can be fulfilled from valid sstate objects, and instead report > missing sstate signature files that perhaps were never even created due to > hash > equivalency providing shortcuts in builds. > > This commit reworks the logic in two ways: > > - start the iteration over final targets rather than missing objects > and stop at the first invalid object > > - if a given object can be fulfilled from sstate, do not recurse into > its dependencies; bitbake wouldn't care if they're absent, and neither > should printdiff Unfortunately this isn't actually true, the real answer is "it depends". For many things that is the case, however for example an XXX- native:do_populate_sysroot, we would need the dependencies in case they contain shared libraries, unless it is listed as one of the special cases in SSTATE_EXCLUDEDEPS_SYSROOT. Bitbake works this out using setscene_depvalid() in sstate.bbclass via BB_SETSCENE_DEPVALID. I suspect this is the right direction but it may need the logic tweaking slightly. Cheers, Richard -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192037): https://lists.openembedded.org/g/openembedded-core/message/192037 Mute This Topic: https://lists.openembedded.org/mt/103052554/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] useradd: Fix issues with useradd dependencies
> If recipe A requires the useradd actions of recipe B we need to > ensure that recipe B is part of the recipe A dependancy chain. In > order to do that, we introduce USERADD_DEPENDS. This makes sure > that the do_populate_sysroot_setscene of recipe B exists for > recipe A in case of a missing TMPDIR. This requires changes made in > runqueue.py by RP. I was wondering if all required changes including these would be considered suitable to backport to e.g. kirkstone? Or am I going to have to look forward to scarthgap for these :) Sincerely, Jermain -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192036): https://lists.openembedded.org/g/openembedded-core/message/192036 Mute This Topic: https://lists.openembedded.org/mt/103033148/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] base: Unpack .7z files with p7zip
Signed-off-by: Daniel Ammann --- meta/classes-global/base.bbclass | 4 1 file changed, 4 insertions(+) diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass index ac84312a87fc..0999b42daaa8 100644 --- a/meta/classes-global/base.bbclass +++ b/meta/classes-global/base.bbclass @@ -674,6 +674,10 @@ python () { elif path.endswith('.deb'): d.appendVarFlag('do_unpack', 'depends', ' xz-native:do_populate_sysroot') +# *.7z should DEPEND on p7zip-native for unpacking +elif path.endswith('.7z'): +d.appendVarFlag('do_unpack', 'depends', ' p7zip-native:do_populate_sysroot') + set_packagetriplet(d) # 'multimachine' handling -- 2.39.2 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192035): https://lists.openembedded.org/g/openembedded-core/message/192035 Mute This Topic: https://lists.openembedded.org/mt/103052614/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] rpm: workaround to remove dnf lock file
On Fri, 8 Dec 2023 at 11:13, Changqing Li wrote: > dnf has a bug, refer [1], it cause that log_lock.pid may not removed > after dnf exit. And for native dnf, since we change the lock file path > to /, it will never be removed, and make the rootfs not clean,refer > [2][3]. This patch is a workaround to fix above issue. > @@ -420,3 +422,7 @@ class RpmPM(PackageManager): > os.chdir(current_dir) > > return tmp_dir > + > +def _remove_dnf_lock_file(self): > + if os.path.exists(self.rootfs_dir + "/log_lock.pid") > +os.remove(self.rootfs_dir + "/log_lock.pid") Both the description and the code in the patch seem to imply that sometimes dnf leaves the lock file behind and sometimes it does not. If that is the case, we need to dig deeper into the reasons why. If that is not the case, please change the removal to be deterministic (remove the existence check), so that it produces an error if the lock file is not actually left behind by dnf. That way we'll also know when upstream resolved the issue, if ever. Alex -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192034): https://lists.openembedded.org/g/openembedded-core/message/192034 Mute This Topic: https://lists.openembedded.org/mt/103052518/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/6] runqueue: rework 'bitbake -S printdiff' logic
Previously printdiff code would iterate over tasks that were reported as invalid or absent, trying to follow dependency chains that would reach the most basic invalid items in the tree. While this works in tightly controlled local builds, it can lead to bizarre reports against industrial-sized sstate caches, as the code would not consider whether the overall target can be fulfilled from valid sstate objects, and instead report missing sstate signature files that perhaps were never even created due to hash equivalency providing shortcuts in builds. This commit reworks the logic in two ways: - start the iteration over final targets rather than missing objects and stop at the first invalid object - if a given object can be fulfilled from sstate, do not recurse into its dependencies; bitbake wouldn't care if they're absent, and neither should printdiff This changes the console output significantly: where previously printdiff would report the most basic invalid tasks it could find, with this change the most top-level tasks are reported instead. This is not a problem as diffsigs has its own task recursion facility, and will track down the actual change anyway. This is reflected in fixing up the selftests. [YOCTO #15289] Signed-off-by: Alexander Kanavin --- bitbake/lib/bb/runqueue.py| 27 +- .../perlcross_%.bbappend} | 0 meta/lib/oeqa/selftest/cases/sstatetests.py | 51 +++ 3 files changed, 43 insertions(+), 35 deletions(-) rename meta-selftest/recipes-test/{quilt-native/quilt-native_%.bbappend => perlcross/perlcross_%.bbappend} (100%) diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 864708ee4a5..c9fe38615cf 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py @@ -1717,35 +1717,32 @@ class RunQueue: valid_new.add(dep) invalidtasks = set() -for tid in self.rqdata.runtaskentries: -if tid not in valid_new and tid not in noexec: -invalidtasks.add(tid) -found = set() -processed = set() -for tid in invalidtasks: +toptasks = set(["{}:{}".format(t[3], t[2]) for t in self.rqdata.targets]) +for tid in toptasks: toprocess = set([tid]) while toprocess: next = set() for t in toprocess: +if t not in valid_new and t not in noexec: +invalidtasks.add(t) +continue +if t in self.rqdata.runq_setscene_tids: +continue + for dep in self.rqdata.runtaskentries[t].depends: -if dep in invalidtasks: -found.add(tid) -if dep not in processed: -processed.add(dep) -next.add(dep) +next.add(dep) + toprocess = next -if tid in found: -toprocess = set() tasklist = [] -for tid in invalidtasks.difference(found): +for tid in invalidtasks: tasklist.append(tid) if tasklist: bb.plain("The differences between the current build and any cached tasks start at the following tasks:\n" + "\n".join(tasklist)) -return invalidtasks.difference(found) +return invalidtasks def write_diffscenetasks(self, invalidtasks): diff --git a/meta-selftest/recipes-test/quilt-native/quilt-native_%.bbappend b/meta-selftest/recipes-test/perlcross/perlcross_%.bbappend similarity index 100% rename from meta-selftest/recipes-test/quilt-native/quilt-native_%.bbappend rename to meta-selftest/recipes-test/perlcross/perlcross_%.bbappend diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py b/meta/lib/oeqa/selftest/cases/sstatetests.py index 795cd5bd85f..07e82d25c62 100644 --- a/meta/lib/oeqa/selftest/cases/sstatetests.py +++ b/meta/lib/oeqa/selftest/cases/sstatetests.py @@ -824,14 +824,22 @@ TMPDIR = "${{TOPDIR}}/tmp-sstateprintdiff-difftmp-{}" # Check if printdiff walks the full dependency chain from the image target to where the change is in a specific recipe -def test_image_minimal_vs_quilt(self): -expected_output = ("Task quilt-native:do_install couldn't be used from the cache because:", +def test_image_minimal_vs_perlcross(self): +expected_output = ("Task core-image-minimal:do_create_spdx couldn't be used from the cache because:", +"Task linux-yocto:do_deploy couldn't be used from the cache because:", +"Task core-image-minimal:do_create_runtime_spdx couldn't be used from the cache because:", +"Task core-image-minimal:do_populate_lic_deploy couldn't be used from the cache because:", +"Task run-postinsts:do_package_write_rpm couldn't be used from the cache because:", +"Task packagegroup-core-boot:do_package_write_rpm
[OE-core] [PATCH 3/6] sstatesig/find_siginfo: special-case gcc-source when looking in sstate caches
This is already done for local stamps just above, and will allow enabling the full selftest that compares gcc-source signatures via printdiff (that is, both local stamp and sstate variants). Signed-off-by: Alexander Kanavin --- meta/lib/oe/sstatesig.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py index e250f51c124..8a97fb0c04b 100644 --- a/meta/lib/oe/sstatesig.py +++ b/meta/lib/oe/sstatesig.py @@ -398,6 +398,9 @@ def find_siginfo(pn, taskname, taskhashlist, d): localdata.setVar('TARGET_VENDOR', '*') localdata.setVar('TARGET_OS', '*') localdata.setVar('PN', pn) +# gcc-source is a special case, same as with local stamps above +if pn.startswith("gcc-source"): +localdata.setVar('PN', "gcc") localdata.setVar('PV', '*') localdata.setVar('PR', '*') localdata.setVar('BB_TASKHASH', hashval) -- 2.39.2 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192030): https://lists.openembedded.org/g/openembedded-core/message/192030 Mute This Topic: https://lists.openembedded.org/mt/103052552/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 6/6] oeqa/selftest/sstatetests: re-disable CDN tests
With the rework of printdiff, it is not longer useful for checking absence of sstate objects in a remote http cache, as it would only report the top level missing signatures, and leave the recursive investigation to diffsigs (which relies on ability to list cache files - not available over http). The CDN check will be performed via a separate 'printmissing' function, which would be written specifically for the purpose, and so until then disable the test as it would only persistently fail. Signed-off-by: Alexander Kanavin --- meta/lib/oeqa/selftest/cases/sstatetests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py b/meta/lib/oeqa/selftest/cases/sstatetests.py index 07e82d25c62..97ac0d2e9d9 100644 --- a/meta/lib/oeqa/selftest/cases/sstatetests.py +++ b/meta/lib/oeqa/selftest/cases/sstatetests.py @@ -930,12 +930,12 @@ SSTATE_MIRRORS ?= "file://.* http://cdn.jsdelivr.net/yocto/sstate/all/PATH;downl result = bitbake("-D -S printdiff {}".format(targets)) self.check_bb_output(result.output, exceptions) -def test_cdn_mirror_qemux86_64(self): +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): +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 (#192033): https://lists.openembedded.org/g/openembedded-core/message/192033 Mute This Topic: https://lists.openembedded.org/mt/103052555/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/6] selftest/sstatetests: do not delete custom $TMPDIRs under build-st when testing printdiff
If the tests fail, these contain useful artefacts, and so should be kept. If the test succeeds the whole build-st/ is deleted. Also, give them unique names, as otherwise the tests would step on each other. Signed-off-by: Alexander Kanavin --- meta/lib/oeqa/selftest/cases/sstatetests.py | 22 ++--- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py b/meta/lib/oeqa/selftest/cases/sstatetests.py index 79001854501..795cd5bd85f 100644 --- a/meta/lib/oeqa/selftest/cases/sstatetests.py +++ b/meta/lib/oeqa/selftest/cases/sstatetests.py @@ -777,10 +777,10 @@ addtask tmptask2 before do_tmptask1 class SStatePrintdiff(SStateBase): def run_test_printdiff_changerecipe(self, target, change_recipe, change_bbtask, change_content, expected_sametmp_output, expected_difftmp_output): +import time self.write_config(""" -TMPDIR = "${TOPDIR}/tmp-sstateprintdiff" -""") -self.track_for_cleanup(self.topdir + "/tmp-sstateprintdiff") +TMPDIR = "${{TOPDIR}}/tmp-sstateprintdiff-sametmp-{}" +""".format(time.time())) # Use runall do_build to ensure any indirect sstate is created, e.g. tzcode-native on both x86 and # aarch64 hosts since only allarch target recipes depend upon it and it may not be built otherwise. # A bitbake -c cleansstate tzcode-native would cause some of these tests to error for example. @@ -791,9 +791,8 @@ TMPDIR = "${TOPDIR}/tmp-sstateprintdiff" result_sametmp = bitbake("-S printdiff {}".format(target)) self.write_config(""" -TMPDIR = "${TOPDIR}/tmp-sstateprintdiff-2" -""") -self.track_for_cleanup(self.topdir + "/tmp-sstateprintdiff-2") +TMPDIR = "${{TOPDIR}}/tmp-sstateprintdiff-difftmp-{}" +""".format(time.time())) result_difftmp = bitbake("-S printdiff {}".format(target)) self.delete_recipeinc(change_recipe) @@ -803,20 +802,19 @@ TMPDIR = "${TOPDIR}/tmp-sstateprintdiff-2" self.assertIn(item, result_difftmp.output, msg = "Item {} not found in output:\n{}".format(item, result_difftmp.output)) def run_test_printdiff_changeconfig(self, target, change_content, expected_sametmp_output, expected_difftmp_output): +import time self.write_config(""" -TMPDIR = "${TOPDIR}/tmp-sstateprintdiff" -""") -self.track_for_cleanup(self.topdir + "/tmp-sstateprintdiff") +TMPDIR = "${{TOPDIR}}/tmp-sstateprintdiff-sametmp-{}" +""".format(time.time())) bitbake("--runall build --runall deploy_source_date_epoch {}".format(target)) bitbake("-S none {}".format(target)) self.append_config(change_content) result_sametmp = bitbake("-S printdiff {}".format(target)) self.write_config(""" -TMPDIR = "${TOPDIR}/tmp-sstateprintdiff-2" -""") +TMPDIR = "${{TOPDIR}}/tmp-sstateprintdiff-difftmp-{}" +""".format(time.time())) self.append_config(change_content) -self.track_for_cleanup(self.topdir + "/tmp-sstateprintdiff-2") result_difftmp = bitbake("-S printdiff {}".format(target)) for item in expected_sametmp_output: -- 2.39.2 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192029): https://lists.openembedded.org/g/openembedded-core/message/192029 Mute This Topic: https://lists.openembedded.org/mt/103052551/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/6] gnu-config: add a do_compile task
noexec flag has an unfortunate side effect of not writing out the .siginfo file into sstate (because that is done in sstate bbclass from a task-completed event handler). In the absence of the siginfo file, diffsigs code is unable to trace back the change in task signatures if the change is really basic and affects tasks coming ahead of gnu-config-native:do_compile. Signed-off-by: Alexander Kanavin --- meta/recipes-devtools/gnu-config/gnu-config_git.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/recipes-devtools/gnu-config/gnu-config_git.bb b/meta/recipes-devtools/gnu-config/gnu-config_git.bb index 718f798a00e..c72de159ce2 100644 --- a/meta/recipes-devtools/gnu-config/gnu-config_git.bb +++ b/meta/recipes-devtools/gnu-config/gnu-config_git.bb @@ -19,7 +19,8 @@ UPSTREAM_CHECK_COMMITS = "1" CLEANBROKEN = "1" -do_compile[noexec] = "1" +do_compile () { +} do_install () { install -d ${D}${datadir}/gnu-config \ -- 2.39.2 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192031): https://lists.openembedded.org/g/openembedded-core/message/192031 Mute This Topic: https://lists.openembedded.org/mt/103052553/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/6] selftest/sstatetest: print output from bitbake with actual newlines, not \n
Assert*() functions from python unittest would join the multiline output with \n, making it almost unreadable. Signed-off-by: Alexander Kanavin --- meta/lib/oeqa/selftest/cases/sstatetests.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py b/meta/lib/oeqa/selftest/cases/sstatetests.py index 7c2b14e95f6..79001854501 100644 --- a/meta/lib/oeqa/selftest/cases/sstatetests.py +++ b/meta/lib/oeqa/selftest/cases/sstatetests.py @@ -798,9 +798,9 @@ TMPDIR = "${TOPDIR}/tmp-sstateprintdiff-2" self.delete_recipeinc(change_recipe) for item in expected_sametmp_output: -self.assertIn(item, result_sametmp.output) +self.assertIn(item, result_sametmp.output, msg = "Item {} not found in output:\n{}".format(item, result_sametmp.output)) for item in expected_difftmp_output: -self.assertIn(item, result_difftmp.output) +self.assertIn(item, result_difftmp.output, msg = "Item {} not found in output:\n{}".format(item, result_difftmp.output)) def run_test_printdiff_changeconfig(self, target, change_content, expected_sametmp_output, expected_difftmp_output): self.write_config(""" @@ -820,9 +820,9 @@ TMPDIR = "${TOPDIR}/tmp-sstateprintdiff-2" result_difftmp = bitbake("-S printdiff {}".format(target)) for item in expected_sametmp_output: -self.assertIn(item, result_sametmp.output) +self.assertIn(item, result_sametmp.output, msg = "Item {} not found in output:\n{}".format(item, result_sametmp.output)) for item in expected_difftmp_output: -self.assertIn(item, result_difftmp.output) +self.assertIn(item, result_difftmp.output, msg = "Item {} not found in output:\n{}".format(item, result_difftmp.output)) # Check if printdiff walks the full dependency chain from the image target to where the change is in a specific recipe -- 2.39.2 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192028): https://lists.openembedded.org/g/openembedded-core/message/192028 Mute This Topic: https://lists.openembedded.org/mt/103052550/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] initscripts: support persistent tmp
From: Changqing Li * default volatiles file is for VOLATILE_TMP_DIR=yes, and VOLATILE_LOG_DIR=yes, if they set to no, remove volatile related config * replace /var/volatile/tmp with /var/tmp for populate-volatile.sh Signed-off-by: Changqing Li --- .../initscripts/initscripts-1.0/volatiles| 1 + meta/recipes-core/initscripts/initscripts_1.0.bb | 12 +++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/meta/recipes-core/initscripts/initscripts-1.0/volatiles b/meta/recipes-core/initscripts/initscripts-1.0/volatiles index cd8a4be05f..a280c47dda 100644 --- a/meta/recipes-core/initscripts/initscripts-1.0/volatiles +++ b/meta/recipes-core/initscripts/initscripts-1.0/volatiles @@ -28,6 +28,7 @@ d root root 0755 /var/volatile/log none d root root 1777 /var/volatile/tmp none l root root 1777 /var/lock /run/lock l root root 0755 /var/run /run +l root root 0755 /var/log /var/volatile/log l root root 1777 /var/tmp /var/volatile/tmp l root root 1777 /tmp /var/tmp d root root 0755 /var/lock/subsys none diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb index 4b34c6a67f..c2eff7e02f 100644 --- a/meta/recipes-core/initscripts/initscripts_1.0.bb +++ b/meta/recipes-core/initscripts/initscripts_1.0.bb @@ -103,12 +103,14 @@ do_install () { install -m 0755${WORKDIR}/read-only-rootfs-hook.sh ${D}${sysconfdir}/init.d install -m 0755${WORKDIR}/save-rtc.sh ${D}${sysconfdir}/init.d install -m 0644${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/00_core - if [ ${@ oe.types.boolean('${VOLATILE_LOG_DIR}') } = True ]; then - sed -i -e '\@^d root root 0755 /var/volatile/log none$@ a\l root root 0755 /var/log /var/volatile/log' \ - ${D}${sysconfdir}/default/volatiles/00_core + if [ ${@ oe.types.boolean('${VOLATILE_LOG_DIR}') } = False ]; then + sed -i -e '/^[d|l].*\/var\/volatile\/log/d' ${D}${sysconfdir}/default/volatiles/00_core fi - if [ "${VOLATILE_TMP_DIR}" != "yes" ]; then - sed -i -e "/\/d" ${D}${sysconfdir}/default/volatiles/00_core + if [ ${@ oe.types.boolean('${VOLATILE_TMP_DIR}') } = False ]; then + sed -i -e "/^[d|l].*\/var\/volatile\/tmp/d" ${D}${sysconfdir}/default/volatiles/00_core + sed -i -e "/^l.*\/tmp/d" ${D}${sysconfdir}/default/volatiles/00_core + sed -i -e 's;TMPROOT="${ROOT_DIR}/var/volatile/tmp";TMPROOT="${ROOT_DIR}/var/tmp";g' \ + ${D}${sysconfdir}/init.d/populate-volatile.sh fi install -m 0755${WORKDIR}/dmesg.sh ${D}${sysconfdir}/init.d install -m 0644${WORKDIR}/logrotate-dmesg.conf ${D}${sysconfdir}/ -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192025): https://lists.openembedded.org/g/openembedded-core/message/192025 Mute This Topic: https://lists.openembedded.org/mt/103052520/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] eudev: create dir /tmp if persistent tmp is used
From: Changqing Li the automount rule for udev needs /tmp directory available, if VOLATILE_TMP_DIR = yes, to make sure /var/volatile/tmp exist, if VOLATILE_TMP_DIR = no, to make sure /tmp exist. Signed-off-by: Changqing Li --- meta/recipes-core/udev/eudev_3.2.14.bb | 4 1 file changed, 4 insertions(+) diff --git a/meta/recipes-core/udev/eudev_3.2.14.bb b/meta/recipes-core/udev/eudev_3.2.14.bb index d0758691bd..d89697a916 100644 --- a/meta/recipes-core/udev/eudev_3.2.14.bb +++ b/meta/recipes-core/udev/eudev_3.2.14.bb @@ -50,6 +50,10 @@ do_install:append() { # Use classic network interface naming scheme touch ${D}${sysconfdir}/udev/rules.d/80-net-name-slot.rules + +if [ ${@ oe.types.boolean('${VOLATILE_TMP_DIR}') } = False ]; then +sed -i -e 's%mkdir -m 1777 -p /var/volatile/tmp%mkdir -m 1777 -p /tmp%g' ${D}${sysconfdir}/init.d/udev +fi } do_install:prepend:class-target () { -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192026): https://lists.openembedded.org/g/openembedded-core/message/192026 Mute This Topic: https://lists.openembedded.org/mt/103052521/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] systemd: support persistent tmp
From: Changqing Li * update 00-create-volatile.conf, for volatile tmp, make /tmp -> /var/tmp, /var/tmp -> /var/volatile/tmp and set age of /var/volatile/tmp to 10d * if VOLATILE_TMP_DIR/VOLATILE_LOG_DIR set to no, remove volatile related configs from 00-create-volatile.conf Signed-off-by: Changqing Li --- .../systemd/systemd/00-create-volatile.conf | 3 ++- meta/recipes-core/systemd/systemd_254.4.bb| 23 +-- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/meta/recipes-core/systemd/systemd/00-create-volatile.conf b/meta/recipes-core/systemd/systemd/00-create-volatile.conf index c4277221a2..860f2783ef 100644 --- a/meta/recipes-core/systemd/systemd/00-create-volatile.conf +++ b/meta/recipes-core/systemd/systemd/00-create-volatile.conf @@ -5,4 +5,5 @@ d /run/lock 1777- - - d /var/volatile/log - - - - -d /var/volatile/tmp 1777- - +d /var/volatile/tmp 1777- - 10d +L+ /tmp 1777root root - /var/tmp diff --git a/meta/recipes-core/systemd/systemd_254.4.bb b/meta/recipes-core/systemd/systemd_254.4.bb index 0c12926bef..10f86749b4 100644 --- a/meta/recipes-core/systemd/systemd_254.4.bb +++ b/meta/recipes-core/systemd/systemd_254.4.bb @@ -289,6 +289,22 @@ do_install() { done install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${nonarch_libdir}/tmpfiles.d/ +if [ ${@ oe.types.boolean('${VOLATILE_LOG_DIR}') } = False ]; then +sed -i -e "/^d.*\/var\/volatile\/log/d" ${D}${nonarch_libdir}/tmpfiles.d/00-create-volatile.conf +fi + +if [ ${@ oe.types.boolean('${VOLATILE_TMP_DIR}') } = False ]; then +sed -i -e "/^d.*\/var\/volatile\/tmp/d" ${D}${nonarch_libdir}/tmpfiles.d/00-create-volatile.conf +sed -i -e "/^L+.*\/tmp/d" ${D}${nonarch_libdir}/tmpfiles.d/00-create-volatile.conf + +else +# For volatile tmp, /tmp link to /var/tmp, /var/tmp links to /var/volatile/tmp, so don't need +# mount /tmp again +rm -f ${D}${systemd_unitdir}/system/tmp.mount +rm -f ${D}${systemd_unitdir}/system/local-fs.target.wants/tmp.mount +# The age are set in 00-create-volatile.conf +rm -rf ${D}${nonarch_libdir}/tmpfiles.d/tmp.conf +fi if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then install -d ${D}${sysconfdir}/init.d @@ -308,13 +324,6 @@ do_install() { rm -rf ${D}${localstatedir}/log/journal/remote fi - # if the user requests /tmp be on persistent storage (i.e. not volatile) - # then don't use a tmpfs for /tmp - if [ "${VOLATILE_TMP_DIR}" != "yes" ]; then - rm -f ${D}${rootlibdir}/systemd/system/tmp.mount - rm -f ${D}${rootlibdir}/systemd/system/local-fs.target.wants/tmp.mount - fi - install -d ${D}${systemd_system_unitdir}/graphical.target.wants install -d ${D}${systemd_system_unitdir}/multi-user.target.wants install -d ${D}${systemd_system_unitdir}/poweroff.target.wants -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192027): https://lists.openembedded.org/g/openembedded-core/message/192027 Mute This Topic: https://lists.openembedded.org/mt/103052522/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/5] base-files: update dirs1777 and volatiles according to VOLATILE_TMP_DIR
From: Changqing Li * update dirs1777 so that only create /var/volatiles/tmp when VOLATILE_TMP_DIR set to yes, create /var/tmp when VOLATILE_TMP_DIR set to no * update volatiles so that only symlink /var/tmp to /var/volatiles/tmp when VOLATILE_TMP_DIR set to yes * mount /tmp as tmpfs fs when VOLATILE_TMP_DIR set to no and init manager is sysvinit Signed-off-by: Changqing Li --- meta/recipes-core/base-files/base-files_3.0.14.bb | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb index 9fab53ce63..01d076369d 100644 --- a/meta/recipes-core/base-files/base-files_3.0.14.bb +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb @@ -30,7 +30,7 @@ S = "${WORKDIR}" INHIBIT_DEFAULT_DEPS = "1" docdir:append = "/${P}" -dirs1777 = "/tmp ${localstatedir}/volatile/tmp" +dirs1777 = "/tmp ${localstatedir}/${@'volatile/' if oe.types.boolean('${VOLATILE_TMP_DIR}') else ''}tmp" dirs2775 = "" dirs555 = "/sys /proc" dirs755 = "/boot /dev ${base_bindir} ${base_sbindir} ${base_libdir} \ @@ -54,7 +54,8 @@ dirs755-lsb = "/srv \ ${prefix}/lib/locale" dirs2775-lsb = "/var/mail" -volatiles = "${@'log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''} tmp" +volatiles = "${@'log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''} \ + ${@'tmp' if oe.types.boolean('${VOLATILE_TMP_DIR}') else ''}" conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \ ${sysconfdir}/issue /${sysconfdir}/issue.net \ ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile \ @@ -122,6 +123,9 @@ do_install () { fi install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir}/fstab +if [ ${@ oe.types.boolean('${VOLATILE_TMP_DIR}') } = False ] && ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'false', 'true', d)} ;then +echo "tmpfs /tmp tmpfs mode=1777,strictatime,nosuid,nodev,size=50%,nr_inodes=1m 0 0" >> ${D}${sysconfdir}/fstab +fi install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/profile sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}${sysconfdir}/profile sed -i 's#@BINDIR@#${bindir}#g' ${D}${sysconfdir}/profile -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192024): https://lists.openembedded.org/g/openembedded-core/message/192024 Mute This Topic: https://lists.openembedded.org/mt/103052519/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] bitbake.conf: set correct FILESYSTEM_PERMS_TABLES
From: Changqing Li * Update fs-perms.txt as an common fs-perms file * Remove fs-perms-persistent-log.txt * Add fs-perms-volatile-log.txt and fs-perms-volatile-tmp.txt to be used when VOLATILE_LOG_DIR/VOLATILE_TMP_DIR set to yes Signed-off-by: Changqing Li --- meta/conf/bitbake.conf| 5 ++- ...fs-perms.txt => fs-perms-volatile-log.txt} | 32 --- ...tent-log.txt => fs-perms-volatile-tmp.txt} | 27 meta/files/fs-perms.txt | 3 -- 4 files changed, 4 insertions(+), 63 deletions(-) copy meta/files/{fs-perms.txt => fs-perms-volatile-log.txt} (53%) rename meta/files/{fs-perms-persistent-log.txt => fs-perms-volatile-tmp.txt} (59%) diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index e7826e7af9..2a8dd2f972 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -384,7 +384,10 @@ FILESEXTRAPATHS ?= "__default:" # datadir, sysconfdir, servicedir, sharedstatedir, localstatedir, infodir, # mandir, docdir, bindir, sbindir, libexecdir, libdir, includedir and # oldincludedir -FILESYSTEM_PERMS_TABLES ?= "${@'files/fs-perms.txt' if oe.types.boolean(d.getVar('VOLATILE_LOG_DIR')) else 'files/fs-perms-persistent-log.txt'}" +FILESYSTEM_PERMS_TABLES ?= " files/fs-perms.txt \ + ${@'files/fs-perms-volatile-log.txt' if oe.types.boolean(d.getVar('VOLATILE_LOG_DIR')) else ''} \ + ${@'files/fs-perms-volatile-tmp.txt' if oe.types.boolean(d.getVar('VOLATILE_TMP_DIR')) else ''} \ +" ## # General work and output directories for the build system. diff --git a/meta/files/fs-perms.txt b/meta/files/fs-perms-volatile-log.txt similarity index 53% copy from meta/files/fs-perms.txt copy to meta/files/fs-perms-volatile-log.txt index 48191f504c..fc846bbdc5 100644 --- a/meta/files/fs-perms.txt +++ b/meta/files/fs-perms-volatile-log.txt @@ -28,39 +28,7 @@ # Note: all standard config directories are automatically assigned "0755 root root false - - -" # Documentation should always be corrected -${mandir} 0755rootroottrue0644rootroot -${infodir} 0755rootroottrue0644rootroot -${docdir} 0755rootroottrue0644rootroot -${datadir}/gtk-doc 0755rootroottrue0644rootroot - -# Fixup locales -${datadir}/locale 0755rootroottrue0644rootroot - -# Cleanup headers -${includedir} 0755rootroottrue0644rootroot - -# Cleanup debug src -/usr/src/debug 0755rootroottrue0644rootroot # Items from base-files # Links -${localstatedir}/run link/run ${localstatedir}/log linkvolatile/log -${localstatedir}/lock link/run/lock -${localstatedir}/tmp linkvolatile/tmp - -/home 0755rootrootfalse - - - -/srv 0755rootrootfalse - - - -${prefix}/src 0755rootrootfalse - - - -${localstatedir}/local 0755rootrootfalse - - - - -# Special permissions from base-files -# Set 1777 -/tmp 01777 rootrootfalse - - - -${localstatedir}/volatile/tmp 01777 rootrootfalse - - - - -# Set 0700 -${ROOT_HOME} 0700rootrootfalse - - - - -# Set 2775-lsb -${localstatedir}/mail 02775 rootmailfalse - - - diff --git a/meta/files/fs-perms-persistent-log.txt b/meta/files/fs-perms-volatile-tmp.txt similarity index 59% rename from meta/files/fs-perms-persistent-log.txt rename to meta/files/fs-perms-volatile-tmp.txt index 61f0a6e26a..26247acda8 100644 --- a/meta/files/fs-perms-persistent-log.txt +++ b/meta/files/fs-perms-volatile-tmp.txt @@ -28,38 +28,11 @@ # Note: all standard config directories are automatically assigned "0755 root root false - - -" # Documentation should always be corrected -${mandir} 0755rootroottrue0644rootroot -${infodir} 0755rootroottrue0644rootroot -${docdir} 0755rootroottrue0644rootroot -${datadir}/gtk-doc 0755rootroottrue0644rootroot - -# Fixup locales -${datadir}/locale 0755rootroottrue0644rootroot - -# Cleanup headers -${includedir} 0755rootroottrue0644rootroot - -# Cleanup debug src -/usr/src/debug 0755rootroottrue0644rootroot # Items from base-files # Links -${localstatedir}/run link/run -${localstatedir}/lock link/run/lock ${localstatedir}/tmp linkvolatile/tmp -/home 0755rootrootfalse - - - -/srv 0755rootrootfalse
[OE-core] [PATCH 0/5] *** Fix persistent tmp ***
From: Changqing Li Hi, All Currently, VOLATILE_TMP_DIR not works, set VOLATILE_TMP_DIR="no", VOLATILE_LOG_DIR="no", after boot target, /var/tmp still link to tmpfs /var/volatile/tmp lrwxrwxrwx 1 root root 11 Mar 9 2018 lock -> ../run/lock drwxr-xr-x 4 root root 1024 Dec 4 07:55 log lrwxrwxrwx 1 root root6 Mar 9 2018 run -> ../run drwxr-xr-x 3 root root 1024 Mar 9 2018 spool lrwxrwxrwx 1 root root 12 Mar 9 2018 tmp -> volatile/tmp drwxrwxrwt 4 root root 80 Dec 4 07:55 volatile So I do some research, fix this issue and do some other changes accordingly. Please help to review this patch, thanks. Targets: 1. Support persistent tmp, For persistent tmp, only /var/tmp is persistent, /tmp is tmpfs, For volatile tmp, /tmp link to /var/tmp, /var/tmp link to /var/volatile/tmp 2. make systemd and SysVinit have the same directory structure. Currently, systemd and SysVinit have different directory structure, the difference focus on how to handle /tmp. when volatile is enabled, for sysVinit, /tmp link to /var/tmp, /var/tmp link to /var/volatile/tmp refer [4][5]. but for systemd, /tmp is a directory, it is mounted by systemd as tmpfs. /var/tmp linked to /var/volatile/tmp. And for systemd, refer [6], set different age for /tmp and /var/tmp. Since volatile disabled not works, ignore the difference when volatile is disabled. With this patch, VOLATILE_TMP_DIR will behavior like this: For both sysvinit and systemd: 1. VOLATILE_TMP_DIR="yes": /tmp link to /var/tmp, /var/tmp link to /var/volatile/log, /var/volatile is mounted as tmpfs In this case, for systemd, /tmp and /var/tmp will set to the same age, 10d. Compare to current behavior, there are 2 changes: 1) for systemd, /tmp changed from a directy to a symlink to /var/tmp 2) age of /tmp and /var/tmp will be same 2. VOLATILE_TMP_DIR="no": /tmp is a directory mounted as tmpfs, /var/tmp is a directory on persistent fs, and keep the age as [6] Change like this in order to meet [1][2], also maybe [3] for systemd. Compare to current behavior, there is one change: 1) for sysVinit, /tmp changed from a symlink to a directory [1] https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s18.html [2] https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch05s15.html [3] https://systemd.io/TEMPORARY_DIRECTORIES/ [4] https://git.openembedded.org/openembedded/tree/docs/usermanual/chapters/recipes.xml#n3535 [5] https://git.openembedded.org/openembedded-core/commit/?id=12c4acd7ac5a27cf3676065b60f1c8395c96854c [6] https://github.com/systemd/systemd/blob/main/tmpfiles.d/tmp.conf [7] https://www.freedesktop.org/software/systemd/man/latest/tmpfiles.d.html Test Result of following cases: 1. SysVinit VOLATILE_TMP_DIR="yes" VOLATILE_LOG_DIR="yes" root@qemux86-64:~# ls -al /tmp lrwxrwxrwx1 root root 8 Dec 8 08:51 /tmp -> /var/tmp root@qemux86-64:~# ls -al /var/log lrwxrwxrwx1 root root17 Dec 8 08:51 /var/log -> /var/volatile/log root@qemux86-64:~# ls -al /var/tmp lrwxrwxrwx1 root root17 Dec 8 08:51 /var/tmp -> /var/volatile/tmp root@qemux86-64:~# mount | grep volatile tmpfs on /var/volatile type tmpfs (rw,relatime) root@qemux86-64:~# 2. SysVinit VOLATILE_TMP_DIR="no" VOLATILE_LOG_DIR="no" root@qemux86-64:/# ls -al drwxr-xr-x 18 root root 1024 Dec 8 09:22 . drwxr-xr-x 18 root root 1024 Dec 8 09:22 .. drwxr-xr-x2 root root 3072 Mar 9 2018 bin drwxr-xr-x2 root root 1024 Mar 9 2018 boot drwxr-xr-x 13 root root 2960 Dec 8 09:24 dev drwxr-xr-x 20 root root 1024 Dec 8 09:24 etc drwxr-xr-x3 root root 1024 Mar 9 2018 home drwxr-xr-x6 root root 1024 Mar 9 2018 lib drwx--2 root root 12288 Dec 8 09:22 lost+found drwxr-xr-x2 root root 1024 Mar 9 2018 media drwxr-xr-x2 root root 1024 Mar 9 2018 mnt dr-xr-xr-x 161 root root 0 Dec 8 09:24 proc drwxr-xr-x4 root root 240 Dec 8 09:24 run drwxr-xr-x2 root root 3072 Mar 9 2018 sbin dr-xr-xr-x 12 root root 0 Dec 8 09:24 sys drwxrwxrwt2 root root40 Dec 8 09:24 tmp drwxr-xr-x9 root root 1024 Mar 9 2018 usr drwxr-xr-x 10 root root 1024 Dec 8 09:24 var root@qemux86-64:/# cd /var/ root@qemux86-64:/var# ls -al drwxr-xr-x 10 root root 1024 Dec 8 09:24 . drwxr-xr-x 18 root root 1024 Dec 8 09:22 .. drwxr-xr-x2 root root 1024 Mar 9 2018 backups drwxr-xr-x2 root root 1024 Mar 9 2018 cache drwxr-xr-x4 root root 1024 Mar 9 2018 lib drwxr-xr-x2 root root 1024 Mar 9 2018 local lrwxrwxrwx1 root root 9 Dec 8 09:24 lock -> /run/lock drwxr-xr-x2 root root 1024 Dec 8 09:24 log
[OE-core] [PATCH] rpm: workaround to remove dnf lock file
From: Changqing Li dnf has a bug, refer [1], it cause that log_lock.pid may not removed after dnf exit. And for native dnf, since we change the lock file path to /, it will never be removed, and make the rootfs not clean,refer [2][3]. This patch is a workaround to fix above issue. [1] https://github.com/rpm-software-management/dnf/issues/1963 [2] https://git.openembedded.org/openembedded-core/commit/?id=742a1b71249f4da1c8d8e13e270b0eb6128a3f66 [3] https://github.com/rpm-software-management/dnf/blob/master/etc/tmpfiles.d/dnf.conf Signed-off-by: Changqing Li --- meta/lib/oe/package_manager/rpm/__init__.py | 6 ++ 1 file changed, 6 insertions(+) diff --git a/meta/lib/oe/package_manager/rpm/__init__.py b/meta/lib/oe/package_manager/rpm/__init__.py index f40c880af4..bfd40fa691 100644 --- a/meta/lib/oe/package_manager/rpm/__init__.py +++ b/meta/lib/oe/package_manager/rpm/__init__.py @@ -217,6 +217,8 @@ class RpmPM(PackageManager): if len(failed_scriptlets_pkgnames) > 0: failed_postinsts_abort(list(failed_scriptlets_pkgnames.keys()), self.d.expand("${T}/log.do_${BB_CURRENTTASK}")) +self._remove_dnf_lock_file() + def remove(self, pkgs, with_dependencies = True): if not pkgs: return @@ -420,3 +422,7 @@ class RpmPM(PackageManager): os.chdir(current_dir) return tmp_dir + +def _remove_dnf_lock_file(self): + if os.path.exists(self.rootfs_dir + "/log_lock.pid") +os.remove(self.rootfs_dir + "/log_lock.pid") -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192023): https://lists.openembedded.org/g/openembedded-core/message/192023 Mute This Topic: https://lists.openembedded.org/mt/103052518/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/2] rust: Disable rust oe-selftest
From: Yash Shinde After rust is upgraded to 1.71 and later versions, the rust oe-selftest gives build errors due to unstable nightly options. Thus, disable the test suite until the issue is fixed error: the option `Z` is only accepted on the nightly compiler thread 'main' panicked at 'failed to gather the target spec for x86_64-poky-linux-gnu', synthetic_targets.rs:66:9 After rust is upgraded to 1.71 and later versions, the rust oe-selftest gives build errors due to unstable nightly options. Thus, disable the test suite until the issue is fixed. Following issues are created in Yocto bugzilla and rust upstream to track this issue- https://bugzilla.yoctoproject.org/show_bug.cgi?id=15275 https://github.com/rust-lang/rust/issues/115642 https://users.rust-lang.org/t/does-rust-test-suite-supports-nightly-options-during-bootstrapping-in-rust/103108 https://users.rust-lang.org/t/unable-to-read-target-specs-when-rust-1-73-is-bootstrapped-in-yocto-poky/102959 Signed-off-by: Yash Shinde --- meta/lib/oeqa/selftest/cases/rust.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/rust.py b/meta/lib/oeqa/selftest/cases/rust.py index 7d148142fc..6dbc517006 100644 --- a/meta/lib/oeqa/selftest/cases/rust.py +++ b/meta/lib/oeqa/selftest/cases/rust.py @@ -39,6 +39,9 @@ def parse_results(filename): @OETestTag("runqemu") class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase): def test_rust(self, *args, **kwargs): +# Disable Rust Oe-selftest +self.skipTest("The Rust Oe-selftest is disabled.") + # build remote-test-server before image build recipe = "rust" start_time = time.time() -- 2.42.0 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192020): https://lists.openembedded.org/g/openembedded-core/message/192020 Mute This Topic: https://lists.openembedded.org/mt/103052274/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-Core][PATCH 2/3] cargo: Move CARGO_MANIFEST_PATH/CARGO_SRC_DIR to cargo_common
On Fri, 2023-12-08 at 08:23 +, Alex Kiernan wrote: > On Fri, Dec 8, 2023 at 8:15 AM Alex Kiernan via lists.openembedded.org > wrote: > > > > On Thu, Dec 7, 2023 at 10:40 PM Richard Purdie > > wrote: > > > > > > On Thu, 2023-12-07 at 13:39 +, Alex Kiernan wrote: > > > > cargo_common_do_configure uses CARGO_MANIFEST_PATH (which depends on > > > > CARGO_SRC_DIR), but their definition was in cargo.bbclass. > > > > > > > > Match the other variables here and change to default values, rather > > > > than weak defaults. > > > > > > FWIW "single value" class variables tend to work much better as ??= > > > (which I'd call default value) since than it doesn't matter if the > > > recipe setting comes before or after the inherit and the inherit > > > position in the recipe doesn't matter. > > > > > > > Ah, I guess that makes sense - for "single value" :append/:remove > > aren't really useful, so leaving the actual assignment as late as > > possible works? > > > > And I've just read the bitbake docs and I clearly still don't really > understand... its += / -= rather than append/remove which are the > things which are important here. > > > TBH I've never really been very clear what the "right" thing to use is > > between ?= and ??= For something which isn't a single value, you'd need to use += or append and that gets much more unclear. My comments were only for single value variables as we don't have a good answer for the rest, much as I wish we had. Cheers, Richard -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192018): https://lists.openembedded.org/g/openembedded-core/message/192018 Mute This Topic: https://lists.openembedded.org/mt/103034028/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-Core][PATCH 2/3] cargo: Move CARGO_MANIFEST_PATH/CARGO_SRC_DIR to cargo_common
On Fri, 2023-12-08 at 08:15 +, Alex Kiernan wrote: > On Thu, Dec 7, 2023 at 10:40 PM Richard Purdie > wrote: > > > > On Thu, 2023-12-07 at 13:39 +, Alex Kiernan wrote: > > > cargo_common_do_configure uses CARGO_MANIFEST_PATH (which depends on > > > CARGO_SRC_DIR), but their definition was in cargo.bbclass. > > > > > > Match the other variables here and change to default values, rather > > > than weak defaults. > > > > FWIW "single value" class variables tend to work much better as ??= > > (which I'd call default value) since than it doesn't matter if the > > recipe setting comes before or after the inherit and the inherit > > position in the recipe doesn't matter. > > > > Ah, I guess that makes sense - for "single value" :append/:remove > aren't really useful, so leaving the actual assignment as late as > possible works? ??= means "fall back to this value if nothing else is ever set". For a single value, append or += never makes sense so the fallback is probably what we want from a class regardless of order. If you use ?= it just adds some ordering constraints. > TBH I've never really been very clear what the "right" thing to use is > between ?= and ??= For the above case it is one of the few "clearer" cases. As soon as you have multiple values, it becomes fuzzy sadly. I'm not sure how we improve things either. Cheers, Richard -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192017): https://lists.openembedded.org/g/openembedded-core/message/192017 Mute This Topic: https://lists.openembedded.org/mt/103034028/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-Core][PATCH 2/3] cargo: Move CARGO_MANIFEST_PATH/CARGO_SRC_DIR to cargo_common
On Fri, Dec 8, 2023 at 8:15 AM Alex Kiernan via lists.openembedded.org wrote: > > On Thu, Dec 7, 2023 at 10:40 PM Richard Purdie > wrote: > > > > On Thu, 2023-12-07 at 13:39 +, Alex Kiernan wrote: > > > cargo_common_do_configure uses CARGO_MANIFEST_PATH (which depends on > > > CARGO_SRC_DIR), but their definition was in cargo.bbclass. > > > > > > Match the other variables here and change to default values, rather > > > than weak defaults. > > > > FWIW "single value" class variables tend to work much better as ??= > > (which I'd call default value) since than it doesn't matter if the > > recipe setting comes before or after the inherit and the inherit > > position in the recipe doesn't matter. > > > > Ah, I guess that makes sense - for "single value" :append/:remove > aren't really useful, so leaving the actual assignment as late as > possible works? > And I've just read the bitbake docs and I clearly still don't really understand... its += / -= rather than append/remove which are the things which are important here. > TBH I've never really been very clear what the "right" thing to use is > between ?= and ??= > > > I'd call ?= a weak assignment or weak default. > > > > Thanks for working on cleaning some of these things up. I got so far > > with it originally and then ran out of time (and too frustrated with > > the long build/test cycles!). > > > > I'll go back and do the opposite cleanup and send a v2. > > > Cheers, > > > > Richard > > > > > > > > Signed-off-by: Alex Kiernan > > > --- > > > > > > meta/classes-recipe/cargo.bbclass| 7 --- > > > meta/classes-recipe/cargo_common.bbclass | 7 +++ > > > 2 files changed, 7 insertions(+), 7 deletions(-) > > > > > > diff --git a/meta/classes-recipe/cargo.bbclass > > > b/meta/classes-recipe/cargo.bbclass > > > index 96a74e2ef1ec..0829a58dd90f 100644 > > > --- a/meta/classes-recipe/cargo.bbclass > > > +++ b/meta/classes-recipe/cargo.bbclass > > > @@ -30,13 +30,6 @@ B = "${WORKDIR}/build" > > > # where the issue occured > > > export RUST_BACKTRACE = "1" > > > > > > -# The directory of the Cargo.toml relative to the root directory, per > > > default > > > -# assume there's a Cargo.toml directly in the root directory > > > -CARGO_SRC_DIR ??= "" > > > - > > > -# The actual path to the Cargo.toml > > > -CARGO_MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml" > > > - > > > RUSTFLAGS ??= "" > > > BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}" > > > # --frozen flag will prevent network access (which is required since only > > > diff --git a/meta/classes-recipe/cargo_common.bbclass > > > b/meta/classes-recipe/cargo_common.bbclass > > > index bf298e96c745..c330c122a9d3 100644 > > > --- a/meta/classes-recipe/cargo_common.bbclass > > > +++ b/meta/classes-recipe/cargo_common.bbclass > > > @@ -33,6 +33,13 @@ CARGO_DISABLE_BITBAKE_VENDORING ?= "0" > > > # Used by libstd-rs to point to the vendor dir included in rustc src > > > CARGO_VENDORING_DIRECTORY ?= "${CARGO_HOME}/bitbake" > > > > > > +# The directory of the Cargo.toml relative to the root directory, per > > > default > > > +# assume there's a Cargo.toml directly in the root directory > > > +CARGO_SRC_DIR ?= "" > > > + > > > +# The actual path to the Cargo.toml > > > +CARGO_MANIFEST_PATH ?= "${S}/${CARGO_SRC_DIR}/Cargo.toml" > > > + > > > CARGO_RUST_TARGET_CCLD ?= "${RUST_TARGET_CCLD}" > > > cargo_common_do_configure () { > > > mkdir -p ${CARGO_HOME}/bitbake > > > > > > > > > > > -- > Alex Kiernan > > > -- Alex Kiernan -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192016): https://lists.openembedded.org/g/openembedded-core/message/192016 Mute This Topic: https://lists.openembedded.org/mt/103034028/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 09/10] oeqa/selftest/recipetool: appendsrfile: add test for machine
On Tue, 2023-12-05 at 15:56 +0100, Julien Stephan wrote: > Add a new test for machine specific bbappend override > > Signed-off-by: Julien Stephan > --- > meta/lib/oeqa/selftest/cases/recipetool.py | 44 +++--- > 1 file changed, 38 insertions(+), 6 deletions(-) > > diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py > b/meta/lib/oeqa/selftest/cases/recipetool.py > index 21cb350e8a6..c55025e7df6 100644 > --- a/meta/lib/oeqa/selftest/cases/recipetool.py > +++ b/meta/lib/oeqa/selftest/cases/recipetool.py > @@ -1056,7 +1056,7 @@ class RecipetoolAppendsrcBase(RecipetoolBase): > if p.scheme == 'file': > return p.netloc + p.path, uri > > -def _test_appendsrcfile(self, testrecipe, filename=None, destdir=None, > has_src_uri=True, srcdir=None, newfile=None, remove=None, options=''): > +def _test_appendsrcfile(self, testrecipe, filename=None, destdir=None, > has_src_uri=True, srcdir=None, newfile=None, remove=None, machine=None , > options=''): > if newfile is None: > newfile = self.testfile > > @@ -1084,17 +1084,39 @@ class RecipetoolAppendsrcBase(RecipetoolBase): > expectedlines = ['FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"\n', > '\n'] > > +override = "" > +if machine: > +options += ' -m %s' % machine > +override = ':append:%s' % machine > +expectedlines.extend(['PACKAGE_ARCH = "${MACHINE_ARCH}"\n', > + '\n']) > + > if remove: > for entry in remove: > -expectedlines.extend(['SRC_URI:remove = "%s"\n' % entry, > +if machine: > +entry_remove_line = 'SRC_URI:remove:%s = " %s"\n' % > (machine, entry) > +else: > +entry_remove_line = 'SRC_URI:remove = "%s"\n' % entry > + > +expectedlines.extend([entry_remove_line, > '\n']) > > if has_src_uri: > uri = 'file://%s' % filename > if expected_subdir: > uri += ';subdir=%s' % expected_subdir > -expectedlines.extend(['SRC_URI += "%s"\n' % uri, > - '\n']) > +if machine: > +src_uri_line = 'SRC_URI%s = " %s"\n' % (override, uri) > +else: > +src_uri_line = 'SRC_URI += "%s"\n' % uri > + > +expectedlines.extend([src_uri_line, '\n']) > + > +with open("/tmp/tmp.txt", "w") as file: > +print(expectedlines, file=file) > + > +if machine: > +filename = '%s/%s' % (machine, filename) > > return self._try_recipetool_appendsrcfile(testrecipe, newfile, > destpath, options, expectedlines, [filename]) > > @@ -1153,13 +1175,23 @@ class > RecipetoolAppendsrcTests(RecipetoolAppendsrcBase): > self.assertTrue(filepath, 'Unable to test, no file:// uri found in > SRC_URI for %s' % testrecipe) > self._test_appendsrcfile(testrecipe, filepath, has_src_uri=False) > > -def test_recipetool_appendsrcfile_existing_in_src_uri_diff_params(self): > +def test_recipetool_appendsrcfile_existing_in_src_uri_diff_params(self, > machine=None): > testrecipe = 'base-files' > subdir = 'tmp' > filepath, srcuri_entry = self._get_first_file_uri(testrecipe) > self.assertTrue(filepath, 'Unable to test, no file:// uri found in > SRC_URI for %s' % testrecipe) > > -self._test_appendsrcfile(testrecipe, filepath, subdir, > remove=[srcuri_entry]) > +self._test_appendsrcfile(testrecipe, filepath, subdir, > machine=machine, remove=[srcuri_entry]) > + > +def test_recipetool_appendsrcfile_machine(self): > +# A very basic test > +self._test_appendsrcfile('base-files', 'a-file', machine='mymachine') > + I think this is causing problems with other selftests, e.g. this set of failures here: https://autobuilder.yoctoproject.org/typhoon/#/builders/127/builds/2559/steps/14/logs/stdio with errors like: ERROR: When reparsing /home/pokybuild/yocto-worker/oe-selftest-armhost/build/meta/recipes-core/base-files/base-files_3.0.14.bb:do_fetch, the basehash value changed from b720db5f2039a9a72917b5d400acd7f874d37014fec362112a44f90504ba79cd to 1b5f5a1ec1552e4a1e5798b2a1c23c062be5054be287d79c98e0e29da780c3b0. The metadata is not deterministic and this needs to be fixed. ERROR: The following commands may help: ERROR: $ bitbake base-files -cdo_fetch -Snone ERROR: Then: ERROR: $ bitbake base-files -cdo_fetch -Sprintdiff since this test is running on the same metadata as the other tests are using. We need to keep modifications isolated from the other tests that could be running. Cheers, Richard -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192015):
Re: [OE-Core][PATCH 2/3] cargo: Move CARGO_MANIFEST_PATH/CARGO_SRC_DIR to cargo_common
On Thu, Dec 7, 2023 at 10:40 PM Richard Purdie wrote: > > On Thu, 2023-12-07 at 13:39 +, Alex Kiernan wrote: > > cargo_common_do_configure uses CARGO_MANIFEST_PATH (which depends on > > CARGO_SRC_DIR), but their definition was in cargo.bbclass. > > > > Match the other variables here and change to default values, rather > > than weak defaults. > > FWIW "single value" class variables tend to work much better as ??= > (which I'd call default value) since than it doesn't matter if the > recipe setting comes before or after the inherit and the inherit > position in the recipe doesn't matter. > Ah, I guess that makes sense - for "single value" :append/:remove aren't really useful, so leaving the actual assignment as late as possible works? TBH I've never really been very clear what the "right" thing to use is between ?= and ??= > I'd call ?= a weak assignment or weak default. > > Thanks for working on cleaning some of these things up. I got so far > with it originally and then ran out of time (and too frustrated with > the long build/test cycles!). > I'll go back and do the opposite cleanup and send a v2. > Cheers, > > Richard > > > > > Signed-off-by: Alex Kiernan > > --- > > > > meta/classes-recipe/cargo.bbclass| 7 --- > > meta/classes-recipe/cargo_common.bbclass | 7 +++ > > 2 files changed, 7 insertions(+), 7 deletions(-) > > > > diff --git a/meta/classes-recipe/cargo.bbclass > > b/meta/classes-recipe/cargo.bbclass > > index 96a74e2ef1ec..0829a58dd90f 100644 > > --- a/meta/classes-recipe/cargo.bbclass > > +++ b/meta/classes-recipe/cargo.bbclass > > @@ -30,13 +30,6 @@ B = "${WORKDIR}/build" > > # where the issue occured > > export RUST_BACKTRACE = "1" > > > > -# The directory of the Cargo.toml relative to the root directory, per > > default > > -# assume there's a Cargo.toml directly in the root directory > > -CARGO_SRC_DIR ??= "" > > - > > -# The actual path to the Cargo.toml > > -CARGO_MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml" > > - > > RUSTFLAGS ??= "" > > BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}" > > # --frozen flag will prevent network access (which is required since only > > diff --git a/meta/classes-recipe/cargo_common.bbclass > > b/meta/classes-recipe/cargo_common.bbclass > > index bf298e96c745..c330c122a9d3 100644 > > --- a/meta/classes-recipe/cargo_common.bbclass > > +++ b/meta/classes-recipe/cargo_common.bbclass > > @@ -33,6 +33,13 @@ CARGO_DISABLE_BITBAKE_VENDORING ?= "0" > > # Used by libstd-rs to point to the vendor dir included in rustc src > > CARGO_VENDORING_DIRECTORY ?= "${CARGO_HOME}/bitbake" > > > > +# The directory of the Cargo.toml relative to the root directory, per > > default > > +# assume there's a Cargo.toml directly in the root directory > > +CARGO_SRC_DIR ?= "" > > + > > +# The actual path to the Cargo.toml > > +CARGO_MANIFEST_PATH ?= "${S}/${CARGO_SRC_DIR}/Cargo.toml" > > + > > CARGO_RUST_TARGET_CCLD ?= "${RUST_TARGET_CCLD}" > > cargo_common_do_configure () { > > mkdir -p ${CARGO_HOME}/bitbake > > > > > -- Alex Kiernan -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192014): https://lists.openembedded.org/g/openembedded-core/message/192014 Mute This Topic: https://lists.openembedded.org/mt/103034028/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-