Browse Source

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 năm trước cách đây
mục cha
commit
e531cd70d8
2 tập tin đã thay đổi với 18 bổ sung6 xóa
  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