Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 480960 - sys-libs/libselinux - please add multilib support
Summary: sys-libs/libselinux - please add multilib support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: SELinux (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Sven Vermeulen (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on: 481300
Blocks: gx86-multilib 480946 490968
  Show dependency tree
 
Reported: 2013-08-14 03:56 UTC by Alexandre Rostovtsev (RETIRED)
Modified: 2014-04-21 18:38 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild diff (sepol-multilib.patch,1.34 KB, patch)
2013-08-14 17:53 UTC, Alexis Ballier
Details | Diff
Buildlog for libsepol with multilib ebuild fixes (sys-libs:libsepol-2.1.9-r2:20130815-062707.log,16.75 KB, text/x-log)
2013-08-15 06:32 UTC, Sven Vermeulen (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-08-14 03:56:37 UTC
Needed by multilib dev-libs/glib when USE=selinux; see bugs 480946 and 479282
Comment 1 Sven Vermeulen (RETIRED) gentoo-dev 2013-08-14 17:19:38 UTC
I'll need some assistance here; how/what does it mean to make a "multilib libselinux"? I have SELinux enabled on a multilib profile (hardened/linux/amd64/selinux) and on no-multilib profiles (hardened/linux/amd64/no-multilbi/selinux) without issues.
Comment 2 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-08-14 17:39:55 UTC
By "multilib libselinux" I mean using multilib-minimal.eclass or autotools-multilib.eclass to build libraries and install ABI-specific headers for multiple ABIs at once: for example, for both 32-bit and 64-bit on an amd64 profile. So that instead of using hacks like emul-linux-x86-*, and constantly running into bugs caused by normal package versions and emul-linux-x86-* versions getting out of sync, binary 32-bit packages that need glib would simply depend on glib[abi_x86_32].

See e.g. sys-libs/zlib-1.2.8-r1, dev-libs/glib-2.36.3-r2, or media-libs/libjpeg-turbo-1.3.0-r2 for some examples of how other packages do this.
Comment 3 Alexis Ballier gentoo-dev 2013-08-14 17:53:56 UTC
Created attachment 356016 [details, diff]
ebuild diff

a quick look at it shows that libpcre and libsepol should be converted first
Comment 4 Alexis Ballier gentoo-dev 2013-08-14 17:55:16 UTC
(In reply to Alexis Ballier from comment #3)
> Created attachment 356016 [details, diff] [details, diff]
> ebuild diff
> 
> a quick look at it shows that libpcre and libsepol should be converted first

pressed enter too quickly:

attached is a diff for libsepol; libselinux conversion could be done in a similar way but first needs libpcre


tl;dr: you can apply this libsepol patch if you're happy with it and then wait for libpcre to be converted
Comment 5 Sven Vermeulen (RETIRED) gentoo-dev 2013-08-15 06:32:15 UTC
Created attachment 356054 [details]
Buildlog for libsepol with multilib ebuild fixes

I'm testing the libsepol patch on my systems, but on my multilib system, it installs the same files as before:

~$ qlist libsepol | grep lib
/lib64/libsepol.so.1
/usr/lib64/pkgconfig/libsepol.pc
/usr/lib64/libsepol.a
/usr/lib64/libsepol.so

Shouldn't this now also include /lib/libsepol.so.1 or so?
Comment 6 Alexis Ballier gentoo-dev 2013-08-15 16:47:54 UTC
(In reply to Sven Vermeulen from comment #5)
> Created attachment 356054 [details]
> Buildlog for libsepol with multilib ebuild fixes
> 
> I'm testing the libsepol patch on my systems, but on my multilib system, it
> installs the same files as before:
> 
> ~$ qlist libsepol | grep lib
> /lib64/libsepol.so.1
> /usr/lib64/pkgconfig/libsepol.pc
> /usr/lib64/libsepol.a
> /usr/lib64/libsepol.so
> 
> Shouldn't this now also include /lib/libsepol.so.1 or so?

/lib32, yes, but for this you need to enable abi_x86_32 :) (or set ABI_X86="64 32" in make.conf)
Comment 7 Sven Vermeulen (RETIRED) gentoo-dev 2013-08-15 18:24:07 UTC
Cool thanks!

sys-libs/libsepol is updated/committed.

there's no bugreport for libpcre yet is there?
Comment 8 Alexis Ballier gentoo-dev 2013-08-15 18:42:16 UTC
(In reply to Sven Vermeulen from comment #7)
> there's no bugreport for libpcre yet is there?

nope; it needs libedit/libreadline which in turn need ncurses for which there is a bug
Comment 9 Sven Vermeulen (RETIRED) gentoo-dev 2013-11-04 19:44:34 UTC
I was about to start on this one, but then I noticed libselinux also uses python_copy_sources; doesn't this interfere with multilib_copysources?
Comment 10 Alexis Ballier gentoo-dev 2013-11-17 11:37:41 UTC
(In reply to Sven Vermeulen from comment #9)
> I was about to start on this one, but then I noticed libselinux also uses
> python_copy_sources; doesn't this interfere with multilib_copysources?

it should work just the same but you should disable python & ruby stuff for non native ABIs: it will not work and is useless

i.e, in your code:

'if use python; then' becomes 'if multilib_is_native_abi && use python; then'
in multilib_src_*

and also, python_copy_sources is better ran in multilib_src_compile since you will enter this function with a correctly set BUILD_DIR env var
Comment 11 Sven Vermeulen (RETIRED) gentoo-dev 2014-02-02 16:17:27 UTC
sys-libs/libselinux-2.2.2-r1 now has multilib support. ˜arch for now; also bumped to version 2.2.2
Comment 12 Sven Vermeulen (RETIRED) gentoo-dev 2014-04-21 18:38:54 UTC
libselinux-2.2.2-r4 is now stable