Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-libs/glibc: glibc-2.13.ebuild ChangeLog
Date: Sat, 05 Feb 2011 19:13:43
Message-Id: 20110205191329.1BB3820054@flycatcher.gentoo.org
1 vapier 11/02/05 19:13:29
2
3 Modified: ChangeLog
4 Added: glibc-2.13.ebuild
5 Log:
6 Version bump.
7
8 (Portage version: 2.2.0_alpha20/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.739 sys-libs/glibc/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/ChangeLog?rev=1.739&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/ChangeLog?rev=1.739&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/ChangeLog?r1=1.738&r2=1.739
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v
20 retrieving revision 1.738
21 retrieving revision 1.739
22 diff -u -r1.738 -r1.739
23 --- ChangeLog 9 Jan 2011 00:55:38 -0000 1.738
24 +++ ChangeLog 5 Feb 2011 19:13:28 -0000 1.739
25 @@ -1,6 +1,11 @@
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.738 2011/01/09 00:55:38 vapier Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.739 2011/02/05 19:13:28 vapier Exp $
30 +
31 +*glibc-2.13 (05 Feb 2011)
32 +
33 + 05 Feb 2011; Mike Frysinger <vapier@g.o> +glibc-2.13.ebuild:
34 + Version bump.
35
36 *glibc-2.12.2 (09 Jan 2011)
37
38
39
40
41 1.1 sys-libs/glibc/glibc-2.13.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/glibc-2.13.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/glibc-2.13.ebuild?rev=1.1&content-type=text/plain
45
46 Index: glibc-2.13.ebuild
47 ===================================================================
48 # Copyright 1999-2011 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.13.ebuild,v 1.1 2011/02/05 19:13:28 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="~amd64 ~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 LIBIDN_VER="" # it's integrated into the main tarball now
75 PATCH_VER="1" # Gentoo patchset
76 PORTS_VER="2.12.1" # version of glibc ports 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 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 x86? ( >=sys-devel/gcc-4.3 )
133 amd64? ( >=sys-devel/binutils-2.19 >=sys-devel/gcc-4.3 )
134 ppc? ( >=sys-devel/gcc-4.1.0 )
135 ppc64? ( >=sys-devel/gcc-4.1.0 )
136 >=sys-devel/binutils-2.15.94
137 ${LT_VER:+nptl? (} >=sys-kernel/linux-headers-${NPTL_KERN_VER} ${LT_VER:+)}
138 >=sys-devel/gcc-config-1.3.12
139 >=app-misc/pax-utils-0.1.10
140 virtual/os-headers
141 nls? ( sys-devel/gettext )
142 >=sys-apps/sandbox-1.2.18.1-r2
143 !<sys-apps/portage-2.1.2
144 selinux? ( sys-libs/libselinux )"
145 RDEPEND="!sys-kernel/ps3-sources
146 nls? ( sys-devel/gettext )
147 selinux? ( sys-libs/libselinux )"
148
149 if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
150 DEPEND="${DEPEND} !crosscompile_opts_headers-only? ( ${CATEGORY}/gcc )"
151 [[ ${CATEGORY} == *-linux* ]] && DEPEND="${DEPEND} ${CATEGORY}/linux-headers"
152 else
153 DEPEND="${DEPEND} !vanilla? ( >=sys-libs/timezone-data-2007c )"
154 RDEPEND="${RDEPEND}
155 vanilla? ( !sys-libs/timezone-data )
156 !vanilla? ( sys-libs/timezone-data )"
157 fi
158
159 SRC_URI=$(
160 upstream_uris() {
161 echo mirror://gnu/glibc/$1 ftp://sources.redhat.com/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1
162 }
163 gentoo_uris() {
164 local devspace="HTTP~vapier/dist/URI HTTP~azarah/glibc/URI"
165 devspace=${devspace//HTTP/http://dev.gentoo.org/}
166 echo mirror://gentoo/$1 ${devspace//URI/$1}
167 }
168
169 TARNAME=${PN}
170 if [[ -n ${SNAP_VER} ]] ; then
171 TARNAME="${PN}-${RELEASE_VER}"
172 [[ -n ${PORTS_VER} ]] && PORTS_VER=${SNAP_VER}
173 upstream_uris ${TARNAME}-${SNAP_VER}.tar.bz2
174 else
175 upstream_uris ${TARNAME}-${RELEASE_VER}.tar.bz2
176 fi
177 [[ -n ${LIBIDN_VER} ]] && upstream_uris glibc-libidn-${LIBIDN_VER}.tar.bz2
178 [[ -n ${PORTS_VER} ]] && upstream_uris ${TARNAME}-ports-${PORTS_VER}.tar.bz2
179 [[ -n ${LT_VER} ]] && upstream_uris ${TARNAME}-linuxthreads-${LT_VER}.tar.bz2
180 [[ -n ${BRANCH_UPDATE} ]] && gentoo_uris glibc-${RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2
181 [[ -n ${PATCH_VER} ]] && gentoo_uris glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2
182 [[ -n ${MANPAGE_VER} ]] && gentoo_uris glibc-manpages-${MANPAGE_VER}.tar.bz2
183 [[ -n ${INFOPAGE_VER} ]] && gentoo_uris glibc-infopages-${INFOPAGE_VER}.tar.bz2
184 )
185
186 # eblit-include [--skip] <function> [version]
187 eblit-include() {
188 local skipable=false
189 [[ $1 == "--skip" ]] && skipable=true && shift
190 [[ $1 == pkg_* ]] && skipable=true
191
192 local e v func=$1 ver=$2
193 [[ -z ${func} ]] && die "Usage: eblit-include <function> [version]"
194 for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
195 e="${FILESDIR}/eblits/${func}${v}.eblit"
196 if [[ -e ${e} ]] ; then
197 source "${e}"
198 return 0
199 fi
200 done
201 ${skipable} && return 0
202 die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/"
203 }
204
205 # eblit-run-maybe <function>
206 # run the specified function if it is defined
207 eblit-run-maybe() {
208 [[ $(type -t "$@") == "function" ]] && "$@"
209 }
210
211 # eblit-run <function> [version]
212 # aka: src_unpack() { eblit-run src_unpack ; }
213 eblit-run() {
214 eblit-include --skip common "${*:2}"
215 eblit-include "$@"
216 eblit-run-maybe eblit-$1-pre
217 eblit-${PN}-$1
218 eblit-run-maybe eblit-$1-post
219 }
220
221 src_unpack() { eblit-run src_unpack ; }
222 src_compile() { eblit-run src_compile ; }
223 src_test() { eblit-run src_test ; }
224 src_install() { eblit-run src_install ; }
225
226 # FILESDIR might not be available during binpkg install
227 for x in setup {pre,post}inst ; do
228 e="${FILESDIR}/eblits/pkg_${x}.eblit"
229 if [[ -e ${e} ]] ; then
230 . "${e}"
231 eval "pkg_${x}() { eblit-run pkg_${x} ; }"
232 fi
233 done
234
235 pkg_setup() {
236 eblit-run pkg_setup
237
238 # Static binary sanity check #332927
239 if [[ ${ROOT} == "/" ]] && \
240 has_version "<${CATEGORY}/${P}" && \
241 built_with_use sys-apps/coreutils static
242 then
243 eerror "Please rebuild coreutils with USE=-static, then install"
244 eerror "glibc, then you may rebuild coreutils with USE=static."
245 die "Avoiding system meltdown #332927"
246 fi
247 }
248
249 eblit-src_unpack-post() {
250 if use hardened ; then
251 cd "${S}"
252 einfo "Patching to get working PIE binaries on PIE (hardened) platforms"
253 gcc-specs-pie && epatch "${FILESDIR}"/2.12/glibc-2.12-hardened-pie.patch
254 epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-configure-picdefault.patch
255 epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-inittls-nosysenter.patch
256
257 einfo "Patching Glibc to support older SSP __guard"
258 epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-ssp-compat.patch
259
260 einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler"
261 cp -f "${FILESDIR}"/2.6/glibc-2.6-gentoo-stack_chk_fail.c \
262 debug/stack_chk_fail.c || die
263 cp -f "${FILESDIR}"/2.10/glibc-2.10-gentoo-chk_fail.c \
264 debug/chk_fail.c || die
265
266 if use debug ; then
267 # When using Hardened Gentoo stack handler, have smashes dump core for
268 # analysis - debug only, as core could be an information leak
269 # (paranoia).
270 sed -i \
271 -e '/^CFLAGS-backtrace.c/ iCFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
272 debug/Makefile \
273 || die "Failed to modify debug/Makefile for debug stack handler"
274 sed -i \
275 -e '/^CFLAGS-backtrace.c/ iCFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
276 debug/Makefile \
277 || die "Failed to modify debug/Makefile for debug fortify handler"
278 fi
279
280 # Build nscd with ssp-all
281 sed -i \
282 -e 's:-fstack-protector$:-fstack-protector-all:' \
283 nscd/Makefile \
284 || die "Failed to ensure nscd builds with ssp-all"
285 fi
286 }
287
288 maint_pkg_create() {
289 local base="/usr/local/src/gnu/glibc/glibc-${PV:0:1}_${PV:2:1}"
290 cd ${base}
291 local stamp=$(date +%Y%m%d)
292 local d
293 for d in libc ports ; do
294 #(cd ${d} && cvs up)
295 case ${d} in
296 libc) tarball="${P}";;
297 ports) tarball="${PN}-ports-${PV}";;
298 esac
299 rm -f ${tarball}*
300 ln -sf ${d} ${tarball}
301 tar hcf - ${tarball} --exclude-vcs | lzma > "${T}"/${tarball}.tar.lzma
302 du -b "${T}"/${tarball}.tar.lzma
303 done
304 }