From c8b11117f577128e6832c5e0935a2efc9a027312 Mon Sep 17 00:00:00 2001 From: Zhongning Li <60045212+tomli380576@users.noreply.github.com> Date: Wed, 10 Jun 2026 10:58:37 +0800 Subject: [PATCH 01/18] feat: initial setup --- .../series_classic26/config/config_vars | 44 +++++ .../launchers/checkbox-cli-wrapper | 3 + .../series_classic26/launchers/configure | 66 +++++++ .../series_classic26/launchers/shell-wrapper | 4 + .../series_classic26/launchers/test-runner | 9 + .../series_classic26/launchers/wrapper_local | 45 +++++ .../series_classic26/snap/hooks/configure | 61 ++++++ .../series_classic26/snap/hooks/install | 4 + .../series_classic26/snap/snapcraft.yaml | 131 +++++++++++++ .../series_uc26/config/config_vars | 44 +++++ .../launchers/checkbox-cli-wrapper | 3 + .../series_uc26/launchers/configure | 66 +++++++ .../series_uc26/launchers/shell-wrapper | 4 + .../series_uc26/launchers/test-runner | 12 ++ .../series_uc26/launchers/wrapper_local | 52 ++++++ .../series_uc26/snap/hooks/configure | 61 ++++++ .../series_uc26/snap/hooks/install | 4 + .../series_uc26/snap/snapcraft.yaml | 173 ++++++++++++++++++ 18 files changed, 786 insertions(+) create mode 100644 contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/config/config_vars create mode 100755 contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/checkbox-cli-wrapper create mode 100755 contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/configure create mode 100755 contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/shell-wrapper create mode 100755 contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/test-runner create mode 100755 contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/wrapper_local create mode 100755 contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/hooks/configure create mode 100755 contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/hooks/install create mode 100644 contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/snapcraft.yaml create mode 100644 contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/config/config_vars create mode 100755 contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/checkbox-cli-wrapper create mode 100755 contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/configure create mode 100755 contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/shell-wrapper create mode 100755 contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/test-runner create mode 100755 contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/wrapper_local create mode 100755 contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/hooks/configure create mode 100755 contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/hooks/install create mode 100644 contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/snapcraft.yaml diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/config/config_vars b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/config/config_vars new file mode 100644 index 0000000000..58b82f70de --- /dev/null +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/config/config_vars @@ -0,0 +1,44 @@ +# follow KEY=value syntax +WIFI_INTERFACE=wlan0 +# WATCHDOG_KERNEL_MOD=iTCO_wdt +# ALSADEVICE=hw:CARD=bytrt5660,DEV=0 +OPEN_N_SSID=ubuntu-cert-n-open-tpelab +OPEN_BG_SSID=ubuntu-cert-bg-open-tpelab +OPEN_AC_SSID=ubuntu-cert-ac-open-tpelab +OPEN_AX_SSID=ubuntu-cert-ax-open +WPA_N_SSID=ubuntu-cert-n-wpa-tpelab +WPA_BG_SSID=ubuntu-cert-bg-wpa-tpelab +WPA_AC_SSID=ubuntu-cert-ac-wpa-tpelab +WPA_AX_SSID=ubuntu-cert-ax-wpa +WPA_N_PSK=insecure +WPA_BG_PSK=insecure +WPA_AC_PSK=insecure +WPA_AX_PSK=insecure +BTDEVADDR=C0:B5:D7:C1:74:38 +# obex server in office: C0:B5:D7:C1:74:38 +# obex server in lab: 28:3A:4D:46:79:C0, 7C:B2:7D:4B:14:95 +WWAN_APN=internet +WWAN_NET_IF=ppp0 +WWAN_CONTROL_IF=ttyACM3 +STRESS_BOOT_ITERATIONS=100 +STRESS_S3_ITERATIONS=100 +STRESS_S4_ITERATIONS=100 +TEST_TARGET_IPERF=10.102.88.25,10.102.182.100,10.102.182.137,10.102.182.101 +# iperf server in office: 10.102.88.25 +# iperf server in lab: 10.102.182.100, 10.102.182.137 +STRESS_S4_WAIT_DELAY=120 +STRESS_S4_SLEEP_DELAY=60 +STRESS_S3_SLEEP_DELAY=60 +STRESS_BOOT_WAKEUP_DELAY=120 +STRESS_S3_WAIT_DELAY=150 +STRESS_BOOT_WAIT_DELAY=150 +WIFI_AP_SETUPTIME=30 +WWAN_SETUPTIME=30 +TPM2TOOLS_TCTI_NAME=device +TPM2TOOLS_DEVICE_FILE=/dev/tpm0 +MODEL_GRADE=signed +WATCHDOG_TYPE=wdat_wdt +WATCHDOG_IDENTITY=wdat_wdt +RTC_DEVICE_FILE=/dev/rtc0 +SNAPD_TASK_TIMEOUT=600 + diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/checkbox-cli-wrapper b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/checkbox-cli-wrapper new file mode 100755 index 0000000000..aff044783e --- /dev/null +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/checkbox-cli-wrapper @@ -0,0 +1,3 @@ +#!/bin/sh + +exec checkbox-cli "$@" diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/configure b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/configure new file mode 100755 index 0000000000..49f9cfc4fc --- /dev/null +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/configure @@ -0,0 +1,66 @@ +#!/usr/bin/env python3 +# Copyright 2018-2022 Canonical Ltd. +# All rights reserved. +# +# Written by: +# Maciej Kisielewski +# Sylvain Pineau +import os +import re +import sys + +sys.path.append(os.path.expandvars("$SNAP/usr/lib/python3/dist-packages")) +sitepkgpath = "$SNAP/lib/python{}.{}/site-packages".format( + sys.version_info[0], sys.version_info[1]) +sys.path.append(os.path.expandvars(sitepkgpath)) + +sys.path.append(os.path.expandvars( + "$SNAP/checkbox-runtime/usr/lib/python3/dist-packages")) +runtimepath = "$SNAP/checkbox-runtime/lib/python{}.{}/site-packages".format( + sys.version_info[0], sys.version_info[1]) +sys.path.append(os.path.expandvars(runtimepath)) + +try: + from checkbox_support.snap_utils.config import update_configuration + from checkbox_support.snap_utils.config import print_checkbox_conf +except ImportError: + msg = """ +checkbox-support not found! +You need to connect this snap to the checkbox24 snap. + +You can do this with those commands: + +snap connect $SNAP_NAME:checkbox-runtime checkbox24:checkbox-runtime +snap connect $SNAP_NAME:provider-resource checkbox24:provider-resource +snap connect $SNAP_NAME:provider-checkbox checkbox24:provider-checkbox +snap connect $SNAP_NAME:provider-tpm2 checkbox24:provider-tpm2 +snap connect $SNAP_NAME:provider-certification-client checkbox24:provider-certification-client + """ + print(os.path.expandvars(msg), file=sys.stderr) + sys.exit(1) + + +def main(): + # we need run as root to be able to write to /var/snap/... + if os.geteuid() != 0: + print('You have to run this command with sudo') + return + + if len(sys.argv) > 1 and sys.argv[1] == '-l': + print_checkbox_conf() + return + + key_re = re.compile(r"^(?:[A-Z0-9]+_?)*[A-Z](?:_?[A-Z0-9])*$") + vars_to_set = dict() + for pair in sys.argv[1:]: + k, _, v = pair.partition('=') + if not key_re.match(k) or not v: + raise SystemExit("'%s' is not a valid configuration entry. " + "Should be KEY=val" % pair) + k = k.replace('_', '-').lower() + vars_to_set[k] = v + update_configuration(vars_to_set) + + +if __name__ == '__main__': + main() diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/shell-wrapper b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/shell-wrapper new file mode 100755 index 0000000000..a9a36091bb --- /dev/null +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/shell-wrapper @@ -0,0 +1,4 @@ +#!/bin/bash + +echo "$SNAP_NAME runtime shell, type 'exit' to quit the session" +exec bash diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/test-runner b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/test-runner new file mode 100755 index 0000000000..535c1b3cf5 --- /dev/null +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/test-runner @@ -0,0 +1,9 @@ +#!/usr/bin/env checkbox-cli-wrapper +[launcher] +app_id = com.canonical.contrib:checkbox +launcher_version = 1 +stock_reports = text, submission_files, certification + +[test plan] +unit = com.canonical.contrib::ce-oem-iot-server-24-04 +filter = com.canonical.contrib::ce-oem-iot-server-24-04* diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/wrapper_local b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/wrapper_local new file mode 100755 index 0000000000..c673286199 --- /dev/null +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/wrapper_local @@ -0,0 +1,45 @@ +#!/bin/bash + +case "$SNAP_ARCH" in + "amd64") ARCH='x86_64-linux-gnu' + ;; + "i386") ARCH='i386-linux-gnu' + ;; + "arm64") ARCH='aarch64-linux-gnu' + ;; + "armhf") ARCH='arm-linux-gnueabihf' + ;; + *) + echo "Unsupported architecture: $SNAP_ARCH" + ;; +esac + +################################################ +# Launcher common exports for any checkbox app # +################################################ + +RUNTIME=/snap/checkbox24/current +if [ ! -d "$RUNTIME" ]; then + echo "You need to install the checkbox24 snap." + echo "" + echo "You can do this with this command:" + echo "snap install checkbox24" + exit 1 +fi + +export LC_ALL=C.UTF-8 +PERL_VERSION=$(perl -e '$^V=~/^v(\d+\.\d+)/;print $1') +export PERL5LIB="$PERL5LIB:$SNAP/usr/lib/$ARCH/perl/$PERL_VERSION:$SNAP/usr/lib/$ARCH/perl5/$PERL_VERSION:$SNAP/usr/share/perl/$PERL_VERSION:$SNAP/usr/share/perl5" +export GI_TYPELIB_PATH=$SNAP/usr/lib/girepository-1.0:$SNAP/usr/lib/$ARCH/girepository-1.0 +export PATH="$PATH:$SNAP/usr/bin:$SNAP/usr/sbin:$SNAP/sbin:/snap/bin" +export PYTHONPATH="$SNAP/usr/lib/python3/dist-packages:$PYTHONPATH" +export ALSA_CONFIG_PATH=/usr/share/alsa/alsa.conf + +if [ -e $RUNTIME/wrapper_common_classic ]; then + . $RUNTIME/wrapper_common_classic +else + echo "ERROR: no $RUNTIME/wrapper_common_classic found" + exit 0 +fi + +exec "$@" diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/hooks/configure b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/hooks/configure new file mode 100755 index 0000000000..6e11656087 --- /dev/null +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/hooks/configure @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# Copyright 2017-2024 Canonical Ltd. +# All rights reserved. + +""" +This hook reads `config_vars` file from the root of a snap and reenters this +configuration using snapd's config facilities and rewrites the file to a +checkbox config format in `$SNAP_DATA/checkbox.conf`. + +config_vars should list all the configuration variables in a `key=value` +syntax. The line can list variable name only, if the variable should not have a +default value. All keys should comprise of CAPS, numbers and undescores (_). +E.g.: + +OPEN_N_SSID +OPEN_BG_SSID +STRESS_S3_WAIT_DELAY=60 + +To change those values use the configure launcher. +E.g. + $ checkbox-iiotg.configure OPEN_N_SSID=my-wifi + +If you __really__ need to change those values using `snap set` command, +you need to change CAPS to lowercase and underscores to dashes (-). + +E.g. + $ snap set checkbox-iiotg open-n-ssid=my-wifi +""" + +import os +import sys + +sys.path.append(os.path.expandvars("$SNAP/usr/lib/python3/dist-packages")) +sitepkgpath = "$SNAP/lib/python{}.{}/site-packages".format( + sys.version_info[0], sys.version_info[1]) +sys.path.append(os.path.expandvars(sitepkgpath)) + +sys.path.append(os.path.expandvars( + "$SNAP/checkbox-runtime/usr/lib/python3/dist-packages")) +runtimepath = "$SNAP/checkbox-runtime/lib/python{}.{}/site-packages".format( + sys.version_info[0], sys.version_info[1]) +sys.path.append(os.path.expandvars(runtimepath)) + +try: + from checkbox_support.snap_utils.config import refresh_configuration +except ImportError: + msg = """ +checkbox-support not found! +You need to connect this snap to the checkbox24 snap. + +You can do this with those commands: + +snap connect $SNAP_NAME:checkbox-runtime checkbox24:checkbox-runtime +snap connect $SNAP_NAME:provider-resource checkbox24:provider-resource +snap connect $SNAP_NAME:provider-checkbox checkbox24:provider-checkbox +snap connect $SNAP_NAME:provider-tpm2 checkbox24:provider-tpm2 +snap connect $SNAP_NAME:provider-certification-client checkbox24:provider-certification-client + """ + print(os.path.expandvars(msg), file=sys.stderr) + sys.exit(0) +refresh_configuration() diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/hooks/install b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/hooks/install new file mode 100755 index 0000000000..068b518289 --- /dev/null +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/hooks/install @@ -0,0 +1,4 @@ +#!/bin/sh + +set -e +snapctl set slave=disabled diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/snapcraft.yaml b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/snapcraft.yaml new file mode 100644 index 0000000000..99197191da --- /dev/null +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/snapcraft.yaml @@ -0,0 +1,131 @@ +name: checkbox-ce-oem +summary: Checkbox CE OEM test runner and public providers for 24.04 classic +description: "Checkbox CE OEM test runner and public providers for 24.04 classic" +confinement: classic +grade: stable + +version: '1.0-noble' + +base: core24 + +apps: + checkbox-cli: + command-chain: [bin/wrapper_local] + command: bin/checkbox-cli-wrapper + configure: + command-chain: [bin/wrapper_local] + command: bin/configure + remote-slave: + command-chain: [bin/wrapper_local] + command: bin/checkbox-cli-wrapper slave + daemon: simple + restart-condition: on-failure + shell: + command-chain: [bin/wrapper_local] + command: bin/shell-wrapper + test-runner: + command-chain: [bin/wrapper_local] + command: bin/test-runner + +passthrough: + hooks: + configure: + command-chain: [bin/wrapper_local] + +parts: + checkbox-provider-ce-oem: + plugin: dump + source: checkbox-provider-ce-oem + source-type: local + stage-packages: + - mtd-utils + - u-boot-tools + - v4l-utils + - device-tree-compiler + - linuxptp + - snmp + - python3-rpyc + - gpsd + override-prime: | + craftctl default + override-build: | + export PYTHONPATH=/snap/checkbox24/current/lib/python3.12/site-packages/ + for path in $(find "/snap/checkbox24/current/providers/" -mindepth 1 -maxdepth 1 -type d); do export PROVIDERPATH=$path${PROVIDERPATH:+:$PROVIDERPATH}; done + python3 manage.py validate + python3 manage.py build + python3 manage.py install --layout=relocatable --prefix=/providers/checkbox-provider-ce-oem --root="$CRAFT_PART_INSTALL" + build-snaps: + - checkbox24 + build-packages: + - python3-dev + - python3-jinja2 + - python3-packaging + - python3-urwid + - python3-xlsxwriter + - python3-requests-oauthlib + input-pcspkr: + plugin: nil + after: [checkbox-provider-ce-oem] + build-packages: + - gcc + - libc6-dev + override-build: | + mkdir -p ${CRAFT_PART_INSTALL}/usr/bin + gcc ${CRAFT_PROJECT_DIR}/checkbox-provider-ce-oem/src/input-pcspkr.c -o ${CRAFT_PART_INSTALL}/usr/bin/beep + xtest: + plugin: dump + after: [checkbox-provider-ce-oem] + source: https://github.com/OP-TEE/optee_test.git + source-type: git + build-snaps: + - checkbox24 + build-packages: + - jq + - python3-requests-unixsocket + build-environment: + - PART_DEST: ${CRAFT_PART_INSTALL}/providers/checkbox-provider-ce-oem/data/ + - PROVIDER_SRC: ${CRAFT_PROJECT_DIR}/checkbox-provider-ce-oem + - PYTHONPATH: /snap/checkbox24/current/lib/python3.12/site-packages/ + override-pull: | + snapcraftctl pull + cp ${PROVIDER_SRC}/data/xtest_supported_version.json . + cp ${PROVIDER_SRC}/bin/optee_helper.py . + cp ${PROVIDER_SRC}/bin/look_up_xtest.py . + cp ${PROVIDER_SRC}/bin/xtest_install_ta.py . + override-build: | + for ver in `cat xtest_supported_version.json | jq -r .xtest_suite_tag[]`; do + git checkout $ver + python3 optee_helper.py parse_xtest_src $ver + done + mkdir -p ${PART_DEST} + cp -v optee-test-*.json ${PART_DEST} + spidev-test: + plugin: make + source: https://github.com/torvalds/linux.git + source-type: git + source-depth: 1 + source-subdir: tools/spi + parts-meta-info: + plugin: nil + override-build: | + craftctl default + for p in `ls -d ../../*`; do + if [ -d $p/src ]; then + (cd $p/src + if [ -d $p/src/.git ]; then + (echo `basename $p`\: && git show --pretty=format:"%h%d %aN %ci%n%s%n" -q ; echo ) >> $CRAFT_PART_INSTALL/parts_meta_info + fi # for additional `source-type` support, elif them here + ) + fi + done + after: [checkbox-provider-ce-oem] + launchers: + plugin: dump + source: launchers/ + build-attributes: [no-patchelf] + organize: + '*': bin/ + config-variables: + plugin: dump + source: config/ + build-attributes: [no-patchelf] diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/config/config_vars b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/config/config_vars new file mode 100644 index 0000000000..58b82f70de --- /dev/null +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/config/config_vars @@ -0,0 +1,44 @@ +# follow KEY=value syntax +WIFI_INTERFACE=wlan0 +# WATCHDOG_KERNEL_MOD=iTCO_wdt +# ALSADEVICE=hw:CARD=bytrt5660,DEV=0 +OPEN_N_SSID=ubuntu-cert-n-open-tpelab +OPEN_BG_SSID=ubuntu-cert-bg-open-tpelab +OPEN_AC_SSID=ubuntu-cert-ac-open-tpelab +OPEN_AX_SSID=ubuntu-cert-ax-open +WPA_N_SSID=ubuntu-cert-n-wpa-tpelab +WPA_BG_SSID=ubuntu-cert-bg-wpa-tpelab +WPA_AC_SSID=ubuntu-cert-ac-wpa-tpelab +WPA_AX_SSID=ubuntu-cert-ax-wpa +WPA_N_PSK=insecure +WPA_BG_PSK=insecure +WPA_AC_PSK=insecure +WPA_AX_PSK=insecure +BTDEVADDR=C0:B5:D7:C1:74:38 +# obex server in office: C0:B5:D7:C1:74:38 +# obex server in lab: 28:3A:4D:46:79:C0, 7C:B2:7D:4B:14:95 +WWAN_APN=internet +WWAN_NET_IF=ppp0 +WWAN_CONTROL_IF=ttyACM3 +STRESS_BOOT_ITERATIONS=100 +STRESS_S3_ITERATIONS=100 +STRESS_S4_ITERATIONS=100 +TEST_TARGET_IPERF=10.102.88.25,10.102.182.100,10.102.182.137,10.102.182.101 +# iperf server in office: 10.102.88.25 +# iperf server in lab: 10.102.182.100, 10.102.182.137 +STRESS_S4_WAIT_DELAY=120 +STRESS_S4_SLEEP_DELAY=60 +STRESS_S3_SLEEP_DELAY=60 +STRESS_BOOT_WAKEUP_DELAY=120 +STRESS_S3_WAIT_DELAY=150 +STRESS_BOOT_WAIT_DELAY=150 +WIFI_AP_SETUPTIME=30 +WWAN_SETUPTIME=30 +TPM2TOOLS_TCTI_NAME=device +TPM2TOOLS_DEVICE_FILE=/dev/tpm0 +MODEL_GRADE=signed +WATCHDOG_TYPE=wdat_wdt +WATCHDOG_IDENTITY=wdat_wdt +RTC_DEVICE_FILE=/dev/rtc0 +SNAPD_TASK_TIMEOUT=600 + diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/checkbox-cli-wrapper b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/checkbox-cli-wrapper new file mode 100755 index 0000000000..aff044783e --- /dev/null +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/checkbox-cli-wrapper @@ -0,0 +1,3 @@ +#!/bin/sh + +exec checkbox-cli "$@" diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/configure b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/configure new file mode 100755 index 0000000000..49f9cfc4fc --- /dev/null +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/configure @@ -0,0 +1,66 @@ +#!/usr/bin/env python3 +# Copyright 2018-2022 Canonical Ltd. +# All rights reserved. +# +# Written by: +# Maciej Kisielewski +# Sylvain Pineau +import os +import re +import sys + +sys.path.append(os.path.expandvars("$SNAP/usr/lib/python3/dist-packages")) +sitepkgpath = "$SNAP/lib/python{}.{}/site-packages".format( + sys.version_info[0], sys.version_info[1]) +sys.path.append(os.path.expandvars(sitepkgpath)) + +sys.path.append(os.path.expandvars( + "$SNAP/checkbox-runtime/usr/lib/python3/dist-packages")) +runtimepath = "$SNAP/checkbox-runtime/lib/python{}.{}/site-packages".format( + sys.version_info[0], sys.version_info[1]) +sys.path.append(os.path.expandvars(runtimepath)) + +try: + from checkbox_support.snap_utils.config import update_configuration + from checkbox_support.snap_utils.config import print_checkbox_conf +except ImportError: + msg = """ +checkbox-support not found! +You need to connect this snap to the checkbox24 snap. + +You can do this with those commands: + +snap connect $SNAP_NAME:checkbox-runtime checkbox24:checkbox-runtime +snap connect $SNAP_NAME:provider-resource checkbox24:provider-resource +snap connect $SNAP_NAME:provider-checkbox checkbox24:provider-checkbox +snap connect $SNAP_NAME:provider-tpm2 checkbox24:provider-tpm2 +snap connect $SNAP_NAME:provider-certification-client checkbox24:provider-certification-client + """ + print(os.path.expandvars(msg), file=sys.stderr) + sys.exit(1) + + +def main(): + # we need run as root to be able to write to /var/snap/... + if os.geteuid() != 0: + print('You have to run this command with sudo') + return + + if len(sys.argv) > 1 and sys.argv[1] == '-l': + print_checkbox_conf() + return + + key_re = re.compile(r"^(?:[A-Z0-9]+_?)*[A-Z](?:_?[A-Z0-9])*$") + vars_to_set = dict() + for pair in sys.argv[1:]: + k, _, v = pair.partition('=') + if not key_re.match(k) or not v: + raise SystemExit("'%s' is not a valid configuration entry. " + "Should be KEY=val" % pair) + k = k.replace('_', '-').lower() + vars_to_set[k] = v + update_configuration(vars_to_set) + + +if __name__ == '__main__': + main() diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/shell-wrapper b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/shell-wrapper new file mode 100755 index 0000000000..a9a36091bb --- /dev/null +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/shell-wrapper @@ -0,0 +1,4 @@ +#!/bin/bash + +echo "$SNAP_NAME runtime shell, type 'exit' to quit the session" +exec bash diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/test-runner b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/test-runner new file mode 100755 index 0000000000..90a0574cdb --- /dev/null +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/test-runner @@ -0,0 +1,12 @@ +#!/usr/bin/env checkbox-cli-wrapper +[launcher] +app_id = com.canonical.contrib:checkbox +launcher_version = 1 +stock_reports = text, submission_files, certification + +[test plan] +unit = com.canonical.contrib::ce-oem-iot-ubuntucore-24-automated +filter = com.canonical.contrib::ce-oem-iot-ubuntucore-24 + com.canonical.contrib::ce-oem-iot-ubuntucore-24-manual + com.canonical.contrib::ce-oem-iot-ubuntucore-24-automated + com.canonical.contrib::ce-oem-iot-ubuntucore-24-stress diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/wrapper_local b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/wrapper_local new file mode 100755 index 0000000000..0348488d1e --- /dev/null +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/wrapper_local @@ -0,0 +1,52 @@ +#!/bin/bash + +case "$SNAP_ARCH" in + "amd64") ARCH='x86_64-linux-gnu' + ;; + "i386") ARCH='i386-linux-gnu' + ;; + "arm64") ARCH='aarch64-linux-gnu' + ;; + "armhf") ARCH='arm-linux-gnueabihf' + ;; + *) + echo "Unsupported architecture: $SNAP_ARCH" + ;; +esac + +################################################ +# Launcher common exports for any checkbox app # +################################################ + +if [ -d $SNAP/checkbox-runtime ]; then + RUNTIME=$SNAP/checkbox-runtime + if [ ! -d $RUNTIME/usr ]; then + echo "You need to connect this snap to the checkbox24 snap." + echo "" + echo "You can do this with those commands:" + echo "snap install checkbox24" + echo "snap connect $SNAP_NAME:checkbox-runtime checkbox24:checkbox-runtime" + exit 1 + fi +fi + +export LC_ALL=C.UTF-8 +PERL_VERSION=$(perl -e '$^V=~/^v(\d+\.\d+)/;print $1') +export PERL5LIB="$PERL5LIB:$SNAP/usr/lib/$ARCH/perl/$PERL_VERSION:$SNAP/usr/lib/$ARCH/perl5/$PERL_VERSION:$SNAP/usr/share/perl/$PERL_VERSION:$SNAP/usr/share/perl5" +export GI_TYPELIB_PATH=$SNAP/usr/lib/girepository-1.0:$SNAP/usr/lib/$ARCH/girepository-1.0 +export PATH="$PATH:$SNAP/usr/bin:$SNAP/usr/sbin:$SNAP/sbin:/snap/bin" +export PYTHONPATH="$SNAP/usr/lib/python3/dist-packages:$PYTHONPATH" + +if [ -e $RUNTIME/wrapper_common ]; then + . $RUNTIME/wrapper_common +else + CGROUP_NAME=$(cat /proc/self/cgroup | grep -e "^1:name") + if [[ "$CGROUP_NAME" == *"hook.configure"* ]]; then + echo "Running in configure hook, wrapper_common not required" + else + echo "ERROR: no $RUNTIME/wrapper_common found" + exit 0 + fi +fi + +exec "$@" diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/hooks/configure b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/hooks/configure new file mode 100755 index 0000000000..8155eb79ac --- /dev/null +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/hooks/configure @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# Copyright 2017-2024 Canonical Ltd. +# All rights reserved. + +""" +This hook reads `config_vars` file from the root of a snap and reenters this +configuration using snapd's config facilities and rewrites the file to a +checkbox config format in `$SNAP_DATA/checkbox.conf`. + +config_vars should list all the configuration variables in a `key=value` +syntax. The line can list variable name only, if the variable should not have a +default value. All keys should comprise of CAPS, numbers and undescores (_). +E.g.: + +OPEN_N_SSID +OPEN_BG_SSID +STRESS_S3_WAIT_DELAY=60 + +To change those values use the configure launcher. +E.g. + $ checkbox-ce-oem.configure OPEN_N_SSID=my-wifi + +If you __really__ need to change those values using `snap set` command, +you need to change CAPS to lowercase and underscores to dashes (-). + +E.g. + $ snap set checkbox-ce-oem open-n-ssid=my-wifi +""" + +import os +import sys + +sys.path.append(os.path.expandvars("$SNAP/usr/lib/python3/dist-packages")) +sitepkgpath = "$SNAP/lib/python{}.{}/site-packages".format( + sys.version_info[0], sys.version_info[1]) +sys.path.append(os.path.expandvars(sitepkgpath)) + +sys.path.append(os.path.expandvars( + "$SNAP/checkbox-runtime/usr/lib/python3/dist-packages")) +runtimepath = "$SNAP/checkbox-runtime/lib/python{}.{}/site-packages".format( + sys.version_info[0], sys.version_info[1]) +sys.path.append(os.path.expandvars(runtimepath)) + +try: + from checkbox_support.snap_utils.config import refresh_configuration +except ImportError: + msg = """ +checkbox-support not found! +You need to connect this snap to the checkbox24 snap. + +You can do this with those commands: + +snap connect $SNAP_NAME:checkbox-runtime checkbox24:checkbox-runtime +snap connect $SNAP_NAME:provider-resource checkbox24:provider-resource +snap connect $SNAP_NAME:provider-checkbox checkbox24:provider-checkbox +snap connect $SNAP_NAME:provider-tpm2 checkbox24:provider-tpm2 +snap connect $SNAP_NAME:provider-certification-client checkbox24:provider-certification-client + """ + print(os.path.expandvars(msg), file=sys.stderr) + sys.exit(0) +refresh_configuration() diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/hooks/install b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/hooks/install new file mode 100755 index 0000000000..068b518289 --- /dev/null +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/hooks/install @@ -0,0 +1,4 @@ +#!/bin/sh + +set -e +snapctl set slave=disabled diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/snapcraft.yaml b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/snapcraft.yaml new file mode 100644 index 0000000000..6c54df729d --- /dev/null +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/snapcraft.yaml @@ -0,0 +1,173 @@ +name: checkbox-ce-oem +summary: Checkbox CE OEM test runner and public providers +description: "Checkbox CE OEM test runner and public providers" +confinement: strict +grade: stable + +version: '1.0-noble' + +base: core24 + +plugs: + checkbox-runtime: + interface: content + target: $SNAP/checkbox-runtime + default-provider: checkbox24 + provider-resource: + interface: content + target: $SNAP/providers/checkbox-provider-resource + default-provider: checkbox24 + provider-checkbox: + interface: content + target: $SNAP/providers/checkbox-provider-checkbox + default-provider: checkbox24 + provider-tpm2: + interface: content + target: $SNAP/providers/checkbox-provider-tpm2 + default-provider: checkbox24 + provider-docker: + interface: content + target: $SNAP/providers/checkbox-provider-docker + default-provider: checkbox24 + provider-certification-client: + interface: content + target: $SNAP/providers/checkbox-provider-certification-client + default-provider: checkbox24 +apps: + checkbox-cli: + command-chain: [bin/wrapper_local] + command: bin/checkbox-cli-wrapper + plugs: &standard [home, network-bind, hardware-observe, bluez, bluetooth-control, + gpio, modem-manager, mount-observe, network-manager, pulseaudio, serial-port, + system-observe, tpm, timezone-control, timeserver-control] + configure: + command-chain: [bin/wrapper_local] + command: bin/configure + remote-slave: + command-chain: [bin/wrapper_local] + command: bin/checkbox-cli-wrapper slave + daemon: simple + restart-condition: on-failure + plugs: *standard + shell: + command-chain: [bin/wrapper_local] + command: bin/shell-wrapper + plugs: *standard + test-runner: + command-chain: [bin/wrapper_local] + command: bin/test-runner + plugs: *standard + +passthrough: + hooks: + configure: + command-chain: [bin/wrapper_local] + +slots: + provider-ce-oem: + interface: content + read: + - $SNAP/providers/checkbox-provider-ce-oem + +parts: + checkbox-provider-ce-oem: + plugin: dump + source: checkbox-provider-ce-oem + source-type: local + stage-packages: + - alsa-utils + - mtd-utils + - u-boot-tools + - v4l-utils + - device-tree-compiler + - linuxptp + - snmp + - python3-rpyc + - gpsd + override-prime: | + craftctl default + rm lib/systemd/system/alsa-utils.service + override-build: | + export PYTHONPATH=/snap/checkbox24/current/lib/python3.12/site-packages/ + for path in $(find "/snap/checkbox24/current/providers/" -mindepth 1 -maxdepth 1 -type d); do export PROVIDERPATH=$path${PROVIDERPATH:+:$PROVIDERPATH}; done + python3 manage.py validate + python3 manage.py build + python3 manage.py install --layout=relocatable --prefix=/providers/checkbox-provider-ce-oem --root="$CRAFT_PART_INSTALL" + build-snaps: + - checkbox24 + build-packages: + - python3-dev + - python3-jinja2 + - python3-packaging + - python3-urwid + - python3-xlsxwriter + - python3-requests-oauthlib + input-pcspkr: + plugin: nil + after: [checkbox-provider-ce-oem] + build-packages: + - gcc + - libc6-dev + override-build: | + mkdir -p ${CRAFT_PART_INSTALL}/usr/bin + gcc ${CRAFT_PROJECT_DIR}/checkbox-provider-ce-oem/src/input-pcspkr.c -o ${CRAFT_PART_INSTALL}/usr/bin/beep + xtest: + plugin: dump + after: [checkbox-provider-ce-oem] + source: https://github.com/OP-TEE/optee_test.git + source-type: git + build-snaps: + - checkbox24 + build-packages: + - jq + - python3-requests-unixsocket + build-environment: + - PART_DEST: ${CRAFT_PART_INSTALL}/providers/checkbox-provider-ce-oem/data/ + - PROVIDER_SRC: ${CRAFT_PROJECT_DIR}/checkbox-provider-ce-oem + - PYTHONPATH: /snap/checkbox24/current/lib/python3.12/site-packages/ + override-pull: | + snapcraftctl pull + cp ${PROVIDER_SRC}/data/xtest_supported_version.json . + cp ${PROVIDER_SRC}/bin/optee_helper.py . + cp ${PROVIDER_SRC}/bin/look_up_xtest.py . + cp ${PROVIDER_SRC}/bin/xtest_install_ta.py . + override-build: | + for ver in `cat xtest_supported_version.json | jq -r .xtest_suite_tag[]`; do + git checkout $ver + python3 optee_helper.py parse_xtest_src $ver + done + mkdir -p ${PART_DEST} + cp -v optee-test-*.json ${PART_DEST} + spidev-test: + plugin: make + source: https://github.com/torvalds/linux.git + source-type: git + source-depth: 1 + source-subdir: tools/spi + parts-meta-info: + plugin: nil + override-build: | + craftctl default + for p in `ls -d ../../*`; do + if [ -d $p/src ]; then + (cd $p/src + if [ -d $p/src/.git ]; then + (echo `basename $p`\: && git show --pretty=format:"%h%d %aN %ci%n%s%n" -q ; echo ) >> $CRAFT_PART_INSTALL/parts_meta_info + fi # for additional `source-type` support, elif them here + ) + fi + done + after: [checkbox-provider-ce-oem] + launchers: + plugin: dump + source: launchers/ + organize: + '*': bin/ + config-variables: + plugin: dump + source: config/ + +layout: + # This is an workaround to access alsa config on UC24 core image + /usr/share/alsa: + bind: $SNAP/usr/share/alsa From af215714087d396f43414bc6aa1ba138b2b50c03 Mon Sep 17 00:00:00 2001 From: Zhongning Li <60045212+tomli380576@users.noreply.github.com> Date: Wed, 10 Jun 2026 13:27:35 +0800 Subject: [PATCH 02/18] feat: can successfully build --- .../series_classic26/.gitignore | 2 ++ .../series_classic26/snap/snapcraft.yaml | 24 +++++++++----- .../series_uc26/.gitignore | 2 ++ .../series_uc26/snap/snapcraft.yaml | 32 ++++++++----------- 4 files changed, 34 insertions(+), 26 deletions(-) create mode 100644 contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/.gitignore create mode 100644 contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/.gitignore diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/.gitignore b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/.gitignore new file mode 100644 index 0000000000..ed422dfc57 --- /dev/null +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/.gitignore @@ -0,0 +1,2 @@ +checkbox-provider-ce-oem/ +*.snap \ No newline at end of file diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/snapcraft.yaml b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/snapcraft.yaml index 99197191da..58045a2a6c 100644 --- a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/snapcraft.yaml +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/snapcraft.yaml @@ -4,9 +4,9 @@ description: "Checkbox CE OEM test runner and public providers for 24.04 classic confinement: classic grade: stable -version: '1.0-noble' +version: '1.0-resolute' -base: core24 +base: core26 apps: checkbox-cli: @@ -49,13 +49,15 @@ parts: override-prime: | craftctl default override-build: | - export PYTHONPATH=/snap/checkbox24/current/lib/python3.12/site-packages/ - for path in $(find "/snap/checkbox24/current/providers/" -mindepth 1 -maxdepth 1 -type d); do export PROVIDERPATH=$path${PROVIDERPATH:+:$PROVIDERPATH}; done + export PYTHONPATH=/snap/checkbox26/current/lib/python3.14/site-packages/ + for path in $(find "/snap/checkbox26/current/providers/" -mindepth 1 -maxdepth 1 -type d); do export PROVIDERPATH=$path${PROVIDERPATH:+:$PROVIDERPATH}; done python3 manage.py validate python3 manage.py build python3 manage.py install --layout=relocatable --prefix=/providers/checkbox-provider-ce-oem --root="$CRAFT_PART_INSTALL" build-snaps: - - checkbox24 + - checkbox26 + build-attributes: + - enable-patchelf build-packages: - python3-dev - python3-jinja2 @@ -69,6 +71,8 @@ parts: build-packages: - gcc - libc6-dev + build-attributes: + - enable-patchelf override-build: | mkdir -p ${CRAFT_PART_INSTALL}/usr/bin gcc ${CRAFT_PROJECT_DIR}/checkbox-provider-ce-oem/src/input-pcspkr.c -o ${CRAFT_PART_INSTALL}/usr/bin/beep @@ -78,16 +82,18 @@ parts: source: https://github.com/OP-TEE/optee_test.git source-type: git build-snaps: - - checkbox24 + - checkbox26 + build-attributes: + - enable-patchelf build-packages: - jq - python3-requests-unixsocket build-environment: - PART_DEST: ${CRAFT_PART_INSTALL}/providers/checkbox-provider-ce-oem/data/ - PROVIDER_SRC: ${CRAFT_PROJECT_DIR}/checkbox-provider-ce-oem - - PYTHONPATH: /snap/checkbox24/current/lib/python3.12/site-packages/ + - PYTHONPATH: /snap/checkbox26/current/lib/python3.14/site-packages/ override-pull: | - snapcraftctl pull + craftctl default cp ${PROVIDER_SRC}/data/xtest_supported_version.json . cp ${PROVIDER_SRC}/bin/optee_helper.py . cp ${PROVIDER_SRC}/bin/look_up_xtest.py . @@ -101,6 +107,8 @@ parts: cp -v optee-test-*.json ${PART_DEST} spidev-test: plugin: make + build-attributes: + - enable-patchelf source: https://github.com/torvalds/linux.git source-type: git source-depth: 1 diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/.gitignore b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/.gitignore new file mode 100644 index 0000000000..ed422dfc57 --- /dev/null +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/.gitignore @@ -0,0 +1,2 @@ +checkbox-provider-ce-oem/ +*.snap \ No newline at end of file diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/snapcraft.yaml b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/snapcraft.yaml index 6c54df729d..3a6484f91d 100644 --- a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/snapcraft.yaml +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/snapcraft.yaml @@ -4,35 +4,35 @@ description: "Checkbox CE OEM test runner and public providers" confinement: strict grade: stable -version: '1.0-noble' +version: '1.0-resolute' -base: core24 +base: core26 plugs: checkbox-runtime: interface: content target: $SNAP/checkbox-runtime - default-provider: checkbox24 + default-provider: checkbox26 provider-resource: interface: content target: $SNAP/providers/checkbox-provider-resource - default-provider: checkbox24 + default-provider: checkbox26 provider-checkbox: interface: content target: $SNAP/providers/checkbox-provider-checkbox - default-provider: checkbox24 + default-provider: checkbox26 provider-tpm2: interface: content target: $SNAP/providers/checkbox-provider-tpm2 - default-provider: checkbox24 + default-provider: checkbox26 provider-docker: interface: content target: $SNAP/providers/checkbox-provider-docker - default-provider: checkbox24 + default-provider: checkbox26 provider-certification-client: interface: content target: $SNAP/providers/checkbox-provider-certification-client - default-provider: checkbox24 + default-provider: checkbox26 apps: checkbox-cli: command-chain: [bin/wrapper_local] @@ -84,17 +84,14 @@ parts: - snmp - python3-rpyc - gpsd - override-prime: | - craftctl default - rm lib/systemd/system/alsa-utils.service override-build: | - export PYTHONPATH=/snap/checkbox24/current/lib/python3.12/site-packages/ - for path in $(find "/snap/checkbox24/current/providers/" -mindepth 1 -maxdepth 1 -type d); do export PROVIDERPATH=$path${PROVIDERPATH:+:$PROVIDERPATH}; done + export PYTHONPATH=/snap/checkbox26/current/lib/python3.14/site-packages/ + for path in $(find "/snap/checkbox26/current/providers/" -mindepth 1 -maxdepth 1 -type d); do export PROVIDERPATH=$path${PROVIDERPATH:+:$PROVIDERPATH}; done python3 manage.py validate python3 manage.py build python3 manage.py install --layout=relocatable --prefix=/providers/checkbox-provider-ce-oem --root="$CRAFT_PART_INSTALL" build-snaps: - - checkbox24 + - checkbox26 build-packages: - python3-dev - python3-jinja2 @@ -117,16 +114,16 @@ parts: source: https://github.com/OP-TEE/optee_test.git source-type: git build-snaps: - - checkbox24 + - checkbox26 build-packages: - jq - python3-requests-unixsocket build-environment: - PART_DEST: ${CRAFT_PART_INSTALL}/providers/checkbox-provider-ce-oem/data/ - PROVIDER_SRC: ${CRAFT_PROJECT_DIR}/checkbox-provider-ce-oem - - PYTHONPATH: /snap/checkbox24/current/lib/python3.12/site-packages/ + - PYTHONPATH: /snap/checkbox26/current/lib/python3.14/site-packages/ override-pull: | - snapcraftctl pull + craftctl default cp ${PROVIDER_SRC}/data/xtest_supported_version.json . cp ${PROVIDER_SRC}/bin/optee_helper.py . cp ${PROVIDER_SRC}/bin/look_up_xtest.py . @@ -168,6 +165,5 @@ parts: source: config/ layout: - # This is an workaround to access alsa config on UC24 core image /usr/share/alsa: bind: $SNAP/usr/share/alsa From 54f01980c39b7a7fa22a40cd05c99f64696316ae Mon Sep 17 00:00:00 2001 From: Zhongning Li <60045212+tomli380576@users.noreply.github.com> Date: Wed, 10 Jun 2026 13:45:25 +0800 Subject: [PATCH 03/18] fix: replace mentions of checkbox24 with checkbox26 --- .../series_classic26/launchers/configure | 12 ++++++------ .../series_classic26/launchers/test-runner | 4 ++-- .../series_classic26/launchers/wrapper_local | 6 +++--- .../series_classic26/snap/hooks/configure | 12 ++++++------ .../series_uc26/launchers/configure | 12 ++++++------ .../series_uc26/launchers/test-runner | 10 +++++----- .../series_uc26/launchers/wrapper_local | 6 +++--- .../series_uc26/snap/hooks/configure | 12 ++++++------ 8 files changed, 37 insertions(+), 37 deletions(-) diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/configure b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/configure index 49f9cfc4fc..0526fe6d93 100755 --- a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/configure +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/configure @@ -26,15 +26,15 @@ try: except ImportError: msg = """ checkbox-support not found! -You need to connect this snap to the checkbox24 snap. +You need to connect this snap to the checkbox26 snap. You can do this with those commands: -snap connect $SNAP_NAME:checkbox-runtime checkbox24:checkbox-runtime -snap connect $SNAP_NAME:provider-resource checkbox24:provider-resource -snap connect $SNAP_NAME:provider-checkbox checkbox24:provider-checkbox -snap connect $SNAP_NAME:provider-tpm2 checkbox24:provider-tpm2 -snap connect $SNAP_NAME:provider-certification-client checkbox24:provider-certification-client +snap connect $SNAP_NAME:checkbox-runtime checkbox26:checkbox-runtime +snap connect $SNAP_NAME:provider-resource checkbox26:provider-resource +snap connect $SNAP_NAME:provider-checkbox checkbox26:provider-checkbox +snap connect $SNAP_NAME:provider-tpm2 checkbox26:provider-tpm2 +snap connect $SNAP_NAME:provider-certification-client checkbox26:provider-certification-client """ print(os.path.expandvars(msg), file=sys.stderr) sys.exit(1) diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/test-runner b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/test-runner index 535c1b3cf5..242fcfda59 100755 --- a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/test-runner +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/test-runner @@ -5,5 +5,5 @@ launcher_version = 1 stock_reports = text, submission_files, certification [test plan] -unit = com.canonical.contrib::ce-oem-iot-server-24-04 -filter = com.canonical.contrib::ce-oem-iot-server-24-04* +unit = com.canonical.contrib::ce-oem-iot-server-26-04 +filter = com.canonical.contrib::ce-oem-iot-server-26-04* diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/wrapper_local b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/wrapper_local index c673286199..ed32056a54 100755 --- a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/wrapper_local +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/wrapper_local @@ -18,12 +18,12 @@ esac # Launcher common exports for any checkbox app # ################################################ -RUNTIME=/snap/checkbox24/current +RUNTIME=/snap/checkbox26/current if [ ! -d "$RUNTIME" ]; then - echo "You need to install the checkbox24 snap." + echo "You need to install the checkbox26 snap." echo "" echo "You can do this with this command:" - echo "snap install checkbox24" + echo "snap install checkbox26" exit 1 fi diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/hooks/configure b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/hooks/configure index 6e11656087..311a2bfb94 100755 --- a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/hooks/configure +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/hooks/configure @@ -46,15 +46,15 @@ try: except ImportError: msg = """ checkbox-support not found! -You need to connect this snap to the checkbox24 snap. +You need to connect this snap to the checkbox26 snap. You can do this with those commands: -snap connect $SNAP_NAME:checkbox-runtime checkbox24:checkbox-runtime -snap connect $SNAP_NAME:provider-resource checkbox24:provider-resource -snap connect $SNAP_NAME:provider-checkbox checkbox24:provider-checkbox -snap connect $SNAP_NAME:provider-tpm2 checkbox24:provider-tpm2 -snap connect $SNAP_NAME:provider-certification-client checkbox24:provider-certification-client +snap connect $SNAP_NAME:checkbox-runtime checkbox26:checkbox-runtime +snap connect $SNAP_NAME:provider-resource checkbox26:provider-resource +snap connect $SNAP_NAME:provider-checkbox checkbox26:provider-checkbox +snap connect $SNAP_NAME:provider-tpm2 checkbox26:provider-tpm2 +snap connect $SNAP_NAME:provider-certification-client checkbox26:provider-certification-client """ print(os.path.expandvars(msg), file=sys.stderr) sys.exit(0) diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/configure b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/configure index 49f9cfc4fc..0526fe6d93 100755 --- a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/configure +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/configure @@ -26,15 +26,15 @@ try: except ImportError: msg = """ checkbox-support not found! -You need to connect this snap to the checkbox24 snap. +You need to connect this snap to the checkbox26 snap. You can do this with those commands: -snap connect $SNAP_NAME:checkbox-runtime checkbox24:checkbox-runtime -snap connect $SNAP_NAME:provider-resource checkbox24:provider-resource -snap connect $SNAP_NAME:provider-checkbox checkbox24:provider-checkbox -snap connect $SNAP_NAME:provider-tpm2 checkbox24:provider-tpm2 -snap connect $SNAP_NAME:provider-certification-client checkbox24:provider-certification-client +snap connect $SNAP_NAME:checkbox-runtime checkbox26:checkbox-runtime +snap connect $SNAP_NAME:provider-resource checkbox26:provider-resource +snap connect $SNAP_NAME:provider-checkbox checkbox26:provider-checkbox +snap connect $SNAP_NAME:provider-tpm2 checkbox26:provider-tpm2 +snap connect $SNAP_NAME:provider-certification-client checkbox26:provider-certification-client """ print(os.path.expandvars(msg), file=sys.stderr) sys.exit(1) diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/test-runner b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/test-runner index 90a0574cdb..096c9ca06c 100755 --- a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/test-runner +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/test-runner @@ -5,8 +5,8 @@ launcher_version = 1 stock_reports = text, submission_files, certification [test plan] -unit = com.canonical.contrib::ce-oem-iot-ubuntucore-24-automated -filter = com.canonical.contrib::ce-oem-iot-ubuntucore-24 - com.canonical.contrib::ce-oem-iot-ubuntucore-24-manual - com.canonical.contrib::ce-oem-iot-ubuntucore-24-automated - com.canonical.contrib::ce-oem-iot-ubuntucore-24-stress +unit = com.canonical.contrib::ce-oem-iot-ubuntucore-26-automated +filter = com.canonical.contrib::ce-oem-iot-ubuntucore-26 + com.canonical.contrib::ce-oem-iot-ubuntucore-26-manual + com.canonical.contrib::ce-oem-iot-ubuntucore-26-automated + com.canonical.contrib::ce-oem-iot-ubuntucore-26-stress diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/wrapper_local b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/wrapper_local index 0348488d1e..9441d14e61 100755 --- a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/wrapper_local +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/wrapper_local @@ -21,11 +21,11 @@ esac if [ -d $SNAP/checkbox-runtime ]; then RUNTIME=$SNAP/checkbox-runtime if [ ! -d $RUNTIME/usr ]; then - echo "You need to connect this snap to the checkbox24 snap." + echo "You need to connect this snap to the checkbox26 snap." echo "" echo "You can do this with those commands:" - echo "snap install checkbox24" - echo "snap connect $SNAP_NAME:checkbox-runtime checkbox24:checkbox-runtime" + echo "snap install checkbox26" + echo "snap connect $SNAP_NAME:checkbox-runtime checkbox26:checkbox-runtime" exit 1 fi fi diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/hooks/configure b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/hooks/configure index 8155eb79ac..5de4f23cd1 100755 --- a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/hooks/configure +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/hooks/configure @@ -46,15 +46,15 @@ try: except ImportError: msg = """ checkbox-support not found! -You need to connect this snap to the checkbox24 snap. +You need to connect this snap to the checkbox26 snap. You can do this with those commands: -snap connect $SNAP_NAME:checkbox-runtime checkbox24:checkbox-runtime -snap connect $SNAP_NAME:provider-resource checkbox24:provider-resource -snap connect $SNAP_NAME:provider-checkbox checkbox24:provider-checkbox -snap connect $SNAP_NAME:provider-tpm2 checkbox24:provider-tpm2 -snap connect $SNAP_NAME:provider-certification-client checkbox24:provider-certification-client +snap connect $SNAP_NAME:checkbox-runtime checkbox26:checkbox-runtime +snap connect $SNAP_NAME:provider-resource checkbox26:provider-resource +snap connect $SNAP_NAME:provider-checkbox checkbox26:provider-checkbox +snap connect $SNAP_NAME:provider-tpm2 checkbox26:provider-tpm2 +snap connect $SNAP_NAME:provider-certification-client checkbox26:provider-certification-client """ print(os.path.expandvars(msg), file=sys.stderr) sys.exit(0) From 0a3754639af802794899b20543f0a62d12100349 Mon Sep 17 00:00:00 2001 From: Zhongning Li <60045212+tomli380576@users.noreply.github.com> Date: Wed, 10 Jun 2026 14:02:37 +0800 Subject: [PATCH 04/18] fix: typo --- .../checkbox-ce-oem-snap/series_classic26/snap/snapcraft.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/snapcraft.yaml b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/snapcraft.yaml index 58045a2a6c..3ec172bf60 100644 --- a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/snapcraft.yaml +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/snapcraft.yaml @@ -1,6 +1,6 @@ name: checkbox-ce-oem -summary: Checkbox CE OEM test runner and public providers for 24.04 classic -description: "Checkbox CE OEM test runner and public providers for 24.04 classic" +summary: Checkbox CE OEM test runner and public providers for 26.04 classic +description: "Checkbox CE OEM test runner and public providers for 26.04 classic" confinement: classic grade: stable From daaca6e525d415267c1a127f1cd7f94958426ce9 Mon Sep 17 00:00:00 2001 From: Zhongning Li <60045212+tomli380576@users.noreply.github.com> Date: Wed, 10 Jun 2026 14:14:50 +0800 Subject: [PATCH 05/18] fix: classic snaps don't have 'connect' --- .../series_classic26/launchers/configure | 12 +++--------- .../series_classic26/snap/hooks/configure | 10 ++-------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/configure b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/configure index 0526fe6d93..e5218aa57e 100755 --- a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/configure +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/configure @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2018-2022 Canonical Ltd. +# Copyright 2018-2026 Canonical Ltd. # All rights reserved. # # Written by: @@ -26,15 +26,9 @@ try: except ImportError: msg = """ checkbox-support not found! -You need to connect this snap to the checkbox26 snap. +You need to install the checkbox26 snap: -You can do this with those commands: - -snap connect $SNAP_NAME:checkbox-runtime checkbox26:checkbox-runtime -snap connect $SNAP_NAME:provider-resource checkbox26:provider-resource -snap connect $SNAP_NAME:provider-checkbox checkbox26:provider-checkbox -snap connect $SNAP_NAME:provider-tpm2 checkbox26:provider-tpm2 -snap connect $SNAP_NAME:provider-certification-client checkbox26:provider-certification-client +sudo snap install checkbox26 """ print(os.path.expandvars(msg), file=sys.stderr) sys.exit(1) diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/hooks/configure b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/hooks/configure index 311a2bfb94..9b64e4b41a 100755 --- a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/hooks/configure +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/hooks/configure @@ -46,15 +46,9 @@ try: except ImportError: msg = """ checkbox-support not found! -You need to connect this snap to the checkbox26 snap. +You need to install the checkbox26 snap: -You can do this with those commands: - -snap connect $SNAP_NAME:checkbox-runtime checkbox26:checkbox-runtime -snap connect $SNAP_NAME:provider-resource checkbox26:provider-resource -snap connect $SNAP_NAME:provider-checkbox checkbox26:provider-checkbox -snap connect $SNAP_NAME:provider-tpm2 checkbox26:provider-tpm2 -snap connect $SNAP_NAME:provider-certification-client checkbox26:provider-certification-client +sudo snap install checkbox26 """ print(os.path.expandvars(msg), file=sys.stderr) sys.exit(0) From c60c029ae9fc5ddaa613dc008b6eb5ec40bbbd77 Mon Sep 17 00:00:00 2001 From: Zhongning Li <60045212+tomli380576@users.noreply.github.com> Date: Wed, 10 Jun 2026 14:16:29 +0800 Subject: [PATCH 06/18] fix: use raise --- .../checkbox-ce-oem-snap/series_classic26/launchers/configure | 3 +-- .../checkbox-ce-oem-snap/series_uc26/launchers/configure | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/configure b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/configure index e5218aa57e..27b78c5338 100755 --- a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/configure +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/configure @@ -37,8 +37,7 @@ sudo snap install checkbox26 def main(): # we need run as root to be able to write to /var/snap/... if os.geteuid() != 0: - print('You have to run this command with sudo') - return + raise SystemExit('You have to run this command with sudo') if len(sys.argv) > 1 and sys.argv[1] == '-l': print_checkbox_conf() diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/configure b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/configure index 0526fe6d93..de0542015f 100755 --- a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/configure +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/configure @@ -43,8 +43,7 @@ snap connect $SNAP_NAME:provider-certification-client checkbox26:provider-certif def main(): # we need run as root to be able to write to /var/snap/... if os.geteuid() != 0: - print('You have to run this command with sudo') - return + raise SystemExit('You have to run this command with sudo') if len(sys.argv) > 1 and sys.argv[1] == '-l': print_checkbox_conf() From beaf4c5940cf7a278312ad6551fa46abf5e87332 Mon Sep 17 00:00:00 2001 From: Zhongning Li <60045212+tomli380576@users.noreply.github.com> Date: Wed, 10 Jun 2026 14:19:20 +0800 Subject: [PATCH 07/18] fix: copilot suggestion --- .../series_classic26/launchers/wrapper_local | 3 ++- .../checkbox-ce-oem-snap/series_uc26/launchers/wrapper_local | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/wrapper_local b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/wrapper_local index ed32056a54..74a7733761 100755 --- a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/wrapper_local +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/launchers/wrapper_local @@ -11,6 +11,7 @@ case "$SNAP_ARCH" in ;; *) echo "Unsupported architecture: $SNAP_ARCH" + exit 1 ;; esac @@ -39,7 +40,7 @@ if [ -e $RUNTIME/wrapper_common_classic ]; then . $RUNTIME/wrapper_common_classic else echo "ERROR: no $RUNTIME/wrapper_common_classic found" - exit 0 + exit 1 fi exec "$@" diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/wrapper_local b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/wrapper_local index 9441d14e61..e717a7ec76 100755 --- a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/wrapper_local +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/wrapper_local @@ -11,6 +11,7 @@ case "$SNAP_ARCH" in ;; *) echo "Unsupported architecture: $SNAP_ARCH" + exit 1 ;; esac @@ -45,7 +46,7 @@ else echo "Running in configure hook, wrapper_common not required" else echo "ERROR: no $RUNTIME/wrapper_common found" - exit 0 + exit 1 fi fi From c31621c3fe0e4124aa22e438caf4d79689f17b29 Mon Sep 17 00:00:00 2001 From: Zhongning Li <60045212+tomli380576@users.noreply.github.com> Date: Wed, 10 Jun 2026 14:27:24 +0800 Subject: [PATCH 08/18] doc: document the docker plug --- .../checkbox-ce-oem-snap/series_uc26/launchers/configure | 1 + .../checkbox-ce-oem-snap/series_uc26/snap/hooks/configure | 1 + 2 files changed, 2 insertions(+) diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/configure b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/configure index de0542015f..8471f06a77 100755 --- a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/configure +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/launchers/configure @@ -34,6 +34,7 @@ snap connect $SNAP_NAME:checkbox-runtime checkbox26:checkbox-runtime snap connect $SNAP_NAME:provider-resource checkbox26:provider-resource snap connect $SNAP_NAME:provider-checkbox checkbox26:provider-checkbox snap connect $SNAP_NAME:provider-tpm2 checkbox26:provider-tpm2 +snap connect $SNAP_NAME:provider-docker checkbox26:provider-docker snap connect $SNAP_NAME:provider-certification-client checkbox26:provider-certification-client """ print(os.path.expandvars(msg), file=sys.stderr) diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/hooks/configure b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/hooks/configure index 5de4f23cd1..b7b03083b2 100755 --- a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/hooks/configure +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/hooks/configure @@ -54,6 +54,7 @@ snap connect $SNAP_NAME:checkbox-runtime checkbox26:checkbox-runtime snap connect $SNAP_NAME:provider-resource checkbox26:provider-resource snap connect $SNAP_NAME:provider-checkbox checkbox26:provider-checkbox snap connect $SNAP_NAME:provider-tpm2 checkbox26:provider-tpm2 +snap connect $SNAP_NAME:provider-docker checkbox26:provider-docker snap connect $SNAP_NAME:provider-certification-client checkbox26:provider-certification-client """ print(os.path.expandvars(msg), file=sys.stderr) From 885ac4259a4f481765e733bd704a59b86a9ca488 Mon Sep 17 00:00:00 2001 From: Zhongning Li <60045212+tomli380576@users.noreply.github.com> Date: Wed, 10 Jun 2026 14:29:00 +0800 Subject: [PATCH 09/18] fix: typos --- .../series_classic26/snap/hooks/configure | 6 +++--- .../checkbox-ce-oem-snap/series_uc26/snap/hooks/configure | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/hooks/configure b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/hooks/configure index 9b64e4b41a..6259216804 100755 --- a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/hooks/configure +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/hooks/configure @@ -9,7 +9,7 @@ checkbox config format in `$SNAP_DATA/checkbox.conf`. config_vars should list all the configuration variables in a `key=value` syntax. The line can list variable name only, if the variable should not have a -default value. All keys should comprise of CAPS, numbers and undescores (_). +default value. All keys should comprise of CAPS, numbers and underscores (_). E.g.: OPEN_N_SSID @@ -18,13 +18,13 @@ STRESS_S3_WAIT_DELAY=60 To change those values use the configure launcher. E.g. - $ checkbox-iiotg.configure OPEN_N_SSID=my-wifi + $ checkbox-ce-oem.configure OPEN_N_SSID=my-wifi If you __really__ need to change those values using `snap set` command, you need to change CAPS to lowercase and underscores to dashes (-). E.g. - $ snap set checkbox-iiotg open-n-ssid=my-wifi + $ snap set checkbox-ce-oem open-n-ssid=my-wifi """ import os diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/hooks/configure b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/hooks/configure index b7b03083b2..c05027d70f 100755 --- a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/hooks/configure +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/hooks/configure @@ -9,7 +9,7 @@ checkbox config format in `$SNAP_DATA/checkbox.conf`. config_vars should list all the configuration variables in a `key=value` syntax. The line can list variable name only, if the variable should not have a -default value. All keys should comprise of CAPS, numbers and undescores (_). +default value. All keys should comprise of CAPS, numbers and underscores (_). E.g.: OPEN_N_SSID From a73d93704a494a88cb093510e2988a4330a6952e Mon Sep 17 00:00:00 2001 From: Zhongning Li <60045212+tomli380576@users.noreply.github.com> Date: Wed, 10 Jun 2026 14:32:08 +0800 Subject: [PATCH 10/18] ci: add 26 to cross and native builds --- .github/workflows/checkbox-ce-oem-daily-cross-builds.yaml | 2 +- .github/workflows/checkbox-ce-oem-daily-native-builds.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/checkbox-ce-oem-daily-cross-builds.yaml b/.github/workflows/checkbox-ce-oem-daily-cross-builds.yaml index 90b5c57dfe..6ff007e75d 100644 --- a/.github/workflows/checkbox-ce-oem-daily-cross-builds.yaml +++ b/.github/workflows/checkbox-ce-oem-daily-cross-builds.yaml @@ -26,7 +26,7 @@ jobs: fail-fast: false matrix: type: [classic, uc] - release: [20, 22, 24] + release: [20, 22, 24, 26] arch: [armhf, amd64, arm64] exclude: # other confs built natively in checkbox-daily-native-builds.yaml diff --git a/.github/workflows/checkbox-ce-oem-daily-native-builds.yaml b/.github/workflows/checkbox-ce-oem-daily-native-builds.yaml index 07ad8bdf37..e589ab4932 100644 --- a/.github/workflows/checkbox-ce-oem-daily-native-builds.yaml +++ b/.github/workflows/checkbox-ce-oem-daily-native-builds.yaml @@ -27,7 +27,7 @@ jobs: matrix: # other confs cross-built by checkbox-daily-cross-build.yaml type: [classic, uc] - release: [20, 22, 24] + release: [20, 22, 24, 26] arch: [amd64, arm64] include: - arch: amd64 From 5aff649d5eda425d05b59404381e473857659524 Mon Sep 17 00:00:00 2001 From: Zhongning Li <60045212+tomli380576@users.noreply.github.com> Date: Wed, 10 Jun 2026 14:45:28 +0800 Subject: [PATCH 11/18] fix: missing snapcraft version --- .github/workflows/checkbox-ce-oem-daily-native-builds.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/checkbox-ce-oem-daily-native-builds.yaml b/.github/workflows/checkbox-ce-oem-daily-native-builds.yaml index e589ab4932..98f183e14a 100644 --- a/.github/workflows/checkbox-ce-oem-daily-native-builds.yaml +++ b/.github/workflows/checkbox-ce-oem-daily-native-builds.yaml @@ -40,6 +40,8 @@ jobs: snapcraft_version: 8.x - release: 24 snapcraft_version: 8.x + - release: 26 + snapcraft_version: 9.x runs-on: group: "Canonical self-hosted runners" labels: ["self-hosted", "linux", "jammy", "large", "${{ matrix.tag }}"] From dd8abde696a7e8b3d05a0a7e9b0aa327480a84e7 Mon Sep 17 00:00:00 2001 From: Zhongning Li <60045212+tomli380576@users.noreply.github.com> Date: Wed, 10 Jun 2026 16:13:35 +0800 Subject: [PATCH 12/18] ci: specify channel --- .../workflows/checkbox-ce-oem-daily-native-builds.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/checkbox-ce-oem-daily-native-builds.yaml b/.github/workflows/checkbox-ce-oem-daily-native-builds.yaml index 98f183e14a..21743b8b08 100644 --- a/.github/workflows/checkbox-ce-oem-daily-native-builds.yaml +++ b/.github/workflows/checkbox-ce-oem-daily-native-builds.yaml @@ -35,13 +35,13 @@ jobs: - arch: arm64 tag: ARM64 - release: 20 - snapcraft_version: 7.x + snapcraft_version: 7.x/stable - release: 22 - snapcraft_version: 8.x + snapcraft_version: 8.x/stable - release: 24 - snapcraft_version: 8.x + snapcraft_version: 8.x/stable - release: 26 - snapcraft_version: 9.x + snapcraft_version: 9.x/candidate runs-on: group: "Canonical self-hosted runners" labels: ["self-hosted", "linux", "jammy", "large", "${{ matrix.tag }}"] @@ -69,7 +69,7 @@ jobs: attempt_limit: 5 with: | path: contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_${{ matrix.type }}${{ matrix.release }} - snapcraft-channel: ${{ matrix.snapcraft_version }}/stable + snapcraft-channel: ${{ matrix.snapcraft_version }} - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a name: Upload logs on failure From 3d5798bca361e13b917b5f519ecbe5f58832f7fb Mon Sep 17 00:00:00 2001 From: Zhongning Li <60045212+tomli380576@users.noreply.github.com> Date: Mon, 15 Jun 2026 15:25:27 +0800 Subject: [PATCH 13/18] fix: uc26 can successfully build now --- .../checkbox-ce-oem-snap/series_uc26/snap/snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/snapcraft.yaml b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/snapcraft.yaml index 3a6484f91d..aae21679df 100644 --- a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/snapcraft.yaml +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/snapcraft.yaml @@ -85,7 +85,7 @@ parts: - python3-rpyc - gpsd override-build: | - export PYTHONPATH=/snap/checkbox26/current/lib/python3.14/site-packages/ + export PYTHONPATH=/snap/checkbox26/current/lib/python3.14/site-packages/:/usr/lib/python3/dist-packages:$CRAFT_STAGE/usr/lib/python3/dist-packages for path in $(find "/snap/checkbox26/current/providers/" -mindepth 1 -maxdepth 1 -type d); do export PROVIDERPATH=$path${PROVIDERPATH:+:$PROVIDERPATH}; done python3 manage.py validate python3 manage.py build From d19ea8f9174f1becb55f5b26f82986dd51c93940 Mon Sep 17 00:00:00 2001 From: Zhongning Li <60045212+tomli380576@users.noreply.github.com> Date: Mon, 15 Jun 2026 15:55:16 +0800 Subject: [PATCH 14/18] test: add tmate --- .github/workflows/checkbox-ce-oem-daily-native-builds.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/checkbox-ce-oem-daily-native-builds.yaml b/.github/workflows/checkbox-ce-oem-daily-native-builds.yaml index 21743b8b08..cac7e57bd0 100644 --- a/.github/workflows/checkbox-ce-oem-daily-native-builds.yaml +++ b/.github/workflows/checkbox-ce-oem-daily-native-builds.yaml @@ -5,14 +5,14 @@ on: workflow_dispatch: inputs: store_upload: - description: 'Should the workflow upload to the store?' + description: "Should the workflow upload to the store?" default: false required: false type: boolean workflow_call: inputs: store_upload: - description: 'Should the workflow upload to the store?' + description: "Should the workflow upload to the store?" default: false required: false type: boolean @@ -48,6 +48,9 @@ jobs: timeout-minutes: 1200 #20h, this will timeout sooner due to inner timeouts name: Frontend ${{ matrix.type }}${{ matrix.release }} (${{matrix.arch}}) steps: + - name: Setup tmate session + uses: canonical/action-tmate@main + - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 with: fetch-depth: 0 From e30eaa67d1a8a63a24c7132aab5dffd8d65cc5ee Mon Sep 17 00:00:00 2001 From: Zhongning Li <60045212+tomli380576@users.noreply.github.com> Date: Mon, 15 Jun 2026 16:00:37 +0800 Subject: [PATCH 15/18] fix: add detached: true --- .github/workflows/checkbox-ce-oem-daily-native-builds.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/checkbox-ce-oem-daily-native-builds.yaml b/.github/workflows/checkbox-ce-oem-daily-native-builds.yaml index cac7e57bd0..776b937594 100644 --- a/.github/workflows/checkbox-ce-oem-daily-native-builds.yaml +++ b/.github/workflows/checkbox-ce-oem-daily-native-builds.yaml @@ -50,6 +50,8 @@ jobs: steps: - name: Setup tmate session uses: canonical/action-tmate@main + with: + detached: true - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 with: From dcf9be48e2c229ee12051c5e1e117d55e7af1e3f Mon Sep 17 00:00:00 2001 From: Zhongning Li <60045212+tomli380576@users.noreply.github.com> Date: Mon, 15 Jun 2026 16:44:45 +0800 Subject: [PATCH 16/18] hack: use noble --- .github/workflows/checkbox-ce-oem-daily-native-builds.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checkbox-ce-oem-daily-native-builds.yaml b/.github/workflows/checkbox-ce-oem-daily-native-builds.yaml index 776b937594..277880b9e7 100644 --- a/.github/workflows/checkbox-ce-oem-daily-native-builds.yaml +++ b/.github/workflows/checkbox-ce-oem-daily-native-builds.yaml @@ -44,7 +44,7 @@ jobs: snapcraft_version: 9.x/candidate runs-on: group: "Canonical self-hosted runners" - labels: ["self-hosted", "linux", "jammy", "large", "${{ matrix.tag }}"] + labels: ["self-hosted", "linux", "noble", "large", "${{ matrix.tag }}"] timeout-minutes: 1200 #20h, this will timeout sooner due to inner timeouts name: Frontend ${{ matrix.type }}${{ matrix.release }} (${{matrix.arch}}) steps: From 1f8f9d40ae30b00ca5d6746757964b5ffabbbf21 Mon Sep 17 00:00:00 2001 From: Zhongning Li <60045212+tomli380576@users.noreply.github.com> Date: Tue, 16 Jun 2026 10:05:14 +0800 Subject: [PATCH 17/18] fix: bad path --- .../checkbox-ce-oem-snap/series_classic26/snap/snapcraft.yaml | 2 +- .../checkbox-ce-oem-snap/series_uc26/snap/snapcraft.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/snapcraft.yaml b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/snapcraft.yaml index 3ec172bf60..a866c20bc0 100644 --- a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/snapcraft.yaml +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/snapcraft.yaml @@ -49,7 +49,7 @@ parts: override-prime: | craftctl default override-build: | - export PYTHONPATH=/snap/checkbox26/current/lib/python3.14/site-packages/ + export PYTHONPATH=/snap/checkbox26/current/lib/python3.14/site-packages/:/usr/lib/python3/dist-packages for path in $(find "/snap/checkbox26/current/providers/" -mindepth 1 -maxdepth 1 -type d); do export PROVIDERPATH=$path${PROVIDERPATH:+:$PROVIDERPATH}; done python3 manage.py validate python3 manage.py build diff --git a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/snapcraft.yaml b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/snapcraft.yaml index aae21679df..9cf77e4978 100644 --- a/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/snapcraft.yaml +++ b/contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/snapcraft.yaml @@ -85,7 +85,7 @@ parts: - python3-rpyc - gpsd override-build: | - export PYTHONPATH=/snap/checkbox26/current/lib/python3.14/site-packages/:/usr/lib/python3/dist-packages:$CRAFT_STAGE/usr/lib/python3/dist-packages + export PYTHONPATH=/snap/checkbox26/current/lib/python3.14/site-packages/:/usr/lib/python3/dist-packages for path in $(find "/snap/checkbox26/current/providers/" -mindepth 1 -maxdepth 1 -type d); do export PROVIDERPATH=$path${PROVIDERPATH:+:$PROVIDERPATH}; done python3 manage.py validate python3 manage.py build From 76463500f42ef132764644779e8b91ac804de53d Mon Sep 17 00:00:00 2001 From: Zhongning Li <60045212+tomli380576@users.noreply.github.com> Date: Tue, 16 Jun 2026 10:35:51 +0800 Subject: [PATCH 18/18] fix: remove tmate --- .github/workflows/checkbox-ce-oem-daily-native-builds.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/checkbox-ce-oem-daily-native-builds.yaml b/.github/workflows/checkbox-ce-oem-daily-native-builds.yaml index 277880b9e7..fced962d2b 100644 --- a/.github/workflows/checkbox-ce-oem-daily-native-builds.yaml +++ b/.github/workflows/checkbox-ce-oem-daily-native-builds.yaml @@ -48,11 +48,6 @@ jobs: timeout-minutes: 1200 #20h, this will timeout sooner due to inner timeouts name: Frontend ${{ matrix.type }}${{ matrix.release }} (${{matrix.arch}}) steps: - - name: Setup tmate session - uses: canonical/action-tmate@main - with: - detached: true - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 with: fetch-depth: 0