dgrp

LOW
maintainer severach 1 votes scanned 2026-11-01 00:21:48.120785
View on AUR
Why flagged

The package downloads the official Digi RealPort driver source from digi.com's hub (hub.digi.com), which is a legitimate host for Digi software, and builds it locally; the non-standard host is not a security risk given the context of vendor-supplied drivers.

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-2507) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The package downloads the official Digi RealPort driver source from digi.com's hub (hub.digi.com), which is a legitimate host for Digi software, and builds it locally; the non-standard host is not a security risk given the context of vendor-supplied drivers.

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:189 "${pkgname##*-}-${pkgver}-${_dl}::https://hub.digi.com/dp/path=/support/asset/realport-driver-for-linux-tgz/"
  • PKGBUILD:192 'ftp://ftp1.digi.com/support/utilities/AddpClient.zip'

PKGBUILD

2 offending line(s) highlighted
1# Maintainer: Chris Severance aur.severach aATt spamgourmet dott com
2
3# Todo: rewrite dgrp_cfg_node to be systemd compatible.
4# Todo: add systemd getty support to drpadmin
5# Todo: Default user, group, and mode are in the backing store. These do not work. They are set by udev and apply to all ports.
6# Digi bug: terminal freezes when viewing /proc/dgrp/mon
7# (fixed) Digi bug: drpd terminates after the first tty open when launched from dgrp_cfg_node. It stays working when launched by systemd restart
8# (hardware) Digi bug: occasional Can't open serial /dev/ttyaf00: Resource temporarily unavailable for PortServer TS (not II)
9# (hardware) Digi bug: occasional dropped characters for PortServer II, PortServer TS, Digi One
10# Digi bug: Digi RealPort Manager (java) is unable to add new Realport because it uses the wrong options
11# Digi bug: mbrowse reports a few parsing errors in MIB
12# (fixed) Digi bug: make compatible with OpenSSL 1.1
13# Digi bug: transfer hangs if unit is repowered during live connection. Tested in 4.11, 4.9, and 4.4
14# Digi bug: tty* takes up to an hour to reappear after unit is powered up after a long time being off
15# Nov 29 06:16:50 springport drpd[715]: drpd(ag,128.0.0.92) Cannot connect to server - Connection timed out
16# Nov 29 07:21:21 springport drpd[715]: drpd(ag,128.0.0.92) Cannot connect to server - Connection timed out
17# Nov 29 08:25:51 springport drpd[715]: drpd(ag,128.0.0.92) Cannot connect to server - Connection timed out
18# Nov 29 09:30:22 springport drpd[715]: drpd(ag,128.0.0.92) Cannot connect to server - Connection timed out
19# Nov 29 10:34:53 springport drpd[715]: drpd(ag,128.0.0.92) Cannot connect to server - Connection timed out
20# Nov 29 11:39:24 springport drpd[715]: drpd(ag,128.0.0.92) Cannot connect to server - Connection timed out
21# Nov 29 12:43:54 springport drpd[715]: drpd(ag,128.0.0.92) Cannot connect to server - Connection timed out
22# Nov 29 13:48:25 springport drpd[715]: drpd(ag,128.0.0.92) Cannot connect to server - Connection timed out
23# Nov 29 14:52:56 springport drpd[715]: drpd(ag,128.0.0.92) Cannot connect to server - Connection timed out
24# Nov 29 15:57:26 springport drpd[715]: drpd(ag,128.0.0.92) Cannot connect to server - Connection timed out
25# Digi bug: connect hangs for 15 minutes if no network connection to unit. Tested in 1.9-38..40
26# Digi bug: backing store is rewritten on every service start which can cause loss of config
27
28# Digi Realport driver for Arch Linux. See Digi release notes for supported products.
29
30# Build instructions: (Skip these first two sections)
31
32# This only applies if you installed a long time ago when this driver would still
33# compile and haven't upgraded in a while. Now this can't be built on Arch without a
34# patch so new users skip to the next section.
35
36# This PKGBUILD does not clean up the slop from the Digi supplied make.
37# If you have already installed according to the the instructions
38# log on as root and go through the process in reverse from the original
39# unmodified Digi tgz. You won't lose your configuration.
40# make preuninstall; make uninstall
41# To clean up you may want to remove the folders /share/ and /etc/init.d/
42# Arch Linux does not use these folders though they may have spurious files from
43# other misdirected installs.
44
45# The next section: ... Now onto the real install ...
46
47# Set the mode for all created devices.
48_opt_defaultmode="0660" # default: 0600
49_opt_defaultgroup="uucp" # default: root
50# If you need more granular control.
51# See http://knowledge.digi.com/articles/Knowledge_Base_Article/HOW-TO-Preserve-device-permissions-settings-with-RealPort-in-Linux/
52# Once set copy /etc/udev/rules.d/10-dgrp.rules to the PKGBUILD folder
53# and it will be made into the package.
54
55# Digi's product name is inconsistent. Here you can choose. RealPort seems the most popular.
56_opt_RealPort='RealPort' # Can also be Realport
57
58_opt_DKMS=1 # This can be toggled between installs
59
60#export KERNELRELEASE="$(basename $(dirname /usr/lib/modules/5.10.*/vmlinuz))"
61
62# Since the kernel module isn't loaded until you have a device
63# configured, these services are automatically enabled and started
64# for immediate hardware support. They will be reenabled each time the
65# package is installed or upgraded.
66# systemctl enable dgrp_daemon.service
67# systemctl start dgrp_daemon.service
68# systemctl enable dgrp_ditty.service
69# systemctl start dgrp_ditty.service
70
71# To stop these services from loading:
72# systemctl disable dgrp_daemon.service
73# systemctl stop dgrp_daemon.service
74# systemctl disable dgrp_ditty.service
75# systemctl stop dgrp_ditty.service
76
77# To get started using your Digi products:
78# man -Ik "Digi "
79# man dgrp_gui
80# man dgrp_cfg_node
81# man ditty
82# man drpadmin
83
84# The man page for dgrp_cfg_node lacks some detail. See this page for more info
85# ftp://digiftp.digi.com/support_archive/support/manuals/psts/rp-linux-conf-managing-portservers-with-dgrp-config-node.html
86
87# To get your equipment up faster on servers that don't have X installed
88# I've supplied a console shell script "drpadmin".
89# It is adapted from Digi's RealPort "drpadmin" for Sun, HP UX, and SCO and has the same
90# look and feel.
91
92# Show available Digi devices
93# addp.pl -Q
94
95# For information about using dgrp_ditty.service to maintain your ditty settings
96# across reboots see http://knowledge.digi.com/articles/Knowledge_Base_Article/How-do-I-configure-my-ditty-rp-port-settings-to-stay-after-rebooting-when-using-RealPort-in-Linux/
97
98# UnInstall cleanup:
99# rm /etc/dgrp.backing.store* /usr/bin/dgrp/config/ditty.commands
100# rmdir /usr/bin/dgrp/config
101# rmdir /usr/bin/dgrp
102
103set -u
104pkgname='dgrp'
105#_pkgver='1.9-36'; _dl='81000137_X.tgz'
106#_pkgver='1.9-38'; _dl='81000137_Y.tgz'
107#_pkgver='1.9-39'; _dl='40002086_Z.tgz'
108#_pkgver='1.9-40'; _dl='40002086_AA.tgz'
109#_pkgver='1.9-42'; _dl='40002086_AC.tgz'
110_pkgver='1.9-45'; _dl='40002086_AE.tgz'
111pkgver="${_pkgver//-/.}"
112pkgrel='1'
113pkgdesc="tty driver for Digi ${_opt_RealPort} ConnectPort EtherLite Flex One CM PortServer TS IBM RAN serial console terminal servers"
114#_pkgdescshort="Digi ${_opt_RealPort} driver for Ethernet serial servers" # For when we used to generate the autorebuild from here
115arch=('i686' 'x86_64')
116url='https://www.digi.com/'
117license=('GPL' 'custom') # OpenSSL=Apache. Arch is always new enough to not need their version.
118depends=('grep' 'awk' 'systemd' 'procps-ng' 'psmisc' 'perl')
119if [ "$(vercmp "${pkgver}" '1.9.39')" -le 0 ]; then
120 _opt_SSL10=1
121else
122 _opt_SSL10=0
123fi
124if [ "${_opt_SSL10}" -ne 0 ]; then
125 depends+=('openssl-1.0')
126fi
127optdepends=(
128 {tk,gksu}': Digi RealPort Manager GUI'
129 'java-runtime: Digi Device Discovery Tool GUI'
130 'mbrowse: SNMP browser GUI'
131)
132backup=('etc/dgrp.backing.store')
133options=('!docs' '!emptydirs')
134install="${pkgname}-install.sh"
135_vercheck() {
136 local _versed2="${_verwatch[1]//:/\\:}" # Escape the two things that the PKGBUILD is not permitted to do
137 _versed2="${_versed2//$/\\$}" # End of line (though sed doesn't seem to require this), and end of search
138 curl -s -l "${_verwatch[0]}" | sed -ne "s:^${_versed2}"'$:\1:p' | sed -e 's:-:.:g' | sort -V
139}
140_verwatch=('https://www.digi.com/support/includes/drivers.aspx?pid=1954&osvid=218' '<li>.*Realport Driver for Linux ver\. \([^,]\+\), tgz version.*' 'f')
141_mibs=(
142 '40002014_a.mib' # DIGI Connectware Manager Notifications
143 '40002194_H.mib' # Portserver TS MIB File
144 '40002195_P.mib' # Digi Structures of Management (SMI) MIB
145 '40002236_b.mib' # Digi MODBUS MIB
146 '40002237_c.mib' # Digi Power Supply MIB
147 '40002238_b.mib' # Digi Multi-Electrical Interface (MEI) MIB
148 '40002239_B.mib' # Digi Socket ID MIB File
149 '40002240_B.mib' # Portserver TS Port Buffering MIB File
150 '40002257_B.mib' # Digi IA MIB
151 '40002258_B.mib' # Digi UDP Serial MIB
152 '40002335_B.mib' # Portserver TS Secure Access MIB File
153 '40002336_C.mib' # Digi Power Management MIB File
154 '40002337_D.mib' # Digi Power Management Traps MIB
155 '40002338_D.mib' # Digi Keyword Notification MIB
156 '40002339_D.mib' # Digi Login Traps MIB
157 '40002410_a.mib' # DIGI Connect Device Info Management Information Base
158 '40002411_a.mib' # Digi Connect Serial Alarm Traps MIB
159 '40002478_B.mib' # Digi NFS TRAPS MIB
160 '40002479_F.mib' # CM Management Information Base
161 '40002514_a.mib' # Digi Connectware Manager Notifications MIB
162 '40002515_a.mib' # Digi Connect Device Identity MIB
163 '40002520_a.mib' # Digi Power Traps MIB
164 '40002709_C.mib' # Digi ConnectPort LTS MIB
165 'rfc1316.mib' # Portserver II RFC1316-MIB Definitions
166 'rfc1317.mib' # Portserver II RFC1317-MIB Definitions
167)
168# Let me know if these dnw (do not want) items are actually serial device servers and should be installed.
169_mibsdnw=(
170 '40002325_D.mib' # DIGI Wireless Lan Management Information Base
171 '40002370_C.mib' # DIGI Serial Traps Management Information Base
172 '40002436_B.mib' # DIGI Modem Test Traps Management Information Base
173 '40002477_B.mib' # Management Information Base
174 '40002519_F.mib' # Passport Management Information Base
175 '40002521_a.mib' # DIGI IPMI Notification Feature Management Information Base
176 '40002593_B.mib' # DIGI Connect Mobile Information Management Information Base
177 '40002594_a.mib' # DIGI Mobile Traps Management Information Base
178 '40002782_a.mib' # Passport Management Information Base
179 '40002846_A.mib' # DIGI Connect Mobile Status Management Information Base
180)
181_mibsrc='http://ftp1.digi.com/support/utilities/'
182_filever="${pkgver//\./-}"
183_filever="${_filever/-/.}"
184_srcdir="dgrp-${_filever%%-*}"
185source=(
186 #"${pkgname}-${pkgver}-81000137_X.tgz::http://ftp1.digi.com/support/driver/81000137_X.tgz"
187 #"${pkgname}-${pkgver}-beta.tgz::ftp://ftp1.digi.com/support/driver/RealPort%20Linux%20Beta%20Driver/dgrp-${_filever}_y1p.tgz.rpm"
188 #"${pkgname##*-}-${pkgver}-${_dl}::http://ftp1.digi.com/support/driver/${_dl}"
189 "${pkgname##*-}-${pkgver}-${_dl}::https://hub.digi.com/dp/path=/support/asset/realport-driver-for-linux-tgz/"
190 'drpadmin' 'drpadmin.1' # "autorebuild-${pkgname}.sh"
191 'addp_perl-1.0.tgz::https://github.com/severach/addp/archive/f92a6fd2050c9f32a5a11cac18cd9def78138530.tar.gz'
192 'ftp://ftp1.digi.com/support/utilities/AddpClient.zip'
193 "${_mibs[@]/#/${_mibsrc}}"
194 # 'a' versions are by Digi from next version
195 '0000'{,a}'-Kernel-4-13-CLASS_ATTR_STRING.patch' # https://www.digi.com/support/forum/67157/realport-compile-error-with-fedor'{,a}'-27-kernel-4-14-14 https://www.digi.com/support/forum/65817/class_attr_driver_version-error-compiling-in-kernel-4-13
196 '0001'{,a}'-Kernel-4-15-timers.patch' # https://forum.blackmagicdesign.com/viewtopic.php?uid=16&f=3&t=68382&start=0
197 '0002'{,a}'-kernel-5.0.0-do_gettimeofday.patch'
198 '0003'{,a}'-kernel-5.0.0-dgrp_mon_ops-access_ok.patch' # https://lkml.org/lkml/2019/1/4/418
199 '0004-kernel-5.6-proc_dir_entry-proc_ops.patch'
200 '0005-kernel-5.12-MODULE_SUPPORTED_DEVICE.patch'
201 '0006-kernel-5.13-dropped-tty_check_change.patch'
202 '0007-kernel-5.14-task_struct.state-unsigned-tty.patch'
203 '0008-kernel-5.15-alloc_tty_driver-put_tty_driver.patch'
204 '0009-kernel-5.16-remove-LDISC_FLAG_DEFINED.patch'
205 '0010-kernel-5.17-change-PDE_DATA.patch'
206 '0011-kernel-6.1-remove-TTY_MAGIC.patch'
207 '0012-kernel-6.1-INIT_C_CC-termios_internal.patch'
208 '0013-kernel-6.0-set_termios-const-ktermios.patch'
209 '0014-kernel-6.6-struct-tty_operations-size_t.patch'
210 '0015-kernel-6.4-class_create-1arg.patch'
211 '0016-0006-kernel-5.10-dropped-tty_check_change.patch'
212 '0017-gcc-14-strict-function-definition-configure.patch'
213 '0018-kernel-6.6-strict-sign-enforcement-for-minmax-__cmp_once.patch'
214 '0019-kernel-6.8-tty_driver.h-send_xchar-to-u8.patch'
215 '0019a-kernel-6.8-tty_driver.h-send_xchar-to-u8.patch'
216 '0020-revert-POPULATED_KERNEL_HEADERS-for-DKMS.patch'
217)
218unset _mibsrc
219#source_i686=('http://ftp1.digi.com/support/utilities/40002890_A.tgz')
220#source_x86_64=('http://ftp1.digi.com/support/utilities/40002889_A.tgz') # compiled i686 therefore worthless
221# addp and sddp are incomplete. I replaced them with addp.pl
222md5sums=('060bd87af7ab8e351724a9338ff50dd5'
223 'b4af5022ba96fcc2429263cfbbe85bae'
224 '9feebec170552c9186e713e7f5852e14'
225 'e9ae823e597f2b63d95e6d6a8e25cde3'
226 '1b6491756c123234035c053baab1607c'
227 '4dbc892ea6247057db2fe613391f9b02'
228 '2e516af8bbe96b6d2137a106941d4223'
229 'f404ac48baee06c5fbd7efab157704e9'
230 'da3b2a1c78d981940afea9bd2da4bf96'
231 'd824adbace7a52ed4a08ec2b3101b10f'
232 '749a347ec350ac9ca5895ae4d0e2ca24'
233 'feab0142fc161c7705e6a3a12a410f35'
234 'ee66f700bdb828cfc916f1bd2fd9dc1a'
235 '2a321009c37ea6070607d1f1b97de84d'
236 '067d79acafc0eb32f809390fe1a9374e'
237 '276d710e355e24ea6635bb23a3dd46d0'
238 '0549b35492fb3e2dbee52b1ea7790a25'
239 'f04c8e15255d115c05631845232e858a'
240 'c1fa6b3f533da1bbf05c5be268ec9aba'
241 'de6faa945f2816191f558df38a1ac917'
242 '9495d5154f4d03fdd994922220dd1f2f'
243 '5fc7f819bca1d5ebfc8e4d06a744cb77'
244 '09ad1cc83d31f7365992d3f974fde6d5'
245 '89545a33c5df6304b6c8e288a4019d54'
246 'bc469a335d5b1a7986a93327a3b6f57b'
247 '83104a3387dc09ba95ccf4e2581fb20f'
248 '5da394f02ed6d62971f0d700f174bfd1'
249 '1f6fcaabe4058c225674f866b19f2ca8'
250 '031e105a06300feecacfc2774e48ff2f'
251 '699172bf54ec0e45b6aae348b1f570e8'
252 'be3bd26c2b2a74b445854135b17766a8'
253 '60a5d51a562aa1d8fa5f2294a683ce47'
254 '9f9275a3fb9b7a81a2ba098db1738b7d'
255 'c1cd2d98c466e252b6c8f3a85e92489f'
256 '6a58beab1cb022cd368e874e24c7b9ef'
257 '91eb572a5ad032073326fd4dd2842504'
258 'a65ba371ae411de4607259fc78a55682'
259 '4f1c03f1cc5f440a770c080a121d998a'
260 'c25c1fdfbdc1fa38d87e45cf1c8511c2'
261 '2596b5f38ef54d72af08dca05fcce369'
262 '60a06421a819bc65bd5ba0c3841e0500'
263 '5dfc03b8f6b8d190b63271b8ef32986c'
264 'f60c03c266bec028b4df4b7996deaacb'
265 '3b51a73b29843bfc6db748351dea464b'
266 'a841defc71b4b1da33ac9b24cdff52ca'
267 '18dad6ca1c3bc2dd5206fe8caf4bcdf1'
268 'bca5ff7935af3fe539ec30f1e9f59190'
269 '26d60834e4804c1c8af826e4f2a45503'
270 'dc163d401cf3db6e07ff66793d3ec7ca'
271 '762d49459368bb78da084e57ffc25d7c'
272 '8aeeb382e88b712c163e149bea6c5e1a'
273 'c177b666a0f9a7da04c16b3b974debfa'
274 'f0ece6ca3aed462f7c11ff82bb3cc32f'
275 'a7b0e6bfebc82bf30ab6ed846bd64bf2'
276 'df025331e29fe36ed7d97b2ee661c990'
277 '4726b79fbe2c94db647be809c34ddff1')
278sha256sums=('d0cf2990c0db20fe5c7f58b7639f43fbda18b6666de66ae6ae2cac7ab4d923ea'
279 '42898b9d24262de27e9b1f3067d51d01373810b7c9e4991403a7f0a5dd7a26cf'
280 '66f8b106a052b4807513ace92978e5e6347cef08eee39e4b4ae31c60284cc0a3'
281 '9d79df8617e2bb1042a4b7d34311e73dc4afcdfe4dfa66703455ff54512427f5'
282 '00d7b452a4f16599f7162f512a05599614115554992b872fc5302b521ea04468'
283 '4b54148008b02a2544d8b33f07c471a068b0973ac5402967af8bf73a28b6a8b6'
284 'a1833d877b07b0f424676241b3e1070e116d07965db3131a61a3b6ce0ff90063'
285 '6fca5df11304d905f561a0c251419619960a8da8e724d36b34e9977e97f02528'
286 '2dd7868acf66c14d67012a2263088b08d8f9320c64b64db94740fae54b485c78'
287 '26159071b1b0df2af04d612e32ce72c8835f241c56b9fa2dadee53d9d127d0b7'
288 'f686011f7db06f0632f6460566da751a00fccd04bb1527b8a83239aad46d4de5'
289 '50130240e3ce85759aa99b3a268568de6a97084eeb40a92ef0b4937333808d8a'
290 'f4a89790ad1413ecfc2b723a45fa0d0b93ae01cc433d930db4e689f82d0367fd'
291 '3e2881ebf6866751a64e7cf948b85a3c2053f2d0a8799234c56b732cde17b853'
292 'c54576fad5ccedfd50cebc22a6dd45bd8c4deb875282f5c7d1a89a33426c1746'
293 '08eecc0e5d8f9fffe0fcf3b9f47e56c81bd713964bd7aeb0f4b6a6de3e0f3592'
294 '75ba60917769c2cc2324050b74a4e618f0904464ece15646045fd931001c47e4'
295 '43e7f12bb32343254f472260fd26566e8aab58764ba3e73d500542e462f27ac5'
296 '241ef4a96b4d34652bfc7a9ce0bab317129e0123f05c68713a45d88624ddd19b'
297 '21b8d7c50cacc418611b909159ed6258dc13026e8e55034e86965227b8176509'
298 '471f1342398c4fce86e1d437c4f6053be75ae3a99337613d39c05e4e3c80ede9'
299 '06a81a5dfaa1c61944d1a12d2efc8129c0ee72f630817f844879bd17d6cb4d80'
300 'a3286df00ca3566361faf1f128752c56d046558277cd90025831f9840129e33f'
301 '33b29ee72b590ecadd54e893317a279bb49a2dd4a189fd386491e1a67ef193a8'
302 '4011005db626db67b50f13b6242db1fed0d11b0d89e56af7ae39f5719d7cd323'
303 '679b081c31e5fc156ad9c55afc0bba9ec354f37e28eeeb453bcbd6b1cf68988e'
304 '731e05fc551367faa6ad5dc317eedf305388ab12db196c0a1361a3d01bd35279'
305 'c471cafa43503a40d43b42acd8bc6ef49db29e55a74e0494c85f729ea45fe243'
306 '5cac7ce2e6f043127f314b93694af021ae7820ffb5bf3de343da7a240d05e9c8'
307 '8654496d83c083e457e8bb9bae2b1e71804d156a38c284d89872d0125eba947d'
308 '61500188b388fd1eb52ec970150cf098d855b8ba09a8efb8192803eebefaba03'
309 'cc54e4bc21255a419ba0a416b1c8d1e705e27676c5561dd4b83fe657f045b65e'
310 '46a87449cd316a621271def4147ba781424dd524ae2332cd55dd07f2ac9ab456'
311 '4cb63ad72244eea04879b07cbca809120bdb08a7d8ea2a37e8d9a6fcc1333f26'
312 '353d15624675c78dfd83318195d75bdb0507fd0476f5e22be1329bf257d2de1e'
313 '9c6ce4ae64e206b442aeea6af98b9b86b8a67571ba00a92fc721619ba3061c26'
314 'acbcf462628daf4fa2dbee064969a158ccc0bb0ce9f286ceb3617e470eab1c1f'
315 '882019276d59e6cc15fcda1bb1dea75b01591509a2644ddb0225ef1d5a17fd1c'
316 'b812176f6061d135ab45facecf5a05922d9ffd5ec0a6f17c3e3a5a74729034b1'
317 '82f2c244f169c1f5a9b6186e4e4436c116bd020a1be973e8be261097d38bc937'
318 'eaab5a80791644a24950fe0c6db2c09535655c63ed3a263eb70791ab30f86ab9'
319 '50975ac2377ffd24874746df4b820de1734f53eb322bd25ccc9d51148129a2e0'
320 '0ae424e8211836edbededafd308cf9ae73cdb791752c4fc43e1c194db7b77cab'
321 '1d6ab72eec4977b7789d0f5af3dc907bebdd21e417abb5dcfdac80c460a77bae'
322 'd1c641d3f024e8e11c4a36bf58570afb4b63fcaa4a22f05c59b513a35a6a4af7'
323 '2b9ccbe92e4e1cbeafd16208ef011209bce30b6d3f9b4f288d0b83418479b1bc'
324 '2ac185b8a27855c22d64d2e3f56e28f6a4442b1141ad46e4a0a078e0e22adc53'
325 '3afe6487f26f7393aa1a05b1cd307b3bd29d164a49596e199a681b4432f6e23e'
326 '5787763cac47a3ba5df203f75d57c9d7d8d4364c7cd32db426b268f77f17247a'
327 'df2c6cf5943ca26f282b96f22cf7301cffa6521a273c8301199840b5dca57e8a'
328 '26022e04543aa8ccebe1b9c698c452e2dccc98d5bf1fd8c4f0dba000067e899a'
329 '4ead538f59c7a9f3a643b5530e251eec4c1363ec2cfa7539da6a67650e2836c2'
330 '3ae84041ed1d5b9b3fffb95c58bb52763aae0b6a73ca85ee3f4fde27472258a9'
331 'eb57a8de226ed5c030c263f2247bfb0e60256366960255fcfa5166ada39edc30'
332 '4a9b4141a7ac9ce1ec3f3bc509008350c647919c0af4bc1bc6210a506d365d74'
333 '098dfc644c744a5127934a495fd309005469f3fda9a118c9fd246732856e1596')
334
335if [ "${_opt_DKMS}" -ne 0 ]; then
336 depends+=('linux' 'dkms' 'linux-headers')
337else
338 makedepends+=('linux-headers')
339fi
340
341_modulename='dgrp'
342
343# Check for updates and case errors to the 2 mib lists
344_fn_mibcheck() {
345 echo 'Checking for newer and misnamed MIB'
346
347 # download *mib file list from ftp
348 # remove doubles keeping newer versions
349 # check for case errors
350 curl -sl 'ftp://ftp1.digi.com/support/utilities/' | grep -E '4000.+\.mib' \
351 | sort -fr | sort -u -t _ -k 1,1 | sort -f \
352 | while read line
353 do
354 lineu="${line^^}"
355 found=0
356 # unclear what the original script wants to do here with _mibsdnw
357 # list seems to be "Do Not Want" but is added to the loop anyway
358 for mib in "${_mibs[@]}" "${_mibsdnw[@]}"; do
359 mibu="${mib^^}"
360 if [ "${lineu%%_*}" = "${mibu%%_*}" ]; then
361 if [ "${lineu}" != "${mibu}" ]; then
362 echo "${mib} has been updated to ${line}"
363 elif [ "${line}" != "${mib}" ]; then
364 echo "Case correction: ${mib} -> ${line}"
365 fi
366 found=1
367 break
368 fi
369 done
370 if [ "${found}" -eq 0 ]; then
371 echo "${line} is missing"
372 fi
373 done
374 return 1
375}
376#_fn_mibcheck
377# bash -c 'source PKGBUILD; _fn_mibcheck'
378
379prepare() {
380 set -u
381 cd "${_srcdir}"
382
383 # Version check
384 local _tv
385 _tv="$(grep -e 'TRUE_VERSION=' ./Makefile.inc | cut -d'"' -f2)"
386 _tv="${_tv%_*}"
387 if [ "${_pkgver}" != "${_tv}" ]; then
388 set +u
389 echo 'Version mismatch'
390 false
391 fi
392
393 if [ "$(vercmp "${pkgver}" '1.9.38')" -le 0 ]; then
394 #cp -pr "${srcdir}/${_srcdir}"{,.orig-0000}
395 #diff -pNaru5 dgrp-1.9{.orig,} > '0000-Kernel-4-13-CLASS_ATTR_STRING.patch'
396 patch -Nup1 -i "${srcdir}/0000a-Kernel-4-13-CLASS_ATTR_STRING.patch"
397 test ! -d "${srcdir}/${_srcdir}.orig-0000" || echo "${}"
398
399 #cp -pr "${srcdir}/${_srcdir}"{,.orig-0001}
400 #diff -pNaru5 dgrp-1.9{.orig-0001,} > '0001-Kernel-4-15-timers.patch'
401 patch -Nup1 -i "${srcdir}/0001a-Kernel-4-15-timers.patch"
402 test ! -d "${srcdir}/${_srcdir}.orig-0001" || echo "${}"
403 fi
404
405 # 1.3-9 adds an 11th parameter on the end of each line in dgrp.backing.store
406 # Remove the last 'default' to go back
407
408 if [ "$(vercmp "${pkgver}" '1.9.39')" -le 0 ]; then
409 #cp -p driver/2.6.27/dgrp_mon_ops.c{,.orig}; false
410 #diff -pNau5 driver/2.6.27/dgrp_mon_ops.c{.orig,} > '0002-kernel-5.0.0-do_gettimeofday.patch'
411 patch -Nup0 -i "${srcdir}/0002a-kernel-5.0.0-do_gettimeofday.patch"
412
413 #cp -pr driver/2.6.27{,.orig}; false
414 #diff -pNaru5 driver/2.6.27{.orig,} > '0003-kernel-5.0.0-dgrp_mon_ops-access_ok.patch'
415 patch -Nup0 -i "${srcdir}/0003a-kernel-5.0.0-dgrp_mon_ops-access_ok.patch"
416 fi
417
418 if [ "$(vercmp "${pkgver}" '1.9.40')" -le 0 ]; then
419 #cp -pr driver/2.6.27{,.orig}; false
420 #diff -pNaru5 driver/2.6.27{.orig,} > '0004-kernel-5.6-proc_dir_entry-proc_ops.patch'
421 patch -Nup0 -i "${srcdir}/0004-kernel-5.6-proc_dir_entry-proc_ops.patch"
422
423 #cp -pr driver/2.6.27{,.orig}; false
424 #diff -pNaru5 driver/2.6.27{.orig,} > '0005-kernel-5.12-MODULE_SUPPORTED_DEVICE.patch'
425 patch -Nup0 -i "${srcdir}/0005-kernel-5.12-MODULE_SUPPORTED_DEVICE.patch"
426
427 #cp -pr driver/2.6.27{,.orig}; false
428 #diff -pNaru5 driver/2.6.27{.orig,} > '0006-kernel-5.13-dropped-tty_check_change.patch'
429 patch -Nup0 -i "${srcdir}/0006-kernel-5.13-dropped-tty_check_change.patch"
430
431 # unsigned write_room https://www.spinics.net/lists/linux-serial/msg42297.html
432 # unsigned chars_in_buffer https://www.spinics.net/lists/linux-serial/msg42299.html
433 # 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
434 #rm -f driver/2.6.27/*.orig; cp -pr driver/2.6.27{,.orig}; false
435 #diff -pNaru5 driver/2.6.27{.orig,} > '0007-kernel-5.14-task_struct.state-unsigned-tty.patch'
436 patch -Nup0 -i "${srcdir}/0007-kernel-5.14-task_struct.state-unsigned-tty.patch"
437
438 # http://lkml.iu.edu/hypermail/linux/kernel/2107.2/08799.html [PATCH 5/8] tty: drop alloc_tty_driver
439 # http://lkml.iu.edu/hypermail/linux/kernel/2107.2/08801.html [PATCH 7/8] tty: drop put_tty_driver
440 #rm -f driver/2.6.27/*.orig; cp -pr driver/2.6.27{,.orig}; false
441 #diff -pNaru5 driver/2.6.27{.orig,} > '0008-kernel-5.15-alloc_tty_driver-put_tty_driver.patch'
442 patch -Nup0 -i "${srcdir}/0008-kernel-5.15-alloc_tty_driver-put_tty_driver.patch"
443
444 # https://lore.kernel.org/all/20210914091134.17426-2-jslaby@suse.cz/
445 #cd '..'; cp -pr "${_srcdir}" 'a'; ln -s "${_srcdir}" 'b'; false
446 # diff -pNaru5 'a' 'b' > '0009-kernel-5.16-remove-LDISC_FLAG_DEFINED.patch'
447 patch -Nup1 -i "${startdir}/0009-kernel-5.16-remove-LDISC_FLAG_DEFINED.patch"
448
449 # https://www.spinics.net/lists/linux-fsdevel/msg207433.html
450 #cd '..'; cp -pr "${_srcdir}" 'a'; ln -s "${_srcdir}" 'b'; false
451 # diff -pNaru5 'a' 'b' > '0010-kernel-5.17-change-PDE_DATA.patch'
452 patch -Nup1 -i "${startdir}/0010-kernel-5.17-change-PDE_DATA.patch"
453 fi
454
455 # no need to fix early patches that we won't use any more
456 local _patches=()
457 if [ "$(vercmp "${pkgver}" '1.9.41')" -le 0 ]; then
458 # https://lore.kernel.org/lkml/723478a270a3858f27843cbec621df4d5d44efcc.1663288066.git.nabijaczleweli@nabijaczleweli.xyz/T/
459 _patches+=("0011-kernel-6.1-remove-TTY_MAGIC.patch")
460
461 # https://www.uwsg.indiana.edu/hypermail/linux/kernel/1809.1/00449.html
462 _patches+=("0012-kernel-6.1-INIT_C_CC-termios_internal.patch")
463
464 # https://lore.kernel.org/linux-arm-kernel/20220816115739.10928-9-ilpo.jarvinen@linux.intel.com/T/
465 _patches+=("0013-kernel-6.0-set_termios-const-ktermios.patch")
466 fi
467
468 if [ "$(vercmp "${pkgver}" '1.9.42')" -le 0 ]; then
469 _patches+=("0014-kernel-6.6-struct-tty_operations-size_t.patch")
470 fi
471
472 if [ "$(vercmp "${pkgver}" '1.9.41')" -le 0 ]; then
473 _patches+=("0015-kernel-6.4-class_create-1arg.patch")
474 _patches+=("0016-0006-kernel-5.10-dropped-tty_check_change.patch")
475 fi
476
477 if [ "$(vercmp "${pkgver}" '1.9.42')" -le 0 ]; then
478 _patches+=("0017-gcc-14-strict-function-definition-configure.patch")
479 _patches+=("0018-kernel-6.6-strict-sign-enforcement-for-minmax-__cmp_once.patch")
480 fi
481
482 if [ "$(vercmp "${pkgver}" '1.9.41')" -le 0 ]; then
483 _patches+=("0019-kernel-6.8-tty_driver.h-send_xchar-to-u8.patch")
484 fi
485
486 # not sure about version upper bound for those 2 patches
487 if [ "$(vercmp "${pkgver}" '1.9.42')" -ge 0 ] && [ "$(vercmp "${pkgver}" '1.9.44')" -le 0 ]; then
488 _patches+=("0019a-kernel-6.8-tty_driver.h-send_xchar-to-u8.patch")
489 _patches+=("0020-revert-POPULATED_KERNEL_HEADERS-for-DKMS.patch")
490 fi
491
492 local _pt _ptf=() _pts=()
493 for _pt in "${_patches[@]}"; do
494 set +u; msg2 "Patch ${_pt}"; set -u
495 if patch -Nup1 --no-backup-if-mismatch -i "${srcdir}/${_pt}"; then
496 _pts+=("${_pt}")
497 else
498 _ptf+=("${_pt}")
499 fi
500 done
501 if [ "${#_ptf[@]}" -gt 0 ]; then
502 if [ "${#_pts[@]}" -gt 0 ]; then
503 printf 'Patch success %s\n' "${_pts[@]}"
504 printf 'Warning: Some old patches may need to be removed even if they are successful\n'
505 fi
506 printf 'Patch failed %s\n' "${_ptf[@]}"
507 set +x
508 false
509 fi
510 #cd '..'; cp -pr "${_srcdir}" 'a'; ln -s "${_srcdir}" 'b'; false
511 # diff -pNaru5 'a' 'b' > "0000-$RANDOM.patch"
512
513 # Standardize name of RealPort
514 sed -e "s/RealPort/${_opt_RealPort}/gI" -i $(grep -lrF $'RealPort\nRealport' .)
515 # grep -ri realport . | grep -vF $'RealPort\nRealport'
516
517 rm -f daemon/openssl-*.tar.gz # I don't want their version to build if OpenSSL version detection fails in the future
518
519 # Fix configure
520 sed -e '# Cosmetic fix for newer gcc compilers' \
521 -e '#s:\(3.9\*|4.\*\))$:\1|5.*|6.*|7.*|8.*|9.*):g' \
522 -e "# I can't find any other way to fix the modules dir" \
523 -e 's:/lib/modules/:/usr&:g' \
524 -e '# Kill a harmless mkdir error. They mkdir the folder then dont use it.' \
525 -e 's@^\(\s\+\)\(mkdir -p /usr/lib/modules/${osrel}/misc\)$@\1: #\2@g' \
526 -i 'configure'
527
528 # Some files ignore configure --sbindir
529 sed -e 's:/usr/sbin:/usr/bin:g' -e 's:/sbin/:/usr/bin/:g' -i 'configure' Makefile* */Makefile scripts/{preun,post}install
530
531 # make postinstall package compatible
532 # some postinstall is done in install
533 # cp -p 'scripts/postinstall'{,.Arch} # DEBUG for comparison
534 sed -e '# Some security for root' \
535 -e 's:^#!\s*/bin/sh$:&\nif [ "${EUID}" -ne 0 ]; then\n echo "Must be root!"\n exit 1\nfi:g' \
536 -e '# Remove Install noise' \
537 -e 's:^\(\s*\)\(echo "Running\):\1#\2:g' \
538 -e '# Block the usage of chkconfig' \
539 -e 's:/usr/bin/chkconfig:/usr/bin/true:g' \
540 -e '# Remove noise for defunct chkconfig' \
541 -e 's:^\(\s\+\)\(echo "Added\):\1#\2:g' \
542 -e '# Automatically bring back pacsave file on reinstall' \
543 -e 's:^if \[ -f /etc/dgrp:if [ -s "/etc/dgrp.backing.store.pacsave" -a ! -s "/etc/dgrp.backing.store" ]; then\n mv "/etc/dgrp.backing.store.pacsave" "/etc/dgrp.backing.store"\nfi\n&:g' \
544 -e '# No need to upgrade and back up a blank file' \
545 -e 's:-f \(/etc/dgrp.backing.store\):-s \1:g' \
546 -e '# Why depend on /tmp when we can use the /etc folder which is where admin will be looking to fix their non working hardware' \
547 -e 's:/tmp/dgrp/dgrp.backing.store:/etc/dgrp.backing.store:g' \
548 -e '# The rest is done in package.' \
549 -e 's:^echo "Checking:exit 0\n&:g' \
550 -e '# Prepare the links for package to use them' \
551 -e 's:^\(\s\+\)ln -s /usr/bin/\([^ ]\+\) \(.\+\)$:\1ln -sf "\2" "${_DESTDIR}\3":g' \
552 -e "# All that's left is config conversion" \
553 -i 'scripts/postinstall'
554 test ! -s 'scripts/postinstall.Arch'
555 #cp -p 'scripts/preuninstall' 'scripts/preuninstall.Arch' # For comparison
556 sed -e '# Some security for root' \
557 -e 's:^#!\s*/bin/sh$:&\nif [ "${EUID}" -ne 0 ]; then\n echo "Must be root!"\n exit 1\nfi:g' \
558 -e '# Remove UnInstall noise' \
559 -e 's:^\(\s*\)\(echo "Running\):\1#\2:g' \
560 -e '# Block the usage of chkconfig' \
561 -e 's:/usr/bin/chkconfig:/usr/bin/true:g' \
562 -e '# Remove more noise' \
563 -e 's:^\(\s\+\)\(echo "Removed\):\1#\2:g' \
564 -e '# No need to sleep. The daemons are shut down by systemd' \
565 -e 's:^sleep :#&:g' \
566 -e '# pacman handles the links and files' \
567 -e 's;if \[ -L ;if ! : \&\& [ -L ;g' \
568 -e 's;^\(\s*\)\(rm -f \);\1: #\2;g' \
569 -e '# Fixing this file was almost useless. All it does after we disable everything is an rmmod' \
570 -i 'scripts/preuninstall'
571 test ! -s 'scripts/preuninstall.Arch'
572
573 # Change insmod to modprobe
574 sed -e 's:\${INSMOD}.*$:modprobe "${DGRP_DRIVER}" # &:g' -i 'config/dgrp_cfg_node'
575
576 if [ "${_opt_SSL10}" -ne 0 ]; then
577 # drpd makefile does not honor --with-ssl-dir. We convert the bogus folder to the one we need.
578 sed -e 's:/usr/local/ssl/include:/usr/include/openssl-1.0:g' \
579 -e 's:/usr/local/ssl/lib:/usr/lib/openssl-1.0:g' \
580 -i 'daemon/Makefile.in'
581 fi
582
583 # new folder in gcc 8
584 sed -e 's/^clean:$/&\n\trm -f .cache.mk/g' \
585 -e '# Switch SUBDIRS= to M= for Kernel 5.4' \
586 -e 's:SUBDIRS=:M=:g' \
587 -e '# Build with any specified kernel, not just the current one' \
588 -e 's:@MODDIR@:/usr/lib/modules/$(KERNELRELEASE):g' \
589 -e 's:@KERNEL_HEADERS@:/usr/lib/modules/$(KERNELRELEASE)/build:g' \
590 -e '1i KERNELRELEASE ?= $(shell uname -r)' \
591 -i driver/*/Makefile*
592
593 # Branding in dmesg
594 sed -e 's@ please visit [^"]\+"@ please visit https://aur.archlinux.org/packages/dgrp/"@g' \
595 -e '/^dgrp_init_module/,/^$/ s@version: %s@& Arch Linux@g' \
596 -i driver/[0-9]*/dgrp_driver.c
597
598 set +u
599}
600
601_configure() {
602 if [ ! -s 'Makefile' ]; then
603 # this generates a harmless error as it tries to make a folder in /usr/lib/modules...
604 if [ "${_opt_SSL10}" -ne 0 ]; then
605 # --with-ssl-dir supplies to -I but mainly for configure. CFLAGS goes everywhere.
606 # --with-ssl-dir is supplied to -L too which is worthless. We amend with LDFLAGS.
607 CFLAGS="${CFLAGS} -I/usr/include/openssl-1.0" \
608 LDFLAGS="${LDFLAGS} -L/usr/lib/openssl-1.0" \
609 ./configure -q --sbindir='/usr/bin' --prefix='/usr' --mandir='/usr/share/man' --with-ssl-dir='/usr/include/openssl-1.0'
610 else
611 ./configure -q --sbindir='/usr/bin' --prefix='/usr' --mandir='/usr/share/man'
612 fi
613 fi
614}
615
616build() {
617 set -u
618 cd "${_srcdir}"
619 _configure
620
621 #. 'config/file_locations.Arch'
622 make all -j1 # This package doesn't support threaded make and it's too small to fix
623 set +u
624}
625
626# Copy this line into the .install file
627#_daemons=('daemon' 'ditty')
628_daemons=()
629
630package() {
631 set -u
632 cd "${_srcdir}"
633 if [ "${_opt_DKMS}" -eq 0 ]; then
634 # 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.
635 local _kernelversionsmall="$(uname -r)"
636 _kernelversionsmall="${_kernelversionsmall%%-*}"
637 _kernelversionsmall="${_kernelversionsmall%\.0}" # trim 4.0.0 -> 4.0, 4.1.0 -> 4.1
638 # prevent the mksrcinfo bash emulator from getting these vars!
639 #eval 'conf''licts=("linux>${_kernelversionsmall}" "linux<${_kernelversionsmall}")'
640 eval 'dep''ends+=("linux=${_kernelversionsmall}")'
641 fi
642
643 #. 'config/file_locations.Arch'
644
645 make -s -j1 RPM_BUILD_ROOT="${pkgdir}" install
646 install -m644 'dinc/dinc.1' -t "${pkgdir}/usr/share/man/man1/" # They bypass the Makefile that does this
647 if [ "$(vercmp "${pkgver}" '1.9.41')" -le 0 ]; then
648 chmod 644 "${pkgdir}/usr/bin/dgrp/config/dgrp.gif"
649 fi
650 chmod 644 "${pkgdir}/usr/bin/dgrp/config/file_locations"
651 chmod 744 "${pkgdir}/usr/bin/"{dgelreset,dgipserv}
652
653 # Postinstall
654 # Create the links, customized for us by prepare above
655 grep 'ln -sf ' 'scripts/postinstall' |\
656 _DESTDIR="${pkgdir}" \
657 sh -e -u -s --
658 #rmdir "${pkgdir}/usr/share/doc" # makepkg does this for us
659
660 # Install MIB
661 local _mib
662 for _mib in "${srcdir}"/*.mib; do
663 install -Dpm0644 "${_mib}" "${pkgdir}/usr/share/snmp/mibs/digi-serial-server-${_mib##*/}.txt"
664 done
665
666 # Prepend our message on the udev rules file
667 install -dm755 "${pkgdir}/etc/udev/rules.d/"
668 touch "${pkgdir}/${backup[0]}" # postinstall handles the pacsave file automatically
669 chmod 644 "${pkgdir}/${backup[0]}"
670
671# if [ ! -s "${pkgdir}/tmp/dgrp/10-dgrp.rules" ]; then
672# mv "${pkgdir}/etc/udev/rules.d/10-dgrp.rules" "${pkgdir}/tmp/dgrp/10-dgrp.rules" # 1.9-41
673# fi
674 newrules=$(sed -e 's:^KERNEL=="cu_dgrp:#&:g' "${pkgdir}/etc/udev/rules.d/10-dgrp.rules") # Recommended by Digi
675 cat > "${pkgdir}/etc/udev/rules.d/10-dgrp.rules" << EOF
676# Automatically generated by ${pkgname}-${pkgver} PKGBUILD from Arch Linux AUR
677# https://aur.archlinux.org/
678
679# Generated: $(date +"%F %T")
680
681# Warning: If you modify this file you should copy it into the folder with the
682# PKGBUILD or you might lose the customizations on the next install.
683
684# This file was customized by the PKGBUILD by setting the mode on all ports
685# to MODE=(see below). If all you need is a different mode on all ports
686# then set the option in the PKGBUILD. If you need more granular control
687# see these customization instructions:
688
689# http://knowledge.digi.com/articles/Knowledge_Base_Article/HOW-TO-Preserve-device-permissions-settings-with-RealPort-in-Linux/
690
691# Then copy this file into the folder with PKGBUILD.
692
693$(echo "$newrules")
694EOF
695
696 if [ -d "${pkgdir}/tmp/dgrp" ]
697 then
698 rm -f "${pkgdir}/tmp/dgrp/10-dgrp.rules"
699 rmdir "${pkgdir}/tmp/dgrp" "${pkgdir}/tmp" # crashes if other files ever show up in /tmp/dgrp
700 fi
701
702 if [ ! -z "${_opt_defaultmode:-}" ]; then
703 sed -e 's:^\(KERNEL=="tty_dgrp\)\(.*\)$:\1\2, MODE="'"${_opt_defaultmode}"'", GROUP="'"${_opt_defaultgroup}"'":g' -i "${pkgdir}/etc/udev/rules.d/10-dgrp.rules"
704 fi
705 if [ -s "${srcdir}/../10-dgrp.rules" ]; then
706 cp "${srcdir}/../10-dgrp.rules" "${pkgdir}/etc/udev/rules.d/10-dgrp.rules" # no cp -p in case this file has any wrong user:group
707 fi
708 chmod 644 "${pkgdir}/etc/udev/rules.d/10-dgrp.rules"
709
710# TODO: test if dgrp_daemon / dgrp_ditty are present (binaries from older releases ?)
711# install -Dpm755 "${pkgdir}/etc/init.d"/{dgrp_daemon,dgrp_ditty} -t "${pkgdir}/usr/bin/dgrp/daemon/"
712# rm -f "${pkgdir}/etc/init.d"/{dgrp_daemon,dgrp_ditty}
713# rmdir "${pkgdir}/etc/init.d"
714
715 # systemd integration.
716 #install -dm755 "${pkgdir}/usr/lib/systemd/system/"
717 local _daemon
718 for _daemon in "${_daemons[@]}"; do
719 install -Dm644 <(cat << EOF
720# Automatically generated by ${pkgname}-${pkgver} PKGBUILD from Arch Linux AUR
721# https://aur.archlinux.org/
722[Unit]
723Description="Digi ${_opt_RealPort} ${_daemon}"
724After=network.target
725
726[Service]
727Type=forking
728ExecStart=/usr/bin/dgrp/daemon/dgrp_${_daemon} start
729ExecStop=/usr/bin/dgrp/daemon/dgrp_${_daemon} stop
730ExecReload=/usr/bin/dgrp/daemon/dgrp_${_daemon} reload
731
732[Install]
733WantedBy=multi-user.target
734EOF
735 ) "${pkgdir}/usr/lib/systemd/system/dgrp_${_daemon}.service"
736 #chmod 644 "${pkgdir}/usr/lib/systemd/system/dgrp_${_daemon}.service"
737done
738
739 # Install my custom drpadmin with man page.
740 install -Dm755 "${srcdir}/drpadmin" -t "${pkgdir}/usr/bin/"
741 sed -e 's/^#distro=:::$/g_distro="Arch Linux"/g' \
742 -e "s/RealPort/${_opt_RealPort}/gI" -i "${pkgdir}/usr/bin/drpadmin"
743 install -Dm444 "${srcdir}/drpadmin.1" -t "${pkgdir}/usr/share/man/man1/"
744 # Standardize name of RealPort in man pages
745 sed -e "s/RealPort/${_opt_RealPort}/gI" -i "${pkgdir}/usr/share/man/man8/"*.8 "${pkgdir}/usr/share/man/man1/"*.1
746
747 # Desktop file for config tool
748 install -Dm644 <(cat << EOF
749[Desktop Entry]
750Name=Digi RealPort Manager
751GenericName=Device Server Manager
752Comment=Manage tty connections to Digi serial device servers
753Exec=gksudo -k -u root dgrp_gui
754Terminal=false
755Type=Application
756#Icon=
757Categories=Application;Utility;
758MimeType=application/x-executable
759EOF
760 ) "${pkgdir}/usr/share/applications/dgrp_cfg.desktop"
761
762 # addp tui and gui utilities
763 #install -Dpm755 "${srcdir}/addp" -t "${pkgdir}/usr/bin/"
764 install -Dpm755 "${srcdir}"/addp-*/'/addp.pl' "${pkgdir}/usr/bin/"
765 install -Dpm644 "${srcdir}/AddpClient.jar" -t "${pkgdir}/usr/bin/dgrp/"
766
767 # Desktop file for config tool
768 install -Dm644 <(cat << EOF
769# Automatically generated by ${pkgname}-${pkgver} PKGBUILD from Arch Linux AUR
770# https://aur.archlinux.org/
771
772[Desktop Entry]
773Name=Digi Device Discovery Tool
774GenericName=Device Server Manager
775Comment=Manage Digi serial device servers
776Exec=java -jar /usr/bin/dgrp/AddpClient.jar
777Terminal=false
778Type=Application
779#Icon=
780Categories=Application;Utility;
781MimeType=application/x-executable
782EOF
783 ) "${pkgdir}/usr/share/applications/AddpClient.desktop"
784
785 # DKMS
786 if [ "${_opt_DKMS}" -ne 0 ]; then
787 rm -r "${pkgdir}/usr/lib/modules/"
788 local _dkms="${pkgdir}/usr/src/${pkgname}-${pkgver}"
789 install -Dm644 <(cat << EOF
790# Automatically generated by ${pkgname}-${pkgver} PKGBUILD from Arch Linux AUR
791# https://aur.archlinux.org/
792
793PACKAGE_NAME="${pkgname}"
794PACKAGE_VERSION="${pkgver}"
795AUTOINSTALL="yes"
796
797BUILT_MODULE_NAME[0]="${_modulename}"
798BUILT_MODULE_LOCATION[0]="driver/build"
799# Using all processors doesn't compile this tiny module any faster.
800MAKE[0]="make -j1 -C 'driver/build'"
801#CLEAN[0]="make -j1 -C 'driver/build' clean"
802# Placing the DKMS generated module in a different location than the standard install prevents conflicts when PKGBUILD _opt_DKMS is toggled
803DEST_MODULE_LOCATION[0]="/kernel/drivers/misc"
804EOF
805 ) "${_dkms}/dkms.conf"
806 install -dm755 "${_dkms}/driver/build/"
807 cp -pr 'driver/build/' "${_dkms}/driver/"
808 cp -pr 'commoninc/' "${_dkms}/"
809 install -pm644 'Makefile.inc' -t "${_dkms}/"
810 #sed -e 's:/usr/lib/modules/[^/]\+/:/usr/lib/modules/$(KERNELRELEASE)/:g' \
811 # -i "${_dkms}/driver/build/Makefile"
812 make -C "${_dkms}/driver/build/" clean
813 fi
814 set +u
815}
816
817set +u
818

Changes since previous scan

--- PKGBUILD @ 2026-10-15 00:28
+++ PKGBUILD @ 2026-11-01 00:21
@@ -106,7 +106,8 @@
#_pkgver='1.9-38'; _dl='81000137_Y.tgz'
#_pkgver='1.9-39'; _dl='40002086_Z.tgz'
#_pkgver='1.9-40'; _dl='40002086_AA.tgz'
-_pkgver='1.9-42'; _dl='40002086_AC.tgz'
+#_pkgver='1.9-42'; _dl='40002086_AC.tgz'
+_pkgver='1.9-45'; _dl='40002086_AE.tgz'
pkgver="${_pkgver//-/.}"
pkgrel='1'
pkgdesc="tty driver for Digi ${_opt_RealPort} ConnectPort EtherLite Flex One CM PortServer TS IBM RAN serial console terminal servers"
@@ -218,7 +219,7 @@
#source_i686=('http://ftp1.digi.com/support/utilities/40002890_A.tgz')
#source_x86_64=('http://ftp1.digi.com/support/utilities/40002889_A.tgz') # compiled i686 therefore worthless
# addp and sddp are incomplete. I replaced them with addp.pl
-md5sums=('b78ad8db7920566a199d7ba191daff3d'
+md5sums=('060bd87af7ab8e351724a9338ff50dd5'
'b4af5022ba96fcc2429263cfbbe85bae'
'9feebec170552c9186e713e7f5852e14'
'e9ae823e597f2b63d95e6d6a8e25cde3'
@@ -274,7 +275,7 @@
'a7b0e6bfebc82bf30ab6ed846bd64bf2'
'df025331e29fe36ed7d97b2ee661c990'
'4726b79fbe2c94db647be809c34ddff1')
-sha256sums=('f9fb258e85d70b7e89e8a4452401df01df3e23e8e423fb04f7bed3a0ea81e9b8'
+sha256sums=('d0cf2990c0db20fe5c7f58b7639f43fbda18b6666de66ae6ae2cac7ab4d923ea'
'42898b9d24262de27e9b1f3067d51d01373810b7c9e4991403a7f0a5dd7a26cf'
'66f8b106a052b4807513ace92978e5e6347cef08eee39e4b4ae31c60284cc0a3'
'9d79df8617e2bb1042a4b7d34311e73dc4afcdfe4dfa66703455ff54512427f5'
@@ -342,55 +343,34 @@
# Check for updates and case errors to the 2 mib lists
_fn_mibcheck() {
echo 'Checking for newer and misnamed MIB'
- local line
- local linea
- local file='/tmp/PKGBUILD.mibs'
- # Get list of files
- while IFS='' read -r line || [[ -n "${line}" ]]; do
- read -r -a linea <<<"${line}"
- line="${linea[8]}" # filename
- case "${line}" in
- 4000*.mib)
- echo "${line}" >> "${file}"
- ;;
- esac
- done < <(curl -s 'ftp://ftp1.digi.com/support/utilities/') # curl is sorted and case insensitive because Digi runs WSFTP. We can't assume this will be always so.
- # get list of latest files
- local lineu linep lineup
- lineup=''
- linep=''
- linea=()
- while IFS='' read -r line || [[ -n "${line}" ]]; do
- lineu="${line^^}"
- if [ "${lineup%%_*}" != "${lineu%%_*}" ] && [ ! -z "${linep}" ]; then
- linea+=("${linep}")
- fi
- lineup="${lineu}"
- linep="${line}"
- done < <(sort -f "${file}")
- rm -f "${file}"
- linea+=("${linep}")
- # Check against _mibs
- local found mib mibu
- for line in "${linea[@]}"; do
- lineu="${line^^}"
- found=0
- for mib in "${_mibs[@]}" "${_mibsdnw[@]}"; do
- mibu="${mib^^}"
- if [ "${lineu%%_*}" = "${mibu%%_*}" ]; then
- if [ "${lineu}" != "${mibu}" ]; then
- echo "${mib} has been updated to ${line}"
- elif [ "${line}" != "${mib}" ]; then
- echo "Case correction: ${mib} -> ${line}"
+
+ # download *mib file list from ftp
+ # remove doubles keeping newer versions
+ # check for case errors
+ curl -sl 'ftp://ftp1.digi.com/support/utilities/' | grep -E '4000.+\.mib' \
+ | sort -fr | sort -u -t _ -k 1,1 | sort -f \
+ | while read line
+ do
+ lineu="${line^^}"
+ found=0
+ # unclear what the original script wants to do here with _mibsdnw
+ # list seems to be "Do Not Want" but is added to the loop anyway
+ for mib in "${_mibs[@]}" "${_mibsdnw[@]}"; do
+ mibu="${mib^^}"
+ if [ "${lineu%%_*}" = "${mibu%%_*}" ]; then
+ if [ "${lineu}" != "${mibu}" ]; then
+ echo "${mib} has been updated to ${line}"
+ elif [ "${line}" != "${mib}" ]; then
+ echo "Case correction: ${mib} -> ${line}"
+ fi
+ found=1
+ break
fi
- found=1
- break
+ done
+ if [ "${found}" -eq 0 ]; then
+ echo "${line} is missing"
fi
done
- if [ "${found}" -eq 0 ]; then
- echo "${line} is missing"
- fi
- done
return 1
}
#_fn_mibcheck
@@ -503,7 +483,8 @@
_patches+=("0019-kernel-6.8-tty_driver.h-send_xchar-to-u8.patch")
fi
- if [ "$(vercmp "${pkgver}" '1.9.42')" -ge 0 ]; then
+ # not sure about version upper bound for those 2 patches
+ if [ "$(vercmp "${pkgver}" '1.9.42')" -ge 0 ] && [ "$(vercmp "${pkgver}" '1.9.44')" -le 0 ]; then
_patches+=("0019a-kernel-6.8-tty_driver.h-send_xchar-to-u8.patch")
_patches+=("0020-revert-POPULATED_KERNEL_HEADERS-for-DKMS.patch")
fi
@@ -511,7 +492,7 @@
local _pt _ptf=() _pts=()
for _pt in "${_patches[@]}"; do
set +u; msg2 "Patch ${_pt}"; set -u
- if patch -Nup1 -i "${srcdir}/${_pt}"; then
+ if patch -Nup1 --no-backup-if-mismatch -i "${srcdir}/${_pt}"; then
_pts+=("${_pt}")
else
_ptf+=("${_pt}")
@@ -606,7 +587,7 @@
-e '# Build with any specified kernel, not just the current one' \
-e 's:@MODDIR@:/usr/lib/modules/$(KERNELRELEASE):g' \
-e 's:@KERNEL_HEADERS@:/usr/lib/modules/$(KERNELRELEASE)/build:g' \
- -e '1i KERNELRELEASE?=$(shell uname -r)' \
+ -e '1i KERNELRELEASE ?= $(shell uname -r)' \
-i driver/*/Makefile*
# Branding in dmesg
@@ -643,7 +624,8 @@
}
# Copy this line into the .install file
-_daemons=('daemon' 'ditty')
+#_daemons=('daemon' 'ditty')
+_daemons=()
package() {
set -u
@@ -685,10 +667,11 @@
install -dm755 "${pkgdir}/etc/udev/rules.d/"
touch "${pkgdir}/${backup[0]}" # postinstall handles the pacsave file automatically
chmod 644 "${pkgdir}/${backup[0]}"
- if [ ! -s "${pkgdir}/tmp/dgrp/10-dgrp.rules" ]; then
- mv "${pkgdir}/etc/udev/rules.d/10-dgrp.rules" "${pkgdir}/tmp/dgrp/10-dgrp.rules" # 1.9-41
- fi
- sed -e 's:^KERNEL=="cu_dgrp:#&:g' -i "${pkgdir}/tmp/dgrp/10-dgrp.rules" # Recommended by Digi
+
+# if [ ! -s "${pkgdir}/tmp/dgrp/10-dgrp.rules" ]; then
+# mv "${pkgdir}/etc/udev/rules.d/10-dgrp.rules" "${pkgdir}/tmp/dgrp/10-dgrp.rules" # 1.9-41
+# fi
+ newrules=$(sed -e 's:^KERNEL=="cu_dgrp:#&:g' "${pkgdir}/etc/udev/rules.d/10-dgrp.rules") # Recommended by Digi
cat > "${pkgdir}/etc/udev/rules.d/10-dgrp.rules" << EOF
# Automatically generated by ${pkgname}-${pkgver} PKGBUILD from Arch Linux AUR
# https://aur.archlinux.org/
@@ -707,10 +690,15 @@
# Then copy this file into the folder with PKGBUILD.
-$(cat "${pkgdir}/tmp/dgrp/10-dgrp.rules")
+$(echo "$newrules")
EOF
- rm -f "${pkgdir}/tmp/dgrp/10-dgrp.rules"
- rmdir "${pkgdir}/tmp/dgrp" "${pkgdir}/tmp" # crashes if other files ever show up in /tmp/dgrp
+
+ if [ -d "${pkgdir}/tmp/dgrp" ]
+ then
+ rm -f "${pkgdir}/tmp/dgrp/10-dgrp.rules"
+ rmdir "${pkgdir}/tmp/dgrp" "${pkgdir}/tmp" # crashes if other files ever show up in /tmp/dgrp
+ fi
+
if [ ! -z "${_opt_defaultmode:-}" ]; then
sed -e 's:^\(KERNEL=="tty_dgrp\)\(.*\)$:\1\2, MODE="'"${_opt_defaultmode}"'", GROUP="'"${_opt_defaultgroup}"'":g' -i "${pkgdir}/etc/udev/rules.d/10-dgrp.rules"
fi
@@ -719,9 +707,10 @@
fi
chmod 644 "${pkgdir}/etc/udev/rules.d/10-dgrp.rules"
- install -Dpm755 "${pkgdir}/etc/init.d"/{dgrp_daemon,dgrp_ditty} -t "${pkgdir}/usr/bin/dgrp/daemon/"
- rm -f "${pkgdir}/etc/init.d"/{dgrp_daemon,dgrp_ditty}
- rmdir "${pkgdir}/etc/init.d"
+# TODO: test if dgrp_daemon / dgrp_ditty are present (binaries from older releases ?)
+# install -Dpm755 "${pkgdir}/etc/init.d"/{dgrp_daemon,dgrp_ditty} -t "${pkgdir}/usr/bin/dgrp/daemon/"
+# rm -f "${pkgdir}/etc/init.d"/{dgrp_daemon,dgrp_ditty}
+# rmdir "${pkgdir}/etc/init.d"
# systemd integration.
#install -dm755 "${pkgdir}/usr/lib/systemd/system/"
@@ -809,7 +798,7 @@
BUILT_MODULE_LOCATION[0]="driver/build"
# Using all processors doesn't compile this tiny module any faster.
MAKE[0]="make -j1 -C 'driver/build'"
-CLEAN[0]="make -j1 -C 'driver/build' clean"
+#CLEAN[0]="make -j1 -C 'driver/build' clean"
# Placing the DKMS generated module in a different location than the standard install prevents conflicts when PKGBUILD _opt_DKMS is toggled
DEST_MODULE_LOCATION[0]="/kernel/drivers/misc"
EOF

Scan history

Scanned at (UTC)SeverityRules
2026-11-01 00:21:48 Low 2
2026-10-31 00:07:41 Low 2
2026-10-30 00:29:30 Low 2
2026-10-29 00:13:55 Low 2
2026-10-28 00:06:54 Low 2
2026-10-27 00:23:28 Low 2
2026-10-26 00:12:40 Low 2
2026-10-25 00:20:48 Low 2
2026-10-24 00:14:55 Low 2
2026-10-23 00:02:19 Low 2
2026-10-22 00:13:10 Low 2
2026-10-21 00:12:50 Low 2
2026-10-20 00:10:31 Low 2
2026-10-19 00:03:55 Low 2
2026-10-18 00:06:55 Low 2
2026-10-17 00:21:55 Low 2
2026-10-16 07:15:06 Medium 1
2026-10-16 00:12:47 Low 2
2026-10-15 19:13:05 Medium 1
2026-10-15 00:28:05 Low 2

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion