Page MenuHomeSolus

Update onionshare to 2.4
Closed, ResolvedPublic

Description

The current 2.2 version is 2 years old and is lacking many features, onionshare seems to embed a Tor client, which must be outdated.

Changelog: https://github.com/onionshare/onionshare/blob/develop/CHANGELOG.md#24
Sources: https://github.com/micahflee/onionshare/archive/v2.4.tar.gz

Related Objects

Event Timeline

solene created this task.Nov 9 2021, 7:13 PM
JoshStrobl triaged this task as Normal priority.Nov 9 2021, 7:20 PM
JoshStrobl moved this task from Backlog to Update Requested on the Software board.
JoshStrobl added a subscriber: JoshStrobl.

@solene The previous maintainer actually stepped away from maintaining their packages, so if this is something you want to take over you are welcome to.

This comment was removed by solene.
maikwoehl added a subscriber: maikwoehl.EditedJan 22 2022, 3:40 AM

At a first look we have the following dependencies to satisfy:

There is a something preventing me from doing

setup      : |
    pushd cli
        %python3_setup
    popd
install    : |
    pushd cli
        %python3_install
    popd

%python3 macros are not ment for multiple packages

I have to call python3 setup.py install -root="$installdir" manually inside cli.

networking for tests...

name       : onionshare-cli
version    : 2.5
release    : 8
source     :
    - https://github.com/onionshare/onionshare/releases/download/v2.5/onionshare-2.5.tar.gz : 5b5000669e5f8aa18c783719225622f925cbbb7aa70e59c282622cee8fc731ba
    - https://dist.torproject.org/torbrowser/11.0.4/tor-browser-linux64-11.0.4_en-US.tar.xz : 05a5fd6d633ca84c33bbd3e2f8ffca2d2fa2105032a430b07d3c0cf062d9e15f
homepage   : https://onionshare.org
license    : GPL-3.0-or-later
component  : network.util
summary    : Lets you securely and anonymously share a file of any size with someone
description: |
    OnionShare lets you securely and anonymously share files of any size. 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. You host the files on your own computer and use a Tor Onion Service to make it temporarily accessible over the internet. The receiving user just needs to open the URL in Tor Browser to download the file.
networking : yes
builddeps  :
    - flask-socketio
    - python-cepa
    - python-colorama
    - python-click
    - python-eventlet
    - python-gevent-websocket
    - python-psutil
    - python-pynacl
    - python-pytest
    - python-pysocks
    - python-requests
    - python-unidecode
    - python-urllib3
    - python-werkzeug
rundeps    :
    - flask-socketio
    - python-cepa
    - python-colorama
    - python-click
    - python-eventlet
    - python-gevent-websocket
    - python-psutil
    - python-pynacl
    - python-pysocks
    - python-requests
    - python-unidecode
    - python-urllib3
    - python-werkzeug
    - tor
setup      : |
    mkdir -v -p desktop/build/tor
    cp -v $sources/tor-browser-linux64-11.0.4_en-US.tar.xz desktop/build/tor
    python3 desktop/scripts/get-tor-linux.py
build      : |
    pushd cli
        %python3_setup
    popd
install    : |
    pushd cli
        python3 setup.py install --root="$installdir"
    popd
check      : |
    pushd cli
        python3 setup.py test
    popd
name       : onionshare
version    : 2.5
release    : 8
source     :
    - https://github.com/onionshare/onionshare/releases/download/v2.5/onionshare-2.5.tar.gz : 5b5000669e5f8aa18c783719225622f925cbbb7aa70e59c282622cee8fc731ba
    - https://dist.torproject.org/torbrowser/11.0.4/tor-browser-linux64-11.0.4_en-US.tar.xz : 05a5fd6d633ca84c33bbd3e2f8ffca2d2fa2105032a430b07d3c0cf062d9e15f
homepage   : https://onionshare.org
license    : GPL-3.0-or-later
component  : network.util
summary    : Lets you securely and anonymously share a file of any size with someone
description: |
    OnionShare lets you securely and anonymously share files of any size. 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. You host the files on your own computer and use a Tor Onion Service to make it temporarily accessible over the internet. The receiving user just needs to open the URL in Tor Browser to download the file.
networking : yes
builddeps  :
    - onionshare-cli
    - python-pyside2
    - python-qrcode
rundeps    :
    - onionshare-cli
    - python-pyside2
    - python-qrcode
