mirror of
https://github.com/WildKernels/OnePlus_KernelSU_SUSFS.git
synced 2026-11-17 19:49:26 +00:00
Replace the per-KMI fake_patched/fake_patched2/fake_patched_expand bash flags (grep/sed/perl one-liners) with a declarative, idempotent Python compatibility layer: - scripts/fix_susfs_compatibility_patches.py: stage1/stage2 driver with Target (KMI + sublevel range) matching, Rule-based dispatch, and comment/string-literal-aware brace scanning (BraceScope) for safely scoping edits to a single function body. - scripts/README.md: full usage guide and Edit-type reference. - tests/test_susfs_compat.py, tests/test_rules_integration.py: unit and integration coverage for the primitives and the real RULES tuple. Workflow changes: - stage 1 now runs before the main SUSFS patch, stage 2 after it; `patch -p1` invocations remain in the workflow shell, never in Python. - main patch is applied via dry-run-then-apply instead of applying for real and patching over .rej files. - fold_fixup_entries.patch application stays in-workflow, gated on the same header-presence check as before. - compat state is written to $RUNNER_TEMP, keyed per KMI, so stage 2 can tell which stage-1 edits actually fired without relying on remembered line numbers/offsets. All existing fake_patched*-gated edits were ported to Rule entries with their original sublevel gates preserved (zswap <=57, dma-buf <=92, vma-block-expand/pagemap-locals <=30, swap-slots >=123). Previously ungated edits (android14-6.1 trace/hooks/blk.h, android13-5.15 trace/hooks/mm.h, dma-buf on android14-6.1) were added as new Rules since they existed in bash but were missing from the first pass of the Python port. |
History
|
|
|---|---|---|
| .. | ||
| actions | ||
| ISSUE_TEMPLATE | ||
| workflows | ||