-
-
Notifications
You must be signed in to change notification settings - Fork 390
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 cannot handle empty /var/lib/flatpak #4111
Comments
I'm also hitting this issue. My setup is a little different. My Flatpak system installation lives in My current workaround is to package an empty flatpak installation, created with |
@tinywrkb that's what However, when /var/lib/flatpak exists but is empty, all that breaks |
It is already the case that when we are using ALL_DIRS, we always combine it with OPTIONAL_REPO, meaning no need to populate empty installations. ALL_DIRS is used for commands that iterate through all known installations to enumerate apps/runtimes, such as `flatpak run` and `flatpak list`; for these commands, it's reasonable to say that if the installation does not have a libostree repository, then that's equivalent to it having a libostree repository with no apps and no runtimes. Make this happen automatically if forgotten. For STANDARD_DIRS, we were inconsistent about this: `flatpak remote-list` had OPTIONAL_REPO, but the other commands did not. STANDARD_DIRS is used for `flatpak create-usb`, and for all the commands that manipulate remotes. For the commands that manipulate remotes, it seems reasonable to say that if an installation has no libostree repository and we are unable to create one, then that's equivalent to an installation with a libostree repository but no remotes. Similarly, for create-usb, an installation where we are unable to create a libostree repository seems like it should be equivalent to an installation whose libostree repository does not contain any of the refs we are interested in. Resolves: flatpak#4111 Signed-off-by: Simon McVittie <[email protected]>
#4732 should resolve at least the parts of this that interact with the
I don't think this is necessarily doing what you think it's doing.
There are already various harmless commands that have this as a side-effect. Most commands will already initialize the user installation in If you are root, most commands will already initialize the system installation. For example, the Debian packaging uses If you are not root, the first operation that writes to the system installation, such as One thing that doesn't currently exist (I don't think) is a way for non-root users to trigger inclusion of
I think
Yes, see #4732.
It's not clear to me whether this has already been resolved, or whether it will be resolved by #4732, or whether it's a separate libflatpak issue not resolved by #4732, or whether this is something that will have to be looked at by gnome-software developers. |
It is already the case that when we are using ALL_DIRS, we always combine it with OPTIONAL_REPO, meaning no need to populate empty installations. ALL_DIRS is used for commands that iterate through all known installations to enumerate apps/runtimes, such as `flatpak run` and `flatpak list`; for these commands, it's reasonable to say that if the installation does not have a libostree repository, then that's equivalent to it having a libostree repository with no apps and no runtimes. Make this happen automatically if forgotten. For STANDARD_DIRS, we were inconsistent about this: `flatpak remote-list` had OPTIONAL_REPO, but the other commands did not. STANDARD_DIRS is used for `flatpak create-usb`, and for all the commands that manipulate remotes. For the commands that manipulate remotes, it seems reasonable to say that if an installation has no libostree repository and we are unable to create one, then that's equivalent to an installation with a libostree repository but no remotes. Similarly, for create-usb, an installation where we are unable to create a libostree repository seems like it should be equivalent to an installation whose libostree repository does not contain any of the refs we are interested in. Resolves: flatpak#4111 Signed-off-by: Simon McVittie <[email protected]>
Updated version of #4732 resolves that, as well:
|
It is already the case that when we are using ALL_DIRS, we always combine it with OPTIONAL_REPO, meaning no need to populate empty installations. ALL_DIRS is used for commands that iterate through all known installations to enumerate apps/runtimes, such as `flatpak run` and `flatpak list`; for these commands, it's reasonable to say that if the installation does not have a libostree repository, then that's equivalent to it having a libostree repository with no apps and no runtimes. Make this happen automatically if forgotten. For STANDARD_DIRS, we were inconsistent about this: `flatpak remote-list` had OPTIONAL_REPO, but the other commands did not. STANDARD_DIRS is used for `flatpak create-usb`, and for all the commands that manipulate remotes. For the commands that manipulate remotes, it seems reasonable to say that if an installation has no libostree repository and we are unable to create one, then that's equivalent to an installation with a libostree repository but no remotes. Similarly, for create-usb, an installation where we are unable to create a libostree repository seems like it should be equivalent to an installation whose libostree repository does not contain any of the refs we are interested in. Resolves: flatpak#4111 Signed-off-by: Simon McVittie <[email protected]>
It is already the case that when we are using ALL_DIRS, we always combine it with OPTIONAL_REPO, meaning no need to populate empty installations. ALL_DIRS is used for commands that iterate through all known installations to enumerate apps/runtimes, such as `flatpak run` and `flatpak list`; for these commands, it's reasonable to say that if the installation does not have a libostree repository, then that's equivalent to it having a libostree repository with no apps and no runtimes. Make this happen automatically if forgotten. For STANDARD_DIRS, we were inconsistent about this: `flatpak remote-list` had OPTIONAL_REPO, but the other commands did not. STANDARD_DIRS is used for `flatpak create-usb`, and for all the commands that manipulate remotes. For the commands that manipulate remotes, it seems reasonable to say that if an installation has no libostree repository and we are unable to create one, then that's equivalent to an installation with a libostree repository but no remotes. Similarly, for create-usb, an installation where we are unable to create a libostree repository seems like it should be equivalent to an installation whose libostree repository does not contain any of the refs we are interested in. Resolves: flatpak#4111 Signed-off-by: Simon McVittie <[email protected]>
It is already the case that when we are using ALL_DIRS, we always combine it with OPTIONAL_REPO, meaning no need to populate empty installations. ALL_DIRS is used for commands that iterate through all known installations to enumerate apps/runtimes, such as `flatpak run` and `flatpak list`; for these commands, it's reasonable to say that if the installation does not have a libostree repository, then that's equivalent to it having a libostree repository with no apps and no runtimes. Make this happen automatically if forgotten. For STANDARD_DIRS, we were inconsistent about this: `flatpak remote-list` had OPTIONAL_REPO, but the other commands did not. STANDARD_DIRS is used for `flatpak create-usb`, and for all the commands that manipulate remotes. For the commands that manipulate remotes, it seems reasonable to say that if an installation has no libostree repository and we are unable to create one, then that's equivalent to an installation with a libostree repository but no remotes. Similarly, for create-usb, an installation where we are unable to create a libostree repository seems like it should be equivalent to an installation whose libostree repository does not contain any of the refs we are interested in. Resolves: #4111 Signed-off-by: Simon McVittie <[email protected]>
- Copy 1.12.5 entry from the flatpak-1.12.x branch, remove changes that were in that release from the 1.13.1 entry - Fix typos - Add issue/PR numbers - Mention #4111 being fixed
It is already the case that when we are using ALL_DIRS, we always combine it with OPTIONAL_REPO, meaning no need to populate empty installations. ALL_DIRS is used for commands that iterate through all known installations to enumerate apps/runtimes, such as `flatpak run` and `flatpak list`; for these commands, it's reasonable to say that if the installation does not have a libostree repository, then that's equivalent to it having a libostree repository with no apps and no runtimes. Make this happen automatically if forgotten. For STANDARD_DIRS, we were inconsistent about this: `flatpak remote-list` had OPTIONAL_REPO, but the other commands did not. STANDARD_DIRS is used for `flatpak create-usb`, and for all the commands that manipulate remotes. For the commands that manipulate remotes, it seems reasonable to say that if an installation has no libostree repository and we are unable to create one, then that's equivalent to an installation with a libostree repository but no remotes. Similarly, for create-usb, an installation where we are unable to create a libostree repository seems like it should be equivalent to an installation whose libostree repository does not contain any of the refs we are interested in. Resolves: flatpak#4111 Signed-off-by: Simon McVittie <[email protected]> (cherry picked from commit 3f144d1)
It is already the case that when we are using ALL_DIRS, we always combine it with OPTIONAL_REPO, meaning no need to populate empty installations. ALL_DIRS is used for commands that iterate through all known installations to enumerate apps/runtimes, such as `flatpak run` and `flatpak list`; for these commands, it's reasonable to say that if the installation does not have a libostree repository, then that's equivalent to it having a libostree repository with no apps and no runtimes. Make this happen automatically if forgotten. For STANDARD_DIRS, we were inconsistent about this: `flatpak remote-list` had OPTIONAL_REPO, but the other commands did not. STANDARD_DIRS is used for `flatpak create-usb`, and for all the commands that manipulate remotes. For the commands that manipulate remotes, it seems reasonable to say that if an installation has no libostree repository and we are unable to create one, then that's equivalent to an installation with a libostree repository but no remotes. Similarly, for create-usb, an installation where we are unable to create a libostree repository seems like it should be equivalent to an installation whose libostree repository does not contain any of the refs we are interested in. Resolves: flatpak#4111 Signed-off-by: Simon McVittie <[email protected]> (cherry picked from commit 3f144d1)
It is already the case that when we are using ALL_DIRS, we always combine it with OPTIONAL_REPO, meaning no need to populate empty installations. ALL_DIRS is used for commands that iterate through all known installations to enumerate apps/runtimes, such as `flatpak run` and `flatpak list`; for these commands, it's reasonable to say that if the installation does not have a libostree repository, then that's equivalent to it having a libostree repository with no apps and no runtimes. Make this happen automatically if forgotten. For STANDARD_DIRS, we were inconsistent about this: `flatpak remote-list` had OPTIONAL_REPO, but the other commands did not. STANDARD_DIRS is used for `flatpak create-usb`, and for all the commands that manipulate remotes. For the commands that manipulate remotes, it seems reasonable to say that if an installation has no libostree repository and we are unable to create one, then that's equivalent to an installation with a libostree repository but no remotes. Similarly, for create-usb, an installation where we are unable to create a libostree repository seems like it should be equivalent to an installation whose libostree repository does not contain any of the refs we are interested in. Resolves: flatpak#4111 Signed-off-by: Simon McVittie <[email protected]> (cherry picked from commit 3f144d1)
It is already the case that when we are using ALL_DIRS, we always combine it with OPTIONAL_REPO, meaning no need to populate empty installations. ALL_DIRS is used for commands that iterate through all known installations to enumerate apps/runtimes, such as `flatpak run` and `flatpak list`; for these commands, it's reasonable to say that if the installation does not have a libostree repository, then that's equivalent to it having a libostree repository with no apps and no runtimes. Make this happen automatically if forgotten. For STANDARD_DIRS, we were inconsistent about this: `flatpak remote-list` had OPTIONAL_REPO, but the other commands did not. STANDARD_DIRS is used for `flatpak create-usb`, and for all the commands that manipulate remotes. For the commands that manipulate remotes, it seems reasonable to say that if an installation has no libostree repository and we are unable to create one, then that's equivalent to an installation with a libostree repository but no remotes. Similarly, for create-usb, an installation where we are unable to create a libostree repository seems like it should be equivalent to an installation whose libostree repository does not contain any of the refs we are interested in. Resolves: #4111 Signed-off-by: Simon McVittie <[email protected]> (cherry picked from commit 3f144d1)
Linux distribution and version
carbonOS 2021.1 (my own in-dev distro)
Flatpak version
1.9.2
Description of the problem
I'm trying to have systemd-tmpfiles do some fs-related setup on /var/lib/flatpak. Basically, I have tmpfiles A) create a btrfs subvolume at /var/lib/flatpak and then B) enable compression on /var/lib/flatpak. Doing it this way ensures that whatever flatpak ends up writing to there gets compressed. However, flatpak breaks in various ways whenever /var/lib/flatpak exists and is empty. It seems like something goes wrong with the system helper (see example below).
My best guess that some parts of flatpak just check for the existence of /var/lib/flatpak and then assume that flatpak is set-up, while other parts actually go through and try to initialize the contents of /var/lib/flatpak and fail due to lack of privileges.
Steps to reproduce
Similar problems also occur with
flatpak install
, with errors like "Ref not found" or other permission errors. Runningflatpak repair
with root privilege does, indeed, work, and also fixes the rest of Flatpak. However, when/var/lib/flatpak
does not exist at all, no such issues occur: flatpak repair does not need root access and flatpak install just works without repairing.The text was updated successfully, but these errors were encountered: