Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 159022 - checkpolicy-1.30.12 failed to find /etc/selinux and files
Summary: checkpolicy-1.30.12 failed to find /etc/selinux and files
Status: RESOLVED DUPLICATE of bug 154011
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Other
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-24 08:47 UTC by Richard Scott
Modified: 2006-12-24 13:29 UTC (History)
0 users

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 Richard Scott 2006-12-24 08:47:44 UTC
Hi,

i'm trying to upgrade my checkpolicy package to v1.30.12 from v1.30-r1 and I am seeing the following error (which to me looks like a bug!):

Calculating dependencies  >>> Unpacking source...
>>> >>> Unpacking checkpolicy-1.30.12.tgz to /var/tmp/portage/checkpolicy-1.30.12/work
>>> >>> Source unpacked.
>>> >>> Compiling source in /var/tmp/portage/checkpolicy-1.30.12/work/checkpolicy-1.30.12 ...
cc -Os -march=i686 -msse -mmmx -mfpmath=sse -pipe -fomit-frame-pointer -I. -I/usr/include -o checkpolicy.o -c checkpolicy.c
bison -y -d policy_parse.y
cc -Os -march=i686 -msse -mmmx -mfpmath=sse -pipe -fomit-frame-pointer -I. -I/usr/include -o queue.o -c queue.c
cc -Os -march=i686 -msse -mmmx -mfpmath=sse -pipe -fomit-frame-pointer -I. -I/usr/include -o module_compiler.o -c module_compiler.c
cc -Os -march=i686 -msse -mmmx -mfpmath=sse -pipe -fomit-frame-pointer -I. -I/usr/include -o parse_util.o -c parse_util.c
cc -Os -march=i686 -msse -mmmx -mfpmath=sse -pipe -fomit-frame-pointer -I. -I/usr/include -o checkmodule.o -c checkmodule.c
cc -Os -march=i686 -msse -mmmx -mfpmath=sse -pipe -fomit-frame-pointer -I. -I/usr/include -o y.tab.o -c y.tab.c
lex policy_scan.l
cc -Os -march=i686 -msse -mmmx -mfpmath=sse -pipe -fomit-frame-pointer -I. -I/usr/include -o lex.yy.o -c lex.yy.c
cc   checkpolicy.o y.tab.o lex.yy.o queue.o module_compiler.o parse_util.o  /usr/lib/libsepol.a -lfl -o checkpolicy
cc   checkmodule.o y.tab.o lex.yy.o queue.o module_compiler.o parse_util.o  /usr/lib/libsepol.a -lfl -o checkmodule
make -C test
make[1]: Entering directory `/var/tmp/portage/checkpolicy-1.30.12/work/checkpolicy-1.30.12/test'
cc -Os -march=i686 -msse -mmmx -mfpmath=sse -pipe -fomit-frame-pointer -I. -I/usr/include -I/usr/include   -c -o dispol.o dispol.c
cc -Os -march=i686 -msse -mmmx -mfpmath=sse -pipe -fomit-frame-pointer -I. -I/usr/include -I/usr/include   -c -o dismod.o dismod.c
cc   dispol.o  -lfl -lselinux /usr/lib/libsepol.a -L/usr/lib -o dispol
cc   dismod.o  -lfl -lselinux /usr/lib/libsepol.a -L/usr/lib -o dismod
make[1]: Leaving directory `/var/tmp/portage/checkpolicy-1.30.12/work/checkpolicy-1.30.12/test'
>>> >>> Source compiled.
>>> >>> Test phase [not enabled]: sys-apps/checkpolicy-1.30.12

>>> >>> Install checkpolicy-1.30.12 into /var/tmp/portage/checkpolicy-1.30.12/image/ category sys-apps
make -C test
make[1]: Entering directory `/var/tmp/portage/checkpolicy-1.30.12/work/checkpolicy-1.30.12/test'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/var/tmp/portage/checkpolicy-1.30.12/work/checkpolicy-1.30.12/test'
mkdir -p /var/tmp/portage/checkpolicy-1.30.12/image//usr/bin
mkdir -p /var/tmp/portage/checkpolicy-1.30.12/image//usr/share/man/man8
install -m 755 checkpolicy checkmodule /var/tmp/portage/checkpolicy-1.30.12/image//usr/bin	
install -m 644 checkpolicy.8 /var/tmp/portage/checkpolicy-1.30.12/image//usr/share/man/man8
install -m 644 checkmodule.8 /var/tmp/portage/checkpolicy-1.30.12/image//usr/share/man/man8
>>> >>> Completed installing checkpolicy-1.30.12 into /var/tmp/portage/checkpolicy-1.30.12/image/

man:
gzipping man page: checkpolicy.8
gzipping man page: checkmodule.8
strip: i686-pc-linux-gnu-strip --strip-unneeded
   usr/bin/checkmodule
   usr/bin/checkpolicy
 ... done!

>>> >>> Emerging (1 of 3) sys-apps/checkpolicy-1.30.12 to /
 * checkpolicy-1.30.12.tgz MD5  ;-)  ...                                                                                    [ ok ]
 * checkpolicy-1.30.12.tgz RMD160  ;-)  ...                                                                                 [ ok ]
 * checkpolicy-1.30.12.tgz SHA1  ;-)  ...                                                                                   [ ok ]
 * checkpolicy-1.30.12.tgz SHA256  ;-)  ...                                                                                 [ ok ]
 * checkpolicy-1.30.12.tgz size  ;-)  ...                                                                                   [ ok ]
 * checking ebuild checksums  ;-)  ...                                                                                      [ ok ]
 * checking auxfile checksums  ;-)  ...                                                                                     [ ok ]
 * checking miscfile checksums  ;-)  ...                                                                                    [ ok ]
 * checking checkpolicy-1.30.12.tgz  ;-)  ...                                                                               [ ok ]
>>> >>> Merging sys-apps/checkpolicy-1.30.12 to /
>>> >>> Setting SELinux security labels
/etc/selinux/targeted/contexts/files/file_contexts: No such file or directory

!!! ERROR: sys-apps/checkpolicy-1.30.12 failed.
Call stack:
  misc-functions.sh, line 417:   Called preinst_selinux_labels
  misc-functions.sh, line 342:   Called die

!!! Failed to set SELinux security labels.
!!! If you need support, post the topmost build error, and the call stack if relevant.

!!! post preinst failed; exiting.
!!! FAILED preinst: 1

Here is my emerge --info output:

Gentoo Base System version 1.12.6
Portage 2.1.1-r2 (selinux/x86/2006.1, gcc-4.1.1, glibc-2.4-r4, 2.6.18-hardened i686)
=================================================================
System uname: 2.6.18-hardened i686 AMD Athlon(tm)
Last Sync: Wed, 20 Dec 2006 01:47:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: [Not Present]
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.60
sys-devel/automake:  1.6.3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=i686 -msse -mmmx -mfpmath=sse -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/service"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-Os -march=i686 -msse -mmmx -mfpmath=sse -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks loadpolicy metadata-transfer sandbox selinux sesandbox sfperms strict"
GENTOO_MIRRORS="ftp://mirrors.blueyonder.co.uk/mirrors/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 berkdb crypt elibc_glibc input_devices_keyboard input_devices_mouse ipv6 kernel_linux ncurses nls nptl nptlonly pam python readline selinux ssl tcpd udev unicode userland_GNU zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Richard Scott 2006-12-24 08:49:02 UTC
I've never had a /etc/selinux/targeted/contexts/files/file_contexts file or directory structure like that on my system :-(
Comment 2 Richard Scott 2006-12-24 08:54:22 UTC
ok, I've just rebooted with selinux=0 appended to the kernel and tried again and it now works.....what gives? can't you install that under an selinux environment?

odd, but at least I can now install it ;-)
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-12-24 13:29:12 UTC

*** This bug has been marked as a duplicate of 154011 ***