mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
241 lines
6.3 KiB
YAML
241 lines
6.3 KiB
YAML
name: onionshare
|
|
base: core20
|
|
version: "2.6"
|
|
summary: Securely and anonymously share files, host websites, and chat using Tor
|
|
description: |
|
|
OnionShare lets you securely and anonymously send and receive files. It works by starting
|
|
a web server, making it accessible as a Tor onion service, and generating an unguessable
|
|
web address so others can download files from you, or upload files to you. It does _not_
|
|
require setting up a separate server or using a third party file-sharing service.
|
|
|
|
grade: stable # stable or devel
|
|
confinement: strict
|
|
|
|
architectures:
|
|
- build-on: amd64
|
|
- build-on: arm64
|
|
- build-on: armhf
|
|
|
|
apps:
|
|
onionshare:
|
|
common-id: org.onionshare.OnionShare
|
|
command: bin/onionshare-launcher
|
|
extensions: [gnome-3-38]
|
|
plugs:
|
|
- desktop
|
|
- home
|
|
- network
|
|
- network-bind
|
|
- removable-media
|
|
environment:
|
|
LANG: C.UTF-8
|
|
|
|
cli:
|
|
common-id: org.onionshare.OnionShareCli
|
|
command: bin/onionshare-cli-launcher
|
|
plugs:
|
|
- home
|
|
- network
|
|
- network-bind
|
|
- removable-media
|
|
environment:
|
|
LANG: C.UTF-8
|
|
|
|
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
|
|
rm pyproject.toml poetry.lock
|
|
cat > requirements.txt << EOF
|
|
click
|
|
flask==2.0.3
|
|
flask-socketio==5.3.1
|
|
psutil
|
|
pysocks
|
|
requests[socks]
|
|
unidecode
|
|
urllib3
|
|
eventlet
|
|
setuptools
|
|
pynacl
|
|
colorama
|
|
gevent-websocket
|
|
stem==1.8.1
|
|
werkzeug==2.0.3
|
|
EOF
|
|
after: [tor, obfs4, snowflake-client, meek-client]
|
|
|
|
onionshare:
|
|
source: ./desktop
|
|
plugin: python
|
|
build-packages:
|
|
- build-essential
|
|
- libssl-dev
|
|
- libffi-dev
|
|
- python3-dev
|
|
- python3-pip
|
|
- rustc
|
|
- cargo
|
|
build-environment:
|
|
- PATH: /usr/bin:$PATH
|
|
- PYTHONPATH: ""
|
|
stage-packages:
|
|
- libasound2
|
|
- libatk1.0-0
|
|
- libcairo2
|
|
- libcairo-gobject2
|
|
- libcups2
|
|
- libdrm2
|
|
- libegl1
|
|
- libfreetype6
|
|
- libgdk-pixbuf2.0-0
|
|
- libgl1
|
|
- libglvnd0
|
|
- libglx0
|
|
- libgtk-3-0
|
|
- libharfbuzz0b
|
|
- libjpeg8
|
|
- liblcms2-2
|
|
- libnspr4
|
|
- libnss3
|
|
- libodbc1
|
|
- libpango-1.0-0
|
|
- libpangocairo-1.0-0
|
|
- libpng16-16
|
|
- libpq5
|
|
- libpulse-mainloop-glib0
|
|
- librsvg2-2
|
|
- libspeechd2
|
|
- libwayland-client0
|
|
- libwayland-cursor0
|
|
- libwayland-egl1
|
|
- libwayland-server0
|
|
- libx11-6
|
|
- libx11-xcb1
|
|
- libxau6
|
|
- libxcb1
|
|
- libxcb-glx0
|
|
- libxcb-icccm4
|
|
- libxcb-image0
|
|
- libxcb-keysyms1
|
|
- libxcb-render0
|
|
- libxcb-render-util0
|
|
- libxcb-shm0
|
|
- libxcb-sync1
|
|
- libxcb-xfixes0
|
|
- libxcb-xinerama0
|
|
- libxcb-xkb1
|
|
- libxcomposite1
|
|
- libxcursor1
|
|
- libxdamage1
|
|
- libxdmcp6
|
|
- libxext6
|
|
- libxfixes3
|
|
- libxi6
|
|
- libxkbcommon0
|
|
- libxkbcommon-x11-0
|
|
- libxml2
|
|
- libxrandr2
|
|
- libxrender1
|
|
- libxslt1.1
|
|
- libxtst6
|
|
- qtwayland5
|
|
- python3-pyside2.qtcore
|
|
- python3-pyside2.qtgui
|
|
- python3-pyside2.qtwidgets
|
|
override-pull: |
|
|
snapcraftctl pull
|
|
rm pyproject.toml poetry.lock
|
|
cat > requirements.txt << EOF
|
|
qrcode
|
|
EOF
|
|
override-build: |
|
|
python3 -m venv $SNAPCRAFT_PART_INSTALL
|
|
. $SNAPCRAFT_PART_INSTALL/bin/activate
|
|
pip install -U pip setuptools wheel
|
|
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
|
|
after: [onionshare-cli]
|
|
|
|
tor:
|
|
source: https://dist.torproject.org/tor-0.4.7.9.tar.gz
|
|
source-checksum: sha256/d39d38598208f4d6201d7edc6ad573b3a898a932a5c68d3074016a9525519b22
|
|
source-type: tar
|
|
plugin: autotools
|
|
autotools-configure-parameters:
|
|
- "--with-libevent-dir=$SNAPCRAFT_PART_INSTALL/../../libevent/install/usr/local"
|
|
build-packages:
|
|
- libssl-dev
|
|
- zlib1g-dev
|
|
after: [libevent]
|
|
|
|
libevent:
|
|
source: https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz
|
|
source-checksum: sha256/92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb
|
|
source-type: tar
|
|
plugin: autotools
|
|
|
|
obfs4:
|
|
plugin: go
|
|
build-snaps:
|
|
- go/latest/stable
|
|
source: https://gitlab.com/yawning/obfs4.git
|
|
source-type: git
|
|
source-tag: obfs4proxy-0.0.13
|
|
|
|
snowflake-client:
|
|
plugin: go
|
|
build-snaps:
|
|
- go/latest/stable
|
|
source: https://git.torproject.org/pluggable-transports/snowflake.git
|
|
source-type: git
|
|
source-tag: v2.2.0
|
|
organize:
|
|
bin/client: bin/snowflake-client
|
|
|
|
meek-client:
|
|
plugin: go
|
|
build-snaps:
|
|
- go/latest/stable
|
|
source: https://git.torproject.org/pluggable-transports/meek.git
|
|
source-type: git
|
|
source-tag: v0.37.0
|
|
override-build: |
|
|
cd meek-client
|
|
mkdir -p /build/onionshare/meek-client/install/bin
|
|
go build -o /build/onionshare/meek-client/install/bin/meek-client ./...
|