Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 257747 - SELinux tools linked to wrong python version
Summary: SELinux tools linked to wrong python version
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Chris PeBenito (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-05 08:59 UTC by Edvard Fagerholm
Modified: 2011-02-06 22:36 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Edvard Fagerholm 2009-02-05 08:59:45 UTC
I installed a new gentoo xen domU yesterday, selected the selinux profile, and went through all the steps in the SELinux handbook. After having done

emerge -e world

from a portage tree rsynced yesterday, all SELinux related packages stopped working. The emerge seemed to have switched /usr/bin/python to link to python 2.5 and we have only the following packages installed:

$ locate selinux | grep site-packages
/usr/lib64/python2.5/site-packages/selinux_aux.so
/usr/lib64/python2.4/site-packages/selinux.pyc
/usr/lib64/python2.4/site-packages/_selinux.so
/usr/lib64/python2.4/site-packages/selinux.pyo
/usr/lib64/python2.4/site-packages/selinux.py

Because of this, running e.g. rlpkg makes it complain about missing selinux package. Doing

rm /usr/bin/python
ln -s /usr/bin/python2.4 /usr/bin/python2.4

fixes the problem.

----
Portage 2.1.6.4 (selinux/2007.0/amd64/hardened, gcc-4.1.2, glibc-2.6.1-r0, 2.6.28-gentoo-r1 x86_64)
=================================================================
System uname: Linux-2.6.28-gentoo-r1-x86_64-Dual-Core_AMD_Opteron-tm-_Processor_1210-with-glibc2.2.5
Timestamp of tree: Thu, 05 Feb 2009 08:05:01 +0000
app-shells/bash:     3.2_p39
dev-lang/python:     2.4.4-r13, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.63
sys-devel/automake:  1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages loadpolicy parallel-fetch protect-owned sandbox selinux sesandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo/"
LDFLAGS=""
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 berkdb cli cracklib crypt cups dri gdbm hardened iconv ipv6 isdnlog midi mmx mudflap ncurses nls nptl nptlonly openmp pam pcre perl pic pppd python readline reflection selinux session spl sse sse2 ssl tcpd unicode xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x 	ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 	trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i810 intel mach64 	mga neomagic nv r128 radeon rendition s3 s3virge savage siliconmotion sis 	sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY


Reproducible: Always

Steps to Reproduce:
1. emerge --sync
2. emerge -e world
Actual Results:  
$ semanage user -l
Traceback (most recent call last):
  File "/usr/sbin/semanage", line 24, in <module>
    import seobject
ImportError: No module named seobject
Comment 1 Chris PeBenito (RETIRED) gentoo-dev 2009-12-16 01:18:44 UTC
did you do python-updater as required when upgrading python 2.4 to 2.5?
Comment 2 Chris Richards 2011-01-31 23:43:08 UTC
Can we close this due to no activity?  Current systems don't seem to exhibit this problem.