diff options
Diffstat (limited to 'snap/snapcraft.yaml')
-rw-r--r-- | snap/snapcraft.yaml | 82 |
1 files changed, 31 insertions, 51 deletions
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index cc3e8ed6..4fab8490 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,5 +1,5 @@ name: onionshare -base: core20 +base: core22 version: "2.6.1" summary: Securely and anonymously share files, host websites, and chat using Tor description: | @@ -20,8 +20,7 @@ architectures: apps: onionshare: common-id: org.onionshare.OnionShare - command: bin/onionshare-launcher - extensions: [gnome-3-38] + command: bin/onionshare plugs: - desktop - home @@ -30,10 +29,12 @@ apps: - removable-media environment: LANG: C.UTF-8 + PATH: $SNAP/bin:$SNAP/usr/bin:$SNAP/usr/local/bin:$PATH + LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/local/lib cli: common-id: org.onionshare.OnionShareCli - command: bin/onionshare-cli-launcher + command: bin/onionshare-cli plugs: - home - network @@ -41,42 +42,15 @@ apps: - removable-media environment: LANG: C.UTF-8 + PATH: $SNAP/bin:$SNAP/usr/bin:$SNAP/usr/local/bin:$PATH + LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/local/lib parts: - launcher: - plugin: nil - override-build: | - mkdir -p $SNAPCRAFT_PART_INSTALL/bin - cat > $SNAPCRAFT_PART_INSTALL/bin/launcher-setup << EOF - #!/bin/sh - export PATH=\$SNAP/bin:\$SNAP/usr/bin:\$SNAP/usr/local/bin:\$PATH - export PYTHONPATH=\$SNAP/lib/python3.8/site-packages:\$SNAP/usr/lib/python3/dist-packages - export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$SNAP/usr/local/lib - ORIG_IFS=\$IFS - IFS=":" - LIB_BASE=\$(for D in \$LD_LIBRARY_PATH; do echo \$D; done | grep \$SNAP/usr/lib/) - IFS=\$ORIGIN_IFS - export QT_PLUGIN_PATH=\$LIB_BASE/qt5/plugins - EOF - cat > $SNAPCRAFT_PART_INSTALL/bin/onionshare-launcher << EOF - #!/bin/sh - . \$SNAP/bin/launcher-setup - onionshare \$@ - EOF - cat > $SNAPCRAFT_PART_INSTALL/bin/onionshare-cli-launcher << EOF - #!/bin/sh - . \$SNAP/bin/launcher-setup - onionshare-cli \$@ - EOF - chmod 755 $SNAPCRAFT_PART_INSTALL/bin/launcher-setup - chmod 755 $SNAPCRAFT_PART_INSTALL/bin/onionshare-launcher - chmod 755 $SNAPCRAFT_PART_INSTALL/bin/onionshare-cli-launcher - onionshare-cli: source: ./cli plugin: nil override-pull: | - snapcraftctl pull + craftctl default rm pyproject.toml poetry.lock after: [tor, obfs4, snowflake-client, meek-client] @@ -155,17 +129,22 @@ parts: - libxslt1.1 - libxtst6 - qtwayland5 - - python3-pyside2.qtcore - - python3-pyside2.qtgui - - python3-pyside2.qtwidgets + - libgstreamer1.0-0 + - libgstreamer1.0-dev + - libgstreamer-gl1.0-0 + - libgstreamer-plugins-base1.0-0 + - libmysqlclient21 + - libxcb-cursor0 + - libxkbfile1 override-pull: | - snapcraftctl pull + craftctl default rm pyproject.toml poetry.lock cat > requirements.txt << EOF # onionshare_cli click - flask==2.0.3 - flask-socketio==5.3.1 + flask==2.3.2 + flask-compress==1.13 + flask-socketio==5.3.4 psutil pysocks requests[socks] @@ -177,31 +156,32 @@ parts: colorama gevent-websocket stem==1.8.1 - werkzeug==2.3.4 - flask-compress waitress + werkzeug==2.3.4 # onionshare + PySide6==6.5.2 qrcode + packaging EOF override-build: | - python3 -m venv $SNAPCRAFT_PART_INSTALL - . $SNAPCRAFT_PART_INSTALL/bin/activate + python3 -m venv $CRAFT_PART_INSTALL + . $CRAFT_PART_INSTALL/bin/activate pip install -U pip setuptools wheel pip install -U -r requirements.txt pip install -U ../../onionshare-cli/src pip install -U . deactivate - sed -i 's|'$SNAPCRAFT_PART_INSTALL'/bin/python3|/usr/bin/env python3|g' $SNAPCRAFT_PART_INSTALL/bin/onionshare - sed -i 's|'$SNAPCRAFT_PART_INSTALL'/bin/python3|/usr/bin/env python3|g' $SNAPCRAFT_PART_INSTALL/bin/onionshare-cli + sed -i 's|'$CRAFT_PART_INSTALL'/bin/python3|/usr/bin/env python3|g' $CRAFT_PART_INSTALL/bin/onionshare + sed -i 's|'$CRAFT_PART_INSTALL'/bin/python3|/usr/bin/env python3|g' $CRAFT_PART_INSTALL/bin/onionshare-cli after: [onionshare-cli] tor: - source: https://dist.torproject.org/tor-0.4.7.12.tar.gz - source-checksum: sha256/3b5d969712c467851bd028f314343ef15a97ea457191e93ffa97310b05b9e395 + source: https://dist.torproject.org/tor-0.4.8.5.tar.gz + source-checksum: sha256/6957cfd14a29eee7555c52f8387a46f2ce2f5fe7dadf93547f1bc74b1657e119 source-type: tar plugin: autotools autotools-configure-parameters: - - "--with-libevent-dir=$SNAPCRAFT_PART_INSTALL/../../libevent/install/usr/local" + - "--with-libevent-dir=$CRAFT_PART_INSTALL/../../libevent/install/usr/local" build-packages: - libssl-dev - zlib1g-dev @@ -227,7 +207,7 @@ parts: - go/latest/stable source: https://git.torproject.org/pluggable-transports/snowflake.git source-type: git - source-tag: v2.3.1 + source-tag: v2.6.0 organize: bin/client: bin/snowflake-client @@ -237,7 +217,7 @@ parts: - go/latest/stable source: https://git.torproject.org/pluggable-transports/meek.git source-type: git - source-tag: v0.37.0 + source-tag: v0.38.0 override-build: | cd meek-client mkdir -p /build/onionshare/meek-client/install/bin |