Hello community, here is the log from the commit of package python-netifaces for openSUSE:Factory checked in at 2019-06-01 09:45:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-netifaces (Old) and /work/SRC/openSUSE:Factory/.python-netifaces.new.5148 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-netifaces" Sat Jun 1 09:45:09 2019 rev:14 rq:705225 version:0.10.9 Changes: -------- --- /work/SRC/openSUSE:Factory/python-netifaces/python-netifaces.changes 2018-09-14 00:01:00.909970959 +0200 +++ /work/SRC/openSUSE:Factory/.python-netifaces.new.5148/python-netifaces.changes 2019-06-01 09:45:22.463408791 +0200 @@ -1,0 +2,9 @@ +Fri May 24 11:00:13 UTC 2019 - pgajdos@suse.com + +- version update to 0.10.9 + * Fixed a bug that in certain circumstances could lead to an infinite + loop in netifaces.gateways() (thanks asomers). + * Fixed a memory management bug in an error path (thanks NicoPy). +- created a small test + +------------------------------------------------------------------- Old: ---- netifaces-0.10.7.tar.gz New: ---- LICENSE netifaces-0.10.9.tar.gz test.py ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-netifaces.spec ++++++ --- /var/tmp/diff_new_pack.1SbBey/_old 2019-06-01 09:45:23.127408564 +0200 +++ /var/tmp/diff_new_pack.1SbBey/_new 2019-06-01 09:45:23.127408564 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-netifaces # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2011 Novell # # All modifications and additions to the file contributed by third parties @@ -13,19 +13,22 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-netifaces -Version: 0.10.7 +Version: 0.10.9 Release: 0 Summary: Portable network interface information License: MIT Group: Development/Languages/Python -Url: http://alastairs-place.net/projects/netifaces/ -Source: https://pypi.io/packages/source/n/netifaces/netifaces-%{version}.tar.gz +Url: https://github.com/al45tair/netifaces +Source0: https://pypi.io/packages/source/n/netifaces/netifaces-%{version}.tar.gz +# https://github.com/al45tair/netifaces/issues/40 +Source1: https://raw.githubusercontent.com/al45tair/netifaces/master/LICENSE +Source2: https://raw.githubusercontent.com/al45tair/netifaces/master/test.py BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: python-rpm-macros @@ -48,6 +51,7 @@ %prep %setup -q -n netifaces-%{version} +cp %{SOURCE1} %{SOURCE2} . %build %python_build @@ -55,8 +59,12 @@ %install %python_install +%check +%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} $python test.py | grep 'Interface lo' + %files %{python_files} %defattr(-,root,root,-) +%license LICENSE %doc README.rst %{python_sitearch}/* ++++++ LICENSE ++++++ Copyright (c) 2007-2018 Alastair Houghton Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++++++ netifaces-0.10.7.tar.gz -> netifaces-0.10.9.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netifaces-0.10.7/LICENSE new/netifaces-0.10.9/LICENSE --- old/netifaces-0.10.7/LICENSE 1970-01-01 01:00:00.000000000 +0100 +++ new/netifaces-0.10.9/LICENSE 2018-12-12 11:41:00.000000000 +0100 @@ -0,0 +1,19 @@ +Copyright (c) 2007-2018 Alastair Houghton + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netifaces-0.10.7/MANIFEST.in new/netifaces-0.10.9/MANIFEST.in --- old/netifaces-0.10.7/MANIFEST.in 1970-01-01 01:00:00.000000000 +0100 +++ new/netifaces-0.10.9/MANIFEST.in 2019-01-02 20:04:55.000000000 +0100 @@ -0,0 +1 @@ +include LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netifaces-0.10.7/PKG-INFO new/netifaces-0.10.9/PKG-INFO --- old/netifaces-0.10.7/PKG-INFO 2018-05-02 11:15:38.000000000 +0200 +++ new/netifaces-0.10.9/PKG-INFO 2019-01-02 20:11:00.000000000 +0100 @@ -1,12 +1,12 @@ Metadata-Version: 1.1 Name: netifaces -Version: 0.10.7 +Version: 0.10.9 Summary: Portable network interface information. Home-page: https://github.com/al45tair/netifaces Author: Alastair Houghton Author-email: alastair@alastairs-place.net License: MIT License -Description: netifaces 0.10.7 +Description: netifaces 0.10.8 ================ +-------------+------------------+ @@ -42,8 +42,8 @@ First you need to install it, which you can do by typing:: - tar xvzf netifaces-0.10.7.tar.gz - cd netifaces-0.10.7 + tar xvzf netifaces-0.10.8.tar.gz + cd netifaces-0.10.8 python setup.py install **Note that you will need the relevant developer tools for your platform**, @@ -183,27 +183,7 @@ 4. What license is this under? ------------------------------ - It's an MIT-style license. Here goes: - - Copyright (c) 2007-2018 Alastair Houghton - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. + It's an MIT-style license. See `LICENSE <./LICENSE>`_. 5. Why the jump to 0.10.0? -------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netifaces-0.10.7/README.rst new/netifaces-0.10.9/README.rst --- old/netifaces-0.10.7/README.rst 2018-05-02 09:45:31.000000000 +0200 +++ new/netifaces-0.10.9/README.rst 2019-01-02 10:18:10.000000000 +0100 @@ -1,4 +1,4 @@ -netifaces 0.10.7 +netifaces 0.10.8 ================ +-------------+------------------+ @@ -34,8 +34,8 @@ First you need to install it, which you can do by typing:: - tar xvzf netifaces-0.10.7.tar.gz - cd netifaces-0.10.7 + tar xvzf netifaces-0.10.8.tar.gz + cd netifaces-0.10.8 python setup.py install **Note that you will need the relevant developer tools for your platform**, @@ -175,27 +175,7 @@ 4. What license is this under? ------------------------------ -It's an MIT-style license. Here goes: - -Copyright (c) 2007-2018 Alastair Houghton - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +It's an MIT-style license. See `LICENSE <./LICENSE>`_. 5. Why the jump to 0.10.0? -------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netifaces-0.10.7/netifaces.c new/netifaces-0.10.9/netifaces.c --- old/netifaces-0.10.7/netifaces.c 2018-05-02 09:11:57.000000000 +0200 +++ new/netifaces-0.10.9/netifaces.c 2019-01-02 10:17:08.000000000 +0100 @@ -340,7 +340,7 @@ static int string_from_sockaddr (struct sockaddr *addr, char *buffer, - int buflen) + size_t buflen) { struct sockaddr* bigaddr = 0; int failure; @@ -437,7 +437,7 @@ static int string_from_netmask (struct sockaddr *addr, char *buffer, - int buflen) + size_t buflen) { #ifdef AF_INET6 if (addr && addr->sa_family == AF_INET6) { @@ -507,7 +507,7 @@ sprintf (pfxbuf, "/%u", prefix); - if (bufend - bufptr > strlen(pfxbuf)) + if (bufend - bufptr > (int)strlen(pfxbuf)) strcpy (bufptr, pfxbuf); if (buflen) @@ -2007,7 +2007,7 @@ buffer = ptr; ret = sysctl (mib, 6, buffer, &len, 0, 0); - } while (ret != 0 || errno == ENOMEM || errno == EINTR); + } while (ret != 0 && (errno == ENOMEM || errno == EINTR)); if (ret < 0) { PyErr_SetFromErrno (PyExc_OSError); @@ -2073,12 +2073,12 @@ } if (addr == RTA_GATEWAY) { - char buffer[256]; + char strbuf[256]; PyObject *tuple = NULL; PyObject *deftuple = NULL; - if (string_from_sockaddr (sa, buffer, sizeof(buffer)) == 0) { - PyObject *pyaddr = PyUnicode_FromString (buffer); + if (string_from_sockaddr (sa, strbuf, sizeof(strbuf)) == 0) { + PyObject *pyaddr = PyUnicode_FromString (strbuf); #ifdef RTF_IFSCOPE PyObject *isdefault = PyBool_FromLong (!(msg->rtm_flags & RTF_IFSCOPE)); #else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netifaces-0.10.7/netifaces.egg-info/PKG-INFO new/netifaces-0.10.9/netifaces.egg-info/PKG-INFO --- old/netifaces-0.10.7/netifaces.egg-info/PKG-INFO 2018-05-02 11:15:38.000000000 +0200 +++ new/netifaces-0.10.9/netifaces.egg-info/PKG-INFO 2019-01-02 20:11:00.000000000 +0100 @@ -1,12 +1,12 @@ Metadata-Version: 1.1 Name: netifaces -Version: 0.10.7 +Version: 0.10.9 Summary: Portable network interface information. Home-page: https://github.com/al45tair/netifaces Author: Alastair Houghton Author-email: alastair@alastairs-place.net License: MIT License -Description: netifaces 0.10.7 +Description: netifaces 0.10.8 ================ +-------------+------------------+ @@ -42,8 +42,8 @@ First you need to install it, which you can do by typing:: - tar xvzf netifaces-0.10.7.tar.gz - cd netifaces-0.10.7 + tar xvzf netifaces-0.10.8.tar.gz + cd netifaces-0.10.8 python setup.py install **Note that you will need the relevant developer tools for your platform**, @@ -183,27 +183,7 @@ 4. What license is this under? ------------------------------ - It's an MIT-style license. Here goes: - - Copyright (c) 2007-2018 Alastair Houghton - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. + It's an MIT-style license. See `LICENSE <./LICENSE>`_. 5. Why the jump to 0.10.0? -------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netifaces-0.10.7/netifaces.egg-info/SOURCES.txt new/netifaces-0.10.9/netifaces.egg-info/SOURCES.txt --- old/netifaces-0.10.7/netifaces.egg-info/SOURCES.txt 2018-05-02 11:15:38.000000000 +0200 +++ new/netifaces-0.10.9/netifaces.egg-info/SOURCES.txt 2019-01-02 20:11:00.000000000 +0100 @@ -1,3 +1,5 @@ +LICENSE +MANIFEST.in README.rst netifaces.c setup.cfg diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netifaces-0.10.7/setup.cfg new/netifaces-0.10.9/setup.cfg --- old/netifaces-0.10.7/setup.cfg 2018-05-02 11:15:38.000000000 +0200 +++ new/netifaces-0.10.9/setup.cfg 2019-01-02 20:11:00.000000000 +0100 @@ -3,3 +3,6 @@ tag_date = 0 tag_svn_revision = 0 +[metadata] +license_file = LICENSE + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netifaces-0.10.7/setup.py new/netifaces-0.10.9/setup.py --- old/netifaces-0.10.7/setup.py 2018-05-02 09:45:09.000000000 +0200 +++ new/netifaces-0.10.9/setup.py 2019-01-02 20:07:11.000000000 +0100 @@ -22,7 +22,7 @@ output = getattr(builtins, 'print', lambda x: True) -__version__ = "0.10.7" +__version__ = "0.10.9" # Disable hard links, otherwise building distributions fails on OS X try: ++++++ test.py ++++++ import netifaces print('Found interfaces:') for iface in netifaces.interfaces(): print(' %s' % iface) print('') for iface in netifaces.interfaces(): allAddrs = netifaces.ifaddresses(iface) print('Interface %s:' % iface) for family in allAddrs: addrs = allAddrs[family] fam_name = netifaces.address_families[family] print(' Address family: %s' % fam_name) for addr in addrs: print(' Address : %s' % addr['addr']) nmask = addr.get('netmask', None) if nmask: print(' Netmask : %s' % nmask) bcast = addr.get('broadcast', None) if bcast: print(' Broadcast: %s' % bcast) print('') print('Found gateways:') gateway_info = netifaces.gateways() for family in gateway_info: if family == 'default': continue fam_name = netifaces.address_families[family] print(' Family: %s' % fam_name) for gateway,interface,default in gateway_info[family]: if default: def_text = ', default' else: def_text = '' print(' %s (via %s%s)' % (gateway, interface, def_text)) print('') print('Default gateways:') default_gateways = gateway_info['default'] for family in default_gateways: fam_name = netifaces.address_families[family] gateway, interface = default_gateways[family] print(' %s: %s (via %s)' % (fam_name, gateway, interface))