Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/
Date: Fri, 07 Oct 2016 09:06:11
Message-Id: 1475831154.83af7a2d10ee6c25c1dff49d392c381ba8d42d8e.polynomial-c@gentoo
1 commit: 83af7a2d10ee6c25c1dff49d392c381ba8d42d8e
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Fri Oct 7 08:56:18 2016 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Fri Oct 7 09:05:54 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=83af7a2d
7
8 app-shells/bash: Bump to version 4.3_p48
9
10 Package-Manager: portage-2.3.1
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 app-shells/bash/Manifest | 2 +
14 app-shells/bash/bash-4.3_p48.ebuild | 252 ++++++++++++++++++++++++++++++++++++
15 2 files changed, 254 insertions(+)
16
17 diff --git a/app-shells/bash/Manifest b/app-shells/bash/Manifest
18 index e34edb9..1bbb754 100644
19 --- a/app-shells/bash/Manifest
20 +++ b/app-shells/bash/Manifest
21 @@ -283,3 +283,5 @@ DIST bash43-043 1942 SHA256 47a8a3c005b46e25821f4d8f5ccb04c1d653b1c829cb40568d55
22 DIST bash43-044 1658 SHA256 9338820630bf67373b44d8ea68409f65162ea7a47b9b29ace06a0aed12567f99 SHA512 2937ef80c99e93094e4aaa6a93d077efc3e433a4712c17e30590a0abeb5488293365cb8aa19e37d25b7d5c38d3ad26cdea12b904e5ffb2cdb16f18ab12f422fd WHIRLPOOL 488f567b900e49a9de9b92e9a8e29a92a087d390e9f24c3986bf1d89524878c88c7a3c2cae959844427fb20e6858a7b8eae112aac640f3d97ba1f79888f9f25d
23 DIST bash43-045 1312 SHA256 ba6ec3978e9eaa1eb3fabdaf3cc6fdf8c4606ac1c599faaeb4e2d69864150023 SHA512 7b79dacff44e5358da736334d2277a2879ca1389e22e9dac50e139f30dab623bc89a56930d89e74efc468a00d051f6747ccaffcd1a30d7c737d49780b9830e3d WHIRLPOOL f361e523879ff1898574ac5eca480661bd787dc278fff204e7f27da89e85439b4e9d36a5f556046b760f3beb115302e745b5196bfa081b402d3f76fb44463558
24 DIST bash43-046 1494 SHA256 b3b456a6b690cd293353f17e22d92a202b3c8bce587ae5f2667c20c9ab6f688f SHA512 c036b659fa681f8129110356bec33fad00fb8e469f3b4bcefd0b7ddf5e20030977716adf5c65f58f3ff68cd7af0bdd42392ee077100bc7f45ee123749d082f7d WHIRLPOOL d58384a2ca77f9a80a69a117221da51a701539cf5497d8e0fc634cd1cc0cb0024e02675bea810a0f42b873b557d479ba1b7aee6e6f73bd1422df2dbb29396477
25 +DIST bash43-047 4437 SHA256 c69248de7e78ba6b92f118fe1ef47bc86479d5040fe0b1f908ace1c9e3c67c4a SHA512 9332d680ac226491cf8e5986a3261eb76b53ef4b0b2a43405564b088afc0e8658077812c9177bdab7900e05394e69f3047d82ddb59553fc01ef721acfa9d5553 WHIRLPOOL 719fa31d0fb09a75d5abbb63ee5a485802c5eadd06720d6074c2282d117aa6e234f5f75cabd340643710bd14e99260047183386bd1df278c9715aed7b98232d7
26 +DIST bash43-048 1612 SHA256 5b8215451c5d096ca1e115307ffe6613553551a70369525a0778f216c3a4dfa2 SHA512 7c3963bfbc730b4592668460e86c166e727e9897c1a9235a6860a01bc90d365ef0707f0fac7ed62780dcc84e80dbe8484ec59e9e948def22f44ae03e8a169780 WHIRLPOOL e1a435c3b9fbc0deca80dd89bfd3adcbff1d5a3af50884d2aef54635b8ba1063903e2d99a5a23bd1c64c19c5e9c19de6b479ac777cecdb812555dc5683b8cf71
27
28 diff --git a/app-shells/bash/bash-4.3_p48.ebuild b/app-shells/bash/bash-4.3_p48.ebuild
29 new file mode 100644
30 index 00000000..ea3559e
31 --- /dev/null
32 +++ b/app-shells/bash/bash-4.3_p48.ebuild
33 @@ -0,0 +1,252 @@
34 +# Copyright 1999-2016 Gentoo Foundation
35 +# Distributed under the terms of the GNU General Public License v2
36 +# $Id$
37 +
38 +EAPI="5"
39 +
40 +inherit eutils flag-o-matic toolchain-funcs multilib
41 +
42 +# Official patchlevel
43 +# See ftp://ftp.cwru.edu/pub/bash/bash-4.3-patches/
44 +PLEVEL=${PV##*_p}
45 +MY_PV=${PV/_p*}
46 +MY_PV=${MY_PV/_/-}
47 +MY_P=${PN}-${MY_PV}
48 +[[ ${PV} != *_p* ]] && PLEVEL=0
49 +patches() {
50 + local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
51 + [[ ${plevel} -eq 0 ]] && return 1
52 + eval set -- {1..${plevel}}
53 + set -- $(printf "${pn}${pv/\.}-%03d " "$@")
54 + if [[ ${opt} == -s ]] ; then
55 + echo "${@/#/${DISTDIR}/}"
56 + else
57 + local u
58 + for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do
59 + printf "${u}/${pn}-${pv}-patches/%s " "$@"
60 + done
61 + fi
62 +}
63 +
64 +# The version of readline this bash normally ships with.
65 +READLINE_VER="6.3"
66 +
67 +DESCRIPTION="The standard GNU Bourne again shell"
68 +HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html"
69 +SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
70 +[[ ${PV} == *_rc* ]] && SRC_URI+=" ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz"
71 +
72 +LICENSE="GPL-3"
73 +SLOT="0"
74 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
75 +IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline vanilla"
76 +
77 +DEPEND=">=sys-libs/ncurses-5.2-r2:0=
78 + readline? ( >=sys-libs/readline-${READLINE_VER}:0= )
79 + nls? ( virtual/libintl )"
80 +RDEPEND="${DEPEND}
81 + !<sys-apps/portage-2.1.6.7_p1
82 + !<sys-apps/paludis-0.26.0_alpha5"
83 +# we only need yacc when the .y files get patched (bash42-005)
84 +DEPEND+=" virtual/yacc"
85 +
86 +PATCHES=(
87 + "${FILESDIR}"/${PN}-4.3-mapfile-improper-array-name-validation.patch
88 + "${FILESDIR}"/${PN}-4.3-arrayfunc.patch
89 + "${FILESDIR}"/${PN}-4.3-protos.patch
90 +)
91 +
92 +S=${WORKDIR}/${MY_P}
93 +
94 +pkg_setup() {
95 + if is-flag -malign-double ; then #7332
96 + eerror "Detected bad CFLAGS '-malign-double'. Do not use this"
97 + eerror "as it breaks LFS (struct stat64) on x86."
98 + die "remove -malign-double from your CFLAGS mr ricer"
99 + fi
100 + if use bashlogger ; then
101 + ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs."
102 + ewarn "This will log ALL output you enter into the shell, you have been warned."
103 + fi
104 +}
105 +
106 +src_unpack() {
107 + unpack ${MY_P}.tar.gz
108 +}
109 +
110 +src_prepare() {
111 + # Include official patches
112 + [[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s)
113 +
114 + # Clean out local libs so we know we use system ones w/releases.
115 + if [[ ${PV} != *_rc* ]] ; then
116 + rm -rf lib/{readline,termcap}/*
117 + touch lib/{readline,termcap}/Makefile.in # for config.status
118 + sed -ri -e 's:\$[(](RL|HIST)_LIBSRC[)]/[[:alpha:]]*.h::g' Makefile.in || die
119 + fi
120 +
121 + # Avoid regenerating docs after patches #407985
122 + sed -i -r '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in || die
123 + touch -r . doc/*
124 +
125 + epatch "${PATCHES[@]}"
126 +
127 + epatch_user
128 +}
129 +
130 +src_configure() {
131 + local myconf=()
132 +
133 + # For descriptions of these, see config-top.h
134 + # bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426
135 + append-cppflags \
136 + -DDEFAULT_PATH_VALUE=\'\"${EPREFIX}/usr/local/sbin:${EPREFIX}/usr/local/bin:${EPREFIX}/usr/sbin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/bin\"\' \
137 + -DSTANDARD_UTILS_PATH=\'\"${EPREFIX}/bin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/usr/sbin\"\' \
138 + -DSYS_BASHRC=\'\"${EPREFIX}/etc/bash/bashrc\"\' \
139 + -DSYS_BASH_LOGOUT=\'\"${EPREFIX}/etc/bash/bash_logout\"\' \
140 + -DNON_INTERACTIVE_LOGIN_SHELLS \
141 + -DSSH_SOURCE_BASHRC \
142 + -DUSE_MKTEMP -DUSE_MKSTEMP \
143 + $(use bashlogger && echo -DSYSLOG_HISTORY)
144 +
145 + # Don't even think about building this statically without
146 + # reading Bug 7714 first. If you still build it statically,
147 + # don't come crying to us with bugs ;).
148 + #use static && export LDFLAGS="${LDFLAGS} -static"
149 + use nls || myconf+=( --disable-nls )
150 +
151 + # Historically, we always used the builtin readline, but since
152 + # our handling of SONAME upgrades has gotten much more stable
153 + # in the PM (and the readline ebuild itself preserves the old
154 + # libs during upgrades), linking against the system copy should
155 + # be safe.
156 + # Exact cached version here doesn't really matter as long as it
157 + # is at least what's in the DEPEND up above.
158 + export ac_cv_rl_version=${READLINE_VER}
159 +
160 + # Force linking with system curses ... the bundled termcap lib
161 + # sucks bad compared to ncurses. For the most part, ncurses
162 + # is here because readline needs it. But bash itself calls
163 + # ncurses in one or two small places :(.
164 +
165 + if [[ ${PV} != *_rc* ]] ; then
166 + # Use system readline only with released versions.
167 + myconf+=( --with-installed-readline=. )
168 + fi
169 +
170 + if use plugins; then
171 + append-ldflags -Wl,-rpath,/usr/$(get_libdir)/bash
172 + else
173 + # Disable the plugins logic by hand since bash doesn't
174 + # provide a way of doing it.
175 + export ac_cv_func_dl{close,open,sym}=no \
176 + ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no
177 + sed -i \
178 + -e '/LOCAL_LDFLAGS=/s:-rdynamic::' \
179 + configure || die
180 + fi
181 + tc-export AR #444070
182 + econf \
183 + --docdir='$(datarootdir)'/doc/${PF} \
184 + --htmldir='$(docdir)/html' \
185 + --with-curses \
186 + $(use_with afs) \
187 + $(use_enable net net-redirections) \
188 + --disable-profiling \
189 + $(use_enable mem-scramble) \
190 + $(use_with mem-scramble bash-malloc) \
191 + $(use_enable readline) \
192 + $(use_enable readline history) \
193 + $(use_enable readline bang-history) \
194 + "${myconf[@]}"
195 +}
196 +
197 +src_compile() {
198 + emake
199 +
200 + if use plugins ; then
201 + emake -C examples/loadables all others
202 + fi
203 +}
204 +
205 +src_install() {
206 + local d f
207 +
208 + default
209 +
210 + dodir /bin
211 + mv "${ED}"/usr/bin/bash "${ED}"/bin/ || die
212 + dosym bash /bin/rbash
213 +
214 + insinto /etc/bash
215 + doins "${FILESDIR}"/bash_logout
216 + doins "${FILESDIR}"/bashrc
217 + keepdir /etc/bash/bashrc.d
218 + insinto /etc/skel
219 + for f in bash{_logout,_profile,rc} ; do
220 + newins "${FILESDIR}"/dot-${f} .${f}
221 + done
222 +
223 + local sed_args=(
224 + -e "s:#${USERLAND}#@::"
225 + -e '/#@/d'
226 + )
227 + if ! use readline ; then
228 + sed_args+=( #432338
229 + -e '/^shopt -s histappend/s:^:#:'
230 + -e 's:use_color=true:use_color=false:'
231 + )
232 + fi
233 + sed -i \
234 + "${sed_args[@]}" \
235 + "${ED}"/etc/skel/.bashrc \
236 + "${ED}"/etc/bash/bashrc || die
237 +
238 + if use plugins ; then
239 + exeinto /usr/$(get_libdir)/bash
240 + doexe $(echo examples/loadables/*.o | sed 's:\.o::g')
241 + insinto /usr/include/bash-plugins
242 + doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h}
243 + fi
244 +
245 + if use examples ; then
246 + for d in examples/{functions,misc,scripts,startup-files} ; do
247 + exeinto /usr/share/doc/${PF}/${d}
248 + insinto /usr/share/doc/${PF}/${d}
249 + for f in ${d}/* ; do
250 + if [[ ${f##*/} != PERMISSION ]] && [[ ${f##*/} != *README ]] ; then
251 + doexe ${f}
252 + else
253 + doins ${f}
254 + fi
255 + done
256 + done
257 + fi
258 +
259 + doman doc/*.1
260 + newdoc CWRU/changelog ChangeLog
261 + dosym bash.info /usr/share/info/bashref.info
262 +}
263 +
264 +pkg_preinst() {
265 + if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]] ; then
266 + mkdir -p "${EROOT}"/etc/bash
267 + mv -f "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/
268 + fi
269 +
270 + if [[ -L ${EROOT}/bin/sh ]] ; then
271 + # rewrite the symlink to ensure that its mtime changes. having /bin/sh
272 + # missing even temporarily causes a fatal error with paludis.
273 + local target=$(readlink "${EROOT}"/bin/sh)
274 + local tmp=$(emktemp "${EROOT}"/bin)
275 + ln -sf "${target}" "${tmp}"
276 + mv -f "${tmp}" "${EROOT}"/bin/sh
277 + fi
278 +}
279 +
280 +pkg_postinst() {
281 + # If /bin/sh does not exist, provide it
282 + if [[ ! -e ${EROOT}/bin/sh ]] ; then
283 + ln -sf bash "${EROOT}"/bin/sh
284 + fi
285 +}