[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    [gentoo-dev] RFC: News item about musl upgrade
From:       "Anthony G. Basile" <blueness () gentoo ! org>
Date:       2014-10-21 21:14:09
Message-ID: 5446CCA1.9070405 () gentoo ! org
[Download RAW message or body]

Hi everyone,

musl is an experimental new standard C library.  Its actively being 
developed by Rich Felker (dalias) and I've got it working in Gentoo for 
amd64, i686, armv7a and mipsel3.  The amd64 and armv7a stages even have 
userland hardening.

musl only recently got Native Language Support (nls), ie gettext() and 
friends.  In previous gentoo-musl stage3's, I was using 
sys-devel/gettext to provide nls via libintl.so.  But now musl provides 
it as glibc does.  I recently migrated the ebuilds and stages to nls 
support via musl.  I recommend starting with new stages, but users that 
want to upgrade their systems are going to have to do extra steps.  This 
news item describes those extra steps.


Title: Upgrading to musl 1.1.5
Author: Anthony G. Basile <blueness@gentoo.org>
Content-Type: text/plain
Posted: 2014-10-20
Revision: 1
News-Item-Format: 1.0
Display-If-Installed: sys-libs/musl

Versions 1.1.4 and above of musl provides Native Language Support (nls).  Up
till now, Gentoo musl stages have used GNU gettext to provide nls via 
libintl.so
and linked applications against it.  Beginning with musl-1.1.5 we are 
switching
to nls provided by musl.  Since musl is experimental, you are better off 
starting
with a new stage3 dated later than 2014-10-20.  However, if you wish to 
upgrade
an existing system, you can proceed as follows:

1. Remove any references to -lintl from /etc/portage/package.env and
/etc/portage/env/*.  If you did not modify these from the original stage3
then you can just do `rm -rf /etc/portage/package.env /etc/portage/env`

2. Update your system, except for musl:

     emerge --exclude musl -uvNDq world

3. Remove the libintl header belonging to gettext:

     rm -f /usr/include/libintl.h

4. Now you can update musl without a file collision:

     emerge -1q =sys-libs/musl-1.1.5

5. We need to turn USE=nls off in gettext:

     echo "=sys-devel/gettext-0.19.3 ~amd64" >> 
/etc/portage/package.accept_keywords
     echo "sys-devel/gettext -nls" >> /etc/portage/package.use
     emerge -1 gettext

Replace ~amd64 with your arch.

6. Rebuild any packages that might be linking against libintl.so:

     USE=-nls emerge -uvDNq world

7. The previous step probably missed some executables, so find them all:

     for i in /bin/* /sbin/ /usr/bin/* /usr/sbin/* ; do
         readelf -d $i 2>&1 | grep -q libintl.so && echo $i
     done

You can identify what packages these belong to uing `equery b <exe>`  
Rebuild
those packages.

8. At this point you can remove /usr/lib/libintl.so*.  To be safe, check 
that
all your coreutils utilities (like mv, cp, ls, etc.) really aren't linking
against libintl.so as described in the previous step and then mv that 
library
out of the dynamic linker's search path.

9. While not strictly necessary, you can rebuild your entire system to make
sure everything links nicely against the new libc.so: emerge -evq world

-- 
Anthony G. Basile, Ph.D.
Gentoo Linux Developer [Hardened]
E-Mail    : blueness@gentoo.org
GnuPG FP  : 1FED FAD9 D82C 52A5 3BAB  DC79 9384 FA6E F52D 4BBA
GnuPG ID  : F52D4BBA


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic