Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 891771 - sec-policy/selinux-base-policy gives semodule error: Failed to resolve typeattributeset statement
Summary: sec-policy/selinux-base-policy gives semodule error: Failed to resolve typeat...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: SELinux (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: SE Linux Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-22 21:37 UTC by neko
Modified: 2023-04-09 15:20 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
sec-policy/selinux-base-policy emerge info and build log (emerge.log,42.33 KB, text/x-log)
2023-01-22 21:37 UTC, neko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description neko 2023-01-22 21:37:01 UTC
Created attachment 849059 [details]
sec-policy/selinux-base-policy emerge info and build log

I have issues installing a base system using the hardened-selinux-openrc profile, starting from a hardened-openrc base installation and following the steps of the conversion guide (wiki SELinux/Installation). I did it from scratch a few times to be sure I had done nothing wrong and followed correctly the guide.

Everything seems to work fine up to the sec-policy/selinux-base installation step. But the following one, the installation of sec-policy/selinux-base-policy gives some error:

```
Failed to resolve typeattributeset statement at /var/lib/selinux/strict/tmp/modules/400/mount/cil:108
Failed to resolve AST
semodule:  Failed!
```

Unsure if it was expected, I just ignored it and did the steps following. I noticed that every policy package was giving a similar (non-fatal for portage) semodule AST resolving error.

Finally, it became obvious something was going wrong when arriving at the relabeling step: /etc/selinux/*/contexts/files/file_contexts files are all missing.

I think the issue isn't specific to the profile conversion method. My first try was starting directly from a selinux enabled stage3 and I didn't get it working either. I didn't keep the log, but I'm quite sure I read the same errors.
Comment 1 Kenton Groombridge gentoo-dev 2023-04-09 15:20:14 UTC
Fixed in https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3dc00bbfff3c833f21aaf7cfd9e5407ccaf04352 (comment was too long).