Explorar o código

refactor: rename 'classic' root token to kernelsu across workflows

Rename the functional root flavor token 'classic' -> 'kernelsu' for the
tiann/KernelSU upstream root, and update wording everywhere. Renames:
- flavor/variant: classic -> kernelsu, display 'Classic-KernelSU' -> 'KernelSU'
- PIN_CLASSIC -> PIN_KERNELSU, CLASSIC_COMMIT -> KERNELSU_COMMIT,
  CLASSIC_SHA/APPROVE_CLASSIC -> KERNELSU_SHA/APPROVE_KERNELSU (update script)
- root-setup and susfs action case/description updated; susfs enable patch
  now keys on root_flavor == 'kernelsu' to match the workflows

The classic_commit OUTPUT is renamed to ksu_commit (kept distinct from
kernelsu_commit, which is the KernelSU-Next manager commit) to avoid a
collision in the resolve-sources outputs. Docs table updated.
TheWildJames hai 2 semanas
pai
achega
6533394fe4

+ 2 - 2
.github/actions/root-setup/action.yml

@@ -2,7 +2,7 @@ name: Setup pinned root implementation
 description: Clone exactly one supported root implementation at a verified commit
 inputs:
   flavor:
-    description: 'classic, next, or resukisu'
+    description: 'kernelsu, next, or resukisu'
     required: true
   commit:
     description: 'Full immutable commit SHA'
@@ -20,7 +20,7 @@ runs:
         flavor="${{ inputs.flavor }}"
         expected_commit="${{ inputs.commit }}"
         case "$flavor" in
-          classic)
+          kernelsu)
             repo="https://github.com/tiann/KernelSU.git"
             directory="KernelSU"
             manager="KernelSU Manager"

+ 5 - 5
.github/actions/susfs/action.yml

@@ -21,7 +21,7 @@ inputs:
     description: 'Kernel sublevel'
     required: true
   root_flavor:
-    description: 'Selected root implementation (classic / next / resukisu). Classic KernelSU (tiann main) needs the 10_enable_susfs_for_ksu patch; other flavors already ship SUSFS.'
+    description: 'Selected root implementation (kernelsu / next / resukisu). KernelSU (tiann main) needs the 10_enable_susfs_for_ksu patch; other flavors already ship SUSFS.'
     required: false
     default: ""
   nomount_enabled:
@@ -38,12 +38,12 @@ runs:
         susfs_commit: ${{ inputs.susfs_commit }}
         version: ${{ inputs.version }}
 
-    - name: Enable SUSFS for Classic KernelSU
-      # tiann/KernelSU main does NOT carry SUSFS, so for the classic flavor we
+    - name: Enable SUSFS for KernelSU (tiann)
+      # tiann/KernelSU main does NOT carry SUSFS, so for the kernelsu flavor we
       # apply the enable patch from susfs4ksu onto the KernelSU checkout.
       # pershoot dev-susfs (next) and ReSukiSU already include SUSFS, so this is
       # a no-op for those flavors.
-      if: inputs.root_flavor == 'classic'
+      if: inputs.root_flavor == 'kernelsu'
       shell: bash
       working-directory: ${{ github.workspace }}/kernel/KernelSU
       run: |
@@ -53,7 +53,7 @@ runs:
           echo "Missing 10_enable_susfs_for_ksu.patch at $PATCH" >&2
           exit 1
         fi
-        echo "Applying SUSFS enable patch to classic KernelSU checkout (kernel/KernelSU/kernel)"
+        echo "Applying SUSFS enable patch to KernelSU (tiann) checkout (kernel/KernelSU/kernel)"
         patch -p1 < "$PATCH"
 
     - name: Enable SUSFS Kernel Configs

+ 1 - 1
.github/scripts/update_verified_pins.py

