Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package power-profiles-daemon for 
openSUSE:Factory checked in at 2021-11-08 17:24:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/power-profiles-daemon (Old)
 and      /work/SRC/openSUSE:Factory/.power-profiles-daemon.new.1890 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "power-profiles-daemon"

Mon Nov  8 17:24:51 2021 rev:2 rq:930161 version:0.10.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/power-profiles-daemon/power-profiles-daemon.changes  
    2021-10-20 20:24:43.333394295 +0200
+++ 
/work/SRC/openSUSE:Factory/.power-profiles-daemon.new.1890/power-profiles-daemon.changes
    2021-11-08 17:25:35.128748521 +0100
@@ -1,0 +2,11 @@
+Fri Nov  5 18:35:24 UTC 2021 - Atri Bhattacharya <[email protected]>
+
+- Update to version 0.10.1:
+  * Fix bug in the authorisation codepath added in 0.10.0, where
+    holding a profile could still succeed despite having sent a
+    denial to the calling process.
+  * Make pylint test optional.
+- Drop f83685732b9dd8211840645ce76f43718b30218b.patch:
+  incorporated upstream.
+
+-------------------------------------------------------------------

Old:
----
  f83685732b9dd8211840645ce76f43718b30218b.patch
  power-profiles-daemon-0.10.0.tar.bz2

New:
----
  power-profiles-daemon-0.10.1.tar.bz2

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

Other differences:
------------------
++++++ power-profiles-daemon.spec ++++++
--- /var/tmp/diff_new_pack.2XLaN5/_old  2021-11-08 17:25:35.592748826 +0100
+++ /var/tmp/diff_new_pack.2XLaN5/_new  2021-11-08 17:25:35.596748828 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           power-profiles-daemon
-Version:        0.10.0
+Version:        0.10.1
 Release:        0
 Summary:        Power profiles handling over D-Bus
 License:        GPL-3.0-or-later
@@ -25,8 +25,6 @@
 Source:         %{url}/-/archive/%{version}/%{name}-%{version}.tar.bz2
 # PATCH-FEATURE-OPENSUSE hold-profile-hardening.patch boo#1189900 -- Hardening 
of HoldProfile D-Bus method
 Patch0:         hold-profile-hardening.patch
-# PATCH-FIX-UPSTREAM f83685732b9dd8211840645ce76f43718b30218b.patch -- build: 
Make pylint test optional
-Patch1:         
https://gitlab.freedesktop.org/hadess/power-profiles-daemon/-/commit/f83685732b9dd8211840645ce76f43718b30218b.patch
 
 BuildRequires:  c_compiler
 BuildRequires:  gtk-doc

++++++ hold-profile-hardening.patch ++++++
--- /var/tmp/diff_new_pack.2XLaN5/_old  2021-11-08 17:25:35.616748842 +0100
+++ /var/tmp/diff_new_pack.2XLaN5/_new  2021-11-08 17:25:35.616748842 +0100
@@ -1,8 +1,8 @@
-Index: power-profiles-daemon-0.9.0/src/power-profiles-daemon.c
+Index: power-profiles-daemon-0.10.1/src/power-profiles-daemon.c
 ===================================================================
