Gentoo selinux on Sparcでpython-selinuxをemergeできない

という症状で悩んでいた。

 # emerge python-selinux
Calculating dependencies ...done!
>>> emerge (1 of 1) dev-python/python-selinux-2.16 to /
>>> md5 files   ;-) python-selinux-2.16.ebuild
>>> md5 files   ;-) files/digest-python-selinux-2.16
>>> md5 files   ;-) files/python-selinux-2.16.c.bz2
>>> Unpacking source...
>>> Source unpacked.
 * Compiling selinux.so for python 2.4
>>> Test phase [not enabled]: dev-python/python-selinux-2.16

>>> Install python-selinux-2.16 into /var/tmp/portage/python-selinux-2.16/image/ category dev-python
man:
prepallstrip:
strip: sparc-unknown-linux-gnu-strip --strip-unneeded
   usr/lib/python2.4/site-packages/selinux.so

QA Notice: the following files contain executable stacks
 Files with executable stacks will not work properly (or at all!)
 on some architectures/operating systems.  A bug should be filed
 at http://bugs.gentoo.org/ to make sure the file is fixed.
--- --- RWX usr/lib/python2.4/site-packages/selinux.so

>>> Completed installing python-selinux-2.16 into /var/tmp/portage/python-selinux-2.16/image/

>>> Merging dev-python/python-selinux-2.16 to /
>>> Setting SELinux security labels
/usr/sbin/setfiles:  labeling files, pretending /var/tmp/portage/python-selinux-2.16/image is /
/usr/sbin/setfiles:  labeling files under /var/tmp/portage/python-selinux-2.16/image/
matchpathcon_filespec_eval:  hash table stats: 6 elements, 6/65536 buckets used, longest chain length 1
/usr/sbin/setfiles:  Done.
--- /usr/
--- /usr/lib/
--- /usr/lib/python2.4/
--- /usr/lib/python2.4/site-packages/
!!! Failed to move /var/tmp/portage/python-selinux-2.16/image/usr/lib/python2.4/site-packages/selinux.so to /usr/lib/python2.4/site-packages/selinux.so
!!! 'module' object has no attribute 'secure_rename'

理由はportageのバージョンがselinuxより新しいため。対策は、以下のとおり。

# USE=-selinux emerge python-selinux
# rlpkg python-selinux