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

flatpak: Use /usr/flatpak/remotes.d to enable Flathub by default #5031

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

malfisya
Copy link
Member

@malfisya malfisya commented Feb 11, 2025

Summary

Use /usr/flatpak/remotes.d to enable Flathub by default instead of systemd services. The most obvious benefits is it doesn't need active internet connection anymore.

Resolves #4033

Test Plan

  • Spin a smoketest ISO :
    • Make sure Flathub is enabled in live environment
    • Make sure Flathub is enabled on first boot after install
  • Install on production machine with Flathub already enabled, It doesn't affect it with a few observations:
    • If Flathub is already enabled, it will not add it again.
    • We can ship multiple remotes.
    • If a remote is added and then manually removed by user (flatpak remote-delete), it will not get added again even the .flatpakrepo file still exist /usr/share/flatpak/remotes.d. To add the said remote, user have to manually add it again (flatpak remote-add).
    • Removing .flatpakrepo file from /usr/share/flatpak/remotes.d doesn't remove the remote from flatpak. It still need to be removed manually by user.

Checklist

  • Package was built and tested against unstable
  • This change could gainfully be listed in the weekly sync notes once merged

@EbonJaeger EbonJaeger added the Topic: Sync Notes This PR/Issue can be highlighted in sync notes label Feb 12, 2025
@EbonJaeger
Copy link
Member

Does this affect anything if Flathub is already added on an installed system?

**Summary**

Use /usr/flatpak/remotes.d to enable Flathub by default instead of systemd services
@malfisya
Copy link
Member Author

Here is my observation:

  • If Flathub is already enabled, it will not add it again.
  • We can ship multiple remotes.
  • If a remote is added and then manually removed by user (flatpak remote-delete), it will not get added again even the .flatpakrepo file still exist /usr/share/flatpak/remotes.d. To add the said remote, user have to manually add it again (flatpak remote-add).
  • Removing .flatpakrepo file from /usr/share/flatpak/remotes.d doesn't remove the remote from flatpak. It still need to be removed manually by user.

I think all of this behavior are quite sane.

Copy link
Member

@EbonJaeger EbonJaeger left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! Feel free to push it, I've already switched off for the night.

@malfisya malfisya merged commit 2713d5d into main Feb 12, 2025
1 check passed
@malfisya malfisya deleted the flatpak branch February 12, 2025 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Topic: Sync Notes This PR/Issue can be highlighted in sync notes
Projects
Status: Done
2 participants