.
OBS-URL: https://build.opensuse.org/package/show/shells/ksh?expand=0&rev=94
This commit is contained in:
parent
202eda382f
commit
25b1a98498
@ -8,6 +8,8 @@ wget --user='I accept www.opensource.org/licenses/cpl' --password='.' \
|
||||
http://www2.research.att.com/sw/download/beta/INIT.${version}.tgz \
|
||||
http://www2.research.att.com/sw/download/beta/ast-base.${version}.tgz
|
||||
|
||||
tar xfz ast-base.${version}.tgz src/cmd/msgcc/ src/lib/libpp/
|
||||
tar cfj ast-msgcc.${version}.tar.bz2 src/
|
||||
tar xfz ast-base.${version}.tgz src/cmd/msgcc/ src/lib/libpp/
|
||||
tar cfj ast-msgcc.${version}.tar.bz2 src/cmd/msgcc/ src/lib/libpp/
|
||||
tar xfz ast-base.${version}.tgz src/lib/libuu/ src/cmd/builtin/
|
||||
tar cfj ast-builtin.${version}.tar.bz2 src/lib/libuu/ src/cmd/builtin/
|
||||
rm -f ast-base.${version}.tgz
|
||||
|
3
ast-builtin.2012-02-02.tar.bz2
Normal file
3
ast-builtin.2012-02-02.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:08d8ddd04a0cb983ac32ba15b28045d6a9c15f5171430d66f26ff5b9924a25f8
|
||||
size 141200
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 10 15:45:09 UTC 2012 - werner@suse.de
|
||||
|
||||
- Make pty and other ast-base command available as this helps to
|
||||
test out some major features of the ksh (compare with bnc#743244)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 9 14:14:53 UTC 2012 - werner@suse.de
|
||||
|
||||
|
293
ksh.spec
293
ksh.spec
@ -17,8 +17,21 @@
|
||||
|
||||
# norootforbuild
|
||||
|
||||
|
||||
Name: ksh
|
||||
%global date 2012-02-02
|
||||
%if %suse_version > 1210
|
||||
%global use_suid_exe 1
|
||||
%global use_opt_bins 1
|
||||
%else
|
||||
%global use_suid_exe 0
|
||||
%global use_opt_bins 0
|
||||
%endif
|
||||
%if !0%{?qemu_user_space_build:1}
|
||||
%global do_tests 1
|
||||
%else
|
||||
%global do_tests 0
|
||||
%endif
|
||||
%global use_locale 0
|
||||
BuildRequires: bind-utils bison flex gdbm-devel glibc-devel ncurses-devel procps psmisc pwdutils zlib-devel
|
||||
%if %suse_version > 1020
|
||||
BuildRequires: bind-libs libbz2-devel
|
||||
@ -40,15 +53,19 @@ Requires(postun): /bin/ln /bin/rm /etc/bash.bashrc /bin/true
|
||||
Requires(post): update-alternatives
|
||||
Requires(preun): update-alternatives
|
||||
%endif
|
||||
%if %use_suid_exe
|
||||
PreReq: permissions
|
||||
%endif
|
||||
AutoReqProv: on
|
||||
Version: 93u
|
||||
Release: 1
|
||||
Summary: Korn Shell
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Source: INIT.2012-02-02.tar.bz2
|
||||
Source1: ast-ksh.2012-02-02.tar.bz2
|
||||
Source2: ast-msgcc.2012-02-02.tar.bz2
|
||||
Source3: CPL
|
||||
Source: INIT.%{date}.tar.bz2
|
||||
Source1: ast-ksh.%{date}.tar.bz2
|
||||
Source2: ast-msgcc.%{date}.tar.bz2
|
||||
Source3: ast-builtin.%{date}.tar.bz2
|
||||
Source4: CPL
|
||||
Source10: leak1.sh
|
||||
Source11: leak2.sh
|
||||
Source12: ifs-crash.sh
|
||||
@ -84,9 +101,6 @@ Patch21: ksh93-vm.dif
|
||||
Patch22: ksh93-limit-name-len.dif
|
||||
Patch23: ksh93-foreground-prgrp.dif
|
||||
Patch42: ksh-locale.patch
|
||||
%global use_suid_exe 0
|
||||
%global use_locale 0
|
||||
%global debug_memleak 0
|
||||
|
||||
%description
|
||||
The original Korn Shell. The ksh is an sh-compatible command
|
||||
@ -124,7 +138,7 @@ Authors:
|
||||
|
||||
%prep
|
||||
chmod +x %{S:31}
|
||||
%setup -q -n ksh93 -T -c -a 0 -a 1 -a 2
|
||||
%setup -q -n ksh93 -T -c -a 0 -a 1 -a 2 -a 3
|
||||
if test -d share ; then
|
||||
find share/ \( -name chef -o -name fudd -o -name piglatin -o -name valley \) -a -type d |\
|
||||
xargs -r rm -vrf
|
||||
@ -225,6 +239,7 @@ fi
|
||||
test -n "${!LC_*}" && unset "${!LC_*}"
|
||||
cflags ()
|
||||
{
|
||||
set +x
|
||||
local flag=$1; shift
|
||||
local var=$1; shift
|
||||
test -n "${flag}" -a -n "${var}" || return
|
||||
@ -245,6 +260,24 @@ fi
|
||||
fi
|
||||
esac
|
||||
set +o noclobber
|
||||
set -x
|
||||
}
|
||||
relink ()
|
||||
{
|
||||
set +x
|
||||
local search=$1; shift
|
||||
local target=$1; shift
|
||||
test -n "${search}" -a -n "${target}" || exit 1
|
||||
local object=$(find ${root:-/tmp}/src/cmd/ -name ${search}.o)
|
||||
local cmd=$(
|
||||
grep -e "-o $search" ${log:-/dev/null} | tail -n 1 | \
|
||||
sed -r -e "s@\+ g?cc@${CC:-gcc}@" \
|
||||
-e "s@-o $search@-o ${root:-/tmp}$target@" \
|
||||
-e "s@[[:blank:]]${search}.o[[:blank:]]@ $object @" \
|
||||
-e "s@[[:blank:]](/[^[:blank:]]*)?lib([[:alnum:]]+)\.a@ -l\2@g" \
|
||||
-e "s@'@@g")
|
||||
set -x
|
||||
$cmd ${1+"$@"}
|
||||
}
|
||||
#
|
||||
# If _you_ are knowing how to fix this in the autogenerated
|
||||
@ -410,71 +443,57 @@ fi
|
||||
diff -u $nobuiltin - || true
|
||||
base=src/cmd/ksh93
|
||||
test=${PWD}/${base}/tests
|
||||
OPATH=$PATH
|
||||
OSHELL=$SHELL
|
||||
PATH=$PATH:${root}/bin
|
||||
SHELL=${root}/bin/ksh
|
||||
SHCOMP=${root}/bin/shcomp
|
||||
export PATH SHCOMP SHELL
|
||||
%if %do_tests
|
||||
pushd ${test}
|
||||
typeset -i failed=0
|
||||
ln -sf ${root}/lib ${test}/../
|
||||
${SHELL} shtests
|
||||
LANG=POSIX
|
||||
strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:10} 400
|
||||
strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:10} 4000
|
||||
strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:11} 400
|
||||
strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:11} 4000
|
||||
strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:12}
|
||||
strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:13} 400
|
||||
strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:13} 4000
|
||||
strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:14} 400
|
||||
strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:14} 4000
|
||||
if test $((IGNORED & SIGPIPE)) -eq 0 ; then
|
||||
${SHELL} -c 'g="false"; trap "print -u2 PIPED; \$g && exit 0 ; g=true" PIPE ; while true ; do echo hello ; done' | head -n 10
|
||||
fi
|
||||
LANG=en_US.UTF-8
|
||||
strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:10} 400
|
||||
strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:10} 4000
|
||||
strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:11} 400
|
||||
strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:11} 4000
|
||||
strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:12}
|
||||
strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:13} 400
|
||||
strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:13} 4000
|
||||
strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:14} 400
|
||||
strace $MEMORY -o '!%{S:31}' ${SHELL} %{S:14} 4000
|
||||
if test $((IGNORED & SIGPIPE)) -eq 0 ; then
|
||||
${SHELL} -c 'g="false"; trap "print -u2 PIPED; \$g && exit 0 ; g=true" PIPE ; while true ; do echo hello ; done' | head -n 10
|
||||
fi
|
||||
LANG=POSIX
|
||||
killall -q -s 9 ${SHELL} || true
|
||||
popd
|
||||
%endif
|
||||
pushd ${root}/${base}
|
||||
rm -f libshell.a
|
||||
rm -f ${root}/bin/ksh
|
||||
rm -f ${root}/bin/shcomp
|
||||
ksh=$(grep -e '-o ksh' $log | tail -n 1 |\
|
||||
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 |\
|
||||
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; }
|
||||
shcomp=$(grep -e '-o shcomp' $log | tail -n 1 |\
|
||||
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 |\
|
||||
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; }
|
||||
suidex=$(grep -e '-o suid_exec' $log | tail -n 1 |\
|
||||
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; }
|
||||
${ksht} -Wl,-rpath,${root}/lib
|
||||
${shcompt} -Wl,-rpath,${root}/lib
|
||||
${ksh} -Wl,-rpath-link,${root}/lib -Wl,-rpath,/%{_lib}/ast
|
||||
${shcomp} -Wl,-rpath-link,${root}/lib -Wl,-rpath,/%{_lib}/ast
|
||||
${suidex} -Wl,-rpath-link,${root}/lib -Wl,-rpath,/%{_lib}/ast
|
||||
for bin in ksh shcomp pty what mime asa dlls suid_exec ; do
|
||||
relink $bin /bin/$bin -Wl,-rpath-link,${root}/lib -Wl,-rpath,/%{_lib}/ast
|
||||
done
|
||||
popd
|
||||
OPATH=$PATH
|
||||
OSHELL=$SHELL
|
||||
PATH=$PATH:${root}/bin
|
||||
SHELL=${root}/bin/ksh.test
|
||||
SHCOMP=${root}/bin/shcomp.test
|
||||
export PATH SHCOMP SHELL
|
||||
%if !0%{?qemu_user_space_build:1}
|
||||
pushd ${test}
|
||||
typeset -i failed=0
|
||||
ln -sf ${root}/lib ${test}/../
|
||||
rm -f pty.sh
|
||||
${root}/bin/ksh.test shtests
|
||||
LANG=POSIX
|
||||
strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:10} 400
|
||||
strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:10} 4000
|
||||
strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:11} 400
|
||||
strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:11} 4000
|
||||
strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:12}
|
||||
strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:13} 400
|
||||
strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:13} 4000
|
||||
strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:14} 400
|
||||
strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:14} 4000
|
||||
if test $((IGNORED & SIGPIPE)) -eq 0 ; then
|
||||
${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
|
||||
fi
|
||||
LANG=en_US.UTF-8
|
||||
strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:10} 400
|
||||
strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:10} 4000
|
||||
strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:11} 400
|
||||
strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:11} 4000
|
||||
strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:12}
|
||||
strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:13} 400
|
||||
strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:13} 4000
|
||||
strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:14} 400
|
||||
strace $MEMORY -o '!%{S:31}' ${root}/bin/ksh.test %{S:14} 4000
|
||||
if test $((IGNORED & SIGPIPE)) -eq 0 ; then
|
||||
${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
|
||||
fi
|
||||
LANG=POSIX
|
||||
killall -q -s 9 ${root}/bin/ksh.test || true
|
||||
popd
|
||||
%endif
|
||||
LD_LIBRARY_PATH=${root}/lib
|
||||
export LD_LIBRARY_PATH
|
||||
mkdir -p share/locale/C/LC_MESSAGES
|
||||
includes="-I$(cpp -print-search-dirs | sed -rn 's@^install:[[:blank:]]@@p')include"
|
||||
includes="$includes $(find $root -name FEATURE -printf ' -I%h')"
|
||||
@ -493,18 +512,20 @@ fi
|
||||
msggen share/locale/C/LC_MESSAGES/libshell src/cmd/ksh93/libshell.msg
|
||||
pushd ${root}/bin
|
||||
PATH=$PATH:.
|
||||
set -- $(shcomp.test --version 2>&1)
|
||||
set -- $(shcomp --version 2>&1)
|
||||
eval version=\${$#}
|
||||
shcomp.test --nroff 2>&1 | sed 's/\(\.TH .*\)/\1 "2003-03-02" "" "Korn shell utilities"/' > ../man/man1/shcomp.1
|
||||
rm -v ksh.test shcomp.test
|
||||
for bin in shcomp pty what mime asa dlls ; do
|
||||
$bin --nroff 2>&1 | sed 's/\(\.TH .*\)/\1 "%{date}" "" "Korn shell utilities"/' > ../man/man1/$bin.1
|
||||
done
|
||||
popd
|
||||
test -d /tmp -ef ${TMPDIR} || rm -rf ${TMPDIR}
|
||||
SHELL=$OSHELL
|
||||
PATH=$OPATH
|
||||
|
||||
%install
|
||||
root=$(echo ${PWD}/arch/linux*)
|
||||
test -d $root || exit 1
|
||||
pushd $root || exit 1
|
||||
pushd $root || exit 1
|
||||
mkdir -p %{buildroot}/bin
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
mkdir -p %{buildroot}/%{_lib}/ast/bin
|
||||
@ -518,25 +539,27 @@ fi
|
||||
%endif
|
||||
mkdir -p %{buildroot}%{_datadir}/ksh/fun
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/permissions.d
|
||||
install bin/ksh %{buildroot}/%{_lib}/ast/bin/
|
||||
install bin/shcomp %{buildroot}/%{_lib}/ast/bin/
|
||||
install bin/ksh %{buildroot}/bin/ksh93
|
||||
install bin/shcomp %{buildroot}%{_bindir}/shcomp
|
||||
%if %use_opt_bins
|
||||
for bin in pty what mime asa dlls ; do
|
||||
install bin/$bin %{buildroot}/%{_bindir}/$bin
|
||||
done
|
||||
%endif
|
||||
%if %use_suid_exe
|
||||
install bin/suid_exec %{buildroot}/%{_lib}/ast/bin/
|
||||
%endif
|
||||
ln -sf bin/ksh %{buildroot}/%{_lib}/ast/ksh
|
||||
# create ghost files
|
||||
ln -sf /bin/true %{buildroot}/bin/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/shcomp %{buildroot}%{_bindir}/shcomp
|
||||
ln -sf ast %{buildroot}/%{_lib}/ksh
|
||||
cp -a lib/*.so* %{buildroot}/%{_lib}/ast/
|
||||
cp -a fun/* %{buildroot}%{_datadir}/ksh/fun/
|
||||
ln -sf /bin/true %{buildroot}/bin/ksh
|
||||
ln -sf /bin/true %{buildroot}%{_bindir}/ksh
|
||||
ln -sf /bin/ksh93 %{buildroot}%{_bindir}/rksh
|
||||
ln -sf /bin/ksh93 %{buildroot}/%{_lib}/ast/ksh
|
||||
ln -sf ast %{buildroot}/%{_lib}/ksh
|
||||
cp -a lib/*.so* %{buildroot}/%{_lib}/ast/
|
||||
cp -a fun/* %{buildroot}%{_datadir}/ksh/fun/
|
||||
if cmp -s %{buildroot}%{_datadir}/ksh/fun/pushd %{buildroot}%{_datadir}/ksh/fun/popd ; then
|
||||
ln -sf pushd %{buildroot}%{_datadir}/ksh/fun/popd
|
||||
fi
|
||||
for so in %{buildroot}/%{_lib}/ast/*.so.*.* ; do
|
||||
so=${so##*/}
|
||||
ln -sf /%{_lib}/ast/$so %{buildroot}%{_libdir}/ast/${so%%%%.*}.so
|
||||
@ -552,16 +575,27 @@ fi
|
||||
install -m 0644 lib/*.a %{buildroot}%{_libdir}/ast/
|
||||
%if %suse_version > 1120
|
||||
install -m 0644 man/man1/sh.1 %{buildroot}%{_mandir}/man1/ksh93.1
|
||||
ln -sf ../man1/ksh93.1.gz %{buildroot}/%{_mandir}/man1/ksh.1.gz
|
||||
ln -sf ../man1/ksh93.1.gz %{buildroot}/%{_mandir}/man1/rksh.1.gz
|
||||
%else
|
||||
install -m 0644 man/man1/sh.1 %{buildroot}%{_mandir}/man1/ksh.1
|
||||
ln -sf ../man1/ksh.1.gz %{buildroot}/%{_mandir}/man1/rksh.1.gz
|
||||
%endif
|
||||
install -m 0644 man/man1/shcomp.1 %{buildroot}%{_mandir}/man1/shcomp.1
|
||||
%if %use_opt_bins
|
||||
for bin in pty what mime asa dlls ; do
|
||||
install -m 0644 man/man1/$bin.1 %{buildroot}%{_mandir}/man1/$bin.1
|
||||
done
|
||||
%endif
|
||||
for man in man/man3/*.3 ; do
|
||||
man=${man##*/}
|
||||
ast=${man}ast
|
||||
install -m 0644 man/man3/${man} %{buildroot}%{_mandir}/man3/${ast}
|
||||
done
|
||||
install -m 0644 include/ast/* %{buildroot}%{_includedir}/ast/
|
||||
if cmp -s %{buildroot}%{_includedir}/ast/namval.h %{buildroot}%{_includedir}/ast/ast_namval.h ; then
|
||||
ln -sf ast_namval.h %{buildroot}%{_includedir}/ast/namval.h
|
||||
fi
|
||||
popd
|
||||
%if %use_locale
|
||||
for msg in share/locale/* ; do
|
||||
@ -581,7 +615,7 @@ fi
|
||||
if test -s lib/package/LICENSES/ast ; then
|
||||
cp lib/package/LICENSES/ast LICENSE
|
||||
else
|
||||
cp %{S:3} LICENSE
|
||||
cp %{S:4} LICENSE
|
||||
fi
|
||||
mv src/cmd/ksh93/OBSOLETE src/cmd/ksh93/OBSOLETE.mm
|
||||
echo '.VERBON 22' > grep.mm
|
||||
@ -605,22 +639,50 @@ fi
|
||||
set +C
|
||||
%endif
|
||||
|
||||
%if %use_suid_exe
|
||||
%if %{defined verify_permissions}
|
||||
%verifyscript
|
||||
%verify_permissions -e /%{_lib}/ast/bin/suid_exec
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%post
|
||||
test -e etc/bash.bashrc && ln -sf bash.bashrc etc/ksh.kshrc || true
|
||||
%if %suse_version > 1120
|
||||
%{_sbindir}/update-alternatives \
|
||||
%if %suse_version > 1210
|
||||
--force \
|
||||
%if %use_suid_exe
|
||||
%if %{defined set_permissions}
|
||||
%set_permissions /%{_lib}/ast/bin/suid_exec
|
||||
%endif
|
||||
--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
|
||||
%endif
|
||||
%if %suse_version > 1120
|
||||
if test -x /%{_lib}/ast/bin/ksh ; then
|
||||
%{_sbindir}/update-alternatives \
|
||||
--quiet \
|
||||
%if %suse_version > 1210
|
||||
--force \
|
||||
%endif
|
||||
--remove ksh /%{_lib}/ast/bin/ksh
|
||||
rm -f /%{_lib}/ast/bin/ksh
|
||||
rm -f /%{_lib}/ast/bin/shcomp
|
||||
fi
|
||||
%{_sbindir}/update-alternatives \
|
||||
--quiet \
|
||||
%if %suse_version > 1210
|
||||
--force \
|
||||
%endif
|
||||
--install /bin/ksh ksh /bin/ksh93 20 \
|
||||
--slave %{_bindir}/ksh usr-bin-ksh /bin/ksh93 \
|
||||
--slave %{_mandir}/man1/ksh.1.gz ksh.1.gz %{_mandir}/man1/ksh93.1.gz \
|
||||
--slave %{_mandir}/man1/rksh.1.gz rksh.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 /%{_lib}/ast/bin/ksh
|
||||
rm -f /%{_lib}/ast/bin/shcomp
|
||||
fi
|
||||
if test -x /bin/ksh93 ; then
|
||||
rm -f bin/ksh
|
||||
ln -sf /%{_lib}/ast/bin/ksh bin/ksh
|
||||
ln -sf /bin/ksh93 bin/ksh
|
||||
rm -f %{_exec_prefix}/bin/ksh
|
||||
ln -sf /%{_lib}/ast/bin/ksh %{_exec_prefix}/bin/ksh
|
||||
ln -sf /bin/ksh93 %{_exec_prefix}/bin/ksh
|
||||
fi
|
||||
%endif
|
||||
|
||||
@ -628,52 +690,55 @@ fi
|
||||
|
||||
%preun
|
||||
if test $1 -eq 0 ; then
|
||||
%{_sbindir}/update-alternatives --remove ksh /%{_lib}/ast/bin/ksh
|
||||
%{_sbindir}/update-alternatives --quiet --remove ksh /bin/ksh93
|
||||
fi
|
||||
%endif
|
||||
|
||||
%postun
|
||||
if test ! -x %{_lib}/ast/bin/ksh ; then
|
||||
if test ! -x bin/ksh ; then
|
||||
if test ! -x bin/pdksh ; then
|
||||
rm -f etc/ksh.kshrc
|
||||
fi
|
||||
%if %suse_version <= 1120
|
||||
if test ! -e bin/ksh ; then
|
||||
rm -f bin/ksh %{_exec_prefix}/bin/ksh
|
||||
fi
|
||||
rm -f bin/ksh %{_exec_prefix}/bin/ksh
|
||||
%endif
|
||||
fi
|
||||
|
||||
%files -f ksh.lang
|
||||
%defattr(-,root,root)
|
||||
%if %use_suid_exe
|
||||
%{_sysconfdir}/permissions.d/ksh
|
||||
%{_sysconfdir}/permissions.d/ksh.paranoid
|
||||
%config %attr(0644,root,root) %{_sysconfdir}/permissions.d/ksh
|
||||
%config %attr(0644,root,root) %{_sysconfdir}/permissions.d/ksh.paranoid
|
||||
%endif
|
||||
%doc LICENSE src/cmd/ksh93/COMPATIBILITY src/cmd/ksh93/RELEASE*
|
||||
%doc Builtins PROMO OBSOLETE MEMORANDUM
|
||||
%doc %{_mandir}/man1/shcomp.1.gz
|
||||
/bin/ksh93
|
||||
%ghost %verify(not link) /bin/ksh
|
||||
%ghost %verify(not link) %{_bindir}/ksh
|
||||
%if %suse_version > 1120
|
||||
%ghost %verify(not link) %{_mandir}/man1/ksh.1.gz
|
||||
%ghost %verify(not link) %{_mandir}/man1/rksh.1.gz
|
||||
%doc %{_mandir}/man1/ksh93.1.gz
|
||||
/bin/ksh93
|
||||
%{_bindir}/ksh93
|
||||
%else
|
||||
%doc %{_mandir}/man1/ksh.1.gz
|
||||
%doc %{_mandir}/man1/rksh.1.gz
|
||||
%endif
|
||||
%{_bindir}/rksh
|
||||
%{_bindir}/shcomp
|
||||
%doc %{_mandir}/man1/shcomp.1.gz
|
||||
%if %use_opt_bins
|
||||
%doc %{_mandir}/man1/pty.1.gz
|
||||
%doc %{_mandir}/man1/what.1.gz
|
||||
%doc %{_mandir}/man1/mime.1.gz
|
||||
%doc %{_mandir}/man1/asa.1.gz
|
||||
%doc %{_mandir}/man1/dlls.1.gz
|
||||
%endif
|
||||
%{_bindir}/*
|
||||
%dir /%{_lib}/ast
|
||||
%dir /%{_lib}/ast/bin
|
||||
/%{_lib}/ast/ksh
|
||||
/%{_lib}/ast/bin/ksh
|
||||
/%{_lib}/ast/bin/shcomp
|
||||
%if %use_suid_exe
|
||||
%attr(4755,root,root) /%{_lib}/ast/bin/suid_exec
|
||||
%endif
|
||||
/%{_lib}/ast/*.so*
|
||||
/%{_lib}/ast/ksh
|
||||
/%{_lib}/ksh
|
||||
%dir %{_datadir}/ksh
|
||||
%dir %{_datadir}/ksh/fun
|
||||
|
@ -301,7 +301,7 @@
|
||||
+ ({p+=ast.tmp_int;ast.tmp_wchar;}) : \
|
||||
+ ({ast.tmp_int=*(unsigned char*)p;p+=ast.mb_sync+1;ast.tmp_int;})) : \
|
||||
+ (*(unsigned char*)(p++)))
|
||||
+#define mbnchar(p,n) (mbwide(p) ? \
|
||||
+#define mbnchar(p,n) (mbwide() ? \
|
||||
+ (((ast.tmp_int=(*ast.mb_towc)(&ast.tmp_wchar,(char*)(p),n))>0) ? \
|
||||
+ ({p+=ast.tmp_int;ast.tmp_wchar;}) : \
|
||||
+ ({ast.tmp_int=*(unsigned char*)p;p+=ast.mb_sync+1;ast.tmp_int;})) : \
|
||||
|
@ -85,7 +85,7 @@
|
||||
}
|
||||
|
||||
--- src/cmd/ksh93/Mamfile
|
||||
+++ src/cmd/ksh93/Mamfile 2011-05-20 13:34:20.000000000 +0000
|
||||
+++ src/cmd/ksh93/Mamfile 2012-02-10 15:30:30.774546719 +0100
|
||||
@@ -7,7 +7,7 @@ setv AR ${mam_cc_AR} ${mam_cc_AR_ARFLAGS
|
||||
setv ARFLAGS rc
|
||||
setv AS as
|
||||
@ -122,6 +122,23 @@
|
||||
done shcomp generated
|
||||
make suid_exec
|
||||
make suid_exec.o
|
||||
@@ -1377,14 +1377,14 @@ meta suid_exec.o %.c>%.o sh/suid_exec.c
|
||||
prev sh/suid_exec.c
|
||||
setv CC.DLL -UCC.DLL
|
||||
setv _BLD_shell -U_BLD_shell
|
||||
-exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DERROR_CONTEXT_T=Error_context_t -D_API_ast=20100309 -D_PACKAGE_ast -c sh/suid_exec.c
|
||||
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -fPIE -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DERROR_CONTEXT_T=Error_context_t -D_API_ast=20100309 -D_PACKAGE_ast -c sh/suid_exec.c
|
||||
done suid_exec.o generated
|
||||
prev +ljobs
|
||||
prev +li
|
||||
prev ${mam_libsocket}
|
||||
prev ${mam_libsecdb}
|
||||
setv CC.DLL -UCC.DLL
|
||||
-exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -o suid_exec suid_exec.o ${mam_libast} ${mam_libnsl} ${mam_libast}
|
||||
+exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -pie -o suid_exec suid_exec.o ${mam_libast} ${mam_libnsl} ${mam_libast}
|
||||
done suid_exec generated
|
||||
make shell
|
||||
prev libshell.a archive
|
||||
--- src/lib/libast/Mamfile
|
||||
+++ src/lib/libast/Mamfile 2012-02-06 10:05:34.917933005 +0000
|
||||
@@ -5,7 +5,7 @@ setv AR ${mam_cc_AR} ${mam_cc_AR_ARFLAGS
|
||||
|
Loading…
x
Reference in New Issue
Block a user