From 1119e08d2e237f2fcb9c07ce7d2601569d5332a78af99f68757fefd229997dfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Lie?= Date: Thu, 16 Oct 2025 08:18:09 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-browser-connector?expand=0&rev=12 --- .gitattributes | 23 +++++++ .gitignore | 1 + gnome-browser-connector-42.1.tar.xz | 3 + gnome-browser-connector.changes | 39 ++++++++++++ gnome-browser-connector.spec | 77 +++++++++++++++++++++++ python36.patch | 94 +++++++++++++++++++++++++++++ 6 files changed, 237 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 gnome-browser-connector-42.1.tar.xz create mode 100644 gnome-browser-connector.changes create mode 100644 gnome-browser-connector.spec create mode 100644 python36.patch diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/gnome-browser-connector-42.1.tar.xz b/gnome-browser-connector-42.1.tar.xz new file mode 100644 index 0000000..33791c8 --- /dev/null +++ b/gnome-browser-connector-42.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bd9702ce1c163606ca32b8c13d1f3ba6e82b247cf87aac60610b411df1556212 +size 26732 diff --git a/gnome-browser-connector.changes b/gnome-browser-connector.changes new file mode 100644 index 0000000..9b55bcd --- /dev/null +++ b/gnome-browser-connector.changes @@ -0,0 +1,39 @@ +------------------------------------------------------------------- +Tue Oct 14 14:32:21 UTC 2025 - Richard Rahl + +- add unzip as a requires, otherwise the extensions can't get + extracted + +------------------------------------------------------------------- +Mon May 6 08:24:37 UTC 2024 - Yifan Jiang + +- Patch to support python 3.6 on SLE/Leap 15.6 (bsc#1223902): + python36.patch. + +------------------------------------------------------------------- +Mon Apr 29 12:37:38 UTC 2024 - pgajdos@suse.com + +- remove dependency on /usr/bin/python3 using + %python3_fix_shebang macro, [bsc#1212476] + +------------------------------------------------------------------- +Sun Sep 11 18:17:58 UTC 2022 - Bjørn Lie + +- Use new upstream source url. + +------------------------------------------------------------------- +Fri Sep 9 09:13:53 UTC 2022 - Atri Bhattacharya + +- Update to version 42.1: + + Added detected python path in scripts shebang. + + Restored compatibility with Python 3.8. + + Fix errors in `get_variant` helper that leads to connector + crash. + + Fixed build system error when python dependencies are missing. +- Update Source tag to reflect new home. +- Drop hashbang fixes to python scripts: no longer required. + +------------------------------------------------------------------- +Sun Aug 21 23:50:48 UTC 2022 - Atri Bhattacharya + +- Initial package (renamed from chrome-gnome-shell). diff --git a/gnome-browser-connector.spec b/gnome-browser-connector.spec new file mode 100644 index 0000000..1a964a5 --- /dev/null +++ b/gnome-browser-connector.spec @@ -0,0 +1,77 @@ +# +# spec file for package gnome-browser-connector +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: gnome-browser-connector +Version: 42.1 +Release: 0 +Summary: GNOME Shell integration for Chrome Extension compatible browsers +License: GPL-3.0-or-later +Group: Productivity/Networking/Web/Browsers +URL: https://wiki.gnome.org/action/show/Projects/GnomeShellIntegration +Source: https://download.gnome.org/sources/%{name}/42/%{name}-%{version}.tar.xz +# PATCH-FIX-SLE python36.patch bsc#1223902 yfjiang@suse.com -- Patch to support python 3.6 on SLE/Leap 15.6. +Patch0: python36.patch + +BuildRequires: hicolor-icon-theme +BuildRequires: meson +BuildRequires: python3-gobject +Provides: chrome-gnome-shell = %{version} +Obsoletes: chrome-gnome-shell < %{version} +# Auto-install when the user uses GNOME Shell and any of the (known) supported browsers +Supplements: (gnome-shell and MozillaFirefox) +Supplements: (gnome-shell and chromium) +Supplements: (gnome-shell and google-chrome-stable) +Supplements: (gnome-shell and opera) +Requires: unzip + +%description +Browser extension for Google Chrome/Chromium, Firefox, Vivaldi, Opera (and other +Browser Extension, Chrome Extension or WebExtensions capable browsers) and native +host messaging connector that provides integration with GNOME Shell and the +corresponding extensions repository https://extensions.gnome.org. + +%prep +%setup -q +%if 0%{?sle_version} && 0%{?sle_version} < 160000 +%autopatch -p1 +%endif + +%build +%meson +%meson_build + +%install +%meson_install +%python3_fix_shebang + +%files +%license LICENSE +%doc README.md NEWS +%config %{_sysconfdir}/chromium/ +%config %{_sysconfdir}/opt/chrome/ +%{_bindir}/gnome-browser-connector +%{_bindir}/gnome-browser-connector-host +%{python3_sitelib}/gnome_browser_connector/ +%{_libdir}/mozilla/ +%{_datadir}/applications/org.gnome.BrowserConnector.desktop +%dir %{_datadir}/dbus-1 +%dir %{_datadir}/dbus-1/services +%{_datadir}/dbus-1/services/org.gnome.BrowserConnector.service +%{_datadir}/icons/hicolor/*/apps/*.png + +%changelog diff --git a/python36.patch b/python36.patch new file mode 100644 index 0000000..ccc50e1 --- /dev/null +++ b/python36.patch @@ -0,0 +1,94 @@ +Index: gnome-browser-connector-42.1/gnome_browser_connector/application.py +=================================================================== +--- gnome-browser-connector-42.1.orig/gnome_browser_connector/application.py ++++ gnome-browser-connector-42.1/gnome_browser_connector/application.py +@@ -1,6 +1,5 @@ + # SPDX-License-Identifer: GPL-3.0-or-later + +-from __future__ import annotations + + import signal + import sys +@@ -120,9 +119,9 @@ class Application(BaseGioApplication): + + def default_exception_hook( + self, +- exception_type: type[BaseException], ++ exception_type: 'type[BaseException]', + value: BaseException, +- tb: TracebackType ++ tb: 'TracebackType' + ) -> None: + self._log.fatal("Uncaught exception of type %s occured", exception_type) + traceback.print_tb(tb) +Index: gnome-browser-connector-42.1/gnome_browser_connector/connector.py +=================================================================== +--- gnome-browser-connector-42.1.orig/gnome_browser_connector/connector.py ++++ gnome-browser-connector-42.1/gnome_browser_connector/connector.py +@@ -1,6 +1,5 @@ + # SPDX-License-Identifer: GPL-3.0-or-later + +-from __future__ import annotations + + import json + import struct +@@ -24,7 +23,7 @@ class Connector(ApplicationHandler): + # https://developer.chrome.com/extensions/nativeMessaging#native-messaging-host-protocol + MESSAGE_LENGTH_SIZE = 4 + +- def __init__(self, application: BaseGioApplication) -> None: ++ def __init__(self, application: 'BaseGioApplication') -> None: + super().__init__(application) + + self._log = get_logger(self) +@@ -83,12 +82,12 @@ class Connector(ApplicationHandler): + def on_dbus_signal( + self, + connection: Gio.DBusConnection, +- sender_name: Optional[str], ++ sender_name: 'Optional[str]', + object_path: str, + interface_name: str, + signal_name: str, + parameters: GLib.Variant, +- user_data: Optional[Any] ++ user_data: 'Optional[Any]' + ) -> None: + self._log.debug('Signal %s from %s', signal_name, interface_name) + +@@ -140,7 +139,7 @@ class Connector(ApplicationHandler): + self, + source: GLib.IOChannel, + condition: GLib.IOCondition, +- data: Optional[GObject.Object] ++ data: 'Optional[GObject.Object]' + ) -> Optional[bool]: + self._log.debug('On input') + text_length_bytes: bytes = source.read(self.MESSAGE_LENGTH_SIZE) +@@ -166,7 +165,7 @@ class Connector(ApplicationHandler): + + return True + +- def send_message(self, response: Any): ++ def send_message(self, response: 'Any'): + """ + Helper function that sends a message to the webapp. + :param response: dictionary of response data +@@ -191,7 +190,7 @@ class Connector(ApplicationHandler): + except IOError as e: + raise Exception(f'IOError occured: {e.strerror}') + +- def process_request(self, request: dict[str, Any]) -> None: ++ def process_request(self, request: 'dict[str, Any]') -> None: + self._log.debug("Execute: to %s", request['execute']) + + if request['execute'] == 'initialize': +@@ -355,7 +354,7 @@ class Connector(ApplicationHandler): + self._log.debug('Execute: from %s', request['execute']) + + # Helpers +- def dbus_call_response(self, method: str, parameters: Optional[GLib.Variant], result_property: str): ++ def dbus_call_response(self, method: str, parameters: 'Optional[GLib.Variant]', result_property: str): + try: + result = self._shell_proxy.call_sync(method, + parameters, -- 2.51.1