Date: Wednesday, October 9, 2013 @ 06:31:11 Author: bgyorgy Revision: 98359
upgpkg: cinnamon 1.9.2-2 - Remove unused dependencies - Apply some patches from Fedora - Use pkexec instead of gksu Added: cinnamon/trunk/git_rollup.patch cinnamon/trunk/input_keybindings.patch cinnamon/trunk/keyboard_applet.patch cinnamon/trunk/org.archlinux.pkexec.cinnamon-settings-users.policy Modified: cinnamon/trunk/PKGBUILD Deleted: cinnamon/trunk/remove_GC.patch -----------------------------------------------------+ PKGBUILD | 47 ++++-- git_rollup.patch | 76 ++++++++++ input_keybindings.patch | 11 + keyboard_applet.patch | 133 ++++++++++++++++++ org.archlinux.pkexec.cinnamon-settings-users.policy | 1 remove_GC.patch | 124 ---------------- 6 files changed, 254 insertions(+), 138 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2013-10-09 02:39:20 UTC (rev 98358) +++ PKGBUILD 2013-10-09 04:31:11 UTC (rev 98359) @@ -6,16 +6,16 @@ pkgname=cinnamon pkgver=1.9.2 -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/" license=('GPL2') -depends=('accountsservice' 'caribou' 'clutter-gtk' 'cjs' 'gnome-bluetooth' - 'gnome-icon-theme' 'gnome-menus' 'cinnamon-settings-daemon' 'cinnamon-session' - 'gnome-themes-standard' 'gstreamer0.10' 'libgnome-keyring' 'librsvg' - 'networkmanager' 'muffin' 'pygtk' 'python2-dbus' 'python2-pillow' 'python2-pexpect' - 'python2-pyinotify' 'python2-lxml' 'webkitgtk' 'gnome-panel' 'python2' 'cinnamon-translations') +depends=('accountsservice' 'caribou' 'cinnamon-settings-daemon' 'cinnamon-session' + 'cinnamon-translations' 'cjs' 'clutter-gtk' 'gconf' 'gnome-icon-theme' + 'gnome-menus' 'gnome-themes-standard' 'gstreamer0.10' 'libgnome-keyring' + 'librsvg' 'networkmanager' 'muffin' 'pygtk' 'python2-dbus' 'python2-pillow' + 'python2-pexpect' 'python2-pyinotify' 'python2-lxml' 'webkitgtk') makedepends=('gnome-common' 'intltool') optdepends=('cinnamon-control-center: extended configurations for Cinnamon' 'cinnamon-screensaver: lock screen' @@ -25,13 +25,19 @@ options=('!libtool' '!emptydirs') install=${pkgname}.install source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxmint/Cinnamon/archive/$pkgver.tar.gz" - "remove_GC.patch" "fix-control-center-check.patch" - "background.patch") + "background.patch" + "keyboard_applet.patch" + "input_keybindings.patch" + "git_rollup.patch" + "org.archlinux.pkexec.cinnamon-settings-users.policy") sha256sums=('0abaa8da02c4d626084aa482adc551af154796c4c35faaebebdac896ce72aa6d' - '3d362efd15f8cfeca1713f5bcf88d4be787b39d7c7f24b73cd13f867af33a680' 'ee5694bdc997ffa35a817f691b15bae13747137d35ec2aecd0da298d7edbe426' - '373d80cdb23250fbde846ed493ba422672cc42b03a111c2ce044467ee782df7f') + '373d80cdb23250fbde846ed493ba422672cc42b03a111c2ce044467ee782df7f' + '6acb07393105ddced8a4c3c869a596350d1a7d81a808ca5307d2ad770653a9d3' + 'e28c40eb844105154fa6106f5b4de3151a22805b3a7b2f84be9ea6c15cec3de6' + '03809dee8f374a450e6671771d4527161e5697c55f09745eac9db52b0fe0a7a6' + '371beac9e55d36f7629d2fc5cb40d6a3e6c0f4aac014f6fefdcd6743b5194b23') prepare() { cd ${srcdir}/Cinnamon* @@ -40,9 +46,6 @@ 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 crasher when disconnecting from wifi - patch -Np1 -i ../remove_GC.patch - # Check for the cc-panel path, not for the unneeded binary patch -Np1 -i ../fix-control-center-check.patch @@ -49,11 +52,23 @@ # Fix missing backgrounds patch -Np1 -i ../background.patch + # Fix keyboard applet + patch -Np1 -i ../keyboard_applet.patch + + # Add input keybindings + patch -Np1 -i ../input_keybindings.patch + + # Add support for LightDM user switching + patch -Np1 -i ../git_rollup.patch + # Prefix 'System Settings' with 'Cinnamon' to avoid confusion with gnome-control-center - sed -i 's/^Name\(.*\)=\(.*\)/Name\1=Cinnamon \2/' files/usr/share/applications/cinnamon-settings.desktop + sed -i 's/^Name\(.*\)=\(.*\)/Name\1=Cinnamon \2/' files/usr/share/applications/cinnamon-settings{,-users}.desktop # fix for the python2 PAM module sed -i 's:import PAM:import pam:' files/usr/lib/cinnamon-settings/modules/cs_user.py + + # Use pkexec instead of gksu + sed -i 's/gksu/pkexec/' files/usr/bin/cinnamon-settings-users } build() { @@ -76,4 +91,8 @@ # Remove leftover files after patching find "$pkgdir" -type f -name *.orig | xargs rm + + # Install policy file + install -Dm644 "${srcdir}/org.archlinux.pkexec.cinnamon-settings-users.policy" \ + "${pkgdir}/usr/share/polkit-1/actions/org.archlinux.pkexec.cinnamon-settings-users.policy" } Added: git_rollup.patch =================================================================== --- git_rollup.patch (rev 0) +++ git_rollup.patch 2013-10-09 04:31:11 UTC (rev 98359) @@ -0,0 +1,76 @@ +diff --git a/configure.ac b/configure.ac +index 2d807f5..46353a2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -62,7 +62,7 @@ AM_CONDITIONAL(BUILD_RECORDER, $build_recorder) + + CLUTTER_MIN_VERSION=1.7.5 + GOBJECT_INTROSPECTION_MIN_VERSION=0.10.1 +-GJS_MIN_VERSION=1.29.18 ++GJS_MIN_VERSION=1.9.0 + MUFFIN_MIN_VERSION=1.0.5 + GTK_MIN_VERSION=3.0.0 + GIO_MIN_VERSION=2.29.10 +diff --git a/files/usr/share/cinnamon/applets/so...@cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/so...@cinnamon.org/applet.js +index e80d97b..73fb87c 100644 +--- a/files/usr/share/cinnamon/applets/so...@cinnamon.org/applet.js ++++ b/files/usr/share/cinnamon/applets/so...@cinnamon.org/applet.js +@@ -108,8 +108,8 @@ let compatible_players = [ + 'deadbeef', 'smplayer', 'tomahawk']; + let support_seek = [ + 'clementine', 'banshee', 'rhythmbox', 'rhythmbox3', 'pragha', 'quodlibet', +- 'amarok', 'noise', 'xnoise', 'gmusicbrowser', 'spotify', 'vlc', 'beatbox', +- 'gnome-mplayer', 'qmmp', 'deadbeef', 'tomahawk']; ++ 'amarok', 'xnoise', 'gmusicbrowser', 'spotify', 'vlc', 'beatbox', ++ 'gnome-mplayer', 'qmmp', 'deadbeef']; + /* dummy vars for translation */ + let x = _("Playing"); + x = _("Paused"); +diff --git a/files/usr/share/cinnamon/applets/u...@cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/u...@cinnamon.org/applet.js +index c2a4c61..0bdd671 100644 +--- a/files/usr/share/cinnamon/applets/u...@cinnamon.org/applet.js ++++ b/files/usr/share/cinnamon/applets/u...@cinnamon.org/applet.js +@@ -94,7 +94,20 @@ MyApplet.prototype = { + } + })); + +- if (GLib.file_test("/usr/bin/mdmflexiserver", GLib.FileTest.EXISTS)) { ++ if (GLib.getenv("XDG_SEAT_PATH")) { ++ // LightDM ++ this.menu.addAction(_("Switch User"), Lang.bind(this, function() { ++ Util.spawnCommandLine("cinnamon-screensaver-command --lock"); ++ Util.spawnCommandLine("dm-tool switch-to-greeter"); ++ })); ++ ++ this.menu.addAction(_("Guest Session"), Lang.bind(this, function() { ++ Util.spawnCommandLine("cinnamon-screensaver-command --lock"); ++ Util.spawnCommandLine("dm-tool switch-to-guest"); ++ })); ++ } ++ else if (GLib.file_test("/usr/bin/mdmflexiserver", GLib.FileTest.EXISTS)) { ++ // MDM + this.menu.addAction(_("Switch User"), Lang.bind(this, function() { + Util.spawnCommandLine("mdmflexiserver"); + })); +diff --git a/js/ui/hotCorner.js b/js/ui/hotCorner.js +index 82dafab..af91dda 100644 +--- a/js/ui/hotCorner.js ++++ b/js/ui/hotCorner.js +@@ -230,17 +230,6 @@ HotCorner.prototype = { + this._animRipple(this._ripple3, 0.35, 1.0, 0.0, 0.3, 1); + }, + +- handleDragOver: function(source, actor, x, y, time) { +- if (source != Main.xdndHandler) +- return; +- +- if (!Main.overview.visible && !Main.overview.animationInProgress && !Main.expo.visible) { +- this.rippleAnimation(); +- Main.overview.showTemporarily(); +- Main.overview.beginItemDrag(actor); +- } +- }, +- + runAction: function(){ + this._activationTime = Date.now() / 1000; + Added: input_keybindings.patch =================================================================== --- input_keybindings.patch (rev 0) +++ input_keybindings.patch 2013-10-09 04:31:11 UTC (rev 98359) @@ -0,0 +1,11 @@ +--- a/files/usr/lib/cinnamon-settings/modules/cs_keyboard.py ++++ b/files/usr/lib/cinnamon-settings/modules/cs_keyboard.py +@@ -119,6 +119,8 @@ KEYBINDINGS = [ + [_("Log out"), MEDIA_KEYS_SCHEMA, "logout", False, "system"], + [_("Lock screen"), MEDIA_KEYS_SCHEMA, "screensaver", False, "system"], + [_("Toggle recording desktop (must restart Cinnamon)"), MUFFIN_KEYBINDINGS_SCHEMA, "toggle-recording", True, "system"], ++ [_("Switch to next source"), MEDIA_KEYS_SCHEMA, "switch-input-source", False, "system"], ++ [_("Switch to previous source"), MEDIA_KEYS_SCHEMA, "switch-input-source-backward", False, "system"], + + # Launchers + [_("Launch help browser"), MEDIA_KEYS_SCHEMA, "help", False, "launchers"], Added: keyboard_applet.patch =================================================================== --- keyboard_applet.patch (rev 0) +++ keyboard_applet.patch 2013-10-09 04:31:11 UTC (rev 98359) @@ -0,0 +1,133 @@ +--- a/files/usr/share/cinnamon/applets/keybo...@cinnamon.org/applet.js ++++ b/files/usr/share/cinnamon/applets/keybo...@cinnamon.org/applet.js +@@ -1,9 +1,10 @@ + const Applet = imports.ui.applet; +-const Gkbd = imports.gi.Gkbd; + const Lang = imports.lang; +-const Cinnamon = imports.gi.Cinnamon; ++const Gio = imports.gi.Gio; ++const GLib = imports.gi.GLib; + const St = imports.gi.St; + const Gtk = imports.gi.Gtk; ++const CinnamonDesktop = imports.gi.CinnamonDesktop; + const Main = imports.ui.main; + const PopupMenu = imports.ui.popupMenu; + const Util = imports.misc.util; +@@ -16,11 +17,12 @@ function LayoutMenuItem() { + LayoutMenuItem.prototype = { + __proto__: PopupMenu.PopupBaseMenuItem.prototype, + +- _init: function(config, id, indicator, long_name) { ++ _init: function(ipsettings, id, index, indicator, long_name) { + PopupMenu.PopupBaseMenuItem.prototype._init.call(this); + +- this._config = config; ++ this._ipsettings = ipsettings; + this._id = id; ++ this._index = index; + this.label = new St.Label({ text: long_name }); + this.indicator = indicator; + this.addActor(this.label); +@@ -29,7 +31,7 @@ LayoutMenuItem.prototype = { + + activate: function(event) { + PopupMenu.PopupBaseMenuItem.prototype.activate.call(this); +- this._config.lock_group(this._id); ++ this._ipsettings.set_value('current', GLib.Variant.new_uint32(this._index)); + } + }; + +@@ -62,18 +64,18 @@ MyApplet.prototype = { + this._syncConfig, + null); + +- this._config = Gkbd.Configuration.get(); +- this._config.connect('changed', Lang.bind(this, this._syncConfig)); +- this._config.connect('group-changed', Lang.bind(this, this._syncGroup)); ++ this._xkbInfo = new CinnamonDesktop.XkbInfo(); ++ this._ipsettings = new Gio.Settings({ schema: 'org.cinnamon.desktop.input-sources' }); ++ this._ipsettings.connect('changed::sources', Lang.bind(this, this._syncConfig)); ++ this._ipsettings.connect('changed::current', Lang.bind(this, this._syncGroup)); + +- this._config.start_listen(); + + this._syncConfig(); + + this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); + this.menu.addAction(_("Show Keyboard Layout"), Lang.bind(this, function() { + Main.overview.hide(); +- Util.spawn(['gkbd-keyboard-display', '-g', String(this._config.get_current_group() + 1)]); ++ Util.spawn(['gkbd-keyboard-display', '-l', this._selectedLayout._id]); + })); + this.menu.addAction(_("Show Character Table"), Lang.bind(this, function() { + Main.overview.hide(); +@@ -113,8 +115,8 @@ MyApplet.prototype = { + }, + + _syncConfig: function() { +- let groups = this._config.get_group_names(); +- if (groups.length > 1) { ++ let sources = this._ipsettings.get_value('sources'); ++ if (sources.n_children() > 1) { + this.actor.show(); + } else { + this.menu.close(); +@@ -127,25 +129,30 @@ MyApplet.prototype = { + for (let i = 0; i < this._labelActors.length; i++) + this._labelActors[i].destroy(); + +- let short_names = this._adjustGroupNames(this._config.get_short_group_names()); + + this._selectedLayout = null; + this._layoutItems = [ ]; + this._labelActors = [ ]; +- for (let i = 0; i < groups.length; i++) { +- let icon_name = this._config.get_group_name(i); ++ for (let i = 0; i < sources.n_children(); i++) { ++ let [type, id] = sources.get_child_value(i).deep_unpack(); ++ let displayName = id; ++ let shortName = id; ++ let xkbLayout = id; ++ if (type == 'xkb') { ++ [_exists, displayName, shortName, xkbLayout, _xkbVariant] = this._xkbInfo.get_layout_info(id); ++ } // TODO: errorhandling, handle 'ibus' ++ let icon_name = xkbLayout; // FIXME: Really? + let actor; + if (this._showFlags) + actor = new St.Icon({ icon_name: icon_name, icon_type: St.IconType.FULLCOLOR, style_class: 'popup-menu-icon' }); + else +- actor = new St.Label({ text: short_names[i] }); +- let item = new LayoutMenuItem(this._config, i, actor, groups[i]); +- item._short_group_name = short_names[i]; ++ actor = new St.Label({ text: shortName }); ++ let item = new LayoutMenuItem(this._ipsettings, id, i, actor, displayName); + item._icon_name = icon_name; + this._layoutItems.push(item); + this.menu.addMenuItem(item, i); + +- let shortLabel = new St.Label({ text: short_names[i] }); ++ let shortLabel = new St.Label({ text: shortName }); + this._labelActors.push(shortLabel); + } + +@@ -153,17 +160,17 @@ MyApplet.prototype = { + }, + + _syncGroup: function() { +- let selected = this._config.get_current_group(); ++ let current = this._ipsettings.get_uint('current'); + + if (this._selectedLayout) { + this._selectedLayout.setShowDot(false); + this._selectedLayout = null; + } + +- let item = this._layoutItems[selected]; ++ let item = this._layoutItems[current]; + item.setShowDot(true); + +- let selectedLabel = this._labelActors[selected]; ++ let selectedLabel = this._labelActors[current]; + + if (this._showFlags) { + this.set_applet_icon_name(item._icon_name); Added: org.archlinux.pkexec.cinnamon-settings-users.policy =================================================================== (Binary files differ) Index: cinnamon/trunk/org.archlinux.pkexec.cinnamon-settings-users.policy =================================================================== --- org.archlinux.pkexec.cinnamon-settings-users.policy 2013-10-09 02:39:20 UTC (rev 98358) +++ org.archlinux.pkexec.cinnamon-settings-users.policy 2013-10-09 04:31:11 UTC (rev 98359) Property changes on: cinnamon/trunk/org.archlinux.pkexec.cinnamon-settings-users.policy ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/xml \ No newline at end of property Deleted: remove_GC.patch =================================================================== --- remove_GC.patch 2013-10-09 02:39:20 UTC (rev 98358) +++ remove_GC.patch 2013-10-09 04:31:11 UTC (rev 98359) @@ -1,124 +0,0 @@ ---- a/src/cinnamon-global.c -+++ b/src/cinnamon-global.c -@@ -1399,35 +1399,6 @@ cinnamon_global_reexec_self (CinnamonGlo - g_ptr_array_free (arr, TRUE); - } - --/** -- * cinnamon_global_gc: -- * @global: A #CinnamonGlobal -- * -- * Start a garbage collection process. For more information, see -- * https://developer.mozilla.org/En/JS_GC -- */ --void --cinnamon_global_gc (CinnamonGlobal *global) --{ -- JSContext *context = gjs_context_get_native_context (global->js_context); -- -- JS_GC (context); --} -- --/** -- * cinnamon_global_maybe_gc: -- * @global: A #CinnamonGlobal -- * -- * Start a garbage collection process when it would free up enough memory -- * to be worth the amount of time it would take -- * https://developer.mozilla.org/en/SpiderMonkey/JSAPI_Reference/JS_MaybeGC -- */ --void --cinnamon_global_maybe_gc (CinnamonGlobal *global) --{ -- gjs_context_maybe_gc (global->js_context); --} -- - static void - cinnamon_global_on_gc (GjsContext *context, - CinnamonGlobal *global) -@@ -1768,13 +1768,6 @@ run_leisure_functions (gpointer data) - if (global->work_count > 0) - return FALSE; - -- /* Previously we called gjs_maybe_gc(). However, it simply doesn't -- * trigger often enough. Garbage collection is very fast here, so -- * let's just aggressively GC. This will help avoid both heap -- * fragmentation, and the GC kicking in when we don't want it to. -- */ -- gjs_context_gc (global->js_context); -- - /* No leisure closures, so we are done */ - if (global->leisure_closures == NULL) - return FALSE; ---- a/src/cinnamon-global.h -+++ b/src/cinnamon-global.h -@@ -88,10 +88,6 @@ void cinnamon_global_set_pointer - int y); - - --/* JavaScript utilities */ --void cinnamon_global_gc (CinnamonGlobal *global); --void cinnamon_global_maybe_gc (CinnamonGlobal *global); -- - typedef struct { - guint glibc_uordblks; - - - ---- a/js/perf/core.js -+++ b/js/perf/core.js -@@ -1,5 +1,7 @@ - // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- - -+const System = imports.system; -+ - const Main = imports.ui.main; - const Scripting = imports.ui.scripting; - -@@ -99,7 +101,7 @@ function run() { - Main.overview.hide(); - yield Scripting.waitLeisure(); - -- global.gc(); -+ System.gc(); - yield Scripting.sleep(1000); - Scripting.collectStatistics(); - Scripting.scriptEvent('afterShowHide'); ---- a/js/ui/lookingGlass.js -+++ b/js/ui/lookingGlass.js -@@ -11,6 +11,7 @@ const St = imports.gi.St; - const Cinnamon = imports.gi.Cinnamon; - const Signals = imports.signals; - const Lang = imports.lang; -+const System = imports.system; - - const History = imports.misc.history; - const Extension = imports.ui.extension; -@@ -680,7 +681,7 @@ Memory.prototype = { - - this._gcbutton = new St.Button({ label: 'Full GC', - style_class: 'lg-obj-inspector-button' }); -- this._gcbutton.connect('clicked', Lang.bind(this, function () { global.gc(); this._renderText(); })); -+ this._gcbutton.connect('clicked', Lang.bind(this, function () { System.gc(); this._renderText(); })); - this.actor.add(this._gcbutton, { x_align: St.Align.START, - x_fill: false }); - ---- a/js/ui/lookingGlassDBus.js -+++ b/js/ui/lookingGlassDBus.js -@@ -1,5 +1,7 @@ - // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- - -+const System = imports.system; -+ - const Gio = imports.gi.Gio; - const Main = imports.ui.main; - const Extension = imports.ui.extension; -@@ -99,7 +101,7 @@ CinnamonLookingGlass.prototype = { - }, - - FullGc: function() { -- global.gc(); -+ System.gc(); - }, - - Inspect: function(path) {