-
Notifications
You must be signed in to change notification settings - Fork 172
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
build: add Flatpak manifest file #2724
base: development
Are you sure you want to change the base?
build: add Flatpak manifest file #2724
Conversation
Since $SECOND is undefined in POSIX sh, changed the shell in shebang from sh to bash.
Actually, IIRC correctly, we already have code in the app handling the special Flatpack data directory scenario for BOINC in boinc.cpp, but not for the main data directory. We have an existing issue that is the inverse of choice 2, which is here.... #2650. The issue is that if both the native and flatpack BOINC are installed, the Gridcoin app defaults to the native version of BOINC. Since we need to straighten out flatpack handling anyway, I strongly advocate choice 3. We should have some discussion here about what that would look like. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm all for following the XDG specification but Flatpak's default XDG_*_HOME
variables are set to application specific ~/.var/app/us.gridcoin.Gridcoin-Research/...
which means a native installation and a Flatpak installation would have differing data directories. Flatpak advocates this but I'm not exactly sold on that. I think having a unified datadir is better UX overall.
P.S. @ikolomiko Are there any guidelines on publishing to the FlatHub? Like for example if we allow accessing $HOME
would that disqualify the app from getting published?
@div72 A general guideline can be found here. About the filesystem access for unified config data, there's a special section in the Flathub requirements guide which strictly discourages that. While I'm not sure if it disqualifies the app from getting published on Flathub, it certainly is not the expected behavior of a Flatpak app. |
I think we need to live with the XDG spec. Do we need to modify the existing FlatPack handling code? |
The linter is barking again.... :) |
Apparently the web editor of GitHub inserts CRLF line endings to commit messages, causing the linter to go crazy, lol. Gotta rewrite the commit messages locally. |
Surround the repo_root variable with double quotes Co-authored-by: div72 <[email protected]>
Co-authored-by: div72 <[email protected]>
Run autogen.sh Co-authored-by: div72 <[email protected]>
- Add the flathub.org remote if it doesn't exist - Download required SDK and runtimes if not downloaded - Display the path of the created bundle with the command to install it
28be580
to
5471231
Compare
That is crazy that the Github editor is following the Windows line ending standard... |
Made a bunch of additions to the manifest for some permissions. AFAICT, the only missing piece is setting the default value of |
Actually no. Flatpak permissions can be fine-tuned in the system settings if you use KDE and in third-party Flatseal application otherwise. |
I'd also like to note that a |
Users installing both their distro's package and the Flatpak are going to be confused anyway. |
I've created an initial Flatpak manifest file and a script to create a local Flatpak bundle. The permissions are pretty much bare-bones at this point. Since the manifest doesn't give read/write permissions for the
$HOME
directory, the application fails to start after the initial setup done by the wizard. There are 3 ways to overcome this issue:datadir
to some predefined and sandboxed directory, just like how Bitcoin-Core handles this issue. This solution is pretty seamless and secure. However, it restricts the user from choosing another directory, and feels like a dirty hack.$HOME
directory. This approach requires the least effort. However, it violates the sandboxing Flatpak provides, and might cause conflicts if there's also a native version of Gridcoin installed besides the Flatpak version.datadir
, instead of using the~/.GridcoinResearch
directory. Following the XDG specifications is considered the best practice on Linux in general, both for Flatpak applications and for other package managers. However, this would require some modification in the codebase.