setup      : |
    mkdir -v -p desktop/build/tor
    cp -v $sources/tor-browser-linux64-11.0.4_en-US.tar.xz desktop/build/tor
    python3 desktop/scripts/get-tor-linux.py
build      : |
    pushd desktop
        %python3_setup
    popd
install    : |
    pushd desktop
        python3 setup.py install --root="$installdir"

        # install icons and desktop file
        install -Dm 644 org.onionshare.OnionShare.desktop $installdir/usr/share/applications/org.onionshare.OnionShare.desktop
        install -Dm 644 org.onionshare.OnionShare.svg $installdir/usr/share/icons/org.onionshare.OnionShare.svg
        install -Dm 644 org.onionshare.OnionShare.appdata.xml -t $installdir/usr/share/metainfo/org.onionshare.OnionShare.appdata.xml
    popd
maikwoehl signed these changes with MFA.Jan 22 2022, 5:18 PM

We have a picture:

@joebonrichie I have the package.yml of the dependencies ready. Can I update python-greenlet to 0.4.17 to satisfy python-gevent?

Bevor publishing them I would try to add tests to every new python module (if that does not introduce more dependencies for tests)

This is the build order with all new modules:

  1. python-engineio
  2. python-bidict
  3. python-socketio
  4. flask-socketio
  5. python-cepa (their own fork of stem project)
  6. python-greenlet (just updating to 0.4.17)
  7. python-eventlet (depends on greenlet)
  8. python-gevent (depends on greenlet)
  9. python-gevent-websocket
  10. python-qrcode
  11. onionshare-cli
  12. onionshare

I will test the functionalities in the next days and if modules are missing, I will add them.

Yep no worries - I end up updating python modules as no one else does :D

maikwoehl added a comment.EditedJan 23 2022, 1:08 AM

Alright... here are the package.yml's of all them (just for curiosity of anyone)

I end up writing this in Makefile, if anyone is interested.

WORKDIR := repository
REPO := /var/lib/solbuild/local
CHMOD := chmod a+rwx
COPY := cp
CTAR := tar cf
ATAR := tar rf

define collect_packages
	@echo
	@echo Collecting $(words ${2}) packages...
	
	@$(CHMOD) $(WORKDIR)/$(firstword ${2})/*.eopkg
	@$(COPY) $(WORKDIR)/$(firstword ${2})/*.eopkg $(REPO)
	@$(CTAR) ${1} -C $(WORKDIR) $(firstword ${2})/package.yml
	@$(ATAR) ${1} -C $(WORKDIR) $(firstword ${2})/pspec_x86_64.xml
	@echo ✓ $(firstword ${2})

	@for pkg in $(wordlist 2, ${words ${2}}, ${2}); do \
		echo ✓ $$pkg; \
		$(CHMOD) $(WORKDIR)/$$pkg/*.eopkg; \
		$(COPY) $(WORKDIR)/$$pkg/*.eopkg $(REPO); \
		$(ATAR) ${1} -C $(WORKDIR) $$pkg/package.yml; \
		$(ATAR) ${1} -C $(WORKDIR) $$pkg/pspec_x86_64.xml; \
	done
	@echo -e "Done: \e[96m${1}\e[39m"
endef

Usage:

$(call collect_packages onionshare-yml.tar, \
	flask-socketio \
	onionshare \
	onionshare-cli \
	python-bidict \
	python-cepa \
	python-engineio \
	python-eventlet \
	python-gevent \
	python-gevent-websocket \
	python-greenlet \
	python-qrcode \
	python-socketio \
)
Collecting 12 packages...
✓ flask-socketio
✓ onionshare
✓ onionshare-cli
✓ python-bidict
✓ python-cepa
✓ python-engineio
✓ python-eventlet
✓ python-gevent
✓ python-gevent-websocket
✓ python-greenlet
✓ python-qrcode
✓ python-socketio
Done:  onionshare-yml.tar

Testing

python-bidict: Testing not possible because python-hypothesis is too old (using networking and tox instead)
python-cepa: This fork of stem is too old and has not the current hotfix for python-mock: https://github.com/torproject/stem/issues/56 (testing with tox fails for py27 - py39 is not supported as testenv)
python-gevent: objgraph as test dependency not in repository (using networking and tox instead)
python-gevent-websocket: unittest2, autobahntestsuite are not in repository (tox not available)
python-qrcode: missing packages (using networking and tox instead)
onionshare: testing gui with poetry