Hello community,

here is the log from the commit of package python-smbprotocol for 
openSUSE:Factory checked in at 2018-12-31 09:47:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-smbprotocol (Old)
 and      /work/SRC/openSUSE:Factory/.python-smbprotocol.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-smbprotocol"

Mon Dec 31 09:47:17 2018 rev:2 rq:662056 version:0.1.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-smbprotocol/python-smbprotocol.changes    
2018-12-10 12:28:57.778489519 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-smbprotocol.new.28833/python-smbprotocol.changes
 2018-12-31 09:47:54.990141379 +0100
@@ -1,0 +2,8 @@
+Sat Dec 29 14:10:26 UTC 2018 - mar...@gmx.de
+
+- Update to version 0.1.1
+  * Fix initial negotiate message not setting connection timeout
+    value.
+  * Fix endless loop when running a compound message that failed.
+
+-------------------------------------------------------------------

Old:
----
  python-smbprotocol-0.1.0.tar.gz

New:
----
  python-smbprotocol-0.1.1.tar.gz

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

Other differences:
------------------
++++++ python-smbprotocol.spec ++++++
--- /var/tmp/diff_new_pack.2r3f46/_old  2018-12-31 09:47:55.454140999 +0100
+++ /var/tmp/diff_new_pack.2r3f46/_new  2018-12-31 09:47:55.458140995 +0100
@@ -13,11 +13,12 @@
 # published by the Open Source Initiative.
 
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
+#
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-smbprotocol
-Version:        0.1.0
+Version:        0.1.1
 Release:        0
 Summary:        Interact with a server using the SMB 2/3 Protocol
 License:        MIT
@@ -25,7 +26,6 @@
 URL:            https://github.com/jborean93/smbprotocol
 #Source:         
https://files.pythonhosted.org/packages/source/s/smbprotocol/smbprotocol-%%{version}.tar.gz
 Source:         
https://github.com/jborean93/smbprotocol/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
-BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
@@ -39,8 +39,8 @@
 BuildRequires:  %{python_module cryptography >= 2.0}
 BuildRequires:  %{python_module ntlm-auth}
 BuildRequires:  %{python_module pyasn1}
-BuildRequires:  %{python_module six}
 BuildRequires:  %{python_module pytest}
+BuildRequires:  %{python_module six}
 %python_subpackages
 
 %description

++++++ python-smbprotocol-0.1.0.tar.gz -> python-smbprotocol-0.1.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/smbprotocol-0.1.0/.travis.yml 
new/smbprotocol-0.1.1/.travis.yml
--- old/smbprotocol-0.1.0/.travis.yml   2018-03-07 00:59:21.000000000 +0100
+++ new/smbprotocol-0.1.1/.travis.yml   2018-09-14 02:25:45.000000000 +0200
@@ -3,11 +3,18 @@
 language: python
 
 python:
-- "2.6"
-- "2.7"
-- "3.4"
-- "3.5"
-- "3.6"
+- 2.6
+- 2.7
+- 3.4
+- 3.5
+- 3.6
+
+# Python 3.7 requires 16.04 (Xenial), this is a hack to get that specific
+# distro running that version until I can swap the rest over officially
+matrix:
+  include:
+  - python: 3.7
+    dist: xenial
 
 services:
 - docker
@@ -22,10 +29,12 @@
 
 install:
 - docker run -d -p $SMB_PORT:445 -v $(pwd)/build-scripts:/app -w /app -e 
SMB_USER=$SMB_USER -e SMB_PASSWORD=$SMB_PASSWORD -e SMB_SHARE=$SMB_SHARE 
centos:7 /bin/bash /app/setup_samba.sh;
-- pip install -U pip setuptools
+- pip install --upgrade pip setuptools
 - pip install .
 - pip install -r requirements-test.txt
-- pip install python-coveralls
+- pip install coveralls
+# make sure the Samba service on the container is up and running
+- python ./build-scripts/check_samba.py
 
 script:
 - py.test -v --instafail --pep8 --cov smbprotocol --cov-report term-missing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/smbprotocol-0.1.0/CHANGELOG.md 
new/smbprotocol-0.1.1/CHANGELOG.md
--- old/smbprotocol-0.1.0/CHANGELOG.md  2018-03-07 00:59:21.000000000 +0100
+++ new/smbprotocol-0.1.1/CHANGELOG.md  2018-09-14 02:25:45.000000000 +0200
@@ -1,6 +1,12 @@
 # Changelog
 
-## 0.0.1 (Unreleased)
+## 0.1.1 - 2018-09-14
+
+* Fix initial negotiate message not setting connection timeout value
+* Fix endless loop when running a compound message that failed
+
+
+## 0.1.0 - 2018-03-07
 
 Initial release of smbprotocol, it contains the following features
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/smbprotocol-0.1.0/README.md 
new/smbprotocol-0.1.1/README.md
--- old/smbprotocol-0.1.0/README.md     2018-03-07 00:59:21.000000000 +0100
+++ new/smbprotocol-0.1.1/README.md     2018-09-14 02:25:45.000000000 +0200
@@ -30,7 +30,7 @@
 
 ## Requirements
 
