From 984ebebb6c1581e105cc04ed8bb171da7be82ba1 Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Wed, 6 Jan 2021 15:10:48 +0100 Subject: [PATCH] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/gnome-extensions-app.git#d555af05f64c91d33ba606103215d7826b6e5d45 --- .gitignore | 5 + ...pp-Add-compatibility-with-GNOME-3.34.patch | 168 ++++++++++++++++++ README.md | 3 + gnome-extensions-app.spec | 103 +++++++++++ sources | 1 + 5 files changed, 280 insertions(+) create mode 100644 0001-extensions-app-Add-compatibility-with-GNOME-3.34.patch create mode 100644 README.md create mode 100644 gnome-extensions-app.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..94bd269 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,5 @@ +/gnome-shell-3.36.1.tar.xz +/gnome-shell-3.37.1.tar.xz +/gnome-shell-3.37.2.tar.xz +/gnome-shell-3.37.3.tar.xz +/gnome-shell-3.38.0.tar.xz diff --git a/0001-extensions-app-Add-compatibility-with-GNOME-3.34.patch b/0001-extensions-app-Add-compatibility-with-GNOME-3.34.patch new file mode 100644 index 0000000..173bcf5 --- /dev/null +++ b/0001-extensions-app-Add-compatibility-with-GNOME-3.34.patch @@ -0,0 +1,168 @@ +From 42d5ff3ec2d18d7239eac8a6ce0544d4f69efab3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +Date: Tue, 31 Mar 2020 19:53:50 +0200 +Subject: [PATCH] extensions-app: Add compatibility with GNOME 3.34 + +We are currently relying on 3.36 changes: + + - the addition of the UserExtensionsEnabled property + + - the separate org.gnome.Shell.Extensions name to expose + the interface + +In order to work with the previous stable release as well, we can +fall back to connecting to gnome-shell itself and changing the +underlying GSettings directly. +--- + subprojects/extensions-app/data/meson.build | 2 + + .../data/org.gnome.Extensions.gschema.xml | 12 +++++ + subprojects/extensions-app/js/main.js | 47 +++++++++++++++---- + subprojects/extensions-app/meson.build | 1 + + 4 files changed, 54 insertions(+), 8 deletions(-) + create mode 100644 subprojects/extensions-app/data/org.gnome.Extensions.gschema.xml + +diff --git a/subprojects/extensions-app/data/meson.build b/subprojects/extensions-app/data/meson.build +index 0568fafc8..e9399e3b6 100644 +--- a/subprojects/extensions-app/data/meson.build ++++ b/subprojects/extensions-app/data/meson.build +@@ -33,5 +33,7 @@ configure_file( + install_dir: servicedir, + ) + ++install_data(app_id + '.gschema.xml', install_dir: schemadir) ++ + subdir('icons') + subdir('metainfo') +diff --git a/subprojects/extensions-app/data/org.gnome.Extensions.gschema.xml b/subprojects/extensions-app/data/org.gnome.Extensions.gschema.xml +new file mode 100644 +index 000000000..d70d4bd4c +--- /dev/null ++++ b/subprojects/extensions-app/data/org.gnome.Extensions.gschema.xml +@@ -0,0 +1,12 @@ ++ ++ ++ ++ false ++ Disable user extensions ++ ++ Disable all extensions the user has enabled without affecting ++ the “enabled-extension” setting. ++ ++ ++ ++ +diff --git a/subprojects/extensions-app/js/main.js b/subprojects/extensions-app/js/main.js +index d25df9c57..f5ac2e564 100644 +--- a/subprojects/extensions-app/js/main.js ++++ b/subprojects/extensions-app/js/main.js +@@ -47,6 +47,10 @@ class Application extends Gtk.Application { + return this._shellProxy; + } + ++ get legacyMode() { ++ return this._legacyMode; ++ } ++ + vfunc_activate() { + this._shellProxy.CheckForUpdatesRemote(); + this._window.present(); +@@ -69,6 +73,13 @@ class Application extends Gtk.Application { + this._shellProxy = new GnomeShellProxy(Gio.DBus.session, + 'org.gnome.Shell.Extensions', '/org/gnome/Shell/Extensions'); + ++ this._legacyMode = this._shellProxy.g_name_owner === null; ++ ++ if (this._legacyMode) { ++ this._shellProxy = new GnomeShellProxy(Gio.DBus.session, ++ 'org.gnome.Shell', '/org/gnome/Shell'); ++ } ++ + this._window = new ExtensionsWindow({ application: this }); + } + }); +@@ -89,6 +100,10 @@ var ExtensionsWindow = GObject.registerClass({ + _init(params) { + super._init(params); + ++ this._settings = this.application.legacyMode ++ ? new Gio.Settings({ schema_id: 'org.gnome.shell' }) ++ : null; ++ + this._updatesCheckId = 0; + + this._exporter = new Shew.WindowExporter({ window: this }); +@@ -111,7 +126,12 @@ var ExtensionsWindow = GObject.registerClass({ + }); + action.connect('activate', toggleState); + action.connect('change-state', (a, state) => { +- this._shellProxy.UserExtensionsEnabled = state.get_boolean(); ++ const value = state.get_boolean(); ++ ++ if (this._settings) ++ this._settings.set_boolean('disable-user-extensions', !value); ++ else ++ this._shellProxy.UserExtensionsEnabled = value; + }); + this.add_action(action); + +@@ -124,8 +144,13 @@ var ExtensionsWindow = GObject.registerClass({ + this._shellProxy.connectSignal('ExtensionStateChanged', + this._onExtensionStateChanged.bind(this)); + +- this._shellProxy.connect('g-properties-changed', +- this._onUserExtensionsEnabledChanged.bind(this)); ++ if (this._settings) { ++ this._settings.connect('changed::disable-user-extensions', ++ this._onUserExtensionsEnabledChanged.bind(this)); ++ } else { ++ this._shellProxy.connect('g-properties-changed', ++ this._onUserExtensionsEnabledChanged.bind(this)); ++ } + this._onUserExtensionsEnabledChanged(); + + this._scanExtensions(); +@@ -166,9 +191,13 @@ var ExtensionsWindow = GObject.registerClass({ + } + } + +- this._shellProxy.OpenExtensionPrefsRemote(uuid, +- this._exportedHandle, +- { modal: new GLib.Variant('b', true) }); ++ if (this.application.legacyMode) { ++ this._shellProxy.LaunchExtensionPrefsRemote(uuid); ++ } else { ++ this._shellProxy.OpenExtensionPrefsRemote(uuid, ++ this._exportedHandle, ++ { modal: new GLib.Variant('b', true) }); ++ } + } + + _showAbout() { +@@ -228,8 +257,10 @@ var ExtensionsWindow = GObject.registerClass({ + + _onUserExtensionsEnabledChanged() { + let action = this.lookup_action('user-extensions-enabled'); +- action.set_state( +- new GLib.Variant('b', this._shellProxy.UserExtensionsEnabled)); ++ const newState = this._settings ++ ? !this._settings.get_boolean('disable-user-extensions') ++ : this._shellProxy.UserExtensionsEnabled; ++ action.set_state(new GLib.Variant('b', newState)); + } + + _onExtensionStateChanged(proxy, senderName, [uuid, newState]) { +diff --git a/subprojects/extensions-app/meson.build b/subprojects/extensions-app/meson.build +index 88536236a..ebf3da942 100644 +--- a/subprojects/extensions-app/meson.build ++++ b/subprojects/extensions-app/meson.build +@@ -34,6 +34,7 @@ icondir = join_paths(datadir, 'icons') + localedir = join_paths(datadir, 'locale') + metainfodir = join_paths(datadir, 'metainfo') + servicedir = join_paths(datadir, 'dbus-1', 'services') ++schemadir = join_paths(datadir, 'glib-2.0', 'schemas') + + gjs = find_program('gjs') + appstream_util = find_program('appstream-util', required: false) +-- +2.25.1 + diff --git a/README.md b/README.md new file mode 100644 index 0000000..b4e55bc --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# gnome-extensions-app + +The gnome-extensions-app package \ No newline at end of file diff --git a/gnome-extensions-app.spec b/gnome-extensions-app.spec new file mode 100644 index 0000000..27689f1 --- /dev/null +++ b/gnome-extensions-app.spec @@ -0,0 +1,103 @@ +%global _vpath_srcdir subprojects/extensions-app +%global source_name gnome-shell + +Name: gnome-extensions-app +Version: 3.38.0 +Release: 1%{?dist} +Summary: Manage GNOME Shell extensions + +License: GPLv2+ +URL: https://gitlab.gnome.org/GNOME/%{source_name} +Source0: https://download.gnome.org/sources/%{source_name}/3.38/%{source_name}-%{version}.tar.xz + +Patch0: 0001-extensions-app-Add-compatibility-with-GNOME-3.34.patch + +BuildRequires: gcc +BuildRequires: gettext +BuildRequires: meson +BuildRequires: git + +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: pkgconfig(gobject-introspection-1.0) +BuildRequires: gjs +BuildRequires: desktop-file-utils +BuildRequires: libappstream-glib + +Requires: gjs%{_isa} + +%define exec_name gnome-extensions-app +%define bus_name org.gnome.Extensions + +%description +GNOME Extensions is an application for configuring and removing +GNOME Shell extensions. + + +%prep +%setup -q -n %{source_name}-%{version} + +%if 0%{?flatpak} +%patch0 -p1 +%endif + +%{_vpath_srcdir}/generate-translations.sh + + +%build +%meson +%meson_build + +%check +%meson_test +desktop-file-validate %{buildroot}%{_datadir}/applications/%{bus_name}.desktop + + +%install +%meson_install + +%find_lang %{name} + +rm -rf %{buildroot}/%{_datadir}/%{name}/gir-1.0 + +%files -f %{name}.lang +%license COPYING +%{_bindir}/%{exec_name} +%{_datadir}/applications/%{bus_name}.desktop +%{_datadir}/dbus-1/services/%{bus_name}.service +%if 0%{?flatpak} +%{_datadir}/glib-2.0/schemas/%{bus_name}.gschema.xml +%endif +%{_datadir}/metainfo/%{bus_name}.metainfo.xml +%{_datadir}/icons/hicolor/scalable/apps/%{bus_name}.svg +%{_datadir}/icons/hicolor/scalable/apps/%{bus_name}.Devel.svg +%{_datadir}/icons/hicolor/symbolic/apps/%{bus_name}-symbolic.svg +%{_datadir}/%{name}/ +%{_libdir}/%{name}/ + + +%changelog +* Tue Sep 15 2020 Florian Müllner - 3.38.0-1 +- Update to 3.38.0 + +* Sat Aug 01 2020 Fedora Release Engineering - 3.37.3-3 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Jul 27 2020 Fedora Release Engineering - 3.37.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jul 07 2020 Florian Müllner - 3.37.2-1 +- Update to 3.37.3 + +* Wed Jun 03 2020 Florian Müllner - 3.37.2-1 +- Update to 3.37.2 + +* Thu Apr 30 2020 Florian Müllner - 3.37.1-1 +- Update to 3.37.1 + +* Wed Apr 01 2020 Florian Müllner - 3.36.1-1 +- Make flatpak build compatible with F31 + +* Tue Mar 31 2020 Florian Müllner - 3.36.1-1 +- Build initial version diff --git a/sources b/sources new file mode 100644 index 0000000..5156476 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (gnome-shell-3.38.0.tar.xz) = 5188d303886afbab480d9086ced0818e819e1916cf5062f20b7f938ba0c427a338e27946ae96ec855942c9f4b7b68619b92364e934f3e2068f08f905c09cc56d