-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow container-selinux to be built on Debian #57
Comments
Could you comment out those two lines and see if it works. (You probably need to comment out a line in container-selinux.fc as well, that uses that type. |
Endless errors follows... container.te:148:ERROR 'syntax error' at token 'userdom_admin_home_dir_filetrans' on line 9463: container.te:219:ERROR 'syntax error' at token 'term_use_all_inherited_terms' on line 10294: container.te:226:ERROR 'syntax error' at token 'kernel_read_all_proc' on line 10555: .... |
Yup the Fedora Policy has diverged a lot from the upstream policy and it is very difficult to merge them back together. I would comment out all of the container_runtime_t conflicts and just make the container_runtime_t an unconfined domain. |
@qiancai I would also consider shipping the Fedora variant of the policy for Debian, as it's likely to be much more functional across the board. I'm currently working on using it in openSUSE and it wasn't terribly difficult to do so... |
Would it help to have a openSUSE Branch? |
I have not heard anything on this in many months, closing. |
Thought I'd take a quick look to see if this has become any easier or more difficult. Currently I get:
So there are fewer errors than before but the use of |
Same error on Debian 12.. With Red Hats move to signal the beginning of the end of all downstream RHEL projects combined with the infeasible nature of CentOS Stream and / or Fedora as useable environments for professional use => small organisations that are unable to pay for RHEL subscriptions are essentially forced to turn to Debian as an alternative.. but container-selinux will need to be available on Debian for that to be possible. SELinux is a must for proper security. Any chance for container-selinux to take Debian into account in the near future? Edit: it seems a valiant expert has already found the solution. Happy days! |
container-selinux is built on top of fedora/selinux-policy. So debian would need to pull in fedora/selinux-policy and container-selinux. |
BTW I am not sure why you think centos-stream is not good for downstream use. But I don't feel like debating that here. https://medium.com/@gordon.messmer/in-favor-of-centos-stream-e5a8a43bdcf8 |
@rhatdan thanks for the reply and the link; a good read and many interesting points. I was however not trying to start a debate, nor did I make judgement on suitability for downstream use (or judgement on the decisions of RH leading up to the questions some in the community now have) - I instead mentioned suitability for production use, primarily based on Red Hats own posts, i.e. this one. It would be great if all the various communities could make it all work out so that small organisations can enjoy a top tier IT infrastructure foundation while they grow their activities and become paying RH customers when they are able. In the face of insecurity on that front however, it doesn't hurt to play it safe and look for viable alternatives. As both a RH and Debian user since the early 90s, I recognise and appreciate the tremendous contributions made by both and make no judgement; Just looking for a way to have SELinux secured container hosts in relative peace and quiet. Luckily it seems that refpolicy has a workable solution as pointed out by @yrro. Still need to test it with MLS, but outlook is good. May we all enjoy and contribute if we can to FOSS, OCI and others in harmony. Apologies for my earlier somewhat nervous post. |
Debian is using refpolicy instead of fedora-selinux where it included a container module,
https://github.com/SELinuxProject/refpolicy
As the results, it failed to build container-selinux probably complaining container_unit_file_t was not defined.
Compiling refpolicy container module
m4:container.te:415: Warning: modutils_domtrans_insmod(container_runtime_t) has been deprecated, please use modutils_domtrans() instead.
/usr/bin/checkmodule: loading policy configuration from tmp/container.tmp
container.te:76:ERROR 'syntax error' at token 'systemd_unit_file' on line 8702:
systemd_unit_file(container_unit_file_t)
type container_unit_file_t alias docker_unit_file_t;
/usr/bin/checkmodule: error(s) encountered while parsing configuration
make[1]: *** [/usr/share/selinux/devel/include/Makefile:162: tmp/container.mod] Error 1
make[1]: Leaving directory '/home/debian/container-selinux'
make: *** [Makefile:12: container.pp] Error 2
The text was updated successfully, but these errors were encountered: