diff --git a/.github/workflows/build-daily.yml b/.github/workflows/build-daily.yml index b328a56c..d6ae1e5e 100644 --- a/.github/workflows/build-daily.yml +++ b/.github/workflows/build-daily.yml @@ -28,3 +28,4 @@ jobs: secrets: inherit with: url: ${{ needs.build-daily.outputs.artifacts_url }} + suite: trixie diff --git a/.github/workflows/build-on-pr.yml b/.github/workflows/build-on-pr.yml index b13516ce..a6998e5e 100644 --- a/.github/workflows/build-on-pr.yml +++ b/.github/workflows/build-on-pr.yml @@ -21,7 +21,20 @@ jobs: name: Event File path: ${{ github.event_path }} - build-pr: + build: + strategy: + fail-fast: false + matrix: + suite: [trixie, forky] + kernelpackage: [default-ci, linux-image-arm64] + exclude: + - suite: trixie + kernelpackage: linux-image-arm64 + - suite: forky + kernelpackage: default-ci uses: ./.github/workflows/debos.yml + with: + suite: ${{ matrix.suite }} + kernelpackage: ${{ matrix.kernelpackage }} schema-check: uses: ./.github/workflows/lava-schema-check.yml diff --git a/.github/workflows/build-on-push.yml b/.github/workflows/build-on-push.yml index 576bbd9f..12d89c5c 100644 --- a/.github/workflows/build-on-push.yml +++ b/.github/workflows/build-on-push.yml @@ -13,7 +13,20 @@ permissions: jobs: build-daily: + strategy: + fail-fast: false + matrix: + suite: [trixie, forky] + kernelpackage: [default-ci, linux-image-arm64] + exclude: + - suite: trixie + kernelpackage: linux-image-arm64 + - suite: forky + kernelpackage: default-ci uses: ./.github/workflows/debos.yml + with: + suite: ${{ matrix.suite }} + kernelpackage: ${{ matrix.kernelpackage }} schema-check: uses: ./.github/workflows/lava-schema-check.yml test: diff --git a/.github/workflows/debos.yml b/.github/workflows/debos.yml index 11431ece..118dd309 100644 --- a/.github/workflows/debos.yml +++ b/.github/workflows/debos.yml @@ -3,6 +3,10 @@ name: Build debos recipe on: workflow_call: inputs: + suite: + description: Distribution suite (e.g. trixie, forky) + type: string + default: trixie overlays: description: List of overlays to use type: string @@ -13,10 +17,7 @@ on: linux-image-arm64) or name of a EFS kernel package directory (e.g. efs/mainline) type: string - # the package name will be passed to APT which interprets the trailing - # plus sign in the package name as a request to install the package, so - # use two plus signs - default: linux-image-6.16.7-qcom1++ + default: default-ci debos_extra_args: description: Extra arguments to pass to debos (e.g. -t dtb:qcom/some.dtb) type: string @@ -40,11 +41,12 @@ env: # image build id; used for SBOM generation BUILD_ID: ${{ github.run_id }}-${{ github.run_attempt }} KERNEL_PACKAGE: ${{ inputs.kernelpackage }} - DEBOS_EXTRA_ARGS: ${{ inputs.debos_extra_args }} + DEBOS_EXTRA_ARGS: -t suite:${{ inputs.suite }} ${{ inputs.debos_extra_args }} + PREFIX: ${{ inputs.suite }} jobs: build-debos: - name: Build and upload debos recipes + name: Build and upload debos recipes (${{ inputs.suite }}) outputs: url: ${{ steps.upload_artifacts_s3.outputs.url }} runs-on: [self-hosted, qcom-u2404, arm64] @@ -101,11 +103,17 @@ jobs: run: | set -ux kernel_package="$KERNEL_PACKAGE" - # if kernel package is from EFS, determine actual package name case "$kernel_package" in + # if kernel package is from EFS, determine actual package name efs/*) kernel_package="$(find local-apt-repo/kernel -type f -name 'linux-image-*' -not -name '*dbg*'|xargs -n1 basename|cut -f1 -d_)" - ;; + ;; + default-ci) + # the package name will be passed to APT which interprets the trailing + # plus sign in the package name as a request to install the package, so + # use two plus signs + kernel_package="linux-image-6.16.7-qcom1++" + ;; esac debos \ @@ -141,13 +149,13 @@ jobs: # create a directory for the current run dir="debos-artifacts" mkdir -v "${dir}" - # compress output files into the staging directory - gzip -c rootfs.tar >"${dir}/rootfs.tar.gz" - gzip -c disk-ufs.img >"${dir}/disk-ufs.img.gz" - gzip -c disk-sdcard.img >"${dir}/disk-sdcard.img.gz" - cp -av dtbs.tar.gz "${dir}" + # compress output files directly into the staging directory + gzip -c rootfs.tar >"${dir}/${PREFIX}-rootfs.tar.gz" + gzip -c disk-ufs.img >"${dir}/${PREFIX}-disk-ufs.img.gz" + gzip -c disk-sdcard.img >"${dir}/${PREFIX}-disk-sdcard.img.gz" + cp -av dtbs.tar.gz "${dir}/${PREFIX}-dtbs.tar.gz" # create tarballs with support for all UFS and all eMMC boards - scripts/bundle-flash-dirs.sh "${dir}" + scripts/bundle-flash-dirs.sh "${dir}" "${PREFIX}" # generate sha256sums for all artifacts (cd "${dir}" && sha256sum * | tee sha256sums.txt) @@ -202,7 +210,7 @@ jobs: dir="sboms" mkdir -v sboms for f in rootfs-sbom.*; do - gzip -c "$f" >"${dir}/${f}.gz" + gzip -c "$f" >"${dir}/${PREFIX}-${f}.gz" done - name: Upload SBOMs as private artifacts diff --git a/.github/workflows/lava-test.yml b/.github/workflows/lava-test.yml index eefaae37..92255747 100644 --- a/.github/workflows/lava-test.yml +++ b/.github/workflows/lava-test.yml @@ -6,6 +6,10 @@ on: url: required: true type: string + suite: + description: Distribution suite (e.g. trixie, forky) + type: string + default: trixie # implicitely set all other permissions to none permissions: @@ -17,6 +21,7 @@ permissions: env: BUILD_URL: ${{ inputs.url }} LAVA_CI: ci/lava/ + SUITE: ${{ inputs.suite }} jobs: prepare-job-list: @@ -83,6 +88,7 @@ jobs: -e "s|{{BUILD_DOWNLOAD_URL}}|${BUILD_DOWNLOAD_URL}|g" \ -e "s|{{BUILD_FILE_NAME}}|${BUILD_FILE_NAME}|g" \ -e "s|{{DEVICE_TYPE}}|${DEVICE_TYPE}|g" \ + -e "s|{{SUITE}}|${SUITE}|g" \ -e "s|{{GITHUB_REPOSITORY}}|${GITHUB_REPOSITORY}|g" \ -e "s|{{GITHUB_RUN_ATTEMPT}}|${GITHUB_RUN_ATTEMPT}|g" \ -e "s|{{GITHUB_RUN_ID}}|${GITHUB_RUN_ID}|g" \ diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index a1850c70..63afedd0 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -150,3 +150,4 @@ jobs: secrets: inherit with: url: ${{ needs.debos-linux-deb.outputs.artifacts_url }} + suite: trixie diff --git a/README.md b/README.md index 86da22b8..c6bf3f15 100644 --- a/README.md +++ b/README.md @@ -150,6 +150,7 @@ A few options are provided in the debos recipes; for the root filesystem recipe: - `kernelpackage`: name of the kernel package to install from apt; defaults to `Debian’s linux-image-arm64`. Can (and should) be set to `none` if you are providing local kernel package instead. +- `suite`: Debian suite to use, defaults to `trixie`. For the image recipe: diff --git a/ci/lava/qcs6490-rb3gen2-vision-kit/boot.yaml b/ci/lava/qcs6490-rb3gen2-vision-kit/boot.yaml index 485b80da..1420414b 100644 --- a/ci/lava/qcs6490-rb3gen2-vision-kit/boot.yaml +++ b/ci/lava/qcs6490-rb3gen2-vision-kit/boot.yaml @@ -4,7 +4,7 @@ actions: image: headers: Authorization: Q_S3_TOKEN - url: "{{BUILD_DOWNLOAD_URL}}/flash-ufs.tar.gz" + url: "{{BUILD_DOWNLOAD_URL}}/{{SUITE}}-flash-ufs.tar.gz" postprocess: docker: image: ghcr.io/foundriesio/lava-lmp-sign:main diff --git a/ci/lava/qrb2210-rb1/boot.yaml b/ci/lava/qrb2210-rb1/boot.yaml index 6d59772a..7857f82b 100644 --- a/ci/lava/qrb2210-rb1/boot.yaml +++ b/ci/lava/qrb2210-rb1/boot.yaml @@ -4,7 +4,7 @@ actions: image: headers: Authorization: Q_S3_TOKEN - url: "{{BUILD_DOWNLOAD_URL}}/flash-emmc.tar.gz" + url: "{{BUILD_DOWNLOAD_URL}}/{{SUITE}}-flash-emmc.tar.gz" postprocess: docker: image: ghcr.io/foundriesio/lava-lmp-sign:main diff --git a/debos-recipes/overlays/apt-sources/etc/apt/sources.list.d/debian.sources b/debos-recipes/overlays/apt-sources/etc/apt/sources.list.d/debian.sources deleted file mode 100644 index 8a013224..00000000 --- a/debos-recipes/overlays/apt-sources/etc/apt/sources.list.d/debian.sources +++ /dev/null @@ -1,20 +0,0 @@ -# Debian archive -Types: deb -URIs: http://deb.debian.org/debian/ -Suites: trixie -Components: main contrib non-free non-free-firmware -Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg - -# Debian stable updates -Types: deb -URIs: http://deb.debian.org/debian/ -Suites: trixie-updates -Components: main contrib non-free non-free-firmware -Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg - -# Debian security updates -Types: deb -URIs: http://deb.debian.org/debian-security/ -Suites: trixie-security -Components: main contrib non-free non-free-firmware -Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg diff --git a/debos-recipes/overlays/backports/etc/apt/preferences.d/debian-backports.pref b/debos-recipes/overlays/backports/etc/apt/preferences.d/debian-backports.pref deleted file mode 100644 index 6bc5f4e8..00000000 --- a/debos-recipes/overlays/backports/etc/apt/preferences.d/debian-backports.pref +++ /dev/null @@ -1,6 +0,0 @@ -# for binary packages built from these source packages, score the version from -# Debian backports higher as to get hardware enabled or better hardware support - -Package: src:alsa-ucm-conf:any src:fastrpc src:firmware-free:any src:firmware-nonfree:any src:hexagon-dsp-binaries src:linux:any src:linux-signed-arm64:any src:mesa:any src:u-boot-efi-dtb -Pin: release n=trixie-backports -Pin-Priority: 900 diff --git a/debos-recipes/overlays/backports/etc/apt/sources.list.d/debian-backports.sources b/debos-recipes/overlays/backports/etc/apt/sources.list.d/debian-backports.sources deleted file mode 100644 index 02cbe0e1..00000000 --- a/debos-recipes/overlays/backports/etc/apt/sources.list.d/debian-backports.sources +++ /dev/null @@ -1,7 +0,0 @@ -# Debian backports -Types: deb -URIs: http://deb.debian.org/debian -Suites: trixie-backports -Components: main contrib non-free non-free-firmware -Enabled: yes -Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg diff --git a/debos-recipes/overlays/qsc-deb-releases/etc/apt/preferences.d/qsc-deb-releases.pref b/debos-recipes/overlays/qsc-deb-releases/etc/apt/preferences.d/qsc-deb-releases.pref deleted file mode 100644 index 2f3d0312..00000000 --- a/debos-recipes/overlays/qsc-deb-releases/etc/apt/preferences.d/qsc-deb-releases.pref +++ /dev/null @@ -1,6 +0,0 @@ -# for binary packages built from these source packages, score the version from -# trixie-overlay higher than versions from Debian for compliance -Package: src:pipewire:any -Pin: release n=trixie-overlay -Pin-Priority: 950 - diff --git a/debos-recipes/overlays/qsc-deb-releases/etc/apt/sources.list.d/qsc-deb-releases.sources b/debos-recipes/overlays/qsc-deb-releases/etc/apt/sources.list.d/qsc-deb-releases.sources deleted file mode 100644 index 0e07df0d..00000000 --- a/debos-recipes/overlays/qsc-deb-releases/etc/apt/sources.list.d/qsc-deb-releases.sources +++ /dev/null @@ -1,9 +0,0 @@ -# QArtifactory qsc-deb-releases repository -# NB: publishing Sources indices for deb-src isn't supported by Artifactory, -# but sources are published with other packages files -Types: deb -URIs: https://qartifactory-edge.qualcomm.com/artifactory/qsc-deb-releases -Suites: trixie-overlay -Components: main -Signed-By: /etc/apt/keyrings/qsc-deb-releases.asc -Enabled: yes diff --git a/debos-recipes/qualcomm-linux-debian-rootfs.yaml b/debos-recipes/qualcomm-linux-debian-rootfs.yaml index 2942856c..ea26ebba 100644 --- a/debos-recipes/qualcomm-linux-debian-rootfs.yaml +++ b/debos-recipes/qualcomm-linux-debian-rootfs.yaml @@ -4,6 +4,7 @@ {{- $kernelpackage := or .kernelpackage "linux-image-arm64" }} {{- $overlays := or .overlays "qsc-deb-releases" }} {{- $buildid := or .buildid "" }} +{{- $suite := or .suite "trixie" }} {{- $variantid := "console" }} {{- if eq $xfcedesktop "true" }} @@ -15,8 +16,7 @@ architecture: arm64 actions: - action: mmdebstrap description: Bootstrap initial filesystem - # NB: not currently configurable - suite: trixie + suite: {{ $suite }} components: - main - contrib @@ -50,15 +50,63 @@ actions: {{- end }} # after debootstrap, only a basic etc/apt/sources.list is created; add more - # modern etc/apt/sources.list.d/debian.sources; sources.list is removed after + # modern etc/apt/sources.list.d/*.sources; sources.list is removed after # applying all overlays, and followed by an APT update and full-upgrade - - action: overlay - description: Create Debian APT sources - source: overlays/apt-sources + - action: run + description: Create APT sources for debian {{ $suite }} + chroot: true + command: | + set -eux + tee /etc/apt/sources.list.d/debian.sources <