diff mbox series

mesa: Allow using semantic version suffix

Message ID 20250506110344.2129531-1-zboszor@gmail.com
State New
Headers show
Series mesa: Allow using semantic version suffix | expand

Commit Message

Zoltán Böszörményi May 6, 2025, 11:03 a.m. UTC
This should allow testing release candidate versions easier.
For example:

  PV = "25.1.0"
  SEMVERSFX = "-rc3"

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
---
 meta/recipes-graphics/mesa/mesa-gl.bb | 2 --
 meta/recipes-graphics/mesa/mesa.inc   | 5 ++++-
 2 files changed, 4 insertions(+), 3 deletions(-)

Comments

Alexander Kanavin May 6, 2025, 2:27 p.m. UTC | #1
On Tue, 6 May 2025 at 13:04, Zoltan Boszormenyi via
lists.openembedded.org <zboszor=gmail.com@lists.openembedded.org>
wrote:
>   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
Zoltán Böszörményi May 7, 2025, 10:34 a.m. UTC | #2
2025. 05. 06. 16:27 keltezéssel, Alexander Kanavin írta:
> On Tue, 6 May 2025 at 13:04, Zoltan Boszormenyi via
> lists.openembedded.org <zboszor=gmail.com@lists.openembedded.org>
> wrote:
>>    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.
Alexander Kanavin May 7, 2025, 1:45 p.m. UTC | #3
On Wed, 7 May 2025 at 12:35, Böszörményi Zoltán <zboszor@gmail.com> wrote:
> 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
diff mbox series

Patch

diff --git a/meta/recipes-graphics/mesa/mesa-gl.bb b/meta/recipes-graphics/mesa/mesa-gl.bb
index ca160f1bfc..c9aca52f8f 100644
--- a/meta/recipes-graphics/mesa/mesa-gl.bb
+++ b/meta/recipes-graphics/mesa/mesa-gl.bb
@@ -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.
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 66fb896676..a0c8f328fc 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -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+)+)"