From 6c316bd9dced4ffd66cd160b749740fc133d4fc4 Mon Sep 17 00:00:00 2001 From: anolis-bot Date: Thu, 15 Sep 2022 17:32:31 +0800 Subject: [PATCH 1/2] update to ksh-20120801-255.el8_6 Signed-off-by: anolis-bot --- dist | 1 + download | 0 ksh-20120801-signal-bubbling.patch | 12 ++++++++++++ ksh.spec | 23 ++++++++--------------- 4 files changed, 21 insertions(+), 15 deletions(-) create mode 100644 dist create mode 100644 download create mode 100644 ksh-20120801-signal-bubbling.patch diff --git a/dist b/dist new file mode 100644 index 0000000..0ee7539 --- /dev/null +++ b/dist @@ -0,0 +1 @@ +an8_6 diff --git a/download b/download new file mode 100644 index 0000000..e69de29 diff --git a/ksh-20120801-signal-bubbling.patch b/ksh-20120801-signal-bubbling.patch new file mode 100644 index 0000000..80c3eb0 --- /dev/null +++ b/ksh-20120801-signal-bubbling.patch @@ -0,0 +1,12 @@ +diff --git a/src/cmd/ksh93/sh/xec.c b/src/cmd/ksh93/sh/xec.c +--- a/src/cmd/ksh93/sh/xec.c ++++ b/src/cmd/ksh93/sh/xec.c +@@ -3529,7 +3529,7 @@ int sh_funscope(int argn, char *argv[],int(*fun)(void*),void *arg,int execflg) + } + if(jmpval) + r=shp->exitval; +- if(r>SH_EXITSIG && ((r&SH_EXITMASK)==SIGINT || ((r&SH_EXITMASK)==SIGQUIT))) ++ if(r>SH_EXITSIG && ((r&SH_EXITMASK)==SIGINT || ((r&SH_EXITMASK)==SIGQUIT) || (getenv("_AST_KSH_SIGNAL_BUBBLE")))) + kill(getpid(),r&SH_EXITMASK); + if(jmpval > SH_JMPFUN) + { diff --git a/ksh.spec b/ksh.spec index ca48554..60d9709 100644 --- a/ksh.spec +++ b/ksh.spec @@ -1,4 +1,3 @@ -%define anolis_release .0.1 %global releasedate 20120801 %global release_date %{lua:reldate=rpm.expand("%{releasedate}");print(("%s-%s-%s"):format(reldate:sub(0,4),reldate:sub(5,6),reldate:sub(7)))} @@ -7,7 +6,7 @@ Summary: The Original ATT Korn Shell URL: http://www.kornshell.com/ License: EPL Version: %{releasedate} -Release: 254%{anolis_release}%{?dist} +Release: 255%{?dist} Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{release_date}.tgz Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{release_date}.tgz Source2: kshcomp.conf @@ -218,6 +217,9 @@ Patch88: ksh-20120801-annocheck.patch # rhbz#1790547 Patch89: ksh-20120801-cve-2019-14868.patch +# rhbz#2109589 +Patch90: ksh-20120801-signal-bubbling.patch + Conflicts: pdksh Requires: coreutils, diffutils, chkconfig BuildRequires: bison @@ -235,14 +237,6 @@ AT&T Bell Laboratories. KornShell is a shell programming language, which is upward compatible with "sh" (the Bourne Shell). -%package doc -Summary: Documents for %{name} -BuildArch: noarch -Requires: %{name} = %{version}-%{release} - -%description doc -Doc pages for %{name}. - %prep %autosetup -N -c %autosetup -N -T -D -a 1 @@ -365,6 +359,7 @@ else fi %files +%doc src/cmd/ksh93/COMPATIBILITY src/cmd/ksh93/RELEASE src/cmd/ksh93/TYPES # LICENSE file is missing, temporarily? %{_bindir}/ksh93 %ghost %{_bindir}/ksh @@ -376,12 +371,10 @@ fi %config(noreplace) %{_sysconfdir}/kshrc %config(noreplace) %{_sysconfdir}/binfmt.d/kshcomp.conf -%files doc -%doc src/cmd/ksh93/COMPATIBILITY src/cmd/ksh93/RELEASE src/cmd/ksh93/TYPES - %changelog -* Tue Jul 19 2022 Bo Ren - 20120801-254.0.1 -- Add doc sub package +* Thu Jul 21 2022 Vincent Mihalkovic - 20120801-255 +- Do not evaluate arithmetic expressions from environment variables at startup + Resolves: #2109589 * Thu Feb 06 2020 Siteshwar Vashisht - 20120801-254 - Bump version number to avoid breaking upgrade path -- Gitee From a51877dc1ea82c33b43b58990d4b500a93e9a5d6 Mon Sep 17 00:00:00 2001 From: Bo Ren Date: Tue, 19 Jul 2022 14:12:11 +0800 Subject: [PATCH 2/2] spec: add doc sub package Signed-off-by: Bo Ren --- ksh.spec | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/ksh.spec b/ksh.spec index 60d9709..a1c1a46 100644 --- a/ksh.spec +++ b/ksh.spec @@ -1,3 +1,4 @@ +%define anolis_release .0.1 %global releasedate 20120801 %global release_date %{lua:reldate=rpm.expand("%{releasedate}");print(("%s-%s-%s"):format(reldate:sub(0,4),reldate:sub(5,6),reldate:sub(7)))} @@ -6,7 +7,7 @@ Summary: The Original ATT Korn Shell URL: http://www.kornshell.com/ License: EPL Version: %{releasedate} -Release: 255%{?dist} +Release: 255%{anolis_release}%{?dist} Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{release_date}.tgz Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{release_date}.tgz Source2: kshcomp.conf @@ -237,6 +238,14 @@ AT&T Bell Laboratories. KornShell is a shell programming language, which is upward compatible with "sh" (the Bourne Shell). +%package doc +Summary: Documents for %{name} +BuildArch: noarch +Requires: %{name} = %{version}-%{release} + +%description doc +Doc pages for %{name}. + %prep %autosetup -N -c %autosetup -N -T -D -a 1 @@ -359,7 +368,6 @@ else fi %files -%doc src/cmd/ksh93/COMPATIBILITY src/cmd/ksh93/RELEASE src/cmd/ksh93/TYPES # LICENSE file is missing, temporarily? %{_bindir}/ksh93 %ghost %{_bindir}/ksh @@ -371,7 +379,13 @@ fi %config(noreplace) %{_sysconfdir}/kshrc %config(noreplace) %{_sysconfdir}/binfmt.d/kshcomp.conf +%files doc +%doc src/cmd/ksh93/COMPATIBILITY src/cmd/ksh93/RELEASE src/cmd/ksh93/TYPES + %changelog +* Fri Sep 16 2022 Bo Ren - 20120801-255.0.1 +- Add doc sub package + * Thu Jul 21 2022 Vincent Mihalkovic - 20120801-255 - Do not evaluate arithmetic expressions from environment variables at startup Resolves: #2109589 -- Gitee