From f6c25c48a922f7dc863cf95176659f2549161eeb07b4ff4ca8695a24808eb21e Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 31 Oct 2024 18:47:11 +0000 Subject: [PATCH] - Update to 0.9.1 - Replace requires python-proton-vpn-connection with python-proton-vpn-api-core - Conflicts python-proton-vpn-network-manager-openvpn OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-proton-vpn-network-manager?expand=0&rev=12 --- .gitattributes | 23 +++++++ .gitignore | 1 + keyring.patch | 18 ++++++ python-proton-vpn-network-manager.changes | 39 ++++++++++++ python-proton-vpn-network-manager.spec | 77 +++++++++++++++++++++++ v0.4.2.tar.gz | 3 + v0.9.1.tar.gz | 3 + 7 files changed, 164 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 keyring.patch create mode 100644 python-proton-vpn-network-manager.changes create mode 100644 python-proton-vpn-network-manager.spec create mode 100644 v0.4.2.tar.gz create mode 100644 v0.9.1.tar.gz 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/keyring.patch b/keyring.patch new file mode 100644 index 0000000..16c9096 --- /dev/null +++ b/keyring.patch @@ -0,0 +1,18 @@ +diff --git a/proton/vpn/backend/linux/networkmanager/core/networkmanager.py b/proton/vpn/backend/linux/networkmanager/core/networkmanager.py +index 8fd7e55..a5b4149 100644 +--- a/proton/vpn/backend/linux/networkmanager/core/networkmanager.py ++++ b/proton/vpn/backend/linux/networkmanager/core/networkmanager.py +@@ -116,6 +116,13 @@ class LinuxNetworkManager(VPNConnection): + self._notify_subscribers(events.Disconnected(EventContext(connection=self))) + return + ++ try: ++ import keyring ++ k = keyring.get_keyring() ++ k.get_credential('ProtonVPN', 'ProtonUser') ++ except: ++ pass ++ + try: + future_vpn_connection = self.nm_client.start_connection_async(connection) + vpn_connection = await loop.run_in_executor( diff --git a/python-proton-vpn-network-manager.changes b/python-proton-vpn-network-manager.changes new file mode 100644 index 0000000..d7f814b --- /dev/null +++ b/python-proton-vpn-network-manager.changes @@ -0,0 +1,39 @@ +------------------------------------------------------------------- +Thu Oct 24 11:44:51 UTC 2024 - Yunhe Guo + +- Update to 0.9.1 +- Replace requires python-proton-vpn-connection with python-proton-vpn-api-core +- Conflicts python-proton-vpn-network-manager-openvpn + +------------------------------------------------------------------- +Wed May 22 11:59:17 UTC 2024 - Alexandre Vicenzi + +- Add keyring.patch to unlock Gnome Keyring if locked + +------------------------------------------------------------------- +Sun Apr 21 08:50:59 UTC 2024 - Dirk Müller + +- update to 0.4.2: + * Update to new interface + * Make necessary changes to support Wireguard protocol + +------------------------------------------------------------------- +Mon Mar 25 14:54:43 UTC 2024 - Dirk Müller + +- update to 0.4.0: + * Initialize connection with persisted parameters + +------------------------------------------------------------------- +Thu Mar 21 15:13:08 UTC 2024 - Alexandre Vicenzi + +- Add missing dependency PyCairo and pytest-asyncio + +------------------------------------------------------------------- +Tue Mar 19 15:11:27 UTC 2024 - Alexandre Vicenzi + +- Build for Leap + +------------------------------------------------------------------- +Mon Feb 12 11:57:57 UTC 2024 - Alexandre Vicenzi + +- Initial revision diff --git a/python-proton-vpn-network-manager.spec b/python-proton-vpn-network-manager.spec new file mode 100644 index 0000000..4e286eb --- /dev/null +++ b/python-proton-vpn-network-manager.spec @@ -0,0 +1,77 @@ +# +# spec file for package python-proton-vpn-network-manager +# +# Copyright (c) 2024 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/ +# + + +%define skip_python2 1 +%{?sle15_python_module_pythons} +Name: python-proton-vpn-network-manager +Version: 0.9.1 +Release: 0 +Summary: Proton VPN library for NetworkManager +License: GPL-3.0-or-later +Group: Development/Languages/Python +URL: https://github.com/ProtonVPN/python-proton-vpn-network-manager +Source: https://github.com/ProtonVPN/python-proton-vpn-network-manager/archive/refs/tags/v%{version}.tar.gz +# https://github.com/ProtonVPN/proton-vpn-gtk-app/issues/43 +Patch1: keyring.patch +BuildRequires: %{python_module gobject} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module proton-core} +BuildRequires: %{python_module proton-vpn-api-core} +BuildRequires: %{python_module pycairo} +BuildRequires: %{python_module pytest-asyncio} +BuildRequires: %{python_module pytest-cov} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module wheel} +BuildRequires: NetworkManager-devel +BuildRequires: fdupes +BuildRequires: pkgconfig +BuildRequires: python-rpm-macros +Requires: NetworkManager +Requires: python-gobject +Requires: python-proton-core +Requires: python-proton-vpn-api-core +Requires: python-pycairo +Conflicts: python-proton-vpn-network-manager-openvpn +Conflicts: python-protonvpn-nm-lib +BuildArch: noarch +%python_subpackages + +%description +This package contains functionality for Proton VPN client to interact with NetworkManager. + +%prep +%autosetup -p1 -n python-proton-vpn-network-manager-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +# buildroot doesn't provide network manager service, so it is not possible to run killswitch tests +%pytest tests --deselect "tests/integration/killswitch/default/test_killswitch_connection.py" --deselect "tests/integration/killswitch/wireguard/test_killswitch_connection.py" + +%files %{python_files} +%license LICENSE +%doc README.md +%{python_sitelib}/proton +%{python_sitelib}/proton_vpn_network_manager-%{version}*-info + +%changelog diff --git a/v0.4.2.tar.gz b/v0.4.2.tar.gz new file mode 100644 index 0000000..6d5a798 --- /dev/null +++ b/v0.4.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2666012e1d6d25ba9e6ad2da0d2ee664becf02013596fb2686a81139360339b +size 29266 diff --git a/v0.9.1.tar.gz b/v0.9.1.tar.gz new file mode 100644 index 0000000..90420ac --- /dev/null +++ b/v0.9.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f66205b0d318e2de85f35bd0a6be1212b9f3140c2dffbcca003b37b28acd4ebd +size 59890