Name: onionshare Version: 2.7 Release: 3%{?dist} Summary: Securely and anonymously share files, host websites and chat over Tor # OnionShare is GPL-3.0-or-later (pyproject.toml; LICENSE.txt is the GPL-3.0 # text). Bundled assets, by subpackage: # onionshare-cli: jQuery 3.7.1 slim and Socket.IO 4.8.3 client (MIT), in # onionshare_cli/resources/static/js # onionshare: Font Awesome icons (CC-BY-4.0) and lipis/flag-icons # country flags (MIT), in onionshare/resources/images License: GPL-3.0-or-later AND CC-BY-4.0 AND MIT URL: https://onionshare.org/ Source0: https://github.com/onionshare/onionshare/archive/v%{version}/%{name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: desktop-file-utils BuildRequires: appstream # Desktop tests; the desktop part's own dependencies are not generated # (see %%generate_buildrequires). BuildRequires: python3-pyside6 BuildRequires: python3-qrcode BuildRequires: python3-pytest-qt # test_get_tor_paths_linux checks tor and its geoip files are where the # app looks for them. BuildRequires: tor Requires: onionshare-cli = %{version}-%{release} Requires: hicolor-icon-theme %global _description %{expand: OnionShare lets you share files of any size, host a static website, receive files and chat, all through Tor onion services running on your own computer. Nothing passes through a third-party server: the other person only needs Tor Browser and the unguessable .onion address you give them.} %description %{_description} This package contains the graphical application. %package cli Summary: Command-line interface for OnionShare License: GPL-3.0-or-later AND MIT Requires: tor # Bridges: OnionShare finds obfs4proxy, snowflake-client, meek-client and # webtunnel-client on $PATH. Fedora ships only obfs4; snowflake-client is # in this repository. Recommends: obfs4 Suggests: snowflake-client Provides: bundled(js-jquery) = 3.7.1 Provides: bundled(js-socket.io) = 4.8.3 %description cli %{_description} This package contains onionshare-cli and the onionshare_cli Python module that the graphical application is built on. %prep %autosetup -p1 # Upstream pins exact versions for its frozen Windows/macOS builds. Use # Fedora's: drop version constraints and extras, and drop dependencies the # code never imports (build tools, eventlet, gevent-websocket, click, # python-gnupg). for f in cli/pyproject.toml desktop/pyproject.toml; do sed -i -E \ -e '/^ "(eventlet|setuptools|wheel|cffi|cython|pkgconfig|gevent-websocket|click|python-gnupg)( |")/d' \ -e 's/^( "[A-Za-z0-9_.-]+)(\[[a-z]+\])? *[<>=!~][^"]*"/\1"/' \ -e 's/^( "[A-Za-z0-9_.-]+)\[[a-z]+\]"/\1"/' \ $f done # The desktop app works on Python 3.14 (tested in %%check); upstream's # ceiling only reflects its frozen builds. sed -i 's/^requires-python = ">=3.10,<3.14"/requires-python = ">=3.10"/' desktop/pyproject.toml # onionshare-cli is the cli subpackage's script, and the poetry path # dependency on ../cli would leak into the wheel's metadata. sed -i -e '/^onionshare-cli = "onionshare_cli:main"/d' \ -e '/^\[tool.poetry.dependencies\]/,/^$/d' desktop/pyproject.toml %generate_buildrequires cd cli %pyproject_buildrequires cd ../desktop # -R: its runtime dependency onionshare_cli is built here, not installable. %pyproject_buildrequires -R %build cd cli %pyproject_wheel cd ../desktop %pyproject_wheel %install %pyproject_install desktop-file-install --dir=%{buildroot}%{_datadir}/applications \ desktop/org.onionshare.OnionShare.desktop install -Dpm 0644 desktop/org.onionshare.OnionShare.appdata.xml \ %{buildroot}%{_metainfodir}/org.onionshare.OnionShare.appdata.xml install -Dpm 0644 desktop/org.onionshare.OnionShare.svg \ %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/org.onionshare.OnionShare.svg %check desktop-file-validate %{buildroot}%{_datadir}/applications/org.onionshare.OnionShare.desktop appstreamcli validate --no-net \ %{buildroot}%{_metainfodir}/org.onionshare.OnionShare.appdata.xml %py3_check_import onionshare_cli onionshare PYTHONPATH=%{buildroot}%{python3_sitelib} %{buildroot}%{_bindir}/onionshare-cli --help >/dev/null # Tests that need a running tor are skipped unless --runtor is given. cd cli %pytest tests cd ../desktop export QT_QPA_PLATFORM=offscreen %if v"%{python3_version}" >= v"3.15" # On Python 3.15 (f45, rawhide) every test_gui_* module that starts the web # server hangs: the main thread never leaves Qt's processEvents() while # waiting for the server thread. onionshare-cli serves pages normally on the # same system, so this looks like PySide6 on 3.15, but the GUI is unverified # there until someone runs it on a real f45 desktop. %pytest tests --ignore-glob='tests/test_gui_*.py' %else %pytest tests %endif %files %license LICENSE.txt licenses/license-fontawesome-icons.txt %doc README.md %{_bindir}/onionshare %{python3_sitelib}/onionshare/ %{python3_sitelib}/onionshare-%{version}.dist-info/ %{_datadir}/applications/org.onionshare.OnionShare.desktop %{_metainfodir}/org.onionshare.OnionShare.appdata.xml %{_datadir}/icons/hicolor/scalable/apps/org.onionshare.OnionShare.svg %files cli %license LICENSE.txt licenses/license-jquery.txt %doc cli/README.md CHANGELOG.md %{_bindir}/onionshare-cli %{python3_sitelib}/onionshare_cli/ %{python3_sitelib}/onionshare_cli-%{version}.dist-info/ %changelog * Fri Oct 30 2026 Morgan Hough - 2.7-3 - Suggest snowflake-client for Snowflake bridges * Fri Oct 30 2026 Morgan Hough - 2.7-2 - Skip the GUI tests that start the web server on Python 3.15, where they hang * Thu Oct 29 2026 Morgan Hough - 2.7-1 - Update to 2.7, built with pyproject macros (Fedora's 2.5-18 used setup.py) - Split onionshare-cli into a subpackage; drop the unused python3-qt5 and nautilus-python requirements - Install the desktop file, metainfo and icon, and run upstream's tests