Flatpak (100% Working) #2242

Closed
lionirdeadman wants to merge 5 commits from V3/develop into V3/develop
lionirdeadman commented 2018-10-15 03:43:46 +02:00 (Migrated from github.com)

Type

  • Bugfix
  • Enhancement
  • New feature

Description of the changes

Added a .yml file to allow a flatpak to be built on any distribution

Notes

Breaking points for Flathub inclusion :

  • Pip is used directly
  • It's not fully reproducible because it installs whatever is newest on pypi
  • Doesn't check hash
    This was unavoidable because of the links dependency

Non-working :
- Audio cog because OpenJDK10 has a broken certificate (https://github.com/flathub/org.freedesktop.Sdk.Extension.openjdk10/issues/4)

Possible improvements :

  • Add .desktop to easily launch from app menu
  • Add .AppData.xml to see general information, screenshots and updates (Mainly useful for Flathub)
  • Icon folder for looks

Feel free to test and tell me what you think of it. We can publish the bundles with the releases until the breaking points for Flathub inclusion are fixed.

### Type - [ ] Bugfix - [x] Enhancement - [ ] New feature ### Description of the changes Added a .yml file to allow a flatpak to be built on any distribution ### Notes Breaking points for Flathub inclusion : - Pip is used directly - It's not fully reproducible because it installs whatever is newest on pypi - Doesn't check hash This was unavoidable because of the links dependency Non-working : ~~- Audio cog because OpenJDK10 has a broken certificate (https://github.com/flathub/org.freedesktop.Sdk.Extension.openjdk10/issues/4)~~ Possible improvements : - Add .desktop to easily launch from app menu - Add .AppData.xml to see general information, screenshots and updates (Mainly useful for Flathub) - Icon folder for looks Feel free to test and tell me what you think of it. We can publish the bundles with the releases until the breaking points for Flathub inclusion are fixed.
Twentysix26 (Migrated from github.com) reviewed 2018-10-15 03:43:46 +02:00
lionirdeadman commented 2018-10-23 20:23:10 +02:00 (Migrated from github.com)

Audio is now working so everything works now 🎉

Audio is now working so everything works now :tada:
lionirdeadman commented 2019-01-26 23:43:07 +01:00 (Migrated from github.com)

Can anyone review or try this?

I think I might just close it and keep it in another repo for whoever wants it.

Can anyone review or try this? I think I might just close it and keep it in another repo for whoever wants it.
Tobotimus commented 2019-01-26 23:47:02 +01:00 (Migrated from github.com)

Please keep it open for now, I'm sorry it hasn't been reviewed yet, but we've mostly been focused on 3.0.0 stuff. I will take a closer look at it soon 😃

Please keep it open for now, I'm sorry it hasn't been reviewed yet, but we've mostly been focused on 3.0.0 stuff. I will take a closer look at it soon :smiley:
mikeshardmind commented 2019-01-26 23:49:38 +01:00 (Migrated from github.com)

I can try and get a review of this together soon (No absolute guarantees on timeframe). There may be some changes required (minor) on the base install command (depending on merge order) due to pip19's removal of --process-dependency-links (see #2387 for how we're handling this)

PR is appreciated, but the focus has been elsewhere recently.

I can try and get a review of this together soon (No absolute guarantees on timeframe). There may be some changes required (minor) on the base install command (depending on merge order) due to pip19's removal of `--process-dependency-links` (see #2387 for how we're handling this) PR is appreciated, but the focus has been elsewhere recently.
lionirdeadman commented 2019-01-26 23:53:49 +01:00 (Migrated from github.com)

Yeah, that's fine, I simply thought that no one was interested in this hence why I was proposing to close it.

The removal of --process-depency-links would actually probably a good thing towards Flathub inclusion since It'll make a fully reproducible build which doesn't update possible (even though that's not what we're doing at the moment)

Yeah, that's fine, I simply thought that no one was interested in this hence why I was proposing to close it. The removal of `--process-depency-links` would actually probably a good thing towards Flathub inclusion since It'll make a fully reproducible build which doesn't update possible (even though that's not what we're doing at the moment)
mikeshardmind commented 2019-04-29 18:25:06 +02:00 (Migrated from github.com)

@lionirdeadman I'm still interested in flatpak support. Our dependency issues should finally be cleaned up, so it may be a good time to re-discuss anything which is necessary for that.

While I don't think this will be ready (and reviewed) prior to 3.1, there's not necessarily a reason it could not be part of 3.1.1 or 3.1.2

@lionirdeadman I'm still interested in flatpak support. Our dependency issues should finally be cleaned up, so it may be a good time to re-discuss anything which is necessary for that. While I don't think this will be ready (and reviewed) prior to 3.1, there's not necessarily a reason it could not be part of 3.1.1 or 3.1.2
lionirdeadman commented 2019-04-30 01:57:41 +02:00 (Migrated from github.com)

