| |
@@ -1,57 +1,29 @@
|
| |
- #global bzr 83
|
| |
%global srcname SecretStorage
|
| |
|
| |
- %if 0%{?fedora} || 0%{?rhel} > 7
|
| |
- %global with_python3 1
|
| |
- %else
|
| |
- %global with_python3 0
|
| |
- %endif
|
| |
-
|
| |
Name: python-%{srcname}
|
| |
- Version: 2.3.1
|
| |
- %if 0%{?bzr}
|
| |
- Release: 0.13.bzr%{?bzr}%{?dist}
|
| |
- %else
|
| |
- Release: 10%{?dist}
|
| |
- %endif
|
| |
+ Version: 3.1.0
|
| |
+ Release: 1%{?dist}
|
| |
Summary: Python bindings to FreeDesktop.org Secret Service API
|
| |
- URL: http://launchpad.net/python-secretstorage
|
| |
- %if 0%{?bzr}
|
| |
- # Bazaar revision 83 snapshot downloaded at 2013-11-15 from launchpad via:
|
| |
- # bzr branch -r 83 lp:python-secretstorage python-secretstorage-bzr
|
| |
- # pushd python-secretstorage-bzr
|
| |
- # bzr export ../python-secretstorage-bzr83.tgz
|
| |
- # popd
|
| |
- Source0: python-secretstorage-bzr%{bzr}.tgz
|
| |
- %else
|
| |
- Source0: https://files.pythonhosted.org/packages/source/S/%{srcname}/%{srcname}-%{version}.tar.gz
|
| |
- %endif
|
| |
+ URL: https://github.com/mitya57/secretstorage
|
| |
+ Source0: %pypi_source
|
| |
License: BSD
|
| |
BuildArch: noarch
|
| |
|
| |
- BuildRequires: python2-nose
|
| |
- BuildRequires: python2-devel
|
| |
-
|
| |
- # Needed for building docs.
|
| |
- BuildRequires: python2-sphinx
|
| |
-
|
| |
- # Tests only.
|
| |
- BuildRequires: gnome-keyring
|
| |
- BuildRequires: python2-cryptography
|
| |
- BuildRequires: python2-dbus
|
| |
-
|
| |
- # Emulate the X environment for the tests.
|
| |
- BuildRequires: xorg-x11-server-Xvfb
|
| |
- BuildRequires: dbus-x11
|
| |
+ # see upstream travis config at https://github.com/mitya57/secretstorage/blob/master/.travis.yml
|
| |
+ # built libsecret does not ship those Python files, TODO make it so
|
| |
+ Source1: http://download.gnome.org/sources/libsecret/0.18/libsecret-0.18.6.tar.xz
|
| |
|
| |
- %if 0%{?with_python3}
|
| |
+ BuildRequires: /usr/bin/dbus-launch
|
| |
+ BuildRequires: /usr/bin/xvfb-run
|
| |
BuildRequires: python3-devel
|
| |
- BuildRequires: python3-nose
|
| |
-
|
| |
- # For python 3 tests.
|
| |
- BuildRequires: python3-dbus
|
| |
BuildRequires: python3-cryptography
|
| |
- %endif
|
| |
+ BuildRequires: python3-dbus
|
| |
+ BuildRequires: python3-gobject-base
|
| |
+ BuildRequires: python3-jeepney
|
| |
+ BuildRequires: python3-setuptools
|
| |
+ BuildRequires: python3-sphinx
|
| |
+
|
| |
+ %{?python_enable_dependency_generator}
|
| |
|
| |
%description
|
| |
This module provides a way for securely storing passwords and other secrets.
|
| |
@@ -59,7 +31,7 @@
|
| |
It uses D-Bus Secret Service API that is supported by GNOME Keyring (>= 2.30)
|
| |
and KSecretsService.
|
| |
|
| |
- The main classes provided are secretstorage.Item, representing a secret item
|
| |
+ The main classes provided are secretstorage. Item, representing a secret item
|
| |
(that has a label, a secret and some attributes) and secretstorage.Collection,
|
| |
a place items are stored in.
|
| |
|
| |
@@ -67,129 +39,76 @@
|
| |
including creating and deleting items and collections, editing items, locking
|
| |
and unlocking collections (asynchronous unlocking is also supported).
|
| |
|
| |
- %package -n python2-%{srcname}
|
| |
- Summary: Python 2.x module for secure storing of passwords and secrets
|
| |
|
| |
- Requires: python2-dbus
|
| |
- Requires: python2-cryptography
|
| |
- %if 0%{?fedora} || 0%{?rhel} > 7
|
| |
- Recommends: python2-gobject
|
| |
- %endif
|
| |
+ %package -n python3-secretstorage
|
| |
+ Summary: %{summary}
|
| |
|
| |
- %{?python_provide:%python_provide python2-%{srcname}}
|
| |
-
|
| |
- %description -n python2-%{srcname}
|
| |
- This module provides a way for securely storing passwords and other secrets.
|
| |
-
|
| |
- It uses D-Bus Secret Service API that is supported by GNOME Keyring (>= 2.30)
|
| |
- and KSecretsService.
|
| |
-
|
| |
- The main classes provided are secretstorage.Item, representing a secret item
|
| |
- (that has a label, a secret and some attributes) and secretstorage.Collection,
|
| |
- a place items are stored in.
|
| |
-
|
| |
- SecretStorage supports most of the functions provided by Secret Service,
|
| |
- including creating and deleting items and collections, editing items, locking
|
| |
- and unlocking collections (asynchronous unlocking is also supported).
|
| |
-
|
| |
- %if 0%{?with_python3}
|
| |
- %package -n python3-%{srcname}
|
| |
- Summary: Python 3.x module for secure storing of passwords and secrets
|
| |
-
|
| |
- Requires: python3-dbus
|
| |
- Requires: python3-cryptography
|
| |
- Recommends: python3-gobject
|
| |
+ Provides: python3-%{srcname} = %{version}-%{release}
|
| |
+ Obsoletes: python3-%{srcname} < 3
|
| |
|
| |
+ %{?python_provide:%python_provide python3-secretstorage}
|
| |
%{?python_provide:%python_provide python3-%{srcname}}
|
| |
|
| |
- %description -n python3-%{srcname}
|
| |
+ %description -n python3-secretstorage
|
| |
This module provides a way for securely storing passwords and other secrets.
|
| |
|
| |
It uses D-Bus Secret Service API that is supported by GNOME Keyring (>= 2.30)
|
| |
and KSecretsService.
|
| |
|
| |
- The main classes provided are secretstorage.Item, representing a secret item
|
| |
+ The main classes provided are secretstorage. Item, representing a secret item
|
| |
(that has a label, a secret and some attributes) and secretstorage.Collection,
|
| |
a place items are stored in.
|
| |
|
| |
SecretStorage supports most of the functions provided by Secret Service,
|
| |
including creating and deleting items and collections, editing items, locking
|
| |
and unlocking collections (asynchronous unlocking is also supported).
|
| |
- %endif
|
| |
|
| |
- %package -n python-%{srcname}-doc
|
| |
+ %package -n python3-secretstorage-doc
|
| |
Summary: SecretStorage documentation
|
| |
+ Obsoletes: python-%{srcname}-doc < 2.3.1-11
|
| |
+ %{?python_provide:%python_provide python3-secretstorage-doc}
|
| |
|
| |
- %description -n python-%{srcname}-doc
|
| |
- Documentation for SecretStorage
|
| |
+ %description -n python3-secretstorage-doc
|
| |
+ Documentation for SecretStorage.
|
| |
|
| |
%prep
|
| |
- %if 0%{?bzr}
|
| |
- %setup -qn python-secretstorage-bzr%{bzr}
|
| |
- %else
|
| |
- %setup -qn %{srcname}-%{version}
|
| |
- %endif
|
| |
- %if 0%{?with_python3}
|
| |
- rm -rf %{py3dir}
|
| |
- cp -a . %{py3dir}
|
| |
- %endif
|
| |
-
|
| |
- # Remove bundled egg info
|
| |
- rm -rf %{srcname}.egg-info
|
| |
- # Remove .gitignore file
|
| |
- rm .gitignore
|
| |
+ %autosetup -n %{srcname}-%{version}
|
| |
+ tar xf %{SOURCE1}
|
| |
|
| |
%build
|
| |
- %py2_build
|
| |
- %if 0%{?with_python3}
|
| |
- pushd %{py3dir}
|
| |
%py3_build
|
| |
- popd
|
| |
- %endif
|
| |
|
| |
# Build the documentation
|
| |
- %{__python2} setup.py build_sphinx
|
| |
+ %{__python3} setup.py build_sphinx
|
| |
+
|
| |
+ # Remove unnecessary files generated by python-sphinx
|
| |
+ find build -name '.buildinfo' -delete -print
|
| |
+ find build -name 'doctrees' -type d -print -exec rm -r '{}' +
|
| |
|
| |
%install
|
| |
- %py2_install
|
| |
- %if 0%{?with_python3}
|
| |
- pushd %{py3dir}
|
| |
%py3_install
|
| |
- popd
|
| |
- %endif
|
| |
-
|
| |
- # Remove unnecessary files generated by python-sphinx
|
| |
- find %{_builddir} -name '.buildinfo' -delete -print
|
| |
- find %{_builddir} -name 'doctrees' -type d -print -exec rm -r '{}' +
|
| |
|
| |
%check
|
| |
- pushd tests
|
| |
- PYTHONPATH=%{buildroot}%{python2_sitelib} xvfb-run -a %{__python2} -m unittest discover
|
| |
- popd
|
| |
- %if 0%{?with_python3}
|
| |
- pushd %{py3dir}
|
| |
- PYTHONPATH=%{buildroot}%{python3_sitelib} xvfb-run -a %{__python3} -m unittest discover
|
| |
- popd
|
| |
- %endif
|
| |
-
|
| |
- %files -n python2-%{srcname}
|
| |
- %doc docs changelog README.rst
|
| |
- %license LICENSE
|
| |
- %{python2_sitelib}/%{srcname}-%{version}-py?.?.egg-info
|
| |
- %{python2_sitelib}/secretstorage
|
| |
+ export PYTHONPATH=%{buildroot}%{python3_sitelib}
|
| |
+ for MOCK in libsecret-0.18.6/libsecret/mock-service-{normal,only-plain,lock}.py; do
|
| |
+ xvfb-run -a dbus-launch --exit-with-session %{__python3} tests/run_tests.py ${MOCK}
|
| |
+ done
|
| |
+
|
| |
|
| |
- %if 0%{?with_python3}
|
| |
- %files -n python3-%{srcname}
|
| |
- %doc docs changelog README.rst
|
| |
+ %files -n python3-secretstorage
|
| |
+ %doc changelog README.rst
|
| |
%license LICENSE
|
| |
- %{python3_sitelib}/%{srcname}-%{version}-py?.?.egg-info
|
| |
- %{python3_sitelib}/secretstorage
|
| |
- %endif
|
| |
+ %{python3_sitelib}/%{srcname}-%{version}-py?.?.egg-info/
|
| |
+ %{python3_sitelib}/secretstorage/
|
| |
|
| |
- %files -n python-%{srcname}-doc
|
| |
+ %files -n python3-secretstorage-doc
|
| |
%doc build/sphinx/html/*
|
| |
|
| |
%changelog
|
| |
+ * Mon Sep 24 2018 Miro Hrončok <mhroncok@redhat.com> - 3.1.0-1
|
| |
+ - Update to 3.1.0 (#1571015)
|
| |
+ - Drop Python 2 subpackage (upstream does not support Python 2 any more)
|
| |
+
|
| |
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.1-10
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
| |
|
| |
The tests were particularly nasty to deal with.
We need a python2-secretstorage package before we can merge this. Also python-jeepney.