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