celenity/Phoenix
8
198
Fork
You've already forked Phoenix
18

[ENHANCEMENT] Flatpak Support #5

Open
opened 2024年09月18日 20:04:36 +02:00 by celenity · 18 comments

We definitely need to support Flatpak installations of Firefox - & probably Snaps as well (mainly due to it being the default installation of Firefox on Ubuntu... :/).

This shouldn't be too difficult - I'm just not as familiar with Firefox's file structure when installed as a Flatpak, so I'll have to do some research & testing.

Creating this issue to track progress.

We definitely need to support Flatpak installations of Firefox - & probably Snaps as well (mainly due to it being the default installation of Firefox on Ubuntu... :/). This shouldn't be too difficult - I'm just not as familiar with Firefox's file structure when installed as a Flatpak, so I'll have to do some research & testing. Creating this issue to track progress.
Author
Owner
Copy link

Flatpak policies have officially been packaged & confirmed working: https://codeberg.org/celenity/Phoenix-Policies-Flatpak

Now to figure out how to distribute and update them...

Flatpak policies have officially been packaged & confirmed working: https://codeberg.org/celenity/Phoenix-Policies-Flatpak Now to figure out how to distribute and update them...

Please make it a real Flatpak, which can be installed at user level and is displayed in Flathub on the Firefox page under Add-ons.

Please make it a real Flatpak, which can be installed at user level and is displayed in Flathub on the Firefox page under Add-ons.
Collaborator
Copy link

@eIKpaSrnMoKI wrote in #5 (comment):

Please make it a real Flatpak, which can be installed at user level and is displayed in Flathub on the Firefox page under Add-ons.

This is very hard to do.

@eIKpaSrnMoKI wrote in https://codeberg.org/celenity/Phoenix/issues/5#issuecomment-3127649: > Please make it a real Flatpak, which can be installed at user level and is displayed in Flathub on the Firefox page under Add-ons. This is very hard to do.
Author
Owner
Copy link

@eIKpaSrnMoKI

Please make it a real Flatpak, which can be installed at user level

I've actually been working on this here, and I think I'll be able to have this available soon - though @Gnu1 is right that this has posed some challenges. For instance, using Extended/specialized configs will require an extra step.

and is displayed in Flathub on the Firefox page under Add-ons.

I'm not sure if we'll be able to do this; the main challenge here is that we're using an unmaintained Flatpak extension (since that's what Firefox supports), so it works differently than typical Flatpak extensions; most notably, I believe we have to use the org.mozilla.firefox.systemconfig identifier; I don't think we can use our own (like org.mozilla.firefox.systemconfig.phoenix)... If I'm wrong here though, please let me know.

I'm going to set-up a Flatpak repo on GitLab (at least for the time being), but if my concern above doesn't turn out to be an issue, we can look into listing it on Flathub.

@eIKpaSrnMoKI > Please make it a real Flatpak, which can be installed at user level I've actually been working on this [here](https://codeberg.org/celenity/flatpaks), and I think I'll be able to have this available soon - though @Gnu1 is right that this has posed some challenges. For instance, using `Extended`/specialized configs will require an extra step. > and is displayed in Flathub on the Firefox page under Add-ons. I'm not sure if we'll be able to do this; the main challenge here is that we're using an [unmaintained Flatpak extension](https://docs.flatpak.org/en/latest/extension.html#unmaintained-flatpak-extensions) *(since that's what Firefox supports)*, so it works differently than typical Flatpak extensions; most notably, I believe we have to use the `org.mozilla.firefox.systemconfig` identifier; I don't think we can use our own *(like `org.mozilla.firefox.systemconfig.phoenix`)*... If I'm wrong here though, please let me know. I'm going to set-up a Flatpak repo on GitLab *(at least for the time being)*, but if my concern above doesn't turn out to be an issue, we can look into listing it on Flathub.
Both are described in the Flathub documentation. *User level https://docs.flathub.org/docs/for-users/user-vs-system-install *Extension https://docs.flathub.org/docs/for-app-authors/metainfo-guidelines#extensions

@celenity wrote in #5 (comment):

I'm not sure if we'll be able to do this

The example for the ‘FFmpeg extension with extra codecs’ add-on, which is listed here https://flathub.org/apps/org.mozilla.firefox, is also linked in the Flathub documentation: https://docs.flatpak.org/en/latest/extension.html#unmaintained-flatpak-extensions

