Control: tags 999754 + patch
Control: tags 999754 + pending
Control: tags 1020064 + patch
Control: tags 1020064 + pending

Dear maintainer,

I've prepared an NMU for tcsh (versioned as 6.21.00-1.2) and uploaded
it to DELAYED/2. Please feel free to tell me if I should cancel it.

cu
Adrian
diff -u tcsh-6.21.00/debian/changelog tcsh-6.21.00/debian/changelog
--- tcsh-6.21.00/debian/changelog
+++ tcsh-6.21.00/debian/changelog
@@ -1,3 +1,11 @@
+tcsh (6.21.00-1.2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Add upstream fix for FTBFS with bash 5.2. (Closes: #1020064)
+  * Add upstream fix for range comparison bug. (Closes: #999754)
+
+ -- Adrian Bunk <b...@debian.org>  Sat, 15 Oct 2022 15:43:30 +0300
+
 tcsh (6.21.00-1.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -u tcsh-6.21.00/debian/patches/series tcsh-6.21.00/debian/patches/series
--- tcsh-6.21.00/debian/patches/series
+++ tcsh-6.21.00/debian/patches/series
@@ -7,0 +8,2 @@
+0001-bash-5.2-uses-implicit-exec-for-SHLVL-5-tcsh-which-c.patch
+0001-PR-81-oldping-Fix-range-matching-issue-where-we-were.patch
only in patch2:
unchanged:
--- tcsh-6.21.00.orig/debian/patches/0001-PR-81-oldping-Fix-range-matching-issue-where-we-were.patch
+++ tcsh-6.21.00/debian/patches/0001-PR-81-oldping-Fix-range-matching-issue-where-we-were.patch
@@ -0,0 +1,96 @@
+From 4679bde3e1ceca63d6eb4de5ce41c996405e61aa Mon Sep 17 00:00:00 2001
+From: Christos Zoulas <chris...@zoulas.com>
+Date: Mon, 29 Jul 2019 09:03:40 -0400
+Subject: =?UTF-8?q?PR/81:=20oldping:=20Fix=20range=20matching=20issue=20wh?=
+ =?UTF-8?q?ere=20we=20were=20comparing=20with=20the=0Arange=20character=20?=
+ =?UTF-8?q?instead=20of=20the=20start=20of=20range.?=
+
+---
+ 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;
+-- 
+2.30.2
+
only in patch2:
unchanged:
--- tcsh-6.21.00.orig/debian/patches/0001-bash-5.2-uses-implicit-exec-for-SHLVL-5-tcsh-which-c.patch
+++ tcsh-6.21.00/debian/patches/0001-bash-5.2-uses-implicit-exec-for-SHLVL-5-tcsh-which-c.patch
@@ -0,0 +1,28 @@
+From 391b04ec25b0d046d532d46a7468fa7a759d0115 Mon Sep 17 00:00:00 2001
+From: zoulasc <chris...@zoulas.com>
+Date: Sun, 2 Oct 2022 08:41:50 -0400
+Subject: =?UTF-8?q?bash=205.2=20uses=20implicit=20exec=20for=20"SHLVL=3D5?=
+ =?UTF-8?q?=20tcsh",=20which=20causes=20it=20to=20decrement=0ASHLVL=20befo?=
+ =?UTF-8?q?re=20executing=20tcsh.=20Use=20env=20to=20avoid=20that.=20(Vogt?=
+ =?UTF-8?q?inator=20at=20github)?=
+
+---
+ tests/variables.at | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/variables.at b/tests/variables.at
+index 1e8cc8f..cdd5e21 100644
+--- a/tests/variables.at
++++ b/tests/variables.at
+@@ -964,7 +964,7 @@ tcsh -f -c 'tcsh -f -c "printenv SHLVL"'
+ tcsh -f -c 'exec tcsh -f -c "printenv SHLVL"'
+ tcsh -f -c '(exec tcsh -f -c "printenv SHLVL")'
+ ]])
+-AT_CHECK([SHLVL=5 tcsh -f shlvl.csh], ,
++AT_CHECK([env SHLVL=5 tcsh -f shlvl.csh], ,
+ [6
+ 8
+ 2
+-- 
+2.30.2
+

Reply via email to