From 1fd6aabe0c40a6a77d528814d7954cac88b7d25c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Walstr=C3=B6m?= Date: Tue, 20 Jan 2026 09:18:11 +0100 Subject: [PATCH] Fix automatic kernel upgrade Was not prepared correctly for 6.18 kernels --- .github/workflows/check-kernel-release.yml | 2 +- utils/kernel-upgrade.sh | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/check-kernel-release.yml b/.github/workflows/check-kernel-release.yml index 79f28f89e..4893f0caa 100644 --- a/.github/workflows/check-kernel-release.yml +++ b/.github/workflows/check-kernel-release.yml @@ -99,7 +99,7 @@ jobs: BRANCH_NAME: ${{ steps.branch.outputs.name }} run: | set -e -o pipefail - ./utils/kernel-upgrade.sh linux "$BRANCH_NAME" + ./utils/kernel-upgrade.sh linux 6.18 "$BRANCH_NAME" - name: Create pull request if: steps.check.outputs.new_release == 'true' diff --git a/utils/kernel-upgrade.sh b/utils/kernel-upgrade.sh index 11b59d90c..119c06808 100755 --- a/utils/kernel-upgrade.sh +++ b/utils/kernel-upgrade.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Automated kernel upgrade test script for LTS 6.12.x +# Automated kernel upgrade test script for stable kernels # Run from the infix directory and specify the path to the linux kernel tree # # Usage: ./utils/kernel-upgrade.sh @@ -9,17 +9,18 @@ set -e -o pipefail # Parse arguments -if [ $# -lt 1 ] || [ $# -gt 2 ]; then - echo "Usage: $0 [branch-name]" +if [ $# -lt 2 ] || [ $# -gt 3 ]; then + echo "Usage: $0 [branch-name]" exit 1 fi LINUX_DIR="$1" -INFIX_BRANCH="${2:-kernel-upgrade}" +MAJOR="$2" +INFIX_BRANCH="${3:-kernel-upgrade}" # Configuration INFIX_DIR="$(dirname "$(dirname "$(readlink -f "$0")")")" -LINUX_BRANCH="kkit-linux-6.12.y" +LINUX_BRANCH="kkit-linux-$MAJOR.y" UPSTREAM_REMOTE="upstream" UPSTREAM_URL="https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git" KKIT_REMOTE="origin" @@ -31,7 +32,7 @@ else KKIT_URL="git@github.com:kernelkit/linux.git" fi -KERNEL_VERSION_PATTERN="6.12" +KERNEL_VERSION_PATTERN="$MAJOR" # Colors for output RED='\033[0;31m' @@ -138,7 +139,7 @@ update_linux_kernel() { rebase_kernel() { log_info "Rebasing on new kernel release..." - # Find the latest v6.12.x tag from upstream + # Find the latest tag from upstream matching requested major LATEST_TAG=$(git -C "$LINUX_DIR" tag -l "v${KERNEL_VERSION_PATTERN}.*" | sort -V | tail -n1) if [ -z "$LATEST_TAG" ]; then