Bug 2070942

Summary: Flatpak update failure
Product: [Fedora] Fedora Reporter: Jan <copper_fin>
Component: dnfAssignee: rpm-software-management
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 36CC: daniel.mach, jmracek, jrohel, mblaha, mhatina, packaging-team-maint, pkratoch, pmatilai, rpm-software-management, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-04-02 07:40:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan 2022-04-01 11:33:45 UTC
Description of problem:
Updating flatpack fails


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. dnf update
2.
3.

Actual results:
Downloading Packages:
flatpak-1.12.7-1.fc36.x86_64.rpm                                                        3.9 MB/s | 1.6 MB     00:00    
------------------------------------------------------------------------------------------------------------------------
Total                                                                                   1.4 MB/s | 1.6 MB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                1/1 
  Running scriptlet: flatpak-1.12.7-1.fc36.x86_64                                                                   1/2 
  Upgrading        : flatpak-1.12.7-1.fc36.x86_64                                                                   1/2 
error: lsetfilecon: (/usr/libexec/flatpak-system-helper;6246e2be, system_u:object_r:flatpak_helper_exec_t:s0) Invalid argument
error: Plugin selinux: hook fsm_file_prepare failed

Error unpacking rpm package flatpak-1.12.7-1.fc36.x86_64
  Verifying        : flatpak-1.12.7-1.fc36.x86_64                                                                   1/2 
  Verifying        : flatpak-1.12.7-1.fc35.x86_64                                                                   2/2 



Expected results:
update goes thru

Additional info:

Comment 1 Panu Matilainen 2022-04-01 13:21:33 UTC
This is unlikely to be a dnf issue, the error takes place on rpm level but this is unlikely to be an rpm issue either as it hasn't changed at all recently. More likely something in the selinux side of things, but it needs to be tracked somewhere.

What does 'rpm -q libselinux selinux-policy' say on that system?

Comment 2 Panu Matilainen 2022-04-01 13:23:46 UTC
Actually, make that 'rpm -q libselinux selinux-policy container-selinux'

Comment 3 Jan 2022-04-01 17:51:19 UTC
rpm -q libselinux selinux-policy container-selinux

libselinux-3.3-4.fc36.x86_64
libselinux-3.3-4.fc36.i686
selinux-policy-36.5-1.fc36.noarch
container-selinux-2.181.0-1.fc36.noarch

Comment 4 Jan 2022-04-02 07:36:51 UTC
Might have something to do with older version of files.

Fixed with:

semodule -X 200 -r snappy -r container  -X 300 -r my-chown -X 400 -r my-chown -r my-systemctl
dnf reinstall -y container-selinux

Comment 5 Jan 2022-04-02 07:40:38 UTC

*** This bug has been marked as a duplicate of bug 2056303 ***