From: <daniel.turull@ericsson.com>
To: <openembedded-core@lists.openembedded.org>
Cc: Chen Qi <Qi.Chen@windriver.com>,
Antonin Godard <antonin.godard@bootlin.com>,
Richard Purdie <richard.purdie@linuxfoundation.org>,
Daniel Turull <daniel.turull@ericsson.com>
Subject: [wrynose][PATCH 02/20] upstream-stable-release-point.bbclass: add bbclass for stable point upgrade
Date: Wed, 2 Sep 2026 11:59:02 +0200 [thread overview]
Message-ID: <20260902095920.2840293-3-daniel.turull@ericsson.com> (raw)
In-Reply-To: <20260902095920.2840293-1-daniel.turull@ericsson.com>
From: Chen Qi <Qi.Chen@windriver.com>
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.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit a1e069d04cb13e990b362804bd56a4935338ef96)
Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
---
.../upstream-stable-release-point.bbclass | 21 +++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 meta/classes-recipe/upstream-stable-release-point.bbclass
diff --git a/meta/classes-recipe/upstream-stable-release-point.bbclass b/meta/classes-recipe/upstream-stable-release-point.bbclass
new file mode 100644
index 0000000000..98fdb5b808
--- /dev/null
+++ b/meta/classes-recipe/upstream-stable-release-point.bbclass
@@ -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 r'\.'.join(stable_parts)
+
+STABLE_VERSION_REGEX = "${@get_majmin_version_regex(d)}"
+UPSTREAM_STABLE_RELEASE_REGEX ?= "^${STABLE_VERSION_REGEX}(\.\d+)*$"
next prev parent reply other threads:[~2026-09-02 9:59 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-02 9:59 [wrynose][PATCH 00/20] backport inherit upstream-stable-release-point daniel.turull
2026-09-02 9:59 ` [wrynose][PATCH 01/20] recipeutils: add optional stable_upgrade parameter to get_recipe_upgrade_status daniel.turull
2026-09-02 9:59 ` daniel.turull [this message]
2026-09-02 9:59 ` [wrynose][PATCH 03/20] devtool/upgrade.py: add --stable option daniel.turull
2026-09-02 9:59 ` [wrynose][PATCH 04/20] systemd: inherit upstream-stable-release-point daniel.turull
2026-09-02 9:59 ` [wrynose][PATCH 05/20] glib-2.0: " daniel.turull
2026-09-02 9:59 ` [wrynose][PATCH 06/20] dbus: " daniel.turull
2026-09-02 9:59 ` [wrynose][PATCH 07/20] xz: " daniel.turull
2026-09-02 9:59 ` [wrynose][PATCH 08/20] git: " daniel.turull
2026-09-02 9:59 ` [wrynose][PATCH 09/20] perl: " daniel.turull
2026-09-02 9:59 ` [wrynose][PATCH 10/20] libxml2: " daniel.turull
2026-09-02 9:59 ` [wrynose][PATCH 11/20] python3: " daniel.turull
2026-09-02 9:59 ` [wrynose][PATCH 12/20] openssl: " daniel.turull
2026-09-02 9:59 ` [wrynose][PATCH 13/20] binutils: " daniel.turull
2026-09-02 9:59 ` [wrynose][PATCH 14/20] libgcrypt: " daniel.turull
2026-09-02 9:59 ` [wrynose][PATCH 15/20] sqlite3: " daniel.turull
2026-09-02 9:59 ` [wrynose][PATCH 16/20] lttng-tools: " daniel.turull
2026-09-02 9:59 ` [wrynose][PATCH 17/20] util-linux: " daniel.turull
2026-09-02 9:59 ` [wrynose][PATCH 18/20] lttng-ust: " daniel.turull
2026-09-02 9:59 ` [wrynose][PATCH 19/20] babeltrace2: " daniel.turull
2026-09-02 9:59 ` [wrynose][PATCH 20/20] lttng-modules: " daniel.turull
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260902095920.2840293-3-daniel.turull@ericsson.com \
--to=daniel.turull@ericsson.com \
--cc=Qi.Chen@windriver.com \
--cc=antonin.godard@bootlin.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=richard.purdie@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox