Compare commits

..

No commits in common. 'cs10' and 'c9' have entirely different histories.
cs10 ... c9

2
.gitignore vendored

@ -1 +1 @@
SOURCES/tcsh-6.24.10.tar.gz SOURCES/tcsh-6.22.03.tar.gz

@ -1 +1 @@
41f38045b74b59e43ac57bad730679c7d0360d08 SOURCES/tcsh-6.24.10.tar.gz 3d1e4a0087a41350ce81fb1a9a04403c5ffb7e5f SOURCES/tcsh-6.22.03.tar.gz

@ -0,0 +1,26 @@
From 0d6172b290175b667dc2d83528f42b435827fd40 Mon Sep 17 00:00:00 2001
From: "David Kaspar [Dee'Kej]" <dkaspar@redhat.com>
Date: Fri, 29 Apr 2016 16:52:59 +0200
Subject: [PATCH] Inform about no support for 'limit memoryuse' in manpage
This patch has been introduced after request in BZ: #247637
---
tcsh.man | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tcsh.man b/tcsh.man
index 584de6f..f5dc582 100644
--- a/tcsh.man
+++ b/tcsh.man
@@ -3014,6 +3014,8 @@ the size of the largest core dump that will be created
\fImemoryuse\fR
the maximum amount of physical memory a process
may have allocated to it at a given time
+
+NOTE: Changing this value has no effect. Support has been removed from Linux kernel v2.6 and newer.
.TP
\fIvmemoryuse\fR
the maximum amount of virtual memory a process
--
2.7.4

