Skip to contentSkip to conversation

mesa: Allow using semantic version suffix

PATCH In review Zoltán Böszörményi 2 participants 4 messages May 6, 2025 – May 7, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mesa: Allow using semantic version suffix

This should allow testing release candidate versions easier. For example:

PV = "25.1.0"
SEMVERSFX = "-rc3"

---
 meta/recipes-graphics/mesa/mesa-gl.bb | 2 --
 meta/recipes-graphics/mesa/mesa.inc   | 5 ++++-
 2 files changed, 4 insertions(+), 3 deletions(-)
meta/recipes-graphics/mesa/mesa-gl.bb +0 -2
index ca160f1bfc..c9aca52f8f 100644
@@ -4,8 +4,6 @@ SUMMARY += " (OpenGL only, no EGL/GLES)"
 
 PROVIDES = "virtual/libgl virtual/mesa"
 
-S = "${WORKDIR}/mesa-${PV}"
-
 TARGET_CFLAGS = "-I${STAGING_INCDIR}/drm"
 
 # At least one DRI rendering engine is required to build mesa.
meta/recipes-graphics/mesa/mesa.inc +4 -1
index 66fb896676..a0c8f328fc 100644
@@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = "file://docs/license.rst;md5=ffe678546d4337b732cfd12262e6af11
 
 PE = "2"
 
-SRC_URI = "https://archive.mesa3d.org/mesa-${PV}.tar.xz \
+SRC_URI = "https://archive.mesa3d.org/mesa-${PV}${SEMVERSFX}.tar.xz \
            file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
            file://0001-freedreno-don-t-encode-build-path-into-binaries.patch \
            file://0001-mesa-clc-add-an-option-to-force-inclusion-of-OpenCL-.patch \
@@ -24,6 +24,9 @@ SRC_URI = "https://archive.mesa3d.org/mesa-${PV}.tar.xz \
 
 SRC_URI[sha256sum] = "c0d245dea0aa4b49f74b3d474b16542e4a8799791cd33d676c69f650ad4378d0"
 PV = "25.0.5"
+SEMVERSFX = ""
+
+S = "${WORKDIR}/mesa-${PV}${SEMVERSFX}"
 
 UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)"
 
Signature · 1 line
2.49.0
#1 lore raw
Quoted 2 lines · Zoltan Boszormenyi via lists.openembedded.org

PV = "25.1.0"
SEMVERSFX = "-rc3"

Why not simply set PV to "25.1.0-rc3"? Nothing in the patch indicates that would be a problem.

Alex

#2 lore raw

2025. 05. 06. 16:27 keltezéssel, Alexander Kanavin írta:

Quoted 7 lines
Quoted 2 lines · Zoltan Boszormenyi via lists.openembedded.org
   PV = "25.1.0"
   SEMVERSFX = "-rc3"

Why not simply set PV to "25.1.0-rc3"? Nothing in the patch indicates that would be a problem.

Because 25.1.0-rc3 > 25.1.0 according to package managers and that breaks package upgrades.

Locally, I also have a python scriptlet that sets PR to "r0.rc3" or "r1" depending on whether the semantic version suffix is set, which works.

I know Yocto is not too fond of repositories (e.g. using the short git commit for GLIBC package versions also breaks upgrades due to the alphanumeric ordering of gitXXXXXX instead of explicit PR value bumps), but it's easy for us to test RC versions by having staging and update repos.

#3 lore raw
Quoted 2 lines · Böszörményi Zoltán

Because 25.1.0-rc3 > 25.1.0 according to package managers and that breaks package upgrades.

TBH, I'd rather pull those rc releases from mesa's git. Then you are not restricted to those particular tarballs, but can pick any commit you want (e.g. that adds an important later fix)

See the lttng-modules recipe for an example of how to support fetching both stable releases from tarballs and development pre-releases from git repo.

Alex