diff options
author | Chris Severance | 2023-12-18 23:26:09 -0500 |
---|---|---|
committer | Chris Severance | 2023-12-18 23:26:09 -0500 |
commit | a90b652062381d40fbdbce7a20491f421ffa2835 (patch) | |
tree | 7282cae0389933e2bd1747d229eff2aaf6d0aa6b | |
parent | 27ef337cf690916a97ba8b9262dfa94a48d85d67 (diff) | |
download | aur-a90b652062381d40fbdbce7a20491f421ffa2835.tar.gz |
autu: Update to 8.00-7
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | 0012-kernel-6.6-struct-tty_operations-write-size_t.patch | 19 | ||||
-rw-r--r-- | 0013-kernel-6.3-tty_port_operations-int-to-bool.patch | 35 | ||||
-rw-r--r-- | PKGBUILD | 40 |
4 files changed, 90 insertions, 12 deletions
@@ -1,7 +1,7 @@ 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 = 8.00 - pkgrel = 6 + pkgrel = 7 url = http://www.comtrol.com/ install = nslink-install.sh arch = i686 @@ -35,6 +35,8 @@ pkgbase = nslink source = 0009-python3-nslink.patch source = 0010-kernel-6.1-TTY_DRIVER_MAGIC-remove-dead-code.patch source = 0011-kernel-6.0-set_termios-const-ktermios.patch + source = 0012-kernel-6.6-struct-tty_operations-write-size_t.patch + source = 0013-kernel-6.3-tty_port_operations-int-to-bool.patch md5sums = b59906d80268e69a24c211b398ffd10c md5sums = e3ffb36acfdd321c919e44d477f0774a md5sums = 581cd5f582ed20c7cf85a4df23a9f78a @@ -48,6 +50,8 @@ pkgbase = nslink md5sums = e21d8211b2f209ace648340cb5583805 md5sums = 2774e3aa64717a7613e96fd86f649ea1 md5sums = 98788ff1378604e9fda43eb6ef9e9e3d + md5sums = feb1ccc7522a6ac2b33326c7f648edb2 + md5sums = 1ff77ae8edbcd654c680999eadd4911b sha256sums = 092859a3c198f8e3f5083a752eab0af74ef71dce59ed503d120792be13cc5fa3 sha256sums = d21c5eeefdbf08a202a230454f0bf702221686ba3e663eb41852719bb20b75fb sha256sums = 5a4e2713a8d1fe0eebd94fc843839ce5daa647f9fa7d88f62507e660ae111073 @@ -61,5 +65,7 @@ pkgbase = nslink sha256sums = a84e1a9884580917afe55816b4ec9b44ec0f4977144e7f4325647ff58642ecd6 sha256sums = 2b909997f0662ae9a49463be4c1ef2af718882924071e0d74b9c04d9d1198691 sha256sums = 7f181d1542b542989b319caf85621725389d7681cf2d5c3bb57dc774d14f1b76 + sha256sums = 5a62d3658d716c8140de65c2ac2e2560ca33f0f2a58212e29df74eadb821b6ce + sha256sums = 4c605df9b08ea2be3b3c94a2dab8554902ff15576a7075c597453306c275e3e2 pkgname = nslink diff --git a/0012-kernel-6.6-struct-tty_operations-write-size_t.patch b/0012-kernel-6.6-struct-tty_operations-write-size_t.patch new file mode 100644 index 000000000000..9c3160411348 --- /dev/null +++ b/0012-kernel-6.6-struct-tty_operations-write-size_t.patch @@ -0,0 +1,19 @@ +diff -pNaru5 a/nslink.c b/nslink.c +--- a/nslink.c 2023-12-18 23:12:28.169040957 -0500 ++++ b/nslink.c 2023-12-18 23:12:57.762981307 -0500 +@@ -3745,11 +3745,15 @@ static void nrp_flush_chars(struct tty_s + * Our open source friends changed the tty layer in kernel version 2.6.10, removing + * the from_user parameter, presumable the memcpy() functions now can deal with + * copies to/from user space. There is therefore 2 versions of the following function. + */ + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(6,6,0) + static int nrp_write(struct tty_struct *tty, const unsigned char *buf, int count) ++#else ++static ssize_t nrp_write(struct tty_struct *tty, const unsigned char *buf, size_t count) ++#endif + { + struct nr_port *info = (struct nr_port *) tty->driver_data; + int c, retval = 0; + unsigned long flags; + diff --git a/0013-kernel-6.3-tty_port_operations-int-to-bool.patch b/0013-kernel-6.3-tty_port_operations-int-to-bool.patch new file mode 100644 index 000000000000..2c0e32fac64b --- /dev/null +++ b/0013-kernel-6.3-tty_port_operations-int-to-bool.patch @@ -0,0 +1,35 @@ +diff -pNaru5 a/nslink.c b/nslink.c +--- a/nslink.c 2023-12-18 23:19:31.601965492 -0500 ++++ b/nslink.c 2023-12-18 23:19:42.605279547 -0500 +@@ -2812,11 +2812,15 @@ static void configure_nr_port(struct nr_ + if (info->si->use_tcp == 0) + si_timer((callback_param_type)&info->si->timer); + } + } + ++#if LINUX_VERSION_CODE < VERSION_CODE(6,3,0) + static int nrp_port_carrier_raised(struct tty_port *port) ++#else ++static bool nrp_port_carrier_raised(struct tty_port *port) ++#endif + { + struct nr_port *info = container_of(port, struct nr_port, port); + unsigned msr = info->si->port_state[info->portnum].modemStatusRegister; + return (msr & MSR_CD_ON) ? 1 : 0; + } +@@ -2828,11 +2832,15 @@ static void send_commands(struct nr_port + si_timer((callback_param_type)&info->si->timer); + else + tcp_send_remote_cmds(info->si); + } + ++#if LINUX_VERSION_CODE < VERSION_CODE(6,3,0) + static void nrp_port_dtr_rts(struct tty_port *port, int on) ++#else ++static void nrp_port_dtr_rts(struct tty_port *port, bool on) ++#endif + { + struct nr_port *info = container_of(port, struct nr_port, port); + + if ((info->si->rsmode[info->portnum] == SI_RSMODE_485) || + (info->si->rsmode[info->portnum] == SI_RSMODE_485FDS)) @@ -3,6 +3,8 @@ _opt_DKMS=1 # This can be toggled between installs _opt_defaultmode='660' # default: 620 +#export KERNELRELEASE="$(basename $(dirname /usr/lib/modules/5.10.*/modules.alias))" + # Todo: Test secure mode # Todo: python tools should be updated to python3 @@ -25,7 +27,7 @@ _opt_defaultmode='660' # default: 620 set -u pkgname='nslink' pkgver='8.00' -pkgrel='6' +pkgrel='7' 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" @@ -58,6 +60,8 @@ source=( '0009-python3-nslink.patch' '0010-kernel-6.1-TTY_DRIVER_MAGIC-remove-dead-code.patch' '0011-kernel-6.0-set_termios-const-ktermios.patch' + '0012-kernel-6.6-struct-tty_operations-write-size_t.patch' + '0013-kernel-6.3-tty_port_operations-int-to-bool.patch' ) md5sums=('b59906d80268e69a24c211b398ffd10c' 'e3ffb36acfdd321c919e44d477f0774a' @@ -71,7 +75,9 @@ md5sums=('b59906d80268e69a24c211b398ffd10c' '8c329cf0f9c90cfd07ba86a4027eec48' 'e21d8211b2f209ace648340cb5583805' '2774e3aa64717a7613e96fd86f649ea1' - '98788ff1378604e9fda43eb6ef9e9e3d') + '98788ff1378604e9fda43eb6ef9e9e3d' + 'feb1ccc7522a6ac2b33326c7f648edb2' + '1ff77ae8edbcd654c680999eadd4911b') sha256sums=('092859a3c198f8e3f5083a752eab0af74ef71dce59ed503d120792be13cc5fa3' 'd21c5eeefdbf08a202a230454f0bf702221686ba3e663eb41852719bb20b75fb' '5a4e2713a8d1fe0eebd94fc843839ce5daa647f9fa7d88f62507e660ae111073' @@ -84,7 +90,9 @@ sha256sums=('092859a3c198f8e3f5083a752eab0af74ef71dce59ed503d120792be13cc5fa3' '1353bc403b56ef0b00f4b87826991812ee24bcc9a0b2612c0027317a7aa86736' 'a84e1a9884580917afe55816b4ec9b44ec0f4977144e7f4325647ff58642ecd6' '2b909997f0662ae9a49463be4c1ef2af718882924071e0d74b9c04d9d1198691' - '7f181d1542b542989b319caf85621725389d7681cf2d5c3bb57dc774d14f1b76') + '7f181d1542b542989b319caf85621725389d7681cf2d5c3bb57dc774d14f1b76' + '5a62d3658d716c8140de65c2ac2e2560ca33f0f2a58212e29df74eadb821b6ce' + '4c605df9b08ea2be3b3c94a2dab8554902ff15576a7075c597453306c275e3e2') if [ "${_opt_DKMS}" -ne 0 ]; then depends+=('linux' 'dkms' 'linux-headers') @@ -156,6 +164,14 @@ prepare() { # diff -pNaru5 'a' 'b' > '0011-kernel-6.0-set_termios-const-ktermios.patch' patch -Nup1 -i "${srcdir}/0011-kernel-6.0-set_termios-const-ktermios.patch" + #cd '..'; cp -pr "${_srcdir}" 'a'; ln -s "${_srcdir}" 'b'; false + # diff -pNaru5 'a' 'b' > '0012-kernel-6.6-struct-tty_operations-write-size_t.patch' + patch -Nup1 -i "${srcdir}/0012-kernel-6.6-struct-tty_operations-write-size_t.patch" + + #cd '..'; cp -pr "${_srcdir}" 'a'; ln -s "${_srcdir}" 'b'; false + # diff -pNaru5 'a' 'b' > '0013-kernel-6.3-tty_port_operations-int-to-bool.patch' + patch -Nup1 -i "${srcdir}/0013-kernel-6.3-tty_port_operations-int-to-bool.patch" + # Make package compatible #cp -p 'install.sh' 'install.sh.Arch' # testmode for diff comparison sed -e '# Fix some paths' \ @@ -204,10 +220,19 @@ prepare() { sed -e 's:^[^#]:#&:g' -i 'nslink.conf' # Fix makefile + #cp -p 'Makefile'{,.Arch} sed -e 's:=/lib/modules:=/usr/lib/modules:g' \ -e '# Switch SUBDIRS= to M= for Kernel 5.4' \ -e 's:SUBDIRS=:M=:g' \ + -e '# No DKMS instructions say to do this but it works and keeps the MAKE line real simple' \ + -e 's:$(shell uname -r):$(KERNELRELEASE):g' \ + -e 's:`uname -r`:$(KERNELRELEASE):g' \ + -e '#s:$(KVER):$(KERNELRELEASE):g' \ + -e '# Shift make executable to separate target' \ + -e 's@^\tmake nslinkd@\nnslink:\n&@g' \ + -e '1i KERNELRELEASE?=$(shell uname -r)' \ -i 'Makefile' + test ! -s 'Makefile.Arch' # Correct group and chmod for serial sed -e '/getgrnam/ s:"tty":"uucp":g' \ @@ -243,7 +268,7 @@ build() { set -u cd "${_srcdir}" set +u - if ! make -s -j1 QUIET=0; then + if ! make -j1 QUIET=0 all nslink; then warning 'a no such file or directory error means you need to reboot to load the updated kernel' false fi @@ -320,13 +345,6 @@ EOF ) "${_dkms}/dkms.conf" install -Dpm644 'nslink.h' 'nslink_int.h' 'version.h' 'nslink.c' 'Makefile' -t "${_dkms}" #make -C "${_dkms}" clean - sed -e '# No DKMS instructions say to do this but it works and keeps the MAKE line real simple' \ - -e 's:$(shell uname -r):$(KERNELRELEASE):g' \ - -e 's:`uname -r`:$(KERNELRELEASE):g' \ - -e 's:$(KVER):$(KERNELRELEASE):g' \ - -e '# Get rid of make lines so make all makes the module' \ - -e 's:^\s\+make\s:#&:g' \ - -i "${_dkms}/Makefile" fi # Install firmware updaters |