I'm uncertain how we should deal about cog requirements if we make a proper flatpak since they're immutable. Is it possible to move those in a certain place?

I'm uncertain how we should deal about cog requirements if we make a proper flatpak since they're immutable. Is it possible to move those in a certain place?
mikeshardmind commented 2019-04-30 01:59:06 +02:00 (Migrated from github.com)

cog reqs are already downloaded to a shared_lib path in the bot's configured path (not to system shared lib path)

Not sure how this does/doesn't work here, would require testing to see.

cog reqs are already downloaded to a shared_lib path in the bot's configured path (not to system shared lib path) Not sure how this does/doesn't work here, would require testing to see.
lionirdeadman commented 2019-04-30 02:09:44 +02:00 (Migrated from github.com)

Oh then that should work just fine, I need to look how I can use flatpak-pip-generator's output (JSON) in my YAML manifest, I'm asking a friend right now.

If you want, you can make an com.github.Red.DiscordBot.appdata.xml and desktop file which I could use in the flatpak, for reference on how those might look like

Oh and we need to look at how we can prevent the launcher from trying to update since it won't be able to inside the flatpak (to do so, they'd install a new bundle or if we had a repository, they'd use flatpak update from outside it.

Probably need some docs on doing PM2 and systemd configurations with this new install method.

Oh then that should work just fine, I need to look how I can use flatpak-pip-generator's output (JSON) in my YAML manifest, I'm asking a friend right now. If you want, you can make an com.github.Red.DiscordBot.appdata.xml and desktop file which I could use in the flatpak, [for reference on how those might look like](https://github.com/flathub/org.xonotic.Xonotic) Oh and we need to look at how we can prevent the launcher from trying to update since it won't be able to inside the flatpak (to do so, they'd install a new bundle or if we had a repository, they'd use `flatpak update` from outside it. Probably need some docs on doing PM2 and systemd configurations with this new install method.
Drapersniper commented 2019-12-10 10:23:37 +01:00 (Migrated from github.com)

Mongo is being depricated, this should be update to reflect it

Mongo is being depricated, this should be update to reflect it
Drapersniper commented 2020-07-06 20:41:32 +02:00 (Migrated from github.com)

@lionirdeadman is this something you are still actively working on or have you dropped this PR. Unsure whether you are currently working on this locally and just haven't pushed any commits.

@lionirdeadman is this something you are still actively working on or have you dropped this PR. Unsure whether you are currently working on this locally and just haven't pushed any commits.
lionirdeadman commented 2020-07-07 05:39:06 +02:00 (Migrated from github.com)

No, it isn't something I'm working on privately, I think a containerized setup makes more sense and I used to use this simply to refuse filesystem access. The container setup I use now has private home setups so I don't see the point in making this anymore for my personal use.

This can give a package that can be used on all distros but I don't think Red wants to go with this so there's no point having yet another package to maintain, I think. If someone is interested, I can give guidance or make it work with current Red but I won't be maintaining it unless there is significant interest.

No, it isn't something I'm working on privately, I think a containerized setup makes more sense and I used to use this simply to refuse filesystem access. The container setup I use now has private home setups so I don't see the point in making this anymore for my personal use. This can give a package that can be used on all distros but I don't think Red wants to go with this so there's no point having yet another package to maintain, I think. If someone is interested, I can give guidance or make it work with current Red but I won't be maintaining it unless there is significant interest.
Kowlin commented 2020-07-07 06:34:44 +02:00 (Migrated from github.com)

I'm curious in this method my self, and am probably willing to maintain the system if I've read into it, but as of right now I have literally 0 experience in Flatpacks. So I'll be reading into this setup.

I'm curious in this method my self, and am probably willing to maintain the system if I've read into it, but as of right now I have literally 0 experience in Flatpacks. So I'll be reading into this setup.
lionirdeadman commented 2020-07-07 07:41:55 +02:00 (Migrated from github.com)

This flatpak doesn't use good practice. I'll modify it for best practice tomorrow. We can talk about it on the discord if you want explanations.

We need requirements.txt for flatpak-pip-generator hm

This flatpak doesn't use good practice. I'll modify it for best practice tomorrow. We can talk about it on the discord if you want explanations. We need requirements.txt for `flatpak-pip-generator` hm
Flame442 commented 2022-10-19 20:15:51 +02:00 (Migrated from github.com)

Due to the age of this PR and the fact that Flatpak isn't able to be used on a desktopless server, it doesn't seem like something we are interested in at this time.

Due to the age of this PR and the fact that Flatpak [isn't able to be used on a desktopless server](https://flatpak.org/faq/#Can_Flatpak_be_used_on_servers_too_), it doesn't seem like something we are interested in at this time.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot!2242
No description provided.