Bug 1882933 - can't build OSTree with disabled SELinux: Failed to find metadata key rpmostree.sepolicy (signature s)
Summary: can't build OSTree with disabled SELinux: Failed to find metadata key rpmostr...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm-ostree
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Colin Walters
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-26 17:20 UTC by Martin Pitt
Modified: 2021-11-30 16:25 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-11-30 16:25:04 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Martin Pitt 2020-09-26 17:20:19 UTC
Description of problem: I'd like to finally use systemd-homed. This does not yet have a proper SELinux profile (bug 1809878), so for the time being the only option is to disable SELinux.

So I started with adding this to my post script:

   sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config

This fails with

rpm-ostree version: 2020.5
No previous commit for pitti-desktop
Enabled rpm-md repositories: fedora-33 rpmfusion-free rpmfusion-free-updates fedora-33-updates fedora-33-updates-testing
Updating metadata for 'fedora-33'... done
rpm-md repo 'fedora-33'; generated: 2020-09-23T10:44:58Z
Updating metadata for 'rpmfusion-free'... done
rpm-md repo 'rpmfusion-free'; generated: 2020-09-26T10:38:47Z
Updating metadata for 'rpmfusion-free-updates'... done
rpm-md repo 'rpmfusion-free-updates'; generated: 2020-08-21T07:40:03Z
Updating metadata for 'fedora-33-updates'... done
rpm-md repo 'fedora-33-updates'; generated: 2018-02-20T19:18:14Z
Updating metadata for 'fedora-33-updates-testing'... done
rpm-md repo 'fedora-33-updates-testing'; generated: 2020-09-26T00:52:42Z
Importing rpm-md... done
Resolving dependencies... done
error: Loading pkgcache branch rpmostree/pkg/ModemManager-glib/1.14.2-1.fc33.x86__64: SELinux enabled, but no policy found

OK, fair enough -- So I added this to my tree file:

   selinux: false

With that, building my tree worked, but *only* when running my old deployment which still had SELinux enabled. Once I boot into the new deployment where SELinux is disabled, `rpm-ostree compose tree` fails with


  [... lots of packages ... ]
  zvbi-0.2.35-11.fc33.x86_64 (fedora-33)
Input state hash: 6e7e9d84b8c66aedfae3e7c743e0de69a61c58e9cd55899c876e805fa22ed284
Checking out packages... done
⠐ Running pre scripts... dnsmasq
dnsmasq.prein: Creating group dnsmasq with gid 981.
  [... lots of pre/post scripts ... ]
⠂ Running post scripts... mako
Running post scripts... done
Running posttrans scripts... 34 done
Writing rpmdb... done
error: Loading pkgcache branch rpmostree/pkg/ModemManager-glib/1.14.2-1.fc33.x86__64: Failed to find metadata key rpmostree.sepolicy (signature s)


Version-Release number of selected component (if applicable):
rpm-ostree-2020.5-1.fc33.x86_64

How reproducible: Always

Comment 1 Martin Pitt 2020-09-26 17:46:18 UTC
To work around this, I `rpm-ostree rollback`'ed to my old tree with SELinux enabled, replaced SELINUX=disabled with SELINUX=permissive, reverted the "selinux: false". But the build still fails the same way (Failed to find metadata key rpmostree.sepolicy (signature s)). Removing $CACHEDIR/repo-build/ and $CACHEDIR/cache/ does not help either. Apparently only removing the *entire* cache including /pkgcache-repo/ helps -- seems that this remembers the SELinux policy/labels? (This by it itself is not a bug, but it may help with debugging this).

Note: I don't keep a persistent --repo directory. That's a tmpfs during `rpm-ostree compose tree`, as I build the repo from scratch every time (it's fast enough with just a persistent cache). So the repo is not the place that "remembers" some SELinux state.

Comment 2 Ben Cotton 2021-11-04 17:31:38 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 3 Ben Cotton 2021-11-30 16:25:04 UTC
Fedora 33 changed to end-of-life (EOL) status on 2021-11-30. Fedora 33 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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