14
0

Accepting request 674430 from home:cbosdonnat:branches:devel:languages:python

- Add JWT token plugin feature.
  Added patches:
    u_added_jwt_tokens_capability.patch
    PyJWT-token-plugin.patch: fate#325762

OBS-URL: https://build.opensuse.org/request/show/674430
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-websockify?expand=0&rev=33
This commit is contained in:
Tomáš Chvátal
2019-02-13 09:20:18 +00:00
committed by Git OBS Bridge
parent 8ca4d180e4
commit bd0a54897f
4 changed files with 148 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-websockify
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -29,6 +29,10 @@ Source: https://files.pythonhosted.org/packages/source/w/websockify/webs
Patch1: u_Add-support-for-inetd.patch
# PATCH-FEATURE-UPSTREAM u_Fix-inetd-mode-on-python-2.patch fate#323880 msrb@suse.com -- https://github.com/novnc/websockify/pull/293
Patch2: u_Fix-inetd-mode-on-python-2.patch
# PATCH-FEATURE-ALMOST-UPSTREAM u_added_jwt_tokens_capability.patch fate#325762 cbosdonnat@suse.com -- https://github.com/novnc/websockify/pull/372
Patch3: u_added_jwt_tokens_capability.patch
# PATCH-FIX-OPENSUSE PyJWT-token-plugin.patch fate#325762 cbosdonnat@suse.com -- use PyJWT if jwcrypto is missing
Patch4: PyJWT-token-plugin.patch
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
BuildRequires: unzip
@@ -40,6 +44,15 @@ BuildArch: noarch
%if 0%{?suse_version}
Recommends: python-numpy
%endif
# SLES 12 and up to 15SP1 doesn't have python-jwcrypto package and will fallback to
# the PyJWT implementation. However opensuse has jwcrypto since 42.3: use this one
# since it also provides support for JWE (encrypted JWT).
%if 0%{?sle_version}
Recommends: python-PyJWT
Recommends: python-cryptography
%else
Recommends: python-jwcrypto
%endif
%python_subpackages
%description
@@ -71,6 +84,8 @@ This package contains common files.
%setup -q -n websockify-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
# remove unwanted shebang
sed -i '1 { /^#!/ d }' websockify/websocket*.py
# drop unneeded executable bit