@celenity wrote in https://codeberg.org/celenity/Phoenix/issues/5#issuecomment-3127736: > I'm not sure if we'll be able to do this The example for the ‘FFmpeg extension with extra codecs’ add-on, which is listed here https://flathub.org/apps/org.mozilla.firefox, is also linked in the Flathub documentation: https://docs.flatpak.org/en/latest/extension.html#unmaintained-flatpak-extensions

@celenity wrote in #5 (comment):

I don't think we can use our own (like org.mozilla.firefox.systemconfig.phoenix)... If I'm wrong here though, please let me know.

As I understand the documentation, a Phoenix extension should point to org.mozilla.firefox.systemconfig. Does this cause any problems or restrictions for Phoenix?

@celenity wrote in https://codeberg.org/celenity/Phoenix/issues/5#issuecomment-3127736: > I don't think we can use our own _(like `org.mozilla.firefox.systemconfig.phoenix`)_... If I'm wrong here though, please let me know. As I understand the documentation, a Phoenix extension should point to org.mozilla.firefox.systemconfig. Does this cause any problems or restrictions for Phoenix?
Author
Owner
Copy link

@eIKpaSrnMoKI

As I understand the documentation, a Phoenix extension should point to org.mozilla.firefox.systemconfig. Does this cause any problems or restrictions for Phoenix?

Not really; but would this cause any problems or restrictions in getting listed on Flathub? Don't identifiers have to be unique per-app/extension?

@eIKpaSrnMoKI > As I understand the documentation, a Phoenix extension should point to org.mozilla.firefox.systemconfig. Does this cause any problems or restrictions for Phoenix? Not *really*; but would this cause any problems or restrictions in getting listed on Flathub? Don't identifiers have to be unique per-app/extension?
celenity changed title from (削除) Flatpak Support (削除ここまで) to [ENHANCEMENT] Flatpak Support 2025年03月29日 19:01:33 +01:00

@celenity

I asked Flathub about this. The answer can be found here: https://docs.flatpak.org/en/latest/extension.html#extension-manifest. Therefore, the app that should be extended must be prefixed in the ID. In our case, this is org.mozilla.firefox.systemconfig.

For Phoenix, this means that the ID could be org.mozilla.firefox.systemconfig.phoenix.

@celenity I asked Flathub about this. The answer can be found here: https://docs.flatpak.org/en/latest/extension.html#extension-manifest. Therefore, the app that should be extended must be prefixed in the ID. In our case, this is `org.mozilla.firefox.systemconfig`. For Phoenix, this means that the ID could be `org.mozilla.firefox.systemconfig.phoenix`.
Author
Owner
Copy link

So I've been working on this (over on GitLab, since that's where I'll host the repo - at least for the time being) here, and I've made significant progress. It builds and seems to work perfect locally (with flatpak-builder), but the CI builds are failing due to this error:

$ flatpak build-bundle --gpg-sign=${GPG_KEY_ID} repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${APP_ID} ${BRANCH}
error: Refspec 'app/org.mozilla.firefox.systemconfig/x86_64/stable' not found
Cleaning up project directory and file based variables 00:00
ERROR: Job failed: exit code 1

If anyone wants to step up and contribute/help determine this issue, or has any ideas/suggestions/pointers/etc, it'd be appreciated.

So I've been working on this *(over on GitLab, since that's where I'll host the repo - at least for the time being)* [here](https://gitlab.com/celenityy/Phoenix-Flatpak), and I've made significant progress. It builds and seems to work perfect locally *(with `flatpak-builder`)*, but the CI builds are [failing](https://gitlab.com/celenityy/Phoenix-Flatpak/-/jobs/9795342736#L123) due to this error: ```sh $ flatpak build-bundle --gpg-sign=${GPG_KEY_ID} repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${APP_ID} ${BRANCH} error: Refspec 'app/org.mozilla.firefox.systemconfig/x86_64/stable' not found Cleaning up project directory and file based variables 00:00 ERROR: Job failed: exit code 1 ``` If anyone wants to step up and contribute/help determine this issue, or has any ideas/suggestions/pointers/etc, it'd be appreciated.
Thanks for working on this! Why are you using the same ID for Phoenix that Firefox uses? In the file names as well. https://gitlab.com/celenityy/Phoenix-Flatpak/-/blame/main/org.mozilla.firefox.systemconfig.yaml?ref_type=heads#L1 https://gitlab.com/celenityy/Phoenix-Flatpak/-/blame/main/.gitlab-ci.yml?ref_type=heads#L3 See https://codeberg.org/celenity/Phoenix/issues/5#issuecomment-3864069.

since that's where I'll host the repo - at least for the time being

Why do you host the repository on GitLab and not on Codeberg?

> since that's where I'll host the repo - at least for the time being Why do you host the repository on GitLab and not on Codeberg?
Author
Owner
Copy link

Why are you using the same ID for Phoenix that Firefox uses? In the file names as well.

Last time I tried building with org.mozilla.firefox.systemconfig.phoenix, IIRC it failed, and I found success with org.mozilla.firefox.systemconfig instead. I don't remember why it was failing though, I'll do some testing and try using org.mozilla.firefox.systemconfig.phoenix again.

Why do you host the repository on GitLab and not on Codeberg?

Well, two reasons. One: GitLab has CI/infra we can use (Also worth noting I got accepted into their open source program, which means we have GitLab Ultimate for free and can take advantage of some of their advanced/premium features and runners...), and two: As it stands, Codeberg is unfortunately far too unreliable, frequent downtime/outages and issues, which have caused users issues. We also download Phoenix's other assets (ex. the uBlock Origin config, search 'extensions', etc.) from GitLab for this same reason. I'd eventually like to move everything back to Codeberg, so hopefully with time and resources, they'll be able to improve.

> Why are you using the same ID for Phoenix that Firefox uses? In the file names as well. Last time I tried building with `org.mozilla.firefox.systemconfig.phoenix`, IIRC it failed, and I found success with `org.mozilla.firefox.systemconfig` instead. I don't remember why it was failing though, I'll do some testing and try using `org.mozilla.firefox.systemconfig.phoenix` again. > Why do you host the repository on GitLab and not on Codeberg? Well, two reasons. One: GitLab has CI/infra we can use *(Also worth noting I got accepted into their open source program, which means we have GitLab Ultimate for free and can take advantage of some of their advanced/premium features and runners...)*, and two: As it stands, Codeberg is unfortunately far too unreliable, frequent downtime/outages and issues, which have caused users issues. We also download Phoenix's other assets *(ex. the uBlock Origin config, search 'extensions', etc.)* from GitLab for this same reason. I'd eventually like to move everything back to Codeberg, so hopefully with time and resources, they'll be able to improve.

I'll do some testing and try using org.mozilla.firefox.systemconfig.phoenix again.

Thanks, I'm curious to hear what you can find out.
I cannot imagine how things can work with the same ID for two different installations (Firefox and Phoenix).

Well, two reasons. One: GitLab has CI/infra we can use

Looks like Codeberg has a CI infrastructure as well. https://docs.codeberg.org/ci/
Have you already tried it?

Is your installation currently running on a system or user level?

> I'll do some testing and try using org.mozilla.firefox.systemconfig.phoenix again. Thanks, I'm curious to hear what you can find out. I cannot imagine how things can work with the same ID for two different installations (Firefox and Phoenix). > Well, two reasons. One: GitLab has CI/infra we can use Looks like Codeberg has a CI infrastructure as well. https://docs.codeberg.org/ci/ Have you already tried it? Is your installation currently running on a system or user level?

What is the current state of development?

What is the current state of development?

The instructions are light on how to use phoenix. I just assumed I needed firefox installed (in my case as a system flatpak), and install phoenix side-by-side, then run firefox normally.

However, when I try to install the AUR package phoenix-flatpak on my system, but I'm getting this error:

❯ paru -S phoenix-flatpak
...
error: failed to commit transaction (conflicting files)
phoenix-flatpak: /var/lib/flatpak/app/org.mozilla.firefox/current exists in filesystem
phoenix-flatpak: /var/lib/flatpak/app/org.mozilla.firefox/current/active exists in filesystem
Errors occurred, no packages were upgraded.

@celenity wrote in #5 (comment):

Flatpak policies have officially been packaged & confirmed working: https://codeberg.org/celenity/Phoenix-Policies-Flatpak

The URL gives me a 404 so I'm unsure if there's more documentation that I'm missing to make this work.

The instructions are light on how to use phoenix. I just assumed I needed firefox installed (in my case as a system flatpak), and install phoenix side-by-side, then run firefox normally. However, when I try to install the AUR package `phoenix-flatpak` on my system, but I'm getting this error: ``` ❯ paru -S phoenix-flatpak ... error: failed to commit transaction (conflicting files) phoenix-flatpak: /var/lib/flatpak/app/org.mozilla.firefox/current exists in filesystem phoenix-flatpak: /var/lib/flatpak/app/org.mozilla.firefox/current/active exists in filesystem Errors occurred, no packages were upgraded. ``` @celenity wrote in https://codeberg.org/celenity/Phoenix/issues/5#issuecomment-2492946: > Flatpak policies have officially been packaged & confirmed working: https://codeberg.org/celenity/Phoenix-Policies-Flatpak The URL gives me a 404 so I'm unsure if there's more documentation that I'm missing to make this work.
Author
Owner
Copy link

Apologies for the late reply here.

@eIKpaSrnMoKI

What is the current state of development?

Unfortunately, I don't have much of an update here - what I can say is it looks like Flathub is definitely out, due to the package ID (see this GitHub issue for reference, another project encountered the same problem).

So we'll need to look into setting up our own Flatpak repo.


@quaff

However, when I try to install the AUR package phoenix-flatpak on my system, but I'm getting this error:

Thanks for sharing - will investigate. That isn't intended.

Apologies for the late reply here. @eIKpaSrnMoKI > What is the current state of development? Unfortunately, I don't have much of an update here - what I can say is it looks like Flathub is definitely out, due to the package ID *(see [this GitHub issue](https://github.com/flathub/flathub/pull/6625#issuecomment-2983251859) for reference, another project encountered the same problem)*. So we'll need to look into setting up our own Flatpak repo. ___ @quaff > However, when I try to install the AUR package phoenix-flatpak on my system, but I'm getting this error: Thanks for sharing - will investigate. That isn't intended.

@celenity wrote in #5 (comment):

Thanks for sharing - will investigate. That isn't intended.

I appreciate it! Also, I know it's not the right repo, but for brevity, dove-flatpak is also doing the same with Thunderbird. I can create an issue in the dove repo as well if you'd like to track these separately 🙏

@celenity wrote in https://codeberg.org/celenity/Phoenix/issues/5#issuecomment-10238132: > Thanks for sharing - will investigate. That isn't intended. I appreciate it! Also, I know it's not the right repo, but for brevity, dove-flatpak is also doing the same with Thunderbird. I can create an issue in the dove repo as well if you'd like to track these separately 🙏
Sign in to join this conversation.
No Branch/Tag specified
dev
pages
2026年07月08日.1
2026年06月10日.1
2026年05月21日.2
2026年05月21日.1
2026年04月27日.1
2026年03月31日.1
2026年03月30日.1
2026年02月23日.1
2026年02月16日.1
2026年01月21日.1
2025年12月23日.1
2025年11月27日.1
2025年11月07日.1
2025年10月26日.1
2025年10月12日.1
2025年10月03日.1
2025年09月07日.1
2025年08月06日.1
2025年07月30日.1
2025年07月11日.1
2025年06月24日.1
2025年06月12日.1
2025年06月10日.1
2025年06月06日.1
2025年06月02日.2
2025年06月02日.1
2025年05月11日.1
2025年04月27日.1
2025年04月15日.1
2025年04月11日.1
2025年04月02日.1
2025年03月25日.1
2025年03月20日.1
2025年03月12日.1
2025年03月05日.1
2025年02月28日.1
2025年02月21日.1
2024年02月18日.1
2025年02月14日.1
2025年02月13日.1
2025年02月01日.1
2025年01月30日.1
2025年01月27日.1
2025年01月24日.1
2025年01月22日.2
2025年01月22日.1
2025年01月20日.2
2025年01月20日.1
2025年01月19日.1
2025年01月14日.1
2025年01月13日.1
2025年01月12日.2
2025年01月12日.1
2025年01月06日.1
05January2025v1
20240103.2
20250103.1
20241229-1
20241225-1
20241216-1
20241211-1
20241204-1
20241203-1
31November2024v1
20241103-1
20240924-1
20240914-1
20240907-1
20240902-1
20240831-1
20240825-1
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
4 participants
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
celenity/Phoenix#5
Reference in a new issue
celenity/Phoenix
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?