etcd: don't set UPSTREAM_CHECK_COMMITS
PATCH 1/7 etcd: don't set UPSTREAM_CHECK_COMMITS
Upstream is tagging and the release checking works as expected:
$ devtool check-upgrade-status -a etcd etcd 3.5.7 3.5.17 None 507c0de87bd5034e3de4ab76ebf96b54dae0cd52
--- meta-oe/recipes-extended/etcd/etcd_3.5.7.bb | 1 - 1 file changed, 1 deletion(-)
meta-oe/recipes-extended/etcd/etcd_3.5.7.bb +0 -1
@@ -15,7 +15,6 @@ SRC_URI = " \ " SRCREV = "215b53cf3b48ee761f4c40908b3874b2e5e95e9f" -UPSTREAM_CHECK_COMMITS = "1" GO_IMPORT = "go.etcd.io/etcd/v3" GO_INSTALL = "src/${GO_IMPORT}/"
Signature · 1 line
2.43.0
PATCH 2/7 syzkaller: network in compile is not needed
There appears to be no more network access in the compile task, so we can remove the flag.
--- meta-oe/recipes-test/syzkaller/syzkaller_git.bb | 4 ---- 1 file changed, 4 deletions(-)
meta-oe/recipes-test/syzkaller/syzkaller_git.bb +0 -4
@@ -17,10 +17,6 @@ SRCREV = "25905f5d0a2a7883bd33491997556193582c6059" UPSTREAM_CHECK_COMMITS = "1" export GOPROXY = "https://proxy.golang.org,direct" -# Workaround for network access issue during compile step. -# This needs to be fixed in the recipes buildsystem so that -# it can be accomplished during do_fetch task. -do_compile[network] = "1" COMPATIBLE_HOST = "(x86_64|i.86|arm|aarch64).*-linux"
Signature · 1 line
2.43.0
PATCH 3/7 vk-gl-cts: fix EXTRA_OECMAKE
In reply to Ross BurtonThere are no native/nativesdk builds of this recipe, so there's no need to use a separate class-target assignment.
We should pass AMBER_DISABLE_WERROR in all builds, not just target.
Setting -DUPDATE_DEPS=OFF isn't functional as the CMakeLists explictly set that to ON, so remove it.
--- meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc +5 -2
@@ -38,8 +38,11 @@ DEPENDS:append:libc-musl = " libexecinfo" SRC_URI:append:toolchain-clang = "\ file://fix-clang-private-operator.patch \ " -EXTRA_OECMAKE += "-DUPDATE_DEPS=OFF" -EXTRA_OECMAKE:prepend:class-target = "-DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper -DWAYLAND_SCANNER=${STAGING_BINDIR_NATIVE}/wayland-scanner -DWAYLAND_PROTOCOLS_DIR=${STAGING_DATADIR}/wayland-protocols -DAMBER_DISABLE_WERROR=ON" + +EXTRA_OECMAKE += "-DAMBER_DISABLE_WERROR=ON \ + -DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \ + -DWAYLAND_SCANNER=${STAGING_BINDIR_NATIVE}/wayland-scanner \ + -DWAYLAND_PROTOCOLS_DIR=${STAGING_DATADIR}/wayland-protocols" # The best thing for the user to do is to not specify any of the following # PACKAGECONFIGs (i.e. leave it blank) which tells the project to do its own
Signature · 1 line
2.43.0
PATCH 4/7 vk-gl-cts: set the git tag regex for release checking
In reply to Ross BurtonAdd BPN to the tag name to differentiate vulkan-cts and opengl-es-cts releases.
--- meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc | 2 ++ 1 file changed, 2 insertions(+)
meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc +2 -0
@@ -21,6 +21,8 @@ S = "${WORKDIR}/git" inherit pkgconfig cmake features_check python3native qemu +UPSTREAM_CHECK_GITTAGREGEX = "${BPN}-(?P<pver>\d+(\.\d+)+)" + ANY_OF_DISTRO_FEATURES += "opengl vulkan" DEPENDS += "python3-lxml-native libpng zlib virtual/libgles2 qemu-native"
Signature · 1 line
2.43.0
PATCH 5/7 vk-gl-cts: use cmake-qemu
In reply to Ross BurtonDon't configure qemu+cmake manually, use the cmake-qemu class.
--- meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-)
meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc +1 -13
@@ -19,7 +19,7 @@ SRCREV_FORMAT = "vk-gl-cts_amber_glslang_spirv-headers_spirv-tools_jsoncpp_video S = "${WORKDIR}/git" -inherit pkgconfig cmake features_check python3native qemu +inherit pkgconfig cmake cmake-qemu features_check python3native UPSTREAM_CHECK_GITTAGREGEX = "${BPN}-(?P<pver>\d+(\.\d+)+)"
@@ -42,7 +42,6 @@ SRC_URI:append:toolchain-clang = "\ " EXTRA_OECMAKE += "-DAMBER_DISABLE_WERROR=ON \ - -DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \ -DWAYLAND_SCANNER=${STAGING_BINDIR_NATIVE}/wayland-scanner \ -DWAYLAND_PROTOCOLS_DIR=${STAGING_DATADIR}/wayland-protocols"
@@ -58,17 +57,6 @@ PACKAGECONFIG[x11_egl] = "-DDEQP_TARGET=x11_egl,,virtual/libx11 virtual/egl,,,su PACKAGECONFIG[x11_glx] = "-DDEQP_TARGET=x11_glx,,virtual/libx11,,,surfaceless wayland x11_egl x11_egl_glx" PACKAGECONFIG[x11_egl_glx] = "-DDEQP_TARGET=x11_glx,,virtual/libx11 virtual/egl,,,surfaceless wayland x11_egl x11_glx" -do_configure:append() { - # Write out a qemu wrapper that will be used by cmake - # so that it can run target helper binaries through that. - qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}" - cat > ${WORKDIR}/qemuwrapper << EOF -#!/bin/sh -$qemu_binary "\$@" -EOF - chmod +x ${WORKDIR}/qemuwrapper -} - python __anonymous() { # if the user doesn't specify any PACKAGECONFIG then the cts build system # is going to probe the sysroot to try to figure out what to build
Signature · 1 line
2.43.0
PATCH 6/7 vk-gl-cts: control what targets get built
In reply to Ross BurtonExplicitly build the targets that are normally build. This seems like a no-op, but had the advantage of not pulling in vulkan-validationlayers which causes more fetches at configure time, and is only actually used by the developers of the test suite.
--- meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts_3.2.11.0.bb | 2 ++ meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts_1.3.9.2.bb | 2 ++ 2 files changed, 4 insertions(+)
meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts_3.2.11.0.bb +2 -0
@@ -15,6 +15,8 @@ SRCREV_vulkan-validationlayers = "a92629196a4fed15e59c74aa965dd47bd5ece3b7" SRCREV_video-parser = "6821adf11eb4f84a2168264b954c170d03237699" SRC_URI[renderdoc.sha256sum] = "e7b5f0aa5b1b0eadc63a1c624c0ca7f5af133aa857d6a4271b0ef3d0bdb6868e" +EXTRA_OECMAKE += "-DSELECTED_BUILD_TARGETS="cts-runner deqp-egl deqp-gles2 deqp-gles3 deqp-gles31 deqp-gl-shared de-internal-tests glcts"" + do_install() { install -d ${D}/${CTSDIR} cp -r ${B}/external/openglcts/modules/* ${D}/${CTSDIR}
meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts_1.3.9.2.bb +2 -0
@@ -24,6 +24,8 @@ inherit features_check DEPENDS += " vulkan-loader" +EXTRA_OECMAKE += "-DSELECTED_BUILD_TARGETS="deqp-vk deqp-vksc"" + do_install() { install -d ${D}/${CTSDIR} cp -r ${B}/external/vulkancts/modules/vulkan/* ${D}/${CTSDIR}/
Signature · 1 line
2.43.0
PATCH 7/7 vk-gl-cts: don't require networking to configure
In reply to Ross BurtonThe CMakeLists in this package go and download a number of packages at configure time, which is bad practise for us.
Instead, use a script to parse the fetching tool and generate SRC_URI fragments that can be included in the recipe. This refresh_srcuri task will need to be reran on upgrades to ensure that it is up to date: the fragment will warn if the version doesn't match and devtool will do that automatically.
--- .../vk-gl-cts/files/generate-srcuri.py | 131 ++++++++++++++++++ .../vk-gl-cts/khronos-cts.inc | 54 +++----- .../vk-gl-cts/opengl-es-cts-sources.inc | 23 +++ .../vk-gl-cts/opengl-es-cts_3.2.11.0.bb | 15 +- .../vk-gl-cts/vulkan-cts-sources.inc | 23 +++ .../vk-gl-cts/vulkan-cts_1.3.9.2.bb | 14 +- 6 files changed, 205 insertions(+), 55 deletions(-) create mode 100755 meta-oe/recipes-graphics/vk-gl-cts/files/generate-srcuri.py create mode 100644 meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts-sources.inc create mode 100644 meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts-sources.inc
meta-oe/recipes-graphics/vk-gl-cts/files/generate-srcuri.py new file +131 -0
@@ -0,0 +1,131 @@ +#! /usr/bin/env python3 + +import json +import re +import os +import subprocess +import sys +import types +import urllib.parse + + +def resolve_commit(repo, ref): + # If it looks like a SHA, just return that + if re.match(r"[a-z0-9]{40}", ref): + return ref + + # Otherwise it's probably a tag name so resolve it + cmd = ("git", "ls-remote", "--tags", "--exit-code", repo, ref) + ret = subprocess.run(cmd, check=True, text=True, capture_output=True) + sha = ret.stdout.split(maxsplit=1)[0] + assert len(sha) == 40 + return sha + + +def transform_git(repo_url, repo_ref, destination): + parts = urllib.parse.urlparse(repo_url) + protocol = parts.scheme + parts = parts._replace(scheme="git") + url = urllib.parse.urlunparse(parts) + # Resolve the commit reference to a SHA + sha = resolve_commit(repo_url, repo_ref) + + return url + f";protocol={protocol};nobranch=1;destsuffix={destination};rev={sha}" + + +def load_module(filename): + import importlib.util + + spec = importlib.util.spec_from_file_location("fetchmodule", filename) + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + return module + + +def convert_fetch(basedir): + """ + Convert the external/fetch_sources.py data + """ + fetch = load_module(os.path.join(basedir, "fetch_sources.py")) + lines = [] + for p in fetch.PACKAGES: + if isinstance(p, fetch.SourcePackage): + # Ignore these as so far we can use the system copies + pass + elif isinstance(p, fetch.SourceFile): + dest = "/".join(["git/external", p.baseDir, p.extractDir]) + url = f"{p.url};subdir={dest};sha256sum={p.checksum}" + lines.append(f" {url} \\") + elif isinstance(p, fetch.GitRepo): + dest = "/".join(["git/external", p.baseDir, p.extractDir]) + url = transform_git(p.httpsUrl, p.revision, dest) + lines.append(f" {url} \\") + else: + assert f"Unexpected {p=}" + return lines + + +def convert_knowngood(basedir, destination): + """ + Convert the """ + filename = os.path.join(basedir, "vulkan-validationlayers/src/scripts/known_good.json") + try: + with open(filename) as fp: + data = json.load(fp, object_hook=lambda x: types.SimpleNamespace(**x)) + except FileNotFoundError: + return [] + + lines = [] + for repo in data.repos: + # Skip repositories that are not needed on Linux (TODO: assumes linux target) + if hasattr(repo, "build_platforms") and repo.build_platforms != "linux": + continue + + # Switch the URL to use git: and save the original protocol + parts = urllib.parse.urlparse(repo.url) + protocol = parts.scheme + parts = parts._replace(scheme="git") + url = urllib.parse.urlunparse(parts) + # Resolve the commit reference to a SHA + sha = resolve_commit(repo.url, repo.commit) + + destsuffix = destination + "/" + repo.sub_dir + + url += f";protocol={protocol};nobranch=1;destsuffix={destsuffix};rev={sha}" + lines.append(f" {url} \\") + return lines + + +def main(): + pv = sys.argv[1] + basedir = sys.argv[2] + + print(""" +# +# Generated by generate-srcuri.py, don't update manually") +# + +RECIPE_UPGRADE_EXTRA_TASKS += "do_refresh_srcuri" + +python __anonymous() { + if d.getVar("PV") != "%s": + bb.warn("-sources.inc out of date, run refresh_srcuri task") +} +""" % (pv)) + + print('SRC_URI += " \\') + lines = convert_fetch(basedir) + print("\n".join(lines)) + print('"') + + #lines = convert_knowngood(sys.argv[1], "git/external/validation") + #if lines: + # print('SRC_URI += " \\') + # print("\n".join(lines)) + # print('"') + #else: + # print("# Re-run") + + +if __name__ == "__main__": + main()
meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc +23 -31
72 lines not on this page · raw message
meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts-sources.inc new file +23 -0
@@ -0,0 +1,23 @@ + +# +# Generated by generate-srcuri.py, don't update manually") +# + +RECIPE_UPGRADE_EXTRA_TASKS += "do_refresh_srcuri" + +python __anonymous() { + if d.getVar("PV") != "3.2.11.0": + bb.warn("-sources.inc out of date, run refresh_srcuri task") +} + +SRC_URI += " \ + https://raw.githubusercontent.com/baldurk/renderdoc/v1.1/renderdoc/api/app/renderdoc_app.h;subdir=git/external/renderdoc/src;sha256sum=e7b5f0aa5b1b0eadc63a1c624c0ca7f5af133aa857d6a4271b0ef3d0bdb6868e \ + git://github.com/KhronosGroup/SPIRV-Tools.git;protocol=https;nobranch=1;destsuffix=git/external/spirv-tools/src;rev=148c97f6876e427efd76d2328122c3075eab4b8f \ + git://github.com/KhronosGroup/glslang.git;protocol=https;nobranch=1;destsuffix=git/external/glslang/src;rev=4da479aa6afa43e5a2ce4c4148c572a03123faf3 \ + git://github.com/KhronosGroup/SPIRV-Headers.git;protocol=https;nobranch=1;destsuffix=git/external/spirv-headers/src;rev=ff2afc3afc48dff4eec2a10f0212402a80708e38 \ + git://github.com/KhronosGroup/Vulkan-Docs.git;protocol=https;nobranch=1;destsuffix=git/external/vulkan-docs/src;rev=ed4ba0242beb89a1795d6084709fa9e713559c94 \ + git://github.com/KhronosGroup/Vulkan-ValidationLayers.git;protocol=https;nobranch=1;destsuffix=git/external/vulkan-validationlayers/src;rev=f589bc456545fbab97caf49380b102b8aafe1f40 \ + git://github.com/google/amber.git;protocol=https;nobranch=1;destsuffix=git/external/amber/src;rev=0f003c2785489f59cd01bb2440fcf303149100f2 \ + git://github.com/open-source-parsers/jsoncpp.git;protocol=https;nobranch=1;destsuffix=git/external/jsoncpp/src;rev=9059f5cad030ba11d37818847443a53918c327b1 \ + git://github.com/Igalia/vk_video_samples.git;protocol=https;nobranch=1;destsuffix=git/external/nvidia-video-samples/src;rev=6821adf11eb4f84a2168264b954c170d03237699 \ +"
meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts_3.2.11.0.bb +3 -12
@@ -1,19 +1,10 @@ DESCRIPTION = "OpenGL CTS" require khronos-cts.inc -# opengl-es-cts-3.2.11.0 + SRCREV_vk-gl-cts = "66956d195169596472e956e3aebf2df8e3bd960d" -SRCREV_amber = "0f003c2785489f59cd01bb2440fcf303149100f2" -SRCREV_glslang = "4da479aa6afa43e5a2ce4c4148c572a03123faf3" -SRCREV_spirv-headers = "ff2afc3afc48dff4eec2a10f0212402a80708e38" -SRCREV_spirv-tools = "148c97f6876e427efd76d2328122c3075eab4b8f" -SRCREV_ESExtractor = "ce5d7ebcf0ebb0d78385ee4cc34653eb6764bfc4" -# Not yet needed -SRCREV_jsoncpp = "9059f5cad030ba11d37818847443a53918c327b1" -SRCREV_vulkan-docs = "ed4ba0242beb89a1795d6084709fa9e713559c94" -SRCREV_vulkan-validationlayers = "a92629196a4fed15e59c74aa965dd47bd5ece3b7" -SRCREV_video-parser = "6821adf11eb4f84a2168264b954c170d03237699" -SRC_URI[renderdoc.sha256sum] = "e7b5f0aa5b1b0eadc63a1c624c0ca7f5af133aa857d6a4271b0ef3d0bdb6868e" + +require opengl-es-cts-sources.inc EXTRA_OECMAKE += "-DSELECTED_BUILD_TARGETS="cts-runner deqp-egl deqp-gles2 deqp-gles3 deqp-gles31 deqp-gl-shared de-internal-tests glcts""
meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts-sources.inc new file +23 -0
@@ -0,0 +1,23 @@ + +# +# Generated by generate-srcuri.py, don't update manually") +# + +RECIPE_UPGRADE_EXTRA_TASKS += "do_refresh_srcuri" + +python __anonymous() { + if d.getVar("PV") != "1.3.9.2": + bb.warn("-sources.inc out of date, run refresh_srcuri task") +} + +SRC_URI += " \ + https://raw.githubusercontent.com/baldurk/renderdoc/v1.1/renderdoc/api/app/renderdoc_app.h;subdir=git/external/renderdoc/src;sha256sum=e7b5f0aa5b1b0eadc63a1c624c0ca7f5af133aa857d6a4271b0ef3d0bdb6868e \ + git://github.com/KhronosGroup/SPIRV-Tools.git;protocol=https;nobranch=1;destsuffix=git/external/spirv-tools/src;rev=4c7e1fa5c3d988cca0e626d359d30b117b9c2822 \ + git://github.com/KhronosGroup/glslang.git;protocol=https;nobranch=1;destsuffix=git/external/glslang/src;rev=2b19bf7e1bc0b60cf2fe9d33e5ba6b37dfc1cc83 \ + git://github.com/KhronosGroup/SPIRV-Headers.git;protocol=https;nobranch=1;destsuffix=git/external/spirv-headers/src;rev=db5a00f8cebe81146cafabf89019674a3c4bf03d \ + git://github.com/KhronosGroup/Vulkan-Docs.git;protocol=https;nobranch=1;destsuffix=git/external/vulkan-docs/src;rev=7bb606eb87cde1d34f65f36f4d4c6f2c78f072c8 \ + git://github.com/KhronosGroup/Vulkan-ValidationLayers.git;protocol=https;nobranch=1;destsuffix=git/external/vulkan-validationlayers/src;rev=f589bc456545fbab97caf49380b102b8aafe1f40 \ + git://github.com/google/amber.git;protocol=https;nobranch=1;destsuffix=git/external/amber/src;rev=0f003c2785489f59cd01bb2440fcf303149100f2 \ + git://github.com/open-source-parsers/jsoncpp.git;protocol=https;nobranch=1;destsuffix=git/external/jsoncpp/src;rev=9059f5cad030ba11d37818847443a53918c327b1 \ + git://github.com/Igalia/vk_video_samples.git;protocol=https;nobranch=1;destsuffix=git/external/nvidia-video-samples/src;rev=6821adf11eb4f84a2168264b954c170d03237699 \ +"
meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts_1.3.9.2.bb +2 -12
@@ -2,19 +2,9 @@ DESCRIPTION = "Vulkan CTS" require khronos-cts.inc -# vulkan-cts-1.3.9.2 SRCREV_vk-gl-cts = "24c1b1498ba4f05777f47541968ffe686265c645" -SRCREV_amber = "0f003c2785489f59cd01bb2440fcf303149100f2" -SRCREV_glslang = "2b19bf7e1bc0b60cf2fe9d33e5ba6b37dfc1cc83" -SRCREV_spirv-headers = "db5a00f8cebe81146cafabf89019674a3c4bf03d" -SRCREV_spirv-tools = "4c7e1fa5c3d988cca0e626d359d30b117b9c2822" -SRCREV_jsoncpp = "9059f5cad030ba11d37818847443a53918c327b1" -SRCREV_vulkan-docs = "7bb606eb87cde1d34f65f36f4d4c6f2c78f072c8" -SRCREV_vulkan-validationlayers = "a92629196a4fed15e59c74aa965dd47bd5ece3b7" -SRC_URI[renderdoc.sha256sum] = "e7b5f0aa5b1b0eadc63a1c624c0ca7f5af133aa857d6a4271b0ef3d0bdb6868e" -# Not yet needed -SRCREV_ESExtractor = "75ffcaf55bb069f7a23764194742d2fb78c7f71f" -SRCREV_video-parser = "6821adf11eb4f84a2168264b954c170d03237699" + +require vulkan-cts-sources.inc # Workaround an optimization bug that breaks createMeshShaderMiscTestsEXT OECMAKE_CXX_FLAGS:remove:toolchain-gcc = "-O2"
Signature · 1 line
2.43.0