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