1 |
vapier 08/12/27 04:20:52 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: glibc-2.9_p20081201-r1.ebuild |
5 |
Log: |
6 |
Fix popen() issues and get more arches usable. |
7 |
(Portage version: 2.2_rc18/cvs/Linux 2.6.28 x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.599 sys-libs/glibc/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/glibc/ChangeLog?rev=1.599&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/glibc/ChangeLog?rev=1.599&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/glibc/ChangeLog?r1=1.598&r2=1.599 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v |
19 |
retrieving revision 1.598 |
20 |
retrieving revision 1.599 |
21 |
diff -u -r1.598 -r1.599 |
22 |
--- ChangeLog 24 Dec 2008 13:48:22 -0000 1.598 |
23 |
+++ ChangeLog 27 Dec 2008 04:20:52 -0000 1.599 |
24 |
@@ -1,6 +1,12 @@ |
25 |
# ChangeLog for sys-libs/glibc |
26 |
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.598 2008/12/24 13:48:22 vapier Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.599 2008/12/27 04:20:52 vapier Exp $ |
29 |
+ |
30 |
+*glibc-2.9_p20081201-r1 (27 Dec 2008) |
31 |
+ |
32 |
+ 27 Dec 2008; Mike Frysinger <vapier@g.o> |
33 |
+ +glibc-2.9_p20081201-r1.ebuild: |
34 |
+ Fix popen() issues and get more arches usable. |
35 |
|
36 |
24 Dec 2008; Mike Frysinger <vapier@g.o> |
37 |
glibc-2.8_p20080602-r1.ebuild: |
38 |
|
39 |
|
40 |
|
41 |
1.1 sys-libs/glibc/glibc-2.9_p20081201-r1.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/glibc/glibc-2.9_p20081201-r1.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/glibc/glibc-2.9_p20081201-r1.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: glibc-2.9_p20081201-r1.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2008 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.9_p20081201-r1.ebuild,v 1.1 2008/12/27 04:20:52 vapier Exp $ |
51 |
|
52 |
inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib |
53 |
|
54 |
DESCRIPTION="GNU libc6 (also called glibc2) C library" |
55 |
HOMEPAGE="http://www.gnu.org/software/libc/libc.html" |
56 |
|
57 |
LICENSE="LGPL-2" |
58 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
59 |
RESTRICT="strip" # strip ourself #46186 |
60 |
EMULTILIB_PKG="true" |
61 |
|
62 |
# Configuration variables |
63 |
if [[ ${PV} == *_p* ]] ; then |
64 |
RELEASE_VER=${PV%_p*} |
65 |
BRANCH_UPDATE="" |
66 |
SNAP_VER=${PV#*_p} |
67 |
else |
68 |
RELEASE_VER=${PV} |
69 |
BRANCH_UPDATE="" |
70 |
SNAP_VER="" |
71 |
fi |
72 |
MANPAGE_VER="" # pregenerated manpages |
73 |
INFOPAGE_VER="" # pregenerated infopages |
74 |
PATCH_VER="2" # Gentoo patchset |
75 |
PORTS_VER=${RELEASE_VER} # version of glibc ports addon |
76 |
LIBIDN_VER="" # version of libidn addon |
77 |
LT_VER="" # version of linuxthreads addon |
78 |
NPTL_KERN_VER=${NPTL_KERN_VER:-"2.6.9"} # min kernel version nptl requires |
79 |
#LT_KERN_VER=${LT_KERN_VER:-"2.4.1"} # min kernel version linuxthreads requires |
80 |
|
81 |
IUSE="debug gd glibc-omitfp glibc-compat20 hardened multilib nls selinux profile vanilla crosscompile_opts_headers-only ${LT_VER:+glibc-compat20 nptl nptlonly}" |
82 |
S=${WORKDIR}/glibc-${RELEASE_VER}${SNAP_VER+-${SNAP_VER}} |
83 |
|
84 |
# Here's how the cross-compile logic breaks down ... |
85 |
# CTARGET - machine that will target the binaries |
86 |
# CHOST - machine that will host the binaries |
87 |
# CBUILD - machine that will build the binaries |
88 |
# If CTARGET != CHOST, it means you want a libc for cross-compiling. |
89 |
# If CHOST != CBUILD, it means you want to cross-compile the libc. |
90 |
# CBUILD = CHOST = CTARGET - native build/install |
91 |
# CBUILD != (CHOST = CTARGET) - cross-compile a native build |
92 |
# (CBUILD = CHOST) != CTARGET - libc for cross-compiler |
93 |
# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler |
94 |
# For install paths: |
95 |
# CHOST = CTARGET - install into / |
96 |
# CHOST != CTARGET - install into /usr/CTARGET/ |
97 |
|
98 |
export CBUILD=${CBUILD:-${CHOST}} |
99 |
export CTARGET=${CTARGET:-${CHOST}} |
100 |
if [[ ${CTARGET} == ${CHOST} ]] ; then |
101 |
if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then |
102 |
export CTARGET=${CATEGORY/cross-} |
103 |
fi |
104 |
fi |
105 |
|
106 |
[[ ${CTARGET} == hppa* ]] && NPTL_KERN_VER=${NPTL_KERN_VER/2.6.9/2.6.20} |
107 |
|
108 |
is_crosscompile() { |
109 |
[[ ${CHOST} != ${CTARGET} ]] |
110 |
} |
111 |
alt_libdir() { |
112 |
if is_crosscompile ; then |
113 |
echo /usr/${CTARGET}/$(get_libdir) |
114 |
else |
115 |
echo /$(get_libdir) |
116 |
fi |
117 |
} |
118 |
|
119 |
if is_crosscompile ; then |
120 |
SLOT="${CTARGET}-2.2" |
121 |
else |
122 |
# Why SLOT 2.2 you ask yourself while sippin your tea ? |
123 |
# Everyone knows 2.2 > 0, duh. |
124 |
SLOT="2.2" |
125 |
PROVIDE="virtual/libc" |
126 |
fi |
127 |
|
128 |
# General: We need a new-enough binutils for as-needed |
129 |
# arch: we need to make sure our binutils/gcc supports TLS |
130 |
DEPEND=">=sys-devel/gcc-3.4.4 |
131 |
arm? ( >=sys-devel/binutils-2.16.90 >=sys-devel/gcc-4.1.0 ) |
132 |
ppc? ( >=sys-devel/gcc-4.1.0 ) |
133 |
ppc64? ( >=sys-devel/gcc-4.1.0 ) |
134 |
>=sys-devel/binutils-2.15.94 |
135 |
${LT_VER:+nptl? (} >=sys-kernel/linux-headers-${NPTL_KERN_VER} ${LT_VER:+)} |
136 |
>=sys-devel/gcc-config-1.3.12 |
137 |
>=app-misc/pax-utils-0.1.10 |
138 |
virtual/os-headers |
139 |
nls? ( sys-devel/gettext ) |
140 |
>=sys-apps/sandbox-1.2.18.1-r2 |
141 |
>=sys-apps/portage-2.1.2 |
142 |
selinux? ( sys-libs/libselinux )" |
143 |
RDEPEND="nls? ( sys-devel/gettext ) |
144 |
selinux? ( sys-libs/libselinux )" |
145 |
|
146 |
if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then |
147 |
DEPEND="${DEPEND} ${CATEGORY}/gcc" |
148 |
[[ ${CATEGORY} == *-linux* ]] && DEPEND="${DEPEND} ${CATEGORY}/linux-headers" |
149 |
else |
150 |
DEPEND="${DEPEND} >=sys-libs/timezone-data-2007c" |
151 |
RDEPEND="${RDEPEND} sys-libs/timezone-data" |
152 |
fi |
153 |
|
154 |
SRC_URI=$( |
155 |
upstream_uris() { |
156 |
echo mirror://gnu/glibc/$1 ftp://sources.redhat.com/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1 |
157 |
} |
158 |
gentoo_uris() { |
159 |
local devspace="HTTP~vapier/dist/URI HTTP~azarah/glibc/URI" |
160 |
devspace=${devspace//HTTP/http://dev.gentoo.org/} |
161 |
echo mirror://gentoo/$1 ${devspace//URI/$1} |
162 |
} |
163 |
|
164 |
TARNAME=${PN} |
165 |
if [[ -n ${SNAP_VER} ]] ; then |
166 |
TARNAME="${PN}-${RELEASE_VER}" |
167 |
[[ -n ${PORTS_VER} ]] && PORTS_VER=${SNAP_VER} |
168 |
upstream_uris ${TARNAME}-${SNAP_VER}.tar.bz2 |
169 |
else |
170 |
upstream_uris ${TARNAME}-${RELEASE_VER}.tar.bz2 |
171 |
fi |
172 |
[[ -n ${LIBIDN_VER} ]] && upstream_uris glibc-libidn-${LIBIDN_VER}.tar.bz2 |
173 |
[[ -n ${PORTS_VER} ]] && upstream_uris ${TARNAME}-ports-${PORTS_VER}.tar.bz2 |
174 |
[[ -n ${LT_VER} ]] && upstream_uris ${TARNAME}-linuxthreads-${LT_VER}.tar.bz2 |
175 |
[[ -n ${BRANCH_UPDATE} ]] && gentoo_uris glibc-${RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2 |
176 |
[[ -n ${PATCH_VER} ]] && gentoo_uris glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2 |
177 |
[[ -n ${MANPAGE_VER} ]] && gentoo_uris glibc-manpages-${MANPAGE_VER}.tar.bz2 |
178 |
[[ -n ${INFOPAGE_VER} ]] && gentoo_uris glibc-infopages-${INFOPAGE_VER}.tar.bz2 |
179 |
) |
180 |
|
181 |
# eblit-include [--skip] <function> [version] |
182 |
eblit-include() { |
183 |
local skipable=false |
184 |
[[ $1 == "--skip" ]] && skipable=true && shift |
185 |
|
186 |
local e v func=$1 ver=$2 |
187 |
[[ -z ${func} ]] && die "Usage: eblit-include <function> [version]" |
188 |
for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do |
189 |
e="${FILESDIR}/eblits/${func}${v}.eblit" |
190 |
if [[ -e ${e} ]] ; then |
191 |
source "${e}" |
192 |
return 0 |
193 |
fi |
194 |
done |
195 |
${skipable} && return 0 |
196 |
die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/" |
197 |
} |
198 |
|
199 |
# eblit-run-maybe <function> |
200 |
# run the specified function if it is defined |
201 |
eblit-run-maybe() { |
202 |
[[ $(type -t "$@") == "function" ]] && "$@" |
203 |
} |
204 |
|
205 |
# eblit-run <function> [version] |
206 |
# aka: src_unpack() { eblit-run src_unpack ; } |
207 |
eblit-run() { |
208 |
eblit-include --skip common "${*:2}" |
209 |
eblit-include "$@" |
210 |
eblit-run-maybe eblit-$1-pre |
211 |
eblit-${PN}-$1 || die |
212 |
eblit-run-maybe eblit-$1-post |
213 |
} |
214 |
|
215 |
src_unpack() { eblit-run src_unpack ; } |
216 |
src_compile() { eblit-run src_compile ; } |
217 |
src_test() { eblit-run src_test ; } |
218 |
src_install() { eblit-run src_install ; } |
219 |
|
220 |
eblit-src_unpack-post() { |
221 |
if use hardened ; then |
222 |
cd "${S}" |
223 |
einfo "Patching to get working PIE binaries on PIE (hardened) platforms" |
224 |
gcc-specs-pie && epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-pie.patch |
225 |
epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-configure-picdefault.patch |
226 |
epatch "${FILESDIR}"/2.7/glibc-2.7-hardened-inittls-nosysenter.patch |
227 |
|
228 |
einfo "Installing Hardened Gentoo SSP handler" |
229 |
cp -f "${FILESDIR}"/2.6/glibc-2.6-gentoo-stack_chk_fail.c \ |
230 |
debug/stack_chk_fail.c || die |
231 |
|
232 |
if use debug ; then |
233 |
# When using Hardened Gentoo stack handler, have smashes dump core for |
234 |
# analysis - debug only, as core could be an information leak |
235 |
# (paranoia). |
236 |
sed -i \ |
237 |
-e '/^CFLAGS-backtrace.c/ iCFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
238 |
debug/Makefile \ |
239 |
|| die "Failed to modify debug/Makefile for debug stack handler" |
240 |
fi |
241 |
|
242 |
# Build nscd with ssp-all |
243 |
sed -i \ |
244 |
-e 's:-fstack-protector$:-fstack-protector-all:' \ |
245 |
nscd/Makefile \ |
246 |
|| die "Failed to ensure nscd builds with ssp-all" |
247 |
fi |
248 |
} |
249 |
|
250 |
maint_pkg_create() { |
251 |
local base="/usr/local/src/gnu/glibc/glibc-${PV:0:1}_${PV:2:1}" |
252 |
cd ${base} |
253 |
local stamp=$(date +%Y%m%d) |
254 |
local d |
255 |
for d in libc ports ; do |
256 |
#(cd ${d} && cvs up) |
257 |
case ${d} in |
258 |
libc) tarball="${P}";; |
259 |
ports) tarball="${PN}-ports-${PV}";; |
260 |
esac |
261 |
rm -f ${tarball}* |
262 |
ln -sf ${d} ${tarball} |
263 |
tar hcf - ${tarball} --exclude-vcs | lzma > "${T}"/${tarball}.tar.lzma |
264 |
du -b "${T}"/${tarball}.tar.lzma |
265 |
done |
266 |
} |
267 |
|
268 |
pkg_setup() { |
269 |
# prevent native builds from downgrading ... maybe update to allow people |
270 |
# to change between diff -r versions ? (2.3.6-r4 -> 2.3.6-r2) |
271 |
if [[ ${ROOT} == "/" ]] && [[ ${CBUILD} == ${CHOST} ]] && [[ ${CHOST} == ${CTARGET} ]] ; then |
272 |
if has_version '>'${CATEGORY}/${PF} ; then |
273 |
eerror "Sanity check to keep you from breaking your system:" |
274 |
eerror " Downgrading glibc is not supported and a sure way to destruction" |
275 |
die "aborting to save your system" |
276 |
fi |
277 |
fi |
278 |
|
279 |
# users have had a chance to phase themselves, time to give em the boot |
280 |
if [[ -e ${ROOT}/etc/locale.gen ]] && [[ -e ${ROOT}/etc/locales.build ]] ; then |
281 |
eerror "You still haven't deleted ${ROOT}/etc/locales.build." |
282 |
eerror "Do so now after making sure ${ROOT}/etc/locale.gen is kosher." |
283 |
die "lazy upgrader detected" |
284 |
fi |
285 |
|
286 |
if [[ ${CTARGET} == i386-* ]] ; then |
287 |
eerror "i386 CHOSTs are no longer supported." |
288 |
eerror "Chances are you don't actually want/need i386." |
289 |
eerror "Please read http://www.gentoo.org/doc/en/change-chost.xml" |
290 |
die "please fix your CHOST" |
291 |
fi |
292 |
|
293 |
if [[ -n ${LT_VER} ]] ; then |
294 |
if use nptlonly && ! use nptl ; then |
295 |
eerror "If you want nptlonly, add nptl to your USE too ;p" |
296 |
die "nptlonly without nptl" |
297 |
fi |
298 |
fi |
299 |
|
300 |
if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then |
301 |
ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS." |
302 |
ewarn "This will result in a 50% performance penalty, which is probably not what you want." |
303 |
fi |
304 |
|
305 |
use hardened && ! gcc-specs-pie && \ |
306 |
ewarn "PIE hardening not applied, as your compiler doesn't default to PIE" |
307 |
} |
308 |
|
309 |
fix_lib64_symlinks() { |
310 |
# the original Gentoo/AMD64 devs decided that since 64bit is the native |
311 |
# bitdepth for AMD64, lib should be used for 64bit libraries. however, |
312 |
# this ignores the FHS and breaks multilib horribly... especially |
313 |
# since it wont even work without a lib64 symlink anyways. *rolls eyes* |
314 |
# see bug 59710 for more information. |
315 |
# Travis Tilley <lv@g.o> (08 Aug 2004) |
316 |
if [ -L ${ROOT}/lib64 ] ; then |
317 |
ewarn "removing /lib64 symlink and moving lib to lib64..." |
318 |
ewarn "dont hit ctrl-c until this is done" |
319 |
rm ${ROOT}/lib64 |
320 |
# now that lib64 is gone, nothing will run without calling ld.so |
321 |
# directly. luckily the window of brokenness is almost non-existant |
322 |
use amd64 && /lib/ld-linux-x86-64.so.2 /bin/mv ${ROOT}/lib ${ROOT}/lib64 |
323 |
use ppc64 && /lib/ld64.so.1 /bin/mv ${ROOT}/lib ${ROOT}/lib64 |
324 |
# all better :) |
325 |
ldconfig |
326 |
ln -s lib64 ${ROOT}/lib |
327 |
einfo "done! :-)" |
328 |
einfo "fixed broken lib64/lib symlink in ${ROOT}" |
329 |
fi |
330 |
if [ -L ${ROOT}/usr/lib64 ] ; then |
331 |
rm ${ROOT}/usr/lib64 |
332 |
mv ${ROOT}/usr/lib ${ROOT}/usr/lib64 |
333 |
ln -s lib64 ${ROOT}/usr/lib |
334 |
einfo "fixed broken lib64/lib symlink in ${ROOT}/usr" |
335 |
fi |
336 |
if [ -L ${ROOT}/usr/X11R6/lib64 ] ; then |
337 |
rm ${ROOT}/usr/X11R6/lib64 |
338 |
mv ${ROOT}/usr/X11R6/lib ${ROOT}/usr/X11R6/lib64 |
339 |
ln -s lib64 ${ROOT}/usr/X11R6/lib |
340 |
einfo "fixed broken lib64/lib symlink in ${ROOT}/usr/X11R6" |
341 |
fi |
342 |
} |
343 |
|
344 |
pkg_preinst() { |
345 |
# nothing to do if just installing headers |
346 |
just_headers && return |
347 |
|
348 |
# PPC64+others may want to eventually be added to this logic if they |
349 |
# decide to be multilib compatible and FHS compliant. note that this |
350 |
# chunk of FHS compliance only applies to 64bit archs where 32bit |
351 |
# compatibility is a major concern (not IA64, for example). |
352 |
|
353 |
# amd64's 2005.0 is the first amd64 profile to not need this code. |
354 |
# 2005.0 is setup properly, and this is executed as part of the |
355 |
# 2004.3 -> 2005.0 upgrade script. |
356 |
# It can be removed after 2004.3 has been purged from portage. |
357 |
{ use amd64 || use ppc64; } && [ "$(get_libdir)" == "lib64" ] && ! has_multilib_profile && fix_lib64_symlinks |
358 |
|
359 |
# it appears that /lib/tls is sometimes not removed. See bug |
360 |
# 69258 for more info. |
361 |
if [[ -d ${ROOT}/$(alt_libdir)/tls ]] && [[ ! -d ${D}/$(alt_libdir)/tls ]] ; then |
362 |
ewarn "nptlonly or -nptl in USE, removing /${ROOT}$(alt_libdir)/tls..." |
363 |
rm -r "${ROOT}"/$(alt_libdir)/tls || die |
364 |
fi |
365 |
|
366 |
# simple test to make sure our new glibc isnt completely broken. |
367 |
# make sure we don't test with statically built binaries since |
368 |
# they will fail. also, skip if this glibc is a cross compiler. |
369 |
[[ ${ROOT} != "/" ]] && return 0 |
370 |
[[ -d ${D}/$(get_libdir) ]] || return 0 |
371 |
cd / #228809 |
372 |
local x striptest |
373 |
for x in date env ls true uname ; do |
374 |
x=$(type -p ${x}) |
375 |
[[ -z ${x} ]] && continue |
376 |
striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) |
377 |
[[ -z ${striptest} ]] && continue |
378 |
[[ ${striptest} == *"statically linked"* ]] && continue |
379 |
"${D}"/$(get_libdir)/ld-*.so \ |
380 |
--library-path "${D}"/$(get_libdir) \ |
381 |
${x} > /dev/null \ |
382 |
|| die "simple run test (${x}) failed" |
383 |
done |
384 |
} |
385 |
|
386 |
pkg_postinst() { |
387 |
# nothing to do if just installing headers |
388 |
just_headers && return |
389 |
|
390 |
if ! tc-is-cross-compiler && [[ -x ${ROOT}/usr/sbin/iconvconfig ]] ; then |
391 |
# Generate fastloading iconv module configuration file. |
392 |
"${ROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}" |
393 |
fi |
394 |
|
395 |
if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then |
396 |
# Reload init ... |
397 |
/sbin/telinit U |
398 |
|
399 |
# if the host locales.gen contains no entries, we'll install everything |
400 |
local locale_list="${ROOT}etc/locale.gen" |
401 |
if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then |
402 |
ewarn "Generating all locales; edit /etc/locale.gen to save time/space" |
403 |
locale_list="${ROOT}usr/share/i18n/SUPPORTED" |
404 |
fi |
405 |
local x jobs |
406 |
for x in ${MAKEOPTS} ; do [[ ${x} == -j* ]] && jobs=${x#-j} ; done |
407 |
locale-gen -j ${jobs:-1} --config "${locale_list}" |
408 |
fi |
409 |
} |