dgrp

maintainer severach · 1 votes · scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged The package builds a kernel driver from Digi's official source archive hosted on their domain; the non-whitelisted URL is a standard project release location, and the source is intended to be built locally, which is normal for AUR packages.

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 90%): The package builds a kernel driver from Digi's official source archive hosted on their domain; the non-whitelisted URL is a standard project release location, and the source is intended to be built locally, which is normal for AUR packages.

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

Scan history

Scanned at (UTC)SeverityRules
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

Report a package

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

0 / 4000
Your suggestion