@@ -20,7 +20,7 @@ MAIN = os.path.join(REPO, ".github/workflows/main.yml")
 # approval env is "1"/"true" when the component was enabled and all its builds passed.
 PINS = [
     ("PIN_NOMOUNT", "NOMOUNT_SHA", "APPROVE_NOMOUNT"),
-    ("PIN_CLASSIC", "CLASSIC_SHA", "APPROVE_CLASSIC"),
+    ("PIN_KERNELSU", "KERNELSU_SHA", "APPROVE_KERNELSU"),
     ("PIN_RESUKISU", "RESUKISU_SHA", "APPROVE_RESUKISU"),
     ("PIN_SUSFS[susfs_commit_android12_5_10]", "SUSFS_ANDROID12_5_10_SHA", "APPROVE_SUSFS_ANDROID12_5_10"),
     ("PIN_SUSFS[susfs_commit_android13_5_10]", "SUSFS_ANDROID13_5_10_SHA", "APPROVE_SUSFS_ANDROID13_5_10"),

+ 18 - 17
.github/workflows/main.yml

@@ -147,7 +147,7 @@ jobs:
       susfs_commit_android14_6_1: ${{ steps.resolve.outputs.susfs_commit_android14_6_1 }}
       susfs_commit_android15_6_6: ${{ steps.resolve.outputs.susfs_commit_android15_6_6 }}
       susfs_commit_android16_6_12: ${{ steps.resolve.outputs.susfs_commit_android16_6_12 }}
-      classic_commit: ${{ steps.resolve.outputs.classic_commit }}
+      ksu_commit: ${{ steps.resolve.outputs.ksu_commit }}
       resukisu_commit: ${{ steps.resolve.outputs.resukisu_commit }}
       kernel_patches_commit: ${{ steps.resolve.outputs.kernel_patches_commit }}
       anykernel3_commit: ${{ steps.resolve.outputs.anykernel3_commit }}
@@ -163,7 +163,7 @@ jobs:
 
           # Commit resolution mode. 'latest' (default) resolves branch tips at
           # run time via git ls-remote. 'verified' uses the audited pins below for
-          # NoMount, classic/resukisu roots, and SUSFS; KernelSU-Next stays latest.
+          # NoMount, kernelsu/resukisu roots, and SUSFS; KernelSU-Next stays latest.
           COMMIT_MODE="${{ inputs.commit_mode }}"
           echo "commit_mode=${COMMIT_MODE}"
 
@@ -192,7 +192,7 @@ jobs:
 
           # Audited pins (from root-variants.yml). Used only when commit_mode=verified.
           PIN_NOMOUNT="c52936b229c25a4b0e41b6627f7d3bc5eaaaf2b5"
-          PIN_CLASSIC="da9abf498a77d438989fea0f5f4e348b9a540c07"
+          PIN_KERNELSU="da9abf498a77d438989fea0f5f4e348b9a540c07"
           PIN_RESUKISU="3ef06b0fcb0960dc9563256fe26a58e892663387"
           declare -A PIN_SUSFS=(
             [susfs_commit_android12_5_10]="3c14ad549f826b1f53878ec8c12253efebeed75a"
@@ -224,14 +224,14 @@ jobs:
 
           # Selected root implementation(s). Maps the human-facing choice
           # (KernelSU-Next / KernelSU / ReSukiSU / All) to internal root-setup
-          # flavors (next / classic / resukisu). Every build always has a root;
+          # flavors (next / kernelsu / resukisu). Every build always has a root;
           # 'All' emits a matrix of all three root flavors plus each pinned commit.
           #
-          # classic and resukisu pin in verified mode; KernelSU-Next (next) always
+          # kernelsu and resukisu pin in verified mode; KernelSU-Next (next) always
           # builds at latest.
-          CLASSIC_COMMIT="$(pick "$PIN_CLASSIC" https://github.com/tiann/KernelSU.git refs/heads/main)"
+          KERNELSU_COMMIT="$(pick "$PIN_KERNELSU" https://github.com/tiann/KernelSU.git refs/heads/main)"
           RESUKISU_COMMIT="$(pick "$PIN_RESUKISU" https://github.com/ReSukiSU/ReSukiSU.git refs/heads/main)"
-          emit classic_commit "$CLASSIC_COMMIT"
+          emit ksu_commit "$KERNELSU_COMMIT"
           emit resukisu_commit "$RESUKISU_COMMIT"
           if [ "${{ inputs.use_susfs }}" = "true" ]; then
             NEXT_COMMIT="$(resolve_sha https://github.com/pershoot/KernelSU-Next.git refs/heads/dev-susfs)"
@@ -245,9 +245,9 @@ jobs:
 
           case "${{ inputs.root_flavor }}" in
             KernelSU)
-              emit root_flavor "classic"
-              emit root_commit "$CLASSIC_COMMIT"
-              ROOT_MATRIX="[$(mk_entry classic KernelSU "$CLASSIC_COMMIT")]"
+              emit root_flavor "kernelsu"
+              emit root_commit "$KERNELSU_COMMIT"
+              ROOT_MATRIX="[$(mk_entry kernelsu KernelSU "$KERNELSU_COMMIT")]"
               ;;
             KernelSU-Next)
               emit root_flavor "next"
@@ -261,7 +261,7 @@ jobs:
               ;;
             All)
               # Fan out to all three root variants, each with its pinned commit.
-              ROOT_MATRIX="[$(mk_entry next KernelSU-Next "$NEXT_COMMIT"),$(mk_entry classic KernelSU "$CLASSIC_COMMIT"),$(mk_entry resukisu ReSukiSU "$RESUKISU_COMMIT")]"
+              ROOT_MATRIX="[$(mk_entry next KernelSU-Next "$NEXT_COMMIT"),$(mk_entry kernelsu KernelSU "$KERNELSU_COMMIT"),$(mk_entry resukisu ReSukiSU "$RESUKISU_COMMIT")]"
               echo "root_flavor=" >> "$GITHUB_OUTPUT"
               echo "root_commit=" >> "$GITHUB_OUTPUT"
               ;;
@@ -302,7 +302,7 @@ jobs:
 
           # Each selected root must ship ALL manager APK builds. KernelSU-Next publishes
           # its manager APKs (manager + manager-spoofed) from the official dev-tip
-          # build-manager-ci run; classic KernelSU and ReSukiSU expose theirs as
+          # build-manager-ci run; kernelsu (KernelSU) and ReSukiSU expose theirs as
           # CI-run artifacts. All three are pinned to an exact commit.
           resolve_one() { # flavor
             local flavor="$1"
@@ -323,7 +323,8 @@ jobs:
                 printf '{"flavor":"%s","owner":"%s","repo":"%s","source":"run","run_id":%s,"stock":"%s","want":"manager,manager-spoofed"}' \
                   "$flavor" "$owner" "$repo" "$run_id" "$stock"
                 ;;
-              classic)
+
+              kernelsu)
                 owner="tiann"; repo="KernelSU"; wf="build-manager.yml"
                 stock=$(git ls-remote https://github.com/tiann/KernelSU.git refs/heads/main | awk '{print $1; exit}')
                 run_id=$(curl -fsSL --retry 5 --retry-delay 5 --retry-all-errors \
@@ -360,9 +361,9 @@ jobs:
           echo "Root flavor: ${FLAVORS}"
           LIST=""
           case "${FLAVORS}" in
-            All) LIST="$(resolve_one next),$(resolve_one classic),$(resolve_one resukisu)" ;;
+            All) LIST="$(resolve_one next),$(resolve_one kernelsu),$(resolve_one resukisu)" ;;
             KernelSU-Next) LIST="$(resolve_one next)" ;;
-            KernelSU) LIST="$(resolve_one classic)" ;;
+            KernelSU) LIST="$(resolve_one kernelsu)" ;;
             ReSukiSU) LIST="$(resolve_one resukisu)" ;;
             *) echo "Skipping manager resolution (no root flavor / none)." ;;
           esac
@@ -803,7 +804,7 @@ jobs:
       env:
         GH_TOKEN: ${{ github.token }}
         NOMOUNT_SHA: ${{ needs.resolve-sources.outputs.nomount_commit }}
-        CLASSIC_SHA: ${{ needs.resolve-sources.outputs.classic_commit }}
+        KERNELSU_SHA: ${{ needs.resolve-sources.outputs.ksu_commit }}
         RESUKISU_SHA: ${{ needs.resolve-sources.outputs.resukisu_commit }}
         SUSFS_ANDROID12_5_10_SHA: ${{ needs.resolve-sources.outputs.susfs_commit_android12_5_10 }}
         SUSFS_ANDROID13_5_10_SHA: ${{ needs.resolve-sources.outputs.susfs_commit_android13_5_10 }}
@@ -813,7 +814,7 @@ jobs:
         SUSFS_ANDROID15_6_6_SHA: ${{ needs.resolve-sources.outputs.susfs_commit_android15_6_6 }}
         SUSFS_ANDROID16_6_12_SHA: ${{ needs.resolve-sources.outputs.susfs_commit_android16_6_12 }}
         APPROVE_NOMOUNT: ${{ inputs.use_nomount }}
-        APPROVE_CLASSIC: ${{ (inputs.root_flavor == 'KernelSU' || inputs.root_flavor == 'All') }}
+        APPROVE_KERNELSU: ${{ (inputs.root_flavor == 'KernelSU' || inputs.root_flavor == 'All') }}
         APPROVE_RESUKISU: ${{ (inputs.root_flavor == 'ReSukiSU' || inputs.root_flavor == 'All') }}
         APPROVE_SUSFS_ANDROID12_5_10: ${{ inputs.use_susfs && (inputs.kernel_build_version == 'All' || inputs.kernel_build_version == 'android12-5.10') }}
         APPROVE_SUSFS_ANDROID13_5_10: ${{ inputs.use_susfs && (inputs.kernel_build_version == 'All' || inputs.kernel_build_version == 'android13-5.10') }}

+ 1 - 1
.github/workflows/prepare.yml

