Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ser2net for openSUSE:Factory checked 
in at 2021-02-08 11:47:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ser2net (Old)
 and      /work/SRC/openSUSE:Factory/.ser2net.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ser2net"

Mon Feb  8 11:47:40 2021 rev:17 rq:870148 version:4.3.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/ser2net/ser2net.changes  2020-11-06 
23:44:54.927284873 +0100
+++ /work/SRC/openSUSE:Factory/.ser2net.new.28504/ser2net.changes       
2021-02-08 11:47:41.585735860 +0100
@@ -1,0 +2,10 @@
+Sat Feb  6 21:28:46 UTC 2021 - Martin Hauke <mar...@gmx.de>
+
+- Update to version 4.3.3
+  * Some minor bug fixes, including a long standing issue with UDP
+    that I finally tracked down. Nothing major, but upgrading is
+    recommended.
+- Update to version 4.3.1
+  * Lots of little cleanups and bug fixes.
+
+-------------------------------------------------------------------

Old:
----
  ser2net-4.3.0.tar.gz

New:
----
  ser2net-4.3.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ser2net.spec ++++++
--- /var/tmp/diff_new_pack.d6Iuzl/_old  2021-02-08 11:47:42.141736761 +0100
+++ /var/tmp/diff_new_pack.d6Iuzl/_new  2021-02-08 11:47:42.145736768 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ser2net
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # 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:        4.3.0
+Version:        4.3.3
 Release:        0
 Summary:        Serial port to network proxy
 License:        GPL-2.0-or-later

++++++ ser2net-4.3.0.tar.gz -> ser2net-4.3.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ser2net-4.3.0/README.rst new/ser2net-4.3.3/README.rst
--- old/ser2net-4.3.0/README.rst        2020-10-29 03:53:26.000000000 +0100
+++ new/ser2net-4.3.3/README.rst        2021-02-06 02:07:40.000000000 +0100
@@ -94,3 +94,105 @@
 
 They also require the ipmi_sim program from the OpenIPMI library at
 https://github.com/cminyard/openipmi to run the ipmisol tests.
