Fix the perms issues with the go dependencies that break stripping in Flatpak. This means we don't need to keep build dirs anymore

This commit is contained in:
Miguel Jacq 2025-02-07 09:47:24 +11:00
parent 2be632fe43
commit 46f3c6f65f
No known key found for this signature in database
GPG Key ID: 59B3F0C24135C6A9

View File

@ -66,7 +66,10 @@ modules:
- --share=network
build-commands:
- ". /usr/lib/sdk/golang/enable.sh; export GOPATH=$PWD; export GO111MODULE=on; cd desktop && ./scripts/build-pt-meek.sh && mv onionshare/resources/tor/meek-client /app/bin/meek-client"
- "ls -aR $FLATPAK_BUILDER_BUILDDIR"
# Some go deps end up with dirs chmod 555 and files chmod 444. This breaks stripping in Flatpak builds, so fix perms.
# See https://github.com/flatpak/flatpak/issues/469
- "find $FLATPAK_BUILDER_BUILDDIR -type d -perm 555 -print0 | xargs -0 -r chmod 755"
- "find $FLATPAK_BUILDER_BUILDDIR -type f -perm 444 -print0 | xargs -0 -r chmod 644"
sources:
- type: dir
path: ..
@ -77,7 +80,10 @@ modules:
- --share=network
build-commands:
- ". /usr/lib/sdk/golang/enable.sh; export GOPATH=$PWD; export GO111MODULE=on; cd desktop && ./scripts/build-pt-snowflake.sh && mv onionshare/resources/tor/snowflake-client /app/bin/snowflake-client"
- "ls -aR $FLATPAK_BUILDER_BUILDDIR"
# Some go deps end up with dirs chmod 555 and files chmod 444. This breaks stripping in Flatpak builds, so fix perms.
# See https://github.com/flatpak/flatpak/issues/469
- "find $FLATPAK_BUILDER_BUILDDIR -type d -perm 555 -print0 | xargs -0 -r chmod 755"
- "find $FLATPAK_BUILDER_BUILDDIR -type f -perm 444 -print0 | xargs -0 -r chmod 644"
sources:
- type: dir
path: ..
@ -88,7 +94,10 @@ modules:
- --share=network
build-commands:
- ". /usr/lib/sdk/golang/enable.sh; export GOPATH=$PWD; export GO111MODULE=on; cd desktop && ./scripts/build-pt-obfs4proxy.sh && mv onionshare/resources/tor/obfs4proxy /app/bin/obfs4proxy"
- "ls -aR $FLATPAK_BUILDER_BUILDDIR"
# Some go deps end up with dirs chmod 555 and files chmod 444. This breaks stripping in Flatpak builds, so fix perms.
# See https://github.com/flatpak/flatpak/issues/469
- "find $FLATPAK_BUILDER_BUILDDIR -type d -perm 555 -print0 | xargs -0 -r chmod 755"
- "find $FLATPAK_BUILDER_BUILDDIR -type f -perm 444 -print0 | xargs -0 -r chmod 644"
sources:
- type: dir
path: ..