Gentoo Logo
Gentoo Spaceship

Installation:
Gentoo Handbook
Installation Docs

Documentation:
Home
Listing
About Gentoo
Philosophy
Social Contract

Resources:
Bug Tracker
Developer List
Discussion Forums
Gentoo BitTorrents
Gentoo Linux Enhancement Proposals
IRC Channels
Mailing Lists
Mirrors
Name and Logo Guidelines
Online Package Database
Security Announcements
Staffing Needs
Supporting Vendors
View our CVS

Graphics:
Logos and themes
Icons
ScreenShots

Miscellaneous Resources:
Gentoo Linux Store
Gentoo-hosted projects
IBM dW/Intel article archive




List Archive: gentoo-hardened
Navigation:
Lists: gentoo-hardened: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-hardened@g.o
From: Mike Edenfield <kutulu@...>
Subject: SELinux failure during emerge: setfscreatecon() takes exactly 1 argument
Date: Fri, 18 Sep 2009 14:58:47 -0400
For about the past two weeks I've been receiving the 
following error on our SELinux-enabled web server, any time 
I attempt to upgrade or install a package from portage.

   File "/usr/lib/portage/pym/portage/_selinux.py", line 50, 
in mkdir
     selinux.setfscreatecon()
TypeError: setfscreatecon() takes exactly 1 argument (0 given)

In each case, if I re-run the emerge command, the package 
installs successfully the second time, but portage complains 
about file collisions during the final merge step.  The 
attached build log shows this condition: the previous 
upgrade attempt failed during timezone-data.  The log shows 
the second upgrade attempt, where timezone-data installs 
correctly but README.bz2 indicates a collision.

I have reinstalled portage, python-selinux, and libselinux 
successfully (by disabling selinux in FEATURES) but the 
problem persists.  I have the most recent selinux userland 
from portage (:

[I] dev-python/python-selinux (2.16-r2@09/17/2009)
[I] dev-python/sepolgen (1.0.17@08/03/2009)
[I] sys-libs/libselinux (2.0.85@09/17/2009)
[I] sys-libs/libsemanage (2.0.33-r1@09/18/2009)
[I] sys-libs/libsepol (2.0.37@08/04/2009)
[I] sys-apps/portage (2.2_rc40@09/17/2009)




>>> Installing (1 of 32) sys-libs/timezone-data-2009m
 * This package will overwrite one or more files that may belong to other
 * packages (see list below). You can use a command such as `portageq
 * owners / <filename>` to identify the installed package that owns a
 * file. If portageq reports that only one package owns a file then do
 * NOT file a bug report. A bug report is only useful if it identifies at
 * least two or more packages that are known to install the same file(s).
 * If a collision occurs and you can not explain where the file came from
 * then you should simply ignore the collision since there is not enough
 * information to determine if a real problem exists. Please do NOT file
 * a bug report at http://bugs.gentoo.org unless you report exactly which
 * two packages install the same file(s). Once again, please do NOT file
 * a bug report unless you have completely understood the above message.
 *
 * Detected file collision(s):
 *
 *      /usr/share/doc/timezone-data-2009m/README.bz2
 *
 * Searching all installed packages for file collisions...
 *
 * Press Ctrl-C to Stop
 *
 * None of the installed packages claim the file(s).
 *
 * Package 'sys-libs/timezone-data-2009m' merged despite file collisions.
 * If necessary, refer to your elog messages for the whole content of the
 * above message.
>>> Setting SELinux security labels
filespec_eval:  hash table stats: 1374 elements, 1374/65536 buckets used, longest chain length 1
 * Updating /etc/localtime with /usr/share/zoneinfo/EST5EDT

>>> Emerging (2 of 32) sys-apps/hdparm-9.27
 * hdparm-9.27.tar.gz RMD160 SHA1 SHA256 size ;-) ...                    [ ok ]
 * checking ebuild checksums ;-) ...                                     [ ok ]
 * checking auxfile checksums ;-) ...                                    [ ok ]
 * checking miscfile checksums ;-) ...                                   [ ok ]
>>> Unpacking source...
>>> Unpacking hdparm-9.27.tar.gz to /var/tmp/portage/sys-apps/hdparm-9.27/work
>>> Source unpacked in /var/tmp/portage/sys-apps/hdparm-9.27/work
>>> Compiling source in /var/tmp/portage/sys-apps/hdparm-9.27/work/hdparm-9.27 ...
make STRIP=: CC=i686-pc-linux-gnu-gcc
i686-pc-linux-gnu-gcc -O2 -march=pentium4 -pipe -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wst$
i686-pc-linux-gnu-gcc -O2 -march=pentium4 -pipe -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wst$
i686-pc-linux-gnu-gcc -O2 -march=pentium4 -pipe -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wst$
i686-pc-linux-gnu-gcc -O2 -march=pentium4 -pipe -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wst$
i686-pc-linux-gnu-gcc -O2 -march=pentium4 -pipe -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wst$
i686-pc-linux-gnu-gcc -O2 -march=pentium4 -pipe -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wst$
i686-pc-linux-gnu-gcc -O2 -march=pentium4 -pipe -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wst$
i686-pc-linux-gnu-gcc -O2 -march=pentium4 -pipe -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wst$
i686-pc-linux-gnu-gcc -O2 -march=pentium4 -pipe -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wst$
i686-pc-linux-gnu-gcc -Wl,-O1 -o hdparm hdparm.o identify.o sgio.o sysfs.o geom.o fallocate.o fibmap.o fwdownload.o dvdspeed.o
: hdparm
>>> Source compiled.
>>> Test phase [not enabled]: sys-apps/hdparm-9.27