+
+==================================
+A Complete Encrypted Example Setup
+==================================
+
+Lets suppose you have a server with serial port /dev/ttyUSB0 that you
+want to make available on the network, and you want the connection
+encrypted.  Here an example, after installing gensio and ser2net.
+
+Edit the ser2net configuration file::
+
+  sudo mkdir /etc/ser2net
+  sudo vi /etc/ser2net/ser2net.yaml
+
+The contents of ser2net.yaml should be::
+
+  %YAML 1.1
+  ---
+
+  define: &banner Connected to port \N(\d)\r\n
+
+  default:
+        name: local
+        value: true
+        class: serialdev
+
+  default:
+        name: mdns
+        value: true
+
+  default:
+        name: mdns-sysattrs
+        value: true
+
+  connection: &my-console
+        accepter: telnet(rfc2217),mux,certauth(),ssl,tcp,3001
+        connector: serialdev,/dev/ttyUSB0,115200N81
+        options:
+                banner: *banner
+
+Create a user for ser2net to run as::
+
+  sudo useradd -r -M -d /usr/share/ser2net -G dialout ser2net
+  sudo mkdir /usr/share/ser2net
+  sudo chown ser2net.ser2net /usr/share/ser2net
+
+You don't want to run ser2net as root, that's a bad security
+practice.  Now generate the server keys::
+
+  sudo gtlssh-keygen --keydir /etc/ser2net serverkey ser2net
+  sudo chown ser2net.ser2net /etc/ser2net/*
+
+ser2net's authentication directory is in /usr/share/ser2net/auth::
+
+  sudo -u ser2net mkdir /usr/share/ser2net/auth
+
+Now we must create the keys for logging in to the server.  You do this
+on your host system with gtlssh-keygen, assuming you haven't already
+done so.  Assume your userid is myuser, and you are logged in on the
+host system (not the server).  Generate the key::
+
+  gtlssh-keygen keygen
+
+And copy $HOME/.gtlssh/default.crt to the server.  You will put it in
+/usr/share/ser2net/auth/myuser/allowed_certs, and you want to give it
+a meaningful name.  General best practice is to have a separate key
+for every client system and put each key onto the target, so using the
+client name is good practice.
+
+Note: Do not copy the .key file anywhere else.  That is the file you
+need to keep secret.  Just copy the .crt file.
+
+So here we go (after the default.crt file is copied to the server)::
+
+  sudo -u ser2net mkdir -p /usr/share/ser2net/auth/myuser/allowed_certs
+  sudo -u ser2net cp default.crt \
+        /usr/share/ser2net/auth/myuser/allowed_certs/client.crt
+  sudo -u ser2net gtlssh-keygen rehash \
+        /usr/share/ser2net/auth/myuser/allowed_certs
+
+Don't forget the rehash step.  If you add or remove a key from
+allowed_certs, you have to rehash.
+
+Then start (or restart) ser2net and you should be set.  Make sure it
+runs as the user ser2net, like::
+
+  sudo -u ser2net ser2net
+
+From myuser on client, you can connect to the port::
+
+  gtlssh --telnet -p 3001 server
+
+If you have avahi enabled (it's usually on by default on modern
+systems) you can use mdns.  You may notice that mdns is configured in
+the ser2net configuration, so the name of the connection (my-console
+in this case) is available via mdns.  So you can just do::
+
+  gtlssh -m my-console
+
+and gtlssh will look up the mdns name, the port, if telnet is enabled,
+etc. and make the connection.  This only works on a local network,
+though, if you are bridged it won't work.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ser2net-4.3.0/configure.ac 
new/ser2net-4.3.3/configure.ac
--- old/ser2net-4.3.0/configure.ac      2020-10-29 03:53:26.000000000 +0100
+++ new/ser2net-4.3.3/configure.ac      2021-02-06 02:07:40.000000000 +0100
@@ -1,4 +1,4 @@
-AC_INIT([ser2net], [4.3.0], [miny...@acm.org])
+AC_INIT([ser2net], [4.3.3], [miny...@acm.org])
 AM_INIT_AUTOMAKE([-Wall])
 AC_PROG_CC
 AM_PROG_AR
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ser2net-4.3.0/dataxfer.c new/ser2net-4.3.3/dataxfer.c
--- old/ser2net-4.3.0/dataxfer.c        2020-10-29 03:53:26.000000000 +0100
+++ new/ser2net-4.3.3/dataxfer.c        2021-02-06 02:07:40.000000000 +0100
@@ -820,11 +820,14 @@
 static void
 s2n_flush(net_info_t *netcon, struct sergensio *sio, int val)
 {
-    struct sergensio *rsio = gensio_to_sergensio(netcon->port->io);
+    struct sergensio *port_rsio = gensio_to_sergensio(netcon->port->io);
+    struct sergensio *net_rsio = gensio_to_sergensio(netcon->net);
 
-    if (!rsio)
-       return;
-    sergensio_flush(rsio, val);
+    if (port_rsio)
+        sergensio_flush(port_rsio, val);
+
+    if (net_rsio)
+        sergensio_flush(net_rsio, val);
 }
 
 static void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ser2net-4.3.0/defaults.c new/ser2net-4.3.3/defaults.c
--- old/ser2net-4.3.0/defaults.c        2020-10-29 03:53:26.000000000 +0100
+++ new/ser2net-4.3.3/defaults.c        2021-02-06 02:07:40.000000000 +0100
@@ -109,6 +109,13 @@
                             SYSCONFDIR "/ser2net/ser2net.crt", 0);
     if (err)
        return err;
+#ifdef gensio_version_ge /* gensio_version_ge came in with 2.2.3 and 2.3.0 */
+    /* Print out a message on the socket if tcpd denies a connection. */
+    err = gensio_set_default(so, "tcp", "tcpd", "print", 0);
+    /* If GE_NOTFOUND is returned, that means gensio doesn't have tcpd. */
+    if (err && err != GE_NOTFOUND)
+       return err;
+#endif
     return 0;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ser2net-4.3.0/ser2net.c new/ser2net-4.3.3/ser2net.c
--- old/ser2net-4.3.0/ser2net.c 2020-10-29 03:53:26.000000000 +0100
+++ new/ser2net-4.3.3/ser2net.c 2021-02-06 02:07:40.000000000 +0100
@@ -196,6 +196,10 @@
            *is_yaml = strncmp(in_buf, "%YAML", 5) == 0;
        fseek(instream, 0, SEEK_SET);
     }
+    if (!*is_yaml)
+       fprintf(stderr,
+         "ser2net:WARNING: Using old config file format, this will go away\n"
+         "soon.  Please switch to the yaml-based format.\n");
     return instream;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ser2net-4.3.0/ser2net.yaml.5 
new/ser2net-4.3.3/ser2net.yaml.5
--- old/ser2net-4.3.0/ser2net.yaml.5    2020-10-29 03:53:26.000000000 +0100
+++ new/ser2net-4.3.3/ser2net.yaml.5    2021-02-06 02:07:40.000000000 +0100
@@ -593,8 +593,8 @@
 The following default values are specific to ser2net, given with their
 default values:
 .TP
-.B telnet_brk_on_sync: false
-If a telnet is received, send a break on the connected gensio (if
+.B telnet-brk-on-sync: false
+If a telnet sync is received, send a break on the connected gensio (if
 applicable).  By default data is flushed until the data mark, but no
 break is sent.
 .TP
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ser2net-4.3.0/ser2net_str.c 
new/ser2net-4.3.3/ser2net_str.c
--- old/ser2net-4.3.0/ser2net_str.c     2020-10-29 03:53:26.000000000 +0100
+++ new/ser2net-4.3.3/ser2net_str.c     2021-02-06 02:07:40.000000000 +0100
@@ -187,7 +187,7 @@
                    op(data, val);
                    return;
                }
