Updating link to change in openSUSE:Factory/ksh revision 41.0

OBS-URL: https://build.opensuse.org/package/show/shells/ksh?expand=0&rev=9c57675e8ea17a6c0fbe21c36f197304
This commit is contained in:
OBS User buildservice-autocommit 2010-04-14 13:17:22 +00:00 committed by Git OBS Bridge
parent f73226c0a4
commit bca28b844f
6 changed files with 112 additions and 15 deletions

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Fri Apr 9 10:46:24 CEST 2010 - werner@suse.de
- Add patch from upstream for problem with trap on SIGCHLD (bnc#591248)
-------------------------------------------------------------------
Mon Mar 15 10:59:42 CET 2010 - werner@suse.de
- Add patch from upstream for minor problem with tty reset
-------------------------------------------------------------------
Wed Mar 10 12:34:45 CET 2010 - werner@suse.de

View File

@ -29,13 +29,15 @@ BuildRequires: update-alternatives
Url: http://www.research.att.com/~gsf/download/
License: Common Public License Version 1.0 (CPL1.0)
Group: System/Shells
PreReq: /bin/ln /bin/rm /etc/bash.bashrc /bin/true
Requires(post): /bin/ln /bin/rm /etc/bash.bashrc /bin/true
Requires(postun): /bin/ln /bin/rm /etc/bash.bashrc /bin/true
%if %suse_version > 1120
PreReq: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
%endif
AutoReqProv: on
Version: 93t
Release: 21
Release: 22
Summary: Korn Shell
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: INIT.2010-03-09.tar.bz2
@ -60,8 +62,10 @@ Patch9: ksh93-compat.dif
Patch10: ksh93-suid_exec.dif
Patch11: ksh93-signals.dif
Patch12: ksh93-limits.dif
Patch13: ksh93-tty.dif
Patch14: ksh93-ia64.dif
Patch15: ksh93-s390.dif
Patch16: ksh93-sigchld.dif
%global use_suid_exe 0
%global use_locale 1
%global debug_memleak 0
@ -123,10 +127,12 @@ find share/ -type d -a -empty | xargs -r rm -vrf
%patch10
%patch11
%patch12
%patch13
%ifarch ia64
%patch14
%endif
%patch15
%patch16
%build
typeset -i IGNORED=0x$(ps --no-headers -o ignored $$)
@ -145,15 +151,8 @@ find share/ -type d -a -empty | xargs -r rm -vrf
fi
nobuiltin=$(mktemp -u /tmp/nobuiltin.XXXXXX) || exit 1
set -C
sed -nr '\@^extern[[:blank:]].*[[:blank:]](str|mem|(get|put|set)env|(c|m|re|v)alloc).*\(@{
s@[[:blank:]]+_ARG_@@
s@[a-zA-Z_\*]+[[:blank:]]+@@g
s@([^\(\)]+)\(.*\);$@-fno-builtin-\1@; p}' \
src/lib/libast/include/*.h \
src/lib/libast/sfio/*.h | \
sort -u > $nobuiltin
set +C
(cat >> $nobuiltin)<<-"EOF"
(cat<<-EOF
-fno-builtin-putenv
-fno-builtin-setenv
-fno-builtin-strftime
-fno-builtin-strlcat
@ -166,6 +165,13 @@ find share/ -type d -a -empty | xargs -r rm -vrf
-fno-builtin-strtoul
-fno-builtin-strtoull
EOF
find src/lib/ -name '*.h' | xargs \
sed -nr '\@^extern[[:blank:]].*[[:blank:]](str|mem|(get|put|set)env|(c|m|re|v)alloc).*\(@{
s@[[:blank:]]+_ARG_@@
s@[a-zA-Z_\*]+[[:blank:]]+@@g
s@([^\(\)]+)\(.*\);$@-fno-builtin-\1@; p}') | \
sort -u > $nobuiltin
set +C
# This package failed when testing with -Wl,-as-needed being default.
# So we disable it here, if you want to retest, just delete this
# comment and the line below.
@ -184,14 +190,14 @@ find share/ -type d -a -empty | xargs -r rm -vrf
-Wl,*)
set -o noclobber
echo 'int main () { return 0; }' > ldtest.c
if ${CC:-gcc} -Werror $flag -o /dev/null -xc ldtest.c > /dev/null 2>&1 ; then
if ${CC:-gcc} -Werror $RPM_OPT_FLAGS $flag -o /dev/null -xc ldtest.c > /dev/null 2>&1 ; then
eval $var=\${$var:+\$$var\ }$flag
fi
set +o noclobber
rm -f ldtest.c
;;
*)
if ${CC:-gcc} -Werror $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then
if ${CC:-gcc} -Werror $RPM_OPT_FLAGS $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then
eval $var=\${$var:+\$$var\ }$flag
fi
esac
@ -314,7 +320,7 @@ find share/ -type d -a -empty | xargs -r rm -vrf
grep -E 'T[[:blank:]](str|mem|(get|put|set)env|(c|m|re|v)alloc)' | \
awk '{print "-fno-builtin-"$3}' | \
sort -u | \
diff -u $nobuiltin -
diff -u $nobuiltin - || true
base=src/cmd/ksh93
test=${PWD}/${base}/tests
pushd ${root}/${base}

26
ksh93-sigchld.dif Normal file
View File

@ -0,0 +1,26 @@
cc: gsf@research.att.com zpetrova@novell.com
Subject: Re: [ast-users] Bug in SIGCHLD handling (Version JM 93t+ 2010-02-14)
--------
I was finally able to reproduce the problem and I have fixed the bug.
Here is a patch. Let me know if this resolves this.
====================cut here==========================
*** src/cmd/ksh93/sh/xec.c Fri Feb 12 11:48:56 2010
--- src/cmd/ksh93/sh/xec.c Wed Apr 7 10:40:53 2010
***************
*** 2946,2951 ****
--- 2946,2953 ----
register int sig=sh.st.trapmax;
while(sig-- > 0)
{
+ if(sig==SIGCHLD)
+ continue;
if((trap=sh.st.trapcom[sig]) && *trap==0)
signal(sig,mode?sh_fault:SIG_IGN);
}
====================cut here==========================
David Korn
dgk@research.att.com

37
ksh93-tty.dif Normal file
View File

@ -0,0 +1,37 @@
> Hi,
>
> one our user has reported an issue with wrong tty state after timed out read,
> when using utf-8 locale. The reproducer is:
>
> cat >test.sh <<EOF
> #!/bin/ksh
> TMOUT=5
> read
> EOF
>
> chmod +x test.sh
> ./test.sh
>
> Actual result (after letting read to time out) is tty does not echo any input
> until terminal is reset. Reporter provided a patch (attached) to fix this.
>
A work around is to out
set -o vi
or
set -g emacs
before the read.
I have enclosed the change that I made to fixe this problem below.
--- src/cmd/ksh93/sh/fault.c 2010-01-18 11:11:18.000000000 +0000
+++ src/cmd/ksh93/sh/fault.c 2010-03-12 16:18:41.000000000 +0000
@@ -614,7 +614,7 @@ void sh_done(void *ptr, register int sig
sh_accend();
#endif /* SHOPT_ACCT */
#if SHOPT_VSH || SHOPT_ESH
- if(sh_isoption(SH_EMACS)||sh_isoption(SH_VI)||sh_isoption(SH_GMACS))
+ if(mbwide()||sh_isoption(SH_EMACS)||sh_isoption(SH_VI)||sh_isoption(SH_GMACS))
tty_cooked(-1);
#endif
#ifdef JOBS

View File

@ -128,6 +128,23 @@
#endif
--- src/cmd/ksh93/sh/lex.c
+++ src/cmd/ksh93/sh/lex.c 2010-04-08 07:13:26.070925225 +0000
@@ -1082,11 +1082,13 @@ int sh_lex(Lex_t* lp)
}
/* backward compatibility */
{
+ register const char * cp;
if(lp->lexd.warn)
errormsg(SH_DICT,ERROR_warn(0),e_lexnested,shp->inlineno);
if(!(state=lp->lexd.first))
state = fcfirst();
- fcseek(state-fcseek(0));
+ cp = fcseek(0);
+ fcseek(state-cp);
if(lp->arg)
{
lp->arg = (struct argnod*)stkfreeze(stkp,1);
--- src/cmd/ksh93/sh/main.c
+++ src/cmd/ksh93/sh/main.c 2007-12-20 18:01:26.000000000 +0000
@@ -130,9 +130,9 @@ int sh_source(Shell_t *shp, Sfio_t *iop,

View File

@ -1,6 +1,7 @@
addFilter(".*binary-or-shlib-defines-rpath.*/lib/ast/.*\.so.*")
addFilter(".*binary-or-shlib-defines-rpath.*/lib/ast/bin/shcomp.*")
addFilter(".*binary-or-shlib-defines-rpath.*/lib/ast/bin/ksh.*")
addFilter(".*suse-filelist-forbidden-devel-in-lib.*/lib/ast/.*\.so.*")
addFilter(".*devel-file-in-non-devel-package.*/lib/ast/.*\.so")
addFilter(".*script-without-shebang.*/usr/share/ksh/fun/.*")
addFilter(".*no-rpm-opt-flags.*ldtest.c.*")