SHA256
3
0
forked from pool/bash
OBS User unknown 2009-02-19 16:52:11 +00:00 committed by Git OBS Bridge
parent 1c2a468ee1
commit 4d9f0f7a9c
5 changed files with 125 additions and 15 deletions

31
bash-3.2-complete.dif Normal file
View File

@ -0,0 +1,31 @@
--- pcomplete.c
+++ pcomplete.c 2009-01-30 16:59:12.648484782 +0100
@@ -990,7 +990,7 @@ gen_shell_function_matches (cs, text, li
SHELL_VAR *f, *v;
WORD_LIST *cmdlist;
int fval;
- sh_parser_state_t ps;
+ sh_parser_state_t ps, *__restrict__ pps = &ps;
#if defined (ARRAY_VARS)
ARRAY *a;
#endif
@@ -1015,9 +1015,16 @@ gen_shell_function_matches (cs, text, li
cmdlist = build_arg_list (funcname, text, lwords, cw);
- save_parser_state (&ps);
- fval = execute_shell_function (f, cmdlist);
- restore_parser_state (&ps);
+ save_parser_state (pps);
+ begin_unwind_frame ("gen-shell-function-matches");
+ add_unwind_protect (restore_parser_state, (char *)pps);
+ add_unwind_protect (dispose_words, (char *)cmdlist);
+ add_unwind_protect (unbind_compfunc_variables, (char *)0);
+
+ fval = execute_shell_function (f, cmdlist);
+
+ discard_unwind_frame ("gen-shell-function-matches");
+ restore_parser_state (pps);
/* Now clean up and destroy everything. */
dispose_words (cmdlist);

View File

@ -1,8 +1,23 @@
-------------------------------------------------------------------
Wed Feb 18 16:42:47 CET 2009 - werner@suse.de
- Add readline patch 13
-------------------------------------------------------------------
Fri Jan 30 17:03:36 CET 2009 - werner@suse.de
- Restore state if shell function for completion is interrupted (bnc#470548)
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jan 13 12:34:56 CET 2009 - olh@suse.de Tue Jan 13 12:34:56 CET 2009 - olh@suse.de
- obsolete old -XXbit packages (bnc#437293) - obsolete old -XXbit packages (bnc#437293)
-------------------------------------------------------------------
Fri Dec 19 15:59:27 CET 2008 - werner@suse.de
- Enable large file support (bnc#460560)
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Dec 9 19:13:46 CET 2008 - schwab@suse.de Tue Dec 9 19:13:46 CET 2008 - schwab@suse.de

View File

@ -18,7 +18,7 @@
Name: bash Name: bash
BuildRequires: bison ncurses-devel BuildRequires: bison fdupes ncurses-devel
License: GPL v2 or later License: GPL v2 or later
Group: System/Shells Group: System/Shells
%define bash_vers 3.2 %define bash_vers 3.2
@ -27,7 +27,7 @@ Recommends: bash-doc = %bash_vers
Suggests: command-not-found Suggests: command-not-found
AutoReqProv: on AutoReqProv: on
Version: 3.2 Version: 3.2
Release: 144 Release: 148
Summary: The GNU Bourne-Again Shell Summary: The GNU Bourne-Again Shell
Url: http://www.gnu.org/software/bash/bash.html Url: http://www.gnu.org/software/bash/bash.html
Source0: bash-%{bash_vers}.tar.bz2 Source0: bash-%{bash_vers}.tar.bz2
@ -53,6 +53,7 @@ Patch11: bash-3.1-loadables.dif
Patch14: bash-3.2-sigrestart.patch Patch14: bash-3.2-sigrestart.patch
Patch15: bash-3.2-longjmp.dif Patch15: bash-3.2-longjmp.dif
Patch16: bash-3.2-setlocale.dif Patch16: bash-3.2-setlocale.dif
Patch17: bash-3.2-complete.dif
Patch20: readline-%{rl_vers}.dif Patch20: readline-%{rl_vers}.dif
Patch21: readline-4.3-input.dif Patch21: readline-4.3-input.dif
Patch22: readline-5.2-wrap.patch Patch22: readline-5.2-wrap.patch
@ -62,6 +63,7 @@ Patch40: command-not-found.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%global _sysconfdir /etc %global _sysconfdir /etc
%global _incdir %{_includedir} %global _incdir %{_includedir}
%global _minsh 0
%description %description
Bash is an sh-compatible command interpreter that executes commands Bash is an sh-compatible command interpreter that executes commands
@ -84,7 +86,7 @@ Group: Documentation/Man
Provides: bash:%{_infodir}/bash.info.gz Provides: bash:%{_infodir}/bash.info.gz
PreReq: %install_info_prereq PreReq: %install_info_prereq
Version: 3.2 Version: 3.2
Release: 103 Release: 107
AutoReqProv: on AutoReqProv: on
%description -n bash-doc %description -n bash-doc
@ -104,7 +106,7 @@ Summary: The Readline Library
Group: System/Libraries Group: System/Libraries
Provides: bash:/%{_lib}/libreadline.so.5 Provides: bash:/%{_lib}/libreadline.so.5
Version: 5.2 Version: 5.2
Release: 103 Release: 107
Recommends: readline-doc = %{version} Recommends: readline-doc = %{version}
# bug437293 # bug437293
%ifarch ppc64 %ifarch ppc64
@ -133,7 +135,7 @@ Summary: Include Files and Libraries mandatory for Development
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Provides: bash:%{_libdir}/libreadline.a Provides: bash:%{_libdir}/libreadline.a
Version: 5.2 Version: 5.2
Release: 144 Release: 148
Requires: libreadline5 = %{version} Requires: libreadline5 = %{version}
Requires: ncurses-devel Requires: ncurses-devel
Recommends: readline-doc = %{version} Recommends: readline-doc = %{version}
@ -162,7 +164,7 @@ Group: System/Libraries
Provides: readline:%{_infodir}/readline.info.gz Provides: readline:%{_infodir}/readline.info.gz
PreReq: %install_info_prereq PreReq: %install_info_prereq
Version: 5.2 Version: 5.2
Release: 103 Release: 107
AutoReqProv: on AutoReqProv: on
%description -n readline-doc %description -n readline-doc
@ -198,6 +200,7 @@ unset p
%patch14 -p0 -b .sigrestart %patch14 -p0 -b .sigrestart
%patch15 -p0 -b .longjmp %patch15 -p0 -b .longjmp
%patch16 -p0 -b .setlocale %patch16 -p0 -b .setlocale
%patch17 -p0 -b .complete
%patch21 -p0 -b .zerotty %patch21 -p0 -b .zerotty
%patch22 -p0 -b .wrap %patch22 -p0 -b .wrap
%patch23 -p0 -b .conf %patch23 -p0 -b .conf
@ -237,15 +240,24 @@ cd ../readline-%{rl_vers}
eval $var=\${$var:+\$$var\ }$flag eval $var=\${$var:+\$$var\ }$flag
fi fi
} }
CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -DRECYCLES_PIDS -Wall -g" echo 'int main () { return !(sizeof(void*) >= 8); }' | gcc -x c -o test64 -
if ./test64 ; then
LARGEFILE=""
else
LARGEFILE="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
fi
rm -f ./test64
CFLAGS="$RPM_OPT_FLAGS $LARGEFILE -D_GNU_SOURCE -DRECYCLES_PIDS -Wall -g"
LDFLAGS="" LDFLAGS=""
cflags -std=gnu89 CFLAGS cflags -std=gnu89 CFLAGS
cflags -Wuninitialized CFLAGS cflags -Wuninitialized CFLAGS
cflags -Wextra CFLAGS cflags -Wextra CFLAGS
cflags -Wno-unprototyped-calls CFLAGS cflags -Wno-unprototyped-calls CFLAGS
cflags -Wno-switch-enum CFLAGS cflags -Wno-switch-enum CFLAGS
cflags -ftree-loop-linear CFLAGS
cflags -pipe CFLAGS cflags -pipe CFLAGS
cflags -Wl,--as-needed LDFLAGS cflags -Wl,--as-needed LDFLAGS
cflags -Wl,-O,2 LDFLAGS
CC=gcc CC=gcc
CC_FOR_BUILD="$CC" CC_FOR_BUILD="$CC"
CFLAGS_FOR_BUILD="$CFLAGS" CFLAGS_FOR_BUILD="$CFLAGS"
@ -269,8 +281,20 @@ cd ../bash-%{bash_vers}
ln -sf ../readline-%{rl_vers} readline ln -sf ../readline-%{rl_vers} readline
export LD_LIBRARY_PATH=$PWD/../readline-%{rl_vers} export LD_LIBRARY_PATH=$PWD/../readline-%{rl_vers}
CC="gcc -I$PWD -L$PWD/../readline-%{rl_vers}" CC="gcc -I$PWD -L$PWD/../readline-%{rl_vers}"
%if %_minsh
cflags -Os CFLAGS
# cflags -U_FORTIFY_SOURCE CFLAGS
# cflags -funswitch-loops CFLAGS
# cflags -ftree-loop-im CFLAGS
# cflags -ftree-loop-ivcanon CFLAGS
# cflags -fprefetch-loop-arrays CFLAGS
# cflags -fno-stack-protector CFLAGS
# cflags -fno-unwind-tables CFLAGS
# cflags -fno-asynchronous-unwind-tables CFLAGS
%else
cflags -fPIE CFLAGS cflags -fPIE CFLAGS
cflags -pie LDFLAGS cflags -pie LDFLAGS
%endif
CC_FOR_BUILD="$CC" CC_FOR_BUILD="$CC"
CFLAGS_FOR_BUILD="$CFLAGS" CFLAGS_FOR_BUILD="$CFLAGS"
export CC_FOR_BUILD CFLAGS_FOR_BUILD CFLAGS LDFLAGS CC export CC_FOR_BUILD CFLAGS_FOR_BUILD CFLAGS LDFLAGS CC
@ -281,7 +305,6 @@ cd ../bash-%{bash_vers}
# #
SYSMALLOC=" SYSMALLOC="
--without-gnu-malloc --without-gnu-malloc
--without-glibc-malloc
" "
# #
# System readline library (comment out it not to be used) # System readline library (comment out it not to be used)
@ -290,6 +313,31 @@ cd ../bash-%{bash_vers}
--with-installed-readline --with-installed-readline
" "
bash support/mkconffiles -v bash support/mkconffiles -v
%if %_minsh
./configure --build=%{_target_cpu}-suse-linux \
--prefix=%{_prefix} \
--mandir=%{_mandir} \
--infodir=%{_infodir} \
--libdir=%{_libdir} \
--with-curses \
--enable-minimal-config \
--enable-arith-for-command \
--enable-array-variables \
--enable-brace-expansion \
--enable-cond-command \
--enable-cond-regexp \
--enable-directory-stack \
--enable-dparen-arithmetic \
--enable-extended-glob \
--enable-job-control \
--enable-net-redirections \
--enable-process-substitution \
--disable-strict-posix-default \
--enable-separate-helpfiles=%{_datadir}/bash/helpfiles \
$READLINE
make Program=sh sh
make distclean
%endif
./configure --build=%{_target_cpu}-suse-linux \ ./configure --build=%{_target_cpu}-suse-linux \
--prefix=%{_prefix} \ --prefix=%{_prefix} \
--mandir=%{_mandir} \ --mandir=%{_mandir} \
@ -311,6 +359,8 @@ cd ../bash-%{bash_vers}
--enable-brace-expansion \ --enable-brace-expansion \
--enable-command-timing \ --enable-command-timing \
--enable-disabled-builtins \ --enable-disabled-builtins \
--disable-strict-posix-default \
--enable-separate-helpfiles=%{_datadir}/bash/helpfiles \
$READLINE $READLINE
%if %do_profiling %if %do_profiling
make CFLAGS="$CFLAGS "%cflags_profile_generate bash printenv recho zecho make CFLAGS="$CFLAGS "%cflags_profile_generate bash printenv recho zecho
@ -338,8 +388,13 @@ cd ../bash-%{bash_vers}
make install DESTDIR=%{buildroot} make install DESTDIR=%{buildroot}
mkdir -p %{buildroot}/bin mkdir -p %{buildroot}/bin
mv %{buildroot}%{_bindir}/bash %{buildroot}/bin/ mv %{buildroot}%{_bindir}/bash %{buildroot}/bin/
%if %_minsh
install sh %{buildroot}/bin/sh
ln -sf ../../bin/sh %{buildroot}%{_bindir}/sh
%else
ln -sf bash %{buildroot}/bin/sh ln -sf bash %{buildroot}/bin/sh
ln -sf ../../bin/bash %{buildroot}%{_bindir}/sh ln -sf ../../bin/bash %{buildroot}%{_bindir}/sh
%endif
ln -sf ../../bin/bash %{buildroot}%{_bindir}/rbash ln -sf ../../bin/bash %{buildroot}%{_bindir}/rbash
install -m 644 COMPAT NEWS %{buildroot}%{_defaultdocdir}/bash/ install -m 644 COMPAT NEWS %{buildroot}%{_defaultdocdir}/bash/
install -m 644 COPYING %{buildroot}%{_defaultdocdir}/bash/ install -m 644 COPYING %{buildroot}%{_defaultdocdir}/bash/
@ -379,6 +434,7 @@ EOF
touch -t 199605181720.50 %{buildroot}%{_sysconfdir}/skel/.bash_history touch -t 199605181720.50 %{buildroot}%{_sysconfdir}/skel/.bash_history
chmod 600 %{buildroot}%{_sysconfdir}/skel/.bash_history chmod 600 %{buildroot}%{_sysconfdir}/skel/.bash_history
%find_lang bash %find_lang bash
%fdupes -s %{buildroot}%{_datadir}/bash/helpfiles
%post -n bash-doc %post -n bash-doc
%install_info --info-dir=%{_infodir} %{_infodir}/bash.info.gz %install_info --info-dir=%{_infodir} %{_infodir}/bash.info.gz
@ -405,15 +461,18 @@ ldd -u -r %{buildroot}%{_libdir}/libreadline.so || true
%files -f bash.lang %files -f bash.lang
%defattr(-,root,root) %defattr(-,root,root)
%attr(600,root,root) %{_sysconfdir}/skel/.bash_history %config %attr(600,root,root) %{_sysconfdir}/skel/.bash_history
%attr(644,root,root) %{_sysconfdir}/skel/.bashrc %config %attr(644,root,root) %{_sysconfdir}/skel/.bashrc
%attr(644,root,root) %{_sysconfdir}/skel/.profile %config %attr(644,root,root) %{_sysconfdir}/skel/.profile
/bin/bash /bin/bash
/bin/sh /bin/sh
%dir %{_sysconfdir}/bash_completion.d %dir %{_sysconfdir}/bash_completion.d
%{_bindir}/bashbug %{_bindir}/bashbug
%{_bindir}/rbash %{_bindir}/rbash
%{_bindir}/sh %{_bindir}/sh
%dir %{_datadir}/bash
%dir %{_datadir}/bash/helpfiles
%{_datadir}/bash/helpfiles/*
%files -n bash-doc %files -n bash-doc
%defattr(-,root,root) %defattr(-,root,root)
@ -447,8 +506,14 @@ ldd -u -r %{buildroot}%{_libdir}/libreadline.so || true
%doc %{_defaultdocdir}/readline/ %doc %{_defaultdocdir}/readline/
%changelog %changelog
* Wed Feb 18 2009 werner@suse.de
- Add readline patch 13
* Fri Jan 30 2009 werner@suse.de
- Restore state if shell function for completion is interrupted (bnc#470548)
* Tue Jan 13 2009 olh@suse.de * Tue Jan 13 2009 olh@suse.de
- obsolete old -XXbit packages (bnc#437293) - obsolete old -XXbit packages (bnc#437293)
* Fri Dec 19 2008 werner@suse.de
- Enable large file support (bnc#460560)
* Tue Dec 09 2008 schwab@suse.de * Tue Dec 09 2008 schwab@suse.de
- Add bash patches 40-48. - Add bash patches 40-48.
* Tue Nov 25 2008 werner@suse.de * Tue Nov 25 2008 werner@suse.de

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:5b9440ccb9f95348a8546b8c5c06358500e550e1e61c49e5be16ec7570b79356 oid sha256:bd53f4d6c900264b2d2f2c4f29cd4e4e7879da7d370751530c090ede453a8f15
size 7718 size 8691

View File

@ -1,11 +1,10 @@
--- .pkgextract --- .pkgextract
+++ .pkgextract 2005-12-09 17:09:26.000000000 +0100 +++ .pkgextract 2005-12-09 17:09:26.000000000 +0100
@@ -0,0 +1,6 @@ @@ -0,0 +1,5 @@
+tar Oxfj ../readline-5.2-patches.tar.bz2 | patch -p0 -s +tar Oxfj ../readline-5.2-patches.tar.bz2 | patch -p0 -s
+patch -p2 -s --suffix=".zerotty" < ../readline-4.3-input.dif +patch -p2 -s --suffix=".zerotty" < ../readline-4.3-input.dif
+patch -p2 -s --suffix=".wrap" < ../readline-5.2-wrap.patch +patch -p2 -s --suffix=".wrap" < ../readline-5.2-wrap.patch
+patch -p2 -s --suffix=".conf" < ../readline-5.2-conf.patch +patch -p2 -s --suffix=".conf" < ../readline-5.2-conf.patch
+patch -p2 -s --suffix=".input" < ../readline-5.1-input.patch
+patch -p0 -s --suffix=".destdir" < ../readline-5.1-destdir.patch +patch -p0 -s --suffix=".destdir" < ../readline-5.1-destdir.patch
--- Makefile.in --- Makefile.in
+++ Makefile.in 2005-12-09 17:09:26.000000000 +0100 +++ Makefile.in 2005-12-09 17:09:26.000000000 +0100