Sfoglia il codice sorgente

feat(workflows): enhance reject file handling in build process

TheWildJames 3 mesi fa
parent
commit
bb6817cf68
2 ha cambiato i file con 17 aggiunte e 2 eliminazioni
  1. 3 2
      .github/actions/susfs/action.yml
  2. 14 0
      .github/workflows/main.yml

+ 3 - 2
.github/actions/susfs/action.yml

@@ -157,6 +157,7 @@ runs:
         if [ "${{ inputs.sublevel }}" -le "30" ]; then
           echo "Applying taskmmu.c Android 15 6.6 Fake Patch"
           sed -i '/smap_gather_stats(vma, &mss, last_vma_end);/a\last_vma_end = vma->vm_end;' fs/proc/task_mmu.c
+          sed -i '0,/last_vma_end = vma->vm_end;/{s/last_vma_end = vma->vm_end;/\t\t\t\t&/}' fs/proc/task_mmu.c
         fi
         if [ "${{ inputs.sublevel }}" -le "92" ]; then
           echo "Applying base.c Android 15 6.6 Fake Patch"
@@ -177,9 +178,9 @@ runs:
           echo "Applying exec.c Android 16 6.12 Fake Patch"
           sed -i '/^#include <linux\/dma-buf.h>$/d' fs/exec.c
         fi
-        if [ "${{ inputs.sublevel }}" -ge "69" ]; then
+        if [ "${{ inputs.sublevel }}" -ge "9999" ]; then
           echo "Applying task_mmu.c Android 16 6.12 Fake Patch"
-          sed -i 's/vma_pages/vma_data_pages/g' fs/proc/task_mmu.c
+          sed -i 's/vma_data_pages/vma_pages/g' fs/proc/task_mmu.c
         fi
 
     - name: Apply Kernel SUSFS Patches

+ 14 - 0
.github/workflows/main.yml

@@ -161,6 +161,20 @@ jobs:
 
             dirname=$(basename "$dir")
             original_name=${dirname%-Rejects}
+            source_dir="$dir"
+
+            if [ -d "$dir/patch-rejects" ]; then
+              source_dir="$dir/patch-rejects"
+            fi
+
+            mapfile -t rej_files < <(find "$source_dir" -type f -name '*.rej' | sort)
+            if [ "${#rej_files[@]}" -eq 1 ]; then
+              rel_rej="${rej_files[0]#${source_dir}/}"
+              if [ "$rel_rej" = "common/mm/rmap.c.rej" ]; then
+                echo "Skipping $dirname because it only contains common/mm/rmap.c.rej"
+                continue
+              fi
+            fi
 
             mkdir -p "aio-rejects/$original_name"