@ -22,14 +22,14 @@ Subject: [PATCH] downstream: implement variable tcsh_posix_status
sh.proc.c | 2 +- sh.proc.c | 2 +-
sh.set.c | 5 +++++ sh.set.c | 5 +++++
tc.const.c | 2 ++ tc.const.c | 2 ++
tests/variables.at | 32 ++++++++++++++++++++++++++++++++ tests/variables.at | 28 ++++++++++++++++++++++++++++
6 files changed, 43 insertions(+), 1 deletion(-) 6 files changed, 39 insertions(+), 1 deletion(-)
diff --git a/sh.c b/sh.c diff --git a/sh.c b/sh.c
index e9dfa81..38d073a 100644 index e9dfa81..38d073a 100644
--- a/sh.c --- a/sh.c
+++ b/sh.c +++ b/sh.c
@@ -356,6 +356,8 @@ main(int argc, char **argv) @@ -357,6 +357,8 @@ main(int argc, char **argv)
anyerror = 1; /* for compatibility */ anyerror = 1; /* for compatibility */
setcopy(STRanyerror, STRNULL, VAR_READWRITE); setcopy(STRanyerror, STRNULL, VAR_READWRITE);
@ -42,7 +42,7 @@ diff --git a/sh.h b/sh.h
index 95f439d..a41e2e0 100644 index 95f439d..a41e2e0 100644
--- a/sh.h --- a/sh.h
+++ b/sh.h +++ b/sh.h
@@ -576,6 +576,7 @@ EXTERN int editing IZERO; /* doing filename expansion and line editing */ @@ -573,6 +573,7 @@ EXTERN int editing IZERO; /* doing filename expansion and line editing */
EXTERN int noediting IZERO; /* initial $term defaulted to noedit */ EXTERN int noediting IZERO; /* initial $term defaulted to noedit */
EXTERN int bslash_quote IZERO;/* PWP: tcsh-style quoting? (in sh.c) */ EXTERN int bslash_quote IZERO;/* PWP: tcsh-style quoting? (in sh.c) */
EXTERN int anyerror IZERO; /* propagate errors from pipelines/backq */ EXTERN int anyerror IZERO; /* propagate errors from pipelines/backq */
@ -54,7 +54,7 @@ diff --git a/sh.proc.c b/sh.proc.c
index 0af5e03..ac6ef5d 100644 index 0af5e03..ac6ef5d 100644
--- a/sh.proc.c --- a/sh.proc.c
+++ b/sh.proc.c +++ b/sh.proc.c
@@ -560,7 +560,7 @@ pjwait(struct process *pp) @@ -564,7 +564,7 @@ pjwait(struct process *pp)
do { do {
/* In case of pipelines only the result of the last /* In case of pipelines only the result of the last
* command should be taken in account */ * command should be taken in account */
@ -67,7 +67,7 @@ diff --git a/sh.set.c b/sh.set.c
index cf831b2..c155619 100644 index cf831b2..c155619 100644
--- a/sh.set.c --- a/sh.set.c
+++ b/sh.set.c +++ b/sh.set.c
@@ -113,6 +113,9 @@ update_vars(Char *vp) @@ -117,6 +117,9 @@ update_vars(Char *vp)
else if (eq(vp, STRanyerror)) { else if (eq(vp, STRanyerror)) {
anyerror = 1; anyerror = 1;
} }
@ -77,7 +77,7 @@ index cf831b2..c155619 100644
else if (eq(vp, STRsymlinks)) { else if (eq(vp, STRsymlinks)) {
Char *pn = varval(vp); Char *pn = varval(vp);
@@ -783,6 +786,8 @@ unset(Char **v, struct command *c) @@ -788,6 +791,8 @@ unset(Char **v, struct command *c)
loginsh = 0; loginsh = 0;
if (adrof(STRanyerror) == 0) if (adrof(STRanyerror) == 0)
anyerror = 0; anyerror = 0;
@ -90,7 +90,7 @@ diff --git a/tc.const.c b/tc.const.c
index cb39ab9..4fed182 100644 index cb39ab9..4fed182 100644
--- a/tc.const.c --- a/tc.const.c
+++ b/tc.const.c +++ b/tc.const.c
@@ -41,6 +41,8 @@ Char STRrootdefautologout[] = { '1', '5', '\0' }; @@ -44,6 +44,8 @@ Char STRrootdefautologout[] = { '1', '5', '\0' };
Char STRautomatic[] = { 'a', 'u', 't', 'o', 'm', 'a', 't', 'i', 'c', Char STRautomatic[] = { 'a', 'u', 't', 'o', 'm', 'a', 't', 'i', 'c',
'\0' }; '\0' };
Char STRanyerror[] = { 'a', 'n', 'y', 'e', 'r', 'r', 'o', 'r', '\0' }; Char STRanyerror[] = { 'a', 'n', 'y', 'e', 'r', 'r', 'o', 'r', '\0' };
@ -103,14 +103,10 @@ diff --git a/tests/variables.at b/tests/variables.at
index ffa0da2..5fa9239 100644 index ffa0da2..5fa9239 100644
--- a/tests/variables.at --- a/tests/variables.at
+++ b/tests/variables.at +++ b/tests/variables.at
@@ -1490,6 +1490,38 @@ AT_CHECK([tcsh -f -c 'echo $?tcsh'], , @@ -976,6 +976,34 @@ AT_CHECK([tcsh -f -c 'echo $?tcsh'], ,
AT_CLEANUP() AT_CLEANUP
+dnl
+dnl $ tcsh_posix_status
+dnl
+
+AT_SETUP([$ tcsh_posix_status]) +AT_SETUP([$ tcsh_posix_status])
+ +
+AT_DATA([exit_status.csh], +AT_DATA([exit_status.csh],
@ -136,12 +132,12 @@ index ffa0da2..5fa9239 100644
+1 +1
+]) +])
+ +
+AT_CLEANUP() +AT_CLEANUP
+ +
+ +
dnl AT_SETUP([$ term])
dnl $ term
dnl AT_DATA([term.csh],
-- --
2.7.4 2.7.4

@ -0,0 +1,70 @@
From 04a68ad191cfcb87cdff70a6b913721e423cd28b Mon Sep 17 00:00:00 2001
From: Christos Zoulas <christos@zoulas.com>
Date: Mon, 23 Aug 2021 08:31:59 -0400
Subject: [PATCH] Fix bug reported by Jan Macku: alias postcmd '/bin/echo
-n "COMMAND:"'"'"'\!#:-$:gx'"'"'' echo 1 2 3 4 5 ^P prints echo 1
2 3 4 Reason: domod() enters junk history entries with event number
HIST_PURGE aliasrun which is used to run postcmd modifies the history
appending those entries. Fix by explicitly cleaning up those entries in
aliasrun
---
sh.decls.h | 1 +
sh.hist.c | 11 +++++++++++
tc.func.c | 2 ++
3 files changed, 14 insertions(+)
diff --git a/sh.decls.h b/sh.decls.h
index e230becd..1ac9716e 100644
--- a/sh.decls.h
+++ b/sh.decls.h
@@ -217,6 +217,7 @@ extern int t_pmatch (const Char *, const Char *,
*/
extern void dohist (Char **, struct command *);
extern struct Hist *enthist (int, struct wordent *, int, int, int);
+extern void cleanhist (void);
extern void savehist (struct wordent *, int);
extern char *fmthist (int, ptr_t);
extern void rechist (Char *, int);
diff --git a/sh.hist.c b/sh.hist.c
index 14d862a3..40660bdc 100644
--- a/sh.hist.c
+++ b/sh.hist.c
@@ -1184,6 +1184,17 @@ dohist(Char **vp, struct command *c)
}
}
+void
+cleanhist(void)
+{
+ struct Hist *hp, *np;
+
+ for (hp = &Histlist; (np = hp->Hnext) != NULL;) {
+ if (np->Hnum != HIST_PURGE)
+ return;
+ hremove(np), hfree(np);
+ }
+}
char *
fmthist(int fmt, ptr_t ptr)
diff --git a/tc.func.c b/tc.func.c
index 9f2b1a29..df4aa7a3 100644
--- a/tc.func.c
+++ b/tc.func.c
@@ -999,6 +999,7 @@ aliasrun(int cnt, Char *s1, Char *s2)
getexit(osetexit);
if (seterr) {
+ cleanhist();
xfree(seterr);
seterr = NULL; /* don't repeatedly print err msg. */
}
@@ -1075,6 +1076,7 @@ aliasrun(int cnt, Char *s1, Char *s2)
}
cleanup_until(&w);
pendjob();
+ cleanhist();
/* Restore status */
setv(STRstatus, putn((tcsh_number_t)status), VAR_READWRITE);
}

@ -0,0 +1,62 @@
From c14852867786c798f98a23d075e76a2e2acce204 Mon Sep 17 00:00:00 2001
From: Christos Zoulas <christos@zoulas.com>
Date: Mon, 23 Aug 2021 08:30:57 -0400
Subject: [PATCH] - Expose HIST_PURGE - Compare pointer against null - Use
initlex()
---
sh.h | 2 ++
sh.lex.c | 6 ++----
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sh.h b/sh.h
index 3c285a9e..77e801c6 100644
--- a/sh.h
+++ b/sh.h
@@ -78,6 +78,7 @@ typedef unsigned long intptr_t;
#if defined(KANJI) && defined(WIDE_STRINGS) && defined(HAVE_NL_LANGINFO) && defined(CODESET)
#define AUTOSET_KANJI
#endif
+
/*
* Sanity
*/
@@ -1027,6 +1028,7 @@ EXTERN struct varent {
* The following are for interfacing redo substitution in
* aliases to the lexical routines.
*/
+#define HIST_PURGE -500000
EXTERN struct wordent *alhistp IZERO_STRUCT;/* Argument list (first) */
EXTERN struct wordent *alhistt IZERO_STRUCT;/* Node after last in arg list */
EXTERN Char **alvec IZERO_STRUCT,
diff --git a/sh.lex.c b/sh.lex.c
index 5b0c6d8d..afe053e5 100644
--- a/sh.lex.c
+++ b/sh.lex.c
@@ -153,8 +153,7 @@ lex(struct wordent *hp)
if (!postcmd_active)
btell(&lineloc);
- hp->next = hp->prev = hp;
- hp->word = STRNULL;
+ initlex(hp);
hadhist = 0;
do
c = readc(0);
@@ -711,7 +710,7 @@ getexcl(Char sc)
lastev = eventno;
hp = gethent(sc);
- if (hp == 0)
+ if (hp == NULL)
return;
hadhist = 1;
dol = 0;
@@ -901,7 +900,6 @@ getsub(struct wordent *en)
* We raise the limit to 50000000
*/
-#define HIST_PURGE -50000000
static struct wordent *
dosub(Char sc, struct wordent *en, int global)
{

@ -1,25 +0,0 @@
From 2a431ea9318111535d37112daeeeccdc4df249ee Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Fri, 13 Jan 2023 09:02:11 +0100
Subject: [PATCH] Inform about no support for 'limit memoryuse' in manpage
Related: #247637
---
tcsh.man.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/tcsh.man.in b/tcsh.man.in
index 24a9629..d405a70 100644
--- a/tcsh.man.in
+++ b/tcsh.man.in
@@ -5960,6 +5960,7 @@ Maximum amount of swap space reserved or used for this user.
Maximum number of threads for this process.
.
.It Ic vmemoryuse
+NOTE: Changing this value has no effect. Support has been removed from Linux kernel v2.6 and newer.
Maximum amount of virtual memory a process
may have allocated to it at a given time (address space).
.
--
2.39.0

@ -12,9 +12,9 @@
Name: tcsh Name: tcsh
Summary: An enhanced version of csh, the C shell Summary: An enhanced version of csh, the C shell
Version: 6.24.10 Version: 6.22.03
Release: 5%{?dist} Release: 6%{?dist}
License: BSD-3-Clause License: BSD
URL: http://www.tcsh.org/ URL: http://www.tcsh.org/
Source: ftp://ftp.astron.com/pub/tcsh/%{name}-%{version}.tar.gz Source: ftp://ftp.astron.com/pub/tcsh/%{name}-%{version}.tar.gz
@ -44,10 +44,13 @@ BuildRequires: ncurses-devel
# Upstream patches -- official upstream patches released by upstream since the # Upstream patches -- official upstream patches released by upstream since the
# ---------------- last rebase that are necessary for any reason: # ---------------- last rebase that are necessary for any reason:
Patch001: tcsh-6.22.03-expose-HIST_PURGE.patch
Patch002: tcsh-6.22.03-dont-corrupt-history-using-modifiers.patch
# Downstream patches -- these should be always included when doing rebase: # Downstream patches -- these should be always included when doing rebase:
# ------------------ # ------------------
Patch100: tcsh-6.24.07-manpage-memoryuse.patch Patch100: tcsh-6.20.00-manpage-memoryuse.patch
# Downstream patches for RHEL -- patches that we keep only in RHEL for various # Downstream patches for RHEL -- patches that we keep only in RHEL for various
@ -177,62 +180,18 @@ fi
# ============================================================================= # =============================================================================
%changelog %changelog
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 6.24.10-5 * Mon Sep 06 2021 Jan Macku <jamacku@redhat.com> - 6.22.03-6
- Bump release for October 2024 mass rebuild: - Modifiers no longer breaks history - rhbz#1997986
Resolves: RHEL-64018
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 6.24.10-4
- Bump release for June 2024 mass rebuild
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.24.10-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 6.24.10-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri May 05 2023 Jan Macku <jamacku@redhat.com> - 6.24.10-1
- Update to tcsh-6.24.10 (#2185572)
* Mon Apr 24 2023 Lukáš Zaoral <lzaoral@redhat.com> - 6.24.07-3
- migrate to SPDX license format
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 6.24.07-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Jan 13 2023 Jan Macku <jamacku@redhat.com> - 6.24.07-1
- Update to tcsh-6.24.07 (#2147466)
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.24.01-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon May 16 2022 Jan Macku <jamacku@redhat.com> - 6.24.01-1
- Update to tcsh-6.24.01 (#2084638)
* Thu Feb 03 2022 Jan Macku <jamacku@redhat.com> - 6.24.00-1
- Update to tcsh-6.24.00 (#2049530)
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.23.02-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Mon Jan 03 2022 Jan Macku <jamacku@redhat.com> - 6.23.02-1
- Update to tcsh-6.23.02 (#2036566)
* Tue Dec 14 2021 Jan Macku <jamacku@redhat.com> - 6.23.01-1
- Update to tcsh-6.23.01 (#2030781)
* Mon Nov 15 2021 Jan Macku <jamacku@redhat.com> - 6.23.00-1
- Update to tcsh-6.23.00 (#2022337)
- Drop tcsh-6.22.04-expose-HIST_PURGE.patch - applied by upstream
- Drop tcsh-6.22.04-modifiers-no-longer-breaks-history.patch - applied by upstream
* Tue Aug 24 2021 Jan Macku <jamacku@redhat.com> - 6.22.04-3 * Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 6.22.03-5
- Fix issue when modifiers breaks history - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.22.04-2 * Mon Jul 26 2021 Siteshwar Vashisht <svashisht@redhat.com> - 6.22.03-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - Bump version number
* Tue Apr 27 2021 Jan Macku <jamacku@redhat.com> - 6.22.04-1 * Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 6.22.03-3
- Update to tcsh-6.22.04 (#1953702) - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.22.03-2 * Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.22.03-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

Loading…
Cancel
Save