4 Commits 0807a4255b ... 29c6aaa7e2

Autor SHA1 Nachricht Datum
  TheWildJames 29c6aaa7e2 fix(susfs): always enable OPEN_REDIRECT, drop NoMount overlap toggle vor 4 Tagen
  TheWildJames 6868689251 fix(root): enable toolkit support for ReSukiSU vor 4 Tagen
  TheWildJames 0a15d99380 fix(root): disable multi-manager support for ReSukiSU vor 4 Tagen
  TheWildJames e9d4e91c4a chore(actions): remove unreferenced Setup Wild KSU action vor 4 Tagen

+ 0 - 97
.github/actions/kernelsu/action.yml

@@ -1,97 +0,0 @@
-name: Setup Wild KSU
-description: Download and configure Wild KSU with version tracking
-inputs:
-  ksu_branch:
-    description: 'KernelSU branch or commit (empty = latest dev-susfs branch tip)'
-    required: false
-    default: ""
-
-runs:
-  using: composite
-  steps:
-    - name: Download Wild KSU
-      shell: bash
-      working-directory: ${{ github.workspace }}/kernel
-      run: |
-        set -euo pipefail
-
-        # Retry transient network errors (up to 5 attempts, 5s backoff).
-        # Diagnostics go to stderr so pipes to grep are not polluted.
-        retry() {
-          local n=0
-          until [ "$n" -ge 5 ]; do
-            "$@" && return 0
-            n=$((n+1))
-            echo "retry $n/5 failed for: $*" >&2
-            sleep 5
-          done
-          return 1
-        }
-
-        KSU_REPO="https://github.com/pershoot/KernelSU-Next.git"
-        KSU_INPUT="${{ inputs.ksu_branch }}"
-        if [ -z "$KSU_INPUT" ]; then
-          KSU_INPUT="dev-susfs"
-        fi
-
-        # Try as branch first, fall back to commit
-        if retry git ls-remote --heads "$KSU_REPO" "$KSU_INPUT" | grep -q .; then
-          echo "Using KernelSU-Next branch: $KSU_INPUT"
-          curl -LSs --retry 5 --retry-delay 5 --retry-all-errors "https://raw.githubusercontent.com/pershoot/KernelSU-Next/dev-susfs/kernel/setup.sh" | bash -s dev-susfs
-          retry git -C KernelSU-Next/kernel fetch --depth=50 origin "$KSU_INPUT"
-          git -C KernelSU-Next/kernel checkout "origin/$KSU_INPUT"
-        else
-          echo "Using KernelSU-Next commit: $KSU_INPUT"
-          curl -LSs --retry 5 --retry-delay 5 --retry-all-errors "https://raw.githubusercontent.com/pershoot/KernelSU-Next/dev-susfs/kernel/setup.sh" | bash -s dev-susfs
-          retry git -C KernelSU-Next/kernel fetch --depth=50 origin "$KSU_INPUT"
-          git -C KernelSU-Next/kernel checkout "$KSU_INPUT"
-        fi
-
-        cd KernelSU-Next/kernel
-
-        # Anchor the version to the upstream sync point (merge-base with
-        # origin/<base-branch>) exactly like the official manager's
-        # versionCode and pershoot's Kbuild (c0a2c5fd), so the kernel's
-        # KSU_VERSION_FALLBACK matches the manager version the kernel
-        # reports at runtime. Fall back to origin/main, then HEAD.
-        BASE_BRANCH=$(git rev-parse --abbrev-ref HEAD | sed 's:-.*::' 2>/dev/null)
-        BASE_COMMIT=$(git merge-base HEAD refs/remotes/origin/$BASE_BRANCH 2>/dev/null || git merge-base HEAD refs/remotes/origin/main 2>/dev/null || echo HEAD)
-        COMMITS_COUNT=$(/usr/bin/git rev-list --count $BASE_COMMIT)
-        BASE_VERSION=30000
-        KSU_VERSION=$(expr $COMMITS_COUNT "+" $BASE_VERSION)
-        sed -i "s/^KSU_VERSION_FALLBACK := 1$/KSU_VERSION_FALLBACK := ${KSU_VERSION}/" Kbuild
-
-        KSU_GIT_TAG="$(git describe --tags --abbrev=0 $BASE_COMMIT 2>/dev/null || echo "v0.0.1")"
-        sed -i "s/^KSU_VERSION_TAG_FALLBACK := v0.0.1$/KSU_VERSION_TAG_FALLBACK := ${KSU_GIT_TAG}/" Kbuild
-    
-    - name: Extract KSU Version Info
-      id: ksu-version
-      shell: bash
-      working-directory: ${{ github.workspace }}/kernel/KernelSU-Next
-      run: |
-        # Get the base branch name by stripping suffixes (e.g., dev-susfs -> dev)
-        BASE_BRANCH=$(git rev-parse --abbrev-ref HEAD | sed 's:-.*::' 2>/dev/null)
-        # Find the merge-base with the official origin branch to exclude local commits
-        BASE_COMMIT=$(git merge-base HEAD refs/remotes/origin/$BASE_BRANCH 2>/dev/null || git merge-base HEAD refs/remotes/origin/main 2>/dev/null || echo HEAD)
-        KSU_GIT_VERSION=$(git rev-list --count $BASE_COMMIT 2>/dev/null)
-        KSU_GIT_TAG=$(git describe --tags --abbrev=0 $BASE_COMMIT 2>/dev/null || echo "")
-        KSU_COMMIT=$(git rev-parse --short HEAD 2>/dev/null)
-        KSU_VERSION=$((30000 + KSU_GIT_VERSION))
-        
-        echo "KSU_GIT_TAG=$KSU_GIT_TAG" >> $GITHUB_ENV
-        echo "KSU_VERSION=$KSU_VERSION" >> $GITHUB_ENV
-        echo "KSU_COMMIT=$KSU_COMMIT" >> $GITHUB_ENV
-
-    - name: 'Fix KernelSU-Next'
-      shell: bash
-      working-directory: ${{ github.workspace }}/kernel/KernelSU-Next
-      run: |
-        set -euo pipefail
-        cp ${{ github.action_path }}/patches/static.patch "${{ github.workspace }}/kernel/KernelSU-Next/static.patch"
-        patch -p1 < static.patch
-
-    - name: Enable Kernel Configs
-      uses: ./.github/actions/set-kernel-config
-      with:
-        config_list: |
-          CONFIG_KSU=y

