2020-05-03 13:56:18 -07:00
|
|
|
name: onionshare
|
2025-02-12 15:47:26 +11:00
|
|
|
base: core24
|
2025-02-12 14:23:41 +11:00
|
|
|
version: "2.6.3"
|
2020-11-03 21:48:22 -08:00
|
|
|
summary: Securely and anonymously share files, host websites, and chat using Tor
|
2020-05-03 13:56:18 -07:00
|
|
|
description: |
|
2021-08-22 20:21:09 +00:00
|
|
|
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_
|
2020-11-03 21:48:22 -08:00
|
|
|
require setting up a separate server or using a third party file-sharing service.
|
2020-05-03 13:56:18 -07:00
|
|
|
|
2021-11-15 18:30:10 -08:00
|
|
|
grade: stable # stable or devel
|
2020-11-03 22:53:54 -08:00
|
|
|
confinement: strict
|
2020-05-03 13:56:18 -07:00
|
|
|
|
2025-02-12 15:47:26 +11:00
|
|
|
platforms:
|
|
|
|
amd64:
|
|
|
|
arm64:
|
2022-07-04 17:32:13 -04:00
|
|
|
|
2020-05-03 13:56:18 -07:00
|
|
|
apps:
|
2020-11-03 21:48:22 -08:00
|
|
|
onionshare:
|
|
|
|
common-id: org.onionshare.OnionShare
|
2023-09-05 20:42:47 -07:00
|
|
|
command: bin/onionshare
|
2023-12-13 19:43:01 +05:30
|
|
|
extensions: [gnome]
|
2020-05-03 13:56:18 -07:00
|
|
|
plugs:
|
2020-05-07 17:14:48 -07:00
|
|
|
- desktop
|
2020-05-03 13:56:18 -07:00
|
|
|
- home
|
|
|
|
- network
|
|
|
|
- network-bind
|
2020-05-07 17:14:48 -07:00
|
|
|
- removable-media
|
2021-05-31 14:08:29 -07:00
|
|
|
environment:
|
|
|
|
LANG: C.UTF-8
|
2023-09-05 20:42:47 -07:00
|
|
|
PATH: $SNAP/bin:$SNAP/usr/bin:$SNAP/usr/local/bin:$PATH
|
|
|
|
LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/local/lib
|
2021-08-22 20:21:09 +00:00
|
|
|
|
2020-11-03 21:48:22 -08:00
|
|
|
cli:
|
|
|
|
common-id: org.onionshare.OnionShareCli
|
2023-09-05 20:42:47 -07:00
|
|
|
command: bin/onionshare-cli
|
2020-05-07 17:14:48 -07:00
|
|
|
plugs:
|
|
|
|
- home
|
|
|
|
- network
|
|
|
|
- network-bind
|
|
|
|
- removable-media
|
2021-05-31 14:08:29 -07:00
|
|
|
environment:
|
|
|
|
LANG: C.UTF-8
|
2023-09-05 20:42:47 -07:00
|
|
|
PATH: $SNAP/bin:$SNAP/usr/bin:$SNAP/usr/local/bin:$PATH
|
|
|
|
LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/local/lib
|
2020-05-03 13:56:18 -07:00
|
|
|
|
|
|
|
parts:
|
|
|
|
onionshare:
|
2025-02-11 09:19:36 +11:00
|
|
|
source: .
|
2020-05-03 13:56:18 -07:00
|
|
|
plugin: python
|
2022-10-09 07:20:25 -07:00
|
|
|
build-packages:
|
|
|
|
- build-essential
|
|
|
|
- libssl-dev
|
|
|
|
- libffi-dev
|
|
|
|
- python3-dev
|
|
|
|
- python3-pip
|
|
|
|
- rustc
|
|
|
|
- cargo
|
2022-10-07 15:44:12 -07:00
|
|
|
build-environment:
|
|
|
|
- PATH: /usr/bin:$PATH
|
|
|
|
- PYTHONPATH: ""
|
2020-05-06 16:05:48 -07:00
|
|
|
stage-packages:
|
2020-11-03 22:33:26 -08:00
|
|
|
- libasound2
|
2025-02-13 10:16:09 +11:00
|
|
|
- libatk1.0-0
|
2020-11-03 22:33:26 -08:00
|
|
|
- libcairo2
|
|
|
|
- libcairo-gobject2
|
2025-02-13 10:16:09 +11:00
|
|
|
- libcups2
|
2020-05-06 16:05:48 -07:00
|
|
|
- libdrm2
|
2020-11-03 22:33:26 -08:00
|
|
|
- libegl1
|
2020-05-06 16:05:48 -07:00
|
|
|
- libfreetype6
|
2020-11-03 22:33:26 -08:00
|
|
|
- libgdk-pixbuf2.0-0
|
2020-05-06 16:05:48 -07:00
|
|
|
- libgl1
|
|
|
|
- libglvnd0
|
|
|
|
- libglx0
|
2025-02-13 10:16:21 +11:00
|
|
|
- libgtk-3-0
|
2020-11-03 21:48:22 -08:00
|
|
|
- libharfbuzz0b
|
|
|
|
- libjpeg8
|
|
|
|
- liblcms2-2
|
|
|
|
- libnspr4
|
|
|
|
- libnss3
|
2020-05-06 16:05:48 -07:00
|
|
|
- libpango-1.0-0
|
|
|
|
- libpangocairo-1.0-0
|
2025-02-13 10:16:09 +11:00
|
|
|
- libpng16-16
|
2020-11-03 22:33:26 -08:00
|
|
|
- libpq5
|
|
|
|
- libpulse-mainloop-glib0
|
2020-11-03 21:48:22 -08:00
|
|
|
- librsvg2-2
|
2020-11-03 22:33:26 -08:00
|
|
|
- libspeechd2
|
2020-05-06 16:05:48 -07:00
|
|
|
- libwayland-client0
|
|
|
|
- libwayland-cursor0
|
|
|
|
- libwayland-egl1
|
2020-11-03 21:48:22 -08:00
|
|
|
- libwayland-server0
|
2020-11-03 22:33:26 -08:00
|
|
|
- libx11-6
|
|
|
|
- libx11-xcb1
|
|
|
|
- libxau6
|
|
|
|
- libxcb1
|
|
|
|
- libxcb-glx0
|
|
|
|
- libxcb-icccm4
|
|
|
|
- libxcb-image0
|
|
|
|
- libxcb-keysyms1
|
2020-11-03 21:48:22 -08:00
|
|
|
- libxcb-render0
|
2020-11-03 22:33:26 -08:00
|
|
|
- libxcb-render-util0
|
2020-11-03 21:48:22 -08:00
|
|
|
- libxcb-shm0
|
2020-11-03 22:33:26 -08:00
|
|
|
- libxcb-sync1
|
2020-11-03 21:48:22 -08:00
|
|
|
- libxcb-xfixes0
|
2020-11-03 22:33:26 -08:00
|
|
|
- libxcb-xinerama0
|
|
|
|
- libxcb-xkb1
|
|
|
|
- libxcomposite1
|
|
|
|
- libxcursor1
|
|
|
|
- libxdamage1
|
|
|
|
- libxdmcp6
|
|
|
|
- libxext6
|
|
|
|
- libxfixes3
|
|
|
|
- libxi6
|
|
|
|
- libxkbcommon0
|
|
|
|
- libxkbcommon-x11-0
|
2020-05-06 16:05:48 -07:00
|
|
|
- libxml2
|
2020-11-03 22:33:26 -08:00
|
|
|
- libxrandr2
|
|
|
|
- libxrender1
|
2020-11-03 21:48:22 -08:00
|
|
|
- libxslt1.1
|
2020-11-03 22:33:26 -08:00
|
|
|
- libxtst6
|
2021-09-12 18:45:44 -07:00
|
|
|
- qtwayland5
|
2023-09-05 20:42:47 -07:00
|
|
|
- libgstreamer1.0-0
|
|
|
|
- libgstreamer1.0-dev
|
|
|
|
- libgstreamer-gl1.0-0
|
|
|
|
- libgstreamer-plugins-base1.0-0
|
|
|
|
- libmysqlclient21
|
|
|
|
- libxcb-cursor0
|
|
|
|
- libxkbfile1
|
2025-02-12 15:47:26 +11:00
|
|
|
- libodbc2
|
2022-10-09 07:20:25 -07:00
|
|
|
override-pull: |
|
2023-09-05 20:42:47 -07:00
|
|
|
craftctl default
|
2022-10-06 09:14:05 -07:00
|
|
|
override-build: |
|
2025-02-11 09:19:36 +11:00
|
|
|
test -e $CRAFT_PART_INSTALL/bin/python3 && chmod 755 $CRAFT_PART_INSTALL/bin/python3 || true
|
2023-09-05 20:42:47 -07:00
|
|
|
python3 -m venv $CRAFT_PART_INSTALL
|
|
|
|
. $CRAFT_PART_INSTALL/bin/activate
|
2025-02-11 09:19:36 +11:00
|
|
|
pip install -r snap/local/cli-requirements.txt -r snap/local/desktop-requirements.txt
|
|
|
|
cd desktop && pip install ../cli && pip install .
|
2022-10-09 07:20:25 -07:00
|
|
|
deactivate
|
2023-09-05 20:42:47 -07:00
|
|
|
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
|
2020-11-03 21:48:22 -08:00
|
|
|
|
2020-05-03 13:56:18 -07:00
|
|
|
tor:
|
2025-02-08 17:03:45 +11:00
|
|
|
source: https://dist.torproject.org/tor-0.4.8.14.tar.gz
|
|
|
|
source-checksum: sha256/5047e1ded12d9aac4eb858f7634a627714dd58ce99053d517691a4b304a66d10
|
2020-05-03 13:56:18 -07:00
|
|
|
source-type: tar
|
|
|
|
plugin: autotools
|
2022-07-04 17:30:09 -07:00
|
|
|
autotools-configure-parameters:
|
2023-09-05 20:42:47 -07:00
|
|
|
- "--with-libevent-dir=$CRAFT_PART_INSTALL/../../libevent/install/usr/local"
|
2020-05-03 13:56:18 -07:00
|
|
|
build-packages:
|
|
|
|
- libssl-dev
|
|
|
|
- zlib1g-dev
|
|
|
|
after: [libevent]
|
2021-08-22 20:21:09 +00:00
|
|
|
|
2020-05-03 13:56:18 -07:00
|
|
|
libevent:
|
2020-11-03 21:48:22 -08:00
|
|
|
source: https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz
|
|
|
|
source-checksum: sha256/92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb
|
2020-05-03 13:56:18 -07:00
|
|
|
source-type: tar
|
|
|
|
plugin: autotools
|
|
|
|
|
|
|
|
obfs4:
|
|
|
|
plugin: go
|
2022-10-03 15:34:48 -07:00
|
|
|
build-snaps:
|
2022-10-06 09:14:05 -07:00
|
|
|
- go/latest/stable
|
2022-07-04 18:08:58 -04:00
|
|
|
source: https://gitlab.com/yawning/obfs4.git
|
2020-05-03 13:56:18 -07:00
|
|
|
source-type: git
|
2022-10-18 12:15:01 +11:00
|
|
|
source-tag: obfs4proxy-0.0.14
|
2025-02-11 09:19:36 +11:00
|
|
|
after: [tor]
|
2021-11-14 11:08:00 -08:00
|
|
|
|
|
|
|
snowflake-client:
|
|
|
|
plugin: go
|
2022-10-03 15:34:48 -07:00
|
|
|
build-snaps:
|
2022-10-06 09:14:05 -07:00
|
|
|
- go/latest/stable
|
2024-02-13 12:58:04 +05:30
|
|
|
source: https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
|
2021-11-14 11:08:00 -08:00
|
|
|
source-type: git
|
2025-02-06 17:16:58 +11:00
|
|
|
source-tag: v2.10.1
|
2021-11-14 17:52:40 -08:00
|
|
|
organize:
|
|
|
|
bin/client: bin/snowflake-client
|
2025-02-11 09:19:36 +11:00
|
|
|
after: [obfs4]
|
2021-11-14 11:08:00 -08:00
|
|
|
|
2021-11-14 17:52:40 -08:00
|
|
|
meek-client:
|
|
|
|
plugin: go
|
2022-10-03 15:34:48 -07:00
|
|
|
build-snaps:
|
2022-10-06 09:14:05 -07:00
|
|
|
- go/latest/stable
|
2024-02-13 17:33:51 +05:30
|
|
|
source: https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/meek.git
|
2021-11-14 17:52:40 -08:00
|
|
|
source-type: git
|
2023-09-05 15:45:04 -07:00
|
|
|
source-tag: v0.38.0
|
2022-07-04 18:17:20 -04:00
|
|
|
override-build: |
|
|
|
|
cd meek-client
|
2025-02-08 17:27:34 +11:00
|
|
|
go build -o $SNAPCRAFT_PART_INSTALL/bin/meek-client ./...
|
2025-02-11 09:19:36 +11:00
|
|
|
after: [snowflake-client]
|
2025-02-09 09:02:18 +11:00
|
|
|
|
|
|
|
# This part removes all the files in this snap which already exist in
|
|
|
|
# connected content and base snaps. Since these files will be available
|
|
|
|
# at runtime from the content and base snaps, they do not need to be
|
|
|
|
# included in this snap itself.
|
|
|
|
#
|
|
|
|
# More info: https://forum.snapcraft.io/t/reducing-the-size-of-desktop-snaps/17280#heading--cleanup-part
|
|
|
|
#
|
|
|
|
cleanup:
|
|
|
|
after: # Make this part run last; list all your other parts here
|
|
|
|
- onionshare
|
|
|
|
- tor
|
|
|
|
- libevent
|
|
|
|
- obfs4
|
|
|
|
- snowflake-client
|
|
|
|
- meek-client
|
|
|
|
plugin: nil
|
|
|
|
build-snaps: # List all content-snaps and base snaps you're using here
|
2025-02-12 15:47:26 +11:00
|
|
|
- core24
|
2025-02-09 09:02:18 +11:00
|
|
|
- go/latest/stable
|
2025-02-12 15:47:26 +11:00
|
|
|
- gnome-46-2404-sdk
|
2025-02-09 09:02:18 +11:00
|
|
|
override-prime: |
|
|
|
|
set -eux
|
2025-02-12 15:47:26 +11:00
|
|
|
for snap in core24 go/latest/stable gnome-46-2404-sdk; do # List all content-snaps and base snaps you're using here
|
2025-02-09 09:02:18 +11:00
|
|
|
cd "/snap/$snap/current" && find . -type f,l -exec rm -f "$CRAFT_PRIME/{}" \;
|
|
|
|
done
|