connecttech-cti-serial
maintainer severach
· 0 votes
· scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged
The package downloads a source tarball from the official vendor's domain (connecttech.com) for building a kernel driver; this is a normal and legitimate practice for AUR packages, and the host, while not on a standard whitelist, is plausibly the project's own official source.
Triggered rules
LOW
AI review downgraded a static finding
llm_review
The static rules flagged this MEDIUM, but an AI model (qwen/qwen3-235b-a22b-07-25) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The package downloads a source tarball from the official vendor's domain (connecttech.com) for building a kernel driver; this is a normal and legitimate practice for AUR packages, and the host, while not on a standard whitelist, is plausibly the project's own official source.
1 higher static finding superseded - not the current verdict (shown for transparency)
MEDIUM
source=() URL on a non-standard host
source_untrusted_domain
One or more source=() URLs point to a host outside the trusted allowlist (github.com, gitlab.com, codeberg.org, pypi.org, …).
-
PKGBUILD:32
"https://connecttech.com/ftp/dropbox/${_srcdir}.tgz"
PKGBUILD
1 offending line(s) highlighted
1
# Maintainer: Chris Severance aur.severach aATt spamgourmet dott com
2
3
# Todo: remove source file reference (__FILE__?) from cti_serial_core.ko
4
# Todo: driver should only create /dev/ttyCTI* for number of ports found
5
# Todo: make install for utilities
6
# Todo: How do we configure Xtreme/104 with setserial according to readme.txt
7
# Todo: man pages for utilities
8
# Todo: Update Copyright dates on utilities
9
# Todo: Utility readme repeats set485 in setmodem section
10
11
# sudo cat /proc/tty/driver/ctipu
12
13
_opt_DKMS=1 # This can be toggled between installs
14
15
#export KERNELRELEASE="$(basename $(dirname /usr/lib/modules/6.13.*/vmlinuz))"
16
17
set -u
18
pkgname='connecttech-cti-serial'
19
pkgver='1.46'
20
pkgrel='4'
21
pkgdesc='tty UART driver for BlueStorm BlueHeat Xtreme/104-Plus Titan and Xtreme/104-Express families'
22
arch=('i686' 'x86_64')
23
url='https://connecttech.com/product/pci-express-bluestorm-express/'
24
license=('GPL')
25
depends=('glibc')
26
_servicename='cti-serial-set485.service'
27
_etcconf="/etc/${_servicename/.service/.sh}"
28
backup=("${_etcconf#/}")
29
install="${pkgname}-install.sh"
30
_srcdir="cti_serial_${pkgver//./}"
31
source=(
32
"https://connecttech.com/ftp/dropbox/${_srcdir}.tgz"
33
#'0000-kernel-4.18-proc_fops-to-proc_show.patch' # https://patchwork.kernel.org/patch/10349751/
34
#'0001-kernel-5.0.0-8250_core-access_ok.patch' # https://lkml.org/lkml/2019/1/4/418
35
'0002-kernel-5.10-async-initialized.patch'
36
'0003-kernel-5.12-tty-low_latency.patch'
37
'0004-kernel-5.14-task_struct.state-unsigned-tty-flow-tty.patch'
38
'0005-kernel-5.15-alloc_tty_driver-put_tty_driver.patch'
39
'0006-kernel-5.18-bitwise.patch'
40
'0007-kernel-6.0-set_termios-const-ktermios.patch'
41
'0008-kernel-6.3-tty_port_operations-int-to-bool.patch'
42
'0009-kernel-6.6-struct-tty_operations-size_t.patch'
43
'0010-gcc-no-previous-prototype-for-non-static-functions.patch'
44
'0011-kernel-6.8-kernel-4.3-strlcpy-strscpy.patch'
45
'0012-kernel-6.8-tty_driver.h-send_xchar-to-u8.patch'
46
'0013-kernel-6.10-platform_driver-remove-void-return.patch'
47
'0014-kernel-6.13-irq_get_nr_irqs.patch'
48
)
49
md5sums=('6e56f2b93611e4b0f367aec3a430a8f0'
50
'9a93004eac4487957ea4a822cc1167a1'
51
'54ced1c19a3597e087b700d98d63a10c'
52
'd0e427b7def4f2ecbf6a393158f7ce5e'
53
'dd9106c2ff838423791fd9431e8cadda'
54
'68dc760530917337e3c2947899c4c1f9'
55
'782a3a72f5acfa62cc4f8090e4a83cb6'
56
'36113fbb937a070c0e92134782eb71f8'
57
'8e4dd0aa9539f5e87d12b7adbcf653b0'
58
'c2578a9b11295b55beb707c0c76b8f58'
59
'b76bc6e1f0bfe9353e9776c099f73daa'
60
'0c10b25ea11b95873afb29663a657375'
61
'ebe2874c60ae0c9b3b6ad06af269034f'
62
'8ecd628325af9a9015284a0f9569a9b6')
63
sha256sums=('7c1d8ade5e605bc01f80e2ca0705d048b3c83e32e68422b836f32accb436925f'
64
'1f569305d4478a0dd5e1a99f0f76bb39a7d70b3cf2480320fb57a062f0e1141d'
65
'ccbc1d7cc70b7473a8c73609230a3b2fa28235e4f61d70b62049d126e0183449'
66
'cdcd583c804e7c41a60a6d633d8ffb3ac59f6ce4ec50ced95926ca1f2fa62634'
67
'08a3708e08dddb5e6127bdd13b7ad4ea8db539c3226391538c7a875be80e6912'
68
'bcb0eec3c4e7cce8d4a2382f25f0dde7a83693a26792e1244c264582f146dff1'
69
'faa4310269889649d69685a55db48b866d91987321ba03a7083d73b3b9458766'
70
'd3d205486258c0aa181ce87c68e96eb6c19ce69eb1b11da88d39f47ec694cb05'
71
'98d97104dc2e479a1012b52277a875da005d8e5ef0d06b57e8808e5e75e575d1'
72
'8bb68c2d49d4431ebfd3fda3c23d76f76b467854637185311ce93b09a7453df0'
73
'453f6a01b041e6f598b2de4467e3f346aaaa81cac041a5c02315f8b48aaff12a'
74
'24cc0ed9d03806858ebdc34b1d95e3f8b5e18b69753dd489068297c7eae3d3b9'
75
'a20bbf93ba04c297005f8976309601cb267c3a2b1e551a43a477c16348bfc159'
76
'6126618a2199cf06825acb284534a7ebe0a036ea4739bfca64c62d7f13beb840')
77
noextract=("${source[0]##*/}")
78
79
if [ "${_opt_DKMS}" -ne 0 ]; then
80
depends+=('linux' 'dkms' 'linux-headers')
81
else
82
makedepends+=('linux-headers')
83
fi
84
85
# We can't modify .install but we can stop and force the user to fix it.
86
_install_check() {
87
local _ckerrs=0
88
local _ckvar
89
local _ckline
90
local _pkgname="${pkgname}"
91
for _ckvar in _pkgname _servicename _etcconf; do
92
_ckline="$(declare -p ${_ckvar} 2>/dev/null)"
93
_ckline="${_ckline#* }"
94
_ckline="${_ckline#* }"
95
_ckline="${_ckline//\[[0-9]\]=/}" # unenumerate arrays
96
_ckline="${_ckline//\"/\'}"
97
if ! grep -q "^${_ckline}"'$' "${startdir}/${install}"; then
98
set +u
99
if [ "${_ckerrs}" -eq 0 ]; then
100
msg "${install} must be fixed"
101
fi
102
echo "${_ckline}"
103
_ckerrs=$((_ckerrs+1))
104
fi
105
done
106
return "${_ckerrs}"
107
}
108
109
prepare() {
110
set -u
111
_install_check
112
if [ ! -d "${_srcdir}" ]; then
113
mkdir "${_srcdir}"
114
bsdtar -C "${_srcdir}" -xf "${_srcdir}.tgz"
115
fi
116
cd "${_srcdir}"
117
118
rm -rf '.svn'
119
120
#cp -p driver/serial_core.c{,.orig}; false
121
#diff -pNau5 driver/serial_core.c{.orig,} > '0000-kernel-4.18-proc_fops-to-proc_show.patch'
122
#patch -Nup0 -i "${srcdir}/0000-kernel-4.18-proc_fops-to-proc_show.patch"
123
124
#cp -p driver/8250_core.c{,.orig}; false
125
#diff -pNau5 driver/8250_core.c{.orig,} > '0001-kernel-5.0.0-8250_core-access_ok.patch'
126
#patch -Nup0 -i "${srcdir}/0001-kernel-5.0.0-8250_core-access_ok.patch"
127
128
# Kernel 5.6
129
#sed -e 's:ioremap_nocache:ioremap:g' -i 'driver/8250_core.c' 'driver/8250_pci.c'
130
131
# Not compatible with Kernel 4.4 headers
132
#sed -n -e '/^#ifndef __KERNEL__/,/^#endif/ p' "/usr/lib/modules/$(uname -r)/build/include/uapi/linux/tty_flags.h" | sed -e 's:__KERNEL__:ASYNC_INITIALIZED:g' >> 'driver/serial_core_kernel510.h'
133
sed -n -E -e '/ASYNCB_INITIALIZED|ASYNCB_SUSPENDED|ASYNCB_CTS_FLOW|ASYNCB_CHECK_CD|ASYNCB_NORMAL_ACTIVE|ASYNCB_CLOSING/ p' "/usr/lib/modules/$(uname -r)/build/include/uapi/linux/tty_flags.h" >> 'driver/serial_core_kernel510.h'
134
#cp -pr 'driver' 'driver.orig'; false
135
#diff -pNau5 'driver'{.orig,} > '0002-kernel-5.10-async-initialized.patch'
136
patch -Nup1 -i "${srcdir}/0002-kernel-5.10-async-initialized.patch"
137
sed -e '/ArchLinuxPatch-0002-Begin/ r driver/serial_core_kernel510.h' -i 'driver/serial_core.c' 'driver/8250_core.c'
138
rm 'driver/serial_core_kernel510.h'
139
140
local _patches=()
141
_patches+=('0003-kernel-5.12-tty-low_latency.patch')
142
143
# tty.stopped https://lore.kernel.org/lkml/20210505091928.22010-13-jslaby@suse.cz/
144
# unsigned write_room https://www.spinics.net/lists/linux-serial/msg42297.html
145
# unsigned chars_in_buffer https://www.spinics.net/lists/linux-serial/msg42299.html
146
# set_current_state https://linux-kernel.vger.kernel.narkive.com/xnPfKhYP/patch-2-5-52-use-set-current-state-instead-of-current-state-take-1
147
_patches+=('0004-kernel-5.14-task_struct.state-unsigned-tty-flow-tty.patch')
148
149
# http://lkml.iu.edu/hypermail/linux/kernel/2107.2/08799.html [PATCH 5/8] tty: drop alloc_tty_driver
150
# http://lkml.iu.edu/hypermail/linux/kernel/2107.2/08801.html [PATCH 7/8] tty: drop put_tty_driver
151
_patches+=('0005-kernel-5.15-alloc_tty_driver-put_tty_driver.patch')
152
_patches+=('0006-kernel-5.18-bitwise.patch')
153
_patches+=('0007-kernel-6.0-set_termios-const-ktermios.patch') # https://lore.kernel.org/linux-arm-kernel/20220816115739.10928-9-ilpo.jarvinen@linux.intel.com/T/
154
_patches+=('0008-kernel-6.3-tty_port_operations-int-to-bool.patch')
155
_patches+=('0009-kernel-6.6-struct-tty_operations-size_t.patch')
156
if :; then
157
_patches+=('0010-gcc-no-previous-prototype-for-non-static-functions.patch')
158
_fn_pt_0010() {
159
sed -Ene '/ARCH_LINUX_HCLIP_BEGIN/,/ARCH_LINUX_HCLIP_END/ p' 'driver/8250_core.c' >> 'driver/8250_coreArch.h'
160
sed -Ee '/ARCH_LINUX_HCLIP_BEGIN/,/ARCH_LINUX_HCLIP_END/ d' -i 'driver/8250_core.c'
161
}
162
else
163
_fn_pt_0010() { :; }
164
fi
165
_patches+=('0011-kernel-6.8-kernel-4.3-strlcpy-strscpy.patch') # https://github.com/gnif/vendor-reset/commit/f72619e468846e0bab4426f5e71b069f88c33a11
166
_patches+=('0012-kernel-6.8-tty_driver.h-send_xchar-to-u8.patch')
167
_patches+=('0013-kernel-6.10-platform_driver-remove-void-return.patch') # https://lore.kernel.org/lkml/2024060432-relieving-yonder-85ae@gregkh/T/
168
_patches+=('0014-kernel-6.13-irq_get_nr_irqs.patch') # https://lore.kernel.org/all/20241015190953.1266194-3-bvanassche@acm.org/
169
170
local _pt _ptf=() _pts=()
171
for _pt in "${_patches[@]}"; do
172
set +u; msg2 "Patch ${_pt}"; set -u
173
if patch -Nup1 --no-backup-if-mismatch -i "${srcdir}/${_pt}"; then
174
_pts+=("${_pt}")
175
else
176
_ptf+=("${_pt}")
177
fi
178
done
179
if [ "${#_ptf[@]}" -gt 0 ]; then
180
if [ "${#_pts[@]}" -gt 0 ]; then
181
printf 'Patch success %s\n' "${_pts[@]}"
182
printf 'Warning: Some old patches may need to be removed even if they are successful\n'
183
fi
184
printf 'Patch failed %s\n' "${_ptf[@]}"
185
set +x
186
false
187
fi
188
#cd '..'; cp -pr "${_srcdir}" 'a'; ln -s "${_srcdir}" 'b'; false
189
#diff -pNaru5 'a' 'b' > "0000-$RANDOM.patch"
190
191
_fn_pt_0010
192
193
pushd 'driver' > /dev/null
194
# Fix permissions
195
find -type 'f' -perm '/111' -exec chmod 644 '{}' '+'
196
chmod 755 *_dr
197
local _ver
198
#_ver="$(sed -n -e 's:^#define\sREVISION\s"\([^"]\+\).*$:\1:p' 'serial_core.c')"
199
_ver="$(sed -n -e 's:^Revision \([0-9.]\+\),\?.*$:\1:p' 'readme.txt' | tail -1)"
200
if [ "${pkgver}" != "${_ver}" ]; then
201
echo "Version mismatch ${pkgver} != ${_ver}"
202
set +u
203
false
204
fi
205
unset _ver
206
sed -e '/^#define\sREVISION\s/ s:"[^"]\+":"'"${pkgver}"'":g' -i 'serial_core.c'
207
208
# Branding in dmesg
209
sed -e 's/CTISerial driver revision:%s/& Arch Linux/g' -i 'serial_core.c'
210
grep -qFe 'Arch Linux' 'serial_core.c' || echo "${}"
211
212
# Fix makefile
213
#cp -p 'Makefile'{,.Arch}
214
local _seds=(
215
-e 's: /lib/modules: /usr/lib/modules:g'
216
-e '#Get this variable out of the way'
217
-e 's:KERNELRELEASE:&_ARCH:g'
218
-e '# No DKMS instructions say to do this but it works and keeps the MAKE line real simple'
219
-e 's:$(shell uname -r):$(KERNELRELEASE):g'
220
-e 's:`uname -r`:$(KERNELRELEASE):g'
221
-e 's:$(KVER):$(KERNELRELEASE):g'
222
-e '# Get rid of make lines so make all makes the module'
223
-e 's:^\s\+make\s:#&:g'
224
-e '1i KERNELRELEASE ?= $(shell uname -r)'
225
)
226
sed "${_seds[@]}" -i 'Makefile'
227
test -s 'Makefile.Arch' && echo "${}"
228
229
popd > /dev/null
230
set +u
231
}
232
233
build() {
234
set -u
235
cd "${_srcdir}"
236
make -C 'driver' -j1
237
make -C 'utilities' -j1
238
set +u
239
}
240
241
package() {
242
set -u
243
cd "${_srcdir}"
244
245
if [ "${_opt_DKMS}" -eq 0 ]; then
246
# I don't want Linux version info showing on AUR web. After a few months 'linux<0.0.0' makes it look like an out of date package.
247
local _kernelversionsmall="$(uname -r)"
248
_kernelversionsmall="${_kernelversionsmall%%-*}"
249
_kernelversionsmall="${_kernelversionsmall%\.0}" # trim 4.0.0 -> 4.0, 4.1.0 -> 4.1
250
# prevent the mksrcinfo bash emulator from getting these vars!
251
eval 'conf''licts=("linux>${_kernelversionsmall}" "linux<${_kernelversionsmall}")'
252
eval 'dep''ends+=("linux=${_kernelversionsmall}")'
253
fi
254
255
# Kernel Module
256
# https://www.linuxquestions.org/questions/linux-software-2/is-there-a-destdir-for-make-module_install-596578/
257
make -C 'driver' modules_install INSTALL_MOD_PATH="${pkgdir}/usr"
258
259
# programs
260
local _exe
261
for _exe in $(find 'utilities' -type 'f' -executable); do
262
# Names must be findable with tab completion
263
install -g uucp -Dpm754 "${_exe}" "${pkgdir}/usr/bin/${_exe##*/}-cti"
264
done
265
266
# Blacklist built in module(s)
267
install -Dpm644 <(cat << EOF
268
# See tgz readme.txt for details on these and more options
269
270
# Expand port count
271
#options cti_serial_core nr_uarts=24
272
273
# Block built in kernel modules that take some cards
274
275
# Bluestorm/Express Opto BBG001
276
blacklist 8250_exar
277
278
# CTI boards picked up by 8250_pci can be blocked without blacklisting by lowering
279
# 8250.nr_uarts=? on the kernel command line.
280
EOF
281
) "${pkgdir}/usr/lib/modprobe.d/cti_8250_pci.conf"
282
283
# Boot time settings
284
install -Dpm644 <(cat << EOF
285
#!/usr/bin/sh
286
287
# Automatically generated by ${pkgname} PKGBUILD from Arch Linux AUR
288
# https://aur.archlinux.org/
289
290
$(sed -n -e '/^---/,$ p' 'utilities/README' | sed -n -e '/^[0-9].\sset485/,/^----/ p' | head --lines=-1 | sed -e 's:^.:#&:g' -e 's:\bset485\b:&-cti:g')
291
292
293
294
295
296
# These must be the last lines. Put all your CTI control lines above this.
297
if [ "\${1:-}" = '--systemd' ]; then
298
systemd-notify --ready
299
fi
300
EOF
301
) "${pkgdir}/${_etcconf}"
302
303
# Install persistent settings service
304
install -Dm644 <(cat << EOF
305
# Automatically generated by ${pkgname}-${pkgver} PKGBUILD from Arch Linux AUR
306
# https://aur.archlinux.org/
307
308
[Unit]
309
Description=Connect Tech CTI multi port serial persistent RS-485 settings
310
After=network.target
311
312
[Service]
313
Type=notify
314
ExecStart=/usr/bin/bash ${_etcconf} --systemd
315
RemainAfterExit=yes
316
317
[Install]
318
WantedBy=multi-user.target
319
EOF
320
) "${pkgdir}/usr/lib/systemd/system/${_servicename}"
321
322
# DKMS
323
if [ "${_opt_DKMS}" -ne 0 ]; then
324
rm -r "${pkgdir}/usr/lib/modules/"
325
local _dkms="${pkgdir}/usr/src/${pkgname}-${pkgver}"
326
#install -d "${_dkms}"
327
328
install -Dm644 <(cat << EOF
329
# Automatically generated by ${pkgname}-${pkgver} PKGBUILD from Arch Linux AUR
330
# https://aur.archlinux.org/
331
332
PACKAGE_NAME="${pkgname}"
333
PACKAGE_VERSION="${pkgver}"
334
AUTOINSTALL="yes"
335
336
BUILT_MODULE_NAME[0]="cti_8250_pci"
337
BUILT_MODULE_LOCATION[0]="driver/"
338
# Using all processors doesn't compile this tiny module any faster.
339
MAKE[0]="make -C 'driver' -j1 DEBUG=n"
340
CLEAN[0]="make -C 'driver' -j1 clean DEBUG=n"
341
# Placing the DKMS generated module in a different location than the standard install prevents conflicts when PKGBUILD _opt_DKMS is toggled
342
DEST_MODULE_LOCATION[0]="/kernel/drivers/misc"
343
344
BUILT_MODULE_NAME[1]="cti_serial_core"
345
BUILT_MODULE_LOCATION[1]="driver/"
346
DEST_MODULE_LOCATION[1]="/kernel/drivers/misc"
347
EOF
348
) "${_dkms}/dkms.conf"
349
install -Dpm644 driver/* -t "${_dkms}/driver"
350
rm "${_dkms}/driver"/*_dr "${_dkms}/driver/readme.txt"
351
make -C "${_dkms}/driver" clean
352
fi
353
set +u
354
}
355
356
set +u
357
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-08-03 00:08:14 | LOW | 2 |
| 2026-08-02 00:16:08 | LOW | 2 |
| 2026-08-01 00:11:18 | LOW | 2 |
| 2026-07-31 00:14:10 | LOW | 2 |
| 2026-07-30 00:17:23 | LOW | 2 |
| 2026-07-29 00:25:53 | LOW | 2 |
| 2026-07-28 00:07:28 | LOW | 2 |
| 2026-07-27 00:24:32 | LOW | 2 |
| 2026-07-26 00:07:32 | LOW | 2 |
| 2026-07-25 00:13:44 | LOW | 2 |
| 2026-07-24 00:02:28 | LOW | 2 |
| 2026-07-23 00:14:47 | LOW | 2 |
| 2026-07-22 00:29:32 | LOW | 2 |
| 2026-07-21 00:24:15 | LOW | 2 |
| 2026-07-20 00:19:49 | LOW | 2 |
| 2026-07-19 00:17:08 | LOW | 2 |
| 2026-07-18 00:14:48 | LOW | 2 |
| 2026-07-17 00:06:16 | LOW | 2 |
| 2026-07-16 00:05:41 | LOW | 2 |
| 2026-07-15 00:09:25 | LOW | 2 |