import OL ksh-1.0.6-7.0.1.el9_6.2

This commit is contained in:
eabdullin 2025-11-05 07:42:35 +00:00
parent 5deccfe311
commit 909cca65ab
2 changed files with 90 additions and 2 deletions

80
SOURCES/RHEL-112564.patch Normal file
View File

@ -0,0 +1,80 @@
From e8554b5131fc32b26a6a0b0ab5cf24839e30161a Mon Sep 17 00:00:00 2001
From: Martijn Dekker <martijn@inlv.org>
Date: Sun, 30 Mar 2025 00:14:35 +0000
Subject: [PATCH] Fix 'stty -echo' in scripts (re: 41ebb55a)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Vincent Mihalkovič (@vmihalko) reports:
> In ksh versions later than v1.0.0-beta.1, setting stty -echo in a
> script no longer works as expected. This issue did not occur in
> earlier versions.
>
> I performed a git bisect between the last known good tag (reboot)
> and the first known bad tag (v1.0.0-beta.1). The regression was
> introduced in commit 41ebb55a.
>
> Reproducer:
> read a
> stty -echo
> read b
>
> Expected Behavior:
> • Input for a should be visible.
> • Input for b should not be echoed to the terminal.
>
> Actual Behavior:
> • Input for a is visible as expected.
> • Input for b is also visible, despite stty -echo being set.
Analysis:
The problem was that the tty_set(-1, 0, NULL) call below, which
invalidates saved terminal attributes, was no longer being executed
when running a script (note that job.jobcontrol is 0/false for
scripts). See edit.c for the tty_set function and what it does.
src/cmd/ksh93/sh/jobs.c
1423: else if(job.jobcontrol)
1424: {
1425: if(pw->p_pid == tcgetpgrp(JOBTTY))
1426: {
...skipped for brevity...
1430: }
1431: tty_set(-1, 0, NULL);
1432: }
So, after running an external command such as stty, terminal
attributes that should have been invalidated were restored upon the
next 'read'. This was undoing the effect of the stty command.
src/cmd/ksh93/sh/jobs.c: job_wait():
- Move the test for job.jobcontrol so that saved terminal
attributes are again invalidated after running an external
command when job control for interactive shells is not active.
Resolves: https://github.com/ksh93/ksh/issues/836
---
src/cmd/ksh93/sh/jobs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/cmd/ksh93/sh/jobs.c b/src/cmd/ksh93/sh/jobs.c
index be333b2..081e73a 100644
--- a/src/cmd/ksh93/sh/jobs.c
+++ b/src/cmd/ksh93/sh/jobs.c
@@ -1492,9 +1492,9 @@ int job_wait(pid_t pid)
kill(sh.current_pid,SIGTSTP);
}
}
- else if(job.jobcontrol)
+ else
{
- if(pw->p_pid == tcgetpgrp(JOBTTY))
+ if(job.jobcontrol && pw->p_pid == tcgetpgrp(JOBTTY))
{
if(pw->p_pgrp==0)
pw->p_pgrp = pw->p_pid;
--
2.47.3

View File

@ -4,7 +4,7 @@ URL: http://www.kornshell.com/
License: EPL-1.0
Epoch: 3
Version: 1.0.6
Release: 7%{?dist}.1
Release: 7.0.1%{?dist}.2
Source0: https://github.com/ksh93/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
Source1: kshcomp.conf
Source2: kshrc.rhs
@ -37,6 +37,7 @@ Patch7: ksh-1.0.11-redir.patch
# upstream commit: https://github.com/ksh93/ksh/commit/96d73c08a2786806f3def1fda66641b81e0af988
Patch8: ksh-1.0.11-ssh-multibyte-long-paste.patch
Patch9: RHEL-112564.patch
Conflicts: pdksh
Requires: coreutils, diffutils
@ -68,7 +69,7 @@ for f in -Wno-unknown-pragmas -Wno-missing-braces -Wno-unused-result -Wno-return
do
$CC $f -E - </dev/null >/dev/null 2>&1 && XTRAFLAGS="$XTRAFLAGS $f"
done
export CCFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing $XTRAFLAGS"
export CCFLAGS="$RPM_OPT_FLAGS $RPM_LD_FLAGS -fno-strict-aliasing $XTRAFLAGS -DSHOPT_AUDIT -D_AST_no_spawnveg=1"
export LDFLAGS="$RPM_LD_FLAGS"
./bin/package make
@ -159,6 +160,13 @@ fi
%config(noreplace) %{_sysconfdir}/binfmt.d/kshcomp.conf
%changelog
* Tue Nov 04 2025 EL Errata <el-errata_ww@oracle.com> - 1.0.6-7.0.1
- Disable _AST_no_spawnveg for taskset workaround [Orabug: 26754277]
* Wed Oct 01 2025 RHEL Packaging Agent <jotnar@redhat.com> - 3:1.0.6-7.2
- Fix 'stty -echo' in scripts
- Resolves: RHEL-112564
* Tue Apr 22 2025 Vincent Mihalkovic <vmihalko@redhat.com> - 3:1.0.6-7
- Fix long multibyte characters paste issue via ssh
Resolves: RHEL-87336