2018-12-10 12:44:34 +00:00
|
|
|
#
|
2022-02-25 06:44:57 +00:00
|
|
|
# spec file
|
2018-12-10 12:44:34 +00:00
|
|
|
#
|
2023-05-31 17:30:15 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2022-05-25 17:42:00 +00:00
|
|
|
# Copyright (c) 2018-2022 Dr. Axel Braun
|
2018-12-10 12:44:34 +00:00
|
|
|
#
|
|
|
|
|
# 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 modname onionshare
|
|
|
|
|
Name: python-%{modname}
|
2022-12-10 20:58:19 +00:00
|
|
|
Version: 2.6
|
2018-12-10 12:44:34 +00:00
|
|
|
Release: 0
|
2018-12-13 06:24:00 +00:00
|
|
|
Summary: Self-hosting Tor Onion Service based file sharing
|
2018-12-10 12:44:34 +00:00
|
|
|
License: GPL-3.0-or-later
|
2021-06-06 13:14:41 +00:00
|
|
|
Group: Productivity/Networking/File-Sharing
|
2022-02-25 06:44:57 +00:00
|
|
|
URL: https://github.com/onionshare/onionshare
|
|
|
|
|
Source0: https://github.com/onionshare/onionshare/archive/v%{version}.tar.gz#/%{modname}-%{version}.tar.gz
|
2021-08-22 06:15:41 +00:00
|
|
|
# PATCH-FIX-OPENSUSE skip test_large_download in gui tests
|
2021-06-08 12:09:10 +00:00
|
|
|
Patch0: 0001-adjust_tests.diff
|
2022-02-25 06:44:57 +00:00
|
|
|
# PATCH-FIX-UPSTREAM fix-test-cli-web.patch -- https://github.com/onionshare/onionshare/issues/1534
|
|
|
|
|
Patch1: fix-test-cli-web.patch
|
|
|
|
|
# PATCH-FIX-OPENSUSE relax-async-mode.patch -- Do not rely on gevent
|
|
|
|
|
Patch2: relax-async-mode.patch
|
2023-05-31 17:30:15 +00:00
|
|
|
# PATCH-FIX-UPSTREAM onionshare-poetry-core.patch -- poetry-core is enough to build and has a much smaller footprint
|
|
|
|
|
Patch3: https://github.com/onionshare/onionshare/commit/a05d7af729585bdaa4f71437167339ac67bf3327.patch#/onionshare-poetry-core.patch
|
2023-11-23 14:28:36 +00:00
|
|
|
# PATCH-FIX-UPSTREAM onionshare-pr1677-fix-werkzeug3.patch gh#onionshare/onionshare#1677
|
|
|
|
|
Patch4: onionshare-pr1677-fix-werkzeug3.patch
|
2018-12-10 12:44:34 +00:00
|
|
|
BuildRequires: fdupes
|
2022-02-25 06:44:57 +00:00
|
|
|
BuildRequires: hicolor-icon-theme
|
2018-12-10 12:44:34 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2023-11-23 14:28:36 +00:00
|
|
|
BuildRequires: python3-pip
|
|
|
|
|
BuildRequires: python3-poetry-core
|
|
|
|
|
BuildRequires: update-desktop-files
|
|
|
|
|
# SECTION test
|
|
|
|
|
BuildRequires: python3-pytest
|
|
|
|
|
BuildRequires: python3-pytest-qt
|
|
|
|
|
BuildRequires: python3-pytest-xvfb
|
|
|
|
|
# /SECTION
|
|
|
|
|
# SECTION runtime test
|
|
|
|
|
BuildRequires: python3-Flask >= 2.3.2
|
|
|
|
|
BuildRequires: python3-Flask-Compress >= 1.13
|
|
|
|
|
BuildRequires: python3-Flask-SocketIO >= 5.3.1
|
2021-10-05 10:08:17 +00:00
|
|
|
BuildRequires: python3-PyNaCl
|
2021-06-06 13:14:41 +00:00
|
|
|
BuildRequires: python3-PySocks
|
|
|
|
|
BuildRequires: python3-Unidecode
|
2023-11-23 14:28:36 +00:00
|
|
|
BuildRequires: python3-Werkzeug >= 2.3.4
|
|
|
|
|
BuildRequires: python3-click
|
2021-06-08 12:09:10 +00:00
|
|
|
BuildRequires: python3-colorama
|
2022-02-25 06:44:57 +00:00
|
|
|
BuildRequires: python3-eventlet
|
2023-11-23 14:28:36 +00:00
|
|
|
BuildRequires: python3-gevent-websocket
|
2021-06-06 13:14:41 +00:00
|
|
|
BuildRequires: python3-psutil
|
2023-11-23 14:28:36 +00:00
|
|
|
BuildRequires: python3-pyside2 >= 5.15.2.1
|
|
|
|
|
BuildRequires: python3-python-gnupg
|
2021-06-06 13:14:41 +00:00
|
|
|
BuildRequires: python3-qrcode
|
|
|
|
|
BuildRequires: python3-requests
|
|
|
|
|
BuildRequires: python3-setuptools
|
2023-11-23 14:28:36 +00:00
|
|
|
BuildRequires: python3-stem >= 1.8.1
|
2022-02-25 06:44:57 +00:00
|
|
|
BuildRequires: python3-urllib3
|
2023-11-23 14:28:36 +00:00
|
|
|
BuildRequires: python3-waitress >= 2.1.2
|
2021-06-06 13:14:41 +00:00
|
|
|
BuildRequires: tor
|
2023-11-23 14:28:36 +00:00
|
|
|
# /SECTION
|
|
|
|
|
Requires: python3-Flask >= 2.3.2
|
|
|
|
|
Requires: python3-Flask-Compress >= 1.13
|
|
|
|
|
Requires: python3-Flask-SocketIO >= 5.3.1
|
2022-02-25 06:44:57 +00:00
|
|
|
Requires: python3-PyNaCl
|
2022-08-01 10:45:46 +00:00
|
|
|
Requires: python3-PySocks
|
2021-06-06 13:14:41 +00:00
|
|
|
Requires: python3-Unidecode
|
2023-11-23 14:28:36 +00:00
|
|
|
Requires: python3-Werkzeug >= 2.3.4
|
|
|
|
|
Requires: python3-click
|
2021-06-08 12:09:10 +00:00
|
|
|
Requires: python3-colorama
|
2022-02-25 06:44:57 +00:00
|
|
|
Requires: python3-eventlet
|
2023-11-23 14:28:36 +00:00
|
|
|
Requires: python3-gevent-websocket
|
2021-06-06 13:14:41 +00:00
|
|
|
Requires: python3-psutil
|
2023-11-23 14:28:36 +00:00
|
|
|
Requires: python3-pyside2 >= 5.15.2.1
|
|
|
|
|
Requires: python3-python-gnupg
|
2021-06-06 13:14:41 +00:00
|
|
|
Requires: python3-qrcode
|
|
|
|
|
Requires: python3-requests
|
2023-11-23 14:28:36 +00:00
|
|
|
Requires: python3-setuptools
|
|
|
|
|
Requires: python3-stem >= 1.8.1
|
2022-02-25 06:44:57 +00:00
|
|
|
Requires: python3-urllib3
|
2023-11-23 14:28:36 +00:00
|
|
|
Requires: python3-waitress >= 2.1.2
|
2018-12-10 12:44:34 +00:00
|
|
|
Requires: tor
|
2023-11-23 14:28:36 +00:00
|
|
|
Provides: python3-onionshare = %{version}-%{release}
|
|
|
|
|
Provides: python3-onionshare_cli = %{version}-%{release}
|
|
|
|
|
Obsoletes: python-onionshare-data < 2.3.1
|
2023-11-23 14:31:18 +00:00
|
|
|
Obsoletes: python310-onionshare < 2.3.1
|
|
|
|
|
Obsoletes: python36-onionshare < 2.3.1
|
|
|
|
|
Obsoletes: python38-onionshare < 2.3.1
|
|
|
|
|
Obsoletes: python39-onionshare < 2.3.1
|
2022-02-25 06:44:57 +00:00
|
|
|
BuildArch: noarch
|
2021-06-09 18:07:26 +00:00
|
|
|
|
2018-12-10 12:44:34 +00:00
|
|
|
%description
|
2018-12-13 06:24:00 +00:00
|
|
|
OnionShare lets the user share files securely and anonymously. It
|
|
|
|
|
works by starting a web server, making it accessible as a Tor Onion
|
|
|
|
|
Service, and generating an unguessable URL to access and download the
|
|
|
|
|
files. It does not require setting up a separate server or using a
|
|
|
|
|
third party file-sharing service. Files are hosted on the machine the
|
|
|
|
|
program is run on. The receiving user just needs to open the URL in
|
|
|
|
|
Tor Browser to download the file.
|
2018-12-10 12:44:34 +00:00
|
|
|
|
|
|
|
|
%prep
|
2022-02-25 06:44:57 +00:00
|
|
|
%autosetup -p1 -n %{modname}-%{version}
|
2021-06-06 13:14:41 +00:00
|
|
|
|
2018-12-10 12:44:34 +00:00
|
|
|
%build
|
2022-02-25 06:44:57 +00:00
|
|
|
pushd cli
|
2023-11-23 14:28:36 +00:00
|
|
|
%python3_pyproject_wheel
|
2022-02-25 06:44:57 +00:00
|
|
|
popd
|
|
|
|
|
pushd desktop
|
2023-11-23 14:28:36 +00:00
|
|
|
%python3_pyproject_wheel
|
2018-12-10 12:44:34 +00:00
|
|
|
|
|
|
|
|
%install
|
2022-02-25 06:44:57 +00:00
|
|
|
pushd cli
|
2023-11-23 14:28:36 +00:00
|
|
|
%python3_pyproject_install
|
2022-02-25 06:44:57 +00:00
|
|
|
popd
|
|
|
|
|
pushd desktop
|
2023-11-23 14:28:36 +00:00
|
|
|
%python3_pyproject_install
|
2018-12-10 12:44:34 +00:00
|
|
|
|
2022-02-25 06:44:57 +00:00
|
|
|
install -Dm 0644 org.onionshare.OnionShare.appdata.xml \
|
|
|
|
|
%{buildroot}%{_datadir}/metainfo/org.onionshare.OnionShare.metainfo.xml
|
|
|
|
|
install -Dm 0644 org.onionshare.OnionShare.svg \
|
|
|
|
|
%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/org.onionshare.OnionShare.svg
|
|
|
|
|
%suse_update_desktop_file -i org.onionshare.OnionShare
|
2020-05-21 08:52:37 +00:00
|
|
|
|
2021-06-06 13:14:41 +00:00
|
|
|
%fdupes %{buildroot}%{python3_sitelib}
|
2020-05-21 08:52:37 +00:00
|
|
|
|
2021-06-06 13:14:41 +00:00
|
|
|
%check
|
|
|
|
|
export PYTHONPATH=%{buildroot}%{python3_sitelib}
|
|
|
|
|
# we don't trust the update-alternatives priority: pytest could point to the wrong python3 flavor.
|
|
|
|
|
# (https://github.com/openSUSE/python-rpm-macros/issues/109)
|
|
|
|
|
mkdir testbin
|
|
|
|
|
ln -s %{_bindir}/pytest-%{python3_bin_suffix} testbin/pytest
|
|
|
|
|
export PATH=$PWD/testbin:$PATH
|
|
|
|
|
|
|
|
|
|
pushd cli
|
2021-06-08 12:09:10 +00:00
|
|
|
pytest -v -k 'not test_large_download' -rs tests
|
2021-06-06 13:14:41 +00:00
|
|
|
popd
|
|
|
|
|
|
2022-05-25 17:42:00 +00:00
|
|
|
#Desktop tests disabled. The 'server' tests seem to fail
|
|
|
|
|
# pushd desktop
|
2021-06-06 13:14:41 +00:00
|
|
|
# the gui test files need to be called separately upstream's way for application setup and teardown in between
|
|
|
|
|
# this script calls pytest from the PATH defined above.
|
2022-05-25 17:42:00 +00:00
|
|
|
# ./tests/run.sh
|
|
|
|
|
# popd
|
2021-06-06 13:14:41 +00:00
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%{_bindir}/%{modname}
|
|
|
|
|
%{_bindir}/%{modname}-cli
|
2018-12-10 12:44:34 +00:00
|
|
|
%license LICENSE
|
|
|
|
|
%doc README.md
|
2022-02-25 06:44:57 +00:00
|
|
|
%{_datadir}/applications/org.onionshare.OnionShare.desktop
|
|
|
|
|
%{_datadir}/metainfo/org.onionshare.OnionShare.metainfo.xml
|
|
|
|
|
%{_datadir}/icons/hicolor/scalable/apps/org.onionshare.OnionShare.svg
|
2021-06-06 13:14:41 +00:00
|
|
|
%{python3_sitelib}/onionshare
|
|
|
|
|
%{python3_sitelib}/onionshare-%{version}*-info
|
|
|
|
|
%{python3_sitelib}/onionshare_cli
|
|
|
|
|
%{python3_sitelib}/onionshare_cli-%{version}*-info
|
2020-05-21 08:52:37 +00:00
|
|
|
|
2018-12-10 12:44:34 +00:00
|
|
|
%changelog
|