bsc#1129112

OBS-URL: https://build.opensuse.org/package/show/shells/tcsh?expand=0&rev=75
This commit is contained in:
Dr. Werner Fink 2019-04-09 07:33:31 +00:00 committed by Git OBS Bridge
parent d336f81430
commit cdd610770f
5 changed files with 96 additions and 15 deletions

View File

@ -444,6 +444,8 @@ skip_mh:
complete acroread 'p/*/f:*.{pdf,fdf,PDF,FDF}/' complete acroread 'p/*/f:*.{pdf,fdf,PDF,FDF}/'
complete xpdf 'p/*/f:*.{pdf,fdf,PDF,FDF}/' complete xpdf 'p/*/f:*.{pdf,fdf,PDF,FDF}/'
complete kpdf 'p/*/f:*.{pdf,fdf,PDF,FDF}/' complete kpdf 'p/*/f:*.{pdf,fdf,PDF,FDF}/'
complete qpdf 'p/*/f:*.{pdf,fdf,PDF,FDF}/'
complete evince 'p/*/f:*.{pdf,fdf,PDF,FDF}/'
complete apachectl 'c/*/(start stop restart fullstatus status graceful \ complete apachectl 'c/*/(start stop restart fullstatus status graceful \
configtest help)/' configtest help)/'
complete appletviewer 'p/*/f:*.class/' complete appletviewer 'p/*/f:*.class/'

View File

@ -0,0 +1,54 @@
https://bugs.astron.com/view.php?id=74#c3238
Avoid trouble with e.g.
alias postcmd false
set counter=1
while ($counter > )
@ counter--
echo $counter
end
and similar scriptlets, maybe there is a better solution to
protect dowhile(), nevertheless this works.
---
tcsh-6.20.00/sh.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
--- tcsh-6.20.00/sh.c 2017-07-19 12:29:15.512471750 +0200
+++ tcsh-6.20.00/sh.c 2019-04-08 13:35:32.462771640 +0200
@@ -2028,6 +2028,7 @@ process(int catch)
getexit(osetexit);
omark = cleanup_push_mark();
for (;;) {
+ const struct wordent *p;
struct command *t;
int hadhist, old_pintr_disabled;
@@ -2178,7 +2179,9 @@ process(int catch)
/*
* Parse the words of the input into a parse tree.
*/
- t = syntax(paraml.next, &paraml, 0);
+ p = paraml.next;
+ t = syntax(p, &paraml, 0);
+
/*
* We cannot cleanup push here, because cd /blah; echo foo
* would rewind t on the chdir error, and free the rest of the command
@@ -2188,7 +2191,13 @@ process(int catch)
stderror(ERR_OLD);
}
- postcmd();
+ /*
+ * The potential aliasrun() might destroy the parse tree,
+ * that is that the dowhile() would be never reached again.
+ */
+ if (srchx(p->word) != TC_WHILE)
+ postcmd();
+
/*
* Execute the parse tree From: Michael Schroeder
* <mlschroe@immd4.informatik.uni-erlangen.de> was execute(t, tpgrp);

View File

@ -1,18 +1,19 @@
--- ---
config/linux | 10 ++++++++++ config/linux | 10 ++++++++++
config_f.h | 11 ++++++++--- config_f.h | 11 ++++++++---
configure | 2 +- configure | 2 +-
configure.ac | 2 +- configure.ac | 2 +-
glob.h | 3 ++- glob.h | 3 ++-
pathnames.h | 2 +- pathnames.h | 2 +-
sh.c | 3 +++ sh.c | 3 +++
tc.alloc.c | 10 ++++++---- tc.alloc.c | 10 ++++++----
tc.func.c | 8 ++++++-- tc.func.c | 8 ++++++--
tc.str.c | 2 +- tc.str.c | 2 +-
tc.who.c | 3 +++ tc.who.c | 3 +++
tcsh.man | 2 +- tcsh.man | 2 +-
tw.h | 4 ++++ tw.h | 4 ++++
13 files changed, 47 insertions(+), 15 deletions(-) tests/lexical.at | 4 ++--
14 files changed, 49 insertions(+), 17 deletions(-)
--- config/linux --- config/linux
+++ config/linux 2016-11-25 09:07:12.893851835 +0000 +++ config/linux 2016-11-25 09:07:12.893851835 +0000
@ -250,3 +251,18 @@
#define TW_PATH 0x1000 #define TW_PATH 0x1000
#define TW_ZERO 0x0fff #define TW_ZERO 0x0fff
--- tests/lexical.at
+++ tests/lexical.at 2019-04-08 14:27:27.452829093 +0200
@@ -567,10 +567,10 @@ run=3
]])
AT_DATA([uniformity_test.csh],
[[
-set SERVICE_NAME_LOG = `cat batchsystem.properties | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[:blank:]*\([^$]*\)$/\1/p' | perl -pe 's/\s//g' | perl -pe 's/\)/\\\)/g' | perl -pe 's/\(/\\\(/g'`
+set SERVICE_NAME_LOG = `cat batchsystem.properties | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[[:blank:]]*\([^$]*\)$/\1/p' | perl -pe 's/\s//g' | perl -pe 's/\)/\\\)/g' | perl -pe 's/\(/\\\(/g'`
echo -n "$SERVICE_NAME_LOG" > ./output1
-cat batchsystem.properties | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[:blank:]*\([^$]*\)$/\1/p' | perl -pe 's/\s//g' | perl -pe 's/\)/\\\)/g' | perl -pe 's/\(/\\\(/g' > ./output2
+cat batchsystem.properties | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[[:blank:]]*\([^$]*\)$/\1/p' | perl -pe 's/\s//g' | perl -pe 's/\)/\\\)/g' | perl -pe 's/\(/\\\(/g' > ./output2
diff -uprN ./output1 ./output2 >& /dev/null

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Apr 9 07:26:37 UTC 2019 - Dr. Werner Fink <werner@suse.de>
- Add patch tcsh-6.20.00-postcmd.patch as workaround for bsc#1129112
- Modify tcsh-6.20.00.dif to fix sed syntax for test case lexical.at
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jul 19 10:25:40 UTC 2017 - werner@suse.de Wed Jul 19 10:25:40 UTC 2017 - werner@suse.de

View File

@ -1,7 +1,7 @@
# #
# spec file for package tcsh # spec file for package tcsh
# #
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -47,6 +47,8 @@ Patch14: tcsh-6.20.00-8bit-cmdkeys.patch
Patch15: tcsh-closem.patch Patch15: tcsh-closem.patch
# PATCH-FIX-SUSE Aoid dot locking as patch 9 and 11 do the job better # PATCH-FIX-SUSE Aoid dot locking as patch 9 and 11 do the job better
Patch16: tcsh-6.20.00-avoid-dotlock-for-fcntl.patch Patch16: tcsh-6.20.00-avoid-dotlock-for-fcntl.patch
# PATCH-FIX-SUSE Do not destroy parse tree due set postcmd alias
Patch17: tcsh-6.20.00-postcmd.patch
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: ncurses-devel BuildRequires: ncurses-devel
@ -80,6 +82,7 @@ correction, a history mechanism, job control, and a C-like syntax.
%patch14 -p0 -b .8bit %patch14 -p0 -b .8bit
%patch15 -p0 -b .nss %patch15 -p0 -b .nss
%patch16 -p0 -b .nodtlck %patch16 -p0 -b .nodtlck
%patch17 -p1 -b .postcmd
%patch0 -b .0 %patch0 -b .0
%build %build