Gentoo Archives: gentoo-commits

From: "Andreas Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/glibc/
Date: Mon, 11 Sep 2017 12:13:50
Message-Id: 1505132010.c0ef542783db8479c2557041eb6e2314b8220b6c.dilfridge@gentoo
1 commit: c0ef542783db8479c2557041eb6e2314b8220b6c
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 11 12:13:03 2017 +0000
4 Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 11 12:13:30 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0ef5427
7
8 sys-libs/glibc: Revision bump to include some more upstream fixes (patchlevel 9)
9
10 Package-Manager: Portage-2.3.8, Repoman-2.3.3
11
12 sys-libs/glibc/Manifest | 1 +
13 sys-libs/glibc/glibc-2.25-r5.ebuild | 151 ++++++++++++++++++++++++++++++++++++
14 2 files changed, 152 insertions(+)
15
16 diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest
17 index 082bd06d9a6..9797c36c244 100644
18 --- a/sys-libs/glibc/Manifest
19 +++ b/sys-libs/glibc/Manifest
20 @@ -20,6 +20,7 @@ DIST glibc-2.24.tar.xz 13554048 SHA256 99d4a3e8efd144d71488e478f62587578c0f4e1fa
21 DIST glibc-2.25-patches-5.tar.bz2 44356 SHA256 d9ea3908c8c4d561d22697d9830b4032cbbba46822613d5a3509d3b7e579c016 SHA512 ad3acf760e6cd714fe5d6833b53d8759e09c74ca60fbfd173e87dbb2d1062a5006427ca17db0b6ce695dae03e2ace7dc30992ae9b08e94ae4350b19ea03acdcc WHIRLPOOL 1fa660852f9e42fda956b4924351a532efdca88691cb2855c458e8bb9af1fc3cbdf2eb9c8ce93a7c57fa2d6a7e20b1c1a5c17d29b0d07f8e44e0ed8fdb7db8bc
22 DIST glibc-2.25-patches-7.tar.bz2 46222 SHA256 af1a3c13409599486d58c531d04d794698b1ac04cc883dbdb0d29af7b44d7ca5 SHA512 21637f3b1a20cef55ce52311bc7b4d60d93b6f04a8d45944ccb9286fc330e262c6f37f729b7f5a5daec588821e8ae330f89cb7f7e84463b4e533aa80f408e415 WHIRLPOOL bc48fa53ddd264559378e8075c42bd38fd49015ac76834aaed7e0ec338dbbba1f4fdc1d2aaea6d53d72bbbaef99920cad489188b95cd0ec06b02ce5def110c11
23 DIST glibc-2.25-patches-8.tar.bz2 47110 SHA256 1dc41664153369886d240a1851b15bf0c3c3739c8319e6d68cb0c2f85fc98901 SHA512 41d772c47770a63502c863f3c9bb05164e0ceab69fb7b7f355c25685ae4285d73e9ab0e3836162bd11852339055329d0bdc7238f3191fde39a50ce0d9a60454c WHIRLPOOL c6e0443d75e2e4607226caa4df1ce2b10ef21ec2564b447e2a287888d1f593d51f334a6e1ab942f5d1602d02c6fee87ce4ef9a7db3409de6063bc377a470a42d
24 +DIST glibc-2.25-patches-9.tar.bz2 67901 SHA256 cbd8af837aa0776940fd41e34874e930a7f25d78cdd212e138dd9a85e1349519 SHA512 b4f0be5b20834aff102394df23084cc0adf1ab674e6ce050550f6b6658cf0eab57f7685cac079b1a19388dba927a36b8ca31f58af3dddc559d7230674ffd59b5 WHIRLPOOL 81c18056fe26a79c7a7598da1181ba02e83daf7d9e9883a3c1195804a35fe22a79d7cc4a8411f2f4a4ce6430e506978199f59b61d3ed0a70b4e4f7dd05ecfafe
25 DIST glibc-2.25.tar.xz 13873900 SHA256 067bd9bb3390e79aa45911537d13c3721f1d9d3769931a30c2681bfee66f23a0 SHA512 5b7a2418d5b8a1b6a907c6c7fb6477ee2a473151cb45e03d0d4cdd9a33497c90b1ee39e2e7e885e2b25743dcd3747336ef114b4a73eb001da1fd79f29e0f9a6e WHIRLPOOL dc2fafaa4a0e5581268338453838a03ed0c5e7a2af844e8fb7086ab8d3ae48efbdbe6f25db1d089ae669cd2f8b0412f690d965506753d86f8525da2df59b7953
26 DIST glibc-2.26-patches-0.tar.bz2 22289 SHA256 4b59db44f22c415a3c30a543927e69c04d15ef5d9d5f2ce63eba30e0354ebbd1 SHA512 4afb828d2897c68c7a16e42a2c38a872d38c42954a626d0650cc3fface907d28ba4f5b50504aa4e6c465c5b9c37ab0014d2d228b29ac50335aeb85fec713fd78 WHIRLPOOL 6fa2ad2be084e14e4e9105947232a6b5057d23dd0b55b40bd15bb48c84bfb492a22a27d8a3358f6cc1335b7c9652a0be2d7a977eb266dd08d531ecee12449184
27 DIST glibc-2.26.tar.xz 14682748 SHA256 e54e0a934cd2bc94429be79da5e9385898d2306b9eaf3c92d5a77af96190f6bd SHA512 6ed368523bc55f00976f96c5177f114e3f714b27273d7bffc252812c8b98fb81970403c1f5b5f0a61da678811532fb446530745492d2b49bfefc0d5bd71ce8c0 WHIRLPOOL 9091c3bccc9b590de6b9595aa391ba01091f0c301bd9199d7c48fbeaeeb013ec9c683c68b65b59c5a69e3905b7f842cca1b0a410431967ecb3a1229b8535486f
28
29 diff --git a/sys-libs/glibc/glibc-2.25-r5.ebuild b/sys-libs/glibc/glibc-2.25-r5.ebuild
30 new file mode 100644
31 index 00000000000..0ce346e5829
32 --- /dev/null
33 +++ b/sys-libs/glibc/glibc-2.25-r5.ebuild
34 @@ -0,0 +1,151 @@
35 +# Copyright 1999-2017 Gentoo Foundation
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI="5"
39 +
40 +inherit toolchain-glibc
41 +
42 +DESCRIPTION="GNU libc6 (also called glibc2) C library"
43 +HOMEPAGE="https://www.gnu.org/software/libc/libc.html"
44 +
45 +LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE"
46 +# KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
47 +KEYWORDS=""
48 +RESTRICT="strip" # strip ourself #46186
49 +EMULTILIB_PKG="true"
50 +
51 +# Configuration variables
52 +RELEASE_VER=""
53 +case ${PV} in
54 +9999*)
55 + EGIT_REPO_URIS="git://sourceware.org/git/glibc.git"
56 + EGIT_SOURCEDIRS="${S}"
57 + inherit git-2
58 + ;;
59 +*)
60 + RELEASE_VER=${PV}
61 + ;;
62 +esac
63 +GCC_BOOTSTRAP_VER="4.7.3-r1"
64 +# patches live at https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/glibc/
65 +PATCH_VER="9" # Gentoo patchset
66 +: ${NPTL_KERN_VER:="2.6.32"} # min kernel version nptl requires
67 +
68 +IUSE="audit caps debug gd hardened multilib nscd +rpc selinux systemtap profile suid vanilla crosscompile_opts_headers-only"
69 +
70 +# Here's how the cross-compile logic breaks down ...
71 +# CTARGET - machine that will target the binaries
72 +# CHOST - machine that will host the binaries
73 +# CBUILD - machine that will build the binaries
74 +# If CTARGET != CHOST, it means you want a libc for cross-compiling.
75 +# If CHOST != CBUILD, it means you want to cross-compile the libc.
76 +# CBUILD = CHOST = CTARGET - native build/install
77 +# CBUILD != (CHOST = CTARGET) - cross-compile a native build
78 +# (CBUILD = CHOST) != CTARGET - libc for cross-compiler
79 +# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler
80 +# For install paths:
81 +# CHOST = CTARGET - install into /
82 +# CHOST != CTARGET - install into /usr/CTARGET/
83 +
84 +export CBUILD=${CBUILD:-${CHOST}}
85 +export CTARGET=${CTARGET:-${CHOST}}
86 +if [[ ${CTARGET} == ${CHOST} ]] ; then
87 + if [[ ${CATEGORY} == cross-* ]] ; then
88 + export CTARGET=${CATEGORY#cross-}
89 + fi
90 +fi
91 +
92 +is_crosscompile() {
93 + [[ ${CHOST} != ${CTARGET} ]]
94 +}
95 +
96 +# Why SLOT 2.2 you ask yourself while sippin your tea ?
97 +# Everyone knows 2.2 > 0, duh.
98 +SLOT="2.2"
99 +
100 +# General: We need a new-enough binutils/gcc to match upstream baseline.
101 +# arch: we need to make sure our binutils/gcc supports TLS.
102 +COMMON_DEPEND="
103 + nscd? ( selinux? (
104 + audit? ( sys-process/audit )
105 + caps? ( sys-libs/libcap )
106 + ) )
107 + suid? ( caps? ( sys-libs/libcap ) )
108 + selinux? ( sys-libs/libselinux )
109 +"
110 +DEPEND="${COMMON_DEPEND}
111 + >=app-misc/pax-utils-0.1.10
112 + !<sys-apps/sandbox-1.6
113 + !<sys-apps/portage-2.1.2"
114 +RDEPEND="${COMMON_DEPEND}
115 + !sys-kernel/ps3-sources
116 + sys-apps/gentoo-functions
117 + !sys-libs/nss-db"
118 +
119 +if [[ ${CATEGORY} == cross-* ]] ; then
120 + DEPEND+=" !crosscompile_opts_headers-only? (
121 + >=${CATEGORY}/binutils-2.24
122 + >=${CATEGORY}/gcc-4.7
123 + )"
124 + [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
125 +else
126 + DEPEND+="
127 + >=sys-devel/binutils-2.24
128 + >=sys-devel/gcc-4.7
129 + virtual/os-headers"
130 + RDEPEND+=" vanilla? ( !sys-libs/timezone-data )"
131 + PDEPEND+=" !vanilla? ( sys-libs/timezone-data )"
132 +fi
133 +
134 +upstream_uris() {
135 + echo mirror://gnu/glibc/$1 ftp://sourceware.org/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1
136 +}
137 +gentoo_uris() {
138 + local devspace="HTTP~vapier/dist/URI HTTP~dilfridge/distfiles/URI HTTP~tamiko/distfiles/URI HTTP~slyfox/distfiles/URI"
139 + devspace=${devspace//HTTP/https://dev.gentoo.org/}
140 + echo mirror://gentoo/$1 ${devspace//URI/$1}
141 +}
142 +SRC_URI=$(
143 + [[ -z ${EGIT_REPO_URIS} ]] && upstream_uris ${P}.tar.xz
144 + [[ -n ${PATCH_VER} ]] && gentoo_uris ${P}-patches-${PATCH_VER}.tar.bz2
145 +)
146 +SRC_URI+=" ${GCC_BOOTSTRAP_VER:+multilib? ( $(gentoo_uris gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2) )}"
147 +
148 +src_unpack() {
149 + [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib && unpack gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2
150 +
151 + toolchain-glibc_src_unpack
152 +}
153 +
154 +src_prepare() {
155 + toolchain-glibc_src_prepare
156 +
157 + cd "${S}"
158 +
159 + epatch "${FILESDIR}"/2.19/${PN}-2.19-ia64-gcc-4.8-reloc-hack.patch #503838
160 +
161 + if use hardened ; then
162 + # We don't enable these for non-hardened as the output is very terse --
163 + # it only states that a crash happened. The default upstream behavior
164 + # includes backtraces and symbols.
165 + einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler"
166 + cp "${FILESDIR}"/2.20/glibc-2.20-gentoo-stack_chk_fail.c debug/stack_chk_fail.c || die
167 + cp "${FILESDIR}"/2.25/glibc-2.25-gentoo-chk_fail.c debug/chk_fail.c || die
168 +
169 + if use debug ; then
170 + # Allow SIGABRT to dump core on non-hardened systems, or when debug is requested.
171 + sed -i \
172 + -e '/^CFLAGS-backtrace.c/ iCPPFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
173 + -e '/^CFLAGS-backtrace.c/ iCPPFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
174 + debug/Makefile || die
175 + fi
176 + fi
177 +
178 + case $(gcc-fullversion) in
179 + 4.8.[0-3]|4.9.0)
180 + eerror "You need to switch to a newer compiler; gcc-4.8.[0-3] and gcc-4.9.0 miscompile"
181 + eerror "glibc. See https://bugs.gentoo.org/547420 for details."
182 + die "need to switch compilers #547420"
183 + ;;
184 + esac
185 +}