-
Notifications
You must be signed in to change notification settings - Fork 136
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
Add a chapter on "Deploying configuration" for sysadmins #377
Draft
federicomenaquintero
wants to merge
1
commit into
flatpak:master
Choose a base branch
from
federicomenaquintero:deploying-docs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
Deploying configuration | ||
======================= | ||
|
||
This chapter is for system administrators who deploy flatpak applications and | ||
their configuration data. | ||
|
||
For automated deployment of flatpak apps, you can call `flatpak | ||
install` as you normally would. | ||
|
||
To deploy an application's configuration, follow the instructions in this chapter. | ||
|
||
Configuration locations | ||
----------------------- | ||
|
||
Normally, applications follow the `XDG Base Directory Specification | ||
<https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html>` | ||
and are expected to place files in the paths passed to them in the environment | ||
variables ``$XDG_DATA_HOME``, ``$XDG_CONFIG_HOME``, ``$XDG_STATE_HOME``, | ||
``$XDG_CACHE_HOME``. | ||
|
||
Outside of flatpak, the default values for those variables are as follows: | ||
|
||
- ``XDG_DATA_HOME = ~/.local/share`` - user-specific data files. | ||
- ``XDG_CONFIG_HOME = ~/.config`` - user-specific configuration files. | ||
- ``XDG_STATE_HOME = ~/.local/state`` - user-specific data files. | ||
- ``XDG_CACHE_HOME = ~/.cache`` - user-specific, non-essential cached data. | ||
|
||
While running as a flatpak, however, the variables are set as follows. If the | ||
app is called ``org.example.AppName``, then the variables will be: | ||
|
||
- ``XDG_DATA_HOME = ~/.var/app/org.example.AppName/data`` | ||
- ``XDG_CONFIG_HOME = ~/.var/app.org.example.AppName/config`` | ||
- ``XDG_STATE_HOME = ~/.var/app/org.example.AppName/.local/state`` | ||
- ``XDG_CACHE_HOME = ~/.var/app/org.example.AppName/cache`` | ||
|
||
To maintain files in a configuration management system so that they can be | ||
deployed later, you should pay special attention to the ``XDG_CONFIG_HOME`` | ||
locations for applications. | ||
|
||
Applications that save user-created data may do so in ``XDG_DATA_HOME``; this | ||
should be part of your backups. | ||
|
||
Note that not all applications have a clean separation between configuration and | ||
state. You may want to see what each application puts in ``XDG_CONFIG_HOME`` | ||
versus ``XDG_STATE_HOME`` to decide what to persist. | ||
|
||
Overrides | ||
--------- | ||
|
||
Users may run ``flatpak override`` or a tool like ``com.github.tchx84.Flatseal`` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Possibly link to the utility on flathub here. |
||
to add or remove permissions from an application. These modifications are | ||
called **overrides**. | ||
|
||
- **App-specific overrides** go in a file called | ||
``.local/share/flatpak/overrides/org.example.AppName`` | ||
|
||
- **Global overrides** apply to all applications and go in a file called | ||
``.local/share/flatpak/overrides/global`` | ||
|
||
Both kinds of overrides can be persisted in a configuration management system. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,5 +26,6 @@ Contents | |
debugging | ||
publishing | ||
desktop-integration | ||
deploying | ||
tips-and-tricks | ||
reference |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe you could use
user-specific state data files
as the description to not only avoid confusion with the$XDG_DATA_HOME
description, but also match the XDG base directory specification description of$XDG_STATE_HOME
, what do you think?