From e66f94fd3f8fcbcb5810befad62ccadf69242bdc Mon Sep 17 00:00:00 2001 From: "David Kaspar [Dee'Kej]" Date: Tue, 26 Apr 2016 17:54:31 +0200 Subject: [PATCH] Mark 'tcsh_posix_status' variable as deprecated 'tcsh_posix_status' is a downstream variable not accepted by upstream. 'anyerror' variable was introduced by upstream instead. This patch keeps the 'tcsh_posix_status', but displays a warning to user that this variable is deprecated and its support will be removed in Fedora 25. --- ...6.19.00-tcsh_posix_status-deprecated.patch | 75 ++++++++++--------- tcsh.spec | 10 ++- 2 files changed, 48 insertions(+), 37 deletions(-) rename tcsh-6.18.01-introduce-tcsh_posix_status.patch => tcsh-6.19.00-tcsh_posix_status-deprecated.patch (69%) diff --git a/tcsh-6.18.01-introduce-tcsh_posix_status.patch b/tcsh-6.19.00-tcsh_posix_status-deprecated.patch similarity index 69% rename from tcsh-6.18.01-introduce-tcsh_posix_status.patch rename to tcsh-6.19.00-tcsh_posix_status-deprecated.patch index d91e80e..8fb33cf 100644 --- a/tcsh-6.18.01-introduce-tcsh_posix_status.patch +++ b/tcsh-6.19.00-tcsh_posix_status-deprecated.patch @@ -1,33 +1,16 @@ -From 5f012d155159b96f2a458ba047085cb1b348befc Mon Sep 17 00:00:00 2001 -From: Pavel Raiskup -Date: Mon, 28 Jul 2014 14:47:33 +0200 -Subject: [PATCH 13/15] downstream: implement variable tcsh_posix_status - -This patch partially reverts the dist-git commit e0b2d458fda4 -because we _don't_ really want drop upstream-supported 'anyerror' -variable. And we can not drop tcsh_posix_status neither, as we -already support that in RHEL5+ downstream. - -So from now, if "!defined(anyerror) || -defined(tcsh_posix_status)", tcsh behaves, with regards to -pipelines, same way as POSIX-like shells. - -Note: This feature is left undocumented intentionaly, just to push people use -the upstream supported $anyerror. - -Resolves: #1129703 -Related: #759132 - -Adjusted for tcsh-6.19.00 by Fridolin Pokorny +From b31ff7ce0ae4b221b54e329e44d4df1e9b337c40 Mon Sep 17 00:00:00 2001 +From: David Kaspar [Dee'Kej] +Date: Tue, 26 Apr 2016 16:58:15 +0200 +Subject: [PATCH] tcsh-6.19.00-tcsh_posix_status-deprecated.patch --- sh.c | 2 ++ sh.h | 1 + sh.proc.c | 2 +- - sh.set.c | 5 +++++ + sh.set.c | 16 ++++++++++++++++ tc.const.c | 2 ++ - tests/variables.at | 28 ++++++++++++++++++++++++++++ - 6 files changed, 39 insertions(+), 1 deletion(-) + tests/variables.at | 31 +++++++++++++++++++++++++++++++ + 6 files changed, 53 insertions(+), 1 deletion(-) diff --git a/sh.c b/sh.c index b760f04..242556a 100644 @@ -42,12 +25,11 @@ index b760f04..242556a 100644 /* Default history size to 100 */ setcopy(STRhistory, str2short("100"), VAR_READWRITE); sethistory(100); - diff --git a/sh.h b/sh.h -index 4e3f13c..74b7719 100644 +index 608fc99..c0a5f0b 100644 --- a/sh.h +++ b/sh.h -@@ -597,6 +597,7 @@ EXTERN int editing IZERO; /* doing filename expansion and line editing */ +@@ -568,6 +568,7 @@ EXTERN int editing IZERO; /* doing filename expansion and line editing */ EXTERN int noediting IZERO; /* initial $term defaulted to noedit */ EXTERN int bslash_quote IZERO;/* PWP: tcsh-style quoting? (in sh.c) */ EXTERN int anyerror IZERO; /* propagate errors from pipelines/backq */ @@ -56,10 +38,10 @@ index 4e3f13c..74b7719 100644 EXTERN int isoutatty IZERO; /* is SHOUT a tty */ EXTERN int isdiagatty IZERO;/* is SHDIAG a tty */ diff --git a/sh.proc.c b/sh.proc.c -index f2356d1..e32ebda 100644 +index ce37c4d..2ffdee0 100644 --- a/sh.proc.c +++ b/sh.proc.c -@@ -560,7 +560,7 @@ pjwait(struct process *pp) +@@ -561,7 +561,7 @@ pjwait(struct process *pp) do { /* In case of pipelines only the result of the last * command should be taken in account */ @@ -69,20 +51,38 @@ index f2356d1..e32ebda 100644 continue; if (fp->p_reason) diff --git a/sh.set.c b/sh.set.c -index 0f98a2b..8d660e0 100644 +index 7498169..090129c 100644 --- a/sh.set.c +++ b/sh.set.c -@@ -109,6 +109,9 @@ update_vars(Char *vp) +@@ -41,6 +41,8 @@ RCSID("$tcsh: sh.set.c,v 3.86 2014/10/28 18:40:46 christos Exp $") + #include + #endif + ++#include ++ + extern int GotTermCaps; + int numeof = 0; + +@@ -109,6 +111,18 @@ update_vars(Char *vp) else if (eq(vp, STRanyerror)) { anyerror = 1; } + else if (eq(vp, STRtcsh_posix_status)) { ++ static error_msg_printed = 0; ++ ++ if (error_msg_printed == 0) { ++ fprintf(stderr, "tcsh: Warning: 'tcsh_posix_status' variable is" ++ " deprecated and will be removed in Fedora 25\n" ++ "tcsh: Note: Use 'anyerror' variable instead\n"); ++ error_msg_printed = 1; ++ } ++ + tcsh_posix_status = 1; + } else if (eq(vp, STRsymlinks)) { Char *pn = varval(vp); -@@ -768,6 +771,8 @@ unset(Char **v, struct command *c) +@@ -774,6 +788,8 @@ unset(Char **v, struct command *c) loginsh = 0; if (adrof(STRanyerror) == 0) anyerror = 0; @@ -92,7 +92,7 @@ index 0f98a2b..8d660e0 100644 word_chars = STR_WORD_CHARS; if (adrof(STRedit) == 0) diff --git a/tc.const.c b/tc.const.c -index 641e234..d942542 100644 +index e71d2ae..f383714 100644 --- a/tc.const.c +++ b/tc.const.c @@ -44,6 +44,8 @@ Char STRrootdefautologout[] = { '1', '5', '\0' }; @@ -105,10 +105,10 @@ index 641e234..d942542 100644 Char STRaout[] = { 'a', '.', 'o', 'u', 't', '\0' }; Char STRtty[] = { 't', 't', 'y', '\0' }; diff --git a/tests/variables.at b/tests/variables.at -index 424e4da..f270e59 100644 +index fabe7ab..9b2376e 100644 --- a/tests/variables.at +++ b/tests/variables.at -@@ -937,6 +937,34 @@ AT_CHECK([tcsh -f -c 'echo $?tcsh'], , +@@ -970,6 +970,37 @@ AT_CHECK([tcsh -f -c 'echo $?tcsh'], , AT_CLEANUP @@ -135,6 +135,9 @@ index 424e4da..f270e59 100644 +0 +0 +1 ++], ++[tcsh: Warning: 'tcsh_posix_status' variable is deprecated and will be removed in Fedora 25 ++tcsh: Note: Use 'anyerror' variable instead +]) + +AT_CLEANUP @@ -144,5 +147,5 @@ index 424e4da..f270e59 100644 AT_DATA([term.csh], -- -1.9.3 +2.5.5 diff --git a/tcsh.spec b/tcsh.spec index e4e9306..85fe773 100644 --- a/tcsh.spec +++ b/tcsh.spec @@ -35,10 +35,14 @@ Source: ftp://ftp.astron.com/pub/tcsh/%{name}-%{version}.tar.gz Patch4: tcsh-6.15.00-hist-sub.patch Patch9: tcsh-6.13.00-memoryuse.patch Patch11: tcsh-6.14.00-order.patch -Patch36: tcsh-6.18.01-introduce-tcsh_posix_status.patch # Proposed upstream - http://mx.gw.com/pipermail/tcsh-bugs/2015-May/000944.html Patch39: tcsh-6.19.00-gcc5-calloc.patch +# Patches to be removed -- deprecated functionality which shall be removed at +# --------------------- some point in the future: +Patch40: tcsh-6.19.00-tcsh_posix_status-deprecated.patch + +# NOTE: Patch40 should be removed in Fedora 25! %description @@ -149,6 +153,10 @@ fi - Drop tcsh-6.14.00-syntax.patch - patch not accepted by upstream, breaks other things - Drop tcsh-6.18.01-skip-tty-tests.patch - has been fixed in 6.18.05 upstream version - Drop tcsh-6.18.01-elf-interpreter.patch - patch not working anymore, not accepted by upstream +- Drop tcsh-6.18.01-introduce-tcsh_posix_status.patch - not accepted by upstream, + upstream introduced $anyerror instead +- Add tcsh-6.19.00-tcsh_posix_status-deprecated.patch - temporary patch with warning, + should be removed in F25 * Fri Feb 05 2016 Fedora Release Engineering - 6.19.00-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild