Skip to content

Commit c2a4931

Browse files
committed
app_sms: Apply experimental patch.
1 parent ebb07fb commit c2a4931

File tree

4 files changed

+29
-229
lines changed

4 files changed

+29
-229
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 228 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
@@ -16,170 +16,6 @@ on:
1616
# kernel-devel mismatch has been detected. Package provides 6.12.0-0.rc0.20240918git4a39ac5b7d62, but running kernel is 6.8.0-1014-azure
1717

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

24132413
## Unmerged patches: remove or switch to asterisk_pr_if once merged
24142414
asterisk_pr_unconditional 1086 # Fix for Fedora 42 (old style definitions for libdb)
2415-
asterisk_pr_unconditional 1089 # app_sms: Ignore false positive gcc warning
2415+
#asterisk_pr_unconditional 1089 # app_sms: Ignore false positive gcc warning
2416+
git_custom_patch "https://raw.githubusercontent.com/InterLinked1/phreakscript/refs/heads/fedora/patches/smsmake.diff"
2417+
24162418
#asterisk_pr_unconditional 272 # Call Waiting Deluxe. This also now conflicts (with the latest revisions), so temp. disabled.
24172419
#asterisk_pr_unconditional 292 # GROUP VARs # Disabled temporarily as patch does not apply anymore
24182420
git_custom_patch "https://code.phreaknet.org/asterisk/dahdicleanup.diff"

0 commit comments

Comments
 (0)