>>> Installing (2 of 32) sys-apps/hdparm-9.27
>>> Setting SELinux security labels
filespec_eval:  hash table stats: 20 elements, 20/65536 buckets used, longest chain length 1
Traceback (most recent call last):
  File "/usr/bin/emerge", line 40, in <module>
    retval = emerge_main()
  File "/usr/lib/portage/pym/_emerge/main.py", line 1412, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/lib/portage/pym/_emerge/actions.py", line 457, in action_build
    retval = mergetask.merge()
  File "/usr/lib/portage/pym/_emerge/Scheduler.py", line 820, in merge
    rval = self._merge()
  File "/usr/lib/portage/pym/_emerge/Scheduler.py", line 1125, in _merge
    self._main_loop()
  File "/usr/lib/portage/pym/_emerge/Scheduler.py", line 1265, in _main_loop
    self._poll_loop()
  File "/usr/lib/portage/pym/_emerge/PollScheduler.py", line 127, in _poll_loop
    handler(f, event)
  File "/usr/lib/portage/pym/_emerge/SpawnProcess.py", line 192, in _output_handler
    self._unregister_if_appropriate(event)
  File "/usr/lib/portage/pym/_emerge/AbstractPollTask.py", line 27, in _unregister_if_appropriate
    self.wait()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait
    self._wait_hook()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib/portage/pym/_emerge/EbuildPhase.py", line 84, in _post_phase_exit
    self.wait()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait
    self._wait_hook()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib/portage/pym/_emerge/TaskSequence.py", line 44, in _task_exit_handler
    self.wait()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait
    self._wait_hook()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib/portage/pym/_emerge/CompositeTask.py", line 106, in _default_final_exit
    return self.wait()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait
    self._wait_hook()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib/portage/pym/_emerge/EbuildBuild.py", line 178, in _build_exit
    self.wait()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait
    self._wait_hook()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib/portage/pym/_emerge/CompositeTask.py", line 106, in _default_final_exit 	
    self.wait()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait
    self._wait_hook()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib/portage/pym/_emerge/CompositeTask.py", line 106, in _default_final_exit
    return self.wait()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 42, in wait
    self._wait_hook()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 115, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib/portage/pym/_emerge/Scheduler.py", line 1104, in _build_exit
    self._schedule()
  File "/usr/lib/portage/pym/_emerge/PollScheduler.py", line 43, in _schedule
    return self._schedule_tasks()
  File "/usr/lib/portage/pym/_emerge/Scheduler.py", line 1294, in _schedule_tasks
    if q.schedule():
  File "/usr/lib/portage/pym/_emerge/SequentialTaskQueue.py", line 55, in schedule
    task.start()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 24, in start
    self._start()
  File "/usr/lib/portage/pym/_emerge/PackageMerge.py", line 44, in _start
    self.returncode = self.merge.merge()
  File "/usr/lib/portage/pym/_emerge/MergeListItem.py", line 148, in merge
    retval = self._install_task.install()
  File "/usr/lib/portage/pym/_emerge/EbuildBuild.py", line 269, in install
    rval = merge.execute()
  File "/usr/lib/portage/pym/_emerge/EbuildMerge.py", line 27, in execute
    blockers=self.find_blockers)
  File "/usr/lib/portage/pym/portage/__init__.py", line 7360, in merge
    mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 4291, in merge
    mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 4301, in _merge
    cleanup=cleanup, mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 3761, in treewalk
    if self.mergeme(srcroot, destroot, outfile, secondhand, "", cfgfiledict, mymtime):
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 4143, in mergeme
    join(offset, x), cfgfiledict, thismtime):
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 4143, in mergeme
    join(offset, x), cfgfiledict, thismtime):
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 4143, in mergeme
    join(offset, x), cfgfiledict, thismtime):
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 4134, in mergeme
    _selinux_merge.mkdir(mydest, mysrc)
  File "/usr/lib/portage/pym/portage/__init__.py", line 181, in __call__
    rval = self._func(*wrapped_args, **wrapped_kwargs)
  File "/usr/lib/portage/pym/portage/_selinux.py", line 50, in mkdir
    selinux.setfscreatecon()
TypeError: setfscreatecon() takes exactly 1 argument (0 given)
  
Replies:
Re: SELinux failure during emerge: setfscreatecon() takes exactly 1 argument
-- Andrew Gaffney
Navigation:
Lists: gentoo-hardened: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Hardened profile update
Next by thread:
Re: SELinux failure during emerge: setfscreatecon() takes exactly 1 argument
Previous by date:
Re: Hardened profile update
Next by date:
Re: SELinux failure during emerge: setfscreatecon() takes exactly 1 argument


Updated Nov 22, 2009

Donate to support our development efforts.

Gentoo Centric Hosting: vr.org

VR Hosted

Tek Alchemy

Tek Alchemy

SevenL.net

SevenL.net

php|architect

php|architect

Copyright 2001-2007 Gentoo Foundation, Inc. Questions, Comments? Email www@gentoo.org.