---- power-profiles-daemon-0.9.0.orig/src/power-profiles-daemon.c
-+++ power-profiles-daemon-0.9.0/src/power-profiles-daemon.c
-@@ -526,6 +526,29 @@ holder_disappeared (GDBusConnection *con
+--- power-profiles-daemon-0.10.1.orig/src/power-profiles-daemon.c
++++ power-profiles-daemon-0.10.1/src/power-profiles-daemon.c
+@@ -531,6 +531,29 @@ holder_disappeared (GDBusConnection *con
    g_ptr_array_free (cookies, TRUE);
  }
  
@@ -32,7 +32,7 @@
  static void
  hold_profile (PpdApp                *data,
                GVariant              *parameters,
-@@ -548,6 +571,18 @@ hold_profile (PpdApp                *dat
+@@ -553,6 +576,18 @@ hold_profile (PpdApp                *dat
      return;
    }
  

++++++ power-profiles-daemon-0.10.0.tar.bz2 -> 
power-profiles-daemon-0.10.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/power-profiles-daemon-0.10.0/.gitlab-ci.yml 
new/power-profiles-daemon-0.10.1/.gitlab-ci.yml
--- old/power-profiles-daemon-0.10.0/.gitlab-ci.yml     2021-10-04 
16:01:30.000000000 +0200
+++ new/power-profiles-daemon-0.10.1/.gitlab-ci.yml     2021-10-28 
11:25:13.000000000 +0200
@@ -22,7 +22,7 @@
     - dnf upgrade -y --nogpgcheck fedora-release fedora-repos*
     - dnf update -y && dnf install -y $DEPENDENCIES
   script:
-    - meson -Dgtk_doc=true _build
+    - meson -Dgtk_doc=true -Dpylint=true _build
     - ninja -v -C _build
     - ninja -v -C _build install
     - ninja -v -C _build uninstall
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/power-profiles-daemon-0.10.0/NEWS 
new/power-profiles-daemon-0.10.1/NEWS
--- old/power-profiles-daemon-0.10.0/NEWS       2021-10-04 16:01:30.000000000 
+0200
+++ new/power-profiles-daemon-0.10.1/NEWS       2021-10-28 11:25:13.000000000 
+0200
@@ -1,3 +1,12 @@
+0.10.1
+------
+
+This release fixes a bug in the authorisation codepath added in 0.10.0, where 
holding
+a profile could still succeed despite having sent a denial to the calling 
process.
+
+This release also makes the pylint test optional. It should not be used unless 
the goal
+is to contribute patches to assuage it.
+
 0.10.0
 ------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/power-profiles-daemon-0.10.0/meson.build 
new/power-profiles-daemon-0.10.1/meson.build
--- old/power-profiles-daemon-0.10.0/meson.build        2021-10-04 
16:01:30.000000000 +0200
+++ new/power-profiles-daemon-0.10.1/meson.build        2021-10-28 
11:25:13.000000000 +0200
@@ -1,5 +1,5 @@
 project('power-profiles-daemon', [ 'c' ],
-        version: '0.10.0',
+        version: '0.10.1',
         license: 'GPLv3+',
         default_options: [
           'buildtype=debugoptimized',
@@ -42,8 +42,10 @@
 add_global_arguments('-D_GNU_SOURCE=1', language: 'c')
 add_global_arguments(common_cflags, language: 'c')
 
-pylint = find_program('pylint-3', 'pylint3', 'pylint', required: false)
-pylint_flags = ['-d', 'C0116', '-d', 'C0114', '-d', 'W0707']
+if get_option('pylint')
+    pylint = find_program('pylint-3', 'pylint3', 'pylint', required: true)
+    pylint_flags = ['-d', 'C0116', '-d', 'C0114', '-d', 'W0707']
+endif
 xmllint = find_program('xmllint', required: false)
 
 subdir('src')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/power-profiles-daemon-0.10.0/meson_options.txt 
new/power-profiles-daemon-0.10.1/meson_options.txt
--- old/power-profiles-daemon-0.10.0/meson_options.txt  2021-10-04 
16:01:30.000000000 +0200
+++ new/power-profiles-daemon-0.10.1/meson_options.txt  2021-10-28 
11:25:13.000000000 +0200
@@ -6,3 +6,7 @@
        type: 'boolean',
        value: false,
        description: 'Build docs')
+option('pylint',
+       type: 'boolean',
+       value: false,
+       description: 'Run pylint checks, for developers only')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/power-profiles-daemon-0.10.0/src/meson.build 
new/power-profiles-daemon-0.10.1/src/meson.build
--- old/power-profiles-daemon-0.10.0/src/meson.build    2021-10-04 
16:01:30.000000000 +0200
+++ new/power-profiles-daemon-0.10.1/src/meson.build    2021-10-28 
11:25:13.000000000 +0200
@@ -72,7 +72,7 @@
   install_dir: get_option('bindir')
 )
 
-if pylint.found()
+if get_option('pylint')
   test('pylint-powerprofilesctl',
        pylint,
        args: pylint_flags + [ script ],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/power-profiles-daemon-0.10.0/src/power-profiles-daemon.c 
new/power-profiles-daemon-0.10.1/src/power-profiles-daemon.c
--- old/power-profiles-daemon-0.10.0/src/power-profiles-daemon.c        
2021-10-04 16:01:30.000000000 +0200
+++ new/power-profiles-daemon-0.10.1/src/power-profiles-daemon.c        
2021-10-28 11:25:13.000000000 +0200
@@ -707,6 +707,7 @@
                                   "net.hadess.PowerProfiles.hold-profile",
                                   &local_error)) {
       g_dbus_method_invocation_return_gerror (invocation, local_error);
+      return;
     }
     hold_profile (data, parameters, invocation);
   } else if (g_strcmp0 (method_name, "ReleaseProfile") == 0) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/power-profiles-daemon-0.10.0/src/powerprofilesctl.in 
new/power-profiles-daemon-0.10.1/src/powerprofilesctl.in
--- old/power-profiles-daemon-0.10.0/src/powerprofilesctl.in    2021-10-04 
16:01:30.000000000 +0200
+++ new/power-profiles-daemon-0.10.1/src/powerprofilesctl.in    2021-10-28 
11:25:13.000000000 +0200
@@ -141,7 +141,8 @@
         for profile in reversed(profiles):
             if index > 0:
                 print('')
-            print(('%s %s:') % ('*' if profile['Profile'] == active else ' ', 
profile['Profile']))
+            marker = '*' if profile['Profile'] == active else ' '
+            print(f'{marker} {profile["Profile"]}:')
             print('    Driver:    ', profile['Driver'])
             if profile['Profile'] == 'performance':
                 print('    Degraded:  ', f'yes ({reason})' if degraded else 
'no')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/power-profiles-daemon-0.10.0/tests/integration-test.py 
new/power-profiles-daemon-0.10.1/tests/integration-test.py
--- old/power-profiles-daemon-0.10.0/tests/integration-test.py  2021-10-04 
16:01:30.000000000 +0200
+++ new/power-profiles-daemon-0.10.1/tests/integration-test.py  2021-10-28 
11:25:13.000000000 +0200
@@ -762,8 +762,8 @@
       self.assertEventually(lambda: self.get_dbus_property('ActiveProfile') == 
'power-saver')
       self.stop_daemon()
 
-    def test_not_allowed(self):
-      '''Check that we get errors when trying to do things that aren't 
allowed'''
+    def test_not_allowed_profile(self):
+      '''Check that we get errors when trying to change a profile and not 
allowed'''
 
       self.obj_polkit.SetAllowed(dbus.Array([], signature='s'))
       self.start_daemon()
@@ -778,6 +778,22 @@
 
       self.stop_daemon()
 
+    def test_not_allowed_hold(self):
+      '''Check that we get an error when trying to hold a profile and not 
allowed'''
+
+      self.obj_polkit.SetAllowed(dbus.Array([], signature='s'))
+      self.start_daemon()
+      self.assertEqual(self.get_dbus_property('ActiveProfile'), 'balanced')
+
+      with self.assertRaises(gi.repository.GLib.GError) as cm:
+        self.call_dbus_method('HoldProfile', GLib.Variant("(sss)", 
('performance', '', '')))
+      self.assertIn('AccessDenied', str(cm.exception))
+
+      self.assertEqual(self.get_dbus_property('ActiveProfile'), 'balanced')
+      self.assertEqual(len(self.get_dbus_property('ActiveProfileHolds')), 0)
+
+      self.stop_daemon()
+
     #
     # Helper methods
     #

Reply via email to