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