Repository navigation
Migrate to Flatpak pre-install #783
Description
Activity
I wonder if this should be shipped in default-settings actually
Reacted by Ryo NakanoI wonder if this should be shipped in default-settings actually
I agree with this. Having files in the os repository makes it impossible to update the .preinstall files through system updates.
Can't be merged for now as I mentioned above but I opened a PR in default-settings: elementary/default-settings#364
Reacted by Danielle Foré- addedStatus: BlockedSomething else needs to be done before this can be fixedSomething else needs to be done before this can be fixedPriority: WishlistNot a priority, but something that might be niceNot a priority, but something that might be nice
on Jul 4, 2026 I confirmed flatpak 1.18.0 packaged for Stonking can be built successfully without modification on Ubuntu 26.04 LTS, so we can pull it if we want to resolve this task in OS 9.
user@ubuntu-26:~/work$ flatpak --version Flatpak 1.18.0 user@ubuntu-26:~/work$ flatpak preinstall --help Usage: flatpak preinstall [OPTION…] - Install flatpaks that are part of the operating system Help Options: -h, --help Show help options Application Options: -u, --user Work on the user installation --system Work on the system-wide installation (default) --installation=NAME Work on a non-default system-wide installation --no-pull Don't pull, only install from local cache --no-deploy Don't deploy, only download to local cache --no-related Don't install related refs --no-deps Don't verify/install runtime dependencies --no-static-deltas Don't use static deltas --include-sdk Additionally install the SDK used to build the given refs --include-debug Additionally install the debug info for the given refs and their dependencies -y, --assumeyes Automatically answer yes for all questions --reinstall Uninstall first if already installed --noninteractive Produce minimal output and don't ask questions --sideload-repo=PATH Use this local repo for sideloads -v, --verbose Show debug information, -vv for more detail --ostree-verbose Show OSTree debug information user@ubuntu-26:~/work$ cat /etc/os-release PRETTY_NAME="Ubuntu 26.04 LTS" NAME="Ubuntu" VERSION_ID="26.04" VERSION="26.04 LTS (Resolute Raccoon)" VERSION_CODENAME=resolute ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=resolute LOGO=ubuntu-logo user@ubuntu-26:~/work$What I did:
sudo apt install -yU sbuild mmdebstrap git-buildpackage ubuntu-dev-tools mkdir work cd work/ pull-lp-source flatpak stonking sbuild -d resolute flatpak_1.18.0-1.dsc sudo apt install ./*.debReacted by Danielle Foré, Leo and JumpyVi7 remaining items
- linked a pull request that will close this issueRemove flatpak apps installed via flatpak preinstall #163
on Aug 14, 2026 - linked a pull request that will close this issueUse flatpak preinstall for system Flatpak apps #364
on Aug 14, 2026 - linked a pull request that will close this issuedeb-packaging: Changes for flatpak-preinstall #367
on Aug 14, 2026 - linked a pull request that will close this issueMigrate to debhelper 13 #366
on Aug 14, 2026 Another issue found:
elementary-default-settingspackage overwrites whatflatpakpackage provides under/var/lib/flatpak/repo/, causingflatpak update,flatpak preinstall, etc. isn't working.user@elementary-9-daily:~$ sudo apt install --reinstall elementary-default-settings Installing: elementary-default-settings Installing dependencies: flatpak Suggested packages: malcontent-gui Summary: Upgrading: 0, Installing: 2, Removing: 0, Not Upgrading: 0 Download size: 1,620 kB Space needed: 7,078 kB / 52.8 GB available Continue? [Y/n] Get:1 https://ppa.launchpadcontent.net/elementary-os/os-patches/ubuntu resolute/main amd64 flatpak amd64 1.18.1-1+elementary3~ubuntu9.1 [1,606 kB] Get:2 https://ppa.launchpadcontent.net/elementary-os/daily/ubuntu resolute/main amd64 elementary-default-settings all 8.1.1+r457+pkg326~daily~ubuntu9.1 [14.0 kB] Fetched 1,620 kB in 3s (480 kB/s) Selecting previously unselected package flatpak. (Reading database… 150546 files and directories currently installed.) Preparing to unpack …/flatpak_1.18.1-1+elementary3~ubuntu9.1_amd64.deb… Unpacking flatpak (1.18.1-1+elementary3~ubuntu9.1)… Selecting previously unselected package elementary-default-settings. Preparing to unpack …/elementary-default-settings_8.1.1+r457+pkg326~daily~ubuntu9.1_all.deb… Unpacking elementary-default-settings (8.1.1+r457+pkg326~daily~ubuntu9.1)… Setting up flatpak (1.18.1-1+elementary3~ubuntu9.1)… error: While opening repository /var/lib/flatpak/repo: opening repo: opendir(objects): No such file or directory Setting up elementary-default-settings (8.1.1+r457+pkg326~daily~ubuntu9.1)… Created symlink '/etc/systemd/system/multi-user.target.wants/flatpak-preinstalld.service' → '/usr/lib/systemd/system/flatpak- preinstalld.service'. Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 148. Processing triggers for dbus (1.16.2-2ubuntu4)… Processing triggers for desktop-file-utils (0.28-1build1)… Processing triggers for doc-base (0.11.2build1)… Processing 1 added doc-base file... Processing triggers for man-db (2.13.1-1build1)… Processing triggers for libglib2.0-0t64:amd64 (2.88.0-1)… user@elementary-9-daily:~$ flatpak update error: While opening repository /var/lib/flatpak/repo: opening repo: opendir(objects): No such file or directory user@elementary-9-daily:~$ flatpak preinstall -y error: While opening repository /var/lib/flatpak/repo: opening repo: opendir(objects): No such file or directory user@elementary-9-daily:~$ ls /var/lib/flatpak/repo/ appcenter.trustedkeys.gpg config flathub.trustedkeys.gpg user@elementary-9-daily:~$c.f. when installing only flatpak,
/var/lib/flatpak/repo/contains necessary subdirectories likeobjectsandtmp:user@elementary-9-daily:~$ sudo apt install --reinstall flatpak Installing: flatpak Suggested packages: malcontent-gui Summary: Upgrading: 0, Installing: 1, Removing: 0, Not Upgrading: 0 Download size: 1,606 kB Space needed: 6,979 kB / 52.8 GB available Get:1 https://ppa.launchpadcontent.net/elementary-os/os-patches/ubuntu resolute/main amd64 flatpak amd64 1.18.1-1+elementary3~ubuntu9.1 [1,606 kB] Fetched 1,606 kB in 3s (516 kB/s) Selecting previously unselected package flatpak. (Reading database… 150546 files and directories currently installed.) Preparing to unpack …/flatpak_1.18.1-1+elementary3~ubuntu9.1_amd64.deb… Unpacking flatpak (1.18.1-1+elementary3~ubuntu9.1)… Setting up flatpak (1.18.1-1+elementary3~ubuntu9.1)… Processing triggers for man-db (2.13.1-1build1)… Processing triggers for dbus (1.16.2-2ubuntu4)… Processing triggers for doc-base (0.11.2build1)… Processing 1 added doc-base file... user@elementary-9-daily:~$ ls /var/lib/flatpak/repo/ config extensions objects refs state tmp user@elementary-9-daily:~$Probably we need to provide our configuration files as fragment files.
- linked a pull request that will close this issueflatpak: Use drop-in flatpakrepo for system-wide remotes #368
on Aug 14, 2026 - linked a pull request that will close this issuedeb-packaging: Use drop-in flatpakrepo for system-wide remotes #369
on Aug 14, 2026 However, I feel like that would be automatically done when the default-settings packages is installed into the image.
Tested with
elementaryos-9.0-daily-amd64.20260815.iso. Flatpak apps are preinstalled in the installed session. However, they're not in the live session and they're installed when booted instead:Starting lightdm.service - Light Display Manager... Starting plymouth-quit-wait.servic…d until boot process finishes up... NetworkManager-wait-online.service [ OK ] Finished NetworkManager-wait-onlin…vice - Network Manager Wait Online. [ OK ] Reached target network-online.target - Network is Online. Starting flatpak-preinstalld.service - Preinstall Flatpaks... [ OK ] Finished malcontent-webd-update.se…ntal Controls Web Filtering Daemon. malcontent-webd-update.service ModemManager.service [ OK ] Started ModemManager.service - Modem Manager. cups.service [ OK ] Started cups.service - CUPS Scheduler. elementary OS 9 Early Access elementary ttyS0 elementary login: elementary Welcome to elementary OS 9 Early Access (GNU/Linux 7.0.0-29-generic x86_64) Built on Ubuntu 26.04 LTS Website: https://elementary.io The programs included with the elementary OS system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. elementary OS comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. elementary@elementary:~$ systemctl status flatpak-preinstalld.service ● flatpak-preinstalld.service - Preinstall Flatpaks Loaded: loaded (/usr/lib/systemd/system/flatpak-preinstalld.service; enabled; preset: enabled) Active: activating (start) since Sat 2026-08-15 01:38:50 UTC; 22s ago Job: 178 Invocation: b04231ebe66c453a96cf639be7e97fc3 Docs: man:flatpak-preinstall(1) Process: 1433 ExecStart=mkdir -p /var/lib/flatpak/ (code=exited, status=0/SUCCESS) Main PID: 1439 (flatpak) Tasks: 11 (limit: 7891) Memory: 1.9G (peak: 1.9G) CPU: 21.111s CGroup: /system.slice/flatpak-preinstalld.service └─1439 /usr/bin/flatpak preinstall -y Aug 15 01:39:11 elementary flatpak[1439]: Installing 6/24… 0% 0 bytes/s Aug 15 01:39:12 elementary flatpak[1439]: Installing 6/24… ███████▏ 36% Aug 15 01:39:12 elementary flatpak[1439]: libostree pull from 'appcenter' for app/io.elementary.camera/x86_64/stable complete security: GPG: summary+commit security: SIGN: disabled http: TLS delta: parts: 1 loose: 3 transfer: secs: 0 size: 475.2 kB Aug 15 01:39:12 elementary flatpak[1439]: Installing 6/24… ████████████████████ 100% Aug 15 01:39:12 elementary flatpak[1439]: system: Pulled app/io.elementary.camera/x86_64/stable from appcenter Aug 15 01:39:12 elementary flatpak[1439]: system: Installed app/io.elementary.camera/x86_64/stable from appcenter Aug 15 01:39:12 elementary flatpak[1439]: Installing 7/24… Aug 15 01:39:12 elementary flatpak[1439]: Installing 7/24… 0% 0 bytes/s Aug 15 01:39:12 elementary flatpak[1439]: Installing 7/24… ▌ 3% Aug 15 01:39:13 elementary flat- linked a pull request that will close this issueflatpak: Explicitly preinstall GL runtime #370
on Aug 16, 2026 Closing as completed. While it is ideal that flatpak-preinstalld.service runs when installing the default-settings package instead of first boot time, resulting the default Flatpak apps presents in the early starts up, it should be worked in another issue if we really want to do that.
Leaving a note that I'm going to delete
flatpak-stonking-patchedandflatpak-stonkingbranches from os-patches repository and theflatpak-stonkingrecipe from Launchpad, because we're now importing flatpak binaries from Flatpak PPA into our os-patches PPA for the sake of elementary/os-patches#364 and those branches/recipes are no longer used.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
What Happened?
Currently we're using deb packages to pull in flatpak packages so that we have a way to manage removing or changing them
Steps to Reproduce
Check packages for:
Expected Behavior
We should migrate these to flatpak pre-install: https://docs.flatpak.org/en/latest/flatpak-command-reference.html#flatpak-preinstall