-
Notifications
You must be signed in to change notification settings - Fork 4
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
refactor(default-flatpaks): Support multiple repos #146
Comments
Here is my idea for the format: - type: default-flatpaks
notify: true
system:
gnome-nightly:
url: https://nightly.gnome.org/gnome-nightly.flatpakrepo
install:
- org.gnome.Ptyxis.Devel
flathub:
url: https://dl.flathub.org/repo/flathub.flatpakrepo
install:
- org.mozilla.firefox The key (in this example its flathub and gnome-nightly) will become the name of the flatpak repo. If no URL is specified, the default will be flathub. |
Let me just brainstorm here real quick: # recipe.yml
modules:
- type: default-flatpaks # install flatpaks from a specified repo
notify: true # optional, default: false
scope: system # or user, both for installs and repo
# repo: # if this section is omitted, flathub is used by default
# url: https://dl.flathub.org/repo/flathub.flatpakrepo
# name: flathub
# title: Flathub (system)
install: # installed from the repo specified above, or flathub if not specified
- org.gnome.Loupe
# remove: # backwards-compatibility, may remove flatpak regardless of repository
- type: default-flatpaks # install flatpaks from a specified repo
notify: false
scope: user
install: # installed from flathub
- org.kde.kdenlive Transformed into # /usr/share/bluebuild/default-flatpaks/configuration.yml
- notify: true
scope: system
install:
- org.gnome.Loupe
- notify: false
scope: user
install:
- org.kde.kdenlive Which is iterated by the script ran by systemd. If necessary, |
It also needs to be thought about on how to not break existing configs in |
Ok, with the new structure I proposed above I don't see a way we could keep local user configs as we do now. I don't know how many people use those, but I've never heard of anyone using them. Maybe we could provide a way to disable the service units, maybe a systemctl command in the docs would do? I can't really picture a way we could support both local configuration and multiple configuration options for different repositories etc. effectively. IMO giving up local configs is a worthy trade-off, as this is supposed to be a part of system configuration. I'm not even sure about keeping the whole |
I didn't heard of anyone using local configs either, but it becomes useful when someone really needs it.
Maybe it's possible by strictly specifying repo URL & remote name in local-user config, to prevent this case in new local configs. If repo doesn't exist, add it & install flatpaks from that remote name. Old local configs would be invalid unfortunately, so some transition steps would be needed for local-users who utilized local config. But, this is maybe not enough & some more complex checks are needed.
Well, I think that refactored Bundling flatpaks inside ISO is possible, but it's still not enough to account all usecases, especially when image-maintainer intends to update flatpak list/repo or when local-user is rebasing to the image which utilizes So But I agree that module is not in the ideal state & maybe refactored |
Yeah, totally. In public images
These are the reasons I'd opt for just removing support for local configuration. One last way I could see working is just to write the flatpak list in |
I came up with this recipe, as I don't find the above recipes ideal: notify: true
system:
- repo-url: https://dl.flathub.org/repo/flathub.flatpakrepo
repo-name: flathub-system
repo-title: "Flathub (System)"
install-apps:
- sadasd.sf
- rtrsfgfg.sd
remove-apps:
- dfsf.ft
- rtwtert.ty
- repo-url: https://dl.something.org/repo/something.flatpakrepo
repo-name: something-system
repo-title: "Something (System)"
install-apps:
- application 1
- application 2
remove-apps:
- removal 1
- removal 2
user:
- repo-url: https://dl.flathub.org/repo/flathub.flatpakrepo
repo-name: flathub-system-2
repo-title: "Flathub (System-2)"
install-apps:
- uythj.sf
- fguy.sd
remove-apps:
- sfvcvx
- sfbvcbcbd.ty What are your opinions? |
I feel like we should keep the nested One thing I'm also not sure about is the removal being right next to installation and where the repo is declared, when in reality it can remove flatpaks from any repo. Maybe it could be lifted to be at the same level as |
Hmm, I don't know how would I include that while making it possible to define multiple repos in 1 module recipe call.
Agree, install/remove is better in this case.
I thought of including it in case user has installed 2 same application from different repos. But I don't know if that's possible, as I don't see in |
Ok, so: notify: true
system:
- repo:
url: https://dl.flathub.org/repo/flathub.flatpakrepo
name: flathub-system
title: "Flathub (System)"
install:
- sadasd.sf
- rtrsfgfg.sd
- repo:
url: https://dl.something.org/repo/something.flatpakrepo
name: something-system
title: "Something (System)"
install:
- application 1
- application 2
# and the same thing for user: here I just realized that |
@xynydev This recipe does look better.
I am this usecase. I install system flatpaks as essential applications, which will be used by all users. So it's for multi-user setup. With scope key, you would need to have 2 module calls to achieve this, while with system & user dropdown, you only need 1 module call |
But if the user flatpaks are in the image, they are installed for all users anyways, no? |
You're right, yes, I see now. So I guess that we can go with the |
Might want to investigate how this works. The dev is friendly too. https://codeberg.org/HeliumOS/flatpak-readonlyroot |
It seems that tool invokes classic I don't like this part:
But I like this part:
Great for flatpaks which you don't want user to uninstall. But, all of this is an unsupported behavior & I'm not comfortable with that. It can get unsupported in the future. |
Currently, there is no way to install flatpaks from multiple repos. If you specify multiple default-flatpak sections in your
recipe.yml
, only the last one will be used. One way to fix this is by changing therepo-url
key to accept an array of repos instead of just one, so users would only need a single default-flatpaks section for all their repos.The text was updated successfully, but these errors were encountered: