From 5791ee1d25211110f53bce00e6c7c794960f67ba Mon Sep 17 00:00:00 2001 From: Pacho Ramos Date: Tue, 11 Jun 2013 10:58:03 +0000 Subject: Re-lock the screen if we're restarted from a previously crashed shell (from 'master'); drop old. Package-Manager: portage-2.1.12.2/cvs/Linux x86_64 Manifest-Sign-Key: 0xA188FBD4 --- gnome-base/gnome-shell/ChangeLog | 10 +- gnome-base/gnome-shell/Manifest | 12 +- .../files/gnome-shell-3.8.3-relock-screen.patch | 226 +++++++++++++++++++++ gnome-base/gnome-shell/gnome-shell-3.8.2.ebuild | 205 ------------------- gnome-base/gnome-shell/gnome-shell-3.8.3-r1.ebuild | 210 +++++++++++++++++++ 5 files changed, 451 insertions(+), 212 deletions(-) create mode 100644 gnome-base/gnome-shell/files/gnome-shell-3.8.3-relock-screen.patch delete mode 100644 gnome-base/gnome-shell/gnome-shell-3.8.2.ebuild create mode 100644 gnome-base/gnome-shell/gnome-shell-3.8.3-r1.ebuild (limited to 'gnome-base') diff --git a/gnome-base/gnome-shell/ChangeLog b/gnome-base/gnome-shell/ChangeLog index 407b12abe740..5dad67559020 100644 --- a/gnome-base/gnome-shell/ChangeLog +++ b/gnome-base/gnome-shell/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for gnome-base/gnome-shell # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-shell/ChangeLog,v 1.36 2013/06/09 19:27:42 pacho Exp $ +# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-shell/ChangeLog,v 1.37 2013/06/11 10:57:53 pacho Exp $ + +*gnome-shell-3.8.3-r1 (11 Jun 2013) + + 11 Jun 2013; Pacho Ramos + +files/gnome-shell-3.8.3-relock-screen.patch, +gnome-shell-3.8.3-r1.ebuild, + -gnome-shell-3.8.2.ebuild: + Re-lock the screen if we're restarted from a previously crashed shell (from + 'master'); drop old. *gnome-shell-3.8.3 (09 Jun 2013) diff --git a/gnome-base/gnome-shell/Manifest b/gnome-base/gnome-shell/Manifest index 1ac6c82b140d..fa2c6871ce3d 100644 --- a/gnome-base/gnome-shell/Manifest +++ b/gnome-base/gnome-shell/Manifest @@ -7,18 +7,18 @@ AUX gnome-shell-3.7.90-bluetooth-flag.patch 1769 SHA256 2b9a3f5f5a339d14d003b270 AUX gnome-shell-3.8.0-networkmanager-flag-r1.patch 7511 SHA256 85f848ba179aada5f28d4157a95c79ea7cb0af25beca4f1ea9e4ef311a77cd58 SHA512 43cf1866aecb4da20af10fa3a1d6dbec75957514ccc35d33b477410315fc23479ca7d38c74fa1804de9ad89df692810db88a4acd04058bc89acf9516ad693c56 WHIRLPOOL ebe811a59f85ebd8ffbd352114b8f34aee22a1041c46cd69b1578d6ed92d803e08bbd4c8938758607b5b8f2cfe0ed14a8c97f3a4e0427d40912be14499fb5b0d AUX gnome-shell-3.8.0-suspend.patch 2069 SHA256 5f313b9ece9e184b3559ee7b0df0c467adfab02749f499afc320c73b54b63a8a SHA512 5bc3cd0da743a78387423cc03902aa815429a540922b9caa5a749b99b966a135b46a7ccde5800987d1394db20d3234d360468b593ec02f4989175a12885cd513 WHIRLPOOL b91edd9ec9bd5f53c77193e6e344a654f6672a939196315a918d97d9e63903360ab067dbccf2b89c616c25215ef38c2472eca88df9235c99a97818d273a770f6 AUX gnome-shell-3.8.3-networkmanager-flag.patch 7516 SHA256 eebb33213a2c028348557cdc0e1d8da1304c3844f551b2897975c85cb1b016f7 SHA512 daf4dca864d0aceedc2b8a5d4e0f958c7b56606952db90e97092a072cfc2313d9f88ddf25d25208fd167a5e2c0daea71d3b8a1f12d32fa7cec86aa4e6cc20ef2 WHIRLPOOL 755cdd491e78bb325b2bffd378ec3a2e0c0cd73fcc05edf20c2c24dde843e6ad22005159c8d66d94614f7637da09c2f37327a99dd54d9648b3a15e1a2f3daaf5 +AUX gnome-shell-3.8.3-relock-screen.patch 7530 SHA256 e2a0f02e9f3580935333552b56166f1afc2d573283d2cd5d0d6cf292392193a0 SHA512 897923003874752c6c4c2c16dc5b8a00aa4c2d18e2b07271eddf329e35530ed936003360c584263801684ce77414dc9fdcc91c2d0c14f43e115fa32ed68f82fc WHIRLPOOL d8c1bae3263b95f389bc03b657dc72d834f1bfe7df2792f47a77458feca293ccad7c0853773ffc825349aafa20081717cd75ae9ae6774a32526d0056c5e03fcb DIST gnome-shell-3.6.3.1.tar.xz 1408036 SHA256 4e0328d43ac443e7cc0c43bb67895112643952f14cd20fff1109c6cc5849d603 SHA512 62475d1c2da2d3716158ef896214ada3c03a0fb226cd76a550b542d5cd0ce97303316cecf6a1feea7729666de9f29c333a79a6f6822b29245a1d7535a6c4c6b8 WHIRLPOOL 21146084b74372fbee6ff6f1a4a4609c16601ea0a39331a684dcda57a74a965146ca9860e3a170160c720175111c0c0a0c49f3d3c960ee335a39775a4945704b -DIST gnome-shell-3.8.2.tar.xz 1512268 SHA256 ffdf42d382d50cd756f1f51a31eaa6877edb51a08f0ca80b6e973f05072416df SHA512 67fac56e9e3ba4ffa2f6e7ef4906e1adc735fbd7c0f25cc8d95e1e6e4a73e2b17885d056677a6d6234e97a826511976a1a17c16b0e529d73682d945f68d6fd77 WHIRLPOOL 1722e23098a6fa3c81c87bf23940d066d0a6b7173a44683a463df51243b009f44418174374b65ff0b302a4725a52c5b3a9366b99b0db9625c1239bfe5cbfb515 DIST gnome-shell-3.8.3.tar.xz 1513636 SHA256 145724f21ead9dbe0c39d3ab468b39264c7aaf3f0fa5d152b295d905d8339c22 SHA512 d95a7ce24073046ea196b1f299bef1a1f4581b3357da364162b7e1cc53d051e628625c0b74bcd835d60f77d39874c8e0f86e3f66c0205539179f64cbe983a16b WHIRLPOOL 9ed4566761115346f0db8e35b0da9f5409418e78176b5159a41541a6723e511bbdaa50b0808c387f8339651066452934732c5c384fabaa7a5427be8ab5e9ec9e EBUILD gnome-shell-3.6.3.1.ebuild 7138 SHA256 e8e1bf07cb3768a303714db4fd16b3ba59adc67624ee4b83de35a8b1a3d17f25 SHA512 600e3a5c38dfe9742d4d0540b8cc6a87fc5bf663d99cd76fcc160a0ce97f967e3d93fb750120e30abee8580c84c00cf8ba08190e9f856e34938afdb01ab3574b WHIRLPOOL 30c66e7a010818f69d0387c145041bdcc2354f44e83939796c9b3ace20e77b5e469838f055da342451baa24e940474f0aec4e74fce8e92434fbb98c0334de6c6 -EBUILD gnome-shell-3.8.2.ebuild 7201 SHA256 9061d05d653ed0c6c0e2a2dbee6647ffa902411a87a7067de1e7803d7c5dfe43 SHA512 d85cb38bcd90ad25ce4169c3caaf644514b1675f0f6dc0ad6b072978415e83900d952fe187f466174a516739e5575cc6c8a587a16dc30cab69069ec72501e369 WHIRLPOOL f7e034935976ffdeb1cf393de3167433f7e250d1fe849a3b5b7b292e20bd557fdc09be4f40f3f66b5b88743cd0f5c0a8d1f4c0587a649f7d8ca45cdcd4020213 +EBUILD gnome-shell-3.8.3-r1.ebuild 7481 SHA256 109c1350d49a252f47d967101a6c0a61f21dcf072f7ecd990711055305199ed8 SHA512 da6f402f31e411972913623a65d1e23c8ed8682fcedc12ec84d37cd67a5c1da51c90e6cbb33bd88430d77f942ab78472f2775f4633b5c5e55100d7a7060004d0 WHIRLPOOL 576513cd3abbf349770bbf09de646bfc29b3d31b6220ec9034e44a008ea4e391588f582e061b2f7fa7acca0dff279518e57a6b25e9997628f9d356d15b19102b EBUILD gnome-shell-3.8.3.ebuild 7334 SHA256 9b0179a550ebe9e205df72c48378e5f9585e9b23ddd5daa787cb99aefe3d0d5a SHA512 89437d67fb83052737ee4f720a135178c301faa93d556f4389fedefb281e9dee5a385ea7dcb4a8237fa4f794feb8cec35988e07975a0bc6d1457cba4ff4919e4 WHIRLPOOL df891878402af49b6fa1367f18bcde00e50594763206505c8d96d3ecf4c1ac7eecd42e78ddb87e7a05de3948ca05a81482dbeeea440bd60af2779a44249aebeb -MISC ChangeLog 8917 SHA256 6aff47045609b548beb38b9b16db4b343dda61ae4fd63667dcf2122c07a8cbd0 SHA512 e2961e9ac5b04ebc7fcbb1ca45a4d3fce2906f4ac916fc3f06bfd275a8940638ed2d089f63bd5b396f4a4e8c397f4cc2d09971af185891f2ae58f2306a45c222 WHIRLPOOL 254f16122ced025ad2b1fb9e80a638302b44758762237a855da915a55c55c8ce1d380a4e905b48001fc8e4259965e9e67906c23911f7c874f7506363ff7f5a76 +MISC ChangeLog 9209 SHA256 48e6f651a518012612818d104fcca389816303f9d75f348eed1cad71cf43d7f1 SHA512 7a096b04d3cdc87e6aeef274666738a46a59f5ba6d611f2fab228d43bbcbd0f0e28c2361211adf5380813ef105305321ca85d5f03299745fc042ab86a2d05770 WHIRLPOOL 09a260699559cb03d4afab77181dbb17d00773c31a5140d6d02053079181feb94c6a61ceeddd1ab2b49b5ba2439f818c55d8a2d88247fd2fb3317dd09978ebc7 MISC metadata.xml 400 SHA256 23973e81d0dce0aa3c01a805dc6baa386c626c07015e8b0675b3402f7850b88f SHA512 5efbd89e333f41da839f6f18bdbbb236efd42642d57eb0317d448bbcd54fef36289125fc534d6bf1441eb852983c5dacda98712c4f1c6633b040305f1fc133f9 WHIRLPOOL a2e8a25716a103c6c123b4afd3393419ccc723c8f198cfa8dfa84666095ac231fac5253b4d5d0de9baff357f598edaa163605bb23673c7d72314585b7a5dceb3 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iEYEAREIAAYFAlG01y8ACgkQCaWpQKGI+9QRWwCfeWq/BNzGpeV6M5JX11Cs4aD0 -TBgAn3oRZ7cml+MZvrf3CVdwts3SQQEa -=ILwH +iEYEAREIAAYFAlG3ArIACgkQCaWpQKGI+9RgkQCdEMe7fcp9DqmLzzYKlFJ8RHt6 +hLYAn1FQpaoM6w0qJ6h3MjOppG5IqIzh +=a36S -----END PGP SIGNATURE----- diff --git a/gnome-base/gnome-shell/files/gnome-shell-3.8.3-relock-screen.patch b/gnome-base/gnome-shell/files/gnome-shell-3.8.3-relock-screen.patch new file mode 100644 index 000000000000..c816b71238b8 --- /dev/null +++ b/gnome-base/gnome-shell/files/gnome-shell-3.8.3-relock-screen.patch @@ -0,0 +1,226 @@ +From ccfa3d3be15b3a52bfcc37feee3abb2f2d4f66cb Mon Sep 17 00:00:00 2001 +From: Colin Walters +Date: Thu, 17 Jan 2013 19:39:54 +0000 +Subject: Re-lock the screen if we're restarted from a previously crashed shell + +This way we "fail closed", which is better for security. + +See https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/1064584 + +https://bugzilla.gnome.org/show_bug.cgi?id=691987 +--- +diff --git a/js/ui/main.js b/js/ui/main.js +index 2657678..2dc421b 100644 +--- a/js/ui/main.js ++++ b/js/ui/main.js +@@ -195,6 +195,9 @@ function _initializeUI() { + if (keybindingMode == Shell.KeyBindingMode.NONE) { + keybindingMode = Shell.KeyBindingMode.NORMAL; + } ++ if (screenShield) { ++ screenShield.lockIfWasLocked(); ++ } + }); + } + +diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js +index 48cfaa6..185f109 100644 +--- a/js/ui/screenShield.js ++++ b/js/ui/screenShield.js +@@ -30,6 +30,7 @@ const SCREENSAVER_SCHEMA = 'org.gnome.desktop.screensaver'; + const LOCK_ENABLED_KEY = 'lock-enabled'; + const LOCK_DELAY_KEY = 'lock-delay'; + ++const LOCKED_STATE_STR = 'screenShield.locked'; + // fraction of screen height the arrow must reach before completing + // the slide up automatically + const ARROW_DRAG_THRESHOLD = 0.1; +@@ -1175,6 +1176,7 @@ const ScreenShield = new Lang.Class({ + this._isLocked = false; + this.emit('active-changed'); + this.emit('locked-changed'); ++ global.set_runtime_state(LOCKED_STATE_STR, null); + }, + + activate: function(animate) { +@@ -1191,6 +1193,7 @@ const ScreenShield = new Lang.Class({ + } + + this._resetLockScreen(animate, animate); ++ global.set_runtime_state(LOCKED_STATE_STR, GLib.Variant.new('b', true)); + + // We used to set isActive and emit active-changed here, + // but now we do that from lockScreenShown, which means +@@ -1217,5 +1220,15 @@ const ScreenShield = new Lang.Class({ + + this.emit('locked-changed'); + }, ++ ++ // If the previous shell crashed, and gnome-session restarted us, then re-lock ++ lockIfWasLocked: function() { ++ let wasLocked = global.get_runtime_state('b', LOCKED_STATE_STR); ++ if (wasLocked === null) ++ return; ++ Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this, function() { ++ this.lock(false); ++ })); ++ } + }); + Signals.addSignalMethods(ScreenShield.prototype); +diff --git a/src/shell-global.c b/src/shell-global.c +index 9a594b7..2f96048 100644 +--- a/src/shell-global.c ++++ b/src/shell-global.c +@@ -82,6 +82,8 @@ struct _ShellGlobal { + const char *userdatadir; + StFocusManager *focus_manager; + ++ GFile *runtime_state_path; ++ + guint work_count; + GSList *leisure_closures; + guint leisure_function_id; +@@ -232,6 +234,8 @@ shell_global_init (ShellGlobal *global) + const char *datadir = g_getenv ("GNOME_SHELL_DATADIR"); + const char *shell_js = g_getenv("GNOME_SHELL_JS"); + char *imagedir, **search_path; ++ char *path; ++ const char *byteorder_string; + + if (!datadir) + datadir = GNOME_SHELL_DATADIR; +@@ -254,6 +258,20 @@ shell_global_init (ShellGlobal *global) + global->userdatadir = g_build_filename (g_get_user_data_dir (), "gnome-shell", NULL); + g_mkdir_with_parents (global->userdatadir, 0700); + ++#if G_BYTE_ORDER == G_LITTLE_ENDIAN ++ byteorder_string = "LE"; ++#else ++ byteorder_string = "BE"; ++#endif ++ ++ /* And the runtime state */ ++ path = g_strdup_printf ("%s/gnome-shell/runtime-state-%s.%s", ++ g_get_user_runtime_dir (), ++ byteorder_string, ++ XDisplayName (NULL)); ++ (void) g_mkdir_with_parents (path, 0700); ++ global->runtime_state_path = g_file_new_for_path (path); ++ + global->settings = g_settings_new ("org.gnome.shell"); + + global->grab_notifier = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL)); +@@ -295,6 +313,8 @@ shell_global_finalize (GObject *object) + + the_object = NULL; + ++ g_clear_object (&global->runtime_state_path); ++ + G_OBJECT_CLASS(shell_global_parent_class)->finalize (object); + } + +@@ -1764,3 +1784,83 @@ shell_global_get_session_mode (ShellGlobal *global) + + return global->session_mode; + } ++ ++static GFile * ++get_runtime_state_path (ShellGlobal *global, ++ const char *property_name) ++{ ++ return g_file_get_child (global->runtime_state_path, property_name); ++} ++ ++/** ++ * shell_global_set_runtime_state: ++ * @global: a #ShellGlobal ++ * @property_name: Name of the property ++ * @variant: (allow-none): A #GVariant, or %NULL to unset ++ * ++ * Change the value of serialized runtime state. ++ */ ++void ++shell_global_set_runtime_state (ShellGlobal *global, ++ const char *property_name, ++ GVariant *variant) ++{ ++ GFile *path; ++ ++ path = get_runtime_state_path (global, property_name); ++ ++ if (variant == NULL) ++ (void) g_file_delete (path, NULL, NULL); ++ else ++ { ++ gsize size = g_variant_get_size (variant); ++ g_file_replace_contents (path, g_variant_get_data (variant), size, ++ NULL, FALSE, G_FILE_CREATE_REPLACE_DESTINATION, ++ NULL, NULL, NULL); ++ } ++} ++ ++/** ++ * shell_global_get_runtime_state: ++ * @global: a #ShellGlobal ++ * @property_type: Expected data type ++ * @property_name: Name of the property ++ * ++ * The shell maintains "runtime" state which does not persist across ++ * logout or reboot. ++ * ++ * Returns: The value of a serialized property, or %NULL if none stored ++ */ ++GVariant * ++shell_global_get_runtime_state (ShellGlobal *global, ++ const char *property_type, ++ const char *property_name) ++{ ++ GVariant *res = NULL; ++ GMappedFile *mfile; ++ GFile *path; ++ char *pathstr; ++ GError *local_error = NULL; ++ ++ path = get_runtime_state_path (global, property_name); ++ pathstr = g_file_get_path (path); ++ mfile = g_mapped_file_new (pathstr, FALSE, &local_error); ++ if (!mfile) ++ { ++ if (!g_error_matches (local_error, G_FILE_ERROR, G_FILE_ERROR_NOENT)) ++ { ++ g_warning ("Failed to open runtime state: %s", local_error->message); ++ } ++ g_clear_error (&local_error); ++ } ++ else ++ { ++ GBytes *bytes = g_mapped_file_get_bytes (mfile); ++ res = g_variant_new_from_bytes ((GVariantType*)property_type, bytes, TRUE); ++ g_bytes_unref (bytes); ++ g_mapped_file_unref (mfile); ++ } ++ ++ out: ++ return res; ++} +diff --git a/src/shell-global.h b/src/shell-global.h +index 69dff85..38532b5 100644 +--- a/src/shell-global.h ++++ b/src/shell-global.h +@@ -149,6 +149,14 @@ void shell_global_reexec_self (ShellGlobal *global); + + const char * shell_global_get_session_mode (ShellGlobal *global); + ++void shell_global_set_runtime_state (ShellGlobal *global, ++ const char *property_name, ++ GVariant *variant); ++GVariant * shell_global_get_runtime_state (ShellGlobal *global, ++ const char *property_type, ++ const char *property_name); ++ ++ + G_END_DECLS + + #endif /* __SHELL_GLOBAL_H__ */ +-- +cgit v0.9.2 diff --git a/gnome-base/gnome-shell/gnome-shell-3.8.2.ebuild b/gnome-base/gnome-shell/gnome-shell-3.8.2.ebuild deleted file mode 100644 index e48311921bca..000000000000 --- a/gnome-base/gnome-shell/gnome-shell-3.8.2.ebuild +++ /dev/null @@ -1,205 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-shell/gnome-shell-3.8.2.ebuild,v 1.5 2013/06/02 00:03:11 abcd Exp $ - -EAPI="5" -GCONF_DEBUG="no" -GNOME2_LA_PUNT="yes" -PYTHON_COMPAT=( python2_{6,7} ) - -inherit autotools eutils gnome2 multilib pax-utils python-r1 - -DESCRIPTION="Provides core UI functions for the GNOME 3 desktop" -HOMEPAGE="http://live.gnome.org/GnomeShell" - -LICENSE="GPL-2+ LGPL-2+" -SLOT="0" -IUSE="+bluetooth +i18n +networkmanager" -KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86" - -# libXfixes-5.0 needed for pointer barriers -# TODO: gstreamer support is currently automagical: -# gstreamer? ( >=media-libs/gstreamer-0.11.92 ) -COMMON_DEPEND=" - >=app-accessibility/at-spi2-atk-2.5.3 - >=dev-libs/atk-2[introspection] - >=app-crypt/gcr-3.8[introspection] - >=dev-libs/glib-2.35:2 - >=dev-libs/gjs-1.35.8 - >=dev-libs/gobject-introspection-0.10.1 - >=x11-libs/gtk+-3.7.9:3[introspection] - >=media-libs/clutter-1.13.4:1.0[introspection] - >=dev-libs/json-glib-0.13.2 - >=dev-libs/libcroco-0.6.2:0.6 - >=gnome-base/gnome-desktop-3.7.90:3=[introspection] - >=gnome-base/gsettings-desktop-schemas-3.7.4 - >=gnome-base/gnome-keyring-3.3.90 - >=gnome-base/gnome-menus-3.5.3:3[introspection] - gnome-base/libgnome-keyring - >=gnome-extra/evolution-data-server-3.5.3:= - >=media-libs/gstreamer-0.11.92:1.0 - >=net-im/telepathy-logger-0.2.4[introspection] - >=net-libs/telepathy-glib-0.19[introspection] - >=sys-auth/polkit-0.100[introspection] - >=x11-libs/libXfixes-5.0 - >=x11-wm/mutter-3.8.2[introspection] - >=x11-libs/startup-notification-0.11 - - ${PYTHON_DEPS} - dev-python/pygobject:3[${PYTHON_USEDEP}] - - dev-libs/dbus-glib - dev-libs/libxml2:2 - gnome-base/librsvg - media-libs/libcanberra[gtk3] - media-libs/mesa - >=media-sound/pulseaudio-2 - >=net-libs/libsoup-2.40:2.4[introspection] - x11-libs/libX11 - x11-libs/gdk-pixbuf:2[introspection] - x11-libs/pango[introspection] - x11-apps/mesa-progs - - bluetooth? ( >=net-wireless/gnome-bluetooth-3.5[introspection] ) - networkmanager? ( >=net-misc/networkmanager-0.9.6[introspection] ) -" -# Runtime-only deps are probably incomplete and approximate. -# Introspection deps generated using: -# grep -roe "imports.gi.*" gnome-shell-* | cut -f2 -d: | sort | uniq -# Each block: -# 1. Pull in polkit-0.101 for pretty authorization dialogs -# 2. Introspection stuff needed via imports.gi.* -# 3. gnome-session is needed for gnome-session-quit -# 4. Control shell settings -# 5. xdg-utils needed for xdg-open, used by extension tool -# 6. gnome-icon-theme-symbolic and dejavu font neeed for various icons & arrows -# 7. IBus is needed for i18n integration -# 8. mobile-broadband-provider-info, timezone-data for shell-mobile-providers.c -RDEPEND="${COMMON_DEPEND} - >=sys-auth/polkit-0.101[introspection] - - >=app-accessibility/caribou-0.4.8 - >=gnome-base/gdm-3.5[introspection] - >=gnome-base/libgnomekbd-2.91.4[introspection] - media-libs/cogl[introspection] - >=sys-apps/accountsservice-0.6.14[introspection] - sys-power/upower[introspection] - - >=gnome-base/gnome-session-2.91.91 - >=gnome-base/gnome-settings-daemon-2.91 - >=gnome-base/gnome-control-center-2.91.92-r1[bluetooth(+)?] - - x11-misc/xdg-utils - - media-fonts/dejavu - x11-themes/gnome-icon-theme-symbolic - - || ( sys-auth/consolekit >=sys-apps/systemd-31 ) - i18n? ( >=app-i18n/ibus-1.4.99[dconf,gtk3,introspection] ) - networkmanager? ( - net-misc/mobile-broadband-provider-info - sys-libs/timezone-data ) -" -DEPEND="${COMMON_DEPEND} - dev-libs/libxslt - >=dev-util/gtk-doc-am-1.17 - >=dev-util/intltool-0.40 - gnome-base/gnome-common - >=sys-devel/gettext-0.17 - virtual/pkgconfig - !!=dev-lang/spidermonkey-1.8.2* -" -# libmozjs.so is picked up from /usr/lib while compiling, so block at build-time -# https://bugs.gentoo.org/show_bug.cgi?id=360413 - -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -src_prepare() { - # Fix automagic gnome-bluetooth dep, bug #398145 - epatch "${FILESDIR}/${PN}-3.7.90-bluetooth-flag.patch" - - # Make networkmanager optional, bug #398593 - epatch "${FILESDIR}/${PN}-3.8.0-networkmanager-flag-r1.patch" - - # Revert suspend break, upstream bug #693162 (from Debian) - epatch "${FILESDIR}/${PN}-3.8.0-suspend.patch" - - eautoreconf - gnome2_src_prepare -} - -src_configure() { - # Do not error out on warnings - gnome2_src_configure \ - --enable-man \ - --enable-compile-warnings=maximum \ - --disable-jhbuild-wrapper-script \ - $(use_with bluetooth) \ - $(use_enable networkmanager) \ - BROWSER_PLUGIN_DIR="${EPREFIX}"/usr/$(get_libdir)/nsbrowser/plugins -} - -src_install() { - gnome2_src_install - python_replicate_script "${ED}/usr/bin/gnome-shell-extension-tool" - python_replicate_script "${ED}/usr/bin/gnome-shell-perf-tool" - - # Required for gnome-shell on hardened/PaX, bug #398941 - # Future-proof for >=spidermonkey-1.8.7 following polkit's example - if has_version '=dev-lang/spidermonkey-1.8.7[jit]'; then - pax-mark m "${ED}usr/bin/gnome-shell" - fi - # Required for gnome-shell on hardened/PaX #457146 and #457194 - # PaX EMUTRAMP need to be on - if has_version '>=dev-libs/libffi-3.0.13[pax_kernel]'; then - pax-mark E "${ED}usr/bin/gnome-shell" - fi -} - -pkg_postinst() { - gnome2_pkg_postinst - - if ! has_version 'media-libs/gst-plugins-good:1.0' || \ - ! has_version 'media-plugins/gst-plugins-vpx:1.0'; then - ewarn "To make use of GNOME Shell's built-in screen recording utility," - ewarn "you need to either install media-libs/gst-plugins-good:1.0" - ewarn "and media-plugins/gst-plugins-vpx:1.0, or use dconf-editor to change" - ewarn "apps.gnome-shell.recorder/pipeline to what you want to use." - fi - - if ! has_version ">=x11-base/xorg-server-1.11"; then - ewarn "If you use multiple screens, it is highly recommended that you" - ewarn "upgrade to >=x11-base/xorg-server-1.11 to be able to make use of" - ewarn "pointer barriers which will make it easier to use hot corners." - fi - - if has_version "=media-libs/gstreamer-0.11.92 ) +# +# gnome-shell/gnome-control-center/mutter/gnome-settings-daemon better to be in sync for 3.8.3 +# https://mail.gnome.org/archives/gnome-announce-list/2013-June/msg00005.html +COMMON_DEPEND=" + >=app-accessibility/at-spi2-atk-2.5.3 + >=dev-libs/atk-2[introspection] + >=app-crypt/gcr-3.7.5[introspection] + >=dev-libs/glib-2.35:2 + >=dev-libs/gjs-1.35.8 + >=dev-libs/gobject-introspection-0.10.1 + >=x11-libs/gtk+-3.7.9:3[introspection] + >=media-libs/clutter-1.13.4:1.0[introspection] + >=dev-libs/json-glib-0.13.2 + >=dev-libs/libcroco-0.6.2:0.6 + >=gnome-base/gnome-desktop-3.7.90:3=[introspection] + >=gnome-base/gsettings-desktop-schemas-3.7.4 + >=gnome-base/gnome-keyring-3.3.90 + >=gnome-base/gnome-menus-3.5.3:3[introspection] + gnome-base/libgnome-keyring + >=gnome-extra/evolution-data-server-3.5.3:= + >=media-libs/gstreamer-0.11.92:1.0 + >=net-im/telepathy-logger-0.2.4[introspection] + >=net-libs/telepathy-glib-0.19[introspection] + >=sys-auth/polkit-0.100[introspection] + >=x11-libs/libXfixes-5.0 + >=x11-wm/mutter-3.8.3[introspection] + >=x11-libs/startup-notification-0.11 + + ${PYTHON_DEPS} + dev-python/pygobject:3[${PYTHON_USEDEP}] + + dev-libs/dbus-glib + dev-libs/libxml2:2 + gnome-base/librsvg + media-libs/libcanberra[gtk3] + media-libs/mesa + >=media-sound/pulseaudio-2 + >=net-libs/libsoup-2.40:2.4[introspection] + x11-libs/libX11 + x11-libs/gdk-pixbuf:2[introspection] + x11-libs/pango[introspection] + x11-apps/mesa-progs + + bluetooth? ( >=net-wireless/gnome-bluetooth-3.5[introspection] ) + networkmanager? ( >=net-misc/networkmanager-0.9.6[introspection] ) +" +# Runtime-only deps are probably incomplete and approximate. +# Introspection deps generated using: +# grep -roe "imports.gi.*" gnome-shell-* | cut -f2 -d: | sort | uniq +# Each block: +# 1. Pull in polkit-0.101 for pretty authorization dialogs +# 2. Introspection stuff needed via imports.gi.* +# 3. gnome-session is needed for gnome-session-quit +# 4. Control shell settings +# 5. xdg-utils needed for xdg-open, used by extension tool +# 6. gnome-icon-theme-symbolic and dejavu font neeed for various icons & arrows +# 7. IBus is needed for i18n integration +# 8. mobile-broadband-provider-info, timezone-data for shell-mobile-providers.c +RDEPEND="${COMMON_DEPEND} + >=sys-auth/polkit-0.101[introspection] + + >=app-accessibility/caribou-0.4.8 + >=gnome-base/gdm-3.5[introspection] + >=gnome-base/libgnomekbd-2.91.4[introspection] + media-libs/cogl[introspection] + >=sys-apps/accountsservice-0.6.14[introspection] + sys-power/upower[introspection] + + >=gnome-base/gnome-session-2.91.91 + >=gnome-base/gnome-settings-daemon-3.8.3 + >=gnome-base/gnome-control-center-3.8.3[bluetooth(+)?] + + x11-misc/xdg-utils + + media-fonts/dejavu + x11-themes/gnome-icon-theme-symbolic + + || ( sys-auth/consolekit >=sys-apps/systemd-31 ) + i18n? ( >=app-i18n/ibus-1.4.99[dconf,gtk3,introspection] ) + networkmanager? ( + net-misc/mobile-broadband-provider-info + sys-libs/timezone-data ) +" +DEPEND="${COMMON_DEPEND} + dev-libs/libxslt + >=dev-util/gtk-doc-am-1.17 + >=dev-util/intltool-0.40 + gnome-base/gnome-common + >=sys-devel/gettext-0.17 + virtual/pkgconfig + !!=dev-lang/spidermonkey-1.8.2* +" +# libmozjs.so is picked up from /usr/lib while compiling, so block at build-time +# https://bugs.gentoo.org/show_bug.cgi?id=360413 + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +src_prepare() { + # Fix automagic gnome-bluetooth dep, bug #398145 + epatch "${FILESDIR}/${PN}-3.7.90-bluetooth-flag.patch" + + # Make networkmanager optional, bug #398593 + epatch "${FILESDIR}/${PN}-3.8.3-networkmanager-flag.patch" + + # Revert suspend break, upstream bug #693162 (from Debian) + epatch "${FILESDIR}/${PN}-3.8.0-suspend.patch" + + # Re-lock the screen if we're restarted from a previously crashed shell (from 'master') + epatch "${FILESDIR}/${PN}-3.8.3-relock-screen.patch" + + eautoreconf + gnome2_src_prepare +} + +src_configure() { + # Do not error out on warnings + gnome2_src_configure \ + --enable-man \ + --disable-jhbuild-wrapper-script \ + $(use_with bluetooth) \ + $(use_enable networkmanager) \ + BROWSER_PLUGIN_DIR="${EPREFIX}"/usr/$(get_libdir)/nsbrowser/plugins +} + +src_install() { + gnome2_src_install + python_replicate_script "${ED}/usr/bin/gnome-shell-extension-tool" + python_replicate_script "${ED}/usr/bin/gnome-shell-perf-tool" + + # Required for gnome-shell on hardened/PaX, bug #398941 + # Future-proof for >=spidermonkey-1.8.7 following polkit's example + if has_version '=dev-lang/spidermonkey-1.8.7[jit]'; then + pax-mark m "${ED}usr/bin/gnome-shell" + fi + # Required for gnome-shell on hardened/PaX #457146 and #457194 + # PaX EMUTRAMP need to be on + if has_version '>=dev-libs/libffi-3.0.13[pax_kernel]'; then + pax-mark E "${ED}usr/bin/gnome-shell" + fi +} + +pkg_postinst() { + gnome2_pkg_postinst + + if ! has_version 'media-libs/gst-plugins-good:1.0' || \ + ! has_version 'media-plugins/gst-plugins-vpx:1.0'; then + ewarn "To make use of GNOME Shell's built-in screen recording utility," + ewarn "you need to either install media-libs/gst-plugins-good:1.0" + ewarn "and media-plugins/gst-plugins-vpx:1.0, or use dconf-editor to change" + ewarn "apps.gnome-shell.recorder/pipeline to what you want to use." + fi + + if ! has_version ">=x11-base/xorg-server-1.11"; then + ewarn "If you use multiple screens, it is highly recommended that you" + ewarn "upgrade to >=x11-base/xorg-server-1.11 to be able to make use of" + ewarn "pointer barriers which will make it easier to use hot corners." + fi + + if has_version "