Hello community,

here is the log from the commit of package python-xapp for openSUSE:Factory 
checked in at 2017-06-13 16:09:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-xapp (Old)
 and      /work/SRC/openSUSE:Factory/.python-xapp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-xapp"

Tue Jun 13 16:09:49 2017 rev:2 rq:503276 version:1.0.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-xapp/python-xapp.changes  2017-05-09 
18:03:29.597981496 +0200
+++ /work/SRC/openSUSE:Factory/.python-xapp.new/python-xapp.changes     
2017-06-13 16:09:55.723258949 +0200
@@ -1,0 +2,13 @@
+Mon Jun 12 19:52:24 UTC 2017 - [email protected]
+
+- Update to version 1.0.1:
+  * OS: Turn pkexec support into an opt-in and don't set
+    DISPLAY/XAUTHORITY.
+  * Add mate-polkit agent support.
+  * run_with_admin_privs: Use pkexec as a last ditch chance.
+  * Support polkit processname under Ubuntu 17.04.
+  * OS: Add is_guest_session() and is_live_session().
+- Add python-xapp-xdgsu.patch: Escalate privileges using xdg-su.
+- Add xdg-utils to requirements for xdg-su.
+
+-------------------------------------------------------------------

Old:
----
  python-xapp-1.0.0.tar.gz

New:
----
  python-xapp-1.0.1.tar.gz
  python-xapp-xdgsu.patch

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

Other differences:
------------------
++++++ python-xapp.spec ++++++
--- /var/tmp/diff_new_pack.zuSGzy/_old  2017-06-13 16:09:57.562999672 +0200
+++ /var/tmp/diff_new_pack.zuSGzy/_new  2017-06-13 16:09:57.562999672 +0200
@@ -18,16 +18,19 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-xapp
-Version:        1.0.0
+Version:        1.0.1
 Release:        0
 Summary:        Python XApp library
 License:        GPL-2.0+
 Group:          Development/Languages/Python
 Url:            https://github.com/linuxmint/python-xapp
 Source:         
https://github.com/linuxmint/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
+# PATCH-FEATURE-OPENSUSE python-xapp-xdgsu.patch -- Escalate privileges using 
xdg-su.
+Patch0:         python-xapp-xdgsu.patch
 BuildRequires:  %{python_module devel}
 BuildRequires:  python-rpm-macros
 Requires:       python-psutil
+Requires:       xdg-utils
 BuildArch:      noarch
 
 %description
@@ -38,6 +41,7 @@
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %python_build
@@ -49,6 +53,6 @@
 %defattr(-,root,root)
 %doc COPYING debian/changelog
 %{python_sitelib}/xapp/
-%{python_sitelib}/python_xapp-%{version}-*.egg-info
+%{python_sitelib}/python_xapp-*.egg-info
 
 %changelog

++++++ python-xapp-1.0.0.tar.gz -> python-xapp-1.0.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-xapp-1.0.0/debian/changelog 
new/python-xapp-1.0.1/debian/changelog
--- old/python-xapp-1.0.0/debian/changelog      2017-04-27 11:21:06.000000000 
+0200
+++ new/python-xapp-1.0.1/debian/changelog      2017-06-09 16:43:51.000000000 
+0200
@@ -1,3 +1,22 @@
+python-xapp (1.0.1) sonya; urgency=medium
+
+  [ Clement Lefebvre ]
+  * OS: Turn pkexec support into an opt-in and don't set DISPLAY/XAUTHORITY
+
+  [ Sam Burgos ]
+  * added mate-polkit agent support
+
+  [ Michael Webster ]
+  * run_with_admin_privs: use pkexec as a last ditch chance, rather (#3)
+
+  [ David Mohammed ]
+  * support policykit processname under ubuntu 17.04 (#4)
+
+  [ Clement Lefebvre ]
+  * OS: Add is_guest_session() and is_live_session()
+
+ -- Clement Lefebvre <[email protected]>  Fri, 09 Jun 2017 15:43:22 +0100
+
 python-xapp (1.0.0) sonya; urgency=medium
 
   * Initial version
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-xapp-1.0.0/xapp/os.py 
new/python-xapp-1.0.1/xapp/os.py
--- old/python-xapp-1.0.0/xapp/os.py    2017-04-27 11:21:06.000000000 +0200
+++ new/python-xapp-1.0.1/xapp/os.py    2017-06-09 16:43:51.000000000 +0200
@@ -41,6 +41,23 @@
 def is_desktop_gnome():
     return get_current_desktop() == SESSION_GNOME
 
+def is_live_session():
+    is_live_session = False
+    if os.path.exists("/proc/cmdline"):
+        cmdline = subprocess.check_output("cat /proc/cmdline", shell = 
True).decode("utf-8")
+        for keyword in ["boot=casper", "boot=live"]:
+            if keyword in cmdline:
+                is_live_session = True
+                break
+    return is_live_session
+
+def is_guest_session():
+    home_path = os.path.expanduser("~")
+    if "/tmp/guest" in home_path:
+        return True
+    else:
+        return False
+
 ### PROCESS DETECTION
 
 def is_process_running(process_name):
@@ -62,9 +79,11 @@
     if is_desktop_kde() and 
is_process_running("polkit-kde-authentication-agent-1"):
         return True
     if is_desktop_mate() and 
is_process_running("polkit-mate-authentication-agent-1"):
-       return True
+        return True
     elif is_process_running("polkit-gnome-authentication-agent-1"):
         return True
+    elif is_process_running("polkitd"):
+        return True
     else:
         return False
 
@@ -99,5 +118,10 @@
         commands = commands + command
         subprocess.Popen(commands)
         return True
+    # Finally use pkexec if we have nothing else - it will work, but the 
executed program
+    # may not be properly localized.
+    elif is_polkit_running():
+        pkexec(command)
+        return True
     else:
         return False

++++++ python-xapp-xdgsu.patch ++++++
--- a/xapp/os.py
+++ b/xapp/os.py
@@ -118,6 +118,11 @@ def run_with_admin_privs(command, messag
         commands = commands + command
         subprocess.Popen(commands)
         return True
+    elif os.path.exists("/usr/bin/xdg-su"):
+        commands = ["xdg-su", "-c"]
+        commands = commands + command
+        subprocess.Popen(commands)
+        return True
     # Finally use pkexec if we have nothing else - it will work, but the 
executed program
     # may not be properly localized.
     elif is_polkit_running():

Reply via email to