Upgrade to 41

This commit is contained in:
Michal Hlavinka 2012-12-03 14:10:37 +01:00
parent 70f5739f0a
commit 9854216185
4 changed files with 52 additions and 14 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
mksh-R40d.cpio.gz
/mksh_40.9.20120630.orig.tar.gz
/mksh-R41.tgz

View File

@ -1,17 +1,16 @@
%define _bindir /bin
%global snapshot 20120630
Summary: MirBSD enhanced version of the Korn Shell
Name: mksh
Version: 40i
Release: 0%{?dist}.%{snapshot}
Version: 41
Release: 1%{?dist}
# BSD (setmode.c), ISC (strlcpy.c), MirOS (the rest)
License: MirOS and ISC and BSD
Group: System Environment/Shells
URL: http://www.mirbsd.de/%{name}.htm
Source0: ftp://ftp.debian.org/debian/pool/main/m/%{name}/%{name}_40.9.%{snapshot}.orig.tar.gz
#Source0: http://www.mirbsd.org/MirOS/dist/mir/%{name}/%{name}-R%{version}.cpio.gz
Source0: http://www.mirbsd.org/MirOS/dist/mir/%{name}/%{name}-R%{version}.tgz
Source1: dot-mkshrc
Source2: lksh.1
Source3: rtchecks.expected
Requires(post): grep
Requires(postun): sed
BuildRequires: util-linux, ed
@ -25,18 +24,37 @@ modern, robust shell good for interactive and especially script use, being a
bourne shell replacement, pdksh successor and an alternative to the C shell.
%prep
%setup -q -T -c
#%setup -q -T -c
%setup -q -n %{name}
# rpm.org has no support for *.cpio.gz
#gzip -dc %{SOURCE0} | cpio -imd
#mv %{name}/* . && rm -rf %{name}
tar xvzf %{SOURCE0}
mv mksh-40.9.%{snapshot}.orig/* .
# we'll need this later due to -DMKSH_GCC55009
cat >rtchecks <<'EOF'
typeset -i sari=0
typeset -Ui uari=0
typeset -i x=0
print -r -- $((x++)):$sari=$uari.
let --sari --uari
print -r -- $((x++)):$sari=$uari.
sari=2147483647 uari=2147483647
print -r -- $((x++)):$sari=$uari.
let ++sari ++uari
print -r -- $((x++)):$sari=$uari.
let --sari --uari
let 'sari *= 2' 'uari *= 2'
let ++sari ++uari
print -r -- $((x++)):$sari=$uari.
let ++sari ++uari
print -r -- $((x++)):$sari=$uari.
sari=-2147483648 uari=-2147483648
print -r -- $((x++)):$sari=$uari.
let --sari --uari
print -r -- $((x++)):$sari=$uari.
EOF
%build
CFLAGS="$RPM_OPT_FLAGS" sh Build.sh -r -c lto
CFLAGS="$RPM_OPT_FLAGS -DMKSH_DISABLE_EXPERIMENTAL -DMKSH_GCC55009" sh Build.sh -r -c lto
cp test.sh test_mksh.sh
CFLAGS="$RPM_OPT_FLAGS" sh Build.sh -L -r -c lto
CFLAGS="$RPM_OPT_FLAGS -DMKSH_DISABLE_EXPERIMENTAL -DMKSH_GCC55009" sh Build.sh -L -r -c lto
cp test.sh test_lksh.sh
%install
@ -49,6 +67,14 @@ install -D -p -m 644 dot.mkshrc $RPM_BUILD_ROOT%{_sysconfdir}/mkshrc
install -D -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/skel/.mkshrc
%check
./mksh rtchecks >rtchecks.got 2>&1
if ! cmp --quiet rtchecks.got %{SOURCE3}
then
echo "rtchecks failed"
diff -Naurp %{SOURCE3} rtchecks.got
exit 1
fi
for tf in test_mksh.sh test_lksh.sh
do
echo > test.wait
@ -84,6 +110,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/lksh.1*
%changelog
* Mon Dec 03 2012 Michal Hlavinka <mhlavink@redhat.com> - 41-1
- Upgrade to 41
* Fri Jul 20 2012 Michal Hlavinka <mhlavink@redhat.com> - 40i-0.20120630
- Upgrade to pre-release of 40i
- includes new legacy shell lksh for old scripts requiring pdksh or similar old

8
rtchecks.expected Normal file
View File

@ -0,0 +1,8 @@
0:0=0.
1:-1=4294967295.
2:2147483647=2147483647.
3:-2147483648=2147483648.
4:-1=4294967295.
5:0=0.
6:-2147483648=2147483648.
7:2147483647=2147483647.

View File

@ -1 +1 @@
d2da844ef5ae1c6c68d0675a4d0c1229 mksh_40.9.20120630.orig.tar.gz
70eca50d9340412714ef09b7060ebde9 mksh-R41.tgz