1 |
vapier 09/12/02 08:13:38 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: glibc-2.11-r1.ebuild |
5 |
Log: |
6 |
Push out some fixes and add the ports tarball. |
7 |
(Portage version: 2.2_rc51/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.663 sys-libs/glibc/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/glibc/ChangeLog?rev=1.663&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/glibc/ChangeLog?rev=1.663&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/glibc/ChangeLog?r1=1.662&r2=1.663 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v |
19 |
retrieving revision 1.662 |
20 |
retrieving revision 1.663 |
21 |
diff -u -r1.662 -r1.663 |
22 |
--- ChangeLog 1 Dec 2009 04:57:03 -0000 1.662 |
23 |
+++ ChangeLog 2 Dec 2009 08:13:37 -0000 1.663 |
24 |
@@ -1,6 +1,11 @@ |
25 |
# ChangeLog for sys-libs/glibc |
26 |
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.662 2009/12/01 04:57:03 vapier Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.663 2009/12/02 08:13:37 vapier Exp $ |
29 |
+ |
30 |
+*glibc-2.11-r1 (02 Dec 2009) |
31 |
+ |
32 |
+ 02 Dec 2009; Mike Frysinger <vapier@g.o> +glibc-2.11-r1.ebuild: |
33 |
+ Push out some fixes and add the ports tarball. |
34 |
|
35 |
01 Dec 2009; Mike Frysinger <vapier@g.o> files/eblits/common.eblit: |
36 |
Switch to common tc-has-tls function. |
37 |
|
38 |
|
39 |
|
40 |
1.1 sys-libs/glibc/glibc-2.11-r1.ebuild |
41 |
|
42 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/glibc/glibc-2.11-r1.ebuild?rev=1.1&view=markup |
43 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/glibc/glibc-2.11-r1.ebuild?rev=1.1&content-type=text/plain |
44 |
|
45 |
Index: glibc-2.11-r1.ebuild |
46 |
=================================================================== |
47 |
# Copyright 1999-2009 Gentoo Foundation |
48 |
# Distributed under the terms of the GNU General Public License v2 |
49 |
# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.11-r1.ebuild,v 1.1 2009/12/02 08:13:37 vapier Exp $ |
50 |
|
51 |
inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib |
52 |
|
53 |
DESCRIPTION="GNU libc6 (also called glibc2) C library" |
54 |
HOMEPAGE="http://www.gnu.org/software/libc/libc.html" |
55 |
|
56 |
LICENSE="LGPL-2" |
57 |
KEYWORDS="~amd64 ~ia64 ~s390 ~sparc ~x86" |
58 |
RESTRICT="strip" # strip ourself #46186 |
59 |
EMULTILIB_PKG="true" |
60 |
|
61 |
# Configuration variables |
62 |
if [[ ${PV} == *_p* ]] ; then |
63 |
RELEASE_VER=${PV%_p*} |
64 |
BRANCH_UPDATE="" |
65 |
SNAP_VER=${PV#*_p} |
66 |
else |
67 |
RELEASE_VER=${PV} |
68 |
BRANCH_UPDATE="" |
69 |
SNAP_VER="" |
70 |
fi |
71 |
MANPAGE_VER="" # pregenerated manpages |
72 |
INFOPAGE_VER="" # pregenerated infopages |
73 |
LIBIDN_VER="" # it's integrated into the main tarball now |
74 |
PATCH_VER="4" # Gentoo patchset |
75 |
PORTS_VER=${RELEASE_VER} # version of glibc ports addon |
76 |
LT_VER="" # version of linuxthreads addon |
77 |
NPTL_KERN_VER=${NPTL_KERN_VER:-"2.6.9"} # min kernel version nptl requires |
78 |
#LT_KERN_VER=${LT_KERN_VER:-"2.4.1"} # min kernel version linuxthreads requires |
79 |
|
80 |
IUSE="debug gd glibc-omitfp hardened multilib nls selinux profile vanilla crosscompile_opts_headers-only ${LT_VER:+glibc-compat20 nptl nptlonly}" |
81 |
S=${WORKDIR}/glibc-${RELEASE_VER}${SNAP_VER:+-${SNAP_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 |
[[ ${CTARGET} == hppa* ]] && NPTL_KERN_VER=${NPTL_KERN_VER/2.6.9/2.6.20} |
106 |
|
107 |
is_crosscompile() { |
108 |
[[ ${CHOST} != ${CTARGET} ]] |
109 |
} |
110 |
alt_libdir() { |
111 |
if is_crosscompile ; then |
112 |
echo /usr/${CTARGET}/$(get_libdir) |
113 |
else |
114 |
echo /$(get_libdir) |
115 |
fi |
116 |
} |
117 |
|
118 |
if is_crosscompile ; then |
119 |
SLOT="${CTARGET}-2.2" |
120 |
else |
121 |
# Why SLOT 2.2 you ask yourself while sippin your tea ? |
122 |
# Everyone knows 2.2 > 0, duh. |
123 |
SLOT="2.2" |
124 |
PROVIDE="virtual/libc" |
125 |
fi |
126 |
|
127 |
# General: We need a new-enough binutils for as-needed |
128 |
# arch: we need to make sure our binutils/gcc supports TLS |
129 |
DEPEND=">=sys-devel/gcc-3.4.4 |
130 |
arm? ( >=sys-devel/binutils-2.16.90 >=sys-devel/gcc-4.1.0 ) |
131 |
x86? ( >=sys-devel/gcc-4.3 ) |
132 |
amd64? ( >=sys-devel/binutils-2.19 multilib? ( >=sys-devel/gcc-4.3 ) ) |
133 |
ppc? ( >=sys-devel/gcc-4.1.0 ) |
134 |
ppc64? ( >=sys-devel/gcc-4.1.0 ) |
135 |
>=sys-devel/binutils-2.15.94 |
136 |
${LT_VER:+nptl? (} >=sys-kernel/linux-headers-${NPTL_KERN_VER} ${LT_VER:+)} |
137 |
>=sys-devel/gcc-config-1.3.12 |
138 |
>=app-misc/pax-utils-0.1.10 |
139 |
virtual/os-headers |
140 |
nls? ( sys-devel/gettext ) |
141 |
>=sys-apps/sandbox-1.2.18.1-r2 |
142 |
>=sys-apps/portage-2.1.2 |
143 |
selinux? ( sys-libs/libselinux )" |
144 |
RDEPEND="!sys-kernel/ps3-sources |
145 |
nls? ( sys-devel/gettext ) |
146 |
selinux? ( sys-libs/libselinux )" |
147 |
|
148 |
if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then |
149 |
DEPEND="${DEPEND} ${CATEGORY}/gcc" |
150 |
[[ ${CATEGORY} == *-linux* ]] && DEPEND="${DEPEND} ${CATEGORY}/linux-headers" |
151 |
else |
152 |
DEPEND="${DEPEND} >=sys-libs/timezone-data-2007c" |
153 |
RDEPEND="${RDEPEND} sys-libs/timezone-data" |
154 |
fi |
155 |
|
156 |
SRC_URI=$( |
157 |
upstream_uris() { |
158 |
echo mirror://gnu/glibc/$1 ftp://sources.redhat.com/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1 |
159 |
} |
160 |
gentoo_uris() { |
161 |
local devspace="HTTP~vapier/dist/URI HTTP~azarah/glibc/URI" |
162 |
devspace=${devspace//HTTP/http://dev.gentoo.org/} |
163 |
echo mirror://gentoo/$1 ${devspace//URI/$1} |
164 |
} |
165 |
|
166 |
TARNAME=${PN} |
167 |
if [[ -n ${SNAP_VER} ]] ; then |
168 |
TARNAME="${PN}-${RELEASE_VER}" |
169 |
[[ -n ${PORTS_VER} ]] && PORTS_VER=${SNAP_VER} |
170 |
upstream_uris ${TARNAME}-${SNAP_VER}.tar.bz2 |
171 |
else |
172 |
upstream_uris ${TARNAME}-${RELEASE_VER}.tar.bz2 |
173 |
fi |
174 |
[[ -n ${LIBIDN_VER} ]] && upstream_uris glibc-libidn-${LIBIDN_VER}.tar.bz2 |
175 |
[[ -n ${PORTS_VER} ]] && upstream_uris ${TARNAME}-ports-${PORTS_VER}.tar.bz2 |
176 |
[[ -n ${LT_VER} ]] && upstream_uris ${TARNAME}-linuxthreads-${LT_VER}.tar.bz2 |
177 |
[[ -n ${BRANCH_UPDATE} ]] && gentoo_uris glibc-${RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2 |
178 |
[[ -n ${PATCH_VER} ]] && gentoo_uris glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2 |
179 |
[[ -n ${MANPAGE_VER} ]] && gentoo_uris glibc-manpages-${MANPAGE_VER}.tar.bz2 |
180 |
[[ -n ${INFOPAGE_VER} ]] && gentoo_uris glibc-infopages-${INFOPAGE_VER}.tar.bz2 |
181 |
) |
182 |
|
183 |
# eblit-include [--skip] <function> [version] |
184 |
eblit-include() { |
185 |
local skipable=false |
186 |
[[ $1 == "--skip" ]] && skipable=true && shift |
187 |
[[ $1 == pkg_* ]] && skipable=true |
188 |
|
189 |
local e v func=$1 ver=$2 |
190 |
[[ -z ${func} ]] && die "Usage: eblit-include <function> [version]" |
191 |
for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do |
192 |
e="${FILESDIR}/eblits/${func}${v}.eblit" |
193 |
if [[ -e ${e} ]] ; then |
194 |
source "${e}" |
195 |
return 0 |
196 |
fi |
197 |
done |
198 |
${skipable} && return 0 |
199 |
die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/" |
200 |
} |
201 |
|
202 |
# eblit-run-maybe <function> |
203 |
# run the specified function if it is defined |
204 |
eblit-run-maybe() { |
205 |
[[ $(type -t "$@") == "function" ]] && "$@" |
206 |
} |
207 |
|
208 |
# eblit-run <function> [version] |
209 |
# aka: src_unpack() { eblit-run src_unpack ; } |
210 |
eblit-run() { |
211 |
eblit-include --skip common "${*:2}" |
212 |
eblit-include "$@" |
213 |
eblit-run-maybe eblit-$1-pre |
214 |
eblit-${PN}-$1 |
215 |
eblit-run-maybe eblit-$1-post |
216 |
} |
217 |
|
218 |
src_unpack() { eblit-run src_unpack ; } |
219 |
src_compile() { eblit-run src_compile ; } |
220 |
src_test() { eblit-run src_test ; } |
221 |
src_install() { eblit-run src_install ; } |
222 |
|
223 |
# FILESDIR might not be available during binpkg install |
224 |
for x in setup {pre,post}inst ; do |
225 |
e="${FILESDIR}/eblits/pkg_${x}.eblit" |
226 |
if [[ -e ${e} ]] ; then |
227 |
. "${e}" |
228 |
eval "pkg_${x}() { eblit-run pkg_${x} ; }" |
229 |
fi |
230 |
done |
231 |
|
232 |
eblit-src_unpack-post() { |
233 |
if use hardened ; then |
234 |
cd "${S}" |
235 |
einfo "Patching to get working PIE binaries on PIE (hardened) platforms" |
236 |
gcc-specs-pie && epatch "${FILESDIR}"/2.11/glibc-2.11-hardened-pie.patch |
237 |
epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-configure-picdefault.patch |
238 |
epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-inittls-nosysenter.patch |
239 |
|
240 |
einfo "Patching Glibc to support older SSP __guard" |
241 |
epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-ssp-compat.patch |
242 |
|
243 |
einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler" |
244 |
cp -f "${FILESDIR}"/2.6/glibc-2.6-gentoo-stack_chk_fail.c \ |
245 |
debug/stack_chk_fail.c || die |
246 |
cp -f "${FILESDIR}"/2.10/glibc-2.10-gentoo-chk_fail.c \ |
247 |
debug/chk_fail.c || die |
248 |
|
249 |
if use debug ; then |
250 |
# When using Hardened Gentoo stack handler, have smashes dump core for |
251 |
# analysis - debug only, as core could be an information leak |
252 |
# (paranoia). |
253 |
sed -i \ |
254 |
-e '/^CFLAGS-backtrace.c/ iCFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
255 |
debug/Makefile \ |
256 |
|| die "Failed to modify debug/Makefile for debug stack handler" |
257 |
sed -i \ |
258 |
-e '/^CFLAGS-backtrace.c/ iCFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
259 |
debug/Makefile \ |
260 |
|| die "Failed to modify debug/Makefile for debug fortify handler" |
261 |
fi |
262 |
|
263 |
# Build nscd with ssp-all |
264 |
sed -i \ |
265 |
-e 's:-fstack-protector$:-fstack-protector-all:' \ |
266 |
nscd/Makefile \ |
267 |
|| die "Failed to ensure nscd builds with ssp-all" |
268 |
fi |
269 |
} |
270 |
|
271 |
maint_pkg_create() { |
272 |
local base="/usr/local/src/gnu/glibc/glibc-${PV:0:1}_${PV:2:1}" |
273 |
cd ${base} |
274 |
local stamp=$(date +%Y%m%d) |
275 |
local d |
276 |
for d in libc ports ; do |
277 |
#(cd ${d} && cvs up) |
278 |
case ${d} in |
279 |
libc) tarball="${P}";; |
280 |
ports) tarball="${PN}-ports-${PV}";; |
281 |
esac |
282 |
rm -f ${tarball}* |
283 |
ln -sf ${d} ${tarball} |
284 |
tar hcf - ${tarball} --exclude-vcs | lzma > "${T}"/${tarball}.tar.lzma |
285 |
du -b "${T}"/${tarball}.tar.lzma |
286 |
done |
287 |
} |