WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 4a9d705

Browse files
committed
CI: Fix revert of fatal objtool patch due to context change.
The kernel tree has changed enough that a straight revert of kernel commit torvalds/linux@0b10177 now fails (a workaround added in commit 22e8f13). Kernel commit torvalds/linux@5995330 modified the context of the diff used in the revert, and then kernel commit torvalds/linux@5f326c8 completely changed the control flow in a way that makes the revert fail. Use a new diff crafted by hand that undoes the effect of the original patch.
1 parent 0d049ee commit 4a9d705

File tree

2 files changed

+37
-16
lines changed

2 files changed

+37
-16
lines changed

.github/workflows/main.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,12 @@ jobs:
114114
run: |
115115
cd /usr/src
116116
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
117+
- name: Checkout
118+
uses: actions/checkout@v4
117119
- name: Revert objtool patch
118120
run: |
119121
cd /usr/src/linux
120-
curl -f -o "/tmp/objtool.patch" "https://gitlab.com/linux-kernel/linux-next/-/commit/0b10177114d1e434af850b377cf5e6620dd1d525.patch"
121-
patch -u -b -p 1 --reverse -i /tmp/objtool.patch
122+
git apply $GITHUB_WORKSPACE/patches/objtool_check_nonfatal.diff
122123
- name: Build kernel
123124
run: |
124125
cd /usr/src/linux
@@ -127,10 +128,9 @@ jobs:
127128
make -j$(nproc) modules_prepare
128129
make -j$(nproc)
129130
make -j$(nproc) modules
130-
- name: Checkout
131-
uses: actions/checkout@v4
132131
- name: Build DAHDI
133132
run: |
133+
cd $GITHUB_WORKSPACE
134134
./phreaknet.sh make
135135
GIT_REPO_PATH=${GITHUB_WORKSPACE} KSRC=/usr/src/linux phreaknet dahdi --drivers
136136
dahdi-nonfatal-next:
@@ -147,11 +147,12 @@ jobs:
147147
run: |
148148
cd /usr/src
149149
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
150+
- name: Checkout
151+
uses: actions/checkout@v4
150152
- name: Revert objtool patch
151153
run: |
152154
cd /usr/src/linux-next
153-
curl -f -o "/tmp/objtool.patch" "https://gitlab.com/linux-kernel/linux-next/-/commit/0b10177114d1e434af850b377cf5e6620dd1d525.patch"
154-
patch -u -b -p 1 --reverse -i /tmp/objtool.patch
155+
git apply $GITHUB_WORKSPACE/patches/objtool_check_nonfatal.diff
155156
- name: Build kernel
156157
run: |
157158
cd /usr/src/linux-next
@@ -160,10 +161,9 @@ jobs:
160161
make -j$(nproc) modules_prepare
161162
make -j$(nproc)
162163
make -j$(nproc) modules
163-
- name: Checkout
164-
uses: actions/checkout@v4
165164
- name: Build DAHDI
166165
run: |
166+
cd $GITHUB_WORKSPACE
167167
./phreaknet.sh make
168168
GIT_REPO_PATH=${GITHUB_WORKSPACE} KSRC=/usr/src/linux-next phreaknet dahdi --drivers
169169
dahdi-next-fortified:
@@ -180,12 +180,12 @@ jobs:
180180
run: |
181181
cd /usr/src
182182
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
183+
- name: Checkout
184+
uses: actions/checkout@v4
183185
- name: Revert objtool patch
184186
run: |
185187
cd /usr/src/linux-next
186-
dnf -y install patch
187-
curl -f -o "/tmp/objtool.patch" "https://gitlab.com/linux-kernel/linux-next/-/commit/0b10177114d1e434af850b377cf5e6620dd1d525.patch"
188-
patch -u -b -p 1 --reverse -i /tmp/objtool.patch
188+
git apply $GITHUB_WORKSPACE/patches/objtool_check_nonfatal.diff
189189
- name: Build kernel
190190
run: |
191191
cd /usr/src/linux-next
@@ -197,10 +197,9 @@ jobs:
197197
cat .config
198198
make -j$(nproc)
199199
make -j$(nproc) modules
200-
- name: Checkout
201-
uses: actions/checkout@v4
202200
- name: Build DAHDI
203201
run: |
202+
cd $GITHUB_WORKSPACE
204203
./phreaknet.sh make
205204
GIT_REPO_PATH=${GITHUB_WORKSPACE} KSRC=/usr/src/linux-next phreaknet dahdi --drivers
206205
ubuntu-latest:
@@ -294,10 +293,11 @@ jobs:
294293
run: |
295294
./phreaknet.sh make
296295
GIT_REPO_PATH=${GITHUB_WORKSPACE} INSTALL_LIBPRI=0 INSTALL_LIBSS7=0 phreaknet install --fast --dahdi --autokvers --drivers --devmode --lightweight --vanilla
297-
alpine-linux:
296+
alpine-linux-322:
298297
runs-on: ubuntu-24.04
299-
name: Alpine Linux
300-
container: alpine:latest
298+
# Newer versions need the fatal objtool patch reverted, which requires building the kernel... not worth it on Alpine
299+
name: Alpine Linux 3.22
300+
container: alpine:3.22
301301
steps:
302302
- uses: actions/checkout@v4
303303
- name: Build DAHDI and Asterisk
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
2+
index 3f7999317..4b6c8665a 100644
3+
--- a/tools/objtool/check.c
4+
+++ b/tools/objtool/check.c
5+
@@ -5069,9 +5069,6 @@ int check(struct objtool_file *file)
6+
7+
out:
8+
if (ret || warnings) {
9+
- if (opts.werror && warnings)
10+
- ret = 1;
11+
-
12+
if (opts.verbose) {
13+
if (opts.werror && warnings)
14+
WARN("%d warning(s) upgraded to errors", warnings);
15+
@@ -5095,5 +5092,5 @@ int check(struct objtool_file *file)
16+
if (opts.backup && make_backup())
17+
return 1;
18+
19+
- return ret;
20+
+ return opts.werror ? 1 : 0;
21+
}

0 commit comments

Comments
 (0)