recipeutils: add optional stable_upgrade parameter to get_recipe_upgrade_status
PATCH v5 1/7 recipeutils: add optional stable_upgrade parameter to get_recipe_upgrade_status
From: Chen Qi <[email protected]>
We want the ability to do stable version upgrades for recipes. To this end, add an optional stable_upgrade parameter to the get_recipe_upgrade_status function, which defaults to False and when enabled will try to get the latest stable version of the recipe.
The UPSTREAM_STABLE_RELEASE_REGEX is respected. If a recipe sets it, it will be used as the filter_regex. If it's not set explicitly, it means that there's no stable updates or the recipe hasn't been checked yet.
--- meta/lib/oe/recipeutils.py | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-)
meta/lib/oe/recipeutils.py +17 -6
@@ -1009,7 +1009,7 @@ def get_recipe_pv_with_pfx_sfx(pv, uri_type): return (pv, pfx, sfx) -def get_recipe_upstream_version(rd): +def get_recipe_upstream_version(rd, stable_upgrade): """ Get upstream version of recipe using bb.fetch2 methods with support for http, https, ftp and git.
@@ -1080,7 +1080,15 @@ def get_recipe_upstream_version(rd): except bb.fetch2.FetchError as e: bb.warn("Unable to obtain latest revision: {}".format(e)) else: - pupver = ud.method.latest_versionstring(ud, rd) + if stable_upgrade: + stable_release_regex = rd.getVar("UPSTREAM_STABLE_RELEASE_REGEX") + if stable_release_regex: + pupver = ud.method.latest_versionstring(ud, rd, filter_regex=stable_release_regex) + else: + # Not explicitly setting "UPSTREAM_STABLE_RELEASE_REGEX" means there's no stable upgrade + pupver = (ru['current_version'], None) + else: + pupver = ud.method.latest_versionstring(ud, rd) (upversion, revision) = pupver if upversion:
@@ -1094,8 +1102,8 @@ def get_recipe_upstream_version(rd): return ru -def _get_recipe_upgrade_status(data): - uv = get_recipe_upstream_version(data) +def _get_recipe_upgrade_status(data, stable_upgrade): + uv = get_recipe_upstream_version(data, stable_upgrade) pn = data.getVar('PN') cur_ver = uv['current_version']
@@ -1119,9 +1127,10 @@ def _get_recipe_upgrade_status(data): return {'pn':pn, 'status':status, 'cur_ver':cur_ver, 'next_ver':next_ver, 'maintainer':maintainer, 'revision':revision, 'no_upgrade_reason':no_upgrade_reason} -def get_recipe_upgrade_status(recipes=None): +def get_recipe_upgrade_status(recipes=None, stable_upgrade=False): pkgs_list = [] data_copy_list = [] + stable_copy_list = [] copy_vars = ('SRC_URI', 'PV', 'DL_DIR',
@@ -1134,6 +1143,7 @@ def get_recipe_upgrade_status(recipes=None): 'UPSTREAM_CHECK_REGEX', 'UPSTREAM_CHECK_URI', 'UPSTREAM_VERSION_UNKNOWN', + 'UPSTREAM_STABLE_RELEASE_REGEX', 'RECIPE_MAINTAINER', 'RECIPE_NO_UPDATE_REASON', 'RECIPE_UPSTREAM_VERSION',
@@ -1180,12 +1190,13 @@ def get_recipe_upgrade_status(recipes=None): data_copy.setVar(k, data.getVar(k)) data_copy_list.append(data_copy) + stable_copy_list.append(stable_upgrade) recipeincludes[data.getVar('FILE')] = {'bbincluded':data.getVar('BBINCLUDED').split(),'pn':data.getVar('PN')} from concurrent.futures import ProcessPoolExecutor with ProcessPoolExecutor(max_workers=utils.cpu_count()) as executor: - pkgs_list = executor.map(_get_recipe_upgrade_status, data_copy_list) + pkgs_list = executor.map(_get_recipe_upgrade_status, data_copy_list, stable_copy_list) return _group_recipes(pkgs_list, _get_common_include_recipes(recipeincludes))
Signature · 1 line
2.34.1
PATCH v5 2/7 upstream-stable-release-point.bbclass: add bbclass for stable point upgrade
From: Chen Qi <[email protected]>
If a recipe can do stable version upgrade and the stable parts of the version is seperated by '.', then it can inherit this bbclass.
By default, the stable parts number is 2, which means the following upgrades are stable version upgrades:
x.y.z -> x.y.z+1
x.y.z+1 -> x.y.z+1.zz
x.y.z+1.zz -> x.y.z+2
Recipes that have different stable version parts can also inherit this bbclass and set STABLE_VERSION_PARTS. For example, systemd sets this variable to "1".
For recipes whose stable version part is not separated by '.', they should not inherit this bbclass and intead set UPSTREAM_STABLE_RELEASE_REGEX themselves. For example, openssh's stable part is separted by 'p' and should not inherit this bbclass.
--- .../upstream-stable-release-point.bbclass | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 meta/classes-recipe/upstream-stable-release-point.bbclass
meta/classes-recipe/upstream-stable-release-point.bbclass new file +21 -0
@@ -0,0 +1,21 @@ +# +# Copyright OpenEmbedded Contributors +# +# SPDX-License-Identifier: MIT +# + +# +# This bbclass is expected to be inherited by recipes explicitly. +# If a recipe's version is separated by point and we know for sure +# which parts of the version represent the stable part, then the +# recipe could inherit this bbclass. +# + +STABLE_VERSION_PARTS ?= "2" +def get_majmin_version_regex(d): + pv = d.getVar('PV') + stable_parts = pv.split('.')[:int(d.getVar('STABLE_VERSION_PARTS'))] + return '\.'.join(stable_parts) + +STABLE_VERSION_REGEX = "${@get_majmin_version_regex(d)}" +UPSTREAM_STABLE_RELEASE_REGEX ?= "^${STABLE_VERSION_REGEX}(\.\d+)*$"
Signature · 1 line
2.34.1
PATCH v5 3/7 vte: inherit upstream-stable-release-point
In reply to [email protected]From: Chen Qi <[email protected]>
The last version part bump for vte is a stable upgrade.
* Evidence
Its repo[1] has remote branches like:
origin/vte-0-76
origin/vte-0-78
origin/vte-0-80
origin/vte-0-82
origin/vte-0-84So for example, 0.82.2 -> 0.82.3 is a stable upgrade.
[1] https://gitlab.gnome.org/GNOME/vte.git
--- meta/recipes-support/vte/vte_0.82.2.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/vte/vte_0.82.2.bb +1 -1
@@ -15,7 +15,7 @@ DEPENDS = "fastfloat fmt glib-2.0 glib-2.0-native gtk+3 libpcre2 libxml2-native GIR_MESON_OPTION = 'gir' GIDOCGEN_MESON_OPTION = "docs" -inherit gnomebase gi-docgen features_check upstream-version-is-even gobject-introspection systemd vala +inherit gnomebase gi-docgen features_check upstream-version-is-even gobject-introspection systemd vala upstream-stable-release-point SRC_URI += "file://0001-Add-W_EXITCODE-macro-for-non-glibc-systems.patch \ file://0001-support-reproducibility-for-debug-sources.patch;patchdir=./subprojects/simdutf \
Signature · 1 line
2.34.1
PATCH v5 4/7 systemd: inherit upstream-stable-release-point
In reply to [email protected]From: Chen Qi <[email protected]>
Upgrades like 259 -> 259.1 or 259.1 -> 259.2 are stable upgrades for systemd.
* Evidence
Its repo[1] has remote branches like:
origin/v256-stable
origin/v257-stable
origin/v258-stable
origin/v259-stable
origin/v260-stable[1] https://github.com/systemd/systemd.git
--- meta/recipes-core/systemd/systemd.inc | 3 +++ 1 file changed, 3 insertions(+)
meta/recipes-core/systemd/systemd.inc +3 -0
@@ -19,6 +19,9 @@ SRCREV = "b3d8fc43e9cb531d958c17ef2cd93b374bc14e8a" SRCBRANCH = "v259-stable" SRC_URI = "git://github.com/systemd/systemd.git;protocol=https;branch=${SRCBRANCH};tag=v${PV}" +inherit upstream-stable-release-point +STABLE_VERSION_PARTS = "1" + CVE_PRODUCT = "systemd" CVE_STATUS[CVE-2019-3815] = "not-applicable-platform: only applied to RHEL"
Signature · 1 line
2.34.1
PATCH v5 5/7 kmod: inherit upstream-stable-release-point
In reply to [email protected]From: Chen Qi <[email protected]>
Upgrades like 34 -> 34.1 or 34.1 -> 34.2 for kmod are stable upgrades.
* Evidence
Its repo contains a branch called:
origin/kmod-34.y
Its tags are like:
v32
v33
v34
v34.1
So we can infer that the maintenance policy for kmod is that upgrades such as 33 -> 34 contains features and upgrades such as 34 -> 34.1 is a stable upgrade. And such maintenance policy is likely to continue.
[1] https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git
--- meta/recipes-kernel/kmod/kmod_34.2.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-kernel/kmod/kmod_34.2.bb +3 -1
@@ -13,13 +13,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ file://libkmod/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ file://tools/COPYING;md5=751419260aa954499f7abaabaa882bbe \ " -inherit bash-completion gtk-doc manpages meson pkgconfig update-alternatives +inherit bash-completion gtk-doc manpages meson pkgconfig update-alternatives upstream-stable-release-point SRC_URI = "https://www.kernel.org/pub/linux/utils/kernel/${BPN}/${BP}.tar.xz \ file://depmod-search.conf \ " SRC_URI[sha256sum] = "5a5d5073070cc7e0c7a7a3c6ec2a0e1780850c8b47b3e3892226b93ffcb9cb54" +STABLE_VERSION_PARTS = "1" + EXTRA_OEMESON += "\ -Ddistconfdir=${nonarch_base_libdir} \ --bindir=${base_bindir} \
Signature · 1 line
2.34.1
PATCH v5 6/7 util-linux: inherit upstream-stable-release-point
In reply to [email protected]From: Chen Qi <[email protected]>
util-linux has x.y.z version scheme and the bump in z is a stable version upgrade. For example, 2.41.1 -> 2.41.2 is a stable version upgrade.
* Evidence
Its repo[1] contains branches like:
origin/stable/v2.39
origin/stable/v2.40
origin/stable/v2.41[1] https://github.com/util-linux/util-linux.git
--- meta/recipes-core/util-linux/util-linux.inc | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-core/util-linux/util-linux.inc +2 -0
@@ -25,4 +25,6 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-lin SRC_URI[sha256sum] = "3330d873f0fceb5560b89a7dc14e4f3288bbd880e96903ed9b50ec2b5799e58b" +inherit upstream-stable-release-point + CVE_PRODUCT = "util-linux"
Signature · 1 line
2.34.1
PATCH v5 7/7 openssh: set UPSTREAM_STABLE_RELEASE_REGEX
In reply to [email protected]From: Chen Qi <[email protected]>
For openssh, 10.3p1 -> 10.3p2 is a stable upgrade.
--- meta/recipes-connectivity/openssh/openssh_10.3p1.bb | 3 +++ 1 file changed, 3 insertions(+)
meta/recipes-connectivity/openssh/openssh_10.3p1.bb +3 -0
@@ -27,6 +27,9 @@ SRC_URI = "https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.ta " SRC_URI[sha256sum] = "56682a36bb92dcf4b4f016fd8ec8e74059b79a8de25c15d670d731e7d18e45f4" +STABLE_VERSION = "${@d.getVar('PV').split('p')[0].replace('.', '\.')}" +UPSTREAM_STABLE_RELEASE_REGEX = "^${STABLE_VERSION}p\d+$" + CVE_STATUS[CVE-2007-2768] = "not-applicable-config: This CVE is specific to OpenSSH with the pam opie which we don't build/use here." # This CVE is specific to OpenSSH server, as used in Fedora and Red Hat Enterprise Linux 7
Signature · 1 line
2.34.1
Thanks, I think this is good and ready. I'll pick the auh patch when bitbake and core patches merge.
We can add more recipes over time (e.g. openssl, webkit, glib, ...), they don't have to be in the initial patchset. Probably a review of scarthgap/whinlatter/walnascar/styhead commits can help identify more recipes with stable maintenance releases as well.
Daniel's changelog extraction patches will also help a lot, take a look at them.
Alex
Quoted 97 lines · On Wed, 13 May 2026 at 07:23, <[email protected]> wrote:
From: Chen Qi <[email protected]>
We want the ability to do stable version upgrades for recipes. To this end, add an optional
stable_upgradeparameter to theget_recipe_upgrade_statusfunction, which defaults to False and when enabled will try to get the latest stable version of the recipe.The
UPSTREAM_STABLE_RELEASE_REGEXis respected. If a recipe sets it, it will be used as thefilter_regex. If it's not set explicitly, it means that there's no stable updates or the recipe hasn't been checked yet.Signed-off-by Chen Qi <[email protected]>--- meta/lib/oe/recipeutils.py | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-)meta/lib/oe/recipeutils.py +17
-7@@ -1009,7 +1009,7 @@ def get_recipe_pv_with_pfx_sfx(pv, uri_type): return (pv, pfx, sfx) -def get_recipe_upstream_version(rd): +def get_recipe_upstream_version(rd, stable_upgrade): """ Get upstream version of recipe using bb.fetch2 methods with support for http, https, ftp and git.@@ -1080,7 +1080,15 @@ def get_recipe_upstream_version(rd): except bb.fetch2.FetchError as e: bb.warn("Unable to obtain latest revision: {}".format(e)) else: - pupver = ud.method.latest_versionstring(ud, rd) + if stable_upgrade: + stable_release_regex = rd.getVar("UPSTREAM_STABLE_RELEASE_REGEX") + if stable_release_regex: + pupver = ud.method.latest_versionstring(ud, rd, filter_regex=stable_release_regex) + else: + # Not explicitly setting "UPSTREAM_STABLE_RELEASE_REGEX" means there's no stable upgrade + pupver = (ru['current_version'], None) + else: + pupver = ud.method.latest_versionstring(ud, rd) (upversion, revision) = pupver if upversion:@@ -1094,8 +1102,8 @@ def get_recipe_upstream_version(rd): return ru -def _get_recipe_upgrade_status(data): - uv = get_recipe_upstream_version(data) +def _get_recipe_upgrade_status(data, stable_upgrade): + uv = get_recipe_upstream_version(data, stable_upgrade) pn = data.getVar('PN') cur_ver = uv['current_version']@@ -1119,9 +1127,10 @@ def _get_recipe_upgrade_status(data): return {'pn':pn, 'status':status, 'cur_ver':cur_ver, 'next_ver':next_ver, 'maintainer':maintainer, 'revision':revision, 'no_upgrade_reason':no_upgrade_reason} -def get_recipe_upgrade_status(recipes=None): +def get_recipe_upgrade_status(recipes=None, stable_upgrade=False): pkgs_list = [] data_copy_list = [] + stable_copy_list = [] copy_vars = ('SRC_URI', 'PV', 'DL_DIR',@@ -1134,6 +1143,7 @@ def get_recipe_upgrade_status(recipes=None): 'UPSTREAM_CHECK_REGEX', 'UPSTREAM_CHECK_URI', 'UPSTREAM_VERSION_UNKNOWN', + 'UPSTREAM_STABLE_RELEASE_REGEX', 'RECIPE_MAINTAINER', 'RECIPE_NO_UPDATE_REASON', 'RECIPE_UPSTREAM_VERSION',@@ -1180,12 +1190,13 @@ def get_recipe_upgrade_status(recipes=None): data_copy.setVar(k, data.getVar(k)) data_copy_list.append(data_copy) + stable_copy_list.append(stable_upgrade) recipeincludes[data.getVar('FILE')] = {'bbincluded':data.getVar('BBINCLUDED').split(),'pn':data.getVar('PN')} from concurrent.futures import ProcessPoolExecutor with ProcessPoolExecutor(max_workers=utils.cpu_count()) as executor: - pkgs_list = executor.map(_get_recipe_upgrade_status, data_copy_list) + pkgs_list = executor.map(_get_recipe_upgrade_status, data_copy_list, stable_copy_list) return _group_recipes(pkgs_list, _get_common_include_recipes(recipeincludes)) --2.34.1
Hi,
I will be presenting in Nice https://github.com/Nordix/meta-binaryaudit/tree/devel which can help also identify more components that are good keeping backward compatibility. I could send the list of components that I have identified.
Qi, will you request to have this backported to the TSC? Once my devtool changelog patch get's merged I was planning to request it as well. Then we can have a powerful AUH tool to help to maintain version in LTS verifying backward compatibility or for selected components.
Best regards,
Daniel
Quoted 129 lines
-----Original Message-----
From: Alexander Kanavin <[email protected]>
Sent: Wednesday, 13 May 2026 11:36
To: [email protected]
Cc: [email protected]; [email protected]; Daniel Turull <[email protected]>
Subject: Re: [OE-core][PATCH V5 1/7] recipeutils: add optionalstable_upgradeparameter toget_recipe_upgrade_statusThanks, I think this is good and ready. I'll pick the auh patch when bitbake and core patches merge.
We can add more recipes over time (e.g. openssl, webkit, glib, ...), they don't have to be in the initial patchset. Probably a review of scarthgap/whinlatter/walnascar/styhead commits can help identify more recipes with stable maintenance releases as well.
Daniel's changelog extraction patches will also help a lot, take a look at them.
Alex
Quoted 32 lines · On Wed, 13 May 2026 at 07:23, <[email protected]> wrote:
From: Chen Qi <[email protected]>
We want the ability to do stable version upgrades for recipes. To this end, add an optional
stable_upgradeparameter to theget_recipe_upgrade_statusfunction, which defaults to False and when enabled will try to get the latest stable version of the recipe.The
UPSTREAM_STABLE_RELEASE_REGEXis respected. If a recipe sets it, it will be used as thefilter_regex. If it's not set explicitly, it means that there's no stable updates or the recipe hasn't been checked yet.Signed-off-by Chen Qi <[email protected]>--- meta/lib/oe/recipeutils.py | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-)meta/lib/oe/recipeutils.py +1
-1@@ -1009,7 +1009,7 @@ def get_recipe_pv_with_pfx_sfx(pv, uri_type): return (pv, pfx, sfx) -def get_recipe_upstream_version(rd): +def get_recipe_upstream_version(rd, stable_upgrade): """ Get upstream version of recipe using bb.fetch2 methods with support for http, https, ftp and git.meta/lib/oe/recipeutils.py def get_recipe_upstream_version(rd): · line 1084
Quoted 6 lines
meta/lib/oe/recipeutils.py +2
-1@@ -1080,7 +1080,15 @@ def get_recipe_upstream_version(rd): except bb.fetch2.FetchError as e: bb.warn("Unable to obtain latest revision: {}".format(e)) else: - pupver = ud.method.latest_versionstring(ud, rd) + if stable_upgrade: + stable_release_regex =
rd.getVar("UPSTREAM_STABLE_RELEASE_REGEX")meta/lib/oe/recipeutils.py def get_recipe_upstream_version(rd): · line 1086
Quoted 2 lines
meta/lib/oe/recipeutils.py +2
-0+ if stable_release_regex: + pupver = ud.method.latest_versionstring(ud, rd,filter_regex=stable_release_regex)
meta/lib/oe/recipeutils.py def get_recipe_upstream_version(rd): · line 1088
Quoted 2 lines
meta/lib/oe/recipeutils.py +2
-0+ else: + # Not explicitly setting "UPSTREAM_STABLE_RELEASE_REGEX"means there's no stable upgrade
Quoted 61 lines
meta/lib/oe/recipeutils.py +7
-3+ pupver = (ru['current_version'], None) + else: + pupver = ud.method.latest_versionstring(ud, rd) (upversion, revision) = pupver if upversion:@@ -1094,8 +1102,8 @@ def get_recipe_upstream_version(rd): return ru -def _get_recipe_upgrade_status(data): - uv = get_recipe_upstream_version(data) +def _get_recipe_upgrade_status(data, stable_upgrade): + uv = get_recipe_upstream_version(data, stable_upgrade) pn = data.getVar('PN') cur_ver = uv['current_version']@@ -1119,9 +1127,10 @@ def _get_recipe_upgrade_status(data): return {'pn':pn, 'status':status, 'cur_ver':cur_ver, 'next_ver':next_ver, 'maintainer':maintainer, 'revision':revision, 'no_upgrade_reason':no_upgrade_reason} -def get_recipe_upgrade_status(recipes=None): +def get_recipe_upgrade_status(recipes=None, stable_upgrade=False): pkgs_list = [] data_copy_list = [] + stable_copy_list = [] copy_vars = ('SRC_URI','PV', 'DL_DIR',meta/lib/oe/recipeutils.py +1
-0@@ -1134,6 +1143,7 @@ def get_recipe_upgrade_status(recipes=None): 'UPSTREAM_CHECK_REGEX', 'UPSTREAM_CHECK_URI', 'UPSTREAM_VERSION_UNKNOWN', + 'UPSTREAM_STABLE_RELEASE_REGEX', 'RECIPE_MAINTAINER', 'RECIPE_NO_UPDATE_REASON', 'RECIPE_UPSTREAM_VERSION', @@ -1180,12 +1190,13 @@def
get_recipe_upgrade_status(recipes=None):
data_copy.setVar(k, data.getVar(k))
data_copy_list.append(data_copy)
+stable_copy_list.append(stable_upgrade)recipeincludes[data.getVar('FILE')] =
{'bbincluded':data.getVar('BBINCLUDED').split(),'pn':data.getVar('PN') }from concurrent.futures import ProcessPoolExecutor
with ProcessPoolExecutor(max_workers=utils.cpu_count()) as executor:meta/lib/oe/recipeutils.py +2
-1- pkgs_list = executor.map(_get_recipe_upgrade_status, data_copy_list) + pkgs_list = executor.map(_get_recipe_upgrade_status, + data_copy_list, stable_copy_list) return _group_recipes(pkgs_list,
_get_common_include_recipes(recipeincludes))--
2.34.1
Quoted 4 lines · Daniel Turull
I will be presenting in Nice https://github.com/Nordix/meta-binaryaudit/tree/devel which can help also identify more components that are good keeping backward compatibility. I could send the list of components that I have identified.
Qi, will you request to have this backported to the TSC? Once my devtool changelog patch get's merged I was planning to request it as well. Then we can have a powerful AUH tool to help to maintain version in LTS verifying backward compatibility or for selected components.
Just in case, I support the backport. The changes to bitbake/core are not invasive, and they're in relatively 'safe' parts of the code that aren't used in core workflows (e.g. actual builds aren't affected, only the version checks and even there it's backwards compatible).
Alex
Hi Daniel,
I don't have any strong preference. I'll respect TSC's decision and if there's anything that needs me to do, I'll do it.
My major focus, as replied to Alex in other email, is to go through oe-core and meta-openembedded once these patches get merged. I expect that the UPSTREAM_STABLE_RELEASE_REGEX meta data will be in good shape in one or two months. And Yocto LTS releases (future ones can maybe the current ones if the backport happens) can make use of these meta data.
P.S.
I saw the changelog changes and I like it.
Regards,
Qi
-----Original Message-----
From: Alexander Kanavin <[email protected]>
Sent: Wednesday, May 13, 2026 5:52 PM
To: Daniel Turull <[email protected]>
Cc: Chen, Qi <[email protected]>; [email protected]; MacLeod, Randy <[email protected]>
Subject: Re: [OE-core][PATCH V5 1/7] recipeutils: add optional stable_upgrade parameter to get_recipe_upgrade_status
Quoted 4 lines · Daniel Turull
I will be presenting in Nice https://github.com/Nordix/meta-binaryaudit/tree/devel which can help also identify more components that are good keeping backward compatibility. I could send the list of components that I have identified.
Qi, will you request to have this backported to the TSC? Once my devtool changelog patch get's merged I was planning to request it as well. Then we can have a powerful AUH tool to help to maintain version in LTS verifying backward compatibility or for selected components.
Just in case, I support the backport. The changes to bitbake/core are not invasive, and they're in relatively 'safe' parts of the code that aren't used in core workflows (e.g. actual builds aren't affected, only the version checks and even there it's backwards compatible).
Alex
Hi Alex,
Thanks for your review. After these patches are merged, I think I can coordinate some of my colleagues to help with adding more recipes. In this way, the meta data for oe-core and meta-openembedded will be ready in one or two months. Reviewing previous commits of released branches is really a good idea!
I think we'll also be checking repos, branches (as you suggested), changelogs and even upstreams directly to ensure the correctness.
Regards,
Qi
-----Original Message-----
From: Alexander Kanavin <[email protected]>
Sent: Wednesday, May 13, 2026 5:36 PM
To: Chen, Qi <[email protected]>
Cc: [email protected]; MacLeod, Randy <[email protected]>; Daniel Turull <[email protected]>
Subject: Re: [OE-core][PATCH V5 1/7] recipeutils: add optional stable_upgrade parameter to get_recipe_upgrade_status
Thanks, I think this is good and ready. I'll pick the auh patch when bitbake and core patches merge.
We can add more recipes over time (e.g. openssl, webkit, glib, ...), they don't have to be in the initial patchset. Probably a review of scarthgap/whinlatter/walnascar/styhead commits can help identify more recipes with stable maintenance releases as well.
Daniel's changelog extraction patches will also help a lot, take a look at them.
Alex
Quoted 103 lines · On Wed, 13 May 2026 at 07:23, <[email protected]> wrote:
From: Chen Qi <[email protected]>
We want the ability to do stable version upgrades for recipes. To this end, add an optional
stable_upgradeparameter to theget_recipe_upgrade_statusfunction, which defaults to False and when enabled will try to get the latest stable version of the recipe.The
UPSTREAM_STABLE_RELEASE_REGEXis respected. If a recipe sets it, it will be used as thefilter_regex. If it's not set explicitly, it means that there's no stable updates or the recipe hasn't been checked yet.Signed-off-by Chen Qi <[email protected]>--- meta/lib/oe/recipeutils.py | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-)meta/lib/oe/recipeutils.py +14
-5@@ -1009,7 +1009,7 @@ def get_recipe_pv_with_pfx_sfx(pv, uri_type): return (pv, pfx, sfx) -def get_recipe_upstream_version(rd): +def get_recipe_upstream_version(rd, stable_upgrade): """ Get upstream version of recipe using bb.fetch2 methods with support for http, https, ftp and git.@@ -1080,7 +1080,15 @@ def get_recipe_upstream_version(rd): except bb.fetch2.FetchError as e: bb.warn("Unable to obtain latest revision: {}".format(e)) else: - pupver = ud.method.latest_versionstring(ud, rd) + if stable_upgrade: + stable_release_regex = rd.getVar("UPSTREAM_STABLE_RELEASE_REGEX") + if stable_release_regex: + pupver = ud.method.latest_versionstring(ud, rd, filter_regex=stable_release_regex) + else: + # Not explicitly setting "UPSTREAM_STABLE_RELEASE_REGEX" means there's no stable upgrade + pupver = (ru['current_version'], None) + else: + pupver = ud.method.latest_versionstring(ud, rd) (upversion, revision) = pupver if upversion:@@ -1094,8 +1102,8 @@ def get_recipe_upstream_version(rd): return ru -def _get_recipe_upgrade_status(data): - uv = get_recipe_upstream_version(data) +def _get_recipe_upgrade_status(data, stable_upgrade): + uv = get_recipe_upstream_version(data, stable_upgrade) pn = data.getVar('PN') cur_ver = uv['current_version']@@ -1119,9 +1127,10 @@ def _get_recipe_upgrade_status(data): return {'pn':pn, 'status':status, 'cur_ver':cur_ver, 'next_ver':next_ver, 'maintainer':maintainer, 'revision':revision, 'no_upgrade_reason':no_upgrade_reason} -def get_recipe_upgrade_status(recipes=None): +def get_recipe_upgrade_status(recipes=None, stable_upgrade=False): pkgs_list = [] data_copy_list = [] + stable_copy_list = [] copy_vars = ('SRC_URI','PV', 'DL_DIR',meta/lib/oe/recipeutils.py +1
-0@@ -1134,6 +1143,7 @@ def get_recipe_upgrade_status(recipes=None): 'UPSTREAM_CHECK_REGEX', 'UPSTREAM_CHECK_URI', 'UPSTREAM_VERSION_UNKNOWN', + 'UPSTREAM_STABLE_RELEASE_REGEX', 'RECIPE_MAINTAINER', 'RECIPE_NO_UPDATE_REASON', 'RECIPE_UPSTREAM_VERSION', @@ -1180,12 +1190,13 @@def
get_recipe_upgrade_status(recipes=None):
data_copy.setVar(k, data.getVar(k))
data_copy_list.append(data_copy)
+stable_copy_list.append(stable_upgrade)recipeincludes[data.getVar('FILE')] =
{'bbincluded':data.getVar('BBINCLUDED').split(),'pn':data.getVar('PN') }from concurrent.futures import ProcessPoolExecutor
with ProcessPoolExecutor(max_workers=utils.cpu_count()) as executor:meta/lib/oe/recipeutils.py +2
-1- pkgs_list = executor.map(_get_recipe_upgrade_status, data_copy_list) + pkgs_list = executor.map(_get_recipe_upgrade_status, + data_copy_list, stable_copy_list) return _group_recipes(pkgs_list,
_get_common_include_recipes(recipeincludes))--
2.34.1
Quoted 7 lines · Chen Qi via lists.openembedded.org
From: Chen Qi <[email protected]>
We want the ability to do stable version upgrades for recipes. To this end, add an optional
stable_upgradeparameter to theget_recipe_upgrade_statusfunction, which defaults to False and when enabled will try to get the latest stable version of the recipe.
Quoted 7 lines
The
UPSTREAM_STABLE_RELEASE_REGEXis respected. If a recipe sets it, it will be used as thefilter_regex. If it's not set explicitly, it means that there's no stable updates or the recipe hasn't been checked yet.Signed-off-by Chen Qi <[email protected]>---
Hi Chen,
Thanks for the new version.
We got several selftest fails on the autobuilder:
2026-05-13 20:05:23,677 - oe-selftest - INFO - overlayfs.OverlayFSTests.test_mount_unit_not_set (subunit.RemotedTestCase) 2026-05-13 20:05:23,678 - oe-selftest - INFO - ... FAIL
...
ERROR: /srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-37462/meta-selftest/recipes-test/overlayfs-user/overlayfs-user.bb: A recipe uses overlayfs class but there is no OVERLAYFS_MOUNT_POINT set in your MACHINE configuration
ERROR: Parsing halted due to errors, see error messages above
...
2026-05-13 20:11:59,345 - oe-selftest - INFO - overlayfs.OverlayFSTests.test_wrong_mount_unit_set (subunit.RemotedTestCase) 2026-05-13 20:11:59,345 - oe-selftest - INFO - ... FAIL ... 2026-05-13 20:22:13,763 - oe-selftest - INFO - recipetool.RecipetoolAppendTests.test_recipetool_appendfile_add_bindir (subunit.RemotedTestCase) 2026-05-13 20:22:13,764 - oe-selftest - INFO - ... FAIL ... 2026-05-13 20:23:11,171 - oe-selftest - INFO - recipetool.RecipetoolAppendTests.test_recipetool_appendfile_add_machine (subunit.RemotedTestCase) 2026-05-13 20:23:11,172 - oe-selftest - INFO - ... FAIL ... 2026-05-13 20:24:48,333 - oe-selftest - INFO - recipetool.RecipetoolAppendTests.test_recipetool_appendfile_basic (subunit.RemotedTestCase) 2026-05-13 20:24:48,334 - oe-selftest - INFO - ... FAIL
...
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3951
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/3850
https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/3718
Can you have a look at this issue?
Thanks,
Mathieu
Signature · 3 lines
Mathieu Dubois-Briand, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Hi Mathieu,
I can't reproduce this issue.
I ran the related recipetool oe-selftest on Ubuntu 22.04 host, Ubuntu 24.04 host and Fedora 44 container. All succeeded.
To be more detailed, I ran 'oe-selftest -r recipetool.RecipetoolAppendTests.test_recipetool_appendfile_add_bindir' on Ubuntu 22 and Fedora 44, and 'oe-selftest -r recipetool' on Ubuntu 24.
I examined the error messages on autobuilder. The key part is:
upstream-stable-release-point.bbclass:18: SyntaxWarning: invalid escape sequence '\\.'\n return '\\.'.join(stable_parts)\n
However, the actual codes are:
'\.'.join(stable_parts)
There seems to be an extra '\' there. Interestingly, even if I manually added an extra '\' to the codes, the test ('oe-selftest -r recipetool.RecipetoolAppendTests.test_recipetool_appendfile_add_bindir) still passed.
Could you please help me check how to reproduce this issue?
For easier examination, I've copy pasted the autobuilder's error message below.
----- error message start -----
2026-05-13 20:22:13,764 - oe-selftest - INFO - 1: 40/96 487/686 (57.83s) (2 failed) (recipetool.RecipetoolAppendTests.test_recipetool_appendfile_add_bindir)
2026-05-13 20:22:13,764 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last):
File "/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/openembedded-core/meta/lib/oeqa/selftest/cases/recipetool.py", line 198, in test_recipetool_appendfile_add_bindir
self.assertNotIn('WARNING: ', output)
File "/usr/lib/python3.12/unittest/case.py", line 1159, in assertNotIn
self.fail(self._formatMessage(msg, standardMsg))
File "/usr/lib/python3.12/unittest/case.py", line 715, in fail
raise self.failureException(msg)AssertionError: 'WARNING: ' unexpectedly found in "NOTE: Reconnecting to bitbake server...\nLoading cache...done.\nLoaded 0 entries from dependency cache.\nParsing recipes...WARNING: /srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/openembedded-core/meta/recipes-core/systemd/systemd-boot-native_259.5.bb: /srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/openembedded-core/meta/classes-recipe/upstream-stable-release-point.bbclass:18: SyntaxWarning: invalid escape sequence '\\.'\n return '\\.'.join(stable_parts)\n\nWARNING: /srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/openembedded-core/meta/recipes-core/systemd/systemd-boot_259.5.bb: /srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/openembedded-core/meta/classes-recipe/upstream-stable-release-point.bbclass:18: SyntaxWarning: invalid escape sequence '\\.'\n return '\\.'.join(stable_parts)\n\nWARNING: /srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/openembedded-core/meta/recipes-core/systemd/systemd-systemctl-native_259.5.bb: /srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/openembedded-core/meta/classes-recipe/upstream-stable-release-point.bbclass:18: SyntaxWarning: invalid escape sequence '\\.'\n return '\\.'.join(stable_parts)\n\nWARNING: /srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/openembedded-core/meta/recipes-core/systemd/systemd_259.5.bb: /srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/openembedded-core/meta/classes-recipe/upstream-stable-release-point.bbclass:18: SyntaxWarning: invalid escape sequence '\\.'\n return '\\.'.join(stable_parts)\n\nWARNING: /srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/openembedded-core/meta/recipes-core/util-linux/util-linux-libuuid_2.41.3.bb: /srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/openembedded-core/meta/classes-recipe/upstream-stable-release-point.bbclass:18: SyntaxWarning: invalid escape sequence '\\.'\n return '\\.'.join(stable_parts)\n\nWARNING: /srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/openembedded-core/meta/recipes-core/util-linux/util-linux_2.41.3.bb: /srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/openembedded-core/meta/classes-recipe/upstream-stable-release-point.bbclass:18: SyntaxWarning: invalid escape sequence '\\.'\n return '\\.'.join(stable_parts)\n\nWARNING: /srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/openembedded-core/meta/recipes-kernel/kmod/kmod_34.2.bb: /srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/openembedded-core/meta/classes-recipe/upstream-stable-release-point.bbclass:18: SyntaxWarning: invalid escape sequence '\\.'\n return '\\.'.join(stable_parts)\n\ndone.\nParsing of 1029 .bb files complete (0 cached, 1029 parsed). 2078 targets, 64 skipped, 1 masked, 0 errors.\n\nSummary: There were 7 WARNING messages.\nNOTE: Writing append file /tmp/recipetoolqa7po32_jr/recipes-core/netbase/netbase_6.5.bbappend\nNOTE: Copying testfile to /tmp/recipetoolqa7po32_jr/recipes-core/netbase/netbase/testfile" ---- error message end ----
Regards,
Qi
-----Original Message-----
From: Mathieu Dubois-Briand <[email protected]>
Sent: Thursday, May 14, 2026 6:39 PM
To: Chen, Qi <[email protected]>; [email protected]
Cc: [email protected]; MacLeod, Randy <[email protected]>
Subject: Re: [OE-core][PATCH V5 1/7] recipeutils: add optional stable_upgrade parameter to get_recipe_upgrade_status
Quoted 7 lines · Chen Qi via lists.openembedded.org
From: Chen Qi <[email protected]>
We want the ability to do stable version upgrades for recipes. To this end, add an optional
stable_upgradeparameter to theget_recipe_upgrade_statusfunction, which defaults to False and when enabled will try to get the latest stable version of the recipe.
Quoted 7 lines
The
UPSTREAM_STABLE_RELEASE_REGEXis respected. If a recipe sets it, it will be used as thefilter_regex. If it's not set explicitly, it means that there's no stable updates or the recipe hasn't been checked yet.Signed-off-by Chen Qi <[email protected]>---
Hi Chen,
Thanks for the new version.
We got several selftest fails on the autobuilder:
2026-05-13 20:05:23,677 - oe-selftest - INFO - overlayfs.OverlayFSTests.test_mount_unit_not_set (subunit.RemotedTestCase) 2026-05-13 20:05:23,678 - oe-selftest - INFO - ... FAIL ... ERROR: /srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-37462/meta-selftest/recipes-test/overlayfs-user/overlayfs-user.bb: A recipe uses overlayfs class but there is no OVERLAYFS_MOUNT_POINT set in your MACHINE configuration ERROR: Parsing halted due to errors, see error messages above ... 2026-05-13 20:11:59,345 - oe-selftest - INFO - overlayfs.OverlayFSTests.test_wrong_mount_unit_set (subunit.RemotedTestCase) 2026-05-13 20:11:59,345 - oe-selftest - INFO - ... FAIL ... 2026-05-13 20:22:13,763 - oe-selftest - INFO - recipetool.RecipetoolAppendTests.test_recipetool_appendfile_add_bindir (subunit.RemotedTestCase) 2026-05-13 20:22:13,764 - oe-selftest - INFO - ... FAIL ... 2026-05-13 20:23:11,171 - oe-selftest - INFO - recipetool.RecipetoolAppendTests.test_recipetool_appendfile_add_machine (subunit.RemotedTestCase) 2026-05-13 20:23:11,172 - oe-selftest - INFO - ... FAIL ... 2026-05-13 20:24:48,333 - oe-selftest - INFO - recipetool.RecipetoolAppendTests.test_recipetool_appendfile_basic (subunit.RemotedTestCase) 2026-05-13 20:24:48,334 - oe-selftest - INFO - ... FAIL ...
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3951
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/3850
https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/3718
Can you have a look at this issue?
Thanks,
Mathieu
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Quoted 9 lines · Chen Qi via lists.openembedded.org
I examined the error messages on autobuilder. The key part is:
upstream-stable-release-point.bbclass:18: SyntaxWarning: invalid escape sequence '\\.'\n return '\\.'.join(stable_parts)\nHowever, the actual codes are:
'\.'.join(stable_parts)There seems to be an extra '\' there. Interestingly, even if I manually added an extra '\' to the codes, the test ('oe-selftest -r recipetool.RecipetoolAppendTests.test_recipetool_appendfile_add_bindir) still passed.
Could you please help me check how to reproduce this issue?
Hello Chen,
I'm not sure why you're not seeing this, but the fix is almost certainly prefixing the string with r, e.g. making it a raw string. Oe-core has had lots of similar fixes recently, e.g.:
https://git.openembedded.org/openembedded-core/commit/?id=24b0ba00d4f0b4d9834f7693ecb6032dfc534a80
Alex
Quoted 13 lines · Alexander Kanavin
Quoted 9 lines · Chen Qi via lists.openembedded.org
I examined the error messages on autobuilder. The key part is:
upstream-stable-release-point.bbclass:18: SyntaxWarning: invalid escape sequence '\\.'\n return '\\.'.join(stable_parts)\nHowever, the actual codes are:
'\.'.join(stable_parts)There seems to be an extra '\' there. Interestingly, even if I manually added an extra '\' to the codes, the test ('oe-selftest -r recipetool.RecipetoolAppendTests.test_recipetool_appendfile_add_bindir) still passed.
Could you please help me check how to reproduce this issue?
Hello Chen,
Quoted 7 lines
I'm not sure why you're not seeing this, but the fix is almost certainly prefixing the string with r, e.g. making it a raw string. Oe-core has had lots of similar fixes recently, e.g.:
https://git.openembedded.org/openembedded-core/commit/?id=24b0ba00d4f0b4d9834f7693ecb6032dfc534a80
Alex
Hi Alex,
The variable setting has no difference than the similar UPSTREAM_CHECK_REGEX/GITTAGREGEX.
e.g.,
meta/recipes-multimedia/speex/speexdsp_1.2.1.bb:UPSTREAM_CHECK_REGEX = "speexdsp-(?P<pver>\d+(\.\d+)+)\.tar" meta/recipes-multimedia/speex/speex_1.2.1.bb:UPSTREAM_CHECK_REGEX = "speex-(?P<pver>\d+(\.\d+)+)\.tar" meta/recipes-multimedia/gstreamer/gst-examples_1.28.2.bb:UPSTREAM_CHECK_GITTAGREGEX = "^(?P<pver>\d+\.(\d*[02468])+(\.\d+)+)" meta/recipes-multimedia/libtheora/libtheora_1.2.0.bb:UPSTREAM_CHECK_REGEX = "libtheora-(?P<pver>\d+(\.\d)+)\.(tar\.gz|tgz)"
In theory, if the UPSTREAM_STABLE_RELEASE_REGEX setting gets a warning, settings like above should also get warnings. Or am I missing something?
And in Yocto, we can't set variable like this:
VAR1 = r"abc"
This will result in parsing error.
I'm quite confused about this and any help is quite appreciated.
Regards,
Qi
Quoted 5 lines · Chen Qi via lists.openembedded.org
And in Yocto, we can't set variable like this:
VAR1 = r"abc"
This will result in parsing error.I'm quite confused about this and any help is quite appreciated.
You don't need to change bitbake variables. The issue is in the python function inside the newly added class, where you need to correct the string literals:
return '\.'.join(stable_parts)
should be
return r'\.'.join(stable_parts)
Alex
Quoted 11 lines · Alexander Kanavin
Quoted 5 lines · Chen Qi via lists.openembedded.org
And in Yocto, we can't set variable like this:
VAR1 = r"abc"
This will result in parsing error.I'm quite confused about this and any help is quite appreciated.
You don't need to change bitbake variables. The issue is in the python function inside the newly added class, where you need to correct the string literals:
Quoted 7 lines
return '\.'.join(stable_parts)should be
return r'\.'.join(stable_parts)Alex
Alex, thanks a lot!
Mathieu, I'll send out V6 with the above fix. Could you please help test it on autobuilder? I hope the problem would go away with this fix. But if it remains there, please let me know and I'll need to access autobuilder to do more debugging.
Regards,
Qi
Quoted 3 lines · Qi Chen
Hi Mathieu,
I can't reproduce this issue.
Hi Chen,
Yes, I confirm I have the same issue on my side: I can't reproduce the failures locally.
Yet I confirm the issue is linked with this series: dropping the patches solves the issue, and I have similar issues with the v4. It's not clear why in only happens on the autobuilder.
If you have ideas you want to test on the autobuilder to debug it, I can easily schedule some builds. Aside of that, I fear I have no better solution right now, I'm sorry.
Thanks,
Mathieu
Signature · 3 lines
Mathieu Dubois-Briand, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 9 lines · Mathieu Dubois-Briand via lists.openembedded.org
Quoted 3 lines · Qi Chen
Hi Mathieu,
I can't reproduce this issue.
Hi Chen,
Yes, I confirm I have the same issue on my side: I can't reproduce the failures locally.
Quoted 7 lines
Yet I confirm the issue is linked with this series: dropping the patches solves the issue, and I have similar issues with the v4. It's not clear why in only happens on the autobuilder.
If you have ideas you want to test on the autobuilder to debug it, I can easily schedule some builds. Aside of that, I fear I have no better solution right now, I'm sorry.
Hi Mathieu,
That would be much appreciated. I want to login onto the autobuilder and do the debug.
Regards,
Qi
Quoted 13 lines
Thanks,
Mathieu-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#237079): https://lists.openembedded.org/g/openembedded-core/message/237079
Mute This Topic: https://lists.openembedded.org/mt/119293054/3618072
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-