Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-netifaces for 
openSUSE:Factory checked in at 2021-07-21 19:05:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-netifaces (Old)
 and      /work/SRC/openSUSE:Factory/.python-netifaces.new.2632 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-netifaces"

Wed Jul 21 19:05:30 2021 rev:15 rq:906774 version:0.11.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-netifaces/python-netifaces.changes        
2019-06-01 09:45:22.463408791 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-netifaces.new.2632/python-netifaces.changes  
    2021-07-21 19:05:33.623206031 +0200
@@ -1,0 +2,8 @@
+Sat Jul 17 06:40:25 UTC 2021 - Dirk M??ller <[email protected]>
+
+- update to 0.11.0:
+  * Fixing netmask calculation for IPv6 
+  * segfault when trying to access netifaces.ifaddresses
+  * Interpret missing gateway priority, handle some out of order metrics
+
+-------------------------------------------------------------------

Old:
----
  LICENSE
  netifaces-0.10.9.tar.gz

New:
----
  netifaces-0.11.0.tar.gz

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

Other differences:
------------------
++++++ python-netifaces.spec ++++++
--- /var/tmp/diff_new_pack.fzQSGE/_old  2021-07-21 19:05:35.071208548 +0200
+++ /var/tmp/diff_new_pack.fzQSGE/_new  2021-07-21 19:05:35.071208548 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-netifaces
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2021 SUSE LLC
 # Copyright (c) 2011 Novell
 #
 # All modifications and additions to the file contributed by third parties
@@ -19,15 +19,13 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-netifaces
-Version:        0.10.9
+Version:        0.11.0
 Release:        0
 Summary:        Portable network interface information
 License:        MIT
 Group:          Development/Languages/Python
-Url:            https://github.com/al45tair/netifaces
+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}
@@ -51,7 +49,7 @@
 
 %prep
 %setup -q -n netifaces-%{version}
-cp %{SOURCE1} %{SOURCE2} .
+cp %{SOURCE2} .
 
 %build
 %python_build
@@ -63,7 +61,6 @@
 %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}/*

++++++ netifaces-0.10.9.tar.gz -> netifaces-0.11.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/netifaces-0.10.9/MANIFEST.in 
new/netifaces-0.11.0/MANIFEST.in
--- old/netifaces-0.10.9/MANIFEST.in    2019-01-02 20:04:55.000000000 +0100
+++ new/netifaces-0.11.0/MANIFEST.in    2021-05-31 09:11:24.000000000 +0200
@@ -1 +1,2 @@
 include LICENSE
+include test.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/netifaces-0.10.9/PKG-INFO 
new/netifaces-0.11.0/PKG-INFO
--- old/netifaces-0.10.9/PKG-INFO       2019-01-02 20:11:00.000000000 +0100
+++ new/netifaces-0.11.0/PKG-INFO       2021-05-31 10:14:26.378922200 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: netifaces
-Version: 0.10.9
+Version: 0.11.0
 Summary: Portable network interface information.
 Home-page: https://github.com/al45tair/netifaces
 Author: Alastair Houghton
@@ -16,13 +16,18 @@
         +-------------+------------------+
         
         .. |BuildStatus| image:: 
https://travis-ci.org/al45tair/netifaces.svg?branch=master
-           :target: https://travis-ci.org/al45tair/dmgbuild
+           :target: https://travis-ci.org/al45tair/netifaces
            :alt: Build Status (Linux/Mac)
         
         .. |WinBuildStatus| image:: 
https://ci.appveyor.com/api/projects/status/3ctn1bl0aigpfjoo/branch/master?svg=true
            :target: 
https://ci.appveyor.com/project/al45tair/netifaces/branch/master
            :alt: Build Status (Windows)
         
+        .. warning::
+        
+           netifaces needs a new maintainer.  al45tair is no longer able to 
maintain it
+           or make new releases due to work commitments.
+        
         1. What is this?
         ----------------
         
@@ -201,10 +206,10 @@
 Classifier: Topic :: System :: Networking
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.5
-Classifier: Programming Language :: Python :: 2.6
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.4
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/netifaces-0.10.9/README.rst 
new/netifaces-0.11.0/README.rst
--- old/netifaces-0.10.9/README.rst     2019-01-02 10:18:10.000000000 +0100
+++ new/netifaces-0.11.0/README.rst     2021-05-31 09:23:50.000000000 +0200
@@ -8,13 +8,18 @@
 +-------------+------------------+
 
 .. |BuildStatus| image:: 
https://travis-ci.org/al45tair/netifaces.svg?branch=master
-   :target: https://travis-ci.org/al45tair/dmgbuild
+   :target: https://travis-ci.org/al45tair/netifaces
    :alt: Build Status (Linux/Mac)
 
 .. |WinBuildStatus| image:: 
https://ci.appveyor.com/api/projects/status/3ctn1bl0aigpfjoo/branch/master?svg=true
    :target: https://ci.appveyor.com/project/al45tair/netifaces/branch/master
    :alt: Build Status (Windows)
 
+.. warning::
+
+   netifaces needs a new maintainer.  al45tair is no longer able to maintain it
+   or make new releases due to work commitments.
+
 1. What is this?
 ----------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/netifaces-0.10.9/netifaces.c 
new/netifaces-0.11.0/netifaces.c
--- old/netifaces-0.10.9/netifaces.c    2019-01-02 10:17:08.000000000 +0100
+++ new/netifaces-0.11.0/netifaces.c    2021-05-31 09:11:24.000000000 +0200
@@ -462,9 +462,9 @@
         --zx;
       if (x & 0x0f)
         zx -= 4;
-      if (x & 0x03)
+      if (x & 0x33)
         zx -= 2;
-      if (x & 0x05)
+      if (x & 0x55)
         zx -= 1;
 
       zeroes += zx;
@@ -1024,7 +1024,7 @@
     char buffer[256];
     PyObject *pyaddr = NULL, *netmask = NULL, *braddr = NULL, *flags = NULL;
 
-    if (strcmp (addr->ifa_name, ifname) != 0)
+    if (addr->ifa_name == NULL || strcmp (addr->ifa_name, ifname) != 0)
       continue;
  
     /* We mark the interface as found, even if there are no addresses;
@@ -1357,6 +1357,9 @@
   }
 
   for (addr = addrs; addr; addr = addr->ifa_next) {
+    if (addr->ifa_name == NULL)
+      continue;
+
     if (!prev_name || strncmp (addr->ifa_name, prev_name, IFNAMSIZ) != 0) {
       PyObject *ifname = PyUnicode_FromString (addr->ifa_name);
     
@@ -1564,7 +1567,7 @@
          break;
        }
 
-       ifname = PyUnicode_FromUnicode (pwcsName, wcslen (pwcsName));
+       ifname = PyUnicode_FromWideChar (pwcsName, wcslen (pwcsName));
        isdefault = bBest ? Py_True : Py_False;
 
        tuple = PyTuple_Pack (3, gateway, ifname, isdefault);
@@ -1671,7 +1674,7 @@
       if (bBest)
         dwBestMetric = table->table[n].dwForwardMetric1;
 
-      ifname = PyUnicode_FromUnicode (pwcsName, wcslen (pwcsName));
+      ifname = PyUnicode_FromWideChar (pwcsName, wcslen (pwcsName));
       gateway = PyUnicode_FromString (gwbuf);
       isdefault = bBest ? Py_True : Py_False;
 
@@ -1891,8 +1894,14 @@
           attr = RTA_NEXT(attr, len);
         }
 
+        static const unsigned char ipv4_default[4] = {};
+        static const unsigned char ipv6_default[16] = {};
+
         /* We're looking for gateways with no destination */
-        if (!dst && gw && ifndx >= 0) {
+        if ((!dst
+            || (pmsg->rt.rtm_family == AF_INET && !memcmp(dst, ipv4_default, 
sizeof(ipv4_default)))
+            || (pmsg->rt.rtm_family == AF_INET6 && !memcmp(dst, ipv6_default, 
sizeof(ipv6_default)))
+        ) && gw && ifndx >= 0) {
           char buffer[256];
           char ifnamebuf[IF_NAMESIZE];
           char *ifname;
@@ -1918,16 +1927,22 @@
 
           isdefault = pmsg->rt.rtm_table == RT_TABLE_MAIN ? Py_True : Py_False;
 
+          /* Priority starts at 0, having none means we use kernel default (0) 
*/
+          if (priority < 0) {
+            priority = 0;
+          }
+
           /* Try to pick the active default route based on priority (which
              is displayed in the UI as "metric", confusingly) */
           if (pmsg->rt.rtm_family < RTNL_FAMILY_MAX) {
-            if (def_priorities[pmsg->rt.rtm_family] == -1)
+            /* If no active default route found, or metric is lower */
+            if (def_priorities[pmsg->rt.rtm_family] == -1
+                || priority < def_priorities[pmsg->rt.rtm_family])
+              /* Set new default */
               def_priorities[pmsg->rt.rtm_family] = priority;
-            else {
-              if (priority == -1
-                  || priority > def_priorities[pmsg->rt.rtm_family])
-                isdefault = Py_False;
-            }
+            else
+              /* Leave default, but unset isdefault for iface tuple */
+              isdefault = Py_False;
           }
 
           pyifname = PyUnicode_FromString (ifname);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/netifaces-0.10.9/netifaces.egg-info/PKG-INFO 
new/netifaces-0.11.0/netifaces.egg-info/PKG-INFO
--- old/netifaces-0.10.9/netifaces.egg-info/PKG-INFO    2019-01-02 
20:11:00.000000000 +0100
+++ new/netifaces-0.11.0/netifaces.egg-info/PKG-INFO    2021-05-31 
10:14:26.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: netifaces
-Version: 0.10.9
+Version: 0.11.0
 Summary: Portable network interface information.
 Home-page: https://github.com/al45tair/netifaces
 Author: Alastair Houghton
@@ -16,13 +16,18 @@
         +-------------+------------------+
         
         .. |BuildStatus| image:: 
https://travis-ci.org/al45tair/netifaces.svg?branch=master
-           :target: https://travis-ci.org/al45tair/dmgbuild
+           :target: https://travis-ci.org/al45tair/netifaces
            :alt: Build Status (Linux/Mac)
         
         .. |WinBuildStatus| image:: 
https://ci.appveyor.com/api/projects/status/3ctn1bl0aigpfjoo/branch/master?svg=true
            :target: 
https://ci.appveyor.com/project/al45tair/netifaces/branch/master
            :alt: Build Status (Windows)
         
+        .. warning::
+        
+           netifaces needs a new maintainer.  al45tair is no longer able to 
maintain it
+           or make new releases due to work commitments.
+        
         1. What is this?
         ----------------
         
@@ -201,10 +206,10 @@
 Classifier: Topic :: System :: Networking
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.5
-Classifier: Programming Language :: Python :: 2.6
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.4
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/netifaces-0.10.9/netifaces.egg-info/SOURCES.txt 
new/netifaces-0.11.0/netifaces.egg-info/SOURCES.txt
--- old/netifaces-0.10.9/netifaces.egg-info/SOURCES.txt 2019-01-02 
20:11:00.000000000 +0100
+++ new/netifaces-0.11.0/netifaces.egg-info/SOURCES.txt 2021-05-31 
10:14:26.000000000 +0200
@@ -4,6 +4,7 @@
 netifaces.c
 setup.cfg
 setup.py
+test.py
 netifaces.egg-info/PKG-INFO
 netifaces.egg-info/SOURCES.txt
 netifaces.egg-info/dependency_links.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/netifaces-0.10.9/setup.py 
new/netifaces-0.11.0/setup.py
--- old/netifaces-0.10.9/setup.py       2019-01-02 20:07:11.000000000 +0100
+++ new/netifaces-0.11.0/setup.py       2021-05-31 09:26:17.000000000 +0200
@@ -22,7 +22,7 @@
 
     output = getattr(builtins, 'print', lambda x: True)
 
-__version__ = "0.10.9"
+__version__ = "0.11.0"
 
 # Disable hard links, otherwise building distributions fails on OS X
 try:
@@ -97,7 +97,7 @@
                             result = True
                         if status != 0:
                             result = False
-                        
+
             finally:
                 os.dup2(mystdout, 1)
                 os.dup2(mystderr, 2)
@@ -123,7 +123,7 @@
             results = {}
 
         self.conftestidx = 0
-        
+
         output("checking for getifaddrs...", end='')
 
         result = results.get('have_getifaddrs', None)
@@ -187,7 +187,7 @@
               sin.sin_family = AF_INET;
               sin.sin_port = 0;
               sin.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
-              
+
               ret = getnameinfo ((struct sockaddr *)&sin, sizeof (sin),
                                  buffer, sizeof (buffer),
                                  NULL, 0,
@@ -409,7 +409,7 @@
             # lengths, because they're in the sa_len field on just about
             # everything but Linux.
             output("checking which sockaddr_xxx structs are defined...", 
end='')
-            
+
             result = results.get('have_sockaddrs', None)
             if result is not None:
                 cached = '(cached)'
@@ -434,7 +434,7 @@
                     #include <net/if.h>
                     #include <netinet/in.h>
                     %(includes)s
-                    
+
                     int main (void) {
                       struct sockaddr_%(sockaddr)s sa;
                       return 0;
@@ -446,7 +446,7 @@
 
                     if self.test_build(testrig):
                         result.append(sockaddr)
-                
+
             if result:
                 output('%s. %s' % (' '.join(result), cached))
                 for sockaddr in result:
@@ -589,12 +589,12 @@
     'Topic :: System :: Networking',
     'Programming Language :: Python',
     'Programming Language :: Python :: 2',
-    'Programming Language :: Python :: 2.5',
-    'Programming Language :: Python :: 2.6',
     'Programming Language :: Python :: 2.7',
     'Programming Language :: Python :: 3',
     'Programming Language :: Python :: 3.4',
     'Programming Language :: Python :: 3.5',
-    'Programming Language :: Python :: 3.6'
+    'Programming Language :: Python :: 3.6',
+    'Programming Language :: Python :: 3.7',
+    'Programming Language :: Python :: 3.8'
     ],
        ext_modules=[iface_mod])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/netifaces-0.10.9/test.py new/netifaces-0.11.0/test.py
--- old/netifaces-0.10.9/test.py        1970-01-01 01:00:00.000000000 +0100
+++ new/netifaces-0.11.0/test.py        2018-05-02 09:11:57.000000000 +0200
@@ -0,0 +1,50 @@
+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))

Reply via email to