Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 156704 - udev with USE="selinux" missing a dependency
Summary: udev with USE="selinux" missing a dependency
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: SE Linux Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-30 10:19 UTC by Martin Meyer
Modified: 2007-01-19 15:39 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 Martin Meyer 2006-11-30 10:19:56 UTC
I'm trying to build a system using the selinux/x86/2006.1 profile and my udev build is failing:

<snip>
  CC       udev_selinux.o
udev_selinux.c:29:29: error: selinux/selinux.h: No such file or directory
udev_selinux.c:34: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'prev_scontext'
udev_selinux.c: In function 'is_selinux_running':
udev_selinux.c:41: warning: implicit declaration of function 'is_selinux_enabled'
udev_selinux.c:41: warning: nested extern declaration of 'is_selinux_enabled'
udev_selinux.c: In function 'selinux_setfilecon':
udev_selinux.c:89: error: 'security_context_t' undeclared (first use in this function)
udev_selinux.c:89: error: (Each undeclared identifier is reported only once
udev_selinux.c:89: error: for each function it appears in.)
udev_selinux.c:89: error: expected ';' before 'scontext'
udev_selinux.c:95: warning: implicit declaration of function 'matchmediacon'
udev_selinux.c:95: warning: nested extern declaration of 'matchmediacon'
udev_selinux.c:95: error: 'scontext' undeclared (first use in this function)
udev_selinux.c:100: warning: implicit declaration of function 'matchpathcon'
udev_selinux.c:100: warning: nested extern declaration of 'matchpathcon'
udev_selinux.c:105: warning: implicit declaration of function 'setfilecon'
udev_selinux.c:105: warning: nested extern declaration of 'setfilecon'
udev_selinux.c:108: warning: implicit declaration of function 'freecon'
udev_selinux.c:108: warning: nested extern declaration of 'freecon'
udev_selinux.c: In function 'selinux_setfscreatecon':
udev_selinux.c:115: error: 'security_context_t' undeclared (first use in this function)
udev_selinux.c:115: error: expected ';' before 'scontext'
udev_selinux.c:121: error: 'scontext' undeclared (first use in this function)
udev_selinux.c:131: warning: implicit declaration of function 'setfscreatecon'
udev_selinux.c:131: warning: nested extern declaration of 'setfscreatecon'
udev_selinux.c: In function 'selinux_resetfscreatecon':
udev_selinux.c:141: error: 'prev_scontext' undeclared (first use in this function)
udev_selinux.c: In function 'selinux_init':
udev_selinux.c:153: warning: implicit declaration of function 'matchpathcon_init_prefix'
udev_selinux.c:153: warning: nested extern declaration of 'matchpathcon_init_prefix'
udev_selinux.c:154: warning: implicit declaration of function 'getfscreatecon'
udev_selinux.c:154: warning: nested extern declaration of 'getfscreatecon'
udev_selinux.c:154: error: 'prev_scontext' undeclared (first use in this function)
udev_selinux.c: In function 'selinux_exit':
udev_selinux.c:163: error: 'prev_scontext' undeclared (first use in this function)
make: *** [udev_selinux.o] Error 1

!!! ERROR: sys-fs/udev-103 failed.
Call stack:
  ebuild.sh, line 1568:   Called dyn_compile
  ebuild.sh, line 937:   Called src_compile
  udev-103.ebuild, line 78:   Called die

A quick glance at the ebuild shows me no dependency on selinux-related anything, so I'm thinking that a dependency for sys-libs/libselinux is needed to make sure it is emerged before udev.

So the change I recommend is:
-DEPEND="sys-apps/hotplug-base"
+DEPEND="sys-apps/hotplug-base selinux? ( sys-libs/libselinux )"

This is assuming of course that libselinux actually provided that selinux/selinux.h header, which is a total assumption on my part as I've only just experienced the build failure and haven't ventured into fixing it yet.
Comment 1 Martin Meyer 2006-11-30 10:27:37 UTC
I've just confirmed that emerging libselinux first fixes the udev build problem.

And in case it wasn't clear before... I meant to change that DEPEND= line in sys-fs/udev/udev-103.ebuild.
Comment 2 Chris PeBenito (RETIRED) gentoo-dev 2007-01-18 19:43:31 UTC
yes, this is the right fix.
Comment 3 Matthias Schwarzott gentoo-dev 2007-01-19 15:39:52 UTC
Added to udev-104.