1 |
blueness 14/12/28 17:09:09 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: glibc-2.20-r1.ebuild |
5 |
Log: |
6 |
Address bug #478764 in 2.20-r1 |
7 |
|
8 |
(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1032 sys-libs/glibc/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/ChangeLog?rev=1.1032&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/ChangeLog?rev=1.1032&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/ChangeLog?r1=1.1031&r2=1.1032 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v |
20 |
retrieving revision 1.1031 |
21 |
retrieving revision 1.1032 |
22 |
diff -u -r1.1031 -r1.1032 |
23 |
--- ChangeLog 11 Nov 2014 02:08:50 -0000 1.1031 |
24 |
+++ ChangeLog 28 Dec 2014 17:09:09 -0000 1.1032 |
25 |
@@ -1,6 +1,11 @@ |
26 |
# ChangeLog for sys-libs/glibc |
27 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.1031 2014/11/11 02:08:50 vapier Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.1032 2014/12/28 17:09:09 blueness Exp $ |
30 |
+ |
31 |
+*glibc-2.20-r1 (28 Dec 2014) |
32 |
+ |
33 |
+ 28 Dec 2014; Anthony G. Basile <blueness@g.o> +glibc-2.20-r1.ebuild: |
34 |
+ Address bug #478764 in 2.20-r1 |
35 |
|
36 |
11 Nov 2014; Mike Frysinger <vapier@g.o> |
37 |
+files/2.20/glibc-2.20-hardened-inittls-nosysenter.patch, glibc-2.20.ebuild, |
38 |
|
39 |
|
40 |
|
41 |
1.1 sys-libs/glibc/glibc-2.20-r1.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/glibc-2.20-r1.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/glibc-2.20-r1.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: glibc-2.20-r1.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2014 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.20-r1.ebuild,v 1.1 2014/12/28 17:09:09 blueness Exp $ |
51 |
|
52 |
EAPI="4" |
53 |
|
54 |
inherit eutils versionator toolchain-funcs flag-o-matic gnuconfig multilib systemd unpacker multiprocessing |
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.1+ BSD HPND ISC inner-net rc PCRE" |
60 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 -hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
61 |
RESTRICT="strip" # strip ourself #46186 |
62 |
EMULTILIB_PKG="true" |
63 |
|
64 |
# Configuration variables |
65 |
RELEASE_VER="" |
66 |
case ${PV} in |
67 |
9999*) |
68 |
EGIT_REPO_URIS="git://sourceware.org/git/glibc.git" |
69 |
EGIT_SOURCEDIRS="${S}" |
70 |
inherit git-2 |
71 |
;; |
72 |
*) |
73 |
RELEASE_VER=${PV} |
74 |
;; |
75 |
esac |
76 |
GCC_BOOTSTRAP_VER="4.7.3-r1" |
77 |
PATCH_VER="2" # Gentoo patchset |
78 |
: ${NPTL_KERN_VER:="2.6.32"} # min kernel version nptl requires |
79 |
|
80 |
IUSE="debug gd hardened multilib nscd selinux systemtap profile suid vanilla crosscompile_opts_headers-only" |
81 |
|
82 |
# Here's how the cross-compile logic breaks down ... |
83 |
# CTARGET - machine that will target the binaries |
84 |
# CHOST - machine that will host the binaries |
85 |
# CBUILD - machine that will build the binaries |
86 |
# If CTARGET != CHOST, it means you want a libc for cross-compiling. |
87 |
# If CHOST != CBUILD, it means you want to cross-compile the libc. |
88 |
# CBUILD = CHOST = CTARGET - native build/install |
89 |
# CBUILD != (CHOST = CTARGET) - cross-compile a native build |
90 |
# (CBUILD = CHOST) != CTARGET - libc for cross-compiler |
91 |
# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler |
92 |
# For install paths: |
93 |
# CHOST = CTARGET - install into / |
94 |
# CHOST != CTARGET - install into /usr/CTARGET/ |
95 |
|
96 |
export CBUILD=${CBUILD:-${CHOST}} |
97 |
export CTARGET=${CTARGET:-${CHOST}} |
98 |
if [[ ${CTARGET} == ${CHOST} ]] ; then |
99 |
if [[ ${CATEGORY} == cross-* ]] ; then |
100 |
export CTARGET=${CATEGORY#cross-} |
101 |
fi |
102 |
fi |
103 |
|
104 |
is_crosscompile() { |
105 |
[[ ${CHOST} != ${CTARGET} ]] |
106 |
} |
107 |
|
108 |
# Why SLOT 2.2 you ask yourself while sippin your tea ? |
109 |
# Everyone knows 2.2 > 0, duh. |
110 |
SLOT="2.2" |
111 |
|
112 |
# General: We need a new-enough binutils/gcc to match upstream baseline. |
113 |
# arch: we need to make sure our binutils/gcc supports TLS. |
114 |
DEPEND=">=app-misc/pax-utils-0.1.10 |
115 |
!<sys-apps/sandbox-1.6 |
116 |
!<sys-apps/portage-2.1.2 |
117 |
selinux? ( sys-libs/libselinux )" |
118 |
RDEPEND="!sys-kernel/ps3-sources |
119 |
sys-apps/gentoo-functions |
120 |
selinux? ( sys-libs/libselinux ) |
121 |
!sys-libs/nss-db" |
122 |
|
123 |
if [[ ${CATEGORY} == cross-* ]] ; then |
124 |
DEPEND+=" !crosscompile_opts_headers-only? ( |
125 |
>=${CATEGORY}/binutils-2.24 |
126 |
>=${CATEGORY}/gcc-4.4 |
127 |
)" |
128 |
[[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers" |
129 |
else |
130 |
DEPEND+=" |
131 |
>=sys-devel/binutils-2.24 |
132 |
>=sys-devel/gcc-4.4 |
133 |
virtual/os-headers" |
134 |
RDEPEND+=" vanilla? ( !sys-libs/timezone-data )" |
135 |
PDEPEND+=" !vanilla? ( sys-libs/timezone-data )" |
136 |
fi |
137 |
|
138 |
upstream_uris() { |
139 |
echo mirror://gnu/glibc/$1 ftp://sourceware.org/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1 |
140 |
} |
141 |
gentoo_uris() { |
142 |
local devspace="HTTP~vapier/dist/URI HTTP~azarah/glibc/URI HTTP~blueness/glibc/URI" |
143 |
devspace=${devspace//HTTP/http://dev.gentoo.org/} |
144 |
echo mirror://gentoo/$1 ${devspace//URI/$1} |
145 |
} |
146 |
SRC_URI=$( |
147 |
[[ -z ${EGIT_REPO_URIS} ]] && upstream_uris ${P}.tar.xz |
148 |
[[ -n ${PATCH_VER} ]] && gentoo_uris ${P}-patches-${PATCH_VER}.tar.bz2 |
149 |
) |
150 |
SRC_URI+=" ${GCC_BOOTSTRAP_VER:+multilib? ( $(gentoo_uris gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2) )}" |
151 |
|
152 |
# eblit-include [--skip] <function> [version] |
153 |
eblit-include() { |
154 |
local skipable=false |
155 |
[[ $1 == "--skip" ]] && skipable=true && shift |
156 |
[[ $1 == pkg_* ]] && skipable=true |
157 |
|
158 |
local e v func=$1 ver=$2 |
159 |
[[ -z ${func} ]] && die "Usage: eblit-include <function> [version]" |
160 |
for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do |
161 |
e="${FILESDIR}/eblits/${func}${v}.eblit" |
162 |
if [[ -e ${e} ]] ; then |
163 |
source "${e}" |
164 |
return 0 |
165 |
fi |
166 |
done |
167 |
${skipable} && return 0 |
168 |
die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/" |
169 |
} |
170 |
|
171 |
# eblit-run-maybe <function> |
172 |
# run the specified function if it is defined |
173 |
eblit-run-maybe() { |
174 |
[[ $(type -t "$@") == "function" ]] && "$@" |
175 |
} |
176 |
|
177 |
# eblit-run <function> [version] |
178 |
# aka: src_unpack() { eblit-run src_unpack ; } |
179 |
eblit-run() { |
180 |
eblit-include --skip common "${*:2}" |
181 |
eblit-include "$@" |
182 |
eblit-run-maybe eblit-$1-pre |
183 |
eblit-${PN}-$1 |
184 |
eblit-run-maybe eblit-$1-post |
185 |
} |
186 |
|
187 |
src_unpack() { eblit-run src_unpack ; } |
188 |
src_prepare() { eblit-run src_prepare ; } |
189 |
src_configure() { eblit-run src_configure ; } |
190 |
src_compile() { eblit-run src_compile ; } |
191 |
src_test() { eblit-run src_test ; } |
192 |
src_install() { eblit-run src_install ; } |
193 |
|
194 |
# FILESDIR might not be available during binpkg install |
195 |
for x in setup {pre,post}inst ; do |
196 |
e="${FILESDIR}/eblits/pkg_${x}.eblit" |
197 |
if [[ -e ${e} ]] ; then |
198 |
. "${e}" |
199 |
eval "pkg_${x}() { eblit-run pkg_${x} ; }" |
200 |
fi |
201 |
done |
202 |
|
203 |
eblit-src_unpack-pre() { |
204 |
[[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib && unpack gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2 |
205 |
} |
206 |
|
207 |
eblit-src_prepare-post() { |
208 |
cd "${S}" |
209 |
|
210 |
if use hardened ; then |
211 |
einfo "Patching to get working PIE binaries on PIE (hardened) platforms" |
212 |
gcc-specs-pie && epatch "${FILESDIR}"/2.17/glibc-2.17-hardened-pie.patch |
213 |
epatch "${FILESDIR}"/2.20/glibc-2.20-hardened-inittls-nosysenter.patch |
214 |
|
215 |
# We don't enable these for non-hardened as the output is very terse -- |
216 |
# it only states that a crash happened. The default upstream behavior |
217 |
# includes backtraces and symbols. |
218 |
einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler" |
219 |
cp "${FILESDIR}"/2.20/glibc-2.20-gentoo-stack_chk_fail.c debug/stack_chk_fail.c || die |
220 |
cp "${FILESDIR}"/2.20/glibc-2.20-gentoo-chk_fail.c debug/chk_fail.c || die |
221 |
|
222 |
if use debug ; then |
223 |
# Allow SIGABRT to dump core on non-hardened systems, or when debug is requested. |
224 |
sed -i \ |
225 |
-e '/^CFLAGS-backtrace.c/ iCPPFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
226 |
-e '/^CFLAGS-backtrace.c/ iCPPFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
227 |
debug/Makefile || die |
228 |
fi |
229 |
|
230 |
# Build various bits with ssp-all |
231 |
sed -i \ |
232 |
-e 's:-fstack-protector$:-fstack-protector-all:' \ |
233 |
*/Makefile || die |
234 |
fi |
235 |
} |