Compare commits

...

11 Commits

Author SHA1 Message Date
openeuler-ci-bot
beb0f45f70 !13 Revise Source0
From: @zou_lin77
Reviewed-by: @overweight
Signed-off-by: @overweight
2020-12-10 15:39:15 +08:00
zou_lin77
f7f55790eb Revise Source0 2020-12-09 20:38:07 +08:00
openeuler-ci-bot
fe75c8e80c !9 fix nice case fail if noroot
From: @wangchen2020
Reviewed-by: @overweight
Signed-off-by: @overweight
2020-11-27 17:24:26 +08:00
wangchen2020
1376bca509 fix nice case fail if noroot 2020-11-27 15:44:40 +08:00
openeuler-ci-bot
106891bcc2 !7 update version to 6.22.02
Merge pull request !7 from 杨壮壮/openEuler-20.03-LTS
2020-08-05 14:30:30 +08:00
yang_zhuang_zhuang
815c334619 update version to 6.22.02 2020-08-04 16:04:42 +08:00
openeuler-ci-bot
200cf3ad25 !3 修复root用户make check失败问题
Merge pull request !3 from lubing6/next
2020-03-21 22:10:26 +08:00
lubing6
5f39484adb fix testcase fail if noroot 2020-03-21 21:02:17 +08:00
openeuler-ci-bot
5554cb89f8 !2 tcsh
Merge pull request !2 from syyhao/init
2020-03-21 20:12:43 +08:00
openeuler-basic
6d30cbb50d add build requires of gdb 2020-03-21 14:37:25 +08:00
openeuler-ci-bot
03ba6b870c !1 tcsh
Merge pull request !1 from syyhao/init
2020-01-09 09:52:04 +08:00
7 changed files with 271 additions and 128 deletions

View File

@ -1,95 +0,0 @@
From 4679bde3e1ceca63d6eb4de5ce41c996405e61aa Mon Sep 17 00:00:00 2001
From: Christos Zoulas <christos@zoulas.com>
Date: Mon, 29 Jul 2019 09:03:40 -0400
Subject: [PATCH 48/58] PR/81: oldping: Fix range matching issue where we were
comparing with the range character instead of the start of range.
---
glob.c | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/glob.c b/glob.c
index c2bc95f..dbdfa1e 100644
--- a/glob.c
+++ b/glob.c
@@ -100,7 +100,7 @@ static int Lstat (const char *, struct stat *);
static int Stat (const char *, struct stat *sb);
static Char *Strchr (Char *, int);
#ifdef DEBUG
-static void qprintf (const Char *);
+static void qprintf (const char *, const Char *);
#endif
#define DOLLAR '$'
@@ -254,19 +254,20 @@ Strchr(Char *str, int ch)
#ifdef DEBUG
static void
-qprintf(const Char *s)
+qprintf(const char *pre, const Char *s)
{
const Char *p;
-
+
+ xprintf("%s", pre);
for (p = s; *p; p++)
- printf("%c", *p & 0xff);
- printf("\n");
+ xprintf("%c", *p & 0xff);
+ xprintf("\n%s", pre);
for (p = s; *p; p++)
- printf("%c", *p & M_PROTECT ? '"' : ' ');
- printf("\n");
+ xprintf("%c", *p & M_PROTECT ? '"' : ' ');
+ xprintf("\n%s", pre);
for (p = s; *p; p++)
- printf("%c", *p & M_META ? '_' : ' ');
- printf("\n");
+ xprintf("%c", *p & M_META ? '_' : ' ');
+ xprintf("\n");
}
#endif /* DEBUG */
@@ -410,7 +411,7 @@ glob(const char *pattern, int flags, int (*errfunc) (const char *, int),
}
*bufnext = EOS;
#ifdef DEBUG
- qprintf(patbuf);
+ qprintf("patbuf=", patbuf);
#endif
if ((err = glob1(patbuf, pglob, no_match)) != 0) {
@@ -707,7 +708,7 @@ match(const char *name, const Char *pat, const Char *patend, int m_not)
while (pat < patend || *name) {
size_t lwk, pwk;
- __Char wc, wk;
+ __Char wc, wk, wc1;
c = *pat; /* Only for M_MASK bits */
if (*name == EOS)
@@ -742,18 +743,20 @@ match(const char *name, const Char *pat, const Char *patend, int m_not)
pat += pwk;
pwk = One_Char_mbtowc(&wc, pat, MB_LEN_MAX);
}
+ wc1 = wc;
while ((*pat & M_MASK) != M_END) {
if ((*pat & M_MASK) == M_RNG) {
__Char wc2;
pat += pwk;
pwk = One_Char_mbtowc(&wc2, pat, MB_LEN_MAX);
- if (globcharcoll(wc, wk, 0) <= 0 &&
+ if (globcharcoll(wc1, wk, 0) <= 0 &&
globcharcoll(wk, wc2, 0) <= 0)
ok = 1;
} else if (wc == wk)
ok = 1;
pat += pwk;
+ wc1 = wc;
pwk = One_Char_mbtowc(&wc, pat, MB_LEN_MAX);
}
pat += pwk;
--
1.8.3.1

View File

@ -1,28 +0,0 @@
From 51f7c9361de62d7106eafc6cb0c33cc6701de9e2 Mon Sep 17 00:00:00 2001
From: Christos Zoulas <christos@zoulas.com>
Date: Thu, 1 Aug 2019 10:28:50 -0400
Subject: [PATCH 50/58] PR/88: sharifib: Preserve empty arguments in arrays as
quoted NUL's
---
sh.lex.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sh.lex.c b/sh.lex.c
index b879a1d..2893768 100644
--- a/sh.lex.c
+++ b/sh.lex.c
@@ -1020,8 +1020,10 @@ domod(Char *cp, Char type)
switch (type) {
- case 'x':
case 'q':
+ case 'x':
+ if (*cp == '\0')
+ return Strsave(STRQNULL);
wp = Strsave(cp);
for (xp = wp; (c = *xp) != 0; xp++)
if ((c != ' ' && c != '\t') || type == 'q')
--
1.8.3.1

View File

@ -0,0 +1,24 @@
From 1c74ba6a5332e5f9dfb6eb893fbd1d59ee5e15ec Mon Sep 17 00:00:00 2001
From: openEuler Buildteam <buildteam@openeuler.org>
Date: Mon, 29 Jun 2020 20:12:56 +0800
Subject: [PATCH] fix nice case fail if noroot
---
tests/commands.at | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/commands.at b/tests/commands.at
index cf0fcf0..daf87fc 100755
--- a/tests/commands.at
+++ b/tests/commands.at
@@ -891,6 +891,7 @@ TCSH_UNTESTED([newgrp])
AT_SETUP([nice])
+AT_SKIP_IF([test 'whoami' != 'root'])
# Nothing really tested
AT_CHECK([tcsh -f -c 'nice set var=1; echo $?var'], ,
--
1.8.3.1

View File

@ -0,0 +1,212 @@
From f4cae8a433a3744f6d3a6d895ef06631c0a656ec Mon Sep 17 00:00:00 2001
From: lubing6 <lubing6@huawei.com>
Date: Sat, 21 Mar 2020 20:52:01 +0800
Subject: [PATCH] fix testcase fail if noroot
---
tests/arguments.at | 2 ++
tests/commands.at | 5 +++++
tests/expr.at | 1 +
tests/lexical.at | 4 ++++
tests/variables.at | 10 ++++++++++
5 files changed, 22 insertions(+)
diff --git a/tests/arguments.at b/tests/arguments.at
index 562fd83..8cd8673 100755
--- a/tests/arguments.at
+++ b/tests/arguments.at
@@ -47,6 +47,7 @@ TCSH_UNTESTED([-f])
AT_SETUP([-i])
+AT_SKIP_IF([test `whoami` == 'root' ])
AT_CHECK([echo 'echo $1' | tcsh -f -q -i foo], ,
[[> foo
@@ -143,6 +144,7 @@ AT_CLEANUP
AT_SETUP([non-option arguments])
+AT_SKIP_IF([test `whoami` == 'root' ])
AT_DATA([options.csh],
[[echo $0
diff --git a/tests/commands.at b/tests/commands.at
index cf0fcf0..e0532d3 100755
--- a/tests/commands.at
+++ b/tests/commands.at
@@ -267,6 +267,7 @@ AT_CLEANUP
AT_SETUP([dirs])
+AT_SKIP_IF([test `whoami` != 'root' ])
AT_DATA([dirs.csh],
[[set current=`/bin/pwd`
@@ -379,6 +380,7 @@ TCSH_UNTESTED([fg])
AT_SETUP([filetest])
+AT_SKIP_IF([test `whoami` == 'root' ])
touch file1 file2
chmod 6777 file1
@@ -561,6 +563,7 @@ TCSH_UNTESTED([hashstat])
AT_SETUP([history])
+AT_SKIP_IF([test `whoami` == 'root' ])
AT_DATA([history.csh],
[[: cmd 1
@@ -776,6 +779,7 @@ TCSH_UNTESTED([jobs])
AT_SETUP([kill])
+AT_SKIP_IF([test `whoami` == 'root' ])
# Nested to ensure consistent output
AT_DATA([kill.csh],
@@ -1201,6 +1205,7 @@ AT_CLEANUP
AT_SETUP([source])
+AT_SKIP_IF([test `whoami` == 'root' ])
AT_DATA([script.csh],
[[set var=$1
diff --git a/tests/expr.at b/tests/expr.at
index fa373c8..d9e0a1d 100755
--- a/tests/expr.at
+++ b/tests/expr.at
@@ -74,6 +74,7 @@ AT_CLEANUP
AT_SETUP([Primary expressions])
+AT_SKIP_IF([test `whoami` == 'root' ])
AT_CHECK([tcsh -f -c 'set parseoctal; exit (010)'], 8)
AT_CHECK([tcsh -f -c 'exit (010)'], 10)
diff --git a/tests/lexical.at b/tests/lexical.at
index 3dc6024..d1ec788 100755
--- a/tests/lexical.at
+++ b/tests/lexical.at
@@ -153,6 +153,7 @@ AT_CLEANUP
AT_SETUP([History basics])
+AT_SKIP_IF([test `whoami` == 'root' ])
# Printing prompt only when at end of input is rather nondeterministic...
AT_DATA([basic.csh],
@@ -203,6 +204,7 @@ AT_CLEANUP
AT_SETUP([Event specification])
+AT_SKIP_IF([test `whoami` == 'root' ])
AT_DATA([positive.csh],
[[echo 1
@@ -345,6 +347,7 @@ AT_CLEANUP
AT_SETUP([Word selection])
+AT_SKIP_IF([test `whoami` == 'root' ])
AT_DATA([words.csh],
[[echo 1 2 3 4 5
@@ -394,6 +397,7 @@ AT_CLEANUP
AT_SETUP([History modifiers])
+AT_SKIP_IF([test `whoami` == 'root' ])
AT_DATA([modifiers.csh],
[[echo foo bar baz quux /usr/src/sys/sys/malloc.c
diff --git a/tests/variables.at b/tests/variables.at
index ffa0da2..ad1f7d9 100755
--- a/tests/variables.at
+++ b/tests/variables.at
@@ -355,6 +355,7 @@ AT_CLEANUP
AT_SETUP([$ ellipsis])
+AT_SKIP_IF([test `whoami` == 'root' ])
AT_DATA([ellipsis0.csh],
[[echo $?ellipsis
@@ -414,6 +415,7 @@ AT_CLEANUP
AT_SETUP([$ histchars])
+AT_SKIP_IF([test `whoami` == 'root' ])
AT_DATA([histchars.csh],
[[echo $?histchars
@@ -437,6 +439,7 @@ AT_CLEANUP
AT_SETUP([$ histdup])
+AT_SKIP_IF([test `whoami` == 'root' ])
AT_DATA([histdup.csh],
[[echo $?histdup
@@ -494,6 +497,7 @@ VAR_UNSET([histfile])
AT_SETUP([$ histlit])
+AT_SKIP_IF([test `whoami` == 'root' ])
AT_DATA([histlit.csh],
[[echo $?histlit
@@ -560,6 +564,7 @@ AT_CLEANUP
AT_SETUP([$ history])
+AT_SKIP_IF([test `whoami` == 'root' ])
AT_DATA([history.csh],
[[echo $#history $history
@@ -606,6 +611,7 @@ VAR_UNSET([ignoreeof])
AT_SETUP([$ implicitcd])
+AT_SKIP_IF([test `whoami` == 'root' ])
AT_DATA([implicitcd.csh],
[[echo $?implicitcd
@@ -798,6 +804,7 @@ AT_CLEANUP
AT_SETUP([$ prompt])
+AT_SKIP_IF([test `whoami` == 'root' ])
AT_DATA([prompt.csh],
[[echo "$prompt"
@@ -834,6 +841,7 @@ AT_CHECK([echo 'echo "$prompt3"' | tcsh -f], ,
AT_CLEANUP
AT_SETUP([$ promptchars])
+AT_SKIP_IF([test `whoami` == 'root' ])
AT_DATA([promptchars.csh],
[[echo $?promptchars
@@ -855,6 +863,7 @@ VAR_UNSET([rmstar])
AT_SETUP([$ rprompt])
+AT_SKIP_IF([test `whoami` == 'root' ])
AT_DATA([rprompt.csh],
[[echo $?rprompt
@@ -1050,6 +1059,7 @@ AT_CLEANUP
AT_SETUP([$ verbose])
+AT_SKIP_IF([test `whoami` == 'root' ])
AT_CHECK([tcsh -f -v -c 'echo $verbose'], , [
],
--
1.8.3.1

Binary file not shown.

BIN
tcsh-6.22.02.tar.gz Normal file

Binary file not shown.

View File

@ -1,19 +1,19 @@
Name: tcsh
Version: 6.21.00
Version: 6.22.02
Release: 3
Summary: C shell with file name completion and command line editing
License: BSD
URL: http://www.tcsh.org/
Source0: http://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/%{name}/%{name}-%{version}.tar.gz
Source0: http://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/%{name}/old/%{name}-%{version}.tar.gz
BuildRequires: gettext-devel ncurses-devel autoconf
BuildRequires: gettext-devel ncurses-devel autoconf gdb
Requires(post): coreutils grep
Requires(postun): sed
Provides: /bin/csh /bin/tcsh
Provides: csh = %{version}
Patch6000: 0061-PR-81-oldping-Fix-range-matching-issue-where-we-were.patch
Patch6001: 0063-PR-88-sharifib-Preserve-empty-arguments-in-arrays-as.patch
Patch0: fix-testcase-fail-if-noroot.patch
Patch1: fix-nice-case-fail-if-noroot.patch
%description
Tcsh is an enhanced but completely compatible version of the Berkeley
@ -95,6 +95,36 @@ fi
%changelog
* Wed Dec 9 2020 zoulin <zoulin13@huawei.com> - 6.22.02-3
- Type: enhancement
- ID: NA
- SUG: NA
- DESC: Revise Source0
* Fri Nov 27 2020 wangchen <wangchen137@huawei.com> - 6.22.02-2
- Type: bugfix
- ID: NA
- SUG: NA
- DESC: fix nice case fail if noroot
* Tue Aug 4 2020 yangzhuangzhuang <yangzhuangzhuang1@huawei.com> - 6.22.02-1
- Type: enhancement
- ID: NA
- SUG: NA
- DESC: update version to 6.22.02
* Sat Mar 21 2020 openEuler Buildteam <buildteam@openeuler.org> - 6.21.00-5
- Type: enhancement
- ID: NA
- SUG: NA
- DESC: fix testcase fail if noroot
* Sat Mar 21 2020 openEuler Buildteam <buildteam@openeuler.org> - 6.21.00-4
- Type: enhancement
- ID: NA
- SUG: NA
- DESC: add build requires of gdb
* Wed Jan 8 2020 openEuler Buildteam <buildteam@openeuler.org> - 6.21.00-3
- Type: enhancement
- ID: NA