summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Severance2018-06-18 21:36:23 -0400
committerChris Severance2018-06-18 21:36:23 -0400
commit0ac0c2fb9bd83b0d8af9607648ea4068396e4ee6 (patch)
tree9fa91b4344cf485f8868fe4e9e67cd38d9e229a3
parent2a8ada8285cf7f7f770e247e3166f08fd7cd4e2f (diff)
downloadaur-0ac0c2fb9bd83b0d8af9607648ea4068396e4ee6.tar.gz
autu: Update to 7.28-4
-rw-r--r--.SRCINFO6
-rw-r--r--0000-Invalid-MKDEV-macro.patch26
-rw-r--r--PKGBUILD59
3 files changed, 75 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index efb54cc4bc9..b50a471b40b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Wed May 30 23:51:06 UTC 2018
+# Tue Jun 19 01:36:22 UTC 2018
pkgbase = nslink
pkgdesc = tty driver and firmware update for Comtrol DeviceMaster, RTS, LT, PRO, 500, UP, RPSH-SI, RPSH, and Serial port Hub console terminal device server
pkgver = 7.28
- pkgrel = 3
+ pkgrel = 4
url = http://www.comtrol.com/
install = nslink-install.sh
arch = i686
@@ -26,10 +26,12 @@ pkgbase = nslink
source = http://downloads.comtrol.com/dev_mstr/rts/drivers/linux/devicemaster-linux-7.28.tar.gz
source = http://downloads.comtrol.com/dev_mstr/rts/utility/linux_firmware_uploader/DM-Firmware-Updater-1.06.tar.gz
source = dmupdate.py.usage.patch
+ source = 0000-Invalid-MKDEV-macro.patch
source = http://downloads.comtrol.com/legacy/dev_mstr/rts/drivers/linux/7.26/devicemaster-linux-7.26.tar.gz
sha256sums = 900d0681a86d0732cf3e71e56a013456d5a77a68f7faa2afb955e275f73353fb
sha256sums = d21c5eeefdbf08a202a230454f0bf702221686ba3e663eb41852719bb20b75fb
sha256sums = 5a4e2713a8d1fe0eebd94fc843839ce5daa647f9fa7d88f62507e660ae111073
+ sha256sums = 6968b10cd66d783f86f587a03584e78af4a2766d223b8d5c24c3ea4fe79f7230
sha256sums = 5c00939eb945c98336211cd61408b5a8623b01a7059356e663ccc638b0d159fb
pkgname = nslink
diff --git a/0000-Invalid-MKDEV-macro.patch b/0000-Invalid-MKDEV-macro.patch
new file mode 100644
index 00000000000..19f32351c76
--- /dev/null
+++ b/0000-Invalid-MKDEV-macro.patch
@@ -0,0 +1,26 @@
+--- nslinkd.c.orig 2018-01-05 11:01:23.000000000 -0500
++++ nslinkd.c 2018-06-18 18:06:27.399852118 -0400
+@@ -40,10 +40,11 @@
+ #include <netinet/tcp.h>
+ #include <arpa/inet.h>
+ #include <netpacket/packet.h>
+ #include <net/if.h>
+ #include <netdb.h>
++#include <linux/kdev_t.h>
+
+ #include "nslink.h"
+ #include "nslinkd.h"
+ #include "version.h"
+
+@@ -216,11 +217,10 @@ static void put_pid_file()
+
+ /*
+ * Create a device if it doesn't exist and have the correct device
+ * number or major/minor number.
+ */
+-#define MKDEV(a,b) ((int)((((a) & 0xff) << 8) | ((b) & 0xff)))
+
+
+ static void create_device(const char *prefix, int major, int num, gid_t def_group)
+ {
+ char name[80];
diff --git a/PKGBUILD b/PKGBUILD
index 3fcffa62af8..6248a4276d9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,9 +1,8 @@
# Maintainer: Chris Severance aur.severach aATt spamgourmet dott com
_opt_DKMS=1 # This can be toggled between installs
-#_opt_defaultmode='666' # default: 660
+_opt_defaultmode='660' # default: 620
-# Todo: Implement _opt_defaultmode
# Todo: Test secure mode
# Todo: python tools should be updated to python3
@@ -11,6 +10,9 @@ _opt_DKMS=1 # This can be toggled between installs
# Todo: TUI firmware updater.
# Todo: Comtrol icons for nslinktool and the firmware updater
# Todo: nslinktool set the mouse pointer to a spinning circle far too long after startup
+# Todo: rm /dev/ttySI* on rmmod nslink
+
+# Todo: nslinktool, HUB IP Admin, [Get] with SocketServer, error getting IP info, did not get ip6info reply
# Uninstall cleanup: sudo rm -f /etc/nslink.conf*
@@ -20,7 +22,7 @@ _opt_DKMS=1 # This can be toggled between installs
set -u
pkgname='nslink'
pkgver='7.28'
-pkgrel='3'
+pkgrel='4'
pkgdesc='tty driver and firmware update for Comtrol DeviceMaster, RTS, LT, PRO, 500, UP, RPSH-SI, RPSH, and Serial port Hub console terminal device server'
# UP is not explicitly supported by NS-Link, only by the firmware updater.
_pkgdescshort="Comtrol DeviceMaster ${pkgname} TTY driver"
@@ -42,9 +44,11 @@ source=("http://downloads.comtrol.com/dev_mstr/rts/drivers/linux/devicemaster-li
#source+=('ftp://ftp.comtrol.com/dev_mstr/rts/utility/linux_firmware_uploader/DM-Firmware-Updater-1.06.tar.gz')
source+=('http://downloads.comtrol.com/dev_mstr/rts/utility/linux_firmware_uploader/DM-Firmware-Updater-1.06.tar.gz')
source+=('dmupdate.py.usage.patch')
+source+=('0000-Invalid-MKDEV-macro.patch')
sha256sums=('900d0681a86d0732cf3e71e56a013456d5a77a68f7faa2afb955e275f73353fb'
'd21c5eeefdbf08a202a230454f0bf702221686ba3e663eb41852719bb20b75fb'
'5a4e2713a8d1fe0eebd94fc843839ce5daa647f9fa7d88f62507e660ae111073'
+ '6968b10cd66d783f86f587a03584e78af4a2766d223b8d5c24c3ea4fe79f7230'
'5c00939eb945c98336211cd61408b5a8623b01a7059356e663ccc638b0d159fb')
if [ "${_opt_DKMS}" -ne 0 ]; then
@@ -60,27 +64,34 @@ if [ "${_opt_DKMS}" -ne 0 ]; then
# 7.28 supports Kernels 4.15 through 4.17.x.
_opt_LEGACY_VER='7.26'
if [ "$(vercmp "${pkgver}" "${_opt_LEGACY_VER}")" -gt 0 ]; then
- source+=("http://downloads.comtrol.com/legacy/dev_mstr/rts/drivers/linux/${_opt_LEGACY_VER}/devicemaster-linux-${_opt_LEGACY_VER}.tar.gz")
+ _srcalt="${_srcdir//${pkgver}/${_opt_LEGACY_VER}}"
+ source+=("http://downloads.comtrol.com/legacy/dev_mstr/rts/drivers/linux/${_opt_LEGACY_VER}/${_srcalt}.tar.gz")
else
_opt_LEGACY_VER=''
fi
fi
-prepare() {
- set -u
- cd "${_srcdir}"
+_fn_patch_km() {
+ set +u; msg2 "patch_km $1"; set -u
# Fix permissions
find -type 'f' -perm '/111' -exec chmod 644 '{}' '+'
chmod 755 *.sh *.py 'nslinktool'
- local _ver="$(sed -n -e 's:^#define\sSI_VERSION\s"\([^"]\+\).*$:\1:p' 'version.h')"
- if [ "${pkgver}" != "${_ver}" ]; then
- echo "Version mismatch ${pkgver} != ${_ver}"
+
+ #diff -pNau5 nslinkd.c{.orig,} > '0000-Invalid-MKDEV-macro.patch'
+ patch -Nbup0 -i "${srcdir}/0000-Invalid-MKDEV-macro.patch"
+
+ # Version check
+ local _ver
+ _ver="$(sed -n -e 's:^#define\sSI_VERSION\s"\([^"]\+\).*$:\1:p' 'version.h')"
+ if [ "$1" != "${_ver}" ]; then
+ echo "Version mismatch $1 != ${_ver}"
set +u
false
fi
unset _ver
+ # Make package compatible
#cp -p 'install.sh' 'install.sh.Arch' # testmode for diff comparison
sed -e '# Fix some paths' \
-e 's: /lib/: /usr/lib/:g' \
@@ -103,7 +114,7 @@ prepare() {
-e '# Get rid of the start messages lest someone believes them' \
-e 's:^\s\+if\s\[\s"$WillStart"\s=\syes\s\]:return\n&:g' \
-i 'install.sh'
- test -s 'install.sh.Arch' && echo "${}"
+ test ! -s 'install.sh.Arch' || echo "${}"
# Switch to python2
sed -e '# Why using local on just this one?' \
@@ -127,6 +138,24 @@ prepare() {
# Fix makefile
sed -e 's:=/lib/modules:=/usr/lib/modules:g' -i 'Makefile'
+ # Correct group and chmod for serial
+ sed -e '/getgrnam/ s:"tty":"uucp":g' \
+ -e '# This method results in 666' \
+ -e '#s:\(mode_t mode\) = [0-9]\+\(.*;\)'":\1 = ${_opt_defaultmode}\2:g" \
+ -e "/mknod/ s:mode:0${_opt_defaultmode}:g" \
+ -i 'nslinkd.c'
+}
+
+prepare() {
+ set -u
+ cd "${_srcdir}"
+ _fn_patch_km "${pkgver}"
+ if [ ! -z "${_opt_LEGACY_VER}" ]; then
+ pushd "${srcdir}/${_srcalt}" > /dev/null
+ _fn_patch_km "${_opt_LEGACY_VER}"
+ popd > /dev/null
+ fi
+
# Fix up the firmware downloaders
cd "${srcdir}/${_srcdir2}"
@@ -142,8 +171,7 @@ prepare() {
# Patch usage and help into command line tool
#diff -pNau5 dmupdate.py{.orig,} > '../dmupdate.py.usage.patch'
- patch -Nbup0 < "${srcdir}/dmupdate.py.usage.patch"
-
+ patch -Nbup0 -i "${srcdir}/dmupdate.py.usage.patch"
set +u
}
@@ -167,7 +195,7 @@ package() {
_kernelversionsmall="${_kernelversionsmall%%-*}"
_kernelversionsmall="${_kernelversionsmall%\.0}" # trim 4.0.0 -> 4.0, 4.1.0 -> 4.1
# prevent the mksrcinfo bash emulator from getting these vars!
- eval 'conf''licts=("linux>${_kernelversionsmall}" "linux<${_kernelversionsmall}")'
+ #eval 'conf''licts=("linux>${_kernelversionsmall}" "linux<${_kernelversionsmall}")'
eval 'dep''ends+=("linux=${_kernelversionsmall}")'
fi
@@ -249,6 +277,9 @@ _fn_dkmsinst() {
install -Dm744 <(cat << EOF
#!/usr/bin/bash
+# Automatically generated by ${pkgname}-${pkgver} PKGBUILD from Arch Linux AUR
+# https://aur.archlinux.org/
+
set -e
set -u