sys-apps/sed with activated selinux use flag needs libselinux as build dependency. Reproducible: Always Steps to Reproduce: 1. remove libselinux 2. try to emerge sys-apps/sed with selinux use flag 3. emerge fails in build phase Actual Results: emerge fails with: "execute.c:35:29: schwerwiegender Fehler: selinux/selinux.h: Datei oder Verzeichnis nicht gefunden" Expected Results: emerge merges sys-libs/libselinux as dependency before merging sys-apps/sed[selinux]
done. however I'm not sure if sys-apps/sed should have USE="build" now for: sed/execute.c: #ifndef BOOTSTRAP #include <selinux/selinux.h> #include <selinux/context.h> #endif but I guess we'll find that out.
the sed buildsystem creates local dummy selinux headers with stub funcs so the includes work even when selinux isn't available
reverted the dep addition. indeed, m4/selinux-selinux-h.m4 should work. then we will need build.log and config.log attached here to find out why it isn't working. emerge --info missing too.
(In reply to comment #3) i think depending on libselinux on selinux systems is fine -- after all, they'll use the library, so we should make sure it's available to build+link against
*** Bug 498352 has been marked as a duplicate of this bug. ***
Reopen for Comment #4 and bug 498352 for re-evaluation
Yes; on SELinux systems sed is built with libselinux support: $ scanelf -n /bin/sed TYPE NEEDED FILE ET_DYN libselinux.so.1,libc.so.6 /bin/sed The SELinux support is to make sure that the context of the file it's editing is retained (which is needed if editing a file is done by creating a new file and moving it in place of the old file, as new files inherit contexts from the parent directory which might not be wanted).
should be all set now in the tree; thanks for the report! Commit message: Depend on libselinux when USE=selinux http://sources.gentoo.org/sys-apps/sed/sed-4.2.2.ebuild?r1=1.3&r2=1.4
Can we please also add sys-libs/libselinux conditional dependency to for sys-apps/sed-4.2.1-r1? sys-apps/sed-4.2.2 is currently unstable on amd64 and, Markus' original report still affects that older version of sed; namely, rebuilding sys-apps/sed-4.2.1-r1 with selinux USE flag after switching to a hardened/linux/amd64/selinux profile fails without libselinux: execute.c:35:29: fatal error: selinux/selinux.h: No such file or directory #include <selinux/selinux.h> ^
(In reply to Pariksheet Nanda from comment #9) i don't see value in that. the new version will go stable eventually.