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/, app-shells/bash/files/
Date: Mon, 02 Sep 2019 07:54:37
Message-Id: 1567410862.2b69ac2f35d40618e587296b7bf379c03be6d06b.polynomial-c@gentoo
1 commit: 2b69ac2f35d40618e587296b7bf379c03be6d06b
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 2 07:54:22 2019 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 2 07:54:22 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b69ac2f
7
8 app-shells/bash: Removed old
9
10 Package-Manager: Portage-2.3.75, Repoman-2.3.17
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 app-shells/bash/bash-5.0_p7.ebuild | 266 ---------------------
14 .../bash/files/bash-5.0-history-zero-length.patch | 34 ---
15 2 files changed, 300 deletions(-)
16
17 diff --git a/app-shells/bash/bash-5.0_p7.ebuild b/app-shells/bash/bash-5.0_p7.ebuild
18 deleted file mode 100644
19 index 1d9060d2561..00000000000
20 --- a/app-shells/bash/bash-5.0_p7.ebuild
21 +++ /dev/null
22 @@ -1,266 +0,0 @@
23 -# Copyright 1999-2019 Gentoo Authors
24 -# Distributed under the terms of the GNU General Public License v2
25 -
26 -EAPI=6
27 -
28 -inherit flag-o-matic toolchain-funcs multilib prefix
29 -
30 -# Official patchlevel
31 -# See ftp://ftp.cwru.edu/pub/bash/bash-5.0-patches/
32 -PLEVEL=${PV##*_p}
33 -MY_PV=${PV/_p*}
34 -MY_PV=${MY_PV/_/-}
35 -MY_P=${PN}-${MY_PV}
36 -is_release() {
37 - case ${PV} in
38 - *_alpha*|*_beta*|*_rc*) return 1 ;;
39 - *) return 0 ;;
40 - esac
41 -}
42 -[[ ${PV} != *_p* ]] && PLEVEL=0
43 -patches() {
44 - local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
45 - [[ ${plevel} -eq 0 ]] && return 1
46 - eval set -- {1..${plevel}}
47 - set -- $(printf "${pn}${pv/\.}-%03d " "$@")
48 - if [[ ${opt} == -s ]] ; then
49 - echo "${@/#/${DISTDIR}/}"
50 - else
51 - local u
52 - for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do
53 - printf "${u}/${pn}-${pv}-patches/%s " "$@"
54 - done
55 - fi
56 -}
57 -
58 -# The version of readline this bash normally ships with.
59 -READLINE_VER="8.0"
60 -
61 -DESCRIPTION="The standard GNU Bourne again shell"
62 -HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html"
63 -if is_release ; then
64 - SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
65 -else
66 - SRC_URI="ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz"
67 -fi
68 -
69 -LICENSE="GPL-3"
70 -SLOT="0"
71 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
72 -IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline"
73 -
74 -DEPEND="
75 - >=sys-libs/ncurses-5.2-r2:0=
76 - readline? ( >=sys-libs/readline-${READLINE_VER}:0= )
77 - nls? ( virtual/libintl )
78 -"
79 -RDEPEND="
80 - ${DEPEND}
81 - !<sys-apps/portage-2.1.6.7_p1
82 -"
83 -# we only need yacc when the .y files get patched (bash42-005)
84 -#DEPEND+=" virtual/yacc"
85 -
86 -S="${WORKDIR}/${MY_P}"
87 -
88 -PATCHES=(
89 - # Patches from Chet sent to bashbug ml
90 - "${FILESDIR}"/${PN}-5.0-history-zero-length.patch
91 - "${FILESDIR}"/${PN}-5.0-history-append.patch
92 - "${FILESDIR}"/${PN}-5.0-syslog-history-extern.patch
93 - "${FILESDIR}"/${PN}-5.0-assignment-preceding-builtin.patch
94 -)
95 -
96 -pkg_setup() {
97 - if is-flag -malign-double ; then #7332
98 - eerror "Detected bad CFLAGS '-malign-double'. Do not use this"
99 - eerror "as it breaks LFS (struct stat64) on x86."
100 - die "remove -malign-double from your CFLAGS mr ricer"
101 - fi
102 - if use bashlogger ; then
103 - ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs."
104 - ewarn "This will log ALL output you enter into the shell, you have been warned."
105 - fi
106 -}
107 -
108 -src_unpack() {
109 - unpack ${MY_P}.tar.gz
110 -}
111 -
112 -src_prepare() {
113 - # Include official patches
114 - [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s)
115 -
116 - # Clean out local libs so we know we use system ones w/releases.
117 - if is_release ; then
118 - rm -rf lib/{readline,termcap}/*
119 - touch lib/{readline,termcap}/Makefile.in # for config.status
120 - sed -ri -e 's:\$[(](RL|HIST)_LIBSRC[)]/[[:alpha:]]*.h::g' Makefile.in || die
121 - fi
122 -
123 - # Prefixify hardcoded path names. No-op for non-prefix.
124 - hprefixify pathnames.h.in
125 -
126 - # Avoid regenerating docs after patches #407985
127 - sed -i -r '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in || die
128 - touch -r . doc/*
129 -
130 - eapply -p0 "${PATCHES[@]}"
131 - eapply_user
132 -}
133 -
134 -src_configure() {
135 - local myconf=(
136 - --disable-profiling
137 - --docdir='$(datarootdir)'/doc/${PF}
138 - --htmldir='$(docdir)/html'
139 - --with-curses
140 - $(use_enable mem-scramble)
141 - $(use_enable net net-redirections)
142 - $(use_enable readline)
143 - $(use_enable readline bang-history)
144 - $(use_enable readline history)
145 - $(use_with afs)
146 - $(use_with mem-scramble bash-malloc)
147 - )
148 -
149 - # For descriptions of these, see config-top.h
150 - # bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426
151 - append-cppflags \
152 - -DDEFAULT_PATH_VALUE=\'\"${EPREFIX}/usr/local/sbin:${EPREFIX}/usr/local/bin:${EPREFIX}/usr/sbin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/bin\"\' \
153 - -DSTANDARD_UTILS_PATH=\'\"${EPREFIX}/bin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/usr/sbin\"\' \
154 - -DSYS_BASHRC=\'\"${EPREFIX}/etc/bash/bashrc\"\' \
155 - -DSYS_BASH_LOGOUT=\'\"${EPREFIX}/etc/bash/bash_logout\"\' \
156 - -DNON_INTERACTIVE_LOGIN_SHELLS \
157 - -DSSH_SOURCE_BASHRC \
158 - $(use bashlogger && echo -DSYSLOG_HISTORY)
159 -
160 - # Don't even think about building this statically without
161 - # reading Bug 7714 first. If you still build it statically,
162 - # don't come crying to us with bugs ;).
163 - #use static && export LDFLAGS="${LDFLAGS} -static"
164 - use nls || myconf+=( --disable-nls )
165 -
166 - # Historically, we always used the builtin readline, but since
167 - # our handling of SONAME upgrades has gotten much more stable
168 - # in the PM (and the readline ebuild itself preserves the old
169 - # libs during upgrades), linking against the system copy should
170 - # be safe.
171 - # Exact cached version here doesn't really matter as long as it
172 - # is at least what's in the DEPEND up above.
173 - export ac_cv_rl_version=${READLINE_VER%%_*}
174 -
175 - # Force linking with system curses ... the bundled termcap lib
176 - # sucks bad compared to ncurses. For the most part, ncurses
177 - # is here because readline needs it. But bash itself calls
178 - # ncurses in one or two small places :(.
179 -
180 - if is_release ; then
181 - # Use system readline only with released versions.
182 - myconf+=( --with-installed-readline=. )
183 - fi
184 -
185 - if use plugins; then
186 - append-ldflags -Wl,-rpath,/usr/$(get_libdir)/bash
187 - else
188 - # Disable the plugins logic by hand since bash doesn't
189 - # provide a way of doing it.
190 - export ac_cv_func_dl{close,open,sym}=no \
191 - ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no
192 - sed -i \
193 - -e '/LOCAL_LDFLAGS=/s:-rdynamic::' \
194 - configure || die
195 - fi
196 - tc-export AR #444070
197 - econf "${myconf[@]}"
198 -}
199 -
200 -src_compile() {
201 - emake
202 -
203 - if use plugins ; then
204 - emake -C examples/loadables all others
205 - fi
206 -}
207 -
208 -src_install() {
209 - local d f
210 -
211 - default
212 -
213 - dodir /bin
214 - mv "${ED%/}"/usr/bin/bash "${ED%/}"/bin/ || die
215 - dosym bash /bin/rbash
216 -
217 - insinto /etc/bash
218 - doins "${FILESDIR}"/bash_logout
219 - doins "$(prefixify_ro "${FILESDIR}"/bashrc)"
220 - keepdir /etc/bash/bashrc.d
221 - insinto /etc/skel
222 - for f in bash{_logout,_profile,rc} ; do
223 - newins "${FILESDIR}"/dot-${f} .${f}
224 - done
225 -
226 - local sed_args=(
227 - -e "s:#${USERLAND}#@::"
228 - -e '/#@/d'
229 - )
230 - if ! use readline ; then
231 - sed_args+=( #432338
232 - -e '/^shopt -s histappend/s:^:#:'
233 - -e 's:use_color=true:use_color=false:'
234 - )
235 - fi
236 - sed -i \
237 - "${sed_args[@]}" \
238 - "${ED%/}"/etc/skel/.bashrc \
239 - "${ED%/}"/etc/bash/bashrc || die
240 -
241 - if use plugins ; then
242 - exeinto /usr/$(get_libdir)/bash
243 - doexe $(echo examples/loadables/*.o | sed 's:\.o::g')
244 - insinto /usr/include/bash-plugins
245 - doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h}
246 - fi
247 -
248 - if use examples ; then
249 - for d in examples/{functions,misc,scripts,startup-files} ; do
250 - exeinto /usr/share/doc/${PF}/${d}
251 - insinto /usr/share/doc/${PF}/${d}
252 - for f in ${d}/* ; do
253 - if [[ ${f##*/} != PERMISSION ]] && [[ ${f##*/} != *README ]] ; then
254 - doexe ${f}
255 - else
256 - doins ${f}
257 - fi
258 - done
259 - done
260 - fi
261 -
262 - doman doc/*.1
263 - newdoc CWRU/changelog ChangeLog
264 - dosym bash.info /usr/share/info/bashref.info
265 -}
266 -
267 -pkg_preinst() {
268 - if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]] ; then
269 - mkdir -p "${EROOT}"/etc/bash
270 - mv -f "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/
271 - fi
272 -
273 - if [[ -L ${EROOT}/bin/sh ]] ; then
274 - # rewrite the symlink to ensure that its mtime changes. having /bin/sh
275 - # missing even temporarily causes a fatal error with paludis.
276 - local target=$(readlink "${EROOT}"/bin/sh)
277 - local tmp=$(emktemp "${EROOT}"/bin)
278 - ln -sf "${target}" "${tmp}"
279 - mv -f "${tmp}" "${EROOT}"/bin/sh
280 - fi
281 -}
282 -
283 -pkg_postinst() {
284 - # If /bin/sh does not exist, provide it
285 - if [[ ! -e ${EROOT}/bin/sh ]] ; then
286 - ln -sf bash "${EROOT}"/bin/sh
287 - fi
288 -}
289
290 diff --git a/app-shells/bash/files/bash-5.0-history-zero-length.patch b/app-shells/bash/files/bash-5.0-history-zero-length.patch
291 deleted file mode 100644
292 index 981bbfb0625..00000000000
293 --- a/app-shells/bash/files/bash-5.0-history-zero-length.patch
294 +++ /dev/null
295 @@ -1,34 +0,0 @@
296 -*** ../bash-5.0-patched/bashhist.c 2018-07-05 22:41:14.000000000 -0400
297 ---- bashhist.c 2019-02-20 16:20:04.000000000 -0500
298 -***************
299 -*** 561,573 ****
300 - if (!history_expansion_inhibited && history_expansion && history_expansion_p (line))
301 - {
302 - /* If we are expanding the second or later line of a multi-line
303 - command, decrease history_length so references to history expansions
304 - in these lines refer to the previous history entry and not the
305 - current command. */
306 - if (history_length > 0 && command_oriented_history && current_command_first_line_saved && current_command_line_count > 1)
307 - history_length--;
308 - expanded = history_expand (line, &history_value);
309 - if (history_length >= 0 && command_oriented_history && current_command_first_line_saved && current_command_line_count > 1)
310 -! history_length++;
311 -
312 - if (expanded)
313 ---- 561,576 ----
314 - if (!history_expansion_inhibited && history_expansion && history_expansion_p (line))
315 - {
316 -+ int old_len;
317 -+
318 - /* If we are expanding the second or later line of a multi-line
319 - command, decrease history_length so references to history expansions
320 - in these lines refer to the previous history entry and not the
321 - current command. */
322 -+ old_len = history_length;
323 - if (history_length > 0 && command_oriented_history && current_command_first_line_saved && current_command_line_count > 1)
324 - history_length--;
325 - expanded = history_expand (line, &history_value);
326 - if (history_length >= 0 && command_oriented_history && current_command_first_line_saved && current_command_line_count > 1)
327 -! history_length = old_len;
328 -
329 - if (expanded)