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.11.1.ebuild ChangeLog
Date: Sun, 25 Apr 2010 17:17:58
Message-Id: 20100425171755.976042C04C@corvid.gentoo.org
1 vapier 10/04/25 17:17:55
2
3 Modified: ChangeLog
4 Added: glibc-2.11.1.ebuild
5 Log:
6 Version bump #315477.
7 (Portage version: 2.2_rc67/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.681 sys-libs/glibc/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/glibc/ChangeLog?rev=1.681&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/glibc/ChangeLog?rev=1.681&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/glibc/ChangeLog?r1=1.680&r2=1.681
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v
19 retrieving revision 1.680
20 retrieving revision 1.681
21 diff -u -r1.680 -r1.681
22 --- ChangeLog 19 Apr 2010 17:48:25 -0000 1.680
23 +++ ChangeLog 25 Apr 2010 17:17:55 -0000 1.681
24 @@ -1,6 +1,12 @@
25 # ChangeLog for sys-libs/glibc
26 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.680 2010/04/19 17:48:25 armin76 Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.681 2010/04/25 17:17:55 vapier Exp $
29 +
30 +*glibc-2.11.1 (25 Apr 2010)
31 +
32 + 25 Apr 2010; Mike Frysinger <vapier@g.o> +glibc-2.11.1.ebuild,
33 + files/eblits/src_unpack.eblit:
34 + Version bump #315477.
35
36 19 Apr 2010; Raúl Porcel <armin76@g.o> glibc-2.10.1-r1.ebuild:
37 sh stable
38
39
40
41 1.1 sys-libs/glibc/glibc-2.11.1.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/glibc/glibc-2.11.1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/glibc/glibc-2.11.1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: glibc-2.11.1.ebuild
47 ===================================================================
48 # Copyright 1999-2010 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.11.1.ebuild,v 1.1 2010/04/25 17:17:55 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 ~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=${RELEASE_VER%.?} # 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 multilib? ( >=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} >=sys-libs/timezone-data-2007c"
154 RDEPEND="${RDEPEND} sys-libs/timezone-data"
155 fi
156
157 SRC_URI=$(
158 upstream_uris() {
159 echo mirror://gnu/glibc/$1 ftp://sources.redhat.com/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1
160 }
161 gentoo_uris() {
162 local devspace="HTTP~vapier/dist/URI HTTP~azarah/glibc/URI"
163 devspace=${devspace//HTTP/http://dev.gentoo.org/}
164 echo mirror://gentoo/$1 ${devspace//URI/$1}
165 }
166
167 TARNAME=${PN}
168 if [[ -n ${SNAP_VER} ]] ; then
169 TARNAME="${PN}-${RELEASE_VER}"
170 [[ -n ${PORTS_VER} ]] && PORTS_VER=${SNAP_VER}
171 upstream_uris ${TARNAME}-${SNAP_VER}.tar.bz2
172 else
173 upstream_uris ${TARNAME}-${RELEASE_VER}.tar.bz2
174 fi
175 [[ -n ${LIBIDN_VER} ]] && upstream_uris glibc-libidn-${LIBIDN_VER}.tar.bz2
176 [[ -n ${PORTS_VER} ]] && upstream_uris ${TARNAME}-ports-${PORTS_VER}.tar.bz2
177 [[ -n ${LT_VER} ]] && upstream_uris ${TARNAME}-linuxthreads-${LT_VER}.tar.bz2
178 [[ -n ${BRANCH_UPDATE} ]] && gentoo_uris glibc-${RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2
179 [[ -n ${PATCH_VER} ]] && gentoo_uris glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2
180 [[ -n ${MANPAGE_VER} ]] && gentoo_uris glibc-manpages-${MANPAGE_VER}.tar.bz2
181 [[ -n ${INFOPAGE_VER} ]] && gentoo_uris glibc-infopages-${INFOPAGE_VER}.tar.bz2
182 )
183
184 # eblit-include [--skip] <function> [version]
185 eblit-include() {
186 local skipable=false
187 [[ $1 == "--skip" ]] && skipable=true && shift
188 [[ $1 == pkg_* ]] && skipable=true
189
190 local e v func=$1 ver=$2
191 [[ -z ${func} ]] && die "Usage: eblit-include <function> [version]"
192 for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
193 e="${FILESDIR}/eblits/${func}${v}.eblit"
194 if [[ -e ${e} ]] ; then
195 source "${e}"
196 return 0
197 fi
198 done
199 ${skipable} && return 0
200 die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/"
201 }
202
203 # eblit-run-maybe <function>
204 # run the specified function if it is defined
205 eblit-run-maybe() {
206 [[ $(type -t "$@") == "function" ]] && "$@"
207 }
208
209 # eblit-run <function> [version]
210 # aka: src_unpack() { eblit-run src_unpack ; }
211 eblit-run() {
212 eblit-include --skip common "${*:2}"
213 eblit-include "$@"
214 eblit-run-maybe eblit-$1-pre
215 eblit-${PN}-$1
216 eblit-run-maybe eblit-$1-post
217 }
218
219 src_unpack() { eblit-run src_unpack ; }
220 src_compile() { eblit-run src_compile ; }
221 src_test() { eblit-run src_test ; }
222 src_install() { eblit-run src_install ; }
223
224 # FILESDIR might not be available during binpkg install
225 for x in setup {pre,post}inst ; do
226 e="${FILESDIR}/eblits/pkg_${x}.eblit"
227 if [[ -e ${e} ]] ; then
228 . "${e}"
229 eval "pkg_${x}() { eblit-run pkg_${x} ; }"
230 fi
231 done
232
233 eblit-src_unpack-post() {
234 if use hardened ; then
235 cd "${S}"
236 einfo "Patching to get working PIE binaries on PIE (hardened) platforms"
237 gcc-specs-pie && epatch "${FILESDIR}"/2.11/glibc-2.11-hardened-pie.patch
238 epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-configure-picdefault.patch
239 epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-inittls-nosysenter.patch
240
241 einfo "Patching Glibc to support older SSP __guard"
242 epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-ssp-compat.patch
243
244 einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler"
245 cp -f "${FILESDIR}"/2.6/glibc-2.6-gentoo-stack_chk_fail.c \
246 debug/stack_chk_fail.c || die
247 cp -f "${FILESDIR}"/2.10/glibc-2.10-gentoo-chk_fail.c \
248 debug/chk_fail.c || die
249
250 if use debug ; then
251 # When using Hardened Gentoo stack handler, have smashes dump core for
252 # analysis - debug only, as core could be an information leak
253 # (paranoia).
254 sed -i \
255 -e '/^CFLAGS-backtrace.c/ iCFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
256 debug/Makefile \
257 || die "Failed to modify debug/Makefile for debug stack handler"
258 sed -i \
259 -e '/^CFLAGS-backtrace.c/ iCFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
260 debug/Makefile \
261 || die "Failed to modify debug/Makefile for debug fortify handler"
262 fi
263
264 # Build nscd with ssp-all
265 sed -i \
266 -e 's:-fstack-protector$:-fstack-protector-all:' \
267 nscd/Makefile \
268 || die "Failed to ensure nscd builds with ssp-all"
269 fi
270 }
271
272 maint_pkg_create() {
273 local base="/usr/local/src/gnu/glibc/glibc-${PV:0:1}_${PV:2:1}"
274 cd ${base}
275 local stamp=$(date +%Y%m%d)
276 local d
277 for d in libc ports ; do
278 #(cd ${d} && cvs up)
279 case ${d} in
280 libc) tarball="${P}";;
281 ports) tarball="${PN}-ports-${PV}";;
282 esac
283 rm -f ${tarball}*
284 ln -sf ${d} ${tarball}
285 tar hcf - ${tarball} --exclude-vcs | lzma > "${T}"/${tarball}.tar.lzma
286 du -b "${T}"/${tarball}.tar.lzma
287 done
288 }