@@ -22,7 +22,7 @@ on:
         type: string
         default: ""
       root_flavor:
-        description: "Mutually exclusive root implementation (classic, next, or resukisu)"
+        description: "Mutually exclusive root implementation (kernelsu, next, or resukisu)"
         required: false
         type: string
         default: ""

+ 7 - 7
.github/workflows/root-variants.yml

@@ -41,7 +41,7 @@ jobs:
       config_file: ${{ steps.pins.outputs.config_file }}
       susfs_commit: ${{ steps.pins.outputs.susfs_commit }}
       nomount_commit: ${{ steps.pins.outputs.nomount_commit }}
-      classic_commit: ${{ steps.pins.outputs.classic_commit }}
+      ksu_commit: ${{ steps.pins.outputs.ksu_commit }}
       next_commit: ${{ steps.pins.outputs.next_commit }}
       resukisu_commit: ${{ steps.pins.outputs.resukisu_commit }}
     steps:
@@ -50,7 +50,7 @@ jobs:
         run: |
           set -euo pipefail
           nomount_commit="c52936b229c25a4b0e41b6627f7d3bc5eaaaf2b5"
-          classic_commit="da9abf498a77d438989fea0f5f4e348b9a540c07"
+          ksu_commit="da9abf498a77d438989fea0f5f4e348b9a540c07"
           next_commit="234f6e040fcbca18b16d2398e1aa225712ec99ad"
           resukisu_commit="3ef06b0fcb0960dc9563256fe26a58e892663387"
           case "${{ inputs.kernel_build_version }}" in
@@ -67,14 +67,14 @@ jobs:
             echo "Resolving latest branch tips..."
             susfs_commit="$(git ls-remote https://gitlab.com/simonpunk/susfs4ksu.git "refs/heads/gki-${{ inputs.kernel_build_version }}" | cut -f1)"
             nomount_commit="$(git ls-remote https://github.com/maxsteeel/nomount.git refs/heads/dev | cut -f1)"
-            classic_commit="$(git ls-remote https://github.com/tiann/KernelSU.git refs/heads/main | cut -f1)"
+            ksu_commit="$(git ls-remote https://github.com/tiann/KernelSU.git refs/heads/main | cut -f1)"
             next_commit="$(git ls-remote https://github.com/KernelSU-Next/KernelSU-Next.git refs/heads/dev | cut -f1)"
             resukisu_commit="$(git ls-remote https://github.com/ReSukiSU/ReSukiSU.git refs/heads/main | cut -f1)"
           fi
           echo "config_file=.github/config/${{ inputs.kernel_build_version }}.json" >> "$GITHUB_OUTPUT"
           echo "susfs_commit=$susfs_commit" >> "$GITHUB_OUTPUT"
           echo "nomount_commit=$nomount_commit" >> "$GITHUB_OUTPUT"
-          echo "classic_commit=$classic_commit" >> "$GITHUB_OUTPUT"
+          echo "ksu_commit=$ksu_commit" >> "$GITHUB_OUTPUT"
           echo "next_commit=$next_commit" >> "$GITHUB_OUTPUT"
           echo "resukisu_commit=$resukisu_commit" >> "$GITHUB_OUTPUT"
 
@@ -103,9 +103,9 @@ jobs:
       fail-fast: false
       matrix:
         include:
-          - flavor: classic
-            commit: ${{ needs.resolve-pins.outputs.classic_commit }}
-            variant: Classic-KernelSU
+          - flavor: kernelsu
+            commit: ${{ needs.resolve-pins.outputs.ksu_commit }}
+            variant: KernelSU
           - flavor: next
             commit: ${{ needs.resolve-pins.outputs.next_commit }}
             variant: KernelSU-Next

+ 1 - 1
docs/ROOT_VARIANTS.md

@@ -5,7 +5,7 @@ three separate source trees and never combines root implementations:
 
 | Variant | Upstream | Pinned commit |
 | --- | --- | --- |
-| Classic KernelSU | `tiann/KernelSU` | `da9abf498a77d438989fea0f5f4e348b9a540c07` |
+| KernelSU | `tiann/KernelSU` | `da9abf498a77d438989fea0f5f4e348b9a540c07` |
 | KernelSU Next | `KernelSU-Next/KernelSU-Next` `dev` | `234f6e040fcbca18b16d2398e1aa225712ec99ad` |
 | ReSukiSU | `ReSukiSU/ReSukiSU` | `3ef06b0fcb0960dc9563256fe26a58e892663387` |
 | NoMount | `maxsteeel/nomount` `dev` | `c52936b229c25a4b0e41b6627f7d3bc5eaaaf2b5` |