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