I need to make /etc/pki/CA/certs/cacert.pem have the same context as all the other files in /etc/pki:
system_u:object_r:cert_t:s0
Tried restorecon -vR /etc/pki and semanage fcontext but the file remains in the unconfined_u:object_r:cert_t:s0 context.
Best Answer
Quick fix
Since your other files are fine, select a specific one for this command:
Longer term fix
You can make a context in SELinux for your file so that it is persistent across context restores.
This will make a new context definition that is not yet applied so apply it.