Skip to contentSkip to conversation

Backport version mismatch patches from master

PATCH New [email protected] 1 participant 7 messages Apr 28, 2025

lore
Share & tools
lore
#0 lore raw

cover Backport version mismatch patches from master

From: Changqing Li <[email protected]>

Backport 6 version mismatch patches from master

Changqing Li (6):
version-check.conf: add CHECK_VERSION_PV for pn-netperf
python3-pyyaml-include: update SRCREV version-check.conf: mute bridge-utils version mismatch warning
libuser: correct the package version
turbostat: make turbostat's version align with kernel version
lvm2: correct PKGV for package libdevmapper

 ...-configure.ac-update-version-to-0.64.patch | 25 +++++++++++++++++++
 .../recipes-support/libuser/libuser_0.64.bb   |  1 +
 meta-oe/conf/version-check.conf               |  3 +++
 .../{turbostat_3.4.bb => turbostat.bb}        |  7 ++++++
 meta-oe/recipes-support/lvm2/lvm2.inc         | 23 +++++++++++++++++
 .../python/python3-pyyaml-include_2.2.bb      |  6 ++++-
 6 files changed, 64 insertions(+), 1 deletion(-)
 create mode 100644 meta-gnome/recipes-support/libuser/libuser/0001-configure.ac-update-version-to-0.64.patch
 rename meta-oe/recipes-kernel/turbostat/{turbostat_3.4.bb => turbostat.bb} (94%)
Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/6 version-check.conf: add CHECK_VERSION_PV for pn-netperf

From: Changqing Li <[email protected]>

For netperf, current PV is 2.7.0+git, and the SRCREV is newer than 2.7.0, and there is no tag 2.7.1, the latest tag is in 2015, refer [1], so it is not possile for us to make PV align with the runtime version below by update SRCREV now, add CHECK_VERSION_PV for pn-netperf to mute the version mismatch waring

$netserver -V
Netperf version 2.7.1

[1] https://github.com/HewlettPackard/netperf

---
 meta-oe/conf/version-check.conf | 1 +
 1 file changed, 1 insertion(+)
meta-oe/conf/version-check.conf +1 -0
index c41df0d496..130f2f6058 100644
@@ -20,3 +20,4 @@ CHECK_VERSION_PV:pn-iozone3 = "3.${PV}"
 CHECK_VERSION_PV:pn-can-utils = "%"
 CHECK_VERSION_PV:pn-luajit = "${PV}.%"
 CHECK_VERSION_PV:pn-sg3-utils = "%"
+CHECK_VERSION_PV:pn-netperf = "2.7.%"
Signature · 1 line
2.34.1
#2 lore raw

PATCH 2/6 python3-pyyaml-include: update SRCREV

In reply to [email protected]

From: Changqing Li <[email protected]>

* Current SRCREV is v2.2a1, update to v2.2
* pyyaml-include use setuptools_scm to get package version, but it not works well with git shallow clone, and will return a invalid version like 0.1.dev1+gc5be2b7, make pyyaml-include is installed to a wrong
path: /usr/lib/python3.13/site-packages/pyyaml_include-0.1.dev1+gc5be2b7.dist-info, and also version in PKG-INFO is wrong.
export SETUPTOOLS_SCM_PRETEND_VERSION to get correct package version.

---
 .../recipes-devtools/python/python3-pyyaml-include_2.2.bb   | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta-python/recipes-devtools/python/python3-pyyaml-include_2.2.bb +5 -1
index 49e643c710..5a3b2f0ab2 100644
@@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/tanbro/pyyaml-include"
 LICENSE = "GPL-3.0-only"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504"
 DEPENDS += "python3-setuptools-scm-native"
-SRCREV = "c5be2b7dfc4aaa91e44dbeb6fa42adc80936ef9d"
+SRCREV = "3e0db562a7b03fa1bf5cbe392c47658042596dd0"
 
 SRC_URI = " \
             git://github.com/tanbro/pyyaml-include;protocol=https;branch=main \
@@ -13,6 +13,10 @@ S = "${WORKDIR}/git"
 
 inherit python_setuptools_build_meta ptest-python-pytest
 
+do_compile:prepend() {
+    export SETUPTOOLS_SCM_PRETEND_VERSION=${PV}
+}
+
 RDEPENDS:${PN} += " \
     python3-pyyaml \
     python3-fsspec \
Signature · 1 line
2.34.1
#3 lore raw

PATCH 3/6 version-check.conf: mute bridge-utils version mismatch warning

In reply to [email protected]

From: Changqing Li <[email protected]>

Runtime version of brctl is 1.7.1, but the configure.ac set version as 1.7 (AC_INIT([bridge-utils],[1.7])). And refer [1], this utility is DEPRECATED, only critical bug fixes only, so it is nearly not possible to correct from upstream, so mute this warning since it has no critical influence.

[1] https://git.kernel.org/pub/scm/network/bridge/bridge-utils.git/commit/?h=main&id=ab8a2cc330253321be7bc69dea88bfaa3d48415e

---
 meta-oe/conf/version-check.conf | 1 +
 1 file changed, 1 insertion(+)
meta-oe/conf/version-check.conf +1 -0
index 130f2f6058..ecc8802565 100644
@@ -21,3 +21,4 @@ CHECK_VERSION_PV:pn-can-utils = "%"
 CHECK_VERSION_PV:pn-luajit = "${PV}.%"
 CHECK_VERSION_PV:pn-sg3-utils = "%"
 CHECK_VERSION_PV:pn-netperf = "2.7.%"
+CHECK_VERSION_PV:pn-bridge-utils = "1.7%"
Signature · 1 line
2.34.1
#4 lore raw

PATCH 4/6 libuser: correct the package version

In reply to [email protected]

From: Changqing Li <[email protected]>

correct the package version in configure.ac

---
 ...-configure.ac-update-version-to-0.64.patch | 25 +++++++++++++++++++
 .../recipes-support/libuser/libuser_0.64.bb   |  1 +
 2 files changed, 26 insertions(+)
 create mode 100644 meta-gnome/recipes-support/libuser/libuser/0001-configure.ac-update-version-to-0.64.patch
