Gentoo Archives: gentoo-commits

From: Patrick McLean <chutzpah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/
Date: Thu, 09 Feb 2017 19:16:13
Message-Id: 1486667750.f63e80046cb1dd5dd790a244a18a87185f2967cf.chutzpah@gentoo
1 commit: f63e80046cb1dd5dd790a244a18a87185f2967cf
2 Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
3 AuthorDate: Thu Feb 9 19:15:50 2017 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 9 19:15:50 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f63e8004
7
8 app-shells/bash: Version bump to 4.4_p12
9
10 Package-Manager: Portage-2.3.3, Repoman-2.3.1
11
12 app-shells/bash/Manifest | 1 +
13 app-shells/bash/bash-4.4_p12.ebuild | 254 ++++++++++++++++++++++++++++++++++++
14 2 files changed, 255 insertions(+)
15
16 diff --git a/app-shells/bash/Manifest b/app-shells/bash/Manifest
17 index 0c0b20e03a..a78efa1b57 100644
18 --- a/app-shells/bash/Manifest
19 +++ b/app-shells/bash/Manifest
20 @@ -295,3 +295,4 @@ DIST bash44-008 2223 SHA256 86144700465933636d7b945e89b77df95d3620034725be161ca0
21 DIST bash44-009 3117 SHA256 0b6bdd1a18a0d20e330cc3bc71e048864e4a13652e29dc0ebf3918bea729343c SHA512 3b01c080cf4a54658679b36c282a69a9ac48b900b19ceb42dbaf084abd395d50e5ff14db90a7fdf0c9856dad150897dca561160686c931634765782447fc076e WHIRLPOOL 6de4092994c58164c8c49664a929c9037044c2bad8bfb7a7c01f161fd4716aa7f8fb0b78295a10979dd4b5e076a03adf83072f5bafda752fe0c1eb866e3e9eee
22 DIST bash44-010 1670 SHA256 8465c6f2c56afe559402265b39d9e94368954930f9aa7f3dfa6d36dd66868e06 SHA512 54ff556b62fd88381e7a495db50957b016474973b3a566661c65b649a40960f2d3355221b3a71fb292128aad92a45d73d9816d63833bc416b4d15acdef391b98 WHIRLPOOL 5f1f9cd94381c4874aec9eefd9b314a0d505c82b22dbb768f30a4d7e0d2a7bd8b76d8cc983f19f8d74ac3045f487b79608f5604e234db46111c98b5e853cbc4d
23 DIST bash44-011 1603 SHA256 dd56426ef7d7295e1107c0b3d06c192eb9298f4023c202ca2ba6266c613d170d SHA512 6b5b068b74978fc691749ccff5e094c768047f702430e97114f5bf342f078696f7d7616d0642d4061b062e9112dfe00a1c2309c65de4147e0e98fb52c593d844 WHIRLPOOL 5de1209872c1650be012a365737123f2a1c1331b814406c98b0a4b56223aa5f9e724ffc134dc8a51a51f99e265ce7c68457744c0caa9b120406137079655f41b
24 +DIST bash44-012 5768 SHA256 fac271d2bf6372c9903e3b353cb9eda044d7fe36b5aab52f21f3f21cd6a2063e SHA512 4661c4c132f2ea7c9a70368301041c482d5820d8389334a7e3ae44c36fc16c171b20db2f194b7663c84d6c3dcef81aa90f050a48e205218fc7bd3395d09c6a51 WHIRLPOOL b86fe68265186cdd4da9e0d1387c35fbc05b8b0a760603f89edd89380320e148b48f692a6481a60d7f051be096484cab037f29a5e52dbb84d2d03cd790995716
25
26 diff --git a/app-shells/bash/bash-4.4_p12.ebuild b/app-shells/bash/bash-4.4_p12.ebuild
27 new file mode 100644
28 index 0000000000..d1139561d7
29 --- /dev/null
30 +++ b/app-shells/bash/bash-4.4_p12.ebuild
31 @@ -0,0 +1,254 @@
32 +# Copyright 1999-2017 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI="5"
36 +
37 +inherit eutils flag-o-matic toolchain-funcs multilib prefix
38 +
39 +# Official patchlevel
40 +# See ftp://ftp.cwru.edu/pub/bash/bash-4.4-patches/
41 +PLEVEL=${PV##*_p}
42 +MY_PV=${PV/_p*}
43 +MY_PV=${MY_PV/_/-}
44 +MY_P=${PN}-${MY_PV}
45 +is_release() {
46 + case ${PV} in
47 + *_alpha*|*_beta*|*_rc*) return 1 ;;
48 + *) return 0 ;;
49 + esac
50 +}
51 +[[ ${PV} != *_p* ]] && PLEVEL=0
52 +patches() {
53 + local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
54 + [[ ${plevel} -eq 0 ]] && return 1
55 + eval set -- {1..${plevel}}
56 + set -- $(printf "${pn}${pv/\.}-%03d " "$@")
57 + if [[ ${opt} == -s ]] ; then
58 + echo "${@/#/${DISTDIR}/}"
59 + else
60 + local u
61 + for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do
62 + printf "${u}/${pn}-${pv}-patches/%s " "$@"
63 + done
64 + fi
65 +}
66 +
67 +# The version of readline this bash normally ships with.
68 +READLINE_VER="7.0"
69 +
70 +DESCRIPTION="The standard GNU Bourne again shell"
71 +HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html"
72 +if is_release ; then
73 + SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
74 +else
75 + SRC_URI="ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz"
76 +fi
77 +
78 +LICENSE="GPL-3"
79 +SLOT="0"
80 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
81 +IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline"
82 +
83 +DEPEND=">=sys-libs/ncurses-5.2-r2:0=
84 + readline? ( >=sys-libs/readline-${READLINE_VER}:0= )
85 + nls? ( virtual/libintl )"
86 +RDEPEND="${DEPEND}
87 + !<sys-apps/portage-2.1.6.7_p1
88 + !<sys-apps/paludis-0.26.0_alpha5"
89 +# we only need yacc when the .y files get patched (bash42-005)
90 +#DEPEND+=" virtual/yacc"
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 is_release ; 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 + # Prefixify hardcoded path names. No-op for non-prefix.
122 + hprefixify pathnames.h.in
123 +
124 + # Avoid regenerating docs after patches #407985
125 + sed -i -r '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in || die
126 + touch -r . doc/*
127 +
128 + epatch_user
129 +}
130 +
131 +src_configure() {
132 + local myconf=()
133 +
134 + # For descriptions of these, see config-top.h
135 + # bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426
136 + append-cppflags \
137 + -DDEFAULT_PATH_VALUE=\'\"${EPREFIX}/usr/local/sbin:${EPREFIX}/usr/local/bin:${EPREFIX}/usr/sbin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/bin\"\' \
138 + -DSTANDARD_UTILS_PATH=\'\"${EPREFIX}/bin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/usr/sbin\"\' \
139 + -DSYS_BASHRC=\'\"${EPREFIX}/etc/bash/bashrc\"\' \
140 + -DSYS_BASH_LOGOUT=\'\"${EPREFIX}/etc/bash/bash_logout\"\' \
141 + -DNON_INTERACTIVE_LOGIN_SHELLS \
142 + -DSSH_SOURCE_BASHRC \
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 is_release ; 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 "$(prefixify_ro "${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 +}