-* Python 2.6, 2.7, 3.4-3.6
+* Python 2.6, 2.7, 3.4+
 * For Kerberos auth 
[python-gssapi](https://github.com/pythongssapi/python-gssapi)
 
 To use Kerberos authentication, further dependencies are required, to install
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/smbprotocol-0.1.0/appveyor.yml 
new/smbprotocol-0.1.1/appveyor.yml
--- old/smbprotocol-0.1.0/appveyor.yml  2018-03-07 00:59:21.000000000 +0100
+++ new/smbprotocol-0.1.1/appveyor.yml  2018-09-14 02:25:45.000000000 +0200
@@ -20,6 +20,8 @@
   - PYTHON: Python35-x64
   - PYTHON: Python36
   - PYTHON: Python36-x64
+  - PYTHON: Python37
+  - PYTHON: Python37-x64
 
 init:
 - ps: |
@@ -38,12 +40,12 @@
     Set-SmbServerConfiguration -RequireSecuritySignature $true -Force
 
 install:
-- ps: |
-    pip install -U pip setuptools
-    pip install .
-    pip install -r requirements-test.txt
+- cmd: python -m pip install --upgrade pip
+- cmd: pip install --upgrade setuptools
+- cmd: pip install .
+- cmd: pip install -r requirements-test.txt
 
 build: off  # Do not run MSBuild, build stuff at install step
 
 test_script:
-- ps: py.test -v --instafail --pep8 --cov smbprotocol --cov-report term-missing
+- cmd: py.test -v --instafail --pep8 --cov smbprotocol --cov-report 
term-missing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/smbprotocol-0.1.0/build-scripts/check_samba.py 
new/smbprotocol-0.1.1/build-scripts/check_samba.py
--- old/smbprotocol-0.1.0/build-scripts/check_samba.py  1970-01-01 
01:00:00.000000000 +0100
+++ new/smbprotocol-0.1.1/build-scripts/check_samba.py  2018-09-14 
02:25:45.000000000 +0200
@@ -0,0 +1,41 @@
+import os
+import time
+import uuid
+
+from smbprotocol.connection import Connection
+
+
+def test_connection(server, port):
+    conn = Connection(uuid.uuid4(), server, port=port)
+    print("Opening connection to %s:%d" % (server, port))
+    conn.connect(timeout=5)
+    try:
+        print("Connection successful, sending ECHO request")
+        conn.echo()
+    finally:
+        conn.disconnect(True)
+
+
+if __name__ == '__main__':
+    server = os.environ.get("SMB_SERVER", "127.0.0.1")
+    port = int(os.environ.get("SMB_PORT", 445))
+    print("Waiting for Docker container SMB server to be online")
+
+    attempt = 1
+    total_attempts = 20
+    while attempt < total_attempts:
+        print("Starting attempt %d" % attempt)
+        try:
+            test_connection(server, port)
+            break
+        except Exception as e:
+            print("Connection attempt %d failed: %s" % (attempt, str(e)))
+            attempt += 1
+            if attempt == total_attempts:
+                raise Exception("Timeout while waiting for SMB server to come "
+                                "online")
+
+            print("Sleeping for 5 seconds before next attempt")
+            time.sleep(5)
+
+    print("Connection successful")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/smbprotocol-0.1.0/setup.py 
new/smbprotocol-0.1.1/setup.py
--- old/smbprotocol-0.1.0/setup.py      2018-03-07 00:59:21.000000000 +0100
+++ new/smbprotocol-0.1.1/setup.py      2018-09-14 02:25:45.000000000 +0200
@@ -14,7 +14,7 @@
 
 setup(
     name='smbprotocol',
-    version='0.1.0',
+    version='0.1.1',
     packages=['smbprotocol'],
     install_requires=[
         'cryptography>=2.0',
@@ -48,5 +48,6 @@
         'Programming Language :: Python :: 3.4',
         'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: 3.6',
+        'Programming Language :: Python :: 3.7',
     ],
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/smbprotocol-0.1.0/smbprotocol/connection.py 
new/smbprotocol-0.1.1/smbprotocol/connection.py
--- old/smbprotocol-0.1.0/smbprotocol/connection.py     2018-03-07 
00:59:21.000000000 +0100
+++ new/smbprotocol-0.1.1/smbprotocol/connection.py     2018-09-14 
02:25:45.000000000 +0200
@@ -737,7 +737,7 @@
         omitted as they can be retrieved by the Server object stored in
         self.server
 
-        :param guid: A uniqure guid that represents the client
+        :param guid: A unique guid that represents the client
         :param server_name: The server to start the connection
         :param port: The port to use for the transport, default is 445
         :param require_signing: Whether signing is required on SMB messages
@@ -1351,7 +1351,7 @@
         request = self.send(neg_req)
         self.preauth_integrity_hash_value.append(request.message)
 
-        response = self.receive(request, timeout)
+        response = self.receive(request, timeout=timeout)
         log.info("Receiving SMB2 Negotiate response")
         log.debug(str(response))
         self.preauth_integrity_hash_value.append(response)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/smbprotocol-0.1.0/smbprotocol/transport.py 
new/smbprotocol-0.1.1/smbprotocol/transport.py
--- old/smbprotocol-0.1.0/smbprotocol/transport.py      2018-03-07 
00:59:21.000000000 +0100
+++ new/smbprotocol-0.1.1/smbprotocol/transport.py      2018-09-14 
02:25:45.000000000 +0200
@@ -115,6 +115,8 @@
         while len(bytes) < buffer:
             try:
                 data = self._sock.recv(buffer - len(bytes))
+                if data == b"" and bytes == b"" and not wait:
+                    return
                 bytes += data
             except socket.error as err:
                 if err.errno not in [errno.EAGAIN, errno.EWOULDBLOCK]:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/smbprotocol-0.1.0/tests/test_open.py 
new/smbprotocol-0.1.1/tests/test_open.py
--- old/smbprotocol-0.1.0/tests/test_open.py    2018-03-07 00:59:21.000000000 
+0100
+++ new/smbprotocol-0.1.1/tests/test_open.py    2018-09-14 02:25:45.000000000 
+0200
@@ -1767,7 +1767,6 @@
             messages = [
                 file1.write(b"\x01\x02\x03\x04", 0, send=False),
                 file2.write(b"\x05\x06", 0, send=False),
-                file1.flush(send=False),
                 file1.read(0, 4, send=False),
                 open.query_directory("*",
                                      FileInformationClass.
@@ -1789,14 +1788,13 @@
                 responses.append(response)
 
             # assert each response
-            assert len(responses) == 7
+            assert len(responses) == 6
             assert isinstance(responses[0], int)
             assert isinstance(responses[1], int)
-            assert isinstance(responses[2], SMB2FlushResponse)
-            assert isinstance(responses[3], bytes)
-            assert isinstance(responses[4], list)
+            assert isinstance(responses[2], bytes)
+            assert isinstance(responses[3], list)
+            assert isinstance(responses[4], SMB2CloseResponse)
             assert isinstance(responses[5], SMB2CloseResponse)
-            assert isinstance(responses[6], SMB2CloseResponse)
 
             write1 = responses[0]
             assert write1 == 4
@@ -1804,10 +1802,10 @@
             write2 = responses[1]
             assert write2 == 2
 
-            read1 = responses[3]
+            read1 = responses[2]
             assert read1 == b"\x01\x02\x03\x04"
 
-            query1 = responses[4]
+            query1 = responses[3]
             assert query1[0]['file_name'].get_value() == \
                 ".".encode('utf-16-le')
             assert query1[1]['file_name'].get_value() == \
@@ -1863,7 +1861,6 @@
             messages = [
                 file1.write(b"\x01\x02\x03\x04", 0, send=False),
                 file2.write(b"\x05\x06", 0, send=False),
-                file1.flush(send=False),
                 file1.read(0, 4, send=False),
                 open.query_directory("*",
                                      FileInformationClass.
@@ -1885,14 +1882,13 @@
                 responses.append(response)
 
             # assert each response
-            assert len(responses) == 7
+            assert len(responses) == 6
             assert isinstance(responses[0], int)
             assert isinstance(responses[1], int)
-            assert isinstance(responses[2], SMB2FlushResponse)
-            assert isinstance(responses[3], bytes)
-            assert isinstance(responses[4], list)
+            assert isinstance(responses[2], bytes)
+            assert isinstance(responses[3], list)
+            assert isinstance(responses[4], SMB2CloseResponse)
             assert isinstance(responses[5], SMB2CloseResponse)
-            assert isinstance(responses[6], SMB2CloseResponse)
 
             write1 = responses[0]
             assert write1 == 4
@@ -1900,10 +1896,10 @@
             write2 = responses[1]
             assert write2 == 2
 
-            read1 = responses[3]
+            read1 = responses[2]
             assert read1 == b"\x01\x02\x03\x04"
 
-            query1 = responses[4]
+            query1 = responses[3]
             assert query1[0]['file_name'].get_value() == \
                 ".".encode('utf-16-le')
             assert query1[1]['file_name'].get_value() == \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/smbprotocol-0.1.0/tox.ini 
new/smbprotocol-0.1.1/tox.ini
--- old/smbprotocol-0.1.0/tox.ini       2018-03-07 00:59:21.000000000 +0100
+++ new/smbprotocol-0.1.1/tox.ini       2018-09-14 02:25:45.000000000 +0200
@@ -1,5 +1,5 @@
 [tox]
-envlist = py26,py27,py34,py35,py36
+envlist = py26,py27,py34,py35,py36,py37
 
 [testenv]
 deps= -rrequirements-test.txt


Reply via email to