Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Org.onionshare.onion share #2129

Closed
wants to merge 6 commits into from

Conversation

micahflee
Copy link

Please confirm your submission meets all the criteria

  • I have read the App Requirements and App Maintenance pages.
  • My pull request follows the instructions at App Submission.
  • I am using only the minimal set of permissions. (If not, please explain each non-standard permission.)
  • All assets referenced in the manifest are redistributable by any party. If not, the unredistributable parts are using an extra-data source type.
  • I am an upstream contributor to the project. If not, I contacted upstream developers about submitting their software to Flathub. Link:
  • I own the domain used in the application ID or the domain has a policy for delegating subdomains (e.g. GitHub, SourceForge).
  • Any additional patches or files have been submitted to the upstream projects concerned. (If not, explain why.)

@kushaldas
Copy link

It will be an amazing addition. Thank you @micahflee.

@@ -1,27 +1,8 @@
# Flathub
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to delete this file too.

- "--share=ipc"
- "--share=network"
- "--socket=wayland"
- "--socket=x11"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- "--socket=x11"
- "--socket=fallback-x11"

- "--talk-name=org.freedesktop.secrets"
- "--filesystem=home:ro"
- "--filesystem=~/OnionShare:create"
- "--filesystem=xdg-config/onionshare:create"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- "--filesystem=xdg-config/onionshare:create"

Your application has write access to $XDG_CONFIG_HOME by default.

- "--share=network"
- "--socket=wayland"
- "--socket=x11"
- "--talk-name=org.freedesktop.Flatpak"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you need it for?

- mkdir -p /app/include/qt5tmp && cp -R /usr/include/Qt* /app/include/qt5tmp # https://bugreports.qt.io/browse/PYSIDE-787
- sed -i 's|\(--include-paths=\)|\1/app/include/qt5tmp:|' sources/pyside2/cmake/Macros/PySideModules.cmake
- name: tor
buildsystem: simple
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use autotools here?

url: https://dist.torproject.org/tor-0.4.5.6.tar.gz
modules:
- name: libevent
buildsystem: simple
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

GOBIN: "/app/bin/"
GO111MODULE: "off"
build-commands:
- ". /usr/lib/sdk/golang/enable.sh; GOPATH=$PWD go install gitlab.com/yawning/obfs4.git/obfs4proxy"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it actually work? Flathub runs builds offline, https://github.com/flatpak/flatpak-builder-tools/tree/master/go-get can be used to generate manifest automatically.

- type: dir
path: ../desktop/src
modules:
- name: python3-qrcode
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a generator for pip too, if it makes the work simpler for you: https://github.com/flatpak/flatpak-builder-tools/tree/master/pip

@barthalion
Copy link
Member

bot, build org.onionshare.OnionShare

@flathubbot
Copy link

Queued test build for org.onionshare.OnionShare.

@flathubbot
Copy link

Started test build 39943

@flathubbot
Copy link

Build 39943 failed

- "--talk-name=org.freedesktop.Flatpak"
- "--talk-name=org.freedesktop.Notifications"
- "--talk-name=org.freedesktop.secrets"
- "--filesystem=home:ro"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this app use portals? If yes then you may not need this permission.

@micahflee
Copy link
Author

bot, build org.onionshare.OnionShare

@flathubbot
Copy link

Queued test build for org.onionshare.OnionShare.

@flathubbot
Copy link

Started test build 39993

@flathubbot
Copy link

Build 39993 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/38489/org.onionshare.OnionShare.flatpakref

@micahflee
Copy link
Author

Okay, I've fixed the manifest and addressed all of your comments, and it seems ready to go.

Your application has write access to $XDG_CONFIG_HOME by default.

Without this in finish-args:

   - "--filesystem=xdg-config/onionshare:create" 

I get this error:

$ flatpak run org.onionshare.OnionShare
OnionShare 2.3.1 | https://onionshare.org/
Gtk-Message: 19:29:10.970: Failed to load module "canberra-gtk-module"
Gtk-Message: 19:29:10.971: Failed to load module "canberra-gtk-module"
Qt: Session management error: None of the authentication protocols specified are supported
Traceback (most recent call last):
  File "/app/bin/onionshare", line 33, in <module>
  File "/app/lib/python3.8/site-packages/onionshare-2.3.1-py3.8.egg/onionshare/__init__.py", line 177, in main
OSError: [Errno 30] Read-only file system: '/home/user/.config/onionshare/lock'

The problem is in upstream OnionShare is writing directly to ~/.config/onionshare instead of to $XDG_CONFIG_HOME . So I'm keeping it for now, but I opened in issue upstream: onionshare/onionshare#1293

I made the tor and libevent modules use autotools.

I actually did use the flatpak-builder-tools repo for both pip dependencies and for the golang obfs4proxy module, though it turns out https://github.com/flatpak/flatpak-builder-tools/tree/master/go-get doesn't work anymore as of about 6 days ago when https://github.com/flathub/org.freedesktop.Sdk.Extension.golang updated golang to 1.16 -- it took awhile to realize I needed the GO111MODULE=off environment variable for this older way of getting go sources to work.

@micahflee
Copy link
Author

bot, build org.onionshare.OnionShare

@flathubbot
Copy link

Queued test build for org.onionshare.OnionShare.

@flathubbot
Copy link

Started test build 39998

@micahflee
Copy link
Author

Oh yeah and

Can this app use portals? If yes then you may not need this permission.

I'd like to use portals, but it's not yet implemented.

@flathubbot
Copy link

Build 39998 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/38494/org.onionshare.OnionShare.flatpakref

@barthalion
Copy link
Member

/merge

@flathubbot
Copy link

A repository for this has been created: https://github.com/flathub/org.onionshare.OnionShare

You will receive an invitation to be a collaborator which will grant you write access to the repository above. The invite can be also viewed here.

If you have never maintained an application before, common questions are answered in the app maintenance guide.

Thanks!

@flathubbot flathubbot closed this Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants