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

chore: Build flatpak package #4168

Closed
wants to merge 1 commit into from
Closed

chore: Build flatpak package #4168

wants to merge 1 commit into from

Conversation

twpayne
Copy link
Owner

@twpayne twpayne commented Dec 30, 2024

Refs #1800.

This PR attempts to build a Flatpak package of chezmoi.

As far as I can tell, Flatpak in its current form is incompatible with chezmoi:

  • Flatpak's sandbox is too restrictive. Even with full filesystem access, chezmoi cannot execute other processes, which breaks password manager integration, encryption, and several template functions.
  • Flatpak mangles XDG directory specification directories like $XDG_DATA_HOME, making Flatpak-installed chezmoi incompatible with conventionally-installed chezmoi.

There are likely other problems.

This is a draft PR for discussion.

@twpayne
Copy link
Owner Author

twpayne commented Dec 30, 2024

The CI failure seems to be because the available version of flatpak-builder on Ubuntu 20.04 (used for release building because its old version of glibc means the compiled binaries run on a wide range of systems):

Flatpak 1.6.5
flatpak-builder 1.0.10
...
Initializing build dir
Committing stage init to cache
Starting build of io.chezmoi.chezmoi
========================================================================
Building module chezmoi in /home/runner/work/chezmoi/chezmoi/.flatpak-builder/build/chezmoi-1
========================================================================
Running: install -Dm755 chezmoi /app/bin/chezmoi
Committing stage build-chezmoi to cache
Cleaning up
Committing stage cleanup to cache
Finishing app
error: Unknown filesystem location host-etc, valid locations are: host, home, xdg-*[/…], ~/dir, /dir
Error: Child process exited with code 1

@twpayne
Copy link
Owner Author

twpayne commented Dec 30, 2024

Following flatpak/flatpak#5999 (comment), it seems that chezmoi would need to bundle all applications it needs (including git, gpg, age, nvim, emacs, code, all password manager CLIs, etc.) which is neither desirable nor feasible, so I'll close this as "won't fix" for now.

@twpayne twpayne closed this Dec 30, 2024
@twpayne twpayne added the won't implement/fix This will not be worked on label Dec 30, 2024
@twpayne twpayne deleted the flatpak branch December 31, 2024 13:05
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
do not merge Do not merge won't implement/fix This will not be worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant