Hello community,

here is the log from the commit of package permissions for openSUSE:Factory 
checked in at 2020-08-17 11:59:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/permissions (Old)
 and      /work/SRC/openSUSE:Factory/.permissions.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "permissions"

Mon Aug 17 11:59:54 2020 rev:140 rq:825923 version:unknown

Changes:
--------
--- /work/SRC/openSUSE:Factory/permissions/permissions.changes  2020-07-30 
09:55:43.799066906 +0200
+++ /work/SRC/openSUSE:Factory/.permissions.new.3399/permissions.changes        
2020-08-17 12:00:02.310515648 +0200
@@ -1,0 +2,7 @@
+Tue Aug 11 12:06:30 UTC 2020 - [email protected]
+
+- Update to version 20200811:
+  * regtest: support new getcap output format in libcap-2.42
+  * regtest: print individual test case errors to stderr
+
+-------------------------------------------------------------------

Old:
----
  permissions-20200727.tar.xz

New:
----
  permissions-20200811.tar.xz

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

Other differences:
------------------
++++++ permissions.spec ++++++
--- /var/tmp/diff_new_pack.hJQGPw/_old  2020-08-17 12:00:03.522516324 +0200
+++ /var/tmp/diff_new_pack.hJQGPw/_new  2020-08-17 12:00:03.526516325 +0200
@@ -16,7 +16,7 @@
 #
 
 
-%define VERSION_DATE 20200727
+%define VERSION_DATE 20200811
 
 Name:           permissions
 Version:        %{VERSION_DATE}.%{suse_version}

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.hJQGPw/_old  2020-08-17 12:00:03.574516353 +0200
+++ /var/tmp/diff_new_pack.hJQGPw/_new  2020-08-17 12:00:03.574516353 +0200
@@ -1,4 +1,4 @@
 <servicedata>
 <service name="tar_scm">
             <param 
name="url">https://github.com/openSUSE/permissions.git</param>
-          <param 
name="changesrevision">9cbf693925f263969f510e34bf03ee64abb06245</param></service></servicedata>
\ No newline at end of file
+          <param 
name="changesrevision">a42371988f74c07914cc681f29d8a85b1f043d27</param></service></servicedata>
\ No newline at end of file

++++++ permissions-20200727.tar.xz -> permissions-20200811.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/permissions-20200727/tests/regtest.py 
new/permissions-20200811/tests/regtest.py
--- old/permissions-20200727/tests/regtest.py   2020-07-27 13:48:55.000000000 
+0200
+++ new/permissions-20200811/tests/regtest.py   2020-08-11 13:56:21.000000000 
+0200
@@ -694,7 +694,8 @@
 
                        if test.getNumErrors() != 0:
                                color_printer.setRed()
-                               print(test.getName(), "encountered", 
test.getNumErrors(), "errors")
+                               sys.stdout.flush()
+                               print(test.getName(), "encountered", 
test.getNumErrors(), "errors", file = sys.stderr)
                        if test.getNumWarnings() != 0:
                                color_printer.setYellow()
                                tests_warned += 1
@@ -1048,27 +1049,38 @@
                        shell = False,
                )
 
-               # getcap uses a '+' to indicate capability types, while
-               # permissions uses '=', so adjust accordingly
-               expected_caps = ','.join(caps).replace('=', '+')
+               expected_caps = ','.join(caps)
                actual_caps = ""
 
-               # output is something like "/path/to/file = cap_stuff+letters"
+               # until libcap-2.32 the output format looked like this:
+               #
+               # /usr/bin/ping = cap_net_raw+ep
+               #
+               # starting from libcap-2.42 it looks like this:
+               #
+               # /usr/bin/ping cap_net_raw=p
+               #
+               # see bsc#1175076 comment 2.
+               # So let's be agnostic to the output format.
+
                for line in getcap_out.decode('utf8').splitlines():
-                       # be prudent about possible spaces or equals in paths,
-                       # even though it should never occur in our test
-                       # environment
-                       parts = line.split('=')
-                       if len(parts) < 2:
+                       if not line.startswith(path):
                                continue
 
-                       cap_path = '='.join(parts[:-1]).strip()
-                       if cap_path != path:
-                               # not for our file
-                               continue
+                       line = line[len(path):].strip()
+                       parts = line.split()
 
-                       actual_caps = parts[-1].strip()
-                       break
+                       if len(parts) == 2 and parts[0] == '=':
+                               # the old output format:
+                               # getcap uses a '+' to indicate capability
+                               # types, while permissions uses '=', so adjust
+                               # accordingly
+                               expected_caps = expected_caps.replace('=', '+')
+                               actual_caps = parts[1]
+                               break
+                       elif len(parts) == 1:
+                               actual_caps = parts[0]
+                               break
 
                if actual_caps != expected_caps:
                        self.printError(path, "doesn't have expected 
capabilities '{}' but '{}' instead".format(


Reply via email to