Accepting request 34220 from shells
Copy from shells/ksh based on submit request 34220 from user coolo OBS-URL: https://build.opensuse.org/request/show/34220 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ksh?expand=0&rev=37
This commit is contained in:
commit
641f48a508
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:f58767a5bc7ff03824a3e161b0f380d079fe733aed34df7c8c0034cf4f2aa866
|
|
||||||
size 274759
|
|
3
INIT.2010-03-01.tar.bz2
Normal file
3
INIT.2010-03-01.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:46b12449546fa680ef06ebf2c6ffa209b0a550055b51d1e7ce0a547c6f0b65c1
|
||||||
|
size 275936
|
3
ast-ksh-locale.2010-02-02.tar.bz2
Normal file
3
ast-ksh-locale.2010-02-02.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:fdbec966b8bd2247f28ae7b9087cf310f029b141ad6711a5d2d1dab4ee6fea78
|
||||||
|
size 552114
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:030d9c20ab19632b81c9758a9f7edbfe0fe3d3762d6a2ec2f8eb13465ce120c1
|
|
||||||
size 1466114
|
|
3
ast-ksh.2010-03-01.tar.bz2
Normal file
3
ast-ksh.2010-03-01.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:12181126f24082700fa4d737581087db192b067de6df112b5486b2b36475d47b
|
||||||
|
size 1471159
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:7b52de945228e41d9bfae52443ffe46a422b2b875ed0d085ed977d82e7fabe5a
|
|
||||||
size 1638679
|
|
70
ksh.changes
70
ksh.changes
@ -1,3 +1,73 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 5 20:07:06 UTC 2010 - guido+opensuse.org@berhoerster.name
|
||||||
|
|
||||||
|
- Add forgotten preun scriptlet for update-alternatives
|
||||||
|
- Fixed typo
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 5 14:38:39 CET 2010 - werner@suse.de
|
||||||
|
|
||||||
|
- Submit ksh93t+ from 2010-03-01 which fixes bnc#502622, bnc#523212,
|
||||||
|
bnc#548588, bnc#555938, bnc#561405, bnc#564967, and bnc#585244
|
||||||
|
- Add bugfix from David Korn to close memleak again
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Mar 3 14:25:52 CET 2010 - werner@suse.de
|
||||||
|
|
||||||
|
- Update to 2010-03-01 of ksh93t+ for final version
|
||||||
|
|
||||||
|
ksh:
|
||||||
|
10-02-14 Fix sh_getenv() initialization to cooperate with the 3d fs.
|
||||||
|
10-02-12 A bug in which the get discipline function was not invoked for
|
||||||
|
associative array subscripts for unset array elements has been fixed.
|
||||||
|
10-02-12 A bug which could occur if the last line of a script was an eval
|
||||||
|
that executed multiple commands has been fixed.
|
||||||
|
10-02-02 A buffer overflow in read and another in binary type base64
|
||||||
|
encoding were fixed.
|
||||||
|
10-01-20 A bug in the evaluation of arithmetic expression in which the
|
||||||
|
subscript was evaluated twice for $((foo[x++]++)) has been fixed.
|
||||||
|
10-01-19 A workaround for a double-free of a trap in both a subshell and its
|
||||||
|
parent has been added.
|
||||||
|
10-01-18 A bug in type handling of typeset -H has been fixed.
|
||||||
|
10-01-15 The "adding empty subscript" warning now only emitted with -x set.
|
||||||
|
10-01-01 A bug in the parser in which '$((case i in i):;esac);:))' was not
|
||||||
|
parsed correctly was fixed.
|
||||||
|
10-01-01 A bug in the parser in which '$(( 2 , 3.6 ))' dumped core for locales
|
||||||
|
with radix char , and thousands separator . has been fixed.
|
||||||
|
09-12-28 A bug in the handling of SIGCLD on systems that generated SIGCLD
|
||||||
|
while blocked waiting for process to complete has been fixed.
|
||||||
|
09-12-24 ast setlocale() reworked to differentiate env var changes from user
|
||||||
|
override.
|
||||||
|
|
||||||
|
libast:
|
||||||
|
10-02-24 comp/getopt.h: fix ast_std.h interactions
|
||||||
|
10-02-24 vmalloc/malloc.c: empty { VMALLOC_OPTION VMDEBUG ... } => no debug!
|
||||||
|
10-02-02 string/base64.c: fix corner case output buffer overflow
|
||||||
|
10-02-01 misc/optget.c: uppercase --html heading -- doh
|
||||||
|
10-01-29 misc/optget.c: [+NAME?...] overrides error_info.id for >= STYLE_man
|
||||||
|
10-01-25 vmalloc/vmprivate.c: fix seg ptr initialization bug (24 years old!!)
|
||||||
|
10-01-20 misc/optget.c: handle nested {...} rendering
|
||||||
|
10-01-20 misc/state.c: add ast.version for runtime api version
|
||||||
|
10-01-20 port/astconf.c: "_AST_VERSION" now returns ast.version
|
||||||
|
10-01-20 include/ast_std.h: add ast.version for runtime api version
|
||||||
|
10-01-01 vmalloc: VMALLOC_OPTIONS env var for all runtime options
|
||||||
|
10-01-01 include: change some <ast.h> refs to less intrusive <ast_*.h>
|
||||||
|
10-01-01 setlocale.c,translate.c,fmterror.c: AST_LC_internal retains prev state
|
||||||
|
10-01-01 comp/setlocale.c: AST_LC_setenv defers to LC_ALL (for sh)
|
||||||
|
10-01-01 ast_std.h: add { AST_LC_internal AST_LC_setenv }
|
||||||
|
09-12-24 comp/setlocale.c: fix setlocale(LC_ALL,"") when already initialized
|
||||||
|
|
||||||
|
libcmd:
|
||||||
|
10-01-26 tail.c: -f sleep(1) only if no progress from last round of checks
|
||||||
|
10-01-20 fts_fix.[ch]: use <fts_fix.h> instead of <fts.h> (see fts_fix.c)
|
||||||
|
10-01-20 cp.c: free(state) if called from old shell
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 1 23:13:55 UTC 2010 - guido+opensuse.org@berhoerster.name
|
||||||
|
|
||||||
|
- install /bin/ksh93 and /usr/bin/ksh93 symlinks
|
||||||
|
- use update-alternatives
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Dec 21 14:20:21 CET 2009 - werner@suse.de
|
Mon Dec 21 14:20:21 CET 2009 - werner@suse.de
|
||||||
|
|
||||||
|
114
ksh.spec
114
ksh.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package ksh (Version 93t)
|
# spec file for package ksh (Version 93t)
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -23,18 +23,25 @@ BuildRequires: bind-libs bind-utils bison flex gdbm-devel glibc-devel ncurses-d
|
|||||||
%if %suse_version > 1020
|
%if %suse_version > 1020
|
||||||
BuildRequires: libbz2-devel
|
BuildRequires: libbz2-devel
|
||||||
%endif
|
%endif
|
||||||
|
%if %suse_version > 1120
|
||||||
|
BuildRequires: update-alternatives
|
||||||
|
BuildRequires: gcc43
|
||||||
|
%endif
|
||||||
Url: http://www.research.att.com/~gsf/download/
|
Url: http://www.research.att.com/~gsf/download/
|
||||||
License: Common Public License Version 1.0 (CPL1.0)
|
License: Common Public License Version 1.0 (CPL1.0)
|
||||||
Group: System/Shells
|
Group: System/Shells
|
||||||
PreReq: /bin/ln /bin/rm /etc/bash.bashrc /bin/true
|
PreReq: /bin/ln /bin/rm /etc/bash.bashrc /bin/true
|
||||||
|
%if %suse_version > 1120
|
||||||
|
PreReq: update-alternatives
|
||||||
|
%endif
|
||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
Version: 93t
|
Version: 93t
|
||||||
Release: 18
|
Release: 19
|
||||||
Summary: Korn Shell
|
Summary: Korn Shell
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
Source: INIT.2009-12-18.tar.bz2
|
Source: INIT.2010-03-01.tar.bz2
|
||||||
Source1: ast-ksh.2009-12-18.tar.bz2
|
Source1: ast-ksh.2010-03-01.tar.bz2
|
||||||
Source2: ast-open-locale.2008-07-25.tar.bz2
|
Source2: ast-ksh-locale.2010-02-02.tar.bz2
|
||||||
Source10: leak1.sh
|
Source10: leak1.sh
|
||||||
Source11: leak2.sh
|
Source11: leak2.sh
|
||||||
Source20: Agreement
|
Source20: Agreement
|
||||||
@ -56,9 +63,10 @@ Patch11: ksh93-signals.dif
|
|||||||
Patch12: ksh93-limits.dif
|
Patch12: ksh93-limits.dif
|
||||||
Patch14: ksh93-ia64.dif
|
Patch14: ksh93-ia64.dif
|
||||||
Patch15: ksh93-s390.dif
|
Patch15: ksh93-s390.dif
|
||||||
|
Patch41: ksh93-2010-03-01-memleak.dif
|
||||||
Patch42: ksh93-debugleaks.dif
|
Patch42: ksh93-debugleaks.dif
|
||||||
%global use_suid_exe 0
|
%global use_suid_exe 0
|
||||||
%global use_locale 0
|
%global use_locale 1
|
||||||
%global debug_memleak 0
|
%global debug_memleak 0
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -122,6 +130,7 @@ find share/ -type d -a -empty | xargs -r rm -vrf
|
|||||||
%patch14
|
%patch14
|
||||||
%endif
|
%endif
|
||||||
%patch15
|
%patch15
|
||||||
|
%patch41
|
||||||
%if %debug_memleak
|
%if %debug_memleak
|
||||||
%patch42
|
%patch42
|
||||||
%endif
|
%endif
|
||||||
@ -131,6 +140,11 @@ find share/ -type d -a -empty | xargs -r rm -vrf
|
|||||||
# So we disable it here, if you want to retest, just delete this comment and the line below.
|
# So we disable it here, if you want to retest, just delete this comment and the line below.
|
||||||
export SUSE_ASNEEDED=0
|
export SUSE_ASNEEDED=0
|
||||||
test -n "${!LC_*}" && unset "${!LC_*}"
|
test -n "${!LC_*}" && unset "${!LC_*}"
|
||||||
|
%if %suse_version > 1120
|
||||||
|
CC=gcc-4.3
|
||||||
|
%else
|
||||||
|
CC=gcc
|
||||||
|
%endif
|
||||||
cflags ()
|
cflags ()
|
||||||
{
|
{
|
||||||
local flag=$1; shift
|
local flag=$1; shift
|
||||||
@ -142,7 +156,7 @@ find share/ -type d -a -empty | xargs -r rm -vrf
|
|||||||
-Wl,*)
|
-Wl,*)
|
||||||
set -o noclobber
|
set -o noclobber
|
||||||
echo 'int main () { return 0; }' > ldtest.c
|
echo 'int main () { return 0; }' > ldtest.c
|
||||||
if gcc -Werror $flag -o /dev/null -xc ldtest.c > /dev/null 2>&1 ; then
|
if $CC -Werror $flag -o /dev/null -xc ldtest.c > /dev/null 2>&1 ; then
|
||||||
local var=$1; shift
|
local var=$1; shift
|
||||||
eval $var=\${$var:+\$$var\ }$flag
|
eval $var=\${$var:+\$$var\ }$flag
|
||||||
fi
|
fi
|
||||||
@ -150,7 +164,7 @@ find share/ -type d -a -empty | xargs -r rm -vrf
|
|||||||
rm -f ldtest.c
|
rm -f ldtest.c
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if gcc -Werror $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then
|
if $CC -Werror $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then
|
||||||
local var=$1; shift
|
local var=$1; shift
|
||||||
eval $var=\${$var:+\$$var\ }$flag
|
eval $var=\${$var:+\$$var\ }$flag
|
||||||
fi
|
fi
|
||||||
@ -165,18 +179,30 @@ find share/ -type d -a -empty | xargs -r rm -vrf
|
|||||||
#
|
#
|
||||||
IGNORE="-Wno-missing-braces -Wno-unknown-pragmas -Wno-parentheses"
|
IGNORE="-Wno-missing-braces -Wno-unknown-pragmas -Wno-parentheses"
|
||||||
IGNORE="$IGNORE -Wno-char-subscripts -Wno-uninitialized -Wno-implicit"
|
IGNORE="$IGNORE -Wno-char-subscripts -Wno-uninitialized -Wno-implicit"
|
||||||
|
IGNORE="$IGNORE -Wno-unused-value -Wno-unused-variable -Wno-type-limits"
|
||||||
#
|
#
|
||||||
# Do not use -DSHOPT_SPAWN=1 and/or -DSHOPT_AMP=1 this would cause
|
# Do not use -DSHOPT_SPAWN=1 and/or -DSHOPT_AMP=1 this would cause
|
||||||
# errors due race conditions while executing the test suite.
|
# errors due race conditions while executing the test suite.
|
||||||
#
|
#
|
||||||
FEATURE="-DSHOPT_SYSRC=1 -DSHOPT_REMOTE=1 -DSHOPT_CMDLIB_BLTIN=1 -DSHOPT_CMDLIB_DIR=1"
|
feature=$(mktemp -u /tmp/feature.XXXXXX) || exit 1
|
||||||
FEATURE="$FEATURE -DSH_CMDLIB_DIR=\\\"/%{_lib}/ast/bin\\\""
|
feature=${feature}.h
|
||||||
FEATURE="$FEATURE -DDEFSHELL=\\\"/bin/ksh\\\""
|
set -C
|
||||||
FEATURE="$FEATURE -DTHISPROG=\\\"/%{_lib}/ast/bin/suid_exec\\\""
|
(cat > $feature)<<-'EOF'
|
||||||
FEATURE="$FEATURE -D_AST_std_malloc=0 -D_map_malloc=1"
|
#define SHOPT_SYSRC 1
|
||||||
|
#define SHOPT_REMOTE 1
|
||||||
|
#define SHOPT_CMDLIB_BLTIN 1
|
||||||
|
#define SHOPT_CMDLIB_DIR 1
|
||||||
|
#define SH_CMDLIB_DIR "/%{_lib}/ast/bin"
|
||||||
|
#define THISPROG "/%{_lib}/ast/bin/suid_exec"
|
||||||
|
#define _AST_std_malloc 0
|
||||||
|
#define _map_malloc 1
|
||||||
|
EOF
|
||||||
|
set +C
|
||||||
|
FEATURE="-include $feature"
|
||||||
|
cat $feature
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
echo 'int main () { return !(sizeof(void*) >= 8); }' | gcc -x c -o test64 -
|
echo 'int main () { return !(sizeof(void*) >= 8); }' | $CC -x c -o test64 -
|
||||||
if ./test64 ; then
|
if ./test64 ; then
|
||||||
LARGEFILE=""
|
LARGEFILE=""
|
||||||
else
|
else
|
||||||
@ -192,7 +218,6 @@ find share/ -type d -a -empty | xargs -r rm -vrf
|
|||||||
UNIVERSE=att
|
UNIVERSE=att
|
||||||
LDFLAGS="-lm"
|
LDFLAGS="-lm"
|
||||||
LDSOFLG=""
|
LDSOFLG=""
|
||||||
CC=gcc
|
|
||||||
cflags -std=gnu99 RPM_OPT_FLAGS
|
cflags -std=gnu99 RPM_OPT_FLAGS
|
||||||
cflags -fPIC RPM_OPT_FLAGS
|
cflags -fPIC RPM_OPT_FLAGS
|
||||||
cflags @%{S:22} RPM_OPT_FLAGS
|
cflags @%{S:22} RPM_OPT_FLAGS
|
||||||
@ -266,17 +291,17 @@ find share/ -type d -a -empty | xargs -r rm -vrf
|
|||||||
rm -f ${root}/bin/ksh
|
rm -f ${root}/bin/ksh
|
||||||
rm -f ${root}/bin/shcomp
|
rm -f ${root}/bin/shcomp
|
||||||
ksh=$(grep -e '-o ksh' $log | tail -n 1 |\
|
ksh=$(grep -e '-o ksh' $log | tail -n 1 |\
|
||||||
sed "s@+ g\?cc@gcc@;s@-o ksh@-o ${root}/bin/ksh@;s@[a-zA-Z0-9_/\.-]*lib\([a-z]\+\)\.a@-l\1@g;s@'@@g")
|
sed "s@+ g\?cc@$CC@;s@-o ksh@-o ${root}/bin/ksh@;s@[a-zA-Z0-9_/\.-]*lib\([a-z]\+\)\.a@-l\1@g;s@'@@g")
|
||||||
ksht=$(grep -e '-o ksh' $log | tail -n 1 |\
|
ksht=$(grep -e '-o ksh' $log | tail -n 1 |\
|
||||||
sed "s@+ g\?cc@gcc@;s@-o ksh@-o ${root}/bin/ksh.test@;s@[a-zA-Z0-9_/\.-]*lib\([a-z]\+\)\.a@-l\1@g;s@'@@g")
|
sed "s@+ g\?cc@$CC@;s@-o ksh@-o ${root}/bin/ksh.test@;s@[a-zA-Z0-9_/\.-]*lib\([a-z]\+\)\.a@-l\1@g;s@'@@g")
|
||||||
test -n "${ksh}" || { echo build of ksh failed; exit 1; }
|
test -n "${ksh}" || { echo build of ksh failed; exit 1; }
|
||||||
shcomp=$(grep -e '-o shcomp' $log | tail -n 1 |\
|
shcomp=$(grep -e '-o shcomp' $log | tail -n 1 |\
|
||||||
sed "s@+ g\?cc@gcc@;s@-o shcomp@-o ${root}/bin/shcomp@;s@[a-zA-Z0-9_/\.-]*lib\([a-z]\+\)\.a@-l\1@g;s@'@@g")
|
sed "s@+ g\?cc@$CC@;s@-o shcomp@-o ${root}/bin/shcomp@;s@[a-zA-Z0-9_/\.-]*lib\([a-z]\+\)\.a@-l\1@g;s@'@@g")
|
||||||
shcompt=$(grep -e '-o shcomp' $log | tail -n 1 |\
|
shcompt=$(grep -e '-o shcomp' $log | tail -n 1 |\
|
||||||
sed "s@+ g\?cc@gcc@;s@-o shcomp@-o ${root}/bin/shcomp.test@;s@[a-zA-Z0-9_/\.-]*lib\([a-z]\+\)\.a@-l\1@g;s@'@@g")
|
sed "s@+ g\?cc@$CC@;s@-o shcomp@-o ${root}/bin/shcomp.test@;s@[a-zA-Z0-9_/\.-]*lib\([a-z]\+\)\.a@-l\1@g;s@'@@g")
|
||||||
test -n "${shcomp}" || { echo build of shcomp failed; exit 1; }
|
test -n "${shcomp}" || { echo build of shcomp failed; exit 1; }
|
||||||
suidex=$(grep -e '-o suid_exec' $log | tail -n 1 |\
|
suidex=$(grep -e '-o suid_exec' $log | tail -n 1 |\
|
||||||
sed "s@+ g\?cc@gcc@;s@-o shcomp@-o ${root}/bin/suid_exec@;s@[a-zA-Z0-9_/\.-]*lib\([a-z]\+\)\.a@-l\1@g;s@'@@g")
|
sed "s@+ g\?cc@$CC@;s@-o shcomp@-o ${root}/bin/suid_exec@;s@[a-zA-Z0-9_/\.-]*lib\([a-z]\+\)\.a@-l\1@g;s@'@@g")
|
||||||
test -n "${suidex}" || { echo build of suidex failed; exit 1; }
|
test -n "${suidex}" || { echo build of suidex failed; exit 1; }
|
||||||
${ksht} -Wl,-rpath,${root}/lib
|
${ksht} -Wl,-rpath,${root}/lib
|
||||||
${shcompt} -Wl,-rpath,${root}/lib
|
${shcompt} -Wl,-rpath,${root}/lib
|
||||||
@ -290,11 +315,17 @@ find share/ -type d -a -empty | xargs -r rm -vrf
|
|||||||
SHCOMP=${root}/bin/shcomp.test
|
SHCOMP=${root}/bin/shcomp.test
|
||||||
export PATH SHCOMP SHELL
|
export PATH SHCOMP SHELL
|
||||||
pushd ${test}
|
pushd ${test}
|
||||||
|
typeset -i failed=0
|
||||||
ln -sf ${root}/lib ${test}/../
|
ln -sf ${root}/lib ${test}/../
|
||||||
${root}/bin/ksh.test shtests
|
${root}/bin/ksh.test shtests
|
||||||
${root}/bin/ksh.test %{S:10}
|
${root}/bin/ksh.test %{S:10}
|
||||||
${root}/bin/ksh.test %{S:11}
|
${root}/bin/ksh.test %{S:11}
|
||||||
|
%if %suse_version <= 1120
|
||||||
|
# This fails in current factory (aka next 11.3) it
|
||||||
|
# seems not to be the gcc as gcc-4.3 also fails
|
||||||
${root}/bin/ksh.test -c 'g="false"; trap "print -u2 PIPED; \$g && exit 0 ; g=true" PIPE ; while true ; do echo hello ; done' | head -n 10
|
${root}/bin/ksh.test -c 'g="false"; trap "print -u2 PIPED; \$g && exit 0 ; g=true" PIPE ; while true ; do echo hello ; done' | head -n 10
|
||||||
|
%endif
|
||||||
|
killall -q -s 9 ${root}/bin/ksh.test || true
|
||||||
popd
|
popd
|
||||||
pushd ${root}/bin
|
pushd ${root}/bin
|
||||||
PATH=$PATH:.
|
PATH=$PATH:.
|
||||||
@ -330,8 +361,14 @@ find share/ -type d -a -empty | xargs -r rm -vrf
|
|||||||
install bin/suid_exec %{buildroot}/%{_lib}/ast/bin/
|
install bin/suid_exec %{buildroot}/%{_lib}/ast/bin/
|
||||||
%endif
|
%endif
|
||||||
ln -sf bin/ksh %{buildroot}/%{_lib}/ast/ksh
|
ln -sf bin/ksh %{buildroot}/%{_lib}/ast/ksh
|
||||||
|
# create ghost files
|
||||||
ln -sf /bin/true %{buildroot}/bin/ksh
|
ln -sf /bin/true %{buildroot}/bin/ksh
|
||||||
ln -sf /bin/true %{buildroot}%{_bindir}/ksh
|
ln -sf /bin/true %{buildroot}%{_bindir}/ksh
|
||||||
|
%if %suse_version > 1120
|
||||||
|
ln -sf ../man1/ksh93.1.gz %{buildroot}/%{_mandir}/man1/ksh.1.gz
|
||||||
|
ln -sf /%{_lib}/ast/bin/ksh %{buildroot}/bin/ksh93
|
||||||
|
ln -sf /%{_lib}/ast/bin/ksh %{buildroot}%{_bindir}/ksh93
|
||||||
|
%endif
|
||||||
ln -sf /%{_lib}/ast/bin/ksh %{buildroot}%{_bindir}/rksh
|
ln -sf /%{_lib}/ast/bin/ksh %{buildroot}%{_bindir}/rksh
|
||||||
ln -sf /%{_lib}/ast/bin/shcomp %{buildroot}%{_bindir}/shcomp
|
ln -sf /%{_lib}/ast/bin/shcomp %{buildroot}%{_bindir}/shcomp
|
||||||
ln -sf ast %{buildroot}/%{_lib}/ksh
|
ln -sf ast %{buildroot}/%{_lib}/ksh
|
||||||
@ -343,7 +380,11 @@ find share/ -type d -a -empty | xargs -r rm -vrf
|
|||||||
done
|
done
|
||||||
rm -f %{buildroot}%{_libdir}/ast/*.so.*
|
rm -f %{buildroot}%{_libdir}/ast/*.so.*
|
||||||
install -m 0644 lib/*.a %{buildroot}%{_libdir}/ast/
|
install -m 0644 lib/*.a %{buildroot}%{_libdir}/ast/
|
||||||
|
%if %suse_version > 1120
|
||||||
|
install -m 0644 man/man1/sh.1 %{buildroot}%{_mandir}/man1/ksh93.1
|
||||||
|
%else
|
||||||
install -m 0644 man/man1/sh.1 %{buildroot}%{_mandir}/man1/ksh.1
|
install -m 0644 man/man1/sh.1 %{buildroot}%{_mandir}/man1/ksh.1
|
||||||
|
%endif
|
||||||
install -m 0644 man/man1/shcomp.1 %{buildroot}%{_mandir}/man1/shcomp.1
|
install -m 0644 man/man1/shcomp.1 %{buildroot}%{_mandir}/man1/shcomp.1
|
||||||
for man in man/man3/*.3 ; do
|
for man in man/man3/*.3 ; do
|
||||||
man=${man##*/}
|
man=${man##*/}
|
||||||
@ -387,21 +428,38 @@ find share/ -type d -a -empty | xargs -r rm -vrf
|
|||||||
|
|
||||||
%post
|
%post
|
||||||
test -e etc/bash.bashrc && ln -sf bash.bashrc etc/ksh.kshrc || true
|
test -e etc/bash.bashrc && ln -sf bash.bashrc etc/ksh.kshrc || true
|
||||||
|
%if %suse_version > 1120
|
||||||
|
%{_sbindir}/update-alternatives \
|
||||||
|
--install /bin/ksh ksh /%{_lib}/ast/bin/ksh 20 \
|
||||||
|
--slave %{_bindir}/ksh usr-bin-ksh /%{_lib}/ast/bin/ksh \
|
||||||
|
--slave %{_mandir}/man1/ksh.1.gz ksh.1.gz %{_mandir}/man1/ksh93.1.gz
|
||||||
|
%else
|
||||||
if test -x %{_lib}/ast/bin/ksh ; then
|
if test -x %{_lib}/ast/bin/ksh ; then
|
||||||
rm -f bin/ksh
|
rm -f bin/ksh
|
||||||
ln -sf /%{_lib}/ast/bin/ksh bin/ksh
|
ln -sf /%{_lib}/ast/bin/ksh bin/ksh
|
||||||
rm -f usr/bin/ksh
|
rm -f %{_exec_prefix}/bin/ksh
|
||||||
ln -sf /%{_lib}/ast/bin/ksh usr/bin/ksh
|
ln -sf /%{_lib}/ast/bin/ksh %{_exec_prefix}/bin/ksh
|
||||||
fi
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %suse_version > 1120
|
||||||
|
|
||||||
|
%preun
|
||||||
|
if [ $1 -eq 0 ]; then
|
||||||
|
/usr/sbin/update-alternatives --remove ksh /%{_lib}/ast/bin/ksh
|
||||||
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
if test ! -x %{_lib}/ast/bin/ksh ; then
|
if test ! -x %{_lib}/ast/bin/ksh ; then
|
||||||
if test ! -x bin/pdksh ; then
|
if test ! -x bin/pdksh ; then
|
||||||
rm -f etc/ksh.kshrc
|
rm -f etc/ksh.kshrc
|
||||||
fi
|
fi
|
||||||
|
%if %suse_version <= 1120
|
||||||
if test ! -e bin/ksh ; then
|
if test ! -e bin/ksh ; then
|
||||||
rm -f bin/ksh usr/bin/ksh
|
rm -f bin/ksh %{_exec_prefix}/bin/ksh
|
||||||
fi
|
fi
|
||||||
|
%endif
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%files -f ksh.lang
|
%files -f ksh.lang
|
||||||
@ -412,9 +470,17 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%doc LICENSE src/cmd/ksh93/COMPATIBILITY src/cmd/ksh93/RELEASE*
|
%doc LICENSE src/cmd/ksh93/COMPATIBILITY src/cmd/ksh93/RELEASE*
|
||||||
%doc Builtins PROMO OBSOLETE MEMORANDUM
|
%doc Builtins PROMO OBSOLETE MEMORANDUM
|
||||||
%doc %{_mandir}/man1/*.1.gz
|
%doc %{_mandir}/man1/shcomp.1.gz
|
||||||
%ghost %verify(not link) /bin/ksh
|
%ghost %verify(not link) /bin/ksh
|
||||||
%ghost %verify(not link) %{_bindir}/ksh
|
%ghost %verify(not link) %{_bindir}/ksh
|
||||||
|
%if %suse_version > 1120
|
||||||
|
%ghost %verify(not link) %{_mandir}/man1/ksh.1.gz
|
||||||
|
%doc %{_mandir}/man1/ksh93.1.gz
|
||||||
|
/bin/ksh93
|
||||||
|
%{_bindir}/ksh93
|
||||||
|
%else
|
||||||
|
%doc %{_mandir}/man1/ksh.1.gz
|
||||||
|
%endif
|
||||||
%{_bindir}/rksh
|
%{_bindir}/rksh
|
||||||
%{_bindir}/shcomp
|
%{_bindir}/shcomp
|
||||||
%dir /%{_lib}/ast
|
%dir /%{_lib}/ast
|
||||||
|
30
ksh93-2010-03-01-memleak.dif
Normal file
30
ksh93-2010-03-01-memleak.dif
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
cc: gsf@research.att.com
|
||||||
|
Subject: memory leaks
|
||||||
|
--------
|
||||||
|
|
||||||
|
Looks like all the leaks were caused by a stupid mistake I make
|
||||||
|
over a month ago. Here is the fix. We will have to update
|
||||||
|
the release for this one.
|
||||||
|
|
||||||
|
David Korn
|
||||||
|
dgk@research.att.com
|
||||||
|
|
||||||
|
*** src/cmd/ksh93/sh/name.c 2010-02-25 07:04:06.000000000 +0000
|
||||||
|
--- src/cmd/ksh93/sh/name.c 2010-03-04 11:30:08.000000000 +0000
|
||||||
|
***************
|
||||||
|
*** 1616,1622 ****
|
||||||
|
}
|
||||||
|
if(nv_isattr(np,NV_BINARY) && !(flags&NV_RAW))
|
||||||
|
tofree = 0;
|
||||||
|
! if(nv_isattr(np,NV_LJUST|NV_RJUST)!=(NV_LJUST|NV_RJUST))
|
||||||
|
tofree = 0;
|
||||||
|
if (sp)
|
||||||
|
{
|
||||||
|
--- 1616,1622 ----
|
||||||
|
}
|
||||||
|
if(nv_isattr(np,NV_BINARY) && !(flags&NV_RAW))
|
||||||
|
tofree = 0;
|
||||||
|
! if(nv_isattr(np,NV_LJUST|NV_RJUST) && nv_isattr(np,NV_LJUST|NV_RJUST)!=(NV_LJUST|NV_RJUST))
|
||||||
|
tofree = 0;
|
||||||
|
if (sp)
|
||||||
|
{
|
@ -302,8 +302,8 @@
|
|||||||
prev cat.c
|
prev cat.c
|
||||||
meta cat.o %.c>%.o cat.c cat
|
meta cat.o %.c>%.o cat.c cat
|
||||||
prev cat.c
|
prev cat.c
|
||||||
-exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2009 AT&T Intellectual Property][-license?http://www.opensource.org/licenses/cpl1.0.txt][--catalog?libcmd]"\" -D_BLD_cmd -D_PACKAGE_ast -c cat.c
|
-exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2010 AT&T Intellectual Property][-license?http://www.opensource.org/licenses/cpl1.0.txt][--catalog?libcmd]"\" -D_BLD_cmd -D_PACKAGE_ast -c cat.c
|
||||||
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2009 AT&T Intellectual Property][-license?http://www.opensource.org/licenses/cpl1.0.txt][--catalog?libcmd]"\" -D_BLD_cmd -D_PACKAGE_ast -DSHOPT_MULTIBYTE -c cat.c
|
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2010 AT&T Intellectual Property][-license?http://www.opensource.org/licenses/cpl1.0.txt][--catalog?libcmd]"\" -D_BLD_cmd -D_PACKAGE_ast -DSHOPT_MULTIBYTE -c cat.c
|
||||||
done cat.o generated
|
done cat.o generated
|
||||||
make chgrp.o
|
make chgrp.o
|
||||||
prev chgrp.c
|
prev chgrp.c
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
#include "fault.h"
|
#include "fault.h"
|
||||||
|
|
||||||
--- src/cmd/ksh93/sh/jobs.c
|
--- src/cmd/ksh93/sh/jobs.c
|
||||||
+++ src/cmd/ksh93/sh/jobs.c 2008-09-11 17:13:20.896069796 +0200
|
+++ src/cmd/ksh93/sh/jobs.c 2010-03-03 14:17:34.812626467 +0100
|
||||||
@@ -260,7 +260,7 @@ int job_reap(register int sig)
|
@@ -279,7 +279,7 @@ int job_reap(register int sig)
|
||||||
}
|
}
|
||||||
pid = waitpid((pid_t)-1,&wstat,flags);
|
pid = waitpid((pid_t)-1,&wstat,flags);
|
||||||
sh_offstate(SH_TTYWAIT);
|
sh_offstate(SH_TTYWAIT);
|
||||||
@ -20,13 +20,13 @@
|
|||||||
/*
|
/*
|
||||||
* some systems (linux 2.6) may return EINVAL
|
* some systems (linux 2.6) may return EINVAL
|
||||||
* when there are no continued children
|
* when there are no continued children
|
||||||
@@ -268,6 +268,7 @@ int job_reap(register int sig)
|
@@ -287,6 +287,7 @@ int job_reap(register int sig)
|
||||||
|
|
||||||
if (pid<0 && errno==EINVAL && (flags&WCONTINUED))
|
if (pid<0 && errno==EINVAL && (flags&WCONTINUED))
|
||||||
pid = waitpid((pid_t)-1,&wstat,flags&=~WCONTINUED);
|
pid = waitpid((pid_t)-1,&wstat,flags&=~WCONTINUED);
|
||||||
+#endif
|
+#endif
|
||||||
sh_sigcheck();
|
sh_sigcheck();
|
||||||
if(sig && pid<0 && errno==EINTR)
|
if(pid<0 && errno==EINTR && (sig||job.savesig))
|
||||||
continue;
|
continue;
|
||||||
--- src/cmd/ksh93/sh/xec.c
|
--- src/cmd/ksh93/sh/xec.c
|
||||||
+++ src/cmd/ksh93/sh/xec.c 2007-12-21 13:28:04.000000000 +0100
|
+++ src/cmd/ksh93/sh/xec.c 2007-12-21 13:28:04.000000000 +0100
|
||||||
|
14
ksh93.dif
14
ksh93.dif
@ -215,6 +215,20 @@
|
|||||||
|
|
||||||
PATH=$path
|
PATH=$path
|
||||||
|
|
||||||
|
--- src/cmd/ksh93/tests/signal.sh
|
||||||
|
+++ src/cmd/ksh93/tests/signal.sh 2010-03-05 13:01:05.944126021 +0000
|
||||||
|
@@ -286,9 +286,9 @@ yes=$(whence -p yes)
|
||||||
|
do { $SHELL <<- EOF
|
||||||
|
foo() { return 0; }
|
||||||
|
trap foo EXIT
|
||||||
|
- { sleep 2; kill -$exp \$\$; sleep 3; kill -0 \$\$ && kill -KILL \$\$; } &
|
||||||
|
+ { sleep 2; kill -$exp \$\$; sleep 4; kill -0 \$\$ && kill -KILL \$\$; } &
|
||||||
|
$yes | while read yes; do
|
||||||
|
- (/bin/date; sleep .1)
|
||||||
|
+ (/bin/date; sleep .05)
|
||||||
|
done > /dev/null
|
||||||
|
EOF
|
||||||
|
} 2>> /dev/null
|
||||||
--- src/lib/libast/disc/memfatal.c
|
--- src/lib/libast/disc/memfatal.c
|
||||||
+++ src/lib/libast/disc/memfatal.c 2009-07-09 13:30:39.000000000 +0000
|
+++ src/lib/libast/disc/memfatal.c 2009-07-09 13:30:39.000000000 +0000
|
||||||
@@ -72,7 +72,7 @@ memfatal(void)
|
@@ -72,7 +72,7 @@ memfatal(void)
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
-fno-builtin-strmode
|
-fno-builtin-strmode
|
||||||
-fno-builtin-strnacmp
|
-fno-builtin-strnacmp
|
||||||
-fno-builtin-strncopy
|
-fno-builtin-strncopy
|
||||||
|
-fno-builtin-strnpcmp
|
||||||
-fno-builtin-strntod
|
-fno-builtin-strntod
|
||||||
-fno-builtin-strntol
|
-fno-builtin-strntol
|
||||||
-fno-builtin-strntold
|
-fno-builtin-strntold
|
||||||
@ -36,7 +37,9 @@
|
|||||||
-fno-builtin-strntonll
|
-fno-builtin-strntonll
|
||||||
-fno-builtin-strntoul
|
-fno-builtin-strntoul
|
||||||
-fno-builtin-strntoull
|
-fno-builtin-strntoull
|
||||||
|
-fno-builtin-strnvcmp
|
||||||
-fno-builtin-stropt
|
-fno-builtin-stropt
|
||||||
|
-fno-builtin-strpcmp
|
||||||
-fno-builtin-strperm
|
-fno-builtin-strperm
|
||||||
-fno-builtin-strpsearch
|
-fno-builtin-strpsearch
|
||||||
-fno-builtin-strptime
|
-fno-builtin-strptime
|
||||||
@ -58,4 +61,5 @@
|
|||||||
-fno-builtin-struid
|
-fno-builtin-struid
|
||||||
-fno-builtin-struniq
|
-fno-builtin-struniq
|
||||||
-fno-builtin-strval
|
-fno-builtin-strval
|
||||||
|
-fno-builtin-strvcmp
|
||||||
-fno-builtin-valloc
|
-fno-builtin-valloc
|
||||||
|
@ -3,3 +3,4 @@ addFilter(".*binary-or-shlib-defines-rpath.*/lib/ast/bin/shcomp.*")
|
|||||||
addFilter(".*binary-or-shlib-defines-rpath.*/lib/ast/bin/ksh.*")
|
addFilter(".*binary-or-shlib-defines-rpath.*/lib/ast/bin/ksh.*")
|
||||||
addFilter(".*devel-file-in-non-devel-package.*/lib/ast/.*\.so")
|
addFilter(".*devel-file-in-non-devel-package.*/lib/ast/.*\.so")
|
||||||
addFilter(".*script-without-shebang.*//usr/share/ksh/fun/.*")
|
addFilter(".*script-without-shebang.*//usr/share/ksh/fun/.*")
|
||||||
|
addFilter(".*no-rpm-opt-flags.*ldtest.c.*")
|
||||||
|
Loading…
Reference in New Issue
Block a user