Building RPMs With SELinux Home » CentOS » Building RPMs With SELinux January 22, 2015 Andrew Holway CentOS 1 Comment Hello, Im trying to find some good info on building RPMs that set the correct SELinux contexts for the installed packages. Any ideas? Thanks, Andrew
January 22, 2015 Andrew Holway CentOS 1 Comment Hello, Im trying to find some good info on building RPMs that set the correct SELinux contexts for the installed packages. Any ideas? Thanks, Andrew
rpm should do this by itself. If the policy file is installed before the rpm is layed down. You could consider two package foobar-policy.rpm foobar.rpm then make foobar rely on foobar-policy.rpm But we usually install rpm in post install of the package and then run restorecon on the content. This presentation has some rpm examples. https://fedorapeople.org/~dwalsh/SELinux/Presentations/SummitSELinuxEnterprise.odp
One thought on - Building RPMs With SELinux
rpm should do this by itself.
If the policy file is installed before the rpm is layed down.
You could consider two package
foobar-policy.rpm foobar.rpm then make foobar rely on foobar-policy.rpm
But we usually install rpm in post install of the package and then run restorecon on the content.
This presentation has some rpm examples.
https://fedorapeople.org/~dwalsh/SELinux/Presentations/SummitSELinuxEnterprise.odp