Jelajahi Sumber

Apply patches via patch tool instead of git

Apply patches via `patch` instead of `git am`. The `patch` tool is more
liberal in accepting patches and allows patches that need relocation of
hunks, whereas git fails in such instances. Using git makes it harder to
maintain these patches accross multiple kernel versions and we would
need to regularly update them.

Commit separately to keep the git source tree clean before building.
Maximilian Luz 5 tahun lalu
induk
melakukan
e531cd70d8
2 mengubah file dengan 18 tambahan dan 6 penghapusan
  1. 9 3
      .github/workflows/debian.yml
  2. 9 3
      .github/workflows/debian_lts.yml

+ 9 - 3
.github/workflows/debian.yml

@@ -43,16 +43,22 @@ jobs:
 
         cd linux
 
-        # apply surface build patches
+        # apply surface build/packaging patches
         for PATCH in ../*.patch; do
-          git am ${PATCH}
+          patch -p1 < ${PATCH}
         done
 
+        git add .
+        git commit --allow-empty -m "Apply linux-surface packaging patches"
+
         # apply surface patches
         for PATCH in ../../../../patches/${KERNEL_VERSION%.*}/*.patch; do
-          git am ${PATCH}
+          patch -p1 < ${PATCH}
         done
 
+        git add .
+        git commit --allow-empty -m "Apply linux-surface patches"
+
     - name: Configure
       run: |
         cd pkg/debian/kernel/linux

+ 9 - 3
.github/workflows/debian_lts.yml

@@ -43,16 +43,22 @@ jobs:
 
         cd linux
 
-        # apply surface build patches
+        # apply surface build/packaging patches
         for PATCH in ../*.patch; do
-          git am ${PATCH}
+          patch -p1 < ${PATCH}
         done
 
+        git add .
+        git commit --allow-empty -m "Apply linux-surface packaging patches"
+
         # apply surface patches
         for PATCH in ../../../../patches/${KERNEL_VERSION%.*}/*.patch; do
-          git am ${PATCH}
+          patch -p1 < ${PATCH}
         done
 
+        git add .
+        git commit --allow-empty -m "Apply linux-surface patches"
+
     - name: Configure
       run: |
         cd pkg/debian/kernel-lts/linux