Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
selinux installation problem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
GNUtoo
Veteran
Veteran


Joined: 05 May 2005
Posts: 1919

PostPosted: Sat Nov 04, 2006 8:14 am    Post subject: selinux installation problem Reply with quote

emerge -av selinux-base-policy

These are the packages that would be merged, in order:

Calculating dependencies... done!
INCOMPLETE MERGE: /var/db/pkg/sec-policy/-MERGING-selinux-base-policy-20061015
[ebuild N ] sec-policy/selinux-base-policy-20061015 0 kB

Total size of downloads: 0 kB

Would you like to merge these packages? [Yes/No] y

>>> Emerging (1 of 1) sec-policy/selinux-base-policy-20061015 to /
* refpolicy-20061015.tar.bz2 MD5 ;-) ... [ ok ]
* refpolicy-20061015.tar.bz2 RMD160 ;-) ... [ ok ]
* refpolicy-20061015.tar.bz2 SHA1 ;-) ... [ ok ]
* refpolicy-20061015.tar.bz2 SHA256 ;-) ... [ ok ]
* refpolicy-20061015.tar.bz2 size ;-) ... [ ok ]
* checking ebuild checksums ;-) ... [ ok ]
* checking auxfile checksums ;-) ... [ ok ]
* checking miscfile checksums ;-) ... [ ok ]
* checking refpolicy-20061015.tar.bz2 ;-) ... [ ok ]
!!! SELinux module not found. Please verify that it was installed.
>>> Unpacking source...
>>> Unpacking refpolicy-20061015.tar.bz2 to /var/tmp/portage/selinux-base-policy-20061015/work
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/selinux-base-policy-20061015/work/ ...
Creating policy.xml
Creating strict base module base.conf
Compiling strict base module
/usr/bin/checkmodule: loading policy configuration from /var/tmp/portage/selinux-base-policy-20061015/work//strict/base.conf
/usr/bin/checkmodule: policy configuration loaded
/usr/bin/checkmodule: writing binary representation (version 6) to /var/tmp/portage/selinux-base-policy-20061015/work//strict/tmp/base.mod
Creating strict base module file contexts.
Creating netfilter network labeling rules
Creating strict base module package
Creating targeted base module base.conf
Compiling targeted base module
/usr/bin/checkmodule: loading policy configuration from /var/tmp/portage/selinux-base-policy-20061015/work//targeted/base.conf
/usr/bin/checkmodule: policy configuration loaded
/usr/bin/checkmodule: writing binary representation (version 6) to /var/tmp/portage/selinux-base-policy-20061015/work//targeted/tmp/base.mod
Creating targeted base module file contexts.
Creating netfilter network labeling rules
Creating targeted base module package
>>> Source compiled.
>>> Test phase [not enabled]: sec-policy/selinux-base-policy-20061015

>>> Install selinux-base-policy-20061015 into /var/tmp/portage/selinux-base-policy-20061015/image/ category sec-policy
Installing strict base.pp policy package.
Installing strict policy headers.
Installing targeted base.pp policy package.
Installing targeted policy headers.
>>> Completed installing selinux-base-policy-20061015 into /var/tmp/portage/selinux-base-policy-20061015/image/

man:
>>> Merging sec-policy/selinux-base-policy-20061015 to /
>>> Setting SELinux security labels
/etc/selinux/targeted/contexts/files/file_contexts: No such file or directory

!!! ERROR: sec-policy/selinux-base-policy-20061015 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
Back to top
View user's profile Send private message
xathin
n00b
n00b


Joined: 05 Sep 2006
Posts: 64
Location: Vancouver, BC

PostPosted: Sun Nov 19, 2006 10:45 am    Post subject: Reply with quote

I am also getting this error. I looked, and the directory /etc/selinux/targeted/ does not exist, and I followed the instructions on http://www.gentoo.org/proj/en/hardened/selinux/selinux-handbook.xml?part=2 for an existing linux install, but can't get past installing selinux-base-policy.

I am attempting to install selinux-base-policy-20061114.
Back to top
View user's profile Send private message
GNUtoo
Veteran
Veteran


Joined: 05 May 2005
Posts: 1919

PostPosted: Sun Nov 19, 2006 12:18 pm    Post subject: Reply with quote

you must use a 2005.1 stage3 then upgrade to the 2006.1 profile and recompile evrything
Back to top
View user's profile Send private message
xathin
n00b
n00b


Joined: 05 Sep 2006
Posts: 64
Location: Vancouver, BC

PostPosted: Sun Nov 19, 2006 12:28 pm    Post subject: Reply with quote

GNUtoo wrote:
you must use a 2005.1 stage3 then upgrade to the 2006.1 profile and recompile evrything


So, does that mean you can't install SELinux from an already installed system? Or can you just use the 2005.1 profile and build from that?
Back to top
View user's profile Send private message
GNUtoo
Veteran
Veteran


Joined: 05 May 2005
Posts: 1919

PostPosted: Sun Nov 19, 2006 1:17 pm    Post subject: Reply with quote

xathin wrote:
GNUtoo wrote:
you must use a 2005.1 stage3 then upgrade to the 2006.1 profile and recompile evrything


So, does that mean you can't install SELinux from an already installed system? Or can you just use the 2005.1 profile and build from that?

yes that is a problem
Back to top
View user's profile Send private message
momofuku
n00b
n00b


Joined: 16 Jan 2007
Posts: 3

PostPosted: Tue Jan 16, 2007 3:54 pm    Post subject: Reply with quote

I managed to solve this problem by simply creating the dirs and the file:

Code:

mkdir /etc/selinux/targeted/contexts
mkdir /etc/selinux/targeted/contexts/files
touch /etc/selinux/targeted/contexts/files/file_contexts


and then re-emerging selinux-base-policy.
After that the emerge succeds and the file /etc/selinux/targeted/contexts/files/file_contexts is recreated.
Back to top
View user's profile Send private message
JohnerH
Apprentice
Apprentice


Joined: 01 Mar 2004
Posts: 197
Location: Manchester,United Kingdom

PostPosted: Mon Jan 22, 2007 3:35 pm    Post subject: Reply with quote

I know this my sound a bit dumb but, is there actually a gentoo guide for SELinux installation from scratch? As in, u have a new box you and you want to install SELinux from the very beggning?

Thank you in advance for the help,

Joao
_________________
------------------------------------------------------
I think I had a thought once but it Died of Lonelyness...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum