diff options
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | 0001-kernel-5.13-dropped-tty_check_change.patch | 2 | ||||
-rw-r--r-- | 0006-kernel-6.0-set_termios-const-ktermios.patch | 4 | ||||
-rw-r--r-- | 0007-kernel-6.6-struct-tty_operations-write-size_t.patch | 42 | ||||
-rw-r--r-- | PKGBUILD | 35 |
5 files changed, 75 insertions, 21 deletions
@@ -1,7 +1,7 @@ pkgbase = trueport pkgdesc = tty driver for Perle IOLan+ DS TS SDS STS SCS JetStream LanStream LinkStream and 3rd party serial console terminal device servers pkgver = 6.10.0.1 - pkgrel = 4 + pkgrel = 5 url = https://www.perle.com/ install = trueport-install.sh arch = i686 @@ -33,23 +33,26 @@ pkgbase = trueport source = 0004-kernel-6.1-TTY_DRIVER_MAGIC-remove-dead-code.patch source = 0005-kernel-6.1-kernel_termios_to_user_termios_1-copy_to_user.patch source = 0006-kernel-6.0-set_termios-const-ktermios.patch + source = 0007-kernel-6.6-struct-tty_operations-write-size_t.patch md5sums = 5a529676de30706133255ba4e8dae5b0 md5sums = 56444e2f404aa2e6a2c9e8e2bd919fcf md5sums = fb798f306553cb253b30ff5af5ba2f40 - md5sums = a103f2791c03733b1fd75493864fb464 + md5sums = 91a070a4d13c13108dd980ce39ba36b9 md5sums = 5206e863cf6340c05325d86935d4b40c md5sums = f464a0217b85a76657bcb7aa022f9a95 md5sums = 835219e7c692cc699ec23f4e183f70bf md5sums = 2cc11aa436180b3daabad46d1b6bf3fb - md5sums = f9cb0fd97631bfbe1adae4c65cf23155 + md5sums = 291a8307fa6a6e651ee0a98eb1cba50c + md5sums = a06df58cd27782179eb2b75f965df62a sha256sums = c21340a7523593da3e229b79cfbcf9e656772b2039e972dbca3947d138d55ffa sha256sums = 28863731fd99e447dc456312ef33e40f93623b56da0d345e45f40e238ca49639 sha256sums = 5f806246751d3a91c59bd97273221d1066006bafc7ed598c3d93f9b7bdae65a1 - sha256sums = 88181bc7a0a5fa5a1320cbed20e02e1329b03b4c9800fc691990754b9a9aac18 + sha256sums = 8c84111b927912ee002ba7e0f398ff02e067bffa02e6bedcf1cd08138362040c sha256sums = ee64f971753fb4fd8a488e32e8fe3de9c468a00a1d1b995329bcfe87c93cedf7 sha256sums = 04025f2dc6fe868e890853e355d1d31fff6d3c463ad89db1cedda5f3843078a3 sha256sums = 31ffbbe3de9605aa5c974e92b24c22876c8091eac3c1ada8bb83c76ad829cc8c sha256sums = 1ed2794858d1268e53d73f3d4a34a4d2bf84a24ffbfa8babca7ce10e97e60d6c - sha256sums = 106c1f10c0d132759c10d5fa7b3aa9594aa142b6cd718c0428805a112a8351dd + sha256sums = ad25f2d413ddd05c5561afea3e8d5b9e5b7859e5855bdb1da63c7a6f26f69599 + sha256sums = c4e7b750ac573ec035c2da643d73736feae741fabd86e460efe51d8086cd3138 pkgname = trueport diff --git a/0001-kernel-5.13-dropped-tty_check_change.patch b/0001-kernel-5.13-dropped-tty_check_change.patch index 2cf2f167ec72..b5e666881666 100644 --- a/0001-kernel-5.13-dropped-tty_check_change.patch +++ b/0001-kernel-5.13-dropped-tty_check_change.patch @@ -7,7 +7,7 @@ diff -pNaru5 trueport-6.10.0.orig/ptyx/ptys.c trueport-6.10.0/ptyx/ptys.c // //***************************************************************************** -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,13,0) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,180) +int tty_check_change(struct tty_struct *tty); +#endif + diff --git a/0006-kernel-6.0-set_termios-const-ktermios.patch b/0006-kernel-6.0-set_termios-const-ktermios.patch index 0c1be7ad349c..f66c622a8baa 100644 --- a/0006-kernel-6.0-set_termios-const-ktermios.patch +++ b/0006-kernel-6.0-set_termios-const-ktermios.patch @@ -7,7 +7,7 @@ diff -pNaru5 a/ptyx/ptym.c b/ptyx/ptym.c } -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(6,0,0)) ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(6,1,0)) static void ptyx_master_set_termios(struct tty_struct *tty, STRUCT_TERMIOS *old_termios) +#else +static void ptyx_master_set_termios(struct tty_struct *tty, const STRUCT_TERMIOS *old_termios) @@ -26,7 +26,7 @@ diff -pNaru5 a/ptyx/ptys.c b/ptyx/ptys.c } -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,0,0) ++#if LINUX_VERSION_CODE < KERNEL_VERSION(6,1,0) static void ptyx_slave_set_termios(struct tty_struct *tty, STRUCT_TERMIOS *old_termios) +#else +static void ptyx_slave_set_termios(struct tty_struct *tty, const STRUCT_TERMIOS *old_termios) diff --git a/0007-kernel-6.6-struct-tty_operations-write-size_t.patch b/0007-kernel-6.6-struct-tty_operations-write-size_t.patch new file mode 100644 index 000000000000..294e819a1bbf --- /dev/null +++ b/0007-kernel-6.6-struct-tty_operations-write-size_t.patch @@ -0,0 +1,42 @@ +diff -pNaru5 a/ptyx/ptym.c b/ptyx/ptym.c +--- a/ptyx/ptym.c 2023-12-18 23:38:08.679181001 -0500 ++++ b/ptyx/ptym.c 2023-12-18 23:38:14.429154266 -0500 +@@ -229,12 +229,17 @@ static int ptyx_master_write(struct tty_ + + return c; + } + #else // greater than or equal to 2.6.10 + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(6,6,0) + static int ptyx_master_write(struct tty_struct * tty, + const unsigned char *buf, int count) ++#else ++static ssize_t ptyx_master_write(struct tty_struct * tty, ++ const unsigned char *buf, size_t count) ++#endif + { + struct ptyx_struct *ptyx_info; + struct tty_struct *s_tty; + unsigned long flags; + int c = 0; +diff -pNaru5 a/ptyx/ptys.c b/ptyx/ptys.c +--- a/ptyx/ptys.c 2023-12-18 23:38:08.679181001 -0500 ++++ b/ptyx/ptys.c 2023-12-18 23:38:23.225780119 -0500 +@@ -292,12 +292,17 @@ static int ptyx_slave_write(struct tty_s + ptyx_info->icount.tx += c; + + return c; + } + #else // greater than or equal to 2.6.10 ++#if LINUX_VERSION_CODE < KERNEL_VERSION(6,6,0) + static int ptyx_slave_write(struct tty_struct * tty, + const unsigned char *buf, int count) ++#else ++static ssize_t ptyx_slave_write(struct tty_struct * tty, ++ const unsigned char *buf, size_t count) ++#endif + { + struct ptyx_struct *ptyx_info; + struct tty_struct *m_tty; + unsigned long flags; + int c = 0; @@ -19,6 +19,8 @@ _opt_defaultmode='666' # default: 660 _opt_Debug=0 # 0 for no symbols, 1 for symbols +#export KERNELRELEASE="$(basename $(dirname /usr/lib/modules/5.10.*/modules.alias))" + # The following two must be different and exactly two letters, and likely # lowercase. # This is experimental and changed at your own risk! @@ -97,7 +99,7 @@ _dlver='6.10.0-1' pkgver="${_dlver//-/.}" #_dlver='6.8.0-2' # only use this with a version change patch set _srcdir="${pkgname}-${_dlver%%-*}" -pkgrel='4' +pkgrel='5' pkgdesc='tty driver for Perle IOLan+ DS TS SDS STS SCS JetStream LanStream LinkStream and 3rd party serial console terminal device servers' _pkgdescshort='Perle TruePort driver for Ethernet serial servers' arch=('i686' 'x86_64') @@ -128,25 +130,28 @@ source=( '0004-kernel-6.1-TTY_DRIVER_MAGIC-remove-dead-code.patch' '0005-kernel-6.1-kernel_termios_to_user_termios_1-copy_to_user.patch' '0006-kernel-6.0-set_termios-const-ktermios.patch' + '0007-kernel-6.6-struct-tty_operations-write-size_t.patch' ) md5sums=('5a529676de30706133255ba4e8dae5b0' '56444e2f404aa2e6a2c9e8e2bd919fcf' 'fb798f306553cb253b30ff5af5ba2f40' - 'a103f2791c03733b1fd75493864fb464' + '91a070a4d13c13108dd980ce39ba36b9' '5206e863cf6340c05325d86935d4b40c' 'f464a0217b85a76657bcb7aa022f9a95' '835219e7c692cc699ec23f4e183f70bf' '2cc11aa436180b3daabad46d1b6bf3fb' - 'f9cb0fd97631bfbe1adae4c65cf23155') + '291a8307fa6a6e651ee0a98eb1cba50c' + 'a06df58cd27782179eb2b75f965df62a') sha256sums=('c21340a7523593da3e229b79cfbcf9e656772b2039e972dbca3947d138d55ffa' '28863731fd99e447dc456312ef33e40f93623b56da0d345e45f40e238ca49639' '5f806246751d3a91c59bd97273221d1066006bafc7ed598c3d93f9b7bdae65a1' - '88181bc7a0a5fa5a1320cbed20e02e1329b03b4c9800fc691990754b9a9aac18' + '8c84111b927912ee002ba7e0f398ff02e067bffa02e6bedcf1cd08138362040c' 'ee64f971753fb4fd8a488e32e8fe3de9c468a00a1d1b995329bcfe87c93cedf7' '04025f2dc6fe868e890853e355d1d31fff6d3c463ad89db1cedda5f3843078a3' '31ffbbe3de9605aa5c974e92b24c22876c8091eac3c1ada8bb83c76ad829cc8c' '1ed2794858d1268e53d73f3d4a34a4d2bf84a24ffbfa8babca7ce10e97e60d6c' - '106c1f10c0d132759c10d5fa7b3aa9594aa142b6cd718c0428805a112a8351dd') + 'ad25f2d413ddd05c5561afea3e8d5b9e5b7859e5855bdb1da63c7a6f26f69599' + 'c4e7b750ac573ec035c2da643d73736feae741fabd86e460efe51d8086cd3138') if [ "${_opt_DKMS}" -ne 0 ]; then depends+=('linux' 'dkms' 'linux-headers') @@ -200,6 +205,10 @@ prepare() { # diff -pNaru5 'a' 'b' > '0006-kernel-6.0-set_termios-const-ktermios.patch' patch -Nup1 -i "${srcdir}/0006-kernel-6.0-set_termios-const-ktermios.patch" + #cd '..'; cp -pr "${_srcdir}" 'a'; ln -s "${_srcdir}" 'b'; false + # diff -pNaru5 'a' 'b' > '0007-kernel-6.6-struct-tty_operations-write-size_t.patch' + patch -Nup1 -i "${srcdir}/0007-kernel-6.6-struct-tty_operations-write-size_t.patch" + # insert parameters and make install script non interactive. set +u; msg2 'Checking SSL with rpm_build'; set -u sed -e 's:^\(DONE\)=.*$:'"\1='done';SSL='${_opt_SSL}':g" \ @@ -224,6 +233,14 @@ prepare() { -e 's:^bindir=:#&:g' \ -e '# Fix /lib' \ -e 's:/lib/modules:/usr&: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 '# DKMS sets KERNELRELEASE which accidentally launches phase 2 of this Makefile' \ + -e '# Fix by changing the detection var.' \ + -e '# SUBDIRS makes more sense to me because I can see it in the Makefile!' \ + -e 's:^ifeq ($(KERNELRELEASE):ifeq ($(SUBDIRS):g' \ + -e '1i KERNELRELEASE?=$(shell uname -r)' \ -i 'ptyx/Makefile' # Remove CRLF line endings from some files @@ -350,14 +367,6 @@ EOF install -Dpm644 ptyx/* -t "${_dkms}/ptyx/" rm "${_dkms}/ptyx/modules.order" install -pm644 'tp_ver.h' 'tp.h' -t "${_dkms}/" - 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 '# DKMS sets KERNELRELEASE which accidentally launches phase 2 of this Makefile' \ - -e '# Fix by changing the detection var.' \ - -e '# SUBDIRS makes more sense to me because I can see it in the Makefile!' \ - -e 's:^ifeq ($(KERNELRELEASE):ifeq ($(SUBDIRS):g' \ - -i "${_dkms}/ptyx/Makefile" make -s -C "${_dkms}/ptyx/" KERNELRELEASE="$(uname -r)" clean fi set +u |