-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkernel-60-gitpatch.patch
executable file
·32 lines (31 loc) · 1.23 KB
/
kernel-60-gitpatch.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
diff --git a/PKGBUILD b/PKGBUILD
index 4f08a1c..90a9bb0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,8 +16,8 @@ url="https://www.kernel.org/"
license=('GPL2')
makedepends=(bc docbook-xsl libelf pahole git inetutils kmod xmlto cpio perl tar xz)
options=('!strip')
-source=("https://www.kernel.org/pub/linux/kernel/v6.x/linux-${_basekernel}.tar.xz"
- "https://www.kernel.org/pub/linux/kernel/v6.x/patch-${pkgver}.xz"
+source=("https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-${_basekernel}.tar.xz"
+ "https://cdn.kernel.org/pub/linux/kernel/v6.x/patch-${pkgver}.xz"
'config'
# ARCH Patches
'0101-ZEN_Add_sysctl_and_CONFIG_to_disallow_unprivileged_CLONE_NEWUSER.patch'
@@ -78,9 +78,13 @@ prepare() {
for src in "${source[@]}"; do
src="${src%%::*}"
src="${src##*/}"
- [[ $src = *.patch ]] || continue
- msg2 "Applying patch: $src..."
- patch -Np1 < "../$src"
+ if [[ $src =~ .*\.patch ]]; then
+ msg2 "Applying patch: $src..."
+ patch -Np1 < "../$src"
+ elif [[ $src =~ .*\.gitpatch ]]; then
+ msg2 "Applying gitpatch: $src..."
+ git --git-dir= apply -p1 --stat --apply "../$src"
+ fi
done
msg2 "add config"