Backport relevant changes from Zeus
v2 cover Backport relevant changes from Zeus
This patch set contains backports of our changes from Zeus that are relevant for Warrior.
PATCHv2: Add a backported patch from meson 0.50 to allow <language>_args and <language>_link_args properties, e.g., c_link_args, in meson.cross to be specified as either a sting or a list. We could potentially have stumbled on this problem any time since meson_array() was changed in commit 7fd8bc46 to return a string if only one argument is specified. However, it was hidden until the change to meson.bbclass in this patch series removed some unnecessary arguments, leaving only one link argument when building for nativesdk.
//Peter
The following changes since commit d0f73121551dc98f6924cd77952bf9ebf5ef3dd7:
poky.conf: Bump version for 2.7.2 warrior release (2019-10-30 13:55:49 +0000)
are available in the Git repository at:
git://push.yoctoproject.org/poky-contrib pkj/warrior_sync
Niclas Svensson (1):
devtool: finish: Keep patches ordered when updating bbappend
Peter Kjellerstedt (8):
meson: Backport patch to handle strings in cross file args meson.bbclass: Remove the MESON_*_ARGS variables
nativesdk-meson: Remove some unused variables
devtool: Avoid failure for recipes with S == WORKDIR and no local
files
package_rpm.bbclass: Remove a misleading bb.note()
tzdata: Correct the packaging of /etc/localtime and /etc/timezone
devtool: finish: Add suppport for the --no-clean option lib/oe/lsb: Make sure the distro ID is always lowercased
meta/classes/meson.bbclass | 15 ++-- meta/classes/package_rpm.bbclass | 5 +- meta/lib/oe/lsb.py | 8 +- meta/recipes-devtools/meson/meson.inc | 1 + ...ings-in-cross-file-args.-Closes-4671.patch | 87 +++++++++++++++++++ .../meson/nativesdk-meson_0.49.2.bb | 5 -- meta/recipes-extended/timezone/tzdata.bb | 5 +- scripts/lib/devtool/standard.py | 17 ++-- 8 files changed, 111 insertions(+), 32 deletions(-) create mode 100644 meta/recipes-devtools/meson/meson/0001-Handle-strings-in-cross-file-args.-Closes-4671.patch
Signature · 1 line
2.21.0
PATCH v2 1/9 meson: Backport patch to handle strings in cross file args
This allows <language>_args and <language>_link_args properties, e.g., c_link_args, in meson.cross to be specified as either a string or a list.
--- meta/recipes-devtools/meson/meson.inc | 1 + ...ings-in-cross-file-args.-Closes-4671.patch | 87 +++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 meta/recipes-devtools/meson/meson/0001-Handle-strings-in-cross-file-args.-Closes-4671.patch
meta/recipes-devtools/meson/meson.inc +1 -0
@@ -17,6 +17,7 @@ SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${P file://many-cross.patch \ file://cross-libdir.patch \ file://0001-Fix-missing-return-statements-that-are-seen-with-Wer.patch \ + file://0001-Handle-strings-in-cross-file-args.-Closes-4671.patch \ " SRC_URI[sha256sum] = "ef9f14326ec1e30d3ba1a26df0f92826ede5a79255ad723af78a2691c37109fd" SRC_URI[md5sum] = "0267b0871266056184c484792572c682"
meta/recipes-devtools/meson/meson/0001-Handle-strings-in-cross-file-args.-Closes-4671.patch new file +87 -0
87 lines not on this page · raw message
Signature · 1 line
2.21.0
PATCH v2 6/9 tzdata: Correct the packaging of /etc/localtime and /etc/timezone
In reply to Peter KjellerstedtFrom: Peter Kjellerstedt <[email protected]>
During restructuring of the packaging in 2af4d6eb (tzdata: Install everything by default), these two files remained in the tzdata package, which is supposed to be empty. Move them to tzdata-core where they belong.
Also simplify the definition of CONFFILES_tzdata-core. As its value only takes effect for files that actually exist, there is no need to complicate its definition by checking if a file is created before adding it to the list of configuration files.
--- meta/recipes-extended/timezone/tzdata.bb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
meta/recipes-extended/timezone/tzdata.bb +3 -2
@@ -147,6 +147,8 @@ FILES_tzdata-misc += "${datadir}/zoneinfo/Cuba \ RPROVIDES_tzdata-misc = "tzdata-misc" FILES_tzdata-core += " \ + ${sysconfdir}/localtime \ + ${sysconfdir}/timezone \ ${datadir}/zoneinfo/Pacific/Honolulu \ ${datadir}/zoneinfo/America/Anchorage \ ${datadir}/zoneinfo/America/Los_Angeles \
@@ -202,8 +204,7 @@ FILES_tzdata-core += " \ ${datadir}/zoneinfo/iso3166.tab \ ${datadir}/zoneinfo/Etc/*" -CONFFILES_tzdata-core += "${@ "${sysconfdir}/timezone" if bb.utils.to_boolean(d.getVar('INSTALL_TIMEZONE_FILE')) else "" }" -CONFFILES_tzdata-core += "${sysconfdir}/localtime" +CONFFILES_tzdata-core = "${sysconfdir}/localtime ${sysconfdir}/timezone" ALLOW_EMPTY_${PN} = "1" RDEPENDS_${PN} = "${TZ_PACKAGES}"
Signature · 1 line
2.21.0
PATCH v2 9/9 lib/oe/lsb: Make sure the distro ID is always lowercased
In reply to Peter KjellerstedtFrom: Peter Kjellerstedt <[email protected]>
In commit 8689e561 (lib/oe/lsb: attempt to ensure consistent distro id regardless of source), the distro ID returned by oe.lsb.distro_identifier() was lowercased, but only if a release version is also present.
This changes the code to always lowercase the distro ID, including the default distro ID "unknown", which is used if no other ID can be identified.
--- meta/lib/oe/lsb.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
meta/lib/oe/lsb.py +4 -4
@@ -110,12 +110,12 @@ def distro_identifier(adjust_hook=None): if adjust_hook: distro_id, release = adjust_hook(distro_id, release) if not distro_id: - return "Unknown" - # Filter out any non-alphanumerics - distro_id = re.sub(r'\W', '', distro_id) + return "unknown" + # Filter out any non-alphanumerics and convert to lowercase + distro_id = re.sub(r'\W', '', distro_id).lower() if release: - id_str = '{0}-{1}'.format(distro_id.lower(), release) + id_str = '{0}-{1}'.format(distro_id, release) else: id_str = distro_id return id_str.replace(' ','-').replace('/','-')
Signature · 1 line
2.21.0
PATCH v2 3/9 nativesdk-meson: Remove some unused variables
In reply to Peter KjellerstedtFrom: Peter Kjellerstedt <[email protected]>
--- meta/recipes-devtools/meson/nativesdk-meson_0.49.2.bb | 5 ----- 1 file changed, 5 deletions(-)
meta/recipes-devtools/meson/nativesdk-meson_0.49.2.bb +0 -5
@@ -16,11 +16,6 @@ def meson_endian(prefix, d): else: bb.fatal("Cannot determine endianism for %s-%s" % (arch, os)) -MESON_TOOLCHAIN_ARGS = "${BUILDSDK_CC_ARCH}${TOOLCHAIN_OPTIONS}" -MESON_C_ARGS = "${MESON_TOOLCHAIN_ARGS} ${BUILDSDK_CFLAGS}" -MESON_CPP_ARGS = "${MESON_TOOLCHAIN_ARGS} ${BUILDSDK_CXXFLAGS}" -MESON_LINK_ARGS = "${MESON_TOOLCHAIN_ARGS} ${BUILDSDK_LDFLAGS}" - # The cross file logic is similar but not identical to that in meson.bbclass, # since it's generating for an SDK rather than a cross-compile. Important # differences are:
Signature · 1 line
2.21.0
PATCH v2 4/9 devtool: Avoid failure for recipes with S == WORKDIR and no local files
In reply to Peter KjellerstedtFrom: Peter Kjellerstedt <[email protected]>
When extracting the sources for a recipe that has S == WORKDIR and no local files in the SRC_URI (which, e.g., can happen for a recipe with a URI that has the unpack=false attribute), the extraction fails with the following backtrace:
Traceback (most recent call last):
File ".../scripts/devtool", line 344, in <module>
ret = main()
File ".../scripts/devtool", line 331, in main
ret = args.func(args, config, basepath, workspace)
File ".../poky/scripts/lib/devtool/standard.py", line 762, in modify
initial_rev, _ = _extract_source(srctree, args.keep_temp, args.branch, False, config, basepath, workspace, args.fixed_setup, rd, tinfoil, no_overrides=args.no_overrides)
File ".../poky/scripts/lib/devtool/standard.py", line 647, in _extract_source
bb.process.run('git %s commit -a -m "Committing local file symlinks\n\n%s"' % (' '.join(useroptions), oe.patch.GitApplyTree.ignore_commit_prefix), cwd=srctree)
File ".../poky/bitbake/lib/bb/process.py", line 178, in run
raise ExecutionError(cmd, pipe.returncode, stdout, stderr)
bb.process.ExecutionError: Execution of 'git commit -a -m "Committing local file symlinks
%% ignore"' failed with exit code 1:
On branch devtool
nothing to commit, working tree clean
This is because no files were found in the oe-local-files directory and consequently no symbolic links were added using git add, but the git commit command was still executed.
--- scripts/lib/devtool/standard.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
scripts/lib/devtool/standard.py +3 -3
@@ -637,9 +637,9 @@ def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, works addfiles.append(os.path.join(relpth, fn)) if addfiles: bb.process.run('git add %s' % ' '.join(addfiles), cwd=srctree) - useroptions = [] - oe.patch.GitApplyTree.gitCommandUserOptions(useroptions, d=d) - bb.process.run('git %s commit -a -m "Committing local file symlinks\n\n%s"' % (' '.join(useroptions), oe.patch.GitApplyTree.ignore_commit_prefix), cwd=srctree) + useroptions = [] + oe.patch.GitApplyTree.gitCommandUserOptions(useroptions, d=d) + bb.process.run('git %s commit -m "Committing local file symlinks\n\n%s"' % (' '.join(useroptions), oe.patch.GitApplyTree.ignore_commit_prefix), cwd=srctree) if is_kernel_yocto: logger.info('Copying kernel config to srctree')
Signature · 1 line
2.21.0
PATCH v2 5/9 package_rpm.bbclass: Remove a misleading bb.note()
In reply to Peter KjellerstedtFrom: Peter Kjellerstedt <[email protected]>
It should have been removed in 3db9d865 (classes/package_rpm.bbclass:
Enhance diagnostic messages) when it was split in two new notes.
Also change the casing of two other notes to align them with the other notes.
--- meta/classes/package_rpm.bbclass | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
meta/classes/package_rpm.bbclass +2 -3
@@ -409,7 +409,6 @@ python write_specfile () { if not file_list and localdata.getVar('ALLOW_EMPTY', False) != "1": bb.note("Not creating empty RPM package for %s" % splitname) else: - bb.note("Creating RPM package for %s" % splitname) spec_files_top.append('%files') if extra_pkgdata: package_rpm_extra_pkgdata(splitname, spec_files_top, localdata)
@@ -418,7 +417,7 @@ python write_specfile () { bb.note("Creating RPM package for %s" % splitname) spec_files_top.extend(file_list) else: - bb.note("Creating EMPTY RPM Package for %s" % splitname) + bb.note("Creating empty RPM package for %s" % splitname) spec_files_top.append('') continue
@@ -510,7 +509,7 @@ python write_specfile () { bb.note("Creating RPM package for %s" % splitname) spec_files_bottom.extend(file_list) else: - bb.note("Creating EMPTY RPM Package for %s" % splitname) + bb.note("Creating empty RPM package for %s" % splitname) spec_files_bottom.append('') del localdata
Signature · 1 line
2.21.0
PATCH v2 7/9 devtool: finish: Keep patches ordered when updating bbappend
In reply to Peter KjellerstedtFrom: Niclas Svensson <[email protected]>
The _get_patchset_revs() function returns the patches in an OrderedDict to keep them ordered. However, this information was lost when the patches were added to the bbappend file.
--- scripts/lib/devtool/standard.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
scripts/lib/devtool/standard.py +4 -4
@@ -1520,17 +1520,17 @@ def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wil patches_dir, changed_revs) logger.debug('Pre-filtering: update: %s, new: %s' % (dict(upd_p), dict(new_p))) if filter_patches: - new_p = {} - upd_p = {k:v for k,v in upd_p.items() if k in filter_patches} + new_p = OrderedDict() + upd_p = OrderedDict((k,v) for k,v in upd_p.items() if k in filter_patches) remove_files = [f for f in remove_files if f in filter_patches] updatefiles = False updaterecipe = False destpath = None srcuri = (rd.getVar('SRC_URI', False) or '').split() if appendlayerdir: - files = dict((os.path.join(local_files_dir, key), val) for + files = OrderedDict((os.path.join(local_files_dir, key), val) for key, val in list(upd_f.items()) + list(new_f.items())) - files.update(dict((os.path.join(patches_dir, key), val) for + files.update(OrderedDict((os.path.join(patches_dir, key), val) for key, val in list(upd_p.items()) + list(new_p.items()))) if files or remove_files: removevalues = None
Signature · 1 line
2.21.0
PATCH v2 2/9 meson.bbclass: Remove the MESON_*_ARGS variables
In reply to Peter KjellerstedtFrom: Peter Kjellerstedt <[email protected]>
The options in ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} are already passed via ${CC}/${CXX} and there is no reason to pass them a second time. Thus we can remove MESON_TOOLCHAIN_ARGS. And when it is removed, the other MESON_*_ARGS variables revert to the standard CFLAGS, CXXFLAGS and LDFLAGS, so just use them directly instead.
Apart from the obvious improvement with not passing a lot of options twice, this also solves a problem where -pie would be passed on the command line in a way that it would prevent building any dynamic libraries using meson if using a toolchain that is not built with --enable-default-pie and if security_flags.inc is used.
--- meta/classes/meson.bbclass | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)
meta/classes/meson.bbclass +5 -10
@@ -30,11 +30,6 @@ MESONOPTS = " --prefix ${prefix} \ -Dcpp_args='${BUILD_CPPFLAGS} ${BUILD_CXXFLAGS}' \ -Dcpp_link_args='${BUILD_LDFLAGS}'" -MESON_TOOLCHAIN_ARGS = "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" -MESON_C_ARGS = "${MESON_TOOLCHAIN_ARGS} ${CFLAGS}" -MESON_CPP_ARGS = "${MESON_TOOLCHAIN_ARGS} ${CXXFLAGS}" -MESON_LINK_ARGS = "${MESON_TOOLCHAIN_ARGS} ${LDFLAGS}" - EXTRA_OEMESON_append = " ${PACKAGECONFIG_CONFARGS}" MESON_CROSS_FILE = ""
@@ -76,7 +71,7 @@ def meson_endian(prefix, d): bb.fatal("Cannot determine endianism for %s-%s" % (arch, os)) addtask write_config before do_configure -do_write_config[vardeps] += "MESON_C_ARGS MESON_CPP_ARGS MESON_LINK_ARGS CC CXX LD AR NM STRIP READELF" +do_write_config[vardeps] += "CC CXX LD AR NM STRIP READELF CFLAGS CXXFLAGS LDFLAGS" do_write_config() { # This needs to be Py to split the args into single-element lists cat >${WORKDIR}/meson.cross <<EOF
@@ -93,10 +88,10 @@ llvm-config = 'llvm-config8.0.0' [properties] needs_exe_wrapper = true -c_args = ${@meson_array('MESON_C_ARGS', d)} -c_link_args = ${@meson_array('MESON_LINK_ARGS', d)} -cpp_args = ${@meson_array('MESON_CPP_ARGS', d)} -cpp_link_args = ${@meson_array('MESON_LINK_ARGS', d)} +c_args = ${@meson_array('CFLAGS', d)} +c_link_args = ${@meson_array('LDFLAGS', d)} +cpp_args = ${@meson_array('CXXFLAGS', d)} +cpp_link_args = ${@meson_array('LDFLAGS', d)} gtkdoc_exe_wrapper = '${B}/gtkdoc-qemuwrapper' [host_machine]
Signature · 1 line
2.21.0
PATCH v2 8/9 devtool: finish: Add suppport for the --no-clean option
In reply to Peter KjellerstedtFrom: Peter Kjellerstedt <[email protected]>
This works just like the already existing --no-clean option to the devtool reset command.
--- scripts/lib/devtool/standard.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
scripts/lib/devtool/standard.py +2 -1
@@ -1895,7 +1895,7 @@ def finish(args, config, basepath, workspace): else: raise DevtoolError('Source tree is not clean:\n\n%s\nEnsure you have committed your changes or use -f/--force if you are sure there\'s nothing that needs to be committed' % dirty) - no_clean = False + no_clean = args.no_clean tinfoil = setup_tinfoil(basepath=basepath, tracking=True) try: rd = parse_recipe(config, tinfoil, args.recipename, True)
@@ -2169,6 +2169,7 @@ def register_commands(subparsers, context): parser_finish.add_argument('--mode', '-m', choices=['patch', 'srcrev', 'auto'], default='auto', help='Update mode (where %(metavar)s is %(choices)s; default is %(default)s)', metavar='MODE') parser_finish.add_argument('--initial-rev', help='Override starting revision for patches') parser_finish.add_argument('--force', '-f', action="store_true", help='Force continuing even if there are uncommitted changes in the source tree repository') + parser_finish.add_argument('--no-clean', '-n', action="store_true", help='Don\'t clean the sysroot to remove recipe output') parser_finish.add_argument('--no-overrides', '-O', action="store_true", help='Do not handle other override branches (if they exist)') parser_finish.add_argument('--dry-run', '-N', action="store_true", help='Dry-run (just report changes instead of writing them)') parser_finish.add_argument('--force-patch-refresh', action="store_true", help='Update patches in the layer even if they have not been modified (useful for refreshing patch context)')
Signature · 1 line
2.21.0
✗ patchtest: failure for Backport relevant changes from Zeus (rev2)
In reply to Peter Kjellerstedt== Series Details ==
Series: Backport relevant changes from Zeus (rev2)
Revision: 2
URL : https://patchwork.openembedded.org/series/20503/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:
* Issue Errors in your Python code were encountered [test_pylint]
Suggested fix Correct the lines introduced by your patch
Output Please, fix the listed issues:
scripts/lib/devtool/standard.py does not exist
If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).
---
Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
Quoted 12 lines · Peter Kjellerstedt
This patch set contains backports of our changes from Zeus that are relevant for Warrior.
PATCHv2: Add a backported patch from meson 0.50 to allow <language>_args and <language>_link_args properties, e.g.,
c_link_args, in meson.cross to be specified as either a sting or a list. We could potentially have stumbled on this problem any time sincemeson_array()was changed in commit7fd8bc46to return a string if only one argument is specified. However, it was hidden until the change to meson.bbclass in this patch series removed some unnecessary arguments, leaving only one link argument when building for nativesdk.
Quoted 1 line
//Peter
thanks.
pulled these in for next series. will let you know how it goes.
- armin
Quoted 34 lines
The following changes since commit
d0f73121551dc98f6924cd77952bf9ebf5ef3dd7:poky.conf: Bump version for 2.7.2 warrior release (2019-10-30 13:55:49 +0000)
are available in the Git repository at:
git://push.yoctoproject.org/poky-contribpkj/warrior_syncNiclas Svensson (1):
devtool: finish: Keep patches ordered when updating bbappendPeter Kjellerstedt (8):
meson: Backport patch to handle strings in cross file args meson.bbclass: Remove the MESON_*_ARGS variables
nativesdk-meson: Remove some unused variables
devtool: Avoid failure for recipes with S == WORKDIR and no local
files
package_rpm.bbclass: Remove a misleadingbb.note()
tzdata: Correct the packaging of/etc/localtimeand/etc/timezone
devtool: finish: Add suppport for the --no-clean optionlib/oe/lsb: Make sure the distro ID is always lowercasedmeta/classes/meson.bbclass | 15 ++-- meta/classes/package_rpm.bbclass | 5 +- meta/lib/oe/lsb.py | 8 +- meta/recipes-devtools/meson/meson.inc | 1 + ...ings-in-cross-file-args.-Closes-4671.patch | 87 +++++++++++++++++++ .../meson/nativesdk-meson_0.49.2.bb | 5 -- meta/recipes-extended/timezone/tzdata.bb | 5 +- scripts/lib/devtool/standard.py | 17 ++-- 8 files changed, 111 insertions(+), 32 deletions(-) create mode 100644 meta/recipes-devtools/meson/meson/0001-Handle-strings-in-cross-file-args.-Closes-4671.patch
Re: ✗ patchtest: failure for Backport relevant changes from Zeus (rev2)
In reply to PatchworkQuoted 17 lines
-----Original Message-----
From: Patchwork <[email protected]>
Sent: den 5 november 2019 23:32
To: Peter Kjellerstedt <[email protected]>
Cc: [email protected]
Subject: ✗ patchtest: failure for Backport relevant changes from Zeus (rev2)== Series Details ==
Series: Backport relevant changes from Zeus (rev2)
Revision: 2
URL : https://patchwork.openembedded.org/series/20503/
State : failure== Summary ==
Quoted 8 lines
Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:
* Issue Errors in your Python code were encountered [
test_pylint]
Suggested fix Correct the lines introduced by your patch
Output Please, fix the listed issues:
scripts/lib/devtool/standard.pydoes not exist
Can anyone explain what Patchwork is smoking? Why does it think that scripts/lib/devtool/standard.py does not exist in OE-Core?
Quoted 7 lines
If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).
Quoted 5 lines
---
Guidelines:
https://www.openembedded.org/wiki/Commit_Patch_Message_GuidelinesTest framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
//Peter