meta-gnome/recipes-support/libuser/libuser/0001-configure.ac-update-version-to-0.64.patch new file +25 -0
new file mode 100644
index 0000000000..950312f031
@@ -0,0 +1,25 @@
+From 206cfdff171e5ce0df02e635ba0d331a7dc5d992 Mon Sep 17 00:00:00 2001
+From: Changqing Li <[email protected]>
+Date: Mon, 14 Apr 2025 14:48:08 +0800
+Subject: [PATCH] configure.ac: update version to 0.64
+
+Upstream-Status: Submitted [http://pagure.io/libuser/issue/74]
+
+Signed-off-by: Changqing Li <[email protected]>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 51508b7..68c6e50 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1,4 +1,4 @@
+-AC_INIT([libuser], [0.62], [https://pagure.io/libuser], ,
++AC_INIT([libuser], [0.64], [https://pagure.io/libuser], ,
+         [https://pagure.io/libuser])
+ AC_PREREQ([2.63b])
+ AC_CONFIG_HEADERS(config.h)
+-- 
+2.34.1
+
meta-gnome/recipes-support/libuser/libuser_0.64.bb +1 -0
index 6d3bce8a1c..27cbb43486 100644
@@ -15,6 +15,7 @@ SRC_URI = "https://releases.pagure.org/libuser/libuser-${PV}.tar.gz \
            file://0001-docs-Disable-building.patch \
            file://0002-remove-unused-execinfo.h.patch \
            file://gtkdoc.patch \
+           file://0001-configure.ac-update-version-to-0.64.patch \
            "
 
 SRC_URI[sha256sum] = "ea6094c72cb9e60a42fb53509dc98d124a340f1c9222783b503208adc16a0a8f"
Signature · 1 line
2.34.1
#5 lore raw

PATCH 5/6 turbostat: make turbostat's version align with kernel version

In reply to [email protected]

From: Changqing Li <[email protected]>

* Current PV 3.4 is the kernel version when the recipe is newly added, set PKGV to KERNEL_VERSION to make it always align with kernel version
* turbostat has its runtime version, set CHECK_VERSION_PV to this version to mute the version mismatch warning
[snip of turbostat.c]
void print_version()

{
    fprintf(outf, "turbostat version 2024.07.26 - Len Brown <[email protected]>\n");
}

[snip]

---
 meta-oe/conf/version-check.conf                            | 1 +
 .../turbostat/{turbostat_3.4.bb => turbostat.bb}           | 7 +++++++
 2 files changed, 8 insertions(+)
 rename meta-oe/recipes-kernel/turbostat/{turbostat_3.4.bb => turbostat.bb} (94%)
meta-oe/conf/version-check.conf +1 -0
index ecc8802565..7193ece705 100644
@@ -22,3 +22,4 @@ CHECK_VERSION_PV:pn-luajit = "${PV}.%"
 CHECK_VERSION_PV:pn-sg3-utils = "%"
 CHECK_VERSION_PV:pn-netperf = "2.7.%"
 CHECK_VERSION_PV:pn-bridge-utils = "1.7%"
+CHECK_VERSION_PV:pn-turbostat = "2024.07.26"
meta-oe/recipes-kernel/turbostat/turbostat.bb renamed from meta-oe/recipes-kernel/turbostat/turbostat_3.4.bb +7 -0
similarity index 94%
rename from meta-oe/recipes-kernel/turbostat/turbostat_3.4.bb
rename to meta-oe/recipes-kernel/turbostat/turbostat.bb
index cfe3bb9682..8ac15164d4 100644
@@ -16,6 +16,9 @@ LIC_FILES_CHKSUM = "file://${UNPACKDIR}/COPYING;md5=bbea815ee2795b2f4230826c0c6b
 COMPATIBLE_HOST = '(x86_64.*|i.86.*)-linux'
 COMPATIBLE_HOST:libc-musl = "null"
 
+KERNEL_VERSION = "${@get_kernelversion_file("${STAGING_KERNEL_BUILDDIR}")}"
+inherit linux-kernel-base
+
 SRC_URI += "\
             file://COPYING \
             "
@@ -91,3 +94,7 @@ do_compile() {
 do_install() {
 	oe_runmake DESTDIR="${D}" install
 }
+
+python do_package:prepend() {
+    d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0])
+}
Signature · 1 line
2.34.1
#6 lore raw

PATCH 6/6 lvm2: correct PKGV for package libdevmapper

In reply to [email protected]

From: Changqing Li <[email protected]>

Refer [1] about relations about recipe lvm2 and libdevmapper,
package libdevmapper is generated by recipe lvm2. And lvm2 and
libdevmapper has different release version, refer [2], VERSION is
for lvm2, and VERSION_DM is for libdevmapper. Refer following way in configure.ac to get PKGV of libdevmapper:
[snip of configure.ac]
DM_LIB_PATCHLEVEL=$($AWK -F '[[-. ]]' '{printf "%s.%s.%s",$1,$2,$3}' "$srcdir"/VERSION_DM) [snip]

Other distros like ubuntu, suse also use VERSION_DM as version of libdevmapper

[1] https://git.openembedded.org/meta-openembedded/commit/?h=master-next&id=3f64779eae2d8312f569bee863f90ec4f8176e6c
[2] https://sourceware.org/git/?p=lvm2.git;a=tree

---
 meta-oe/recipes-support/lvm2/lvm2.inc | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
meta-oe/recipes-support/lvm2/lvm2.inc +23 -0
index ffa6a9a15d..bff075d400 100644
@@ -26,6 +26,29 @@ UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\_\d+)+)"
 
 inherit autotools-brokensep pkgconfig systemd
 
+def get_dm_version(p):
+    import re
+
+    fn = p + '/VERSION_DM'
+    try:
+        f = open(fn, 'r')
+    except IOError:
+        return None
+
+    lines = f.readlines()
+    f.close()
+    for line in lines:
+        m = re.match(r'(\w+)[-. ](\w+)[-. ](\w+)', line.strip())
+        if m:
+            return ".".join([m.group(1), m.group(2), m.group(3)])
+
+    return None
+
+DM_VERSION = '${@get_dm_version("${S}")}'
+python do_package:prepend() {
+    d.setVar('PKGV:libdevmapper', d.getVar("DM_VERSION"))
+}
+
 LVM2_PACKAGECONFIG = "dmeventd"
 LVM2_PACKAGECONFIG:append:class-target = " \
     ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)} \
Signature · 1 line
2.34.1