1 |
commit: 9fe14b5d2bb5d51b79a6617c718ee4016864dd51 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 21 23:38:26 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 21 23:43:00 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9fe14b5d |
7 |
|
8 |
app-shells/bash: add 5.2_alpha |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
app-shells/bash/Manifest | 1 + |
13 |
app-shells/bash/bash-5.2_alpha.ebuild | 266 ++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 267 insertions(+) |
15 |
|
16 |
diff --git a/app-shells/bash/Manifest b/app-shells/bash/Manifest |
17 |
index cbd7bb836921..09025481e8aa 100644 |
18 |
--- a/app-shells/bash/Manifest |
19 |
+++ b/app-shells/bash/Manifest |
20 |
@@ -9,6 +9,7 @@ DIST bash-4.3.tar.gz 7955839 BLAKE2B 398461e90a1ab6fd726b1a9db41c4c2a1e184034e3b |
21 |
DIST bash-4.4.tar.gz 9377313 BLAKE2B ac0e481dd4f2d5b91eea4f0156f1fc398ef8bd1ccd941366aa9b041be576114c51e1ff1431ec871e96fb72257c2a05a0ebcbd88c43c221610fef7dfdb2502fc0 SHA512 73de3b425faaac55e45456b0f6f6d8077b5dfa7bb76e0d1894a19361b4a2b6bd4fbbe182117ddbfe9b07b4d898fba03537c261badc9533dd3c0da891764c7f29 |
22 |
DIST bash-5.0.tar.gz 10135110 BLAKE2B a6c4d79144aa0c0f4a9433d618085c0d46b792b1de429b161f9f0266b55c099e13e44416c0886758a6f29411f5ceb79bfb0ec4eda47473f2713ae0b8081d6d3e SHA512 bb4519f06e278f271d08722b531e49d2e842cc3e0b02a6b3eee422e2efcb5b6226111af43f5e5eae56beb85ac8bfebcd6a4aacbabb8f609e529aa4d571890864 |
23 |
DIST bash-5.1.tar.gz 10458638 BLAKE2B 42059556694b604911b5b7936f94d42d8923f2931f3ebacefd95454274c7baadb1ec97629a524c1542e2e282dae66f1389334f8edc572ca8ee841cc3ac449ba7 SHA512 c44a0ce381469219548a3a27589af3fea4f22eda1ca4e9434b59fc16da81b471c29ce18e31590e0860a6a251a664b68c2b45e3a17d22cfc02799ffd9a208390c |
24 |
+DIST bash-5.2-alpha.tar.gz 10731197 BLAKE2B d512dee1d9d9795184ef7683db378b5be574d9ad6e17d5b1d1cc1f337f401716f07739aacaa865b9e472cac0d729b8dd7de8bc7ca3054e569f933c06fef63b77 SHA512 97bd2a9891b8334ec37c57d047326a95e079379fff8be95b6b43ecac9375b750eb221a9b90dc481c1b8d113bcc30a285664608538015f30aa43891a03e4dd77b |
25 |
DIST bash205b-001 1132 BLAKE2B 0c5eef29777d54ef05957ea3d63b1556fb380bd20c238dc28993d822b37bc4e78ff4048ad069f6b8cd25da77ccdeb7aecd86c4349cb9d81e5e94c7001eeae5e6 SHA512 5ce4357468821b05e747201f3aa57225ad8f540c9e2c87051720490e039c30b478b9b662a68f14a0800fefe40184e4495e2645665200f9d75e9a115b2ac08071 |
26 |
DIST bash205b-002 755 BLAKE2B 6a6ed5679d451f02f8104b345c1722d11718ce3b4043b581c17786d40d8da69a34786fb56d0c363dba277b8e9dd33f12f70c9cc73a9fc39ba4a8319406f0458d SHA512 46947b0229478d5c2cfeff68b8ebc00e4ef0c8b94e336ca12f72b4490ba3622c0240c01c17c1641c3b07adc2c64ec94d6d780365e8990768ec8888f3a9526883 |
27 |
DIST bash205b-003 2356 BLAKE2B b7887d00d92fd298cd07a15e1c73b516dabd22ecd74c97091636dd97a0cd55024ed698e5cc924c4311d994dd326b1ad074bea35e7650cf9cf4e25c60d2713fa7 SHA512 74528ca5d165b812d299f1c69b47757bd677c0b22ce4217e155cd641708b02364a93c6709fb57b546b376b36da74429a61493921c7c199563da40ddcf1c1f399 |
28 |
|
29 |
diff --git a/app-shells/bash/bash-5.2_alpha.ebuild b/app-shells/bash/bash-5.2_alpha.ebuild |
30 |
new file mode 100644 |
31 |
index 000000000000..61a2aecd2b7c |
32 |
--- /dev/null |
33 |
+++ b/app-shells/bash/bash-5.2_alpha.ebuild |
34 |
@@ -0,0 +1,266 @@ |
35 |
+# Copyright 1999-2022 Gentoo Authors |
36 |
+# Distributed under the terms of the GNU General Public License v2 |
37 |
+ |
38 |
+EAPI=7 |
39 |
+ |
40 |
+inherit flag-o-matic toolchain-funcs prefix |
41 |
+ |
42 |
+# Official patchlevel |
43 |
+# See ftp://ftp.cwru.edu/pub/bash/bash-5.1-patches/ |
44 |
+PLEVEL="${PV##*_p}" |
45 |
+MY_PV="${PV/_p*}" |
46 |
+MY_PV="${MY_PV/_/-}" |
47 |
+MY_P="${PN}-${MY_PV}" |
48 |
+is_release() { |
49 |
+ case ${PV} in |
50 |
+ *_alpha*|*_beta*|*_rc*) return 1 ;; |
51 |
+ *) return 0 ;; |
52 |
+ esac |
53 |
+} |
54 |
+[[ ${PV} != *_p* ]] && PLEVEL=0 |
55 |
+patches() { |
56 |
+ local opt=${1} plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}} |
57 |
+ [[ ${plevel} -eq 0 ]] && return 1 |
58 |
+ eval set -- {1..${plevel}} |
59 |
+ set -- $(printf "${pn}${pv/\.}-%03d " "$@") |
60 |
+ if [[ ${opt} == -s ]] ; then |
61 |
+ echo "${@/#/${DISTDIR}/}" |
62 |
+ else |
63 |
+ local u |
64 |
+ for u in mirror://gnu/${pn} ftp://ftp.cwru.edu/pub/bash ; do |
65 |
+ printf "${u}/${pn}-${pv}-patches/%s " "$@" |
66 |
+ done |
67 |
+ fi |
68 |
+} |
69 |
+ |
70 |
+# The version of readline this bash normally ships with. |
71 |
+READLINE_VER="8.2_alpha" |
72 |
+ |
73 |
+DESCRIPTION="The standard GNU Bourne again shell" |
74 |
+HOMEPAGE="https://tiswww.case.edu/php/chet/bash/bashtop.html" |
75 |
+if is_release ; then |
76 |
+ SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)" |
77 |
+else |
78 |
+ SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz" |
79 |
+fi |
80 |
+ |
81 |
+LICENSE="GPL-3" |
82 |
+SLOT="0" |
83 |
+if [[ ${PV} != *_alpha* && ${PV} != *_rc* ]] ; then |
84 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
85 |
+fi |
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 |
+" |
96 |
+# We only need yacc when the .y files get patched (bash42-005, bash51-011) |
97 |
+#BDEPEND="virtual/yacc" |
98 |
+ |
99 |
+S="${WORKDIR}/${MY_P}" |
100 |
+ |
101 |
+PATCHES=( |
102 |
+ # Patches from Chet sent to bashbug ml |
103 |
+ "${FILESDIR}"/${PN}-5.0-syslog-history-extern.patch |
104 |
+) |
105 |
+ |
106 |
+pkg_setup() { |
107 |
+ # bug #7332 |
108 |
+ if is-flag -malign-double ; then |
109 |
+ eerror "Detected bad CFLAGS '-malign-double'. Do not use this" |
110 |
+ eerror "as it breaks LFS (struct stat64) on x86." |
111 |
+ die "remove -malign-double from your CFLAGS mr ricer" |
112 |
+ fi |
113 |
+ |
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}/* || die |
131 |
+ touch lib/{readline,termcap}/Makefile.in || die # 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, bug #407985 |
139 |
+ sed -i -r '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in || die |
140 |
+ touch -r . doc/* || die |
141 |
+ |
142 |
+ eapply -p0 "${PATCHES[@]}" |
143 |
+ eapply_user |
144 |
+} |
145 |
+ |
146 |
+src_configure() { |
147 |
+ local myconf=( |
148 |
+ --disable-profiling |
149 |
+ |
150 |
+ # Force linking with system curses ... the bundled termcap lib |
151 |
+ # sucks bad compared to ncurses. For the most part, ncurses |
152 |
+ # is here because readline needs it. But bash itself calls |
153 |
+ # ncurses in one or two small places :(. |
154 |
+ --with-curses |
155 |
+ |
156 |
+ $(use_enable mem-scramble) |
157 |
+ $(use_enable net net-redirections) |
158 |
+ $(use_enable readline) |
159 |
+ $(use_enable readline bang-history) |
160 |
+ $(use_enable readline history) |
161 |
+ $(use_with afs) |
162 |
+ $(use_with mem-scramble bash-malloc) |
163 |
+ ) |
164 |
+ |
165 |
+ # For descriptions of these, see config-top.h |
166 |
+ # bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426 |
167 |
+ append-cppflags \ |
168 |
+ -DDEFAULT_PATH_VALUE=\'\"${EPREFIX}/usr/local/sbin:${EPREFIX}/usr/local/bin:${EPREFIX}/usr/sbin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/bin\"\' \ |
169 |
+ -DSTANDARD_UTILS_PATH=\'\"${EPREFIX}/bin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/usr/sbin\"\' \ |
170 |
+ -DSYS_BASHRC=\'\"${EPREFIX}/etc/bash/bashrc\"\' \ |
171 |
+ -DSYS_BASH_LOGOUT=\'\"${EPREFIX}/etc/bash/bash_logout\"\' \ |
172 |
+ -DNON_INTERACTIVE_LOGIN_SHELLS \ |
173 |
+ -DSSH_SOURCE_BASHRC \ |
174 |
+ $(use bashlogger && echo -DSYSLOG_HISTORY) |
175 |
+ |
176 |
+ # Don't even think about building this statically without |
177 |
+ # reading bug #7714 first. If you still build it statically, |
178 |
+ # don't come crying to us with bugs ;). |
179 |
+ #use static && export LDFLAGS="${LDFLAGS} -static" |
180 |
+ use nls || myconf+=( --disable-nls ) |
181 |
+ |
182 |
+ # Historically, we always used the builtin readline, but since |
183 |
+ # our handling of SONAME upgrades has gotten much more stable |
184 |
+ # in the PM (and the readline ebuild itself preserves the old |
185 |
+ # libs during upgrades), linking against the system copy should |
186 |
+ # be safe. |
187 |
+ # Exact cached version here doesn't really matter as long as it |
188 |
+ # is at least what's in the DEPEND up above. |
189 |
+ export ac_cv_rl_version=${READLINE_VER%%_*} |
190 |
+ |
191 |
+ if is_release ; then |
192 |
+ # Use system readline only with released versions. |
193 |
+ myconf+=( --with-installed-readline=. ) |
194 |
+ fi |
195 |
+ |
196 |
+ if use plugins ; then |
197 |
+ append-ldflags -Wl,-rpath,"${EPREFIX}"/usr/$(get_libdir)/bash |
198 |
+ else |
199 |
+ # Disable the plugins logic by hand since bash doesn't |
200 |
+ # provide a way of doing it. |
201 |
+ export ac_cv_func_dl{close,open,sym}=no \ |
202 |
+ ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no |
203 |
+ |
204 |
+ sed -i \ |
205 |
+ -e '/LOCAL_LDFLAGS=/s:-rdynamic::' \ |
206 |
+ configure || die |
207 |
+ fi |
208 |
+ |
209 |
+ # bug #444070 |
210 |
+ tc-export AR |
211 |
+ |
212 |
+ econf "${myconf[@]}" |
213 |
+} |
214 |
+ |
215 |
+src_compile() { |
216 |
+ emake |
217 |
+ |
218 |
+ if use plugins ; then |
219 |
+ emake -C examples/loadables all others |
220 |
+ fi |
221 |
+} |
222 |
+ |
223 |
+src_install() { |
224 |
+ local d f |
225 |
+ |
226 |
+ default |
227 |
+ |
228 |
+ dodir /bin |
229 |
+ mv "${ED}"/usr/bin/bash "${ED}"/bin/ || die |
230 |
+ dosym bash /bin/rbash |
231 |
+ |
232 |
+ insinto /etc/bash |
233 |
+ doins "${FILESDIR}"/bash_logout |
234 |
+ doins "$(prefixify_ro "${FILESDIR}"/bashrc)" |
235 |
+ |
236 |
+ keepdir /etc/bash/bashrc.d |
237 |
+ |
238 |
+ insinto /etc/skel |
239 |
+ for f in bash{_logout,_profile,rc} ; do |
240 |
+ newins "${FILESDIR}"/dot-${f} .${f} |
241 |
+ done |
242 |
+ |
243 |
+ local sed_args=( |
244 |
+ -e "s:#${USERLAND}#@::" |
245 |
+ -e '/#@/d' |
246 |
+ ) |
247 |
+ |
248 |
+ if ! use readline ; then |
249 |
+ # bug #432338 |
250 |
+ sed_args+=( |
251 |
+ -e '/^shopt -s histappend/s:^:#:' |
252 |
+ -e 's:use_color=true:use_color=false:' |
253 |
+ ) |
254 |
+ fi |
255 |
+ |
256 |
+ sed -i \ |
257 |
+ "${sed_args[@]}" \ |
258 |
+ "${ED}"/etc/skel/.bashrc \ |
259 |
+ "${ED}"/etc/bash/bashrc || die |
260 |
+ |
261 |
+ if use plugins ; then |
262 |
+ exeinto /usr/$(get_libdir)/bash |
263 |
+ doexe $(echo examples/loadables/*.o | sed 's:\.o::g') |
264 |
+ |
265 |
+ insinto /usr/include/bash-plugins |
266 |
+ doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h} |
267 |
+ fi |
268 |
+ |
269 |
+ if use examples ; then |
270 |
+ for d in examples/{functions,misc,scripts,startup-files} ; do |
271 |
+ exeinto /usr/share/doc/${PF}/${d} |
272 |
+ docinto ${d} |
273 |
+ for f in ${d}/* ; do |
274 |
+ if [[ ${f##*/} != PERMISSION ]] && [[ ${f##*/} != *README ]] ; then |
275 |
+ doexe ${f} |
276 |
+ else |
277 |
+ dodoc ${f} |
278 |
+ fi |
279 |
+ done |
280 |
+ done |
281 |
+ fi |
282 |
+ |
283 |
+ doman doc/*.1 |
284 |
+ newdoc CWRU/changelog ChangeLog |
285 |
+ dosym bash.info /usr/share/info/bashref.info |
286 |
+} |
287 |
+ |
288 |
+pkg_preinst() { |
289 |
+ if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]] ; then |
290 |
+ mkdir -p "${EROOT}"/etc/bash |
291 |
+ mv -f "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/ |
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 |
+} |