1 |
vapier 12/01/01 09:47:27 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: glibc-2.14.1-r2.ebuild |
5 |
Log: |
6 |
Workaround POSIX I/O issues #370413, and add fix for tzfile security issues #393477, and a few other random fixes. |
7 |
|
8 |
(Portage version: 2.2.0_alpha81/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.811 sys-libs/glibc/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/ChangeLog?rev=1.811&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/ChangeLog?rev=1.811&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/ChangeLog?r1=1.810&r2=1.811 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v |
20 |
retrieving revision 1.810 |
21 |
retrieving revision 1.811 |
22 |
diff -u -r1.810 -r1.811 |
23 |
--- ChangeLog 30 Dec 2011 15:06:47 -0000 1.810 |
24 |
+++ ChangeLog 1 Jan 2012 09:47:27 -0000 1.811 |
25 |
@@ -1,6 +1,12 @@ |
26 |
# ChangeLog for sys-libs/glibc |
27 |
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.810 2011/12/30 15:06:47 halcy0n Exp $ |
29 |
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
30 |
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.811 2012/01/01 09:47:27 vapier Exp $ |
31 |
+ |
32 |
+*glibc-2.14.1-r2 (01 Jan 2012) |
33 |
+ |
34 |
+ 01 Jan 2012; Mike Frysinger <vapier@g.o> +glibc-2.14.1-r2.ebuild: |
35 |
+ Workaround POSIX I/O issues #370413, and add fix for tzfile security issues |
36 |
+ #393477, and a few other random fixes. |
37 |
|
38 |
29 Dec 2011; Mark Loeser <halcy0n@g.o> glibc-2.13-r4.ebuild: |
39 |
Stable for ppc/ppc64; bug #382377 |
40 |
|
41 |
|
42 |
|
43 |
1.1 sys-libs/glibc/glibc-2.14.1-r2.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/glibc-2.14.1-r2.ebuild?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/glibc-2.14.1-r2.ebuild?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: glibc-2.14.1-r2.ebuild |
49 |
=================================================================== |
50 |
# Copyright 1999-2012 Gentoo Foundation |
51 |
# Distributed under the terms of the GNU General Public License v2 |
52 |
# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.14.1-r2.ebuild,v 1.1 2012/01/01 09:47:27 vapier Exp $ |
53 |
|
54 |
inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib |
55 |
|
56 |
DESCRIPTION="GNU libc6 (also called glibc2) C library" |
57 |
HOMEPAGE="http://www.gnu.org/software/libc/libc.html" |
58 |
|
59 |
LICENSE="LGPL-2" |
60 |
KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
61 |
RESTRICT="strip" # strip ourself #46186 |
62 |
EMULTILIB_PKG="true" |
63 |
|
64 |
# Configuration variables |
65 |
RELEASE_VER="" |
66 |
BRANCH_UPDATE="" |
67 |
SNAP_VER="" |
68 |
case ${PV} in |
69 |
9999*) |
70 |
EGIT_REPO_URIS=( "git://sourceware.org/git/glibc.git" "git://sourceware.org/git/glibc-ports.git" ) |
71 |
EGIT_SOURCEDIRS=( "${S}" "${S}/ports" ) |
72 |
inherit git-2 |
73 |
;; |
74 |
*_p*) |
75 |
RELEASE_VER=${PV%_p*} |
76 |
SNAP_VER=${PV#*_p} |
77 |
;; |
78 |
*) |
79 |
RELEASE_VER=${PV} |
80 |
;; |
81 |
esac |
82 |
MANPAGE_VER="" # pregenerated manpages |
83 |
INFOPAGE_VER="" # pregenerated infopages |
84 |
LIBIDN_VER="" # it's integrated into the main tarball now |
85 |
PATCH_VER="3" # Gentoo patchset |
86 |
PORTS_VER=${RELEASE_VER} # version of glibc ports addon |
87 |
LT_VER="" # version of linuxthreads addon |
88 |
NPTL_KERN_VER=${NPTL_KERN_VER:-"2.6.9"} # min kernel version nptl requires |
89 |
#LT_KERN_VER=${LT_KERN_VER:-"2.4.1"} # min kernel version linuxthreads requires |
90 |
|
91 |
IUSE="debug gd glibc-omitfp hardened multilib nls selinux profile vanilla crosscompile_opts_headers-only ${LT_VER:+glibc-compat20 nptl linuxthreads}" |
92 |
[[ -n ${RELEASE_VER} ]] && S=${WORKDIR}/glibc-${RELEASE_VER}${SNAP_VER:+-${SNAP_VER}} |
93 |
|
94 |
# Here's how the cross-compile logic breaks down ... |
95 |
# CTARGET - machine that will target the binaries |
96 |
# CHOST - machine that will host the binaries |
97 |
# CBUILD - machine that will build the binaries |
98 |
# If CTARGET != CHOST, it means you want a libc for cross-compiling. |
99 |
# If CHOST != CBUILD, it means you want to cross-compile the libc. |
100 |
# CBUILD = CHOST = CTARGET - native build/install |
101 |
# CBUILD != (CHOST = CTARGET) - cross-compile a native build |
102 |
# (CBUILD = CHOST) != CTARGET - libc for cross-compiler |
103 |
# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler |
104 |
# For install paths: |
105 |
# CHOST = CTARGET - install into / |
106 |
# CHOST != CTARGET - install into /usr/CTARGET/ |
107 |
|
108 |
export CBUILD=${CBUILD:-${CHOST}} |
109 |
export CTARGET=${CTARGET:-${CHOST}} |
110 |
if [[ ${CTARGET} == ${CHOST} ]] ; then |
111 |
if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then |
112 |
export CTARGET=${CATEGORY/cross-} |
113 |
fi |
114 |
fi |
115 |
|
116 |
[[ ${CTARGET} == hppa* ]] && NPTL_KERN_VER=${NPTL_KERN_VER/2.6.9/2.6.20} |
117 |
|
118 |
is_crosscompile() { |
119 |
[[ ${CHOST} != ${CTARGET} ]] |
120 |
} |
121 |
alt_libdir() { |
122 |
if is_crosscompile ; then |
123 |
echo /usr/${CTARGET}/$(get_libdir) |
124 |
else |
125 |
echo /$(get_libdir) |
126 |
fi |
127 |
} |
128 |
|
129 |
if is_crosscompile ; then |
130 |
SLOT="${CTARGET}-2.2" |
131 |
else |
132 |
# Why SLOT 2.2 you ask yourself while sippin your tea ? |
133 |
# Everyone knows 2.2 > 0, duh. |
134 |
SLOT="2.2" |
135 |
fi |
136 |
|
137 |
# General: We need a new-enough binutils for as-needed |
138 |
# arch: we need to make sure our binutils/gcc supports TLS |
139 |
DEPEND=">=sys-devel/gcc-3.4.4 |
140 |
arm? ( >=sys-devel/binutils-2.16.90 >=sys-devel/gcc-4.1.0 ) |
141 |
x86? ( >=sys-devel/gcc-4.3 ) |
142 |
amd64? ( >=sys-devel/binutils-2.19 >=sys-devel/gcc-4.3 ) |
143 |
ppc? ( >=sys-devel/gcc-4.1.0 ) |
144 |
ppc64? ( >=sys-devel/gcc-4.1.0 ) |
145 |
>=sys-devel/binutils-2.15.94 |
146 |
${LT_VER:+nptl? (} >=sys-kernel/linux-headers-${NPTL_KERN_VER} ${LT_VER:+)} |
147 |
>=app-misc/pax-utils-0.1.10 |
148 |
virtual/os-headers |
149 |
nls? ( sys-devel/gettext ) |
150 |
!<sys-apps/sandbox-1.2.18.1-r2 |
151 |
!<sys-apps/portage-2.1.2 |
152 |
selinux? ( sys-libs/libselinux )" |
153 |
RDEPEND="!sys-kernel/ps3-sources |
154 |
nls? ( sys-devel/gettext ) |
155 |
selinux? ( sys-libs/libselinux )" |
156 |
|
157 |
if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then |
158 |
DEPEND="${DEPEND} !crosscompile_opts_headers-only? ( ${CATEGORY}/gcc )" |
159 |
[[ ${CATEGORY} == *-linux* ]] && DEPEND="${DEPEND} ${CATEGORY}/linux-headers" |
160 |
else |
161 |
DEPEND="${DEPEND} !vanilla? ( >=sys-libs/timezone-data-2007c )" |
162 |
RDEPEND="${RDEPEND} |
163 |
vanilla? ( !sys-libs/timezone-data ) |
164 |
!vanilla? ( sys-libs/timezone-data )" |
165 |
fi |
166 |
|
167 |
SRC_URI=$( |
168 |
upstream_uris() { |
169 |
echo mirror://gnu/glibc/$1 ftp://sources.redhat.com/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1 |
170 |
} |
171 |
gentoo_uris() { |
172 |
local devspace="HTTP~vapier/dist/URI HTTP~azarah/glibc/URI" |
173 |
devspace=${devspace//HTTP/http://dev.gentoo.org/} |
174 |
echo mirror://gentoo/$1 ${devspace//URI/$1} |
175 |
} |
176 |
|
177 |
TARNAME=${PN} |
178 |
if [[ -n ${SNAP_VER} ]] ; then |
179 |
TARNAME="${PN}-${RELEASE_VER}" |
180 |
[[ -n ${PORTS_VER} ]] && PORTS_VER=${SNAP_VER} |
181 |
upstream_uris ${TARNAME}-${SNAP_VER}.tar.bz2 |
182 |
elif [[ -z ${EGIT_REPO_URIS} ]] ; then |
183 |
upstream_uris ${TARNAME}-${RELEASE_VER}.tar.bz2 |
184 |
fi |
185 |
[[ -n ${LIBIDN_VER} ]] && upstream_uris glibc-libidn-${LIBIDN_VER}.tar.bz2 |
186 |
[[ -n ${PORTS_VER} ]] && upstream_uris ${TARNAME}-ports-${PORTS_VER}.tar.bz2 |
187 |
[[ -n ${LT_VER} ]] && upstream_uris ${TARNAME}-linuxthreads-${LT_VER}.tar.bz2 |
188 |
[[ -n ${BRANCH_UPDATE} ]] && gentoo_uris glibc-${RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2 |
189 |
[[ -n ${PATCH_VER} ]] && gentoo_uris glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2 |
190 |
[[ -n ${MANPAGE_VER} ]] && gentoo_uris glibc-manpages-${MANPAGE_VER}.tar.bz2 |
191 |
[[ -n ${INFOPAGE_VER} ]] && gentoo_uris glibc-infopages-${INFOPAGE_VER}.tar.bz2 |
192 |
) |
193 |
|
194 |
# eblit-include [--skip] <function> [version] |
195 |
eblit-include() { |
196 |
local skipable=false |
197 |
[[ $1 == "--skip" ]] && skipable=true && shift |
198 |
[[ $1 == pkg_* ]] && skipable=true |
199 |
|
200 |
local e v func=$1 ver=$2 |
201 |
[[ -z ${func} ]] && die "Usage: eblit-include <function> [version]" |
202 |
for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do |
203 |
e="${FILESDIR}/eblits/${func}${v}.eblit" |
204 |
if [[ -e ${e} ]] ; then |
205 |
source "${e}" |
206 |
return 0 |
207 |
fi |
208 |
done |
209 |
${skipable} && return 0 |
210 |
die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/" |
211 |
} |
212 |
|
213 |
# eblit-run-maybe <function> |
214 |
# run the specified function if it is defined |
215 |
eblit-run-maybe() { |
216 |
[[ $(type -t "$@") == "function" ]] && "$@" |
217 |
} |
218 |
|
219 |
# eblit-run <function> [version] |
220 |
# aka: src_unpack() { eblit-run src_unpack ; } |
221 |
eblit-run() { |
222 |
eblit-include --skip common "${*:2}" |
223 |
eblit-include "$@" |
224 |
eblit-run-maybe eblit-$1-pre |
225 |
eblit-${PN}-$1 |
226 |
eblit-run-maybe eblit-$1-post |
227 |
} |
228 |
|
229 |
src_unpack() { eblit-run src_unpack ; } |
230 |
src_compile() { eblit-run src_compile ; } |
231 |
src_test() { eblit-run src_test ; } |
232 |
src_install() { eblit-run src_install ; } |
233 |
|
234 |
# FILESDIR might not be available during binpkg install |
235 |
for x in setup {pre,post}inst ; do |
236 |
e="${FILESDIR}/eblits/pkg_${x}.eblit" |
237 |
if [[ -e ${e} ]] ; then |
238 |
. "${e}" |
239 |
eval "pkg_${x}() { eblit-run pkg_${x} ; }" |
240 |
fi |
241 |
done |
242 |
|
243 |
pkg_setup() { |
244 |
eblit-run pkg_setup |
245 |
|
246 |
# Static binary sanity check #332927 |
247 |
if [[ ${ROOT} == "/" ]] && \ |
248 |
has_version "<${CATEGORY}/${P}" && \ |
249 |
built_with_use sys-apps/coreutils static |
250 |
then |
251 |
eerror "Please rebuild coreutils with USE=-static, then install" |
252 |
eerror "glibc, then you may rebuild coreutils with USE=static." |
253 |
die "Avoiding system meltdown #332927" |
254 |
fi |
255 |
} |
256 |
|
257 |
eblit-src_unpack-pre() { |
258 |
case ${CHOST} in |
259 |
x86_64*) |
260 |
has x32 $(get_all_abis) || GLIBC_PATCH_EXCLUDE+=" 1200_all_glibc-2.14.1-x32.patch" |
261 |
;; |
262 |
esac |
263 |
} |
264 |
|
265 |
eblit-src_unpack-post() { |
266 |
if use hardened ; then |
267 |
cd "${S}" |
268 |
einfo "Patching to get working PIE binaries on PIE (hardened) platforms" |
269 |
gcc-specs-pie && epatch "${FILESDIR}"/2.12/glibc-2.12-hardened-pie.patch |
270 |
epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-configure-picdefault.patch |
271 |
epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-inittls-nosysenter.patch |
272 |
|
273 |
einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler" |
274 |
cp -f "${FILESDIR}"/2.6/glibc-2.6-gentoo-stack_chk_fail.c \ |
275 |
debug/stack_chk_fail.c || die |
276 |
cp -f "${FILESDIR}"/2.10/glibc-2.10-gentoo-chk_fail.c \ |
277 |
debug/chk_fail.c || die |
278 |
|
279 |
if use debug ; then |
280 |
# When using Hardened Gentoo stack handler, have smashes dump core for |
281 |
# analysis - debug only, as core could be an information leak |
282 |
# (paranoia). |
283 |
sed -i \ |
284 |
-e '/^CFLAGS-backtrace.c/ iCFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
285 |
debug/Makefile \ |
286 |
|| die "Failed to modify debug/Makefile for debug stack handler" |
287 |
sed -i \ |
288 |
-e '/^CFLAGS-backtrace.c/ iCFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
289 |
debug/Makefile \ |
290 |
|| die "Failed to modify debug/Makefile for debug fortify handler" |
291 |
fi |
292 |
|
293 |
# Build nscd with ssp-all |
294 |
sed -i \ |
295 |
-e 's:-fstack-protector$:-fstack-protector-all:' \ |
296 |
nscd/Makefile \ |
297 |
|| die "Failed to ensure nscd builds with ssp-all" |
298 |
fi |
299 |
} |
300 |
|
301 |
maint_pkg_create() { |
302 |
local base="/usr/local/src/gnu/glibc/glibc-${PV:0:1}_${PV:2:1}" |
303 |
cd ${base} |
304 |
local stamp=$(date +%Y%m%d) |
305 |
local d |
306 |
for d in libc ports ; do |
307 |
#(cd ${d} && cvs up) |
308 |
case ${d} in |
309 |
libc) tarball="${P}";; |
310 |
ports) tarball="${PN}-ports-${PV}";; |
311 |
esac |
312 |
rm -f ${tarball}* |
313 |
ln -sf ${d} ${tarball} |
314 |
tar hcf - ${tarball} --exclude-vcs | lzma > "${T}"/${tarball}.tar.lzma |
315 |
du -b "${T}"/${tarball}.tar.lzma |
316 |
done |
317 |
} |