diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | dotkshrc | 12 | ||||
-rw-r--r-- | ksh-1.0.6-alarm-1.patch | 541 | ||||
-rw-r--r-- | ksh-1.0.6-alarm-2.patch | 162 | ||||
-rw-r--r-- | ksh-1.0.7-history-trim.patch | 99 | ||||
-rw-r--r-- | ksh-1.0.7-segfault-strdup.patch | 58 | ||||
-rw-r--r-- | ksh.spec | 746 | ||||
-rw-r--r-- | kshcomp.conf | 1 | ||||
-rw-r--r-- | kshrc.rhs | 53 | ||||
-rw-r--r-- | sources | 1 |
10 files changed, 1674 insertions, 0 deletions
@@ -0,0 +1 @@ +/ksh-1.0.6.tar.gz diff --git a/dotkshrc b/dotkshrc new file mode 100644 index 0000000..349e599 --- /dev/null +++ b/dotkshrc @@ -0,0 +1,12 @@ +# .kshrc + +# Source global definitions +if [ -f /etc/kshrc ]; then + . /etc/kshrc +fi + +# use emacs editing mode by default +set -o emacs + +# User specific aliases and functions + diff --git a/ksh-1.0.6-alarm-1.patch b/ksh-1.0.6-alarm-1.patch new file mode 100644 index 0000000..7e18055 --- /dev/null +++ b/ksh-1.0.6-alarm-1.patch @@ -0,0 +1,541 @@ +diff --git a/src/cmd/ksh93/Mamfile b/src/cmd/ksh93/Mamfile +index f6e6ac8..9d72d87 100644 +--- a/src/cmd/ksh93/Mamfile ++++ b/src/cmd/ksh93/Mamfile +@@ -220,30 +220,18 @@ make install + done pmain.o generated + make libshell.a archive + prev shell.req +- make cd_pwd.o +- make bltins/cd_pwd.c +- make include/test.h implicit +- prev include/shtable.h implicit +- make include/defs.h implicit +- prev include/regress.h implicit dontcare +- prev include/shtable.h +- prev include/shell.h +- prev ${PACKAGE_ast_INCLUDE}/endian.h +- prev include/name.h +- prev include/argnod.h implicit +- prev ${PACKAGE_ast_INCLUDE}/cdt.h +- prev ${PACKAGE_ast_INCLUDE}/error.h +- prev ${PACKAGE_ast_INCLUDE}/sfio.h ++ make alarm.o ++ make bltins/alarm.c ++ make FEATURE/time implicit ++ prev features/time ++ exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/time ++ make ${PACKAGE_ast_INCLUDE}/times.h implicit ++ prev ${PACKAGE_ast_INCLUDE}/ast_time.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h +- done include/defs.h +- done include/test.h +- make ${PACKAGE_ast_INCLUDE}/ls.h implicit +- prev ${PACKAGE_ast_INCLUDE}/ast_mode.h implicit dontcare +- prev ${PACKAGE_ast_INCLUDE}/ast_fs.h +- prev ${PACKAGE_ast_INCLUDE}/ast_std.h +- done ${PACKAGE_ast_INCLUDE}/ls.h ++ done ${PACKAGE_ast_INCLUDE}/times.h ++ done FEATURE/time generated + make include/builtins.h implicit +- prev include/shtable.h ++ prev include/shtable.h implicit + make FEATURE/dynamic implicit + prev features/dynamic + exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/dynamic +@@ -251,6 +239,36 @@ make install + done FEATURE/dynamic generated + prev ${PACKAGE_ast_INCLUDE}/option.h + done include/builtins.h ++ prev ${PACKAGE_ast_INCLUDE}/error.h ++ make include/defs.h implicit ++ prev include/regress.h implicit ++ prev include/shtable.h ++ prev include/shell.h ++ prev ${PACKAGE_ast_INCLUDE}/endian.h ++ prev include/name.h ++ prev include/argnod.h implicit ++ prev ${PACKAGE_ast_INCLUDE}/cdt.h ++ prev FEATURE/externs ++ prev ${PACKAGE_ast_INCLUDE}/error.h ++ prev ${PACKAGE_ast_INCLUDE}/sfio.h ++ prev ${PACKAGE_ast_INCLUDE}/ast.h ++ done include/defs.h ++ prev shopt.h ++ done bltins/alarm.c ++ exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c bltins/alarm.c ++ done alarm.o generated ++ make cd_pwd.o ++ make bltins/cd_pwd.c ++ make include/test.h implicit ++ prev include/shtable.h ++ prev include/defs.h ++ done include/test.h ++ make ${PACKAGE_ast_INCLUDE}/ls.h implicit ++ prev ${PACKAGE_ast_INCLUDE}/ast_mode.h implicit ++ prev ${PACKAGE_ast_INCLUDE}/ast_fs.h ++ prev ${PACKAGE_ast_INCLUDE}/ast_std.h ++ done ${PACKAGE_ast_INCLUDE}/ls.h ++ prev include/builtins.h + prev include/name.h + make include/path.h implicit + make FEATURE/acct implicit +@@ -341,14 +359,7 @@ make install + make misc.o + make bltins/misc.c + prev ${PACKAGE_ast_INCLUDE}/times.h +- make FEATURE/time implicit +- prev features/time +- exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/time +- make ${PACKAGE_ast_INCLUDE}/times.h implicit +- prev ${PACKAGE_ast_INCLUDE}/ast_time.h implicit dontcare +- prev ${PACKAGE_ast_INCLUDE}/ast.h +- done ${PACKAGE_ast_INCLUDE}/times.h dontcare +- done FEATURE/time generated ++ prev FEATURE/time + prev FEATURE/locale + make include/jobs.h implicit + prev ${PACKAGE_ast_INCLUDE}/vmalloc.h +@@ -1175,7 +1186,7 @@ make install + done edit/hexpand.c + exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c edit/hexpand.c + done hexpand.o generated +- exec - ${AR} rc libshell.a cd_pwd.o cflow.o enum.o getopts.o hist.o misc.o mkservice.o print.o read.o sleep.o trap.o test.o typeset.o ulimit.o umask.o whence.o main.o nvdisc.o nvtype.o arith.o args.o array.o completion.o defs.o edit.o expand.o regress.o fault.o fcin.o ++ exec - ${AR} rc libshell.a alarm.o cd_pwd.o cflow.o enum.o getopts.o hist.o misc.o mkservice.o print.o read.o sleep.o trap.o test.o typeset.o ulimit.o umask.o whence.o main.o nvdisc.o nvtype.o arith.o args.o array.o completion.o defs.o edit.o expand.o regress.o fault.o fcin.o + exec - ${AR} rc libshell.a history.o init.o io.o jobs.o lex.o macro.o name.o nvtree.o parse.o path.o string.o streval.o subshell.o tdump.o timers.o trestore.o waitevent.o xec.o limits.o msg.o strdata.o testops.o keywords.o options.o signals.o aliases.o builtins.o variables.o lexstates.o emacs.o vi.o hexpand.o + exec - (ranlib libshell.a) >/dev/null 2>&1 || true + done libshell.a generated +diff --git a/src/cmd/ksh93/bltins/alarm.c b/src/cmd/ksh93/bltins/alarm.c +new file mode 100644 +index 0000000..f31bed7 +--- /dev/null ++++ b/src/cmd/ksh93/bltins/alarm.c +@@ -0,0 +1,277 @@ ++/*********************************************************************** ++* * ++* This software is part of the ast package * ++* Copyright (c) 1982-2012 AT&T Intellectual Property * ++* Copyright (c) 2020-2023 Contributors to ksh 93u+m * ++* and is licensed under the * ++* Eclipse Public License, Version 2.0 * ++* * ++* A copy of the License is available at * ++* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html * ++* (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) * ++* * ++* David Korn <dgk@research.att.com> * ++* Martijn Dekker <martijn@inlv.org> * ++* Johnothan King <johnothanking@protonmail.com> * ++* * ++***********************************************************************/ ++/* ++ * alarm [-r] [varname [+]when] ++ * ++ * David Korn ++ * AT&T Labs ++ * ++ */ ++ ++/* ++ * TODO: 2014 email from David Korn cited at <https://bugzilla.redhat.com/1176670>: ++ * ++ * > I never documented the alarm builtin because it is problematic. The ++ * > problem is that traps can't safely be handled asynchronously. What should ++ * > happen is that the trap is marked for execution (sh.trapnote) and run after ++ * > the current command completes. The time trap should wake up the shell if ++ * > it is blocked and it should return and then handle the trap. ++ */ ++ ++#include "shopt.h" ++#include "defs.h" ++#include <error.h> ++#include "builtins.h" ++#include "FEATURE/time" ++ ++#define R_FLAG 1 ++#define L_FLAG 2 ++ ++struct tevent ++{ ++ Namfun_t fun; ++ Namval_t *node; ++ Namval_t *action; ++ struct tevent *next; ++ long milli; ++ int flags; ++ void *timeout; ++}; ++ ++static const char ALARM[] = "alarm"; ++ ++static void trap_timeout(void*); ++ ++/* ++ * insert timeout item on current given list in sorted order ++ */ ++static void *time_add(struct tevent *item, void *list) ++{ ++ struct tevent *tp = (struct tevent*)list; ++ if(!tp || item->milli < tp->milli) ++ { ++ item->next = tp; ++ list = item; ++ } ++ else ++ { ++ while(tp->next && item->milli > tp->next->milli) ++ tp = tp->next; ++ item->next = tp->next; ++ tp->next = item; ++ } ++ tp = item; ++ tp->timeout = sh_timeradd(tp->milli,tp->flags&R_FLAG,trap_timeout,tp); ++ return list; ++} ++ ++/* ++ * delete timeout item from current given list, delete timer ++ */ ++static void *time_delete(struct tevent *item, void *list) ++{ ++ struct tevent *tp = (struct tevent*)list; ++ if(item==tp) ++ list = tp->next; ++ else ++ { ++ while(tp && tp->next != item) ++ tp = tp->next; ++ if(tp) ++ tp->next = item->next; ++ } ++ if(item->timeout) ++ sh_timerdel(item->timeout); ++ return list; ++} ++ ++static void print_alarms(void *list) ++{ ++ struct tevent *tp = (struct tevent*)list; ++ while(tp) ++ { ++ if(tp->timeout) ++ { ++ char *name = nv_name(tp->node); ++ if(tp->flags&R_FLAG) ++ { ++ double d = tp->milli; ++ sfprintf(sfstdout,e_alrm1,name,d/1000.); ++ } ++ else ++ sfprintf(sfstdout,e_alrm2,name,nv_getnum(tp->node)); ++ } ++ tp = tp->next; ++ } ++} ++ ++static void trap_timeout(void* handle) ++{ ++ struct tevent *tp = (struct tevent*)handle; ++ sh.trapnote |= SH_SIGALRM; ++ if(!(tp->flags&R_FLAG)) ++ tp->timeout = 0; ++ tp->flags |= L_FLAG; ++ sh.sigflag[SIGALRM] |= SH_SIGALRM; ++ if(sh_isstate(SH_TTYWAIT)) ++ sh_timetraps(); ++} ++ ++void sh_timetraps(void) ++{ ++ struct tevent *tp, *tpnext; ++ struct tevent *tptop; ++ while(1) ++ { ++ sh.sigflag[SIGALRM] &= ~SH_SIGALRM; ++ tptop= (struct tevent*)sh.st.timetrap; ++ for(tp=tptop;tp;tp=tpnext) ++ { ++ tpnext = tp->next; ++ if(tp->flags&L_FLAG) ++ { ++ tp->flags &= ~L_FLAG; ++ if(tp->action) ++ sh_fun(tp->action,tp->node,NULL); ++ tp->flags &= ~L_FLAG; ++ if(!tp->flags) ++ nv_unset(tp->node); ++ } ++ } ++ if(!(sh.sigflag[SIGALRM]&SH_SIGALRM)) ++ break; ++ } ++} ++ ++ ++/* ++ * This trap function catches "alarm" actions only ++ */ ++static char *setdisc(Namval_t *np, const char *event, Namval_t* action, Namfun_t *fp) ++{ ++ struct tevent *tp = (struct tevent*)fp; ++ if(!event) ++ return action ? Empty : (char*)ALARM; ++ if(strcmp(event,ALARM)!=0) ++ { ++ /* try the next level */ ++ return nv_setdisc(np, event, action, fp); ++ } ++ if(action==np) ++ action = tp->action; ++ else ++ tp->action = action; ++ return action ? (char*)action : Empty; ++} ++ ++/* ++ * catch assignments and set alarm traps ++ */ ++static void putval(Namval_t* np, const char* val, int flag, Namfun_t* fp) ++{ ++ struct tevent *tp = (struct tevent*)fp; ++ double d; ++ if(val) ++ { ++ double now; ++#ifdef timeofday ++ struct timeval tmp; ++ timeofday(&tmp); ++ now = tmp.tv_sec + 1.e-6*tmp.tv_usec; ++#else ++ now = (double)time(NULL); ++#endif /* timeofday */ ++ nv_putv(np,val,flag,fp); ++ d = nv_getnum(np); ++ if(*val=='+') ++ { ++ double x = d + now; ++ nv_putv(np,(char*)&x,NV_INTEGER|NV_DOUBLE,fp); ++ } ++ else ++ d -= now; ++ tp->milli = 1000*(d+.0005); ++ if(tp->timeout) ++ sh.st.timetrap = time_delete(tp,sh.st.timetrap); ++ if(tp->milli > 0) ++ sh.st.timetrap = time_add(tp,sh.st.timetrap); ++ } ++ else ++ { ++ tp = (struct tevent*)nv_stack(np, NULL); ++ sh.st.timetrap = time_delete(tp,sh.st.timetrap); ++ nv_unset(np); ++ free(fp); ++ } ++} ++ ++static const Namdisc_t alarmdisc = ++{ ++ sizeof(struct tevent), ++ putval, ++ 0, ++ 0, ++ setdisc, ++}; ++ ++int b_alarm(int argc,char *argv[],Shbltin_t *context) ++{ ++ int n,rflag=0; ++ Namval_t *np; ++ struct tevent *tp; ++ while (n = optget(argv, sh_optalarm)) switch (n) ++ { ++ case 'r': ++ rflag = R_FLAG; ++ break; ++ case ':': ++ errormsg(SH_DICT,2, "%s", opt_info.arg); ++ break; ++ case '?': ++ errormsg(SH_DICT,ERROR_usage(2), "%s", opt_info.arg); ++ UNREACHABLE(); ++ } ++ argc -= opt_info.index; ++ argv += opt_info.index; ++ if(error_info.errors) ++ { ++ errormsg(SH_DICT,ERROR_usage(2),optusage(NULL)); ++ UNREACHABLE(); ++ } ++ if(argc==0) ++ { ++ print_alarms(sh.st.timetrap); ++ return 0; ++ } ++ if(argc!=2) ++ { ++ errormsg(SH_DICT,ERROR_usage(2),optusage(NULL)); ++ UNREACHABLE(); ++ } ++ np = nv_open(argv[0],sh.var_tree,NV_NOARRAY|NV_VARNAME); ++ if(!nv_isnull(np)) ++ nv_unset(np); ++ nv_setattr(np, NV_DOUBLE); ++ tp = sh_newof(NULL,struct tevent,1,0); ++ tp->fun.disc = &alarmdisc; ++ tp->flags = rflag; ++ tp->node = np; ++ nv_stack(np,(Namfun_t*)tp); ++ nv_putval(np, argv[1], 0); ++ return 0; ++} +diff --git a/src/cmd/ksh93/bltins/sleep.c b/src/cmd/ksh93/bltins/sleep.c +index b34e62d..3bb55b1 100644 +--- a/src/cmd/ksh93/bltins/sleep.c ++++ b/src/cmd/ksh93/bltins/sleep.c +@@ -127,6 +127,8 @@ skip: + if(tloc < (now=time(NULL))) + break; + d = (double)(tloc-now); ++ if(sh.sigflag[SIGALRM]&SH_SIGTRAP) ++ sh_timetraps(); + } + return 0; + } +diff --git a/src/cmd/ksh93/data/builtins.c b/src/cmd/ksh93/data/builtins.c +index 760b7ce..22ea156 100644 +--- a/src/cmd/ksh93/data/builtins.c ++++ b/src/cmd/ksh93/data/builtins.c +@@ -116,6 +116,7 @@ const struct shtable3 shtab_builtins[] = + "pwd", NV_BLTIN|BLT_ENV, bltin(pwd), + "read", NV_BLTIN|BLT_ENV, bltin(read), + "sleep", NV_BLTIN, bltin(sleep), ++ "alarm", NV_BLTIN|BLT_ENV, bltin(alarm), + "times", NV_BLTIN|BLT_ENV|BLT_SPC, bltin(times), + "ulimit", NV_BLTIN|BLT_ENV, bltin(ulimit), + "umask", NV_BLTIN|BLT_ENV, bltin(umask), +@@ -2170,6 +2171,8 @@ const char sh_optwhence[] = + ; + + ++const char e_alrm1[] = "alarm -r %s +%.3g\n"; ++const char e_alrm2[] = "alarm %s %.3f\n"; + const char e_baddisc[] = "%s: invalid discipline function"; + const char e_nofork[] = "cannot fork"; + const char e_nosignal[] = "%s: unknown signal name"; +diff --git a/src/cmd/ksh93/include/builtins.h b/src/cmd/ksh93/include/builtins.h +index 34c697c..f6b3f59 100644 +--- a/src/cmd/ksh93/include/builtins.h ++++ b/src/cmd/ksh93/include/builtins.h +@@ -115,6 +115,8 @@ extern int b_times(int, char*[],Shbltin_t*); + + extern short b_enum_nelem(Namfun_t*); + ++extern const char e_alrm1[]; ++extern const char e_alrm2[]; + extern const char e_badfun[]; + extern const char e_baddisc[]; + extern const char e_nofork[]; +diff --git a/src/cmd/ksh93/include/defs.h b/src/cmd/ksh93/include/defs.h +index 306ea7e..b5bfb67 100644 +--- a/src/cmd/ksh93/include/defs.h ++++ b/src/cmd/ksh93/include/defs.h +@@ -143,6 +143,7 @@ extern void sh_subjobcheck(pid_t); + extern int sh_subsavefd(int); + extern void sh_subtmpfile(void); + extern char *sh_substitute(const char*,const char*,char*); ++extern void sh_timetraps(void); + extern const char *_sh_translate(const char*); + extern int sh_trace(char*[],int); + extern void sh_trim(char*); +diff --git a/src/cmd/ksh93/include/fault.h b/src/cmd/ksh93/include/fault.h +index b57a0ab..7750f80 100644 +--- a/src/cmd/ksh93/include/fault.h ++++ b/src/cmd/ksh93/include/fault.h +@@ -58,6 +58,7 @@ typedef void (*SH_SIGTYPE)(int,void(*)(int)); + #define SH_SIGIGNORE 040 /* default is ignore signal */ + #define SH_SIGINTERACTIVE 0100 /* handle interactive specially */ + #define SH_SIGTSTP 0200 /* tstp signal received */ ++#define SH_SIGALRM 0200 /* timer alarm received */ + #define SH_SIGTERM SH_SIGOFF /* term signal received */ + #define SH_SIGRUNTIME 0400 /* runtime value */ + +diff --git a/src/cmd/ksh93/include/shell.h b/src/cmd/ksh93/include/shell.h +index 57c402d..9794995 100644 +--- a/src/cmd/ksh93/include/shell.h ++++ b/src/cmd/ksh93/include/shell.h +@@ -211,6 +211,7 @@ struct sh_scoped + char **otrap; /* save parent pseudosignals for v=$(trap) */ + char **trapcom; /* EXIT and signals */ + char **otrapcom; /* save parent EXIT and signals for v=$(trap) */ ++ void *timetrap; + struct Ufunction *real_fun; /* current 'function name' function */ + int repl_index; + char *repl_arg; +diff --git a/src/cmd/ksh93/sh/fault.c b/src/cmd/ksh93/sh/fault.c +index 3409a6c..510bf56 100644 +--- a/src/cmd/ksh93/sh/fault.c ++++ b/src/cmd/ksh93/sh/fault.c +@@ -447,6 +447,8 @@ void sh_chktrap(void) + sh_exit(sh.exitval); + } + } ++ if(sh.sigflag[SIGALRM]&SH_SIGALRM) ++ sh_timetraps(); + #if SHOPT_BGX + if((sh.sigflag[SIGCHLD]&SH_SIGTRAP) && sh.st.trapcom[SIGCHLD]) + job_chldtrap(1); +diff --git a/src/cmd/ksh93/sh/jobs.c b/src/cmd/ksh93/sh/jobs.c +index 116ae3b..be333b2 100644 +--- a/src/cmd/ksh93/sh/jobs.c ++++ b/src/cmd/ksh93/sh/jobs.c +@@ -1466,6 +1466,8 @@ int job_wait(pid_t pid) + continue; + if(nochild) + break; ++ if(sh.sigflag[SIGALRM]&SH_SIGTRAP) ++ sh_timetraps(); + if((intr && sh.trapnote) || (pid==1 && !intr)) + break; + } +diff --git a/src/cmd/ksh93/tests/builtins.sh b/src/cmd/ksh93/tests/builtins.sh +index 83b4086..92d2708 100755 +--- a/src/cmd/ksh93/tests/builtins.sh ++++ b/src/cmd/ksh93/tests/builtins.sh +@@ -1222,6 +1222,28 @@ function test_usage + done 3< <(builtin) + }; test_usage + ++# ====== ++# The 'alarm' builtin could make 'read' crash due to IFS table corruption caused by unsafe asynchronous execution. ++# https://bugzilla.redhat.com/1176670 ++if (builtin alarm) 2>/dev/null ++then got=$( { "$SHELL" -c ' ++ builtin alarm ++ alarm -r alarm_handler +.005 ++ i=0 ++ function alarm_handler.alarm ++ { ++ let "(++i) > 20" && exit ++ } ++ while :; do ++ echo cargo,odds and ends,jetsam,junk,wreckage,castoffs,sea-drift ++ done | while IFS="," read arg1 arg2 arg3 arg4 junk; do ++ : ++ done ++ '; } 2>&1) ++ ((!(e = $?))) || err_exit 'crash with alarm and IFS' \ ++ "(got status $e$( ((e>128)) && print -n /SIG && kill -l "$e"), $(printf %q "$got"))" ++fi ++ + # ====== + # Verify that the POSIX 'test' builtin exits with status 2 when given an invalid binary operator. + for operator in '===' ']]' +@@ -1581,7 +1603,7 @@ let Errors+=$? + # Most built-ins should handle --version + while IFS= read -r bltin <&3 + do case $bltin in +- echo | test | true | false | \[ | : | catclose | catgets | catopen | Dt* | _Dt* | X* | login | newgrp ) ++ alarm | echo | test | true | false | \[ | : | catclose | catgets | catopen | Dt* | _Dt* | X* | login | newgrp ) + continue ;; + fc | hist ) + ((SHOPT_SCRIPTONLY)) && continue ;; diff --git a/ksh-1.0.6-alarm-2.patch b/ksh-1.0.6-alarm-2.patch new file mode 100644 index 0000000..57d7ed1 --- /dev/null +++ b/ksh-1.0.6-alarm-2.patch @@ -0,0 +1,162 @@ +diff --git a/src/cmd/ksh93/Mamfile b/src/cmd/ksh93/Mamfile +index abc9ee1a5..d266f2178 100644 +--- a/src/cmd/ksh93/Mamfile ++++ b/src/cmd/ksh93/Mamfile +@@ -222,6 +222,10 @@ make install + prev shell.req + make alarm.o + make bltins/alarm.c ++ make include/io.h implicit ++ prev ${PACKAGE_ast_INCLUDE}/sfio.h ++ prev ${PACKAGE_ast_INCLUDE}/ast.h ++ done include/io.h + make FEATURE/time implicit + prev features/time + exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/time +@@ -239,6 +243,22 @@ make install + done FEATURE/dynamic generated + prev ${PACKAGE_ast_INCLUDE}/option.h + done include/builtins.h ++ make include/shlex.h implicit ++ make include/lexstates.h implicit ++ prev ${PACKAGE_ast_INCLUDE}/wctype.h ++ prev ${PACKAGE_ast_INCLUDE}/wchar.h ++ make FEATURE/locale implicit ++ prev features/locale ++ exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/locale ++ done FEATURE/locale generated ++ done include/lexstates.h ++ prev include/shtable.h ++ make include/shnodes.h implicit ++ prev include/argnod.h implicit ++ prev ${PACKAGE_ast_INCLUDE}/ast.h ++ done include/shnodes.h ++ prev ${PACKAGE_ast_INCLUDE}/cdt.h ++ done include/shlex.h + prev ${PACKAGE_ast_INCLUDE}/error.h + make include/defs.h implicit + prev include/regress.h implicit +@@ -246,7 +266,7 @@ make install + prev include/shell.h + prev ${PACKAGE_ast_INCLUDE}/endian.h + prev include/name.h +- prev include/argnod.h implicit ++ prev include/argnod.h + prev ${PACKAGE_ast_INCLUDE}/cdt.h + prev FEATURE/externs + prev ${PACKAGE_ast_INCLUDE}/error.h +@@ -292,10 +312,7 @@ make install + make cflow.o + make bltins/cflow.c + prev include/builtins.h +- make include/shnodes.h implicit +- prev include/argnod.h +- prev ${PACKAGE_ast_INCLUDE}/ast.h +- done include/shnodes.h ++ prev include/shnodes.h + prev ${PACKAGE_ast_INCLUDE}/error.h + prev ${PACKAGE_ast_INCLUDE}/ast.h + prev include/defs.h +@@ -341,10 +358,7 @@ make install + done FEATURE/ttys generated + done include/terminal.h + prev ${PACKAGE_ast_INCLUDE}/sig.h +- make FEATURE/locale implicit +- prev features/locale +- exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/locale +- done FEATURE/locale generated ++ prev FEATURE/locale + make FEATURE/cmds implicit + prev features/cmds + exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/cmds +@@ -353,6 +367,7 @@ make install + prev include/builtins.h + prev include/history.h + prev include/name.h ++ prev include/io.h + make include/io.h implicit + prev ${PACKAGE_ast_INCLUDE}/sfio.h + prev ${PACKAGE_ast_INCLUDE}/ast.h +@@ -443,11 +458,7 @@ make install + prev include/builtins.h + prev include/name.h + prev include/io.h +- make include/lexstates.h implicit +- prev ${PACKAGE_ast_INCLUDE}/wctype.h +- prev ${PACKAGE_ast_INCLUDE}/wchar.h +- prev FEATURE/locale +- done include/lexstates.h ++ prev include/lexstates.h + prev include/variables.h + prev include/defs.h + prev ${PACKAGE_ast_INCLUDE}/error.h +@@ -545,12 +556,7 @@ make install + make whence.o + make bltins/whence.c + prev include/builtins.h +- make include/shlex.h implicit +- prev include/lexstates.h +- prev include/shtable.h +- prev include/shnodes.h +- prev ${PACKAGE_ast_INCLUDE}/cdt.h +- done include/shlex.h ++ prev include/shlex.h + prev include/path.h + prev include/name.h + prev include/shtable.h +diff --git a/src/cmd/ksh93/bltins/alarm.c b/src/cmd/ksh93/bltins/alarm.c +index f31bed711..63d4d6cbf 100644 +--- a/src/cmd/ksh93/bltins/alarm.c ++++ b/src/cmd/ksh93/bltins/alarm.c +@@ -23,21 +23,13 @@ + * + */ + +-/* +- * TODO: 2014 email from David Korn cited at <https://bugzilla.redhat.com/1176670>: +- * +- * > I never documented the alarm builtin because it is problematic. The +- * > problem is that traps can't safely be handled asynchronously. What should +- * > happen is that the trap is marked for execution (sh.trapnote) and run after +- * > the current command completes. The time trap should wake up the shell if +- * > it is blocked and it should return and then handle the trap. +- */ +- + #include "shopt.h" + #include "defs.h" + #include <error.h> ++#include <shlex.h> + #include "builtins.h" + #include "FEATURE/time" ++#include "io.h" + + #define R_FLAG 1 + #define L_FLAG 2 +@@ -147,7 +139,26 @@ void sh_timetraps(void) + { + tp->flags &= ~L_FLAG; + if(tp->action) +- sh_fun(tp->action,tp->node,NULL); ++ { ++ /* Call the alarm discipline function. This may occur at any time including parse time, ++ * so save the lexer state and push/pop context to make sure we can restore it. */ ++ struct checkpt checkpoint; ++ int jmpval; ++ int savexit = sh.savexit; ++ Lex_t *lexp = (Lex_t*)sh.lex_context, savelex = *lexp; ++ sh_lexopen(lexp, 0); /* needs full init (0), not what it calls reinit (1) */ ++ sh_pushcontext(&checkpoint, 1); ++ jmpval = sigsetjmp(checkpoint.buff,0); ++ if(!jmpval) ++ sh_fun(tp->action,tp->node,NULL); ++ sh_popcontext(&checkpoint); ++ if(sh.topfd != checkpoint.topfd) ++ sh_iorestore(checkpoint.topfd,jmpval); ++ *lexp = savelex; ++ sh.savexit = savexit; /* avoid influencing $? */ ++ if(jmpval) ++ siglongjmp(*sh.jmplist,jmpval); ++ } + tp->flags &= ~L_FLAG; + if(!tp->flags) + nv_unset(tp->node); diff --git a/ksh-1.0.7-history-trim.patch b/ksh-1.0.7-history-trim.patch new file mode 100644 index 0000000..9b243e3 --- /dev/null +++ b/ksh-1.0.7-history-trim.patch @@ -0,0 +1,99 @@ +From 2075b2b96208ac8b989ca316dcdd674c3f488e2b Mon Sep 17 00:00:00 2001 +From: Martijn Dekker <martijn@inlv.org> +Date: Thu, 28 Dec 2023 04:02:28 +0000 +Subject: [PATCH] Fix crash on failure to trim ~/.sh_history + +@vmihalko writes: +> We were able to reproduce an old issue mentioned in +> https://bugzilla.redhat.com/show_bug.cgi?id=1885399 using the +> latest version of ksh. The corresponding code has not changed +> much in the past few years. +> +> To provide further explanation, the problem arises when a user's +> .sh_history file grows to a size that triggers the hist_trim +> function, but the user lacks (after the creation of .sh_history) +> the necessary write permissions to their $HOME directory. As a +> result, ksh becomes stuck in a recursive loop between the +> sh_histinit(src/cmd/ksh93/edit/history.c#L203) function and the +> hist_trim(src/cmd/ksh93/edit/history.c#L417) function. +> +> Conditions for reproduction: +> +> 1. The size of the .sh_history file is larger than the HIST_MAX +> limit. (src/cmd/ksh93/edit/history.c, line 325) +> 2. .sh_history file has not been changed in the HIST_RECENT +> seconds (src/cmd/ksh93/edit/history.c, line 406) +> 3. The user does not have permission to write to the $HOME +> directory. + +src/cmd/ksh93/edit/history.c: hist_trim(): +- Print a warning and return if unlink(2) fails. The warning tells + the user to check the history file's parent directory is + writable. This is the best I realistically do for now, because + this function's basic method assumes a writable parent directory. +- The temp file fallback is deleted because it's fundamentally + flawed: it assumes the temp file is made on the same volume as + the history file and can simply be rename(2)'d in place. Even + on systems where this is the case, it doesn't appear to be + working correctly, but this is not worth looking into. + +Resolves: https://github.com/ksh93/ksh/issues/695 +--- + src/cmd/ksh93/edit/history.c | 34 ++++------------------------------ + 1 files changed, 4 insertions(+), 30 deletions(-) + +diff --git a/src/cmd/ksh93/edit/history.c b/src/cmd/ksh93/edit/history.c +index c49c23244d00..f3672bf6e220 100644 +--- a/src/cmd/ksh93/edit/history.c ++++ b/src/cmd/ksh93/edit/history.c +@@ -419,34 +419,13 @@ static History_t* hist_trim(History_t *hp, int n) + char *cp; + int incmd=1, c=0; + History_t *hist_new, *hist_old = hp; +- char *buff, *endbuff, *tmpname=0; ++ char *buff, *endbuff; + off_t oldp,newp; + struct stat statb; +- unlink(hist_old->histname); +- if(access(hist_old->histname,F_OK) >= 0) ++ if(unlink(hist_old->histname) < 0) + { +- /* The unlink can fail on Windows 95 */ +- int fd; +- char *last, *name=hist_old->histname; +- sh_close(sffileno(hist_old->histfp)); +- tmpname = (char*)sh_malloc(strlen(name)+14); +- if(last = strrchr(name,'/')) +- { +- *last = 0; +- pathtmp(tmpname,name,"hist",NULL); +- *last = '/'; +- } +- else +- pathtmp(tmpname,e_dot,"hist",NULL); +- if(rename(name,tmpname) < 0) +- { +- free(tmpname); +- tmpname = name; +- } +- fd = open(tmpname,O_RDONLY|O_cloexec); +- sfsetfd(hist_old->histfp,fd); +- if(tmpname==name) +- tmpname = 0; ++ errormsg(SH_DICT,ERROR_warn(0),"cannot trim history file %s; make sure parent directory is writable",hist_old->histname); ++ return hist_ptr = hist_old; + } + hist_ptr = 0; + if(fstat(sffileno(hist_old->histfp),&statb)>=0) +@@ -501,11 +480,6 @@ static History_t* hist_trim(History_t *hp, int n) + } + hist_cancel(hist_new); + sfclose(hist_old->histfp); +- if(tmpname) +- { +- unlink(tmpname); +- free(tmpname); +- } + free((char*)hist_old); + return hist_ptr = hist_new; + } diff --git a/ksh-1.0.7-segfault-strdup.patch b/ksh-1.0.7-segfault-strdup.patch new file mode 100644 index 0000000..d52f539 --- /dev/null +++ b/ksh-1.0.7-segfault-strdup.patch @@ -0,0 +1,58 @@ +From 9eb8532ccacf1cfdb7ba18f51eba68776852ef7c Mon Sep 17 00:00:00 2001 +From: Vincent Mihalkovic <vmihalko@redhat.com> +Date: Thu, 8 Feb 2024 22:10:58 +0100 +Subject: [PATCH] Re-fix use of strdup on a NULL pointer (re: 9a9da2c2) (#718) + +Thank you @lzaoral for debugging this issue and creating this +reproducer: + +$ tty # check that the shell is connected to a pseudoterminal +/dev/pts/4 +$ mkdir /var/tmp/chroottest +$ dnf --releasever=39 --installroot=/var/tmp/chroottest install ksh +$ echo "/dev/udp/127.0.0.1/514;0;104" | + sudo tee /var/tmp/chroottest/etc/ksh_audit +$ sudo chroot /var/tmp/chroottest /bin/ksh -lic 'exit 0' +(ksh segfaults) + +Analysis: On Linux, ttyname(3)[*] may fail if: + +* EBADF Bad file descriptor. +* ENODEV fd refers to a slave pseudoterminal device but the + corresponding pathname could not be found [...]. +* ENOTTY fd does not refer to a terminal device. + +Calling isatty(3) before ttyname(3) only prevents the first and +third cases. + +src/cmd/ksh93/edit/history.c: sh_histinit(): +- To catch the second case, let's call ttyname(2) directly, check + for NULL and remove the redundant isatty() call. + +[*] https://man7.org/linux/man-pages/man3/ttyname.3.html +--- + src/cmd/ksh93/edit/history.c | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/src/cmd/ksh93/edit/history.c b/src/cmd/ksh93/edit/history.c +index a7b084e5c16f..25832a59265b 100644 +--- a/src/cmd/ksh93/edit/history.c ++++ b/src/cmd/ksh93/edit/history.c +@@ -15,6 +15,7 @@ + * Johnothan King <johnothanking@protonmail.com> * + * hyenias <58673227+hyenias@users.noreply.github.com> * + * Govind Kamat <govind_kamat@yahoo.com> * ++* Vincent Mihalkovic <vmihalko@redhat.com> * + * * + ***********************************************************************/ + /* +@@ -353,7 +354,8 @@ int sh_histinit(void) + if(fd>=0) + { + fcntl(fd,F_SETFD,FD_CLOEXEC); +- hp->tty = sh_strdup(isatty(2)?ttyname(2):"notty"); ++ const char* tty = ttyname(2); ++ hp->tty = sh_strdup(tty?tty:"notty"); + hp->auditfp = sfnew(NULL,NULL,-1,fd,SF_WRITE); + } + } diff --git a/ksh.spec b/ksh.spec new file mode 100644 index 0000000..bad6c90 --- /dev/null +++ b/ksh.spec @@ -0,0 +1,746 @@ +Name: ksh +Summary: The Original ATT Korn Shell +URL: http://www.kornshell.com/ +License: EPL-1.0 +Epoch: 3 +Version: 1.0.6 +Release: 3%{?dist} +Source0: https://github.com/ksh93/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz +Source1: kshcomp.conf +Source2: kshrc.rhs +Source3: dotkshrc + +# The alarm builtin hase been temporarily removed from ksh in version 1.0.0. +# To prevent customer regressions we revert following upstream commits: +# https://github.com/ksh93/ksh/commit/4d50b69cbd5fce91d1f3c527dc170e192ceb4760 +# https://github.com/ksh93/ksh/commit/b369f40ded0ec7e8dd3d4a0e7226ccf037bb3400 +# https://github.com/ksh93/ksh/commit/3688842b7291db6fccdb44ff8e99ab8d4c1b2508 +Patch1: %{name}-1.0.6-alarm-1.patch +# alarm builtin was removed as it was unclear if it could ever be fixed +# alarm fixing patch from https://github.com/ksh93/ksh/issues/422#issuecomment-1581168550 +Patch2: %{name}-1.0.6-alarm-2.patch + +#https://github.com/ksh93/ksh/commit/2075b2b96208ac8b989ca316dcdd674c3f488e2b +Patch3: %{name}-1.0.7-history-trim.patch + +#upstream commit: https://github.com/ksh93/ksh/commit/9eb8532ccacf1cfdb7ba18f51eba68776852ef7c.patch +Patch4: ksh-1.0.7-segfault-strdup.patch + +Conflicts: pdksh +Requires: coreutils, diffutils +BuildRequires: gcc +BuildRequires: bison +# regression test suite uses 'ps' from procps +BuildRequires: procps +Requires(post): grep, coreutils, systemd +Requires(postun): sed + +Provides: /bin/ksh +Provides: /bin/rksh + +%description +KSH-93 is the most recent version of the KornShell by David Korn of +AT&T Bell Laboratories. +KornShell is a shell programming language, which is upward compatible +with "sh" (the Bourne Shell). + +%prep +%autosetup -p1 + +#/dev/fd test does not work because of mock +sed -i 's|ls /dev/fd|ls /proc/self/fd|' src/cmd/ksh93/features/options + +%build +XTRAFLAGS="" +for f in -Wno-unknown-pragmas -Wno-missing-braces -Wno-unused-result -Wno-return-type -Wno-int-to-pointer-cast -Wno-parentheses -Wno-unused -Wno-unused-but-set-variable -Wno-cpp -Wno-maybe-uninitialized -Wno-lto-type-mismatch +do + $CC $f -E - </dev/null >/dev/null 2>&1 && XTRAFLAGS="$XTRAFLAGS $f" +done +export CCFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing $XTRAFLAGS" +export LDFLAGS="$RPM_LD_FLAGS" +./bin/package make + +%install +mkdir -p %{buildroot}{/bin,%{_bindir},%{_mandir}/man1} +install -p -m 755 arch/*/bin/ksh %{buildroot}%{_bindir}/ksh93 +install -p -m 755 arch/*/bin/shcomp %{buildroot}%{_bindir}/shcomp +install -p -m 644 arch/*/man/man1/sh.1 %{buildroot}%{_mandir}/man1/ksh93.1 +mkdir -p %{buildroot}%{_sysconfdir}/skel +install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/skel/.kshrc +install -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/kshrc +install -p -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/binfmt.d/kshcomp.conf + +touch %{buildroot}%{_bindir}/ksh +touch %{buildroot}%{_mandir}/man1/ksh.1.gz + +touch %{buildroot}%{_bindir}/rksh +touch %{buildroot}%{_mandir}/man1/rksh.1.gz + +%check +./bin/shtests --compile + +%post +for s in /bin/ksh /bin/rksh /usr/bin/ksh /usr/bin/rksh +do + if [ ! -f /etc/shells ]; then + echo "$s" > /etc/shells + else + if ! grep -q '^'"$s"'$' /etc/shells ; then + echo "$s" >> /etc/shells + fi + fi +done + +%{_sbindir}/alternatives --install %{_bindir}/ksh ksh \ + %{_bindir}/ksh93 50 \ + --slave %{_bindir}/rksh rksh \ + %{_bindir}/ksh93 \ + --slave %{_mandir}/man1/rksh.1.gz rksh-man \ + %{_mandir}/man1/ksh93.1.gz \ + --slave %{_mandir}/man1/ksh.1.gz ksh-man \ + %{_mandir}/man1/ksh93.1.gz + +#if not symlink we are updating ksh where there was no alternatives before +#so replace with symlink and set alternatives +if [ ! -L %{_bindir}/ksh ]; then + %{_sbindir}/alternatives --auto ksh + ln -sf /etc/alternatives/ksh %{_bindir}/ksh + ln -sf /etc/alternatives/ksh-man %{_mandir}/man1/ksh.1.gz +fi + +/bin/systemctl try-restart systemd-binfmt.service >/dev/null 2>&1 || : + +%postun +for s in /bin/ksh /bin/rksh /usr/bin/ksh /usr/bin/rksh +do + if [ ! -f $s ]; then + sed -i '\|^'"$s"'$|d' /etc/shells + fi +done + +%preun +if [ $1 = 0 ]; then + %{_sbindir}/alternatives --remove ksh %{_bindir}/ksh93 +fi + +%verifyscript +echo -n "Looking for ksh in /etc/shells... " +if ! grep '^/bin/ksh$' /etc/shells > /dev/null; then + echo "missing" + echo "ksh missing from /etc/shells" >&2 +else + echo "found" +fi + +%files +%doc src/cmd/ksh93/COMPATIBILITY src/cmd/ksh93/RELEASE src/cmd/ksh93/TYPES +%license LICENSE.md +%{_bindir}/ksh93 +%ghost %{_bindir}/ksh +%ghost %{_bindir}/rksh +%{_bindir}/shcomp +%{_mandir}/man1/* +%ghost %{_mandir}/man1/ksh.1.gz +%ghost %{_mandir}/man1/rksh.1.gz +%config(noreplace) %{_sysconfdir}/skel/.kshrc +%config(noreplace) %{_sysconfdir}/kshrc +%config(noreplace) %{_sysconfdir}/binfmt.d/kshcomp.conf + +%changelog +* Sat Feb 10 2024 Vincent Mihalkovic <vmihalko@redhat.com> - 3:1.0.6-3 +- Fix segfault in strdup + Resolves: RHEL-25019 + +* Wed Jan 03 2024 Vincent Mihalkovic <vmihalko@redhat.com> - 3:1.0.6-2 +- Fix crash on failure to trim ~/.sh_history (#20345) + +* Mon Sep 18 2023 Vincent Mihalkovic <vmihalko@redhat.com> - 3:1.0.6-1 +- Rebase to non-beta version, because upstream says it should to be used + https://github.com/ksh93/ksh/issues/667#issuecomment-1653665697 +- fix acl test case regression + Resolves: #2034188 + +* Tue Jun 27 2023 Vincent Mihalkovic <vmihalko@redhat.com> - 3:1.0.0~beta.1-3 +- fix segfault when PWD is unset + Resolves: #2123066 + +* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 3:1.0.0~beta.1-2 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Tue Aug 03 2021 Vincent Mihalkovic <vmihalko@redhat.com> - 3:1.0.0~BETA-1 +- new upstream release +- remove upstreamed patches +- update CCFLAGS (https://github.com/ksh93/ksh/commit/98f989afcc7) + Resolves: #1986897 + +* Thu Jul 29 2021 Vincent Mihalkovic <vmihalko@redhat.com> - 2:20120801-258 +- Fix license tag + Related: #1974805 + +* Wed Jul 28 2021 Vincent Mihalkovic <vmihalko@redhat.com> - 2:20120801-257 +- Fix invalid source URLs + Resolves: #1974805 + +* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2:20120801-256 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Thu Mar 18 2021 Vincent Mihalkovic <vmihalko@redhat.com> - 2:20120801-255 +- fix rksh-man in alternatives + +* Tue Feb 23 2021 Vincent Mihalkovic <vmihalko@redhat.com> - 2:20120801-254 +- Add alternatives switching for rksh + Resolves #1893919 + +* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2:20120801-253 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Fri Jan 22 2021 Vincent Mihalkovic <vmihalko@redhat.com> - 2:20120801-252 +- Use set_build_flags and standard CC variables (commit: c488ab6) + +* Thu Aug 13 2020 Siteshwar Vashisht <svashisht@redhat.com> - 2:20120801-251 +- Restore ksh to version 20120801 + Resolves: #1868715 + +* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:2020.0.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Feb 07 2020 Siteshwar Vashisht <svashisht@redhat.com> - 1:2020.0.0-3 +- Do not evaluate arithmetic expressions from environment variables at startup + Resolves: #1790549 + +* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:2020.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Oct 11 2019 Siteshwar Vashisht <svashisht@redhat.com> - 1:2020.0.0-1 +- Rebase to 2020.0.0 + +* Tue Sep 03 2019 Siteshwar Vashisht <svashisht@redhat.com> - 1:2020.0.0-0.4 +- Rebase to 2020.0.0-beta1 + +* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:2020.0.0-0.3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Wed Apr 24 2019 Siteshwar Vashisht <svashisht@redhat.com> - 1:2020.0.0-0.2 +- Add virtual provider for `/usr/bin/ksh` + +* Wed Apr 17 2019 Siteshwar Vashisht <svashisht@redhat.com> - 1:2020.0.0-0.1 +- Rebase to 2020.0.0-alpha1 + Resolves: #1700777 + +* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 20120801-250 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sun Oct 14 2018 Peter Robinson <pbrobinson@fedoraproject.org> 20120801-249 +- chkconfig is no longer needed + +* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 20120801-248 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Mon Jun 04 2018 Siteshwar Vashisht <svashisht@redhat.com> - 20120801-247 +- Fix a crash caused by memcmp() + Resolves: #1583226 + +* Mon Mar 12 2018 Siteshwar Vashisht <svashisht@redhat.com> - 20120801-246 +- Enable standard Fedora LDFLAGS + Resolves: #1548549 + +* Fri Feb 16 2018 Siteshwar Vashisht <svashisht@redhat.com> - 20120801-245 +- Increase release number by 200 to ensure update path + +* Mon Feb 12 2018 Siteshwar Vashisht <svashisht@redhat.com> - 20120801-45 +- Fix a crash due to out of bounds write + Resolves: #1537053 + +* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 20120801-44 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Tue Nov 21 2017 Siteshwar Vashisht <svashisht@redhat.com> - 20120801-43 +- Add virtual provide for /bin/ksh + Resolves: #1513096 + +* Mon Aug 28 2017 Siteshwar Vashisht <svashisht@redhat.com> - 20120801-42 +- Fix a memory corruption + Resolves: #1464409 + +* Mon Aug 14 2017 Siteshwar Vashisht <svashisht@redhat.com> - 20120801-41 +- Use posix exit code if last command exits due to a signal + Resolves: #1471874 + +* Mon Aug 14 2017 Siteshwar Vashisht <svashisht@redhat.com> - 20120801-40 +- Fix condition to fork subshell + Resolves: #1462347 + +* Mon Aug 14 2017 Siteshwar Vashisht <svashisht@redhat.com> - 20120801-39 +- Set terminal foreground process group while resuming process + Resolves: #1459000 + +* Thu Aug 03 2017 Siteshwar Vashisht <svashisht@redhat.com> - 20120801-38 +- Fix build failures caused by update in glibc + Resolves: #1477082 + +* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 20120801-37 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 20120801-36 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Mon May 29 2017 Siteshwar Vashisht <svashisht@redhat.com> - 20120801-35 +- Fix memory corruption while parsing functions + Resolves: #1451057 + +* Tue Apr 25 2017 Siteshwar Vashisht <svashisht@redhat.com> - 20120801-34 +- Fix parsing of iso8859 characters + Resolves: #1417886 + +* Tue Apr 11 2017 Siteshwar Vashisht <svashisht@redhat.com> - 20120801-33 +- Avoid spurrious output in kia file creation + Resolves: #1441142 + +* Fri Mar 10 2017 Michal Hlavinka <mhlavink@redhat.com> - 20120801-32 +- add /usr/bin/ksh to /etc/shells (#1381113) + +* Fri Mar 03 2017 Michal Hlavinka <mhlavink@redhat.com> - 20120801-31 +- use latest set of patches + +* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 20120801-30 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 20120801-29 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Aug 27 2015 Michal Hlavinka <mhlavink@redhat.com> - 20120801-28 +- fix: in a login shell "( cmd & )" does nothing (#1217238) + +* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20120801-27 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Wed May 06 2015 Michal Hlavinka <mhlavink@redhat.com> - 20120801-26 +- do not crash, when disk is full, report an error (#1212994) + +* Tue Apr 07 2015 Michal Hlavinka <mhlavink@redhat.com> - 20120801-25 +- using trap DEBUG could cause segmentation fault + +* Mon Mar 30 2015 Michal Hlavinka <mhlavink@redhat.com> - 20120801-24 +- cd builtin could break IO redirection +- fix segfault when handling a trap +- exporting fixed with variable corrupted its data +- and more fixes + +* Fri Mar 06 2015 Michal Hlavinka <mhlavink@redhat.com> - 20120801-23 +- exporting fixed with variable corrupted its data (#1192027) + +* Fri Feb 27 2015 Michal Hlavinka <mhlavink@redhat.com> - 20120801-22 +- ksh hangs when command substitution containing a pipe fills out the pipe buffer (#1121204) + +* Tue Aug 26 2014 Michal Hlavinka <mhlavink@redhat.com> - 20120801-21 +- cd builtin file descriptor operations messed with IO redirections (#1133586) + +* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20120801-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Tue Jul 22 2014 Michal Hlavinka <mhlavink@redhat.com> - 20120801-19 +- fix segfault in job list code +- do not resend signal on termination (#1092132) +- fix brace expansion on/off +- fix incorrect rounding of numsers 0.5 < |x| <1.0 in printf (#1080940) +- fix parser errors related to the end of the here-document marker +- ksh hangs when command substitution fills out the pipe buffer +- using typeset -l with a restricted variabled caused segmentation fault +- monitor mode was documented incorrectly +- do not crash when unsetting running function from another one (#1105139) +- should report an error when trying to cd into directory without execution bit +- job locking mechanism did not survive compiler optimization +- reading a file via command substitution did not work when any of stdin, + stdout or stderr were closed (#1070308) +- fix lexical parser crash + +* Tue Jun 10 2014 Michal Hlavinka <mhlavink@redhat.com> - 20120801-18 +- fix FTBFS(#1107070) + +* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20120801-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue Feb 11 2014 Michal Hlavinka <mhlavink@redhat.com> - 20120801-16 +- ksh could hang when command substitution printed too much data + +* Thu Feb 06 2014 Michal Hlavinka <mhlavink@redhat.com> - 20120801-15 +- fix lexical parser crash (#960371) + +* Fri Jan 17 2014 Michal Hlavinka <mhlavink@redhat.com> - 20120801-14 +- fix overflow in subshell loop + +* Mon Jan 06 2014 Michal Hlavinka <mhlavink@redhat.com> - 20120801-13 +- fix argv rewrite (#1047508) + +* Wed Oct 30 2013 Michal Hlavinka <mhlavink@redhat.com> - 20120801-12 +- ksh stops on read when monitor mode is enabled + +* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20120801-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Jun 12 2013 Michal Hlavinka <mhlavink@redhat.com> - 20120801-10 +- fix memory leak + +* Mon Jun 10 2013 Michal Hlavinka <mhlavink@redhat.com> - 20120801-9 +- monitor mode in scripts wasn't working + +* Thu Mar 07 2013 Michal Hlavinka <mhlavink@redhat.com> - 20120801-8 +- fix another reproducer for tab completion + +* Fri Feb 22 2013 Michal Hlavinka <mhlavink@redhat.com> - 20120801-7 +- do not segfault on kill % (#914669) + +* Fri Feb 01 2013 Michal Hlavinka <mhlavink@redhat.com> - 20120801-6 +- cd file did not produce any error + +* Fri Jan 25 2013 Michal Hlavinka <mhlavink@redhat.com> - 20120801-5 +- ksh could not enter directories with path containing /.something (#889748) +- file name autocomplete prevented following numeric input (#889745) + +* Wed Nov 21 2012 Michal Hlavinka <mhlavink@redhat.com> - 20120801-4 +- bind Home, End, Delete,... key correctly for emacs mode +- do not crash when executed from deleted directory + +* Fri Sep 14 2012 Michal Hlavinka <mhlavink@redhat.com> - 20120801-3 +- fix typo in binfmt config file +- register binary format after package installation + +* Thu Sep 13 2012 Michal Hlavinka <mhlavink@redhat.com> - 20120801-2 +- add support for direct execution of compiled scripts + +* Wed Aug 08 2012 Michal Hlavinka <mhlavink@redhat.com> - 20120801-1 +- ksh updated to 20120801 + +* Tue Jul 31 2012 Michal Hlavinka <mhlavink@redhat.com> - 20120727-1 +- ksh updated to 2012-07-27 + +* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20120628-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Jul 02 2012 Michal Hlavinka <mhlavink@redhat.com> - 20120628-1 +- ksh updated to 20120628 + +* Wed Jun 27 2012 Michal Hlavinka <mhlavink@redhat.com> - 20120626-1 +- ksh updated to 20120626 + +* Fri Jun 22 2012 Michal Hlavinka <mhlavink@redhat.com> - 20120620-1 +- ksh updated to 2012-06-20 + +* Wed Jun 13 2012 Michal Hlavinka <mhlavink@redhat.com> - 20120612-1 +- ksh updated to 20120612 + +* Mon Jun 04 2012 Michal Hlavinka <mhlavink@redhat.com> - 20120531-1 +- ksh updated to 2012-05-31 + +* Mon Mar 19 2012 Michal Hlavinka <mhlavink@redhat.com> - 20120229-2 +- do not hang after return code 12 + +* Wed Mar 14 2012 Michal Hlavinka <mhlavink@redhat.com> - 20120229-1 +- ksh updated to 2012-02-29 + +* Tue Mar 13 2012 Michal Hlavinka <mhlavink@redhat.com> - 20120214-2 +- fix tilda expansion in scripts + +* Mon Feb 20 2012 Michal Hlavinka <mhlavink@redhat.com> - 20120214-1 +- ksh updated to 20120214 + +* Mon Feb 06 2012 Michal Hlavinka <mhlavink@redhat.com> - 20120202-1 +- ksh updated to 20120202 + +* Thu Jan 05 2012 Michal Hlavinka <mhlavink@redhat.com> - 20120101-1 +- ksh updated to 2012-01-01 + +* Wed Dec 07 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110630-9 +- do not crash when browsing through history containing comment (#733813) + +* Wed Dec 07 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110630-8 +- do not crash when two subseguent dots are used in variable or command name (#733544) + +* Mon Dec 05 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110630-7 +- fix: ksh can prematurely exit without crash or any error +- make spec work in epel + +* Thu Nov 10 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110630-6 +- add files to %%doc + +* Thu Oct 06 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110630-5 +- ksh sometimes returns wrong exit code when pid numbers are being recycled + +* Tue Oct 04 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110630-4 +- restore tty settings after timed out read (#572291) + +* Fri Aug 12 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110630-3 +- do not crash when killing last bg job when there is not any + +* Wed Aug 03 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110630-2 +- fix: IFS manipulation in a function can cause crash + +* Fri Jul 01 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110630-1 +- ksh updated to 2011-06-30 + +* Wed Jun 08 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110505-2 +- fix: resume of suspended process using pipes does not work (#708909) + +* Mon May 09 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110505-1 +- ksh updated to 2011-05-05 + +* Fri Apr 29 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110428-1 +- ksh updated to 2011-04-28 + +* Mon Apr 18 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110415-1 +- ksh updated to 2011-04-15 + +* Tue Mar 29 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110208-3 +- fix array definition being treated as fixed array +- fix suspend crashing ksh + +* Mon Mar 07 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110208-2 +- fix ( ) compound list altering environment + +* Wed Feb 09 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110208-1 +- ksh updated to 2011-02-08 + +* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20110202-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Fri Feb 04 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110202-1 +- ksh updated to 2011-02-02 + +* Wed Feb 02 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110131-1 +- ksh updated to 2011-01-31 + +* Fri Jan 28 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110127-1 +- ksh updated to 2011-01-27 + +* Thu Jan 20 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110118-1 +- ksh updated to 2011-01-18 + +* Mon Jan 17 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110104-1 +- ksh updated to 2011-01-04 + +* Thu Dec 23 2010 Michal Hlavinka <mhlavink@redhat.com> - 20101212-2.20101122 +- found ugly regression, reverting to 2010-11-22 (with io race patch) for now + +* Thu Dec 16 2010 Michal Hlavinka <mhlavink@redhat.com> - 20101212-1 +- ksh updated to 2010-12-12 + +* Mon Dec 06 2010 Michal Hlavinka <mhlavink@redhat.com> - 20101201-2 +- fix file io race condition when file was created, but still does not exist + +* Fri Dec 03 2010 Michal Hlavinka <mhlavink@redhat.com> - 20101201-1 +- ksh updated to 2010-12-01 + +* Tue Nov 23 2010 Michal Hlavinka <mhlavink@redhat.com> - 20101122-1 +- ksh updated to 2010-11-22 + +* Mon Nov 01 2010 Michal Hlavinka <mhlavink@redhat.com> - 20101026-1 +- ksh updated to 2010-10-26 + +* Tue Oct 12 2010 Michal Hlavinka <mhlavink@redhat.com> - 20101010-1 +- ksh updated to 2010-10-10 + +* Fri Oct 08 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100924-2 +- disable only known to be broken builtins, let other enabled +- skip regression tests if /dev/fd is missing + +* Tue Sep 28 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100924-1 +- ksh updated to 2010-09-24 + +* Mon Aug 30 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100826-1 +- ksh updated to 2010-08-26 +- make regression test suite usable during package build + +* Fri Aug 13 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100811-1 +- ksh updated to 2010-08-11 + +* Thu Jul 08 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100701-1 +- updated to 2010-07-01 + +* Fri Jun 25 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100621-1 +- updated to 2010-06-21 + +* Tue Jun 15 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100527-2 +- add shcomp for shell compiling + +* Thu Jun 10 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100527-1 +- updated to 2010-05-27 + +* Mon May 31 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100309-6 +- add pathmunge to /etc/kshrc + +* Wed May 05 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100309-5 +- fix rare cd builtin crash (#578582) + +* Wed May 05 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100309-4 +- fix infinite loop when whence builtin is used with -q option (#587127) +- fix stdin for double command substitution (#584007) + +* Mon Mar 29 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100309-3 +- fix typo in last patch + +* Fri Mar 26 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100309-2 +- restore tty settings after timed out read for utf-8 locale + +* Wed Mar 10 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100309-1 +- updated to 2010-03-09 +- fix mock building - detection of /dev/fd/X + +* Mon Jan 04 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100202-1 +- updated to 2010-02-02 + +* Mon Jan 04 2010 Michal Hlavinka <mhlavink@redhat.com> - 20091224-1 +- updated to 2009-12-24 + +* Mon Dec 07 2009 Michal Hlavinka <mhlavink@redhat.com> - 20091206-1 +- updated to 2009-12-06 + +* Fri Dec 04 2009 Michal Hlavinka <mhlavink@redhat.com> - 20091130-1 +- updated to 2009-11-30 + +* Wed Nov 18 2009 Michal Hlavinka <mhlavink@redhat.com> - 20091021-1 +- updated to 2009-10-21 + +* Thu Aug 27 2009 Michal Hlavinka <mhlavink@redhat.com> - 20090630-1 +- updated to 2009-06-30 + +* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20090505-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Mon May 11 2009 Michal Hlavinka <mhalvink@redhat.com> - 20090505-1 +- updated to 2009-05-05 + +* Tue May 05 2009 Michal Hlavinka <mhalvink@redhat.com> - 20090501-1 +- updated to 2009-05-01 + +* Tue Mar 10 2009 Michal Hlavinka <mhlavink@redhat.com> - 20081104-3 +- fix typos in spec file + +* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20081104-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Wed Jan 21 2009 Michal Hlavinka <mhlavink@redhat.com> 20081104-1 +- update to 2008-11-04 +- ast-ksh-locales are not useable remove them + +* Tue Oct 21 2008 Michal Hlavinka <mhlavink@redhat.com> 20080725-4 +- fix #467025 - Ksh fails to initialise environment when login from graphic console + +* Wed Aug 06 2008 Tomas Smetana <tsmetana@redhat.com> 20080725-3 +- fix BuildRequires, rebuild + +* Tue Aug 5 2008 Tom "spot" Callaway <tcallawa@redhat.com> 20080725-2 +- fix license tag + +* Mon Jul 28 2008 Tomas Smetana <tsmetana@redhat.com> 20080725-1 +- new upstream version + +* Thu Jun 26 2008 Tomas Smetana <tsmetana@redhat.com> 20080624-1 +- new upstream version + +* Mon Feb 11 2008 Tomas Smetana <tsmetana@redhat.com> 20080202-1 +- new upstream version + +* Wed Jan 30 2008 Tomas Smetana <tsmetana@redhat.com> 20071105-3 +- fix #430602 - ksh segfaults after unsetting OPTIND + +* Mon Jan 07 2008 Tomas Smetana <tsmetana@redhat.com> 20071105-2 +- fix #405381 - ksh will not handle $(xxx) when typeset -r IFS +- fix #386501 - bad group in spec file + +* Wed Nov 07 2007 Tomas Smetana <tsmetana@redhat.com> 20071105-1 +- new upstream version + +* Wed Aug 22 2007 Tomas Smetana <tsmetana@redhat.com> 20070628-1.1 +- rebuild + +* Thu Jul 12 2007 Tomas Smetana <tsmetana@redhat.com> 20070628-1 +- new upstream version +- fix unaligned access messages (Related: #219420) + +* Tue May 22 2007 Tomas Smetana <tsmetana@redhat.com> 20070328-2 +- fix wrong exit status of spawned process after SIGSTOP +- fix building of debuginfo package, add %%{?dist} to release +- fix handling of SIGTTOU in non-interactive shell +- remove useless builtins + +* Thu Apr 19 2007 Tomas Smetana <tsmetana@redhat.com> 20070328-1 +- new upstream source +- fix login shell invocation (#182397) +- fix memory leak + +* Wed Feb 21 2007 Karsten Hopp <karsten@redhat.com> 20070111-1 +- new upstream version +- fix invalid write in uname function + +* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 20060214-1.1 +- rebuild + +* Thu Jun 01 2006 Karsten Hopp <karsten@redhat.de> 20060214-1 +- new upstream source + +* Mon Feb 27 2006 Karsten Hopp <karsten@redhat.de> 20060124-3 +- PreReq grep, coreutils (#182835) + +* Tue Feb 14 2006 Karsten Hopp <karsten@redhat.de> 20060124-2 +- make it build in chroots (#180561) + +* Mon Feb 13 2006 Karsten Hopp <karsten@redhat.de> 20060124-1 +- version 20060124 + +* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 20050202-5.1 +- bump again for double-long bug on ppc(64) + +* Fri Feb 10 2006 Karsten Hopp <karsten@redhat.de> 20050202-5 +- rebuild + +* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 20050202-4.1 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Thu Feb 02 2006 Karsten Hopp <karsten@redhat.de> 20050202-4 +- fix uname -i output +- fix loop (*-path.patch) +- conflict pdksh instead of obsoleting it + +* Fri Dec 16 2005 Jesse Keating <jkeating@redhat.com> 20050202-3.1 +- rebuilt for new gcj + +* Tue May 10 2005 Karsten Hopp <karsten@redhat.de> 20050202-3 +- enable debuginfo + +* Tue Mar 15 2005 Karsten Hopp <karsten@redhat.de> 20050202-2 +- add /usr/bin/ksh link for compatibility with pdksh scripts (#151134) + +* Wed Mar 02 2005 Karsten Hopp <karsten@redhat.de> 20050202-1 +- update and rebuild with gcc-4 + +* Tue Mar 01 2005 Karsten Hopp <karsten@redhat.de> 20041225-2 +- fix gcc4 build + +* Fri Jan 21 2005 Karsten Hopp <karsten@redhat.de> 20041225-1 +- rebuild with new ksh tarball (license change) + +* Tue Nov 02 2004 Karsten Hopp <karsten@redhat.de> 20040229-11 +- disable ia64 for now + +* Fri Oct 15 2004 Karsten Hopp <karsten@redhat.de> 20040229-9 +- rebuild + +* Thu Sep 02 2004 Nalin Dahyabhai <nalin@redhat.com> 20040229-8 +- remove '&' from summary + +* Thu Sep 02 2004 Bill Nottingham <notting@redhat.com> 20040229-7 +- obsolete pdksh (#131303) + +* Mon Aug 02 2004 Karsten Hopp <karsten@redhat.de> 20040229-6 +- obsolete ksh93, provide ksh93 + +* Mon Jul 05 2004 Karsten Hopp <karsten@redhat.de> 20040229-3 +- add /bin/ksh to /etc/shells + +* Wed Jun 16 2004 Karsten Hopp <karsten@redhat.de> 20040229-2 +- add ppc64 patch to avoid ppc64 dot symbol problem + +* Fri May 28 2004 Karsten Hopp <karsten@redhat.de> 20040229-1 +- initial version + diff --git a/kshcomp.conf b/kshcomp.conf new file mode 100644 index 0000000..8caf5ab --- /dev/null +++ b/kshcomp.conf @@ -0,0 +1 @@ +:kshcomp:M::\x0b\x13\x08::/bin/ksh: diff --git a/kshrc.rhs b/kshrc.rhs new file mode 100644 index 0000000..fd8a14c --- /dev/null +++ b/kshrc.rhs @@ -0,0 +1,53 @@ +# +# /etc/kshrc is sourced in interactive shells. It +# should contain commands to set up aliases, functions, +# options, key bindings, etc. +# + +# Set prompts +#PROMPT='[%n@%m]%~%# ' # default prompt +#RPROMPT=' %~' # prompt for right side of screen + +_src_etc_profile_d() +{ + # from zshrc, with ksh fixes + if [[ ! -o login ]]; then # We're not a login shell + for i in /etc/profile.d/*.sh; do + if [ -r "$i" ]; then + . $i + fi + done + unset i + fi +} + +pathmunge () { +case ":${PATH}:" in +*:"$1":*) + ;; +*) + if [ "$2" = "after" ]; then + PATH=$PATH:$1 + else + PATH=$1:$PATH + fi +esac +} + +_src_etc_profile_d + +unset -f _src_etc_profile_d +unset -f pathmunge + +# key bindings - make Delete, Home, End,... work +keybd_trap () { + case ${.sh.edchar} in + $'\e[1~') .sh.edchar=$'\001';; # Home = beginning-of-line + $'\e[F') .sh.edchar=$'\005';; # End = end-of-line + $'\e[5~') .sh.edchar=$'\e>';; # PgUp = history-previous + $'\e[6~') .sh.edchar=$'\e<';; # PgDn = history-next + $'\e[3~') .sh.edchar=$'\004';; # Delete = delete-char + esac +} +trap keybd_trap KEYBD + @@ -0,0 +1 @@ +9df9ad8e9023b70c5b7baee2189249a6 ksh-1.0.6.tar.gz |