Summary: | sys-apps/busybox-1.3.1 fails to compile with selinux | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Xake <kanelxake> |
Component: | New packages | Assignee: | SE Linux Bugs <selinux> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | art-gt, kanelxake, vapier |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Buildlog for 1.4.2 and USE="-static" |
Description
Xake
2007-01-08 13:16:10 UTC
still true for sys-apps/busybox-1.4.1-r1 The same bug with 1.3.1 and 1.4.1-r1. Latest stable 1.2.2.1 Had some time to look at some things and the following commando does pass so somewhere in a Makefile there is something missing: make clean && LDFLAGS="-lselinux" make and no errors. Bug upstream: http://busybox.net/bugs/view.php?id=1239 However patching Makefile.flags to include ifeq ($(CONFIG_SELINUX),y) LDFLAGS += -lselinux -lsepol endif works manually but not when compiling from ebuild. Yep, still a problem with the latest stable. IMO, >=busybox-1.3 needs to be masked for selinux until this can get fixed. busybox-1.5.0 seems to include a rework of SELinux. As the current stable (1.2.2.1) does not compile (bug #169830) it would be nice to see busybox-1.5.0 in the tree even if www.busybox.net says unstable to test if it works better... fixed in 1.4.1-r2 and 1.4.2 Still almost identical error-message (and, yes. I have dubbel-checked that I am using the fixed version). LINK busybox_unstripped coreutils/lib.a(id.o): In function `id_main': id.c:(.text.id_main+0x1ab): undefined reference to `is_selinux_enabled' id.c:(.text.id_main+0x1df): undefined reference to `getcon' id.c:(.text.id_main+0x220): undefined reference to `freecon' coreutils/lib.a(ls.o): In function `my_stat': ls.c:(.text.my_stat+0x59): undefined reference to `is_selinux_enabled' ls.c:(.text.my_stat+0xf8): undefined reference to `is_selinux_enabled' ls.c:(.text.my_stat+0x153): undefined reference to `lgetfilecon' ls.c:(.text.my_stat+0x16f): undefined reference to `getfilecon' coreutils/lib.a(ls.o): In function `showfiles': ls.c:(.text.showfiles+0x3d1): undefined reference to `freecon' init/lib.a(init.o): In function `init_main': init.c:(.text.init_main+0x6f3): undefined reference to `selinux_init_load_policy' loginutils/lib.a(login.o): In function `login_main': login.c:(.text.login_main+0x83e): undefined reference to `is_selinux_enabled' login.c:(.text.login_main+0x860): undefined reference to `get_default_context' login.c:(.text.login_main+0x87c): undefined reference to `getfilecon' login.c:(.text.login_main+0x8a9): undefined reference to `security_compute_relabel' login.c:(.text.login_main+0x8c5): undefined reference to `setfilecon' libbb/lib.a(run_shell.o): In function `set_current_security_context': run_shell.c:(.text.set_current_security_context+0x34): undefined reference to `freecon' libbb/lib.a(run_shell.o): In function `run_shell': run_shell.c:(.text.run_shell+0xec): undefined reference to `setexeccon' run_shell.c:(.text.run_shell+0x14f): undefined reference to `freecon' libbb/lib.a(run_shell.o): In function `renew_current_security_context': run_shell.c:(.text.renew_current_security_context+0x29): undefined reference to `freecon' run_shell.c:(.text.renew_current_security_context+0x37): undefined reference to `getcon' collect2: ld returned 1 exit status make: *** [busybox_unstripped] Error 1 !!! ERROR: sys-apps/busybox-1.4.2 failed. i dont have any selinux systems so you need to debug why the patch isnt working Well fire away, I am all yours for experiment. As I could see portage applies the patch but ignores the Makefile.flags. But as busybox does not output the compile options I can't see if it really adds -lselinux and -lsepol to the command. indeed, in one case it does (USE=-static) ... fixed in cvs now, thanks for pointing that out Created attachment 114847 [details]
Buildlog for 1.4.2 and USE="-static"
Sorry but that does not seems to fix it here either. It comes one step closer, but then just some additionals warnings before the errormessage comes.
AR util-linux/lib.a
LINK busybox_unstripped
***Here it broke before
LD applets/built-in.o
LINK busybox_unstripped
True for both 1.4.2 and 1.5.0.
And there seems to be no diffrense for USE="static" and USE="-static"
Forgot to reopen strange. MAKEOPTS="-n" ebuild busybox-1.4.2.ebuild tells me it has -lselinux and -lsepol but fails anyway... echo ' LINK busybox_unstripped'; /var/tmp/portage/sys-apps/busybox-1.5.0/work/busybox-1.5.0/scripts/tryl-gnu-gcc -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -static -lselinux -lsepol -o busybox_unstripped -Wl,-Mn -Wl,--sort-common -Wl,--start-group applets/built-in.o archival/lib.a archival/libunarchive/lib.a conscoreutils/lib.a coreutils/libcoreutils/lib.a debianutils/lib.a e2fsprogs/lib.a editors/lib.a findutils/ libbb/lib.a libpwdgrp/lib.a loginutils/lib.a miscutils/lib.a modutils/lib.a networking/lib.a networkb.a networking/udhcp/lib.a procps/lib.a runit/lib.a selinux/lib.a shell/lib.a sysklogd/lib.a util-linl/built-in.o archival/libunarchive/built-in.o console-tools/built-in.o coreutils/built-in.o coreutils/liin.o debianutils/built-in.o e2fsprogs/built-in.o editors/built-in.o findutils/built-in.o init/built-in..o libpwdgrp/built-in.o loginutils/built-in.o miscutils/built-in.o modutils/built-in.o networking/built/libiproute/built-in.o networking/udhcp/built-in.o procps/built-in.o runit/built-in.o selinux/built-in.oo sysklogd/built-in.o util-linux/built-in.o -Wl,--end-group echo 'cmd_busybox_unstripped := /var/tmp/portage/sys-apps/busybox-1.5.0/work/busybox-1.5.0/scripts/trylink igcc -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -static -lselinux -lsepol -o busybox_unstripped -Wl,-M -Wl,,--sort-common -Wl,--start-group applets/built-in.o archival/lib.a archival/libunarchive/lib.a console-ttils/lib.a coreutils/libcoreutils/lib.a debianutils/lib.a e2fsprogs/lib.a editors/lib.a findutils/lib.abb/lib.a libpwdgrp/lib.a loginutils/lib.a miscutils/lib.a modutils/lib.a networking/lib.a networking/lnetworking/udhcp/lib.a procps/lib.a runit/lib.a selinux/lib.a shell/lib.a sysklogd/lib.a util-linux/lilt-in.o archival/libunarchive/built-in.o console-tools/built-in.o coreutils/built-in.o coreutils/libcore debianutils/built-in.o e2fsprogs/built-in.o editors/built-in.o findutils/built-in.o init/built-in.o liibpwdgrp/built-in.o loginutils/built-in.o miscutils/built-in.o modutils/built-in.o networking/built-in.oproute/built-in.o networking/udhcp/built-in.o procps/built-in.o runit/built-in.o selinux/built-in.o shesklogd/built-in.o util-linux/built-in.o -Wl,--end-group' > ./.busybox_unstripped.cmd rm -f .old_version the order is funked ... ive fixed this upstream and in our versions ... thanks for testing Thanks, busybox-1.4.2 emerged just fine! Maybe a patch for 1.5.0 or mask it until 1.5.1 (wich I pressume is fixed) is released? err, i fixed trunk, not the branch ... but ive rectified that so 1.5.1 will include the fix ... thanks for reminding me ;) |