From 40e624cf74a031c7a5750362712b4f7839bbae66 Mon Sep 17 00:00:00 2001 From: Cappy Ishihara Date: Fri, 3 Jan 2025 16:18:37 +0700 Subject: [PATCH 1/2] Clean up the mesa spec file (#2857) * Clean up the mesa spec file * experiment: use matrices instead of multilib x86 --------- Signed-off-by: Cappy Ishihara --- anda/lib/mesa/anda.hcl | 2 ++ anda/lib/mesa/mesa.spec | 45 ++++------------------------------------- 2 files changed, 6 insertions(+), 41 deletions(-) diff --git a/anda/lib/mesa/anda.hcl b/anda/lib/mesa/anda.hcl index 0a9eb9553e..80f31c7444 100644 --- a/anda/lib/mesa/anda.hcl +++ b/anda/lib/mesa/anda.hcl @@ -4,6 +4,8 @@ project pkg { spec = "mesa.spec" } labels { + extra = 1 } + arches = ["x86_64", "i386", "aarch64"] } diff --git a/anda/lib/mesa/mesa.spec b/anda/lib/mesa/mesa.spec index 9ef2a40443..65bc425808 100644 --- a/anda/lib/mesa/mesa.spec +++ b/anda/lib/mesa/mesa.spec @@ -1,3 +1,5 @@ +%global _default_patch_fuzz 2 + %global srcname mesa %ifnarch s390x @@ -75,14 +77,6 @@ Release: 3%?dist License: MIT AND BSD-3-Clause AND SGI-B-2.0 URL: http://www.mesa3d.org -# define macro for providing srcname and ver -# %replace_pkg subpackage -%define replace_pkg() \ -Provides: %{srcname}-%1 = %{?epoch:%{epoch}:}%{version}-%{release} \ -Provides: %{srcname}-%1%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} \ -Conflicts: %{srcname}-%1 < %{?epoch:%{epoch}:}%{version}-%{release} \ -Conflicts: %{srcname}-%1%{?_isa} < %{?epoch:%{epoch}:}%{version}-%{release} - Source0: https://archive.mesa3d.org/%{srcname}-%{ver}.tar.xz @@ -199,15 +193,14 @@ BuildRequires: pkgconfig(vulkan) %{summary}. %package filesystem -%replace_pkg filesystem Summary: Mesa driver filesystem Provides: mesa-dri-filesystem = %{?epoch:%{epoch}:}%{version}-%{release} +Obsoletes: mesa-omx-drivers < %{?epoch:%{epoch}:}%{version}-%{release} %description filesystem %{summary}. %package libGL -%replace_pkg libGL Summary: Mesa libGL runtime libraries Requires: %{name}-libglapi%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: libglvnd-glx%{?_isa} >= 1:1.3.2 @@ -217,7 +210,6 @@ Recommends: %{name}-dri-drivers%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{re %{summary}. %package libGL-devel -%replace_pkg libGL-devel Summary: Mesa libGL development package Requires: %{name}-libGL%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: libglvnd-devel%{?_isa} >= 1:1.3.2 @@ -229,17 +221,16 @@ Recommends: gl-manpages %{summary}. %package libEGL -%replace_pkg libEGL Summary: Mesa libEGL runtime libraries Requires: libglvnd-egl%{?_isa} >= 1:1.3.2 Requires: %{name}-libgbm%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: %{name}-libglapi%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Recommends: %{name}-dri-drivers%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} + %description libEGL %{summary}. %package libEGL-devel -%replace_pkg libEGL-devel Summary: Mesa libEGL development package Requires: %{name}-libEGL%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: libglvnd-devel%{?_isa} >= 1:1.3.2 @@ -251,7 +242,6 @@ Provides: libEGL-devel%{?_isa} %{summary}. %package dri-drivers -%replace_pkg dri-drivers Summary: Mesa-based DRI drivers Requires: %{name}-filesystem%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: %{name}-libglapi%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} @@ -262,20 +252,8 @@ Recommends: %{name}-va-drivers%{?_isa} %description dri-drivers %{summary}. -%if 0%{?with_omx} -%package omx-drivers -%replace_pkg omx-drivers -Summary: Mesa-based OMX drivers -Requires: %{name}-filesystem%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} - -%description omx-drivers -%{summary}. -%endif - %if 0%{?with_va} %package va-drivers -%replace_pkg va-drivers -Provides: %{srcname}-va-drivers = %{?epoch:%{epoch}:}%{version}-%{release} Summary: Mesa-based VA-API video acceleration drivers Requires: %{name}-filesystem%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Obsoletes: %{name}-vaapi-drivers < 22.2.0-5 @@ -286,7 +264,6 @@ Obsoletes: %{name}-vaapi-drivers < 22.2.0-5 %if 0%{?with_vdpau} %package vdpau-drivers -%replace_pkg vdpau-drivers Summary: Mesa-based VDPAU drivers Requires: %{name}-filesystem%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} @@ -295,7 +272,6 @@ Requires: %{name}-filesystem%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{rel %endif %package libOSMesa -%replace_pkg libOSMesa Summary: Mesa offscreen rendering libraries Requires: %{name}-libglapi%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Provides: libOSMesa @@ -305,7 +281,6 @@ Provides: libOSMesa%{?_isa} %{summary}. %package libOSMesa-devel -%replace_pkg libOSMesa-devel Summary: Mesa offscreen rendering development package Requires: %{name}-libOSMesa%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} @@ -313,7 +288,6 @@ Requires: %{name}-libOSMesa%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{rele %{summary}. %package libgbm -%replace_pkg libgbm Summary: Mesa gbm runtime library Provides: libgbm Provides: libgbm%{?_isa} @@ -327,7 +301,6 @@ Requires: (%{name}-dri-drivers%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{r %{summary}. %package libgbm-devel -%replace_pkg libgbm-devel Summary: Mesa libgbm development package Requires: %{name}-libgbm%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Provides: libgbm-devel @@ -338,7 +311,6 @@ Provides: libgbm-devel%{?_isa} %if 0%{?with_xa} %package libxatracker -%replace_pkg libxatracker Summary: Mesa XA state tracker Provides: libxatracker Provides: libxatracker%{?_isa} @@ -347,7 +319,6 @@ Provides: libxatracker%{?_isa} %{summary}. %package libxatracker-devel -%replace_pkg libxatracker-devel Summary: Mesa XA state tracker development package Requires: %{name}-libxatracker%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Provides: libxatracker-devel @@ -358,7 +329,6 @@ Provides: libxatracker-devel%{?_isa} %endif %package libglapi -%replace_pkg libglapi Summary: Mesa shared glapi Provides: libglapi Provides: libglapi%{?_isa} @@ -372,7 +342,6 @@ Requires: (%{name}-dri-drivers%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{r %if 0%{?with_opencl} %package libOpenCL -%replace_pkg libOpenCL Summary: Mesa OpenCL runtime library Requires: ocl-icd%{?_isa} Requires: libclc%{?_isa} @@ -383,7 +352,6 @@ Requires: opencl-filesystem %{summary}. %package libOpenCL-devel -%replace_pkg libOpenCL-devel Summary: Mesa OpenCL development package Requires: %{name}-libOpenCL%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} @@ -393,24 +361,20 @@ Requires: %{name}-libOpenCL%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{rele %if 0%{?with_teflon} %package libTeflon -%replace_pkg libTeflon Summary: Mesa TensorFlow Lite delegate - %description libTeflon %{summary}. %endif %if 0%{?with_nine} %package libd3d -%replace_pkg libd3d Summary: Mesa Direct3D9 state tracker %description libd3d %{summary}. %package libd3d-devel -%replace_pkg libd3d-devel Summary: Mesa Direct3D9 state tracker development package Requires: %{name}-libd3d%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} @@ -419,7 +383,6 @@ Requires: %{name}-libd3d%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release %endif %package vulkan-drivers -%replace_pkg vulkan-drivers Summary: Mesa Vulkan drivers Requires: vulkan%{_isa} Requires: %{name}-filesystem%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} From 60dd96a68f103b803db9f20ce0fe44e8772cfb70 Mon Sep 17 00:00:00 2001 From: madomado Date: Fri, 3 Jan 2025 17:19:26 +0800 Subject: [PATCH 2/2] fix(ci): make gha parse variable substitutions correctly (#2865) * feat(ci): add mock label to ci, also remove multilib * feat: switch packages to use `arches = [...]` * ??? Signed-off-by: madomado * feat: add mock labels to pkgs * feat: add condition for setup scripts and dnf builddep * fix(ci): weird formatting issues * wha * if !contains? * single quotes * fix(ci): make gha parse variables correctly? --------- Signed-off-by: madomado --- .github/workflows/autobuild.yml | 2 +- .github/workflows/json-build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index ba843ec1e2..6ca32c7d35 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -70,7 +70,7 @@ jobs: dnf5 builddep -y ${dir}/*.spec - name: Build with Andaman - run: anda build ${{ matrix.pkg.pkg }} ${{ matrix.pkg.labels['mock'] && '-c terra-${{ matrix.version }}-${{ matrix.pkg.arch }}' || '-rrpmbuild' }} + run: anda build ${{ matrix.pkg.pkg }} -c terra-${{ matrix.version }}-${{ matrix.pkg.arch }} ${{ contains(matrix.pkg.labels, 'mock') && '' || '-rrpmbuild' }} - name: Generating artifact name id: art diff --git a/.github/workflows/json-build.yml b/.github/workflows/json-build.yml index efd5ab5e94..2234e5bff0 100644 --- a/.github/workflows/json-build.yml +++ b/.github/workflows/json-build.yml @@ -41,7 +41,7 @@ jobs: dnf5 builddep -y ${dir}/*.spec - name: Build with Andaman - run: anda build ${{ matrix.pkg.pkg }} ${{ matrix.pkg.labels['mock'] && '-c terra-${{ matrix.version }}-${{ matrix.pkg.arch }}' || '-rrpmbuild' }} + run: anda build ${{ matrix.pkg.pkg }} -c terra-${{ matrix.version }}-${{ matrix.pkg.arch }} ${{ contains(matrix.pkg.labels, 'mock') && '' || '-rrpmbuild' }} - name: Generating artifact name id: art