-               if (!isdigit(*s))
+               if (!isxdigit(*s))
                    continue;
                val = (val * 16) + from_hex_digit(*s);
                op(data, val);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ser2net-4.3.0/tests/ipmisimdaemon.py 
new/ser2net-4.3.3/tests/ipmisimdaemon.py
--- old/ser2net-4.3.0/tests/ipmisimdaemon.py    2020-10-29 03:53:26.000000000 
+0100
+++ new/ser2net-4.3.3/tests/ipmisimdaemon.py    2021-02-06 02:07:40.000000000 
+0100
@@ -42,7 +42,7 @@
 \n
   endlan\n
 \n
-  sol "/dev/ttyPipeB0" 115200\n
+  sol "/dev/ttyPipeB0" 115200 nortscts\n
 \n
   # Start startcmd at startup?  Default is false.\n
   startnow false\n
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ser2net-4.3.0/tests/test_rfc2217.py 
new/ser2net-4.3.3/tests/test_rfc2217.py
--- old/ser2net-4.3.0/tests/test_rfc2217.py     2020-10-29 03:53:26.000000000 
+0100
+++ new/ser2net-4.3.3/tests/test_rfc2217.py     2021-02-06 02:07:40.000000000 
+0100
@@ -169,6 +169,8 @@
     def op(self, io1, io2):
         sio1 = io1.cast_to_sergensio()
         sio1.sg_flowcontrol_s(gensio.SERGENSIO_FLOWCONTROL_XON_XOFF)
+        if utils.gensio_version_ge("2.3.0-rc1"):
+            return termioschk.dup_base_termios(iflags=termios.IXON)
         return termioschk.dup_base_termios(iflags=termios.IXON | termios.IXOFF)
 
 termioschk.test_ser2net_termios("xon/xoff rfc2217 settings",
@@ -393,7 +395,7 @@
     io1.handler.set_compare("12345")
     if (io1.handler.wait_timeout(1000) == 0):
         raise Exception("%s: %s: Timed out waiting for banner" %
-                        (name, io1.handler.name))
+                        (io1.handler.name))
 
     io1.read_cb_enable(True);
     io2.read_cb_enable(True);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ser2net-4.3.0/tests/test_tty_base.py 
new/ser2net-4.3.3/tests/test_tty_base.py
--- old/ser2net-4.3.0/tests/test_tty_base.py    2020-10-29 03:53:26.000000000 
+0100
+++ new/ser2net-4.3.3/tests/test_tty_base.py    2021-02-06 02:07:40.000000000 
+0100
@@ -1,6 +1,7 @@
 #!/usr/bin/python3
 import termioschk
 import termios
+import utils
 
 class basehandler:
     def op(self, io1, io2):
@@ -117,6 +118,8 @@
 
 class xonhandler:
     def op(self, io1, io2):
+        if utils.gensio_version_ge("2.3.0-rc1"):
+            return termioschk.dup_base_termios(iflags=termios.IXON)
         return termioschk.dup_base_termios(iflags=(termios.IXON |
                                                    termios.IXANY |
                                                    termios.IXOFF))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ser2net-4.3.0/tests/utils.py 
new/ser2net-4.3.3/tests/utils.py
--- old/ser2net-4.3.0/tests/utils.py    2020-10-29 03:53:26.000000000 +0100
+++ new/ser2net-4.3.3/tests/utils.py    2021-02-06 02:07:40.000000000 +0100
@@ -14,6 +14,38 @@
 
 debug = 0
 
+def split_version(v):
+    vs = v.split(".")
+    vs2 = vs[2].split("-")
+    if len(vs2) > 1:
+        vs = (int(vs[0]), int(vs[1]), int(vs2[0]), vs2[1])
+    else:
+        vs = (int(vs[0]), int(vs[1]), int(vs[2]), "")
+    return vs
+
+def gensio_version_ge(v):
+    """Return True if the gensio version is >= version v, False if not"""
+    try:
+        gv = gensio.version
+    except Exception as E:
+        return True # Versions with a version macro are older than we care 
about
+
+    gvs = split_version(gv)
+    vs = split_version(v)
+    if int(vs[0]) < int(gvs[0]):
+        return True
+    if int(vs[0]) > int(gvs[0]):
+        return False
+    if int(vs[1]) < int(gvs[1]):
+        return True
+    if int(vs[1]) > int(gvs[1]):
+        return False
+    if int(vs[2]) < int(gvs[2]):
+        return True
+    if int(vs[2]) > int(gvs[2]):
+        return False
+    return vs[3] <= gvs[3]
+
 class Logger:
     def gensio_log(self, level, log):
         print("***%s log: %s" % (level, log))

Reply via email to