mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-11 07:19:30 -05:00
More snapcraft troubleshooting (#1622)
Finally got the snap to successfully run
This commit is contained in:
parent
2144bc89fe
commit
6c6c6bc62d
36
.github/workflows/build.yml
vendored
36
.github/workflows/build.yml
vendored
@ -305,24 +305,6 @@ jobs:
|
|||||||
name: mac-build
|
name: mac-build
|
||||||
path: ~/onionshare-macos.tar.gz
|
path: ~/onionshare-macos.tar.gz
|
||||||
|
|
||||||
# build-snap:
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v3
|
|
||||||
|
|
||||||
# - name: Install dependencies
|
|
||||||
# run: |
|
|
||||||
# sudo lxd init --auto
|
|
||||||
# sudo snap install snapcraft --classic
|
|
||||||
|
|
||||||
# - name: Build snap
|
|
||||||
# run: sudo snapcraft --use-lxd
|
|
||||||
|
|
||||||
# - uses: actions/upload-artifact@v3
|
|
||||||
# with:
|
|
||||||
# name: snapcraft-build
|
|
||||||
# path: onionshare_*.snap
|
|
||||||
|
|
||||||
build-flatpak:
|
build-flatpak:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@ -356,3 +338,21 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: flatpak-build
|
name: flatpak-build
|
||||||
path: ~/OnionShare.flatpak
|
path: ~/OnionShare.flatpak
|
||||||
|
|
||||||
|
build-snap:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo lxd init --auto
|
||||||
|
sudo snap install snapcraft --classic
|
||||||
|
|
||||||
|
- name: Build snap
|
||||||
|
run: sudo snapcraft --use-lxd
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: snapcraft-build
|
||||||
|
path: onionshare_*.snap
|
||||||
|
4
.github/workflows/tests.yml
vendored
4
.github/workflows/tests.yml
vendored
@ -9,7 +9,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.9'
|
python-version: "3.9"
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
@ -34,7 +34,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.9'
|
python-version: "3.9"
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
|
@ -19,7 +19,7 @@ architectures:
|
|||||||
apps:
|
apps:
|
||||||
onionshare:
|
onionshare:
|
||||||
common-id: org.onionshare.OnionShare
|
common-id: org.onionshare.OnionShare
|
||||||
command: bin/onionshare
|
command: bin/onionshare-launcher
|
||||||
extensions: [gnome-3-38]
|
extensions: [gnome-3-38]
|
||||||
plugs:
|
plugs:
|
||||||
- desktop
|
- desktop
|
||||||
@ -32,7 +32,7 @@ apps:
|
|||||||
|
|
||||||
cli:
|
cli:
|
||||||
common-id: org.onionshare.OnionShareCli
|
common-id: org.onionshare.OnionShareCli
|
||||||
command: bin/onionshare-cli
|
command: bin/onionshare-cli-launcher
|
||||||
plugs:
|
plugs:
|
||||||
- home
|
- home
|
||||||
- network
|
- network
|
||||||
@ -42,12 +42,45 @@ apps:
|
|||||||
LANG: C.UTF-8
|
LANG: C.UTF-8
|
||||||
|
|
||||||
parts:
|
parts:
|
||||||
|
# Launcher scripts, in order to set PYTHONPATH
|
||||||
|
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:
|
onionshare:
|
||||||
source: ./desktop
|
source: ./desktop
|
||||||
plugin: python
|
plugin: python
|
||||||
python-packages:
|
build-environment:
|
||||||
- qrcode
|
- PATH: /usr/bin:$PATH
|
||||||
- pyside2 == 5.15.2.1
|
- PYTHONPATH: ""
|
||||||
stage-packages:
|
stage-packages:
|
||||||
- libasound2
|
- libasound2
|
||||||
- libatk1.0-0
|
- libatk1.0-0
|
||||||
@ -109,19 +142,28 @@ parts:
|
|||||||
- libxslt1.1
|
- libxslt1.1
|
||||||
- libxtst6
|
- libxtst6
|
||||||
- qtwayland5
|
- qtwayland5
|
||||||
|
- python3-pyside2.qtcore
|
||||||
|
- python3-pyside2.qtgui
|
||||||
|
- python3-pyside2.qtwidgets
|
||||||
override-build: |
|
override-build: |
|
||||||
|
python3 -m pip install qrcode --prefix $SNAPCRAFT_PART_INSTALL
|
||||||
python3 setup.py install --prefix $SNAPCRAFT_PART_INSTALL
|
python3 setup.py install --prefix $SNAPCRAFT_PART_INSTALL
|
||||||
after: [onionshare-cli]
|
after: [onionshare-cli]
|
||||||
|
|
||||||
onionshare-cli:
|
onionshare-cli:
|
||||||
source: ./cli
|
source: ./cli
|
||||||
plugin: python
|
plugin: python
|
||||||
|
build-environment:
|
||||||
|
- PATH: /usr/bin:$PATH
|
||||||
|
- PYTHONPATH: ""
|
||||||
build-packages:
|
build-packages:
|
||||||
- build-essential
|
- build-essential
|
||||||
- libssl-dev
|
- libssl-dev
|
||||||
- libffi-dev
|
- libffi-dev
|
||||||
- python3-dev
|
- python3-dev
|
||||||
- python3-pip
|
- python3-pip
|
||||||
|
- rustc
|
||||||
|
- cargo
|
||||||
override-build: |
|
override-build: |
|
||||||
python3 -m pip install poetry
|
python3 -m pip install poetry
|
||||||
python3 -m pip install setuptools
|
python3 -m pip install setuptools
|
||||||
@ -136,8 +178,7 @@ parts:
|
|||||||
source-type: tar
|
source-type: tar
|
||||||
plugin: autotools
|
plugin: autotools
|
||||||
autotools-configure-parameters:
|
autotools-configure-parameters:
|
||||||
- "--with-libevent-dir=/build/onionshare/parts/libevent/install/usr/local"
|
- "--with-libevent-dir=$SNAPCRAFT_PROJECT_DIR/../parts/libevent/install/usr/local"
|
||||||
# - "--with-libevent-dir=/root/parts/libevent/install/usr/local"
|
|
||||||
build-packages:
|
build-packages:
|
||||||
- libssl-dev
|
- libssl-dev
|
||||||
- zlib1g-dev
|
- zlib1g-dev
|
||||||
|
Loading…
Reference in New Issue
Block a user