RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1981776 - Flatpak cannot handle empty /var/lib/flatpak
Summary: Flatpak cannot handle empty /var/lib/flatpak
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: flatpak
Version: 9.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: beta
: ---
Assignee: Debarshi Ray
QA Contact: Martin Krajnak
URL:
Whiteboard:
: 2003810 2057584 (view as bug list)
Depends On:
Blocks: 2062806
TreeView+ depends on / blocked
 
Reported: 2021-07-13 11:36 UTC by Martin Krajnak
Modified: 2022-05-17 12:46 UTC (History)
8 users (show)

Fixed In Version: flatpak-1.12.5-2.el9_0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2062806 (view as bug list)
Environment:
Last Closed: 2022-05-17 12:32:02 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github flatpak flatpak issues 4111 0 None open Flatpak cannot handle empty /var/lib/flatpak 2021-07-13 11:49:42 UTC
Red Hat Product Errata RHBA-2022:2334 0 None None None 2022-05-17 12:32:15 UTC

Description Martin Krajnak 2021-07-13 11:36:33 UTC
Description of problem:
Since we are not shipping any remote with RHEL by default so far, every RHEL9 installation has empty /var/lib/flatpak.

This causes 2 kinds of issues:

1. Every start of gnome-software greets users with error message:
Sorry, Something went wrong:
error: Creating repo: mkdirat: Permission denied

2. The same error is preventing users to make operation with added --user remotes:
$ flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
$ flatpak remote-info flathub 
error: Creating repo: mkdirat: Permission denied
$ flatpak remote-ls flathub 
error: Creating repo: mkdirat: Permission denied
$ flatpak remote-delete flathub
error: Creating repo: mkdirat: Permission denied
   
Version-Release number of selected component (if applicable):
flatpak-1.10.2-4.el9.x86_64

How reproducible:
always

Additional info:
I reproduced this with Fedora 35 (https://github.com/flatpak/flatpak/issues/4111#issuecomment-878226675) as well. 

As mentioned in upstream issue running "# flatpak repair" populates /var/lib/flatpak and solves the situation.

Comment 1 Debarshi Ray 2021-09-21 23:14:00 UTC
*** Bug 2003810 has been marked as a duplicate of this bug. ***

Comment 2 Timothée Ravier 2022-03-01 14:54:14 UTC
*** Bug 2057584 has been marked as a duplicate of this bug. ***

Comment 3 Timothée Ravier 2022-03-01 14:59:39 UTC
It looks like this is only triggered when the 'repo' subfolder is missing.
Two short term workarounds available:
- Do not create /var/lib/flatpak by default
- Create /var/lib/flatpak/repo by default

Comment 11 Debarshi Ray 2022-03-07 22:39:52 UTC
Merge request: https://gitlab.com/redhat/centos-stream/rpms/flatpak/-/merge_requests/13

Comment 18 Debarshi Ray 2022-03-10 16:17:10 UTC
Built flatpak-1.12.5-2.el9_0:
https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=43719286

Comment 19 Martin Krajnak 2022-03-14 07:53:45 UTC
flatpak-1.12.5-2.el9_0.x86_64

1. I tried both reproducers in the bug Description and the error message is no longer there.

2. Removing contents of /var/lib/flatpak/ does not cause the error message to occur.

Comment 23 errata-xmlrpc 2022-05-17 12:32:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (new packages: flatpak), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:2334


Note You need to log in before you can comment on or make changes to this bug.