From ac13542f8480f31df378bfe40ab6483fcd4e31d7 Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Mon, 17 Jan 2011 15:30:05 +0100 Subject: [PATCH] - ksh updated to 2011-01-04 --- .gitignore | 2 ++ ksh-20110104-wctype.patch | 43 +++++++++++++++++++++++++++++++++++++++ ksh.spec | 15 ++++++++++---- sources | 4 ++-- 4 files changed, 58 insertions(+), 6 deletions(-) create mode 100644 ksh-20110104-wctype.patch diff --git a/.gitignore b/.gitignore index 855ef10..cdad419 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,5 @@ INIT.2010-07-01.tgz /INIT.2010-12-01.tgz /ast-ksh.2010-12-12.tgz /INIT.2010-12-12.tgz +/ast-ksh.2011-01-04.tgz +/INIT.2011-01-04.tgz diff --git a/ksh-20110104-wctype.patch b/ksh-20110104-wctype.patch new file mode 100644 index 0000000..0d769b3 --- /dev/null +++ b/ksh-20110104-wctype.patch @@ -0,0 +1,43 @@ +diff -up ksh-20110104/src/cmd/ksh93/sh/init.c.wcpatch ksh-20110104/src/cmd/ksh93/sh/init.c +--- ksh-20110104/src/cmd/ksh93/sh/init.c.wcpatch 2010-12-30 16:08:25.000000000 +0100 ++++ ksh-20110104/src/cmd/ksh93/sh/init.c 2011-01-17 14:45:06.199705445 +0100 +@@ -47,39 +47,8 @@ + #include "lexstates.h" + #include "version.h" + +-#if _hdr_wctype + #include + #include +-#endif +-#if !_typ_wctrans_t +-#undef wctrans_t +-#define wctrans_t sh_wctrans_t +-typedef int wctrans_t; +-#endif +-#if !_lib_wctrans +-#undef wctrans +-#define wctrans sh_wctrans +-static wctrans_t wctrans(const char *name) +-{ +- if(strcmp(name,e_tolower)==0) +- return(1); +- else if(strcmp(name,e_toupper)==0) +- return(2); +- return(0); +-} +-#endif +-#if !_lib_towctrans +-#undef towctrans +-#define towctrans sh_towctrans +-static int towctrans(int c, wctrans_t t) +-{ +- if(t==1 && isupper(c)) +- c = tolower(c); +- else if(t==2 && isupper(c)) +- c = toupper(c); +- return(c); +-} +-#endif + + char e_version[] = "\n@(#)$Id: Version " + #if SHOPT_AUDIT diff --git a/ksh.spec b/ksh.spec index 5c8e4b7..d2de79d 100644 --- a/ksh.spec +++ b/ksh.spec @@ -1,12 +1,12 @@ -%global releasedate 2010-11-22 +%global releasedate 2011-01-04 Name: ksh Summary: The Original ATT Korn Shell URL: http://www.kornshell.com/ Group: System Environment/Shells License: CPL -Version: 20101212 -Release: 2.20101122%{?dist} +Version: 20110104 +Release: 1%{?dist} Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{releasedate}.tgz Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{releasedate}.tgz Source3: kshrc.rhs @@ -20,6 +20,9 @@ Patch1: ksh-20070328-builtins.patch #fix regression test suite to be usable during packagebuild - Fedora/RHEL specific Patch2: ksh-20100826-fixregr.patch +#ksh's wctype.h detection script is broken, workaround it +Patch3: ksh-20110104-wctype.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Conflicts: pdksh Requires: coreutils, glibc-common, diffutils @@ -40,6 +43,7 @@ with "sh" (the Bourne Shell). %setup -q -T -D -a 1 %patch1 -p1 -b .builtins %patch2 -p1 -b .fixregr +%patch3 -p1 -b .wcpatch #/dev/fd test does not work because of mock sed -i 's|ls /dev/fd|ls /proc/self/fd|' src/cmd/ksh93/features/options @@ -48,7 +52,7 @@ sed -i 's|ls /dev/fd|ls /proc/self/fd|' src/cmd/ksh93/features/options ./bin/package ./bin/package make mamake ||: ./bin/package make mamake ||: -export CCFLAGS="$RPM_OPT_FLAGS" +export CCFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" export CC=gcc ./bin/package "make" @@ -118,6 +122,9 @@ fi rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jan 17 2011 Michal Hlavinka - 20110104-1 +- ksh updated to 2011-01-04 + * Thu Dec 23 2010 Michal Hlavinka - 20101212-2.20101122 - found ugly regression, reverting to 2010-11-22 (with io race patch) for now diff --git a/sources b/sources index 3b5721d..c94b19b 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -ac63a00fbe6e4c6109f74b9013bede3e ast-ksh.2010-11-22.tgz -12f259fe7ce1977ee0b8a4622b6cfac7 INIT.2010-11-22.tgz +646871f0835e4f33bdbcc53c5504b295 ast-ksh.2011-01-04.tgz +9a1091ba8e44366b518b2a90de784371 INIT.2011-01-04.tgz