Skip to content

Commit 9092a2a

Browse files
committed
app_sms: Apply experimental patch.
Test build
1 parent adab607 commit 9092a2a

File tree

4 files changed

+29
-259
lines changed

4 files changed

+29
-259
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 258 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CI
22

33
on:
44
push:
5-
branches: [ master, dev ]
5+
branches: [ master, dev, fedora ]
66
pull_request:
77
branches: [ master ]
88
# Retest weekly to ensure nothing has broken
@@ -13,200 +13,6 @@ on:
1313
workflow_dispatch:
1414

1515
jobs:
16-
dahdi-kernel-stable:
17-
runs-on: ubuntu-24.04
18-
name: DAHDI, stable kernel
19-
container: debian:12
20-
strategy:
21-
fail-fast: false
22-
matrix:
23-
kernel_branch: [
24-
'linux-4.14.y',
25-
'linux-4.19.y',
26-
'linux-5.4.y',
27-
'linux-5.10.y',
28-
'linux-5.15.y',
29-
'linux-5.17.y',
30-
'linux-5.18.y',
31-
'linux-5.19.y',
32-
'linux-6.1.y',
33-
'linux-6.5.y',
34-
'linux-6.6.y',
35-
'linux-6.7.y',
36-
'linux-6.8.y',
37-
'linux-6.9.y',
38-
'linux-6.10.y',
39-
'linux-6.11.y',
40-
'linux-rolling-lts',
41-
'linux-rolling-stable'
42-
]
43-
steps:
44-
- name: Install packages
45-
run: |
46-
apt-get -y update
47-
apt-get -y upgrade
48-
apt-get -y install git gcc make perl-modules flex bison wget libssl-dev libelf-dev bc
49-
- name: Clone kernel
50-
run: |
51-
cd /usr/src
52-
git clone --depth 1 --branch ${{matrix.kernel_branch}} git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
53-
- name: Build kernel
54-
run: |
55-
cd /usr/src/linux
56-
make -j$(nproc) kernelversion
57-
make -j$(nproc) x86_64_defconfig
58-
make -j$(nproc) modules_prepare
59-
make -j$(nproc)
60-
make -j$(nproc) modules
61-
- name: Checkout
62-
uses: actions/checkout@v4
63-
- name: Build DAHDI
64-
run: |
65-
./phreaknet.sh make
66-
GIT_REPO_PATH=${GITHUB_WORKSPACE} KSRC=/usr/src/linux phreaknet dahdi --drivers
67-
dahdi-kernel-mainline:
68-
runs-on: ubuntu-24.04
69-
name: DAHDI, mainline kernel
70-
container: debian:12
71-
steps:
72-
- name: Install packages
73-
run: |
74-
apt-get -y update
75-
apt-get -y upgrade
76-
apt-get -y install git gcc make perl-modules flex bison wget libssl-dev libelf-dev bc
77-
- name: Clone kernel
78-
run: |
79-
cd /usr/src
80-
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
81-
- name: Build kernel
82-
run: |
83-
cd /usr/src/linux
84-
make -j$(nproc) kernelversion
85-
make -j$(nproc) x86_64_defconfig
86-
make -j$(nproc) modules_prepare
87-
make -j$(nproc)
88-
make -j$(nproc) modules
89-
- name: Checkout
90-
uses: actions/checkout@v4
91-
- name: Build DAHDI
92-
run: |
93-
./phreaknet.sh make
94-
GIT_REPO_PATH=${GITHUB_WORKSPACE} KSRC=/usr/src/linux phreaknet dahdi --drivers
95-
dahdi-kernel-next:
96-
runs-on: ubuntu-24.04
97-
name: DAHDI, next kernel
98-
container: debian:12
99-
steps:
100-
- name: Install packages
101-
run: |
102-
apt-get -y update
103-
apt-get -y upgrade
104-
apt-get -y install git gcc make perl-modules flex bison wget libssl-dev libelf-dev bc
105-
- name: Clone kernel
106-
run: |
107-
cd /usr/src
108-
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
109-
- name: Build kernel
110-
run: |
111-
cd /usr/src/linux-next
112-
make -j$(nproc) kernelversion
113-
make -j$(nproc) x86_64_defconfig
114-
make -j$(nproc) modules_prepare
115-
make -j$(nproc)
116-
make -j$(nproc) modules
117-
- name: Checkout
118-
uses: actions/checkout@v4
119-
- name: Build DAHDI
120-
run: |
121-
./phreaknet.sh make
122-
GIT_REPO_PATH=${GITHUB_WORKSPACE} KSRC=/usr/src/linux-next phreaknet dahdi --drivers
123-
ubuntu-latest:
124-
runs-on: ubuntu-24.04
125-
name: Ubuntu 24.04
126-
steps:
127-
- name: Checkout
128-
uses: actions/checkout@v4
129-
- name: Build DAHDI and Asterisk
130-
run: |
131-
sudo ./phreaknet.sh make
132-
sudo GIT_REPO_PATH=${{ github.workspace }} phreaknet install --fast --dahdi --drivers --devmode --sip
133-
ubuntu-stable:
134-
runs-on: ubuntu-22.04
135-
name: Ubuntu 22.04
136-
steps:
137-
- name: Checkout
138-
uses: actions/checkout@v4
139-
- name: Build DAHDI and Asterisk
140-
run: |
141-
sudo ./phreaknet.sh make
142-
# Environment variables don't carry through with sudo
143-
sudo GIT_REPO_PATH=${{ github.workspace }} phreaknet install --fast --dahdi --drivers --devmode --sip
144-
debian-stable-asterisk-lts:
145-
runs-on: ubuntu-24.04
146-
name: Debian 12, Asterisk 20
147-
container: debian:12
148-
steps:
149-
- uses: actions/checkout@v4
150-
- name: Build DAHDI and Asterisk
151-
run: |
152-
./phreaknet.sh make
153-
GIT_REPO_PATH=${GITHUB_WORKSPACE} phreaknet install --fast --dahdi --drivers --sip --testsuite --version=20
154-
- name: Run tests
155-
run: |
156-
phreaknet runtests
157-
debian-stable-asterisk-latest:
158-
runs-on: ubuntu-24.04
159-
name: Debian 12
160-
container: debian:12
161-
steps:
162-
- uses: actions/checkout@v4
163-
- name: Build DAHDI and Asterisk
164-
run: |
165-
./phreaknet.sh make
166-
GIT_REPO_PATH=${GITHUB_WORKSPACE} phreaknet install --fast --dahdi --drivers --sip --testsuite
167-
- name: Run tests
168-
run: |
169-
phreaknet runtests
170-
debian-stable-asterisk-latest-unpatched:
171-
runs-on: ubuntu-24.04
172-
name: Debian 12, vanilla Asterisk
173-
container: debian:12
174-
steps:
175-
- uses: actions/checkout@v4
176-
- name: Build DAHDI and Asterisk
177-
run: |
178-
./phreaknet.sh make
179-
GIT_REPO_PATH=${GITHUB_WORKSPACE} phreaknet install --fast --dahdi --devmode --sip --vanilla --user=asterisk
180-
debian-stable-asterisk-master:
181-
runs-on: ubuntu-24.04
182-
name: Debian 12, Asterisk master branch
183-
container: debian:12
184-
steps:
185-
- uses: actions/checkout@v4
186-
- name: Build DAHDI and Asterisk
187-
run: |
188-
./phreaknet.sh make
189-
GIT_REPO_PATH=${GITHUB_WORKSPACE} phreaknet install --fast --dahdi --drivers --sip --testsuite --version=master
190-
debian-dahdi-minimal:
191-
runs-on: ubuntu-24.04
192-
name: Debian 12, without libpri and libss7
193-
container: debian:12
194-
steps:
195-
- uses: actions/checkout@v4
196-
- name: Build DAHDI (without libpri or libss7) and Asterisk (chan_dahdi)
197-
run: |
198-
./phreaknet.sh make
199-
GIT_REPO_PATH=${GITHUB_WORKSPACE} INSTALL_LIBPRI=0 INSTALL_LIBSS7=0 phreaknet install --fast --dahdi --autokvers --drivers --devmode --lightweight --vanilla
200-
alpine-linux:
201-
runs-on: ubuntu-24.04
202-
name: Alpine Linux
203-
container: alpine:latest
204-
steps:
205-
- uses: actions/checkout@v4
206-
- name: Build DAHDI and Asterisk
207-
run: |
208-
./phreaknet.sh make
209-
GIT_REPO_PATH=${GITHUB_WORKSPACE} phreaknet install --fast --dahdi --autokvers --drivers --devmode
21016
fedora-42:
21117
runs-on: ubuntu-24.04
21218
name: Fedora 42
@@ -217,66 +23,3 @@ jobs:
21723
run: |
21824
./phreaknet.sh make
21925
GIT_REPO_PATH=${GITHUB_WORKSPACE} phreaknet install --fast --dahdi --autokvers --drivers --devmode
220-
alma-9-5:
221-
runs-on: ubuntu-24.04
222-
name: Alma Linux 9.5
223-
container: almalinux:9.5
224-
steps:
225-
- uses: actions/checkout@v4
226-
- name: Build DAHDI and Asterisk
227-
run: |
228-
./phreaknet.sh make
229-
GIT_REPO_PATH=${GITHUB_WORKSPACE} phreaknet install --fast --dahdi --autokvers --drivers --devmode
230-
rocky-9:
231-
runs-on: ubuntu-24.04
232-
name: Rocky Linux 9.3
233-
container: rockylinux:9.3
234-
steps:
235-
- uses: actions/checkout@v4
236-
- name: Build DAHDI and Asterisk
237-
run: |
238-
./phreaknet.sh make
239-
GIT_REPO_PATH=${GITHUB_WORKSPACE} phreaknet install --fast --dahdi --autokvers --drivers --devmode
240-
rocky-8:
241-
runs-on: ubuntu-24.04
242-
name: Rocky Linux 8.9
243-
container: rockylinux:8.9
244-
steps:
245-
- uses: actions/checkout@v4
246-
- name: Build DAHDI and Asterisk
247-
run: |
248-
./phreaknet.sh make
249-
GIT_REPO_PATH=${GITHUB_WORKSPACE} phreaknet install --fast --dahdi --autokvers --drivers --devmode
250-
opensuse:
251-
runs-on: ubuntu-24.04
252-
name: openSUSE Tumbleweed
253-
container: opensuse/tumbleweed
254-
steps:
255-
- uses: actions/checkout@v4
256-
- name: Build Asterisk
257-
run: |
258-
./phreaknet.sh make
259-
GIT_REPO_PATH=${GITHUB_WORKSPACE} phreaknet install --fast --devmode --sip
260-
archlinux:
261-
runs-on: ubuntu-24.04
262-
name: Arch Linux
263-
container: archlinux:latest
264-
steps:
265-
- uses: actions/checkout@v4
266-
- name: Build DAHDI and Asterisk
267-
run: |
268-
./phreaknet.sh make
269-
GIT_REPO_PATH=${GITHUB_WORKSPACE} phreaknet install --fast --dahdi --drivers --devmode --sip
270-
# FreeBSD CI disabled since libuuid headers can't get installed in CI?
271-
# freebsd-14:
272-
# runs-on: ubuntu-24.04
273-
# name: FreeBSD
274-
# steps:
275-
# - uses: actions/checkout@v4
276-
# - name: Build Asterisk
277-
# uses: vmactions/freebsd-vm@v1
278-
# with:
279-
# usesh: true
280-
# run: |
281-
# ./phreaknet.sh make
282-
# phreaknet install --fast --devmode --sip

patches/sms.diff

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/apps/app_sms.c b/apps/app_sms.c
2+
index e02e82287e..60f6c6c53d 100644
3+
--- a/apps/app_sms.c
4+
+++ b/apps/app_sms.c
5+
@@ -467,7 +467,7 @@ static int packsms8(unsigned char *o, int udhl, unsigned char *udh, int udl, uns
6+
if (u < 0 || u > 0xFF) {
7+
return -1; /* not valid */
8+
}
9+
- o[p++] = u;
10+
+ o[p++] = (unsigned char) u;
11+
if (p >= SMSLEN_8) {
12+
return p;
13+
}

patches/smsmake.diff

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/apps/Makefile b/apps/Makefile
2+
index 50b3fccc8f..8caa563c89 100644
3+
--- a/apps/Makefile
4+
+++ b/apps/Makefile
5+
@@ -56,6 +56,7 @@ app_voicemail.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION) -DFILE_STORAGE
6+
app_voicemail_odbc.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION) -DODBC_STORAGE
7+
app_voicemail_imap.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION) -DIMAP_STORAGE
8+
app_while.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
9+
+app_sms.o: _ASTCFLAGS+=-fno-tree-vectorize
10+
11+
ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
12+
LIBS+= -lres_ael_share.so -lres_speech.so

phreaknet.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2456,7 +2456,9 @@ phreak_patches() { # $1 = $PATCH_DIR, $2 = $AST_SRC_DIR
24562456
fi
24572457

24582458
## Unmerged patches: remove or switch to asterisk_pr_if once merged
2459-
asterisk_pr_unconditional 1089 # app_sms: Ignore false positive gcc warning
2459+
#asterisk_pr_unconditional 1089 # app_sms: Ignore false positive gcc warning
2460+
#git_custom_patch "https://raw.githubusercontent.com/InterLinked1/phreakscript/refs/heads/fedora/patches/smsmake.diff"
2461+
24602462
#asterisk_pr_unconditional 272 # Call Waiting Deluxe. This also now conflicts (with the latest revisions), so temp. disabled.
24612463
#asterisk_pr_unconditional 292 # GROUP VARs # Disabled temporarily as patch does not apply anymore
24622464
git_patch "dahdicleanup.diff"

0 commit comments

Comments
 (0)