+ 0 - 23
.github/actions/kernelsu/patches/static.patch

@@ -1,23 +0,0 @@
-diff --git a/kernel/feature/selinux_hide.c b/kernel/feature/selinux_hide.c
-index e1384d9..56e4cfe 100644
---- a/kernel/feature/selinux_hide.c
-+++ b/kernel/feature/selinux_hide.c
-@@ -35,12 +35,12 @@ bool ksu_selinux_hide_enabled __read_mostly = false;
- bool ksu_selinux_hide_running __read_mostly = false;
- 
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0)
--static int security_context_to_sid_with_policy(struct selinux_policy *policy, const char *scontext, u32 scontext_len,
--                                               u32 *sid, u32 def_sid, gfp_t gfp_flags);
--static int security_sid_to_context_with_policy(struct selinux_policy *policy, u32 sid, char **scontext,
--                                               u32 *scontext_len);
--static void security_compute_av_user_with_policy(struct selinux_policy *policy, u32 ssid, u32 tsid, u16 tclass,
--                                                 struct av_decision *avd);
-+int security_context_to_sid_with_policy(struct selinux_policy *policy, const char *scontext, u32 scontext_len,
-+                                        u32 *sid, u32 def_sid, gfp_t gfp_flags);
-+int security_sid_to_context_with_policy(struct selinux_policy *policy, u32 sid, char **scontext,
-+                                        u32 *scontext_len);
-+void security_compute_av_user_with_policy(struct selinux_policy *policy, u32 ssid, u32 tsid, u16 tclass,
-+                                          struct av_decision *avd);
- static void (*security_dump_masked_av_fn)(struct policydb *policydb, struct context *scontext, struct context *tcontext,
-                                           u16 tclass, u32 permissions, const char *reason) = NULL;
- static void (*context_struct_compute_av_fn)(struct policydb *policydb, struct context *scontext,

+ 8 - 0
.github/actions/root-setup/action.yml

@@ -102,3 +102,11 @@ runs:
       with:
         config_list: |
           CONFIG_KSU=y
+
+    - name: Disable multi-manager for ReSukiSU
+      if: inputs.flavor == 'resukisu'
+      uses: ./.github/actions/set-kernel-config
+      with:
+        config_list: |
+          CONFIG_KSU_MULTI_MANAGER_SUPPORT=n
+          CONFIG_KSU_TOOLKIT_SUPPORT=y

+ 1 - 19
.github/actions/susfs-config/action.yml

@@ -1,10 +1,5 @@
 name: 'Enable SUSFS Kernel Configs'
 description: 'Enable SUSFS-related kernel configuration options'
-inputs:
-  nomount_enabled:
-    description: 'Set true when NoMount is integrated (disables SUSFS OPEN_REDIRECT to avoid overlapping hook overhead)'
-    required: false
-    default: "false"
 
 runs:
   using: "composite"
@@ -22,17 +17,4 @@ runs:
           CONFIG_KSU_SUSFS_HIDE_KSU_SUSFS_SYMBOLS=y
           CONFIG_KSU_SUSFS_SPOOF_CMDLINE_OR_BOOTCONFIG=y
           CONFIG_KSU_SUSFS_SUS_MAP=y
-
-    - name: Enable SUSFS Open Redirect (no NoMount)
-      if: inputs.nomount_enabled != 'true'
-      uses: ./.github/actions/set-kernel-config
-      with:
-        config_list: |
-          CONFIG_KSU_SUSFS_OPEN_REDIRECT=y
-
-    - name: Disable SUSFS Open Redirect (NoMount integrated)
-      if: inputs.nomount_enabled == 'true'
-      uses: ./.github/actions/set-kernel-config
-      with:
-        config_list: |
-          CONFIG_KSU_SUSFS_OPEN_REDIRECT=n
+          CONFIG_KSU_SUSFS_OPEN_REDIRECT=y

+ 0 - 6
.github/actions/susfs/action.yml

@@ -24,10 +24,6 @@ inputs:
     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:
-    description: 'Set true when NoMount is integrated (disables SUSFS OPEN_REDIRECT to avoid overlapping hook overhead)'
-    required: false
-    default: "false"
 
 runs:
   using: "composite"
@@ -58,8 +54,6 @@ runs:
 
     - name: Enable SUSFS Kernel Configs
       uses: ./.github/actions/susfs-config
-      with:
-        nomount_enabled: ${{ inputs.nomount_enabled }}
 
     - name: Apply SUSFS Patches
       uses: ./.github/actions/susfs-patches

+ 0 - 1
.github/workflows/build.yml

@@ -213,7 +213,6 @@ jobs:
         os_patch_level: ${{ inputs.os_patch_level }}
         sublevel: ${{ steps.extract.outputs.sublevel }}
         root_flavor: ${{ inputs.root_flavor }}
-        nomount_enabled: ${{ contains(inputs.feature_set, 'NoMount') }}
 
     - name: Fix selinux_hide pointer-bool-conversion on 6.6+ (ALL branches)
       shell: bash