Current portage's selinux uses the selinux_aux (python-selinux) python bindings which are hand written wrappers of libselinux. Libselinux now provides its own swig wrapper. This patch switches portage over to use the libselinux swig wrapper. It also changes the portage selinux functions to closely resemble the functions they replace for better understanding, eg, selinux.copyfile() for shutil.copyfile(). The patch also removes the special case fallback to /bin/mv during install, since the SELinux-enabled /bin/mv now does the right thing SELinux-wise without additional commandline switches.
The second patch updates the portage ebuild to change the selinux? dependency from python-selinux to libselinux.
Created attachment 200329 [details, diff]
portage code patch
Created attachment 200331 [details, diff]
portage ebuild patch
Thanks, this is in svn r13937.
This is fixed in 2.2_rc37.
This is fixed in 2.1.7.