Date: Friday, August 1, 2014 @ 02:56:34
  Author: bgyorgy
Revision: 116659

upgpkg: cinnamon 2.2.14-2

Apply upstream fixes (FS#41250), remove power applet patch (upower support is 
fixed in cinnamon-settings-daemon)

Added:
  cinnamon/trunk/calendar-applet-upower-support.patch
  cinnamon/trunk/fix_background.patch
  cinnamon/trunk/no-print-password.patch
Modified:
  cinnamon/trunk/PKGBUILD
  cinnamon/trunk/set_wheel.patch
Deleted:
  cinnamon/trunk/upower_calender_fix.patch
  cinnamon/trunk/upower_power_applet_fix.patch

--------------------------------------+
 PKGBUILD                             |   27 +-
 calendar-applet-upower-support.patch |   17 +
 fix_background.patch                 |   14 +
 no-print-password.patch              |   14 +
 set_wheel.patch                      |   47 ++++-
 upower_calender_fix.patch            |   21 --
 upower_power_applet_fix.patch        |  300 ---------------------------------
 7 files changed, 104 insertions(+), 336 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2014-08-01 00:55:24 UTC (rev 116658)
+++ PKGBUILD    2014-08-01 00:56:34 UTC (rev 116659)
@@ -6,7 +6,7 @@
 
 pkgname=cinnamon
 pkgver=2.2.14
-pkgrel=1
+pkgrel=2
 pkgdesc="Linux desktop which provides advanced innovative features and a 
traditional user experience"
 arch=('i686' 'x86_64')
 url="http://cinnamon.linuxmint.com/";
@@ -22,13 +22,15 @@
 options=('!emptydirs')
 install=${pkgname}.install
 
source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxmint/Cinnamon/archive/$pkgver.tar.gz";
-        "upower_calender_fix.patch"
-        "set_wheel.patch"
-        "upower_power_applet_fix.patch")
+        "calendar-applet-upower-support.patch"
+        "fix_background.patch"
+        "no-print-password.patch"
+        "set_wheel.patch")
 sha256sums=('ffccc44c8b4675ba76510172d8252c3c07a131a9ad7b5ba062740b686a3cb0f9'
-            '2edb96f42fb4da07eee635b1159e3ae869c64d7ac80f600bc509190648abcf3e'
-            'dafb2b7b275053aa77d15f2ffab62ad1567aa9d93ed7a82077feeef86b81c7f7'
-            'da6594cd05f5f9c242cdc179e5af1bd5afb79506e77ac457d2a7e8930692c45c')
+            '9ba15442531537759a78a4ab6d0be55dc2fa84a5157bb3fd912c259bfe24dcd8'
+            '1117ac6f76ae65637778a43bc18385a032d1244b578bb28aca6557c4007f9d0a'
+            '14f55e00ac399b19c41c8ab7de8b4cd530e30701c9f1f3f1ca73434ff00d8273'
+            '3c4c7bb65d9e3b7d5569a14a45ebf08d2326250869645511dfa18d87b8eaf444')
 
 prepare() {
   cd ${srcdir}/Cinnamon*
@@ -37,12 +39,15 @@
   sed -i 's:/usr/bin/python :/usr/bin/python2 :' 
files/usr/bin/cinnamon-menu-editor
   find -type f | xargs sed -i 's@^#!.*python$@#!/usr/bin/python2@'
 
-  # Fix power applet to work with upower 0.99
-  patch -Np1 -i ../upower_power_applet_fix.patch
-
   # Fix calendar applet with upower 0.99
-  patch -Np1 -i ../upower_calender_fix.patch
+  patch -Np1 -i ../calendar-applet-upower-support.patch
 
+  # Fix Background Module for python2-pillow 2.5.0
+  patch -Np1 -i ../fix_background.patch
+
+  # Don't print passwords to stdout
+  patch -Np1 -i ../no-print-password.patch
+
   # Use wheel group instread of sudo
   patch -Np1 -i ../set_wheel.patch
 

Added: calendar-applet-upower-support.patch
===================================================================
--- calendar-applet-upower-support.patch                                (rev 0)
+++ calendar-applet-upower-support.patch        2014-08-01 00:56:34 UTC (rev 
116659)
@@ -0,0 +1,17 @@
+Index: 
cinnamon/files/usr/share/cinnamon/applets/calen...@cinnamon.org/applet.js
+===================================================================
+--- 
cinnamon.orig/files/usr/share/cinnamon/applets/calen...@cinnamon.org/applet.js  
   2014-04-27 11:56:10.582581808 +0200
++++ cinnamon/files/usr/share/cinnamon/applets/calen...@cinnamon.org/applet.js  
2014-07-14 00:44:37.882215797 +0200
+@@ -94,7 +94,11 @@
+ 
+             // https://bugzilla.gnome.org/show_bug.cgi?id=655129
+             this._upClient = new UPowerGlib.Client();
+-            this._upClient.connect('notify-resume', this._updateClockAndDate);
++            try {
++                this._upClient.connect('notify-resume', 
this._updateClockAndDate);
++            } catch (e) {
++                this._upClient.connect('notify::resume', 
this._updateClockAndDate);
++            }
+ 
+             // Start the clock
+             this.on_settings_changed();

Added: fix_background.patch
===================================================================
--- fix_background.patch                                (rev 0)
+++ fix_background.patch        2014-08-01 00:56:34 UTC (rev 116659)
@@ -0,0 +1,14 @@
+Description: Fix Background Module for python2-pillow 2.5.0-1.
+Author: Claire Farron <dies...@googlemail.com>
+Origin: upstream
+--- a/files/usr/lib/cinnamon-settings/bin/imtools.py
++++ b/files/usr/lib/cinnamon-settings/bin/imtools.py
+@@ -859,7 +859,7 @@
+     :type force: bool
+     """
+     # Paste on top
+-    if source == mask:
++    if mask and source == mask:
+         if has_alpha(source):
+             # invert_alpha = the transparant pixels of the destination
+             if has_alpha(destination) and (destination.size == source.size

Added: no-print-password.patch
===================================================================
--- no-print-password.patch                             (rev 0)
+++ no-print-password.patch     2014-08-01 00:56:34 UTC (rev 116659)
@@ -0,0 +1,14 @@
+Description: Cinnamon Settings User: Don't print passwords to stdout
+when changing password and cinnamon-settings is run from terminal.
+Author: Clement Lefebvre
+Origin: upstream
+--- a/files/usr/lib/cinnamon-settings/modules/cs_user.py
++++ b/files/usr/lib/cinnamon-settings/modules/cs_user.py
+@@ -398,7 +398,6 @@
+     def change_password(self):
+         oldpass = self.current_password.get_text()
+         newpass = self.new_password.get_text()
+-        print "Changing %s to %s" % (oldpass, newpass)
+         passwd = pexpect.spawn("/usr/bin/passwd")
+         time.sleep(0.5)
+         passwd.sendline(oldpass)

Modified: set_wheel.patch
===================================================================
--- set_wheel.patch     2014-08-01 00:55:24 UTC (rev 116658)
+++ set_wheel.patch     2014-08-01 00:56:34 UTC (rev 116659)
@@ -1,6 +1,42 @@
 --- a/files/usr/lib/cinnamon-settings-users/cinnamon-settings-users.py
 +++ b/files/usr/lib/cinnamon-settings-users/cinnamon-settings-users.py
-@@ -747,7 +747,7 @@ class Module:
+@@ -144,12 +144,11 @@ class EditableEntry (Gtk.Notebook):
+ 
+ class PasswordDialog(Gtk.Dialog):
+ 
+-    def __init__ (self, user, password_mask, group_mask):            
++    def __init__ (self, user, password_mask):
+         super(PasswordDialog, self).__init__()
+ 
+         self.user = user
+         self.password_mask = password_mask
+-        self.group_mask = group_mask
+ 
+         self.set_modal(True)
+         self.set_skip_taskbar_hint(True)
+@@ -215,12 +214,6 @@ class PasswordDialog(Gtk.Dialog):
+     def change_password(self):        
+         newpass = self.new_password.get_text()
+         self.user.set_password(newpass, "")
+-        os.system("gpasswd -d '%s' nopasswdlogin" % self.user.get_user_name())
+-        mask = self.group_mask.get_text()
+-        mask = mask.split(", ")
+-        mask.remove("nopasswdlogin")
+-        mask = ", ".join(mask)
+-        self.group_mask.set_text(mask)        
+         self.password_mask.set_text(u'\u2022\u2022\u2022\u2022\u2022\u2022')
+         self.destroy()  
+ 
+@@ -515,7 +508,7 @@ class Module:
+         model, treeiter = self.users_treeview.get_selection().get_selected()
+         if treeiter != None:
+             user = model[treeiter][INDEX_USER_OBJECT]       
+-            dialog = PasswordDialog(user, self.password_mask, 
self.groups_label)                
++            dialog = PasswordDialog(user, self.password_mask)                
+             response = dialog.run()
+ 
+     def _on_groups_button_clicked(self, widget): 
+@@ -745,11 +738,11 @@ class Module:
              pixbuf = 
GdkPixbuf.Pixbuf.new_from_file_at_size("/usr/share/cinnamon/faces/user-generic.png",
 48, 48)
              description = "<b>%s</b>\n%s" % (fullname, username)
              piter = self.users.append(None, [new_user, pixbuf, description])
@@ -8,7 +44,10 @@
 +            # Add the user to his/her own group and wheel if Administrator 
was selected
              if dialog.account_type_combo.get_active() == 1:
 -                os.system("usermod %s -G %s,sudo,nopasswdlogin" % (username, 
username)) 
-+                os.system("usermod %s -G %s,sudo,wheel,nopasswdlogin" % 
(username, username))
++                os.system("usermod %s -G %s,wheel" % (username, username)) 
              else:
-                 os.system("usermod %s -G %s" % (username, username))
-             self.load_groups()               
+-                os.system("usermod %s -G %s,nopasswdlogin" % (username, 
username))
++                os.system("usermod %s -G %s" % (username, username))
+             self.load_groups()
+         dialog.destroy()
+          

Deleted: upower_calender_fix.patch
===================================================================
--- upower_calender_fix.patch   2014-08-01 00:55:24 UTC (rev 116658)
+++ upower_calender_fix.patch   2014-08-01 00:56:34 UTC (rev 116659)
@@ -1,21 +0,0 @@
---- 
Cinnamon-2.2.13.orig/files/usr/share/cinnamon/applets/calen...@cinnamon.org/applet.js
      2014-05-25 15:10:49.000000000 -0500
-+++ 
Cinnamon-2.2.13/files/usr/share/cinnamon/applets/calen...@cinnamon.org/applet.js
   2014-05-30 17:05:16.099584860 -0500
-@@ -6,7 +6,6 @@
- const St = imports.gi.St;
- const Util = imports.misc.util;
- const PopupMenu = imports.ui.popupMenu;
--const UPowerGlib = imports.gi.UPowerGlib;
- const Settings = imports.ui.settings;
- const AppletDir = imports.ui.appletManager.applets['calen...@cinnamon.org'];
- const Calendar = AppletDir.calendar;
-@@ -92,10 +91,6 @@
-             this.settings.bindProperty(Settings.BindingDirection.IN, 
"use-custom-format", "use_custom_format", this.on_settings_changed, null);
-             this.settings.bindProperty(Settings.BindingDirection.IN, 
"custom-format", "custom_format", this.on_settings_changed, null);        
- 
--            // https://bugzilla.gnome.org/show_bug.cgi?id=655129
--            this._upClient = new UPowerGlib.Client();
--            this._upClient.connect('notify-resume', this._updateClockAndDate);
--
-             // Start the clock
-             this.on_settings_changed();
-             this._updateClockAndDatePeriodic();

Deleted: upower_power_applet_fix.patch
===================================================================
--- upower_power_applet_fix.patch       2014-08-01 00:55:24 UTC (rev 116658)
+++ upower_power_applet_fix.patch       2014-08-01 00:56:34 UTC (rev 116659)
@@ -1,300 +0,0 @@
-diff -Naur 
Cinnamon-2.2.13.orig/files/usr/share/cinnamon/applets/po...@cinnamon.org/applet.js
 Cinnamon-2.2.13/files/usr/share/cinnamon/applets/po...@cinnamon.org/applet.js
---- 
Cinnamon-2.2.13.orig/files/usr/share/cinnamon/applets/po...@cinnamon.org/applet.js
 2014-05-25 15:10:49.000000000 -0500
-+++ 
Cinnamon-2.2.13/files/usr/share/cinnamon/applets/po...@cinnamon.org/applet.js   
   2014-05-01 14:58:17.000000000 -0500
-@@ -36,21 +36,6 @@
-     PENDING_DISCHARGE: 6
- };
- 
--const PowerManagerInterface = {
--    name: 'org.cinnamon.SettingsDaemon.Power',
--    methods: [
--        { name: 'GetDevices', inSignature: '', outSignature: 'a(susdut)' },
--        { name: 'GetPrimaryDevice', inSignature: '', outSignature: '(susdut)' 
},
--        ],
--    signals: [
--        { name: 'PropertiesChanged', inSignature: 's,a{sv},a[s]' },
--        ],
--    properties: [
--        { name: 'Icon', signature: 's', access: 'read' },
--        ]
--};
--let PowerManagerProxy = DBus.makeProxyClass(PowerManagerInterface);
--
- const SettingsManagerInterface = {
-       name: 'org.freedesktop.DBus.Properties',
-       methods: [
-@@ -63,6 +48,17 @@
- 
- let SettingsManagerProxy = DBus.makeProxyClass(SettingsManagerInterface);
- 
-+const DisplayDeviceInterface = <interface 
name="org.freedesktop.UPower.Device">
-+    <property name="Type" type="u" access="read"/>
-+    <property name="State" type="u" access="read"/>
-+    <property name="Percentage" type="d" access="read"/>
-+    <property name="TimeToEmpty" type="x" access="read"/>
-+    <property name="TimeToFull" type="x" access="read"/>
-+    <property name="IsPresent" type="b" access="read"/>
-+    <property name="IconName" type="s" access="read"/>
-+    </interface>;
-+let DisplayDeviceProxy = 
Gio.DBusProxy.makeProxyWrapper(DisplayDeviceInterface);
-+
- function DeviceItem() {
-     this._init.apply(this, arguments);
- }
-@@ -145,7 +141,13 @@
-             this.menuManager.addMenu(this.menu);            
-             
-             //this.set_applet_icon_symbolic_name('battery-missing');          
  
--            this._proxy = new PowerManagerProxy(DBus.session, BUS_NAME, 
OBJECT_PATH);
-+            this._proxy = new DisplayDeviceProxy(Gio.DBus.system,
-+                      'org.freedesktop.UPower',
-+                      '/org/freedesktop/UPower/devices/DisplayDevice',
-+                      Lang.bind(this, function (proxy, error) {
-+                              this._proxy.connect('g-properties-changed', 
Lang.bind(this, this._sync));
-+                              this._sync();
-+                      }));
-             this._smProxy = new SettingsManagerProxy(DBus.session, BUS_NAME, 
OBJECT_PATH);
-             
-             let icon = this.actor.get_children()[0];
-@@ -175,153 +177,121 @@
-             this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
-             this.menu.addSettingsAction(_("Power Settings"), 'power');
- 
--            this._smProxy.connect('PropertiesChanged', Lang.bind(this, 
this._devicesChanged));
--            this._devicesChanged();            
-+            this._smProxy.connect('PropertiesChanged', Lang.bind(this, 
this._devicesChanged));           
-         }
-         catch (e) {
-             global.logError(e);
-         }
-     },
-     
-+    _getDevice: function () {
-+        // FIXME: don't know how to access device_id now, it works like a 
charm with this magic number
-+        return [1, this._proxy.Type, this._proxy.IconName, 
this._proxy.Percentage, this._proxy.State, this._getSeconds()]
-+    },
-+    
-+    _getSeconds: function () {
-+        var sec = 0;
-+        if (this._proxy.State == UPDeviceState.DISCHARGING) {
-+            return this._proxy.TimeToEmpty;
-+        } else if (this._proxy.State == UPDeviceState.CHARGING) {
-+            return this._proxy.TimeToFull;
-+        }
-+
-+        return sec;
-+    },
-+    
-+    _sync: function () {
-+        this._devicesChanged();
-+    },
-+    
-     on_applet_clicked: function(event) {
-         this.menu.toggle();        
-     },
-     
-     _readPrimaryDevice: function() {
--        this._proxy.GetPrimaryDeviceRemote(Lang.bind(this, function(device, 
error) {
--            if (error) {
--                this._hasPrimary = false;
--                this._primaryDeviceId = null;
--                this._batteryItem.actor.hide();                
--                return;
-+        var device = this._getDevice();
-+        global.logError(device);
-+
-+        let [device_id, device_type, icon, percentage, state, seconds] = 
device;
-+        if (device_type == UPDeviceType.BATTERY) {
-+            this._hasPrimary = true;
-+            let time = Math.round(seconds / 60);
-+            if (time == 0) {
-+                // 0 is reported when UPower does not have enough data
-+                // to estimate battery life
-+                this._batteryItem.label.text = _("Estimating...");
-+            } else {
-+                let minutes = time % 60;
-+                let hours = Math.floor(time / 60);
-+                let timestring;
-+                if (time > 60) {
-+                    if (minutes == 0) {
-+                        timestring = ngettext("%d hour remaining", "%d hours 
remaining", hours).format(hours);
-+                    } else {
-+                        let template = _("%d %s %d %s remaining");
-+                        timestring = template.format (hours, ngettext("hour", 
"hours", hours), minutes, ngettext("minute", "minutes", minutes));
-+                    }
-+                } else timestring = ngettext("%d minute remaining", "%d 
minutes remaining", minutes).format(minutes);
-+                this._batteryItem.label.text = timestring;
-+                this.set_applet_tooltip(timestring);
-             }
--            let [device_id, device_type, icon, percentage, state, seconds] = 
device;
--            if (device_type == UPDeviceType.BATTERY) {
--                this._hasPrimary = true;
--                let time = Math.round(seconds / 60);
--                if (time == 0) {
--                    // 0 is reported when UPower does not have enough data
--                    // to estimate battery life
--                    this._batteryItem.label.text = _("Estimating...");
--                } else {
--                    let minutes = time % 60;
--                    let hours = Math.floor(time / 60);
--                    let timestring;
--                    if (time > 60) {
--                        if (minutes == 0) {
--                            timestring = ngettext("%d hour remaining", "%d 
hours remaining", hours).format(hours);
--                        } else {
--                            /* TRANSLATORS: this is a time string, as in "%d 
hours %d minutes remaining" */
--                            let template = _("%d %s %d %s remaining");
--
--                            timestring = template.format (hours, 
ngettext("hour", "hours", hours), minutes, ngettext("minute", "minutes", 
minutes));
--                        }
--                    } else
--                        timestring = ngettext("%d minute remaining", "%d 
minutes remaining", minutes).format(minutes);
--                    this._batteryItem.label.text = timestring;
--                    this.set_applet_tooltip(timestring);
--                }
-                 this._primaryPercentage.text = C_("percent of battery 
remaining", "%d%%").format(Math.round(percentage));
-                 this._batteryItem.actor.show();
--            } else {
--                this._hasPrimary = false;
--                this._batteryItem.actor.hide();
--            }
--
--            this._primaryDeviceId = device_id;
--        }));
--    },
--
--    _readOtherDevices: function() {
--        this._proxy.GetDevicesRemote(Lang.bind(this, function(devices, error) 
{
--            this._deviceItems.forEach(function(i) { i.destroy(); });
--            this._deviceItems = [];
--
--            if (error) {
--                return;
--            }
--
--            let position = 0;
--            for (let i = 0; i < devices.length; i++) {
--                let [device_id, device_type] = devices[i];
--
--                if (this._hasPrimary == false) {
--                      if (device_type == UPDeviceType.AC_POWER) {
--                      this.set_applet_tooltip(_("AC adapter"));
--                      }
--                      else if (device_type == UPDeviceType.BATTERY) {
--                      this.set_applet_tooltip(_("Laptop battery"));
--                              }
--                      }
--
--                if (device_type == UPDeviceType.AC_POWER || (this._hasPrimary 
&& device_id == this._primaryDeviceId))
--                    continue;
--
--                let item = new DeviceItem (devices[i]);
--                this._deviceItems.push(item);
--                this.menu.addMenuItem(item, this._otherDevicePosition + 
position);
--                position++;
--            }
--        }));
-+        } else {
-+            this._hasPrimary = false;
-+            this._batteryItem.actor.hide();
-+        }
-+        this._primaryDeviceId = device_id;
-     },
- 
-     on_panel_height_changed: function() {
-         this._devicesChanged();
-     },
- 
--    _devicesChanged: function() {        
--        this._proxy.GetRemote('Icon', Lang.bind(this, function(icon, error) {
--            if (icon) {    
--                this.set_applet_icon_symbolic_name('battery-missing');
--                let gicon = Gio.icon_new_for_string(icon);
--                this._applet_icon.gicon = gicon;
--                this.actor.show();
--            } else {
--                this.menu.close();
--                this.actor.hide();
--            }
--        }));
-+    _devicesChanged: function() {           
-+        let icon = this._proxy.IconName;
-+        if (icon) {    
-+            this.set_applet_icon_symbolic_name('battery-missing');
-+            let gicon = Gio.icon_new_for_string(icon);
-+            this._applet_icon.gicon = gicon;
-+            this.actor.show();
-+        } else {
-+            this.menu.close();
-+            this.actor.hide();
-+        }
-+
-         this._readPrimaryDevice();
--        this._readOtherDevices();
-         this._updateLabel();
-     },
-     
-     _updateLabel: function() {
--        this._proxy.GetDevicesRemote(Lang.bind(this, function(devices, error) 
{
--            if (error) {
--              this._mainLabel.set_text("");
--                return;
-+        var device = this._getDevice();
-+        if (this.labelinfo != "nothing") {
-+            let [device_id, device_type, icon, percentage, state, time] = 
device;
-+            let labelText = "";
-+
-+            if (this.labelinfo == "percentage" || time == 0) {
-+                labelText = C_("percent of battery remaining", 
"%d%%").format(Math.round(percentage));
-+            }
-+            else if (this.labelinfo == "time") {
-+                let seconds = Math.round(time / 60);
-+                let minutes = Math.floor(seconds % 60);
-+                let hours = Math.floor(seconds / 60);
-+                labelText = C_("time of battery remaining", 
"%d:%02d").format(hours,minutes);
-             }
--            if (this.labelinfo != "nothing") {
--              for (let i = 0; i < devices.length; i++) {
--                      let [device_id, device_type, icon, percentage, state, 
time] = devices[i];
--                      if (device_type == UPDeviceType.BATTERY || device_id == 
this._primaryDeviceId) {
--                          let labelText = "";
--
--                          if (this.labelinfo == "percentage" || time == 0) {
--                              labelText = C_("percent of battery remaining", 
"%d%%").format(Math.round(percentage));
--                          }
--                          else if (this.labelinfo == "time") {
--                              let seconds = Math.round(time / 60);
--                              let minutes = Math.floor(seconds % 60);
--                              let hours = Math.floor(seconds / 60);
--                              labelText = C_("time of battery remaining", 
"%d:%02d").format(hours,minutes);
--                          }
--                          else if (this.labelinfo == "percentage_time") {
--                              let seconds = Math.round(time / 60);
--                              let minutes = Math.floor(seconds % 60);
--                              let hours = Math.floor(seconds / 60);
--                              labelText = C_("percent of battery remaining", 
"%d%%").format(Math.round(percentage)) + " (" +
--                                          C_("time of battery remaining", 
"%d:%02d").format(hours,minutes) + ")";
--                          }
--                          this._mainLabel.set_text(labelText);
--                          if (device_id == this._primaryDeviceId) {
--                              return;
--                          }
--                      }
--                }
-+            else if (this.labelinfo == "percentage_time") {
-+                let seconds = Math.round(time / 60);
-+                let minutes = Math.floor(seconds % 60);
-+                let hours = Math.floor(seconds / 60);
-+                labelText = C_("percent of battery remaining", 
"%d%%").format(Math.round(percentage)) + " (" +
-+                        C_("time of battery remaining", 
"%d:%02d").format(hours,minutes) + ")";
-             }
--        }));
-+
-+            this._mainLabel.set_text(labelText);
-+            return;
-+        }
-+        // Display disabled or no battery found... hot-unplugged?
-+        this._mainLabel.set_text("");
-     },
-     
-     on_applet_removed_from_panel: function() {

Reply via email to