From 61f21e4b9c98274eb84062863063f5c7f6de2690250c114bcf8676ca353a335e Mon Sep 17 00:00:00 2001 From: Andreas Stieger Date: Mon, 23 Mar 2015 08:08:33 +0000 Subject: [PATCH] Accepting request 292380 from home:posophe:branches:network:utilities update OBS-URL: https://build.opensuse.org/request/show/292380 OBS-URL: https://build.opensuse.org/package/show/network:utilities/ser2net?expand=0&rev=9 --- ser2net-2.10.0.tar.gz | 3 +++ ser2net-2.9.1.tar.gz | 3 --- ser2net-config.patch | 11 +++++++--- ser2net.changes | 50 +++++++++++++++++++++++++++++++++++++++++++ ser2net.spec | 9 +++----- 5 files changed, 64 insertions(+), 12 deletions(-) create mode 100644 ser2net-2.10.0.tar.gz delete mode 100644 ser2net-2.9.1.tar.gz diff --git a/ser2net-2.10.0.tar.gz b/ser2net-2.10.0.tar.gz new file mode 100644 index 0000000..328c3c2 --- /dev/null +++ b/ser2net-2.10.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98f6193225338e25f35302fef5e1f16688693ed43e7b3c3e9e09187eb54547ac +size 364322 diff --git a/ser2net-2.9.1.tar.gz b/ser2net-2.9.1.tar.gz deleted file mode 100644 index 08ebf57..0000000 --- a/ser2net-2.9.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fdee1e69903cf409bdc6f32403a566cbc6006aa9e2a4d6f8f12b90dfd5ca0d0e -size 357820 diff --git a/ser2net-config.patch b/ser2net-config.patch index e9a5a3e..b5f9bf8 100644 --- a/ser2net-config.patch +++ b/ser2net-config.patch @@ -1,6 +1,6 @@ --- ser2net-2.9.1.orig/ser2net.conf +++ ser2net-2.9.1/ser2net.conf -@@ -108,23 +108,26 @@ OPENSTR:open1:Open str\r\n +@@ -115,26 +115,29 @@ CLOSESTR:close1:close str\r\n @@ -29,16 +29,21 @@ +#3011:telnet:3:/dev/ttyS0:19200 banner2 #3002:telnet:0:/dev/ttyS1:9600 -3003:telnet:0:/dev/ttyS2:9600 banner3 --3003:telnet:0:/dev/ttyS2:9600 signature1 +-3003:telnet:0:/dev/ttyS2:9600 signature1 rs485=rs485port1 -3004:telnet:0:/dev/ttyS3:115200 -3005:telnet:0:/dev/ttyS4:9600 -3006:telnet:0:/dev/ttyS5:9600 open1 -3007:telnet:0:/dev/ttyS6:9600 close1 -5001:rawlp:10:/dev/lp0 +#3003:telnet:0:/dev/ttyS2:9600 banner3 -+#3003:telnet:0:/dev/ttyS2:9600 signature1 ++#3003:telnet:0:/dev/ttyS2:9600 signature1 rs485=rs485port1 +#3004:telnet:0:/dev/ttyS3:115200 +#3005:telnet:0:/dev/ttyS4:9600 +#3006:telnet:0:/dev/ttyS5:9600 open1 +#3007:telnet:0:/dev/ttyS6:9600 close1 +#5001:rawlp:10:/dev/lp0 + +-3020:telnet:0:/dev/ttyUSB0:9600 banner1 remctl asdfasd +-3021:telnet:0:/dev/ttyUSB1:9600 banner2 open1 close1 remctl ++#3020:telnet:0:/dev/ttyUSB0:9600 banner1 remctl asdfasd ++#3021:telnet:0:/dev/ttyUSB1:9600 banner2 open1 close1 remctl diff --git a/ser2net.changes b/ser2net.changes index b3734b3..39099fb 100644 --- a/ser2net.changes +++ b/ser2net.changes @@ -1,3 +1,53 @@ +------------------------------------------------------------------- +Mon Mar 23 01:37:22 UTC 2015 - p.drouand@gmail.com + +- Update to version 2.10.0 + * utils.c, controller.c, dataxfer.c: Return an errno from + scan_tcp_port() so it can return an out of memory error. + * controller.c, controller.h, ser2net.c: Add an out of memory + return code from controller_init(). + * utils.c, utils.h, dataxfer.c, controller.c: Rework the handling + of addresses to work properly with all the return values of + getaddrinfo, and to prefer IPV6 over IPV4 when opening the socket. + This means if you specify a number, it will open the IPV6 ::,port + address first. This was a big cleanup, and moved a lot of the + base socket handling into utils.h. + * dataxfer.c: Rework the stdio handling so it doesn't rely on the + port number in the address, since that is now gone. + * dataxfer.c: Set port->closestr to NULL when freeing it to avoid + a double-free. + * readconfig.c, ser2net.8: Rework the input handling so an IPV6 + can be specified as part of the portnum parameter. This was hard + because IPV6 addresses have ':' in them. Basically, if there is a + "," in the port specification, assume that everything from the + beginning of the line to the ':' after the ',' is the port number. + * utils.c, utils.h, dataxfer.c, controller.c: Modified address + handling so that ser2net opens all the addresses returned by + getaddrinfo, not just the first one. That should make things + work correctly in a lot more cases. + * io.h, devcfg.h, devcfg.c, dataxfer.c, buffer.c, buffer.h: Abstract + the device I/O operations. + * utils.c, utils.h, controller.h, controller.c: Fix some const + correctness issues + * conroller.c, controller.h: Add printf-style output. + * dataxfer.h, dataxfer.c, devcfg.h, devcfg.c, io.h, readconfig: + Rework the error and output handling to make it more flexible, so + errors can be output with useful information from the lower + * utils.h, readconfig.c, dataxfer.c: Rework the find_xxx + functions to return a strdup of the string. + * dataxfer.c, dataxfer.h, devcfg.h: Remove the dinfo structure + and move the contents into the port structure, and remove the + now empty devcfg.h. + * configure.ac: Minor rework. + * ser2net.h, Makefile.am: Move some things into a new + ser2net.h file. + * devcfg.c, controller.c, dataxfer.c, ser2net.c, utils.c: Add the + ser2net.h include file. + * dataxfer.c: Fix some EAGAIN handling. +- Require systemd-rpm-macros instead of pkgconfig(systemd) +- Remove redundant %clean section +- Update ser2net-config.patch + ------------------------------------------------------------------- Thu Mar 20 19:47:15 UTC 2014 - crrodriguez@opensuse.org diff --git a/ser2net.spec b/ser2net.spec index 0786861..65955e5 100644 --- a/ser2net.spec +++ b/ser2net.spec @@ -1,7 +1,7 @@ # # spec file for package ser2net # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: ser2net -Version: 2.9.1 +Version: 2.10.0 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build Url: http://ser2net.sourceforge.net/ @@ -26,7 +26,7 @@ Source2: ser2net.service Summary: Serial port to network proxy License: GPL-2.0+ Group: Productivity/Networking/Other -BuildRequires: pkgconfig(systemd) +BuildRequires: systemd-rpm-macros Patch0: ser2net-config.patch %{?systemd_requires} @@ -48,9 +48,6 @@ monitoring ports, and controlling ports. %{__install} -D -m 0644 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf %{__install} -D -m 0644 %{S:2} %{buildroot}%{_unitdir}/ser2net.service -%clean -rm -rf $RPM_BUILD_ROOT - %pre %service_add_pre ser2net.service