[tcsh] spec: move to %autosetup

Pavel Raiskup praiskup at fedoraproject.org
Wed Aug 27 15:05:33 UTC 2014


commit 97c6af701ca4b81a9927dcc8b7531cab1f6e15ff
Author: Pavel Raiskup <praiskup at redhat.com>
Date:   Wed Aug 27 14:01:16 2014 +0200

    spec: move to %autosetup
    
    Version: 6.18.01-12

 tcsh-6.13.00-memoryuse.patch                       |   12 ++--
 tcsh-6.14.00-order.patch                           |   28 +++++--
 tcsh-6.14.00-syntax.patch                          |   33 ++++++-
 tcsh-6.14.00-tinfo.patch                           |   13 ++--
 tcsh-6.14.00-unprintable.patch                     |   24 ++++-
 tcsh-6.15.00-closem.patch                          |   24 ++++-
 tcsh-6.15.00-hist-sub.patch                        |   22 ++++-
 tcsh-6.17.00-manpage-spelling.patch                |   17 ++--
 tcsh-6.18.00-history-file-locking.patch            |   95 ++++++++++++--------
 tcsh-6.18.00-history-merge.patch                   |   21 ++++-
 tcsh-6.18.01-elf-interpreter.patch                 |   53 ++++++++----
 tcsh-6.18.01-posix-exit-status-value.patch         |   24 +++++-
 tcsh-6.18.01-repeated-words-man.patch              |   23 ++++-
 ...6.18.01-reverse-history-handling-in-loops.patch |   13 ++--
 tcsh.spec                                          |   41 +++------
 15 files changed, 304 insertions(+), 139 deletions(-)
---
diff --git a/tcsh-6.13.00-memoryuse.patch b/tcsh-6.13.00-memoryuse.patch
index e78cda3..93fe0ac 100644
--- a/tcsh-6.13.00-memoryuse.patch
+++ b/tcsh-6.13.00-memoryuse.patch
@@ -1,15 +1,15 @@
-From 4c3740ae5bb48c187f66655f1cddcb55f43566b1 Mon Sep 17 00:00:00 2001
+From b399918fb3bf9c1f17ba8c85874e2dce7b1497cf Mon Sep 17 00:00:00 2001
 From: "Vojtech Vitek (V-Teq)" <vvitek at redhat.com>
 Date: Thu, 15 Mar 2012 02:21:37 +0100
-Subject: [PATCH] Add memoryuse note in manpage regarding kernel 2.6 and
+Subject: [PATCH 06/14] Add memoryuse note in manpage regarding kernel 2.6 and
  higher
 
 ---
- tcsh.man |    3 ++-
- 1 files changed, 2 insertions(+), 1 deletions(-)
+ tcsh.man | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/tcsh.man b/tcsh.man
-index 8c6c9e1..b0ea99f 100644
+index 7085160..75f2075 100644
 --- a/tcsh.man
 +++ b/tcsh.man
 @@ -2941,7 +2941,8 @@ the size of the largest core dump that will be created
@@ -23,5 +23,5 @@ index 8c6c9e1..b0ea99f 100644
  \fIvmemoryuse\fR
  the maximum amount of virtual memory a process
 -- 
-1.7.6.5
+1.9.3
 
diff --git a/tcsh-6.14.00-order.patch b/tcsh-6.14.00-order.patch
index 7bbbe8c..e7b10b8 100644
--- a/tcsh-6.14.00-order.patch
+++ b/tcsh-6.14.00-order.patch
@@ -1,14 +1,30 @@
-diff -up tcsh-6.15.00/tcsh.man.order tcsh-6.15.00/tcsh.man
---- tcsh-6.15.00/tcsh.man.order	2008-09-03 12:30:44.000000000 +0200
-+++ tcsh-6.15.00/tcsh.man	2008-09-03 12:30:44.000000000 +0200
-@@ -1614,7 +1614,9 @@ They include
+From 9e02166f3c3cde73244b9c38516dee178e91edf8 Mon Sep 17 00:00:00 2001
+From: vcrhonek <vcrhonek at fedoraproject.org>
+Date: Wed, 27 Aug 2014 13:49:17 +0200
+Subject: [PATCH 07/14] Fix calculation order of operators description in tcsh
+ manpage
+
+Original dist-git commit: 1bcd8ea59128666448
+
+---
+ tcsh.man | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/tcsh.man b/tcsh.man
+index 75f2075..322ee98 100644
+--- a/tcsh.man
++++ b/tcsh.man
+@@ -1644,7 +1644,9 @@ They include
  .PP
  Here the precedence increases to the right, `==' `!=' `=~' and `!~', `<='
  `>=' `<' and `>', `<<' and `>>', `+' and `\-', `*' `/' and `%' being, in
 -groups, at the same level.  The `==' `!=' `=~' and `!~' operators compare
-+groups, at the same level.  When multiple operators which have same precedence 
-+are used in one expression, calculation must be done from operator of right 
++groups, at the same level.  When multiple operators which have same precedence
++are used in one expression, calculation must be done from operator of right
 +side.  The `==' `!=' `=~' and `!~' operators compare
  their arguments as strings; all others operate on numbers.  The operators
  `=~' and `!~' are like `!=' and `==' except that the right hand side is a
  glob-pattern (see \fBFilename substitution\fR) against which the left hand
+-- 
+1.9.3
+
diff --git a/tcsh-6.14.00-syntax.patch b/tcsh-6.14.00-syntax.patch
index 01735d3..d7cf8d6 100644
--- a/tcsh-6.14.00-syntax.patch
+++ b/tcsh-6.14.00-syntax.patch
@@ -1,7 +1,27 @@
-diff -up tcsh-6.17.00/sh.func.c_old tcsh-6.17.00/sh.func.c
---- tcsh-6.17.00/sh.func.c_old	2009-07-20 14:54:16.000000000 +0200
-+++ tcsh-6.17.00/sh.func.c	2009-07-20 14:55:34.000000000 +0200
-@@ -753,8 +753,6 @@ search(int type, int level, Char *goal)
+From 782530170fd28668a2ae0c43a03bb339aaf0df70 Mon Sep 17 00:00:00 2001
+From: vcrhonek <vcrhonek at fedoraproject.org>
+Date: Wed, 27 Aug 2014 13:43:01 +0200
+Subject: [PATCH 05/14] while loop counting
+
+Fix tcsh scripts with multiple case statement with end keywords
+break with error.
+
+praiskup: TODO:
+This patch reverts upstream commit a973723e from 2004-05-13.  We
+should make sure that this is going to be fixed properly upstream.
+
+Resolves: #253247
+original dist-git commit: 1bcd8ea591286664483d0aea2601a8729eb6b81f
+
+---
+ sh.func.c | 13 -------------
+ 1 file changed, 13 deletions(-)
+
+diff --git a/sh.func.c b/sh.func.c
+index d3b890f..869de12 100644
+--- a/sh.func.c
++++ b/sh.func.c
+@@ -754,8 +754,6 @@ search(int type, int level, Char *goal)
  {
      struct Strbuf word = Strbuf_INIT;
      Char *cp;
@@ -10,7 +30,7 @@ diff -up tcsh-6.17.00/sh.func.c_old tcsh-6.17.00/sh.func.c
      struct wordent *histent = NULL, *ohistent = NULL;
  
      Stype = type;
-@@ -811,24 +809,13 @@ search(int type, int level, Char *goal)
+@@ -813,24 +811,13 @@ search(int type, int level, Char *goal)
  
  	case TC_FOREACH:
  	case TC_WHILE:
@@ -35,3 +55,6 @@ diff -up tcsh-6.17.00/sh.func.c_old tcsh-6.17.00/sh.func.c
  	    break;
  
  	case TC_SWITCH:
+-- 
+1.9.3
+
diff --git a/tcsh-6.14.00-tinfo.patch b/tcsh-6.14.00-tinfo.patch
index 6488f9f..c64fe15 100644
--- a/tcsh-6.14.00-tinfo.patch
+++ b/tcsh-6.14.00-tinfo.patch
@@ -1,14 +1,15 @@
-From 039673bc9e8f3f6b198d1fc68878324a63bd111a Mon Sep 17 00:00:00 2001
+From 2972adf2edc96aae26a82b94adab792c9520fa74 Mon Sep 17 00:00:00 2001
 From: "Vojtech Vitek (V-Teq)" <vvitek at redhat.com>
 Date: Thu, 15 Mar 2012 02:10:35 +0100
-Subject: [PATCH] Search for tinfo library instead of termcap/(n)curses etc.
+Subject: [PATCH 02/14] Search for tinfo library instead of termcap/(n)curses
+ etc.
 
 ---
- configure.in |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
+ configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/configure.in b/configure.in
-index 103ab37..9a2afef 100644
+index c336e54..ef330a2 100644
 --- a/configure.in
 +++ b/configure.in
 @@ -299,7 +299,7 @@ fi
@@ -21,5 +22,5 @@ index 103ab37..9a2afef 100644
  AC_SEARCH_LIBS(connect, socket)
  AC_SEARCH_LIBS(catgets, catgets)
 -- 
-1.7.6.5
+1.9.3
 
diff --git a/tcsh-6.14.00-unprintable.patch b/tcsh-6.14.00-unprintable.patch
index 9d49458..83f85b3 100644
--- a/tcsh-6.14.00-unprintable.patch
+++ b/tcsh-6.14.00-unprintable.patch
@@ -1,7 +1,20 @@
-diff -up tcsh-6.15.00/tw.parse.c.unprintable tcsh-6.15.00/tw.parse.c
---- tcsh-6.15.00/tw.parse.c.unprintable	2007-03-01 22:21:42.000000000 +0100
-+++ tcsh-6.15.00/tw.parse.c	2008-08-29 12:28:56.000000000 +0200
-@@ -2119,7 +2119,8 @@ print_by_column(Char *dir, Char *items[]
+From 73c378eee326ea117c7acc4655e89529a4171f92 Mon Sep 17 00:00:00 2001
+From: vcrhonek <vcrhonek at fedoraproject.org>
+Date: Wed, 27 Aug 2014 13:36:26 +0200
+Subject: [PATCH 03/14] fix unprintable
+
+original dist-git commit: cd7e072c
+Resolves: #233525
+
+---
+ tw.parse.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/tw.parse.c b/tw.parse.c
+index dc32dba..d05ceb8 100644
+--- a/tw.parse.c
++++ b/tw.parse.c
+@@ -2169,7 +2169,8 @@ print_by_column(Char *dir, Char *items[], int count, int no_file_suffix)
  	     (Strchr(val, 'x') != NULL);
  
      for (i = 0; i < count; i++)	{ /* find widest string */
@@ -11,3 +24,6 @@ diff -up tcsh-6.15.00/tw.parse.c.unprintable tcsh-6.15.00/tw.parse.c
      }
  
      maxwidth += no_file_suffix ? 1 : 2;	/* for the file tag and space */
+-- 
+1.9.3
+
diff --git a/tcsh-6.15.00-closem.patch b/tcsh-6.15.00-closem.patch
index 3a3da89..2dd2412 100644
--- a/tcsh-6.15.00-closem.patch
+++ b/tcsh-6.15.00-closem.patch
@@ -1,7 +1,18 @@
-diff -up tcsh-6.15.00/sh.misc.c.closem tcsh-6.15.00/sh.misc.c
---- tcsh-6.15.00/sh.misc.c.closem	2006-10-14 19:57:21.000000000 +0200
-+++ tcsh-6.15.00/sh.misc.c	2008-08-29 12:26:41.000000000 +0200
-@@ -255,6 +255,7 @@ void
+From fbf64f9d9addb60153732298ec7e9bf592831bf2 Mon Sep 17 00:00:00 2001
+From: Miloslav Trmac <mitr at fedoraproject.org>
+Date: Wed, 27 Aug 2014 13:29:02 +0200
+Subject: [PATCH 01/14] Do not close sockets
+
+orig dist-git commit: f02674e96a7888a7322611b45f6b63a1f5db0fef
+---
+ sh.misc.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/sh.misc.c b/sh.misc.c
+index 08ec30d..08d110f 100644
+--- a/sh.misc.c
++++ b/sh.misc.c
+@@ -257,6 +257,7 @@ void
  closem(void)
  {
      int f, num_files;
@@ -9,7 +20,7 @@ diff -up tcsh-6.15.00/sh.misc.c.closem tcsh-6.15.00/sh.misc.c
  
  #ifdef NLS_BUGS
  #ifdef NLS_CATALOGS
-@@ -272,6 +273,16 @@ closem(void)
+@@ -274,6 +275,16 @@ closem(void)
  #ifdef MALLOC_TRACE
  	    && f != 25
  #endif /* MALLOC_TRACE */
@@ -26,3 +37,6 @@ diff -up tcsh-6.15.00/sh.misc.c.closem tcsh-6.15.00/sh.misc.c
  	    )
  	  {
  	    xclose(f);
+-- 
+1.9.3
+
diff --git a/tcsh-6.15.00-hist-sub.patch b/tcsh-6.15.00-hist-sub.patch
index 6abf000..c3477e5 100644
--- a/tcsh-6.15.00-hist-sub.patch
+++ b/tcsh-6.15.00-hist-sub.patch
@@ -1,7 +1,18 @@
-diff -up tcsh-6.15.00/tcsh.man.hist-sub tcsh-6.15.00/tcsh.man
---- tcsh-6.15.00/tcsh.man.hist-sub	2007-03-03 21:01:26.000000000 +0100
-+++ tcsh-6.15.00/tcsh.man	2008-08-29 12:29:47.000000000 +0200
-@@ -1035,7 +1035,7 @@ Substitute \fIl\fR for \fIr\fR.
+From 756bee93c95fce2c1456932ff7fe1f727d773856 Mon Sep 17 00:00:00 2001
+From: vcrhonek <vcrhonek at fedoraproject.org>
+Date: Wed, 27 Aug 2014 13:39:53 +0200
+Subject: [PATCH 04/14] Fix '\' can not be used to quote all delimiters
+
+Related: #435421
+---
+ tcsh.man | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tcsh.man b/tcsh.man
+index cb0709e..7085160 100644
+--- a/tcsh.man
++++ b/tcsh.man
+@@ -1046,7 +1046,7 @@ Substitute \fIl\fR for \fIr\fR.
  \fIl\fR is simply a string like \fIr\fR, not a regular expression as in
  the eponymous \fIed\fR(1) command.
  Any character may be used as the delimiter in place of `/';
@@ -10,3 +21,6 @@ diff -up tcsh-6.15.00/tcsh.man.hist-sub tcsh-6.15.00/tcsh.man
  The character `&' in the \fIr\fR is replaced by \fIl\fR; `\\' also quotes `&'.
  If \fIl\fR is empty (``''), the \fIl\fR from a previous substitution or the
  \fIs\fR from a previous search or event number in event specification is used.
+-- 
+1.9.3
+
diff --git a/tcsh-6.17.00-manpage-spelling.patch b/tcsh-6.17.00-manpage-spelling.patch
index 76026a6..b92adcb 100644
--- a/tcsh-6.17.00-manpage-spelling.patch
+++ b/tcsh-6.17.00-manpage-spelling.patch
@@ -1,19 +1,20 @@
-From 76da82e1683c7b7f000081c4759ff4b742bf95f0 Mon Sep 17 00:00:00 2001
+From 3b0c32ede9deb74ab43d63e549e06d362cb3b31b Mon Sep 17 00:00:00 2001
 From: "Vojtech Vitek (V-Teq)" <vvitek at redhat.com>
 Date: Sat, 29 Oct 2011 21:18:34 +0200
-Subject: [PATCH] Fix minor man page spelling mistakes
+Subject: [PATCH 08/14] Fix minor man page spelling mistakes
 
 Changes proposed by John Bradshaw.
 rhbz#675137
+
 ---
- tcsh.man |    4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
+ tcsh.man | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/tcsh.man b/tcsh.man
-index e44e2c2..309071c 100644
+index 322ee98..de8be03 100644
 --- a/tcsh.man
 +++ b/tcsh.man
-@@ -1718,7 +1718,7 @@ rather than to the file to which the link points (+) *
+@@ -1748,7 +1748,7 @@ rather than to the file to which the link points (+) *
  see if it has the specified relationship to the real user.  If \fIfile\fR
  does not exist or is inaccessible or, for the operators indicated by `*',
  if the specified file type does not exist on the current system,
@@ -22,7 +23,7 @@ index e44e2c2..309071c 100644
  .PP
  These operators may be combined for conciseness: `\-\fIxy file\fR' is
  equivalent to `\-\fIx file\fR && \-\fIy file\fR'.  (+) For example, `\-fx' is true
-@@ -3555,7 +3555,7 @@ whenever the environment variable changes the shell changes the corresponding
+@@ -3618,7 +3618,7 @@ whenever the environment variable changes the shell changes the corresponding
  shell variable to match (unless the shell variable is read-only) and vice
  versa.  Note that although \fBcwd\fR and \fBPWD\fR have identical meanings, they
  are not synchronized in this manner, and that the shell automatically
@@ -32,5 +33,5 @@ index e44e2c2..309071c 100644
  .B addsuffix \fR(+)
  If set, filename completion adds `/' to the end of directories and a space
 -- 
-1.7.6.2
+1.9.3
 
diff --git a/tcsh-6.18.00-history-file-locking.patch b/tcsh-6.18.00-history-file-locking.patch
index 83cd5e4..947ff65 100644
--- a/tcsh-6.18.00-history-file-locking.patch
+++ b/tcsh-6.18.00-history-file-locking.patch
@@ -1,7 +1,8 @@
-From f813180f2fc1d682dd097e4a05ef4d15000204ad Mon Sep 17 00:00:00 2001
+From b3c7d8537a3a9b89639ddfe49246a898cabc4454 Mon Sep 17 00:00:00 2001
 From: Roman Kollar <rkollar at redhat.com>
 Date: Mon, 29 Oct 2012 17:52:52 +0100
-Subject: [PATCH] Add .history file locking - shared readers, exclusive writer
+Subject: [PATCH 09/14] Add .history file locking - shared readers, exclusive
+ writer
 
 Originally reported at Red Hat Bugzilla:
 https://bugzilla.redhat.com/show_bug.cgi?id=648592
@@ -14,10 +15,20 @@ https://bugzilla.redhat.com/show_bug.cgi?id=879371
 Changes by Fridolin Pokorny <fpokorny at redhat.com>
 
 ---
+ sh.c       | 105 ++++++++++++++++++++++++++++++++++++-------------
+ sh.decls.h |   4 +-
+ sh.dol.c   |   2 +-
+ sh.err.c   |  16 ++++++++
+ sh.h       |  18 +++++++++
+ sh.hist.c  | 131 +++++++++++++++++++++++++++++++------------------------------
+ sh.lex.c   |   8 ++--
+ sh.sem.c   |   2 +-
+ 8 files changed, 186 insertions(+), 100 deletions(-)
 
-diff -upr tcsh-6.18.00_orig/sh.c tcsh-6.18.00_work/sh.c
---- tcsh-6.18.00_orig/sh.c	2013-03-28 10:06:17.969859477 +0100
-+++ tcsh-6.18.00_work/sh.c	2013-03-28 10:07:21.155082032 +0100
+diff --git a/sh.c b/sh.c
+index dcd9116..f897317 100644
+--- a/sh.c
++++ b/sh.c
 @@ -140,6 +140,7 @@ struct saved_state {
      int	  cantell;
      struct Bin	  B;
@@ -116,7 +127,7 @@ diff -upr tcsh-6.18.00_orig/sh.c tcsh-6.18.00_work/sh.c
  }
  
  
-@@ -1544,7 +1574,7 @@ srcfile(const char *f, int onlyown, int
+@@ -1544,7 +1574,7 @@ srcfile(const char *f, int onlyown, int flag, Char **av)
   * fd.
   */
  static void
@@ -125,7 +136,7 @@ diff -upr tcsh-6.18.00_orig/sh.c tcsh-6.18.00_work/sh.c
  {
      st->insource	= insource;
      st->SHIN		= SHIN;
-@@ -1593,10 +1623,14 @@ st_save(struct saved_state *st, int unit
+@@ -1593,10 +1623,14 @@ st_save(struct saved_state *st, int unit, int hflg, Char **al, Char **av)
      st->onelflg		= onelflg;
      st->enterhist	= enterhist;
      st->justpr		= justpr;
@@ -141,7 +152,7 @@ diff -upr tcsh-6.18.00_orig/sh.c tcsh-6.18.00_work/sh.c
      st->cantell		= cantell;
      cpybin(st->B, B);
  
-@@ -1635,7 +1669,7 @@ st_save(struct saved_state *st, int unit
+@@ -1635,7 +1669,7 @@ st_save(struct saved_state *st, int unit, int hflg, Char **al, Char **av)
      evalp	= 0;
      alvec	= al;
      alvecp	= 0;
@@ -169,7 +180,7 @@ diff -upr tcsh-6.18.00_orig/sh.c tcsh-6.18.00_work/sh.c
  {
      struct saved_state st;
  
-@@ -1730,7 +1765,7 @@ srcunit(int unit, int onlyown, int hflg,
+@@ -1730,7 +1765,7 @@ srcunit(int unit, int onlyown, int hflg, Char **av)
      }
  
      /* Save the current state and move us to a new state */
@@ -238,9 +249,10 @@ diff -upr tcsh-6.18.00_orig/sh.c tcsh-6.18.00_work/sh.c
  }
  
  /*
-diff -upr tcsh-6.18.00_orig/sh.decls.h tcsh-6.18.00_work/sh.decls.h
---- tcsh-6.18.00_orig/sh.decls.h	2013-03-28 10:06:17.988859538 +0100
-+++ tcsh-6.18.00_work/sh.decls.h	2013-03-28 10:06:42.897948590 +0100
+diff --git a/sh.decls.h b/sh.decls.h
+index db90288..fb15a01 100644
+--- a/sh.decls.h
++++ b/sh.decls.h
 @@ -38,6 +38,7 @@
   */
  extern	Char	 	 *gethdir	(const Char *);
@@ -257,7 +269,7 @@ diff -upr tcsh-6.18.00_orig/sh.decls.h tcsh-6.18.00_work/sh.decls.h
  extern	void		  opendir_cleanup(void *);
  extern	void		  sigint_cleanup(void *);
  extern	void		  sigprocmask_cleanup(void *);
-@@ -219,7 +221,7 @@ extern  struct Hist 	 *enthist	(int, str
+@@ -219,7 +221,7 @@ extern  struct Hist 	 *enthist	(int, struct wordent *, int, int, int);
  extern	void	 	  savehist	(struct wordent *, int);
  extern	char		 *fmthist	(int, ptr_t);
  extern	void		  rechist	(Char *, int);
@@ -266,9 +278,10 @@ diff -upr tcsh-6.18.00_orig/sh.decls.h tcsh-6.18.00_work/sh.decls.h
  extern	void		  displayHistStats(const char *);
  
  /*
-diff -upr tcsh-6.18.00_orig/sh.dol.c tcsh-6.18.00_work/sh.dol.c
---- tcsh-6.18.00_orig/sh.dol.c	2013-03-28 10:06:17.988859538 +0100
-+++ tcsh-6.18.00_work/sh.dol.c	2013-03-28 10:06:42.898948594 +0100
+diff --git a/sh.dol.c b/sh.dol.c
+index 45b10e0..2ce7cb5 100644
+--- a/sh.dol.c
++++ b/sh.dol.c
 @@ -1110,6 +1110,6 @@ again:
      *obp = 0;
      tmp = short2str(obuf);
@@ -277,9 +290,10 @@ diff -upr tcsh-6.18.00_orig/sh.dol.c tcsh-6.18.00_work/sh.dol.c
 +    (void) lseek(0, (off_t) 0, SEEK_SET);
      cleanup_until(&inheredoc);
  }
-diff -upr tcsh-6.18.00_orig/sh.err.c tcsh-6.18.00_work/sh.err.c
---- tcsh-6.18.00_orig/sh.err.c	2013-03-28 10:06:17.972859480 +0100
-+++ tcsh-6.18.00_work/sh.err.c	2013-03-28 10:06:42.824948331 +0100
+diff --git a/sh.err.c b/sh.err.c
+index e157d6a..29d41c3 100644
+--- a/sh.err.c
++++ b/sh.err.c
 @@ -514,6 +514,22 @@ open_cleanup(void *xptr)
  }
  
@@ -303,9 +317,10 @@ diff -upr tcsh-6.18.00_orig/sh.err.c tcsh-6.18.00_work/sh.err.c
  opendir_cleanup(void *xdir)
  {
      DIR *dir;
-diff -upr tcsh-6.18.00_orig/sh.h tcsh-6.18.00_work/sh.h
---- tcsh-6.18.00_orig/sh.h	2013-03-28 10:06:17.988859538 +0100
-+++ tcsh-6.18.00_work/sh.h	2013-03-28 10:06:42.899948597 +0100
+diff --git a/sh.h b/sh.h
+index 691add3..4e3f13c 100644
+--- a/sh.h
++++ b/sh.h
 @@ -50,6 +50,24 @@
  # include <inttypes.h>
  #endif
@@ -331,9 +346,10 @@ diff -upr tcsh-6.18.00_orig/sh.h tcsh-6.18.00_work/sh.h
  #if !defined(HAVE_STDINT_H) && !defined(HAVE_INTTYPES_H) && !defined(WINNT_NATIVE)
  typedef unsigned long intptr_t;
  #endif
-diff -upr tcsh-6.18.00_orig/sh.hist.c tcsh-6.18.00_work/sh.hist.c
---- tcsh-6.18.00_orig/sh.hist.c	2013-03-28 10:06:17.967859465 +0100
-+++ tcsh-6.18.00_work/sh.hist.c	2013-03-28 10:06:42.815948309 +0100
+diff --git a/sh.hist.c b/sh.hist.c
+index 6a12737..7e53c65 100644
+--- a/sh.hist.c
++++ b/sh.hist.c
 @@ -44,14 +44,6 @@ Char HistLit = 0;
  static	int	heq	(const struct wordent *, const struct wordent *);
  static	void	hfree	(struct Hist *);
@@ -480,11 +496,11 @@ diff -upr tcsh-6.18.00_orig/sh.hist.c tcsh-6.18.00_work/sh.hist.c
  		break;
  	    case 'M':
 -	    	hflg |= HIST_MERGE;
-+	    	flg |= HIST_MERGE;
++		flg |= HIST_MERGE;
  		break;
  	    case 'T':
 -	    	hflg |= HIST_TIME;
-+	    	flg |= HIST_TIME;
++		flg |= HIST_TIME;
  		break;
  	    default:
  		stderror(ERR_HISTUS, "chrSLMT");
@@ -533,11 +549,11 @@ diff -upr tcsh-6.18.00_orig/sh.hist.c tcsh-6.18.00_work/sh.hist.c
       * ~/.history file for recording their command line history. 
 -     * Currently the automatic merge can only succeed when the shells
 -     * nicely quit one after another. 
--     *
+      *
 -     * Users that like to nuke their environment require here an atomic
 -     * 	loadhist-creat-dohist(dumphist)-close
 -     * sequence.
-      *
+-     *
 -     * jw.
 -     */ 
 +     * Atomic merge loadhist-creat/ftrunc-dohist(dumphist)-close
@@ -631,10 +647,11 @@ diff -upr tcsh-6.18.00_orig/sh.hist.c tcsh-6.18.00_work/sh.hist.c
 +
 +    return fd; /* Valid/invalid file descriptor (>FSAVE, -1). Zero on error. */
  }
-diff -upr tcsh-6.18.00_orig/sh.lex.c tcsh-6.18.00_work/sh.lex.c
---- tcsh-6.18.00_orig/sh.lex.c	2013-03-28 10:06:17.971859478 +0100
-+++ tcsh-6.18.00_work/sh.lex.c	2013-03-28 10:06:42.820948316 +0100
-@@ -1595,7 +1595,7 @@ wide_read(int fildes, Char *buf, size_t
+diff --git a/sh.lex.c b/sh.lex.c
+index 80643f7..57ec7a9 100644
+--- a/sh.lex.c
++++ b/sh.lex.c
+@@ -1595,7 +1595,7 @@ wide_read(int fildes, Char *buf, size_t nchars, int use_fclens)
      /* Throwing away possible partial multibyte characters on error if the
         stream is not seekable */
      err = errno;
@@ -670,10 +687,11 @@ diff -upr tcsh-6.18.00_orig/sh.lex.c tcsh-6.18.00_work/sh.lex.c
  	return;
      fbuf = xcalloc(2, sizeof(Char **));
      fblocks = 1;
-diff -upr tcsh-6.18.00_orig/sh.sem.c tcsh-6.18.00_work/sh.sem.c
---- tcsh-6.18.00_orig/sh.sem.c	2013-03-28 10:06:17.970859477 +0100
-+++ tcsh-6.18.00_work/sh.sem.c	2013-03-28 10:06:42.819948308 +0100
-@@ -892,7 +892,7 @@ doio(struct command *t, int *pipein, int
+diff --git a/sh.sem.c b/sh.sem.c
+index c880974..bc51b50 100644
+--- a/sh.sem.c
++++ b/sh.sem.c
+@@ -892,7 +892,7 @@ doio(struct command *t, int *pipein, int *pipeout)
  	    fd = xopen(tmp, O_WRONLY|O_APPEND|O_LARGEFILE);
  #else /* !O_APPEND */
  	    fd = xopen(tmp, O_WRONLY|O_LARGEFILE);
@@ -682,3 +700,6 @@ diff -upr tcsh-6.18.00_orig/sh.sem.c tcsh-6.18.00_work/sh.sem.c
  #endif /* O_APPEND */
  	}
  	else
+-- 
+1.9.3
+
diff --git a/tcsh-6.18.00-history-merge.patch b/tcsh-6.18.00-history-merge.patch
index c54595a..e56e910 100644
--- a/tcsh-6.18.00-history-merge.patch
+++ b/tcsh-6.18.00-history-merge.patch
@@ -1,6 +1,18 @@
-diff -upr tcsh-6.18.00_orig/sh.hist.c tcsh-6.18.00_work/sh.hist.c
---- tcsh-6.18.00_orig/sh.hist.c	2013-03-28 10:13:52.165407699 +0100
-+++ tcsh-6.18.00_work/sh.hist.c	2013-03-28 10:19:49.168703936 +0100
+From 1c6ae703b3ecd79427572d3f2741e034e07a7267 Mon Sep 17 00:00:00 2001
+From: Fridolin Pokorny <fpokorny at redhat.com>
+Date: Wed, 27 Aug 2014 13:52:59 +0200
+Subject: [PATCH 10/14] merge histlist properly
+
+Resolves: #919452
+
+---
+ sh.hist.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/sh.hist.c b/sh.hist.c
+index 7e53c65..2e47eaa 100644
+--- a/sh.hist.c
++++ b/sh.hist.c
 @@ -99,7 +99,7 @@ hremove(struct Hist *hp)
  
  /* Prune length of history list to specified size by history variable. */
@@ -35,3 +47,6 @@ diff -upr tcsh-6.18.00_orig/sh.hist.c tcsh-6.18.00_work/sh.hist.c
  }
  
  #define USE_JENKINS_HASH 1
+-- 
+1.9.3
+
diff --git a/tcsh-6.18.01-elf-interpreter.patch b/tcsh-6.18.01-elf-interpreter.patch
index 571f003..c842525 100644
--- a/tcsh-6.18.01-elf-interpreter.patch
+++ b/tcsh-6.18.01-elf-interpreter.patch
@@ -1,6 +1,21 @@
-diff -upr tcsh-6.18.01_orig/config.h.in tcsh-6.18.01_work/config.h.in
---- tcsh-6.18.01_orig/config.h.in	2013-04-23 14:10:52.181655679 +0200
-+++ tcsh-6.18.01_work/config.h.in	2013-04-23 14:14:33.715035808 +0200
+From b913dff5f7c123691b9aea3cee4bf270bc56659b Mon Sep 17 00:00:00 2001
+From: rpm-build <rpm-build>
+Date: Wed, 27 Aug 2014 13:55:10 +0200
+Subject: [PATCH 12/14] report missing ELF interpreter
+
+Resolves: #711066
+
+---
+ config.h.in  |   6 +++
+ configure.in |   5 ++-
+ sh.err.c     |   4 +-
+ sh.exec.c    | 140 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 152 insertions(+), 3 deletions(-)
+
+diff --git a/config.h.in b/config.h.in
+index 0ba48c4..9fb2921 100644
+--- a/config.h.in
++++ b/config.h.in
 @@ -36,6 +36,9 @@
  /* Define to 1 if you have the `dup2' function. */
  #undef HAVE_DUP2
@@ -21,9 +36,10 @@ diff -upr tcsh-6.18.01_orig/config.h.in tcsh-6.18.01_work/config.h.in
  /* Define to 1 if you have the `sbrk' function. */
  #undef HAVE_SBRK
  
-diff -upr tcsh-6.18.01_orig/configure.in tcsh-6.18.01_work/configure.in
---- tcsh-6.18.01_orig/configure.in	2013-04-23 14:10:52.157655645 +0200
-+++ tcsh-6.18.01_work/configure.in	2013-04-23 14:13:53.226958044 +0200
+diff --git a/configure.in b/configure.in
+index ef330a2..8303bd4 100644
+--- a/configure.in
++++ b/configure.in
 @@ -306,7 +306,7 @@ AC_SEARCH_LIBS(catgets, catgets)
  AM_ICONV
  
@@ -33,7 +49,7 @@ diff -upr tcsh-6.18.01_orig/configure.in tcsh-6.18.01_work/configure.in
  		 [shadow.h stdint.h utmp.h utmpx.h])
  AC_CHECK_HEADERS([wchar.h],
  	[AC_CHECK_SIZEOF([wchar_t], [], [dnl
-@@ -388,7 +388,8 @@ AC_CHECK_FUNC([setlocale], [have_setloca
+@@ -388,7 +388,8 @@ AC_CHECK_FUNC([setlocale], [have_setlocale=yes], [have_setlocale=no])
  AC_CHECK_FUNC([catgets], [have_catgets=yes], [have_catgets=no])
  AC_CHECK_FUNCS([dup2 getauthid getcwd gethostname getpwent] dnl
  	[getutent getutxent mallinfo memmove memset mkstemp nice] dnl
@@ -43,10 +59,11 @@ diff -upr tcsh-6.18.01_orig/configure.in tcsh-6.18.01_work/configure.in
  AC_FUNC_GETPGRP
  AC_FUNC_MBRTOWC
  if test "x${cross_compiling}" != xyes ; then
-diff -upr tcsh-6.18.01_orig/sh.err.c tcsh-6.18.01_work/sh.err.c
---- tcsh-6.18.01_orig/sh.err.c	2013-04-23 14:10:52.160655649 +0200
-+++ tcsh-6.18.01_work/sh.err.c	2013-04-23 14:15:33.347155943 +0200
-@@ -189,7 +189,8 @@ char   *seterr = NULL;	/* Holds last err
+diff --git a/sh.err.c b/sh.err.c
+index 29d41c3..262f9bf 100644
+--- a/sh.err.c
++++ b/sh.err.c
+@@ -189,7 +189,8 @@ char   *seterr = NULL;	/* Holds last error if there was one */
  #define ERR_INVALID	133
  #define ERR_BADCOLORVAR	134
  #define ERR_EOF		135
@@ -64,10 +81,11 @@ diff -upr tcsh-6.18.01_orig/sh.err.c tcsh-6.18.01_work/sh.err.c
  }
  
  /* Cleanup data. */
-diff -upr tcsh-6.18.01_orig/sh.exec.c tcsh-6.18.01_work/sh.exec.c
---- tcsh-6.18.01_orig/sh.exec.c	2013-04-23 14:10:52.156655643 +0200
-+++ tcsh-6.18.01_work/sh.exec.c	2013-04-23 14:35:43.561578622 +0200
-@@ -40,6 +40,10 @@ RCSID("$tcsh: sh.exec.c,v 3.79 2011/02/2
+diff --git a/sh.exec.c b/sh.exec.c
+index 2b41a53..c1f4b7e 100644
+--- a/sh.exec.c
++++ b/sh.exec.c
+@@ -40,6 +40,10 @@ RCSID("$tcsh: sh.exec.c,v 3.79 2011/02/25 23:58:34 christos Exp $")
  #include <nt.const.h>
  #endif /*WINNT_NATIVE*/
  
@@ -155,7 +173,7 @@ diff -upr tcsh-6.18.01_orig/sh.exec.c tcsh-6.18.01_work/sh.exec.c
 +			 * an Elf64_Ehdr struct.
 +			 */
 +			memcpy(&ehdr, sample, sizeof(Elf64_Ehdr));
-+	
++
 +			nphdr = ehdr.e_phnum;
 +			phdr = xmalloc(nphdr * ehdr.e_phentsize);
 +			if (phdr != NULL) {
@@ -221,3 +239,6 @@ diff -upr tcsh-6.18.01_orig/sh.exec.c tcsh-6.18.01_work/sh.exec.c
  	break;
  
      default:
+-- 
+1.9.3
+
diff --git a/tcsh-6.18.01-posix-exit-status-value.patch b/tcsh-6.18.01-posix-exit-status-value.patch
index 616b9a3..8b0556a 100644
--- a/tcsh-6.18.01-posix-exit-status-value.patch
+++ b/tcsh-6.18.01-posix-exit-status-value.patch
@@ -1,3 +1,18 @@
+From 8536e50f22f1fb04aed035e48661632f263b2606 Mon Sep 17 00:00:00 2001
+From: Jaromír Končický <jkoncick at redhat.com>
+Date: Wed, 27 Aug 2014 13:56:19 +0200
+Subject: [PATCH 13/14] Changed 'anyerror' variable to 'tcsh_posix_status' with
+ opposite meaning
+
+---
+ sh.c       |  2 --
+ sh.h       |  2 +-
+ sh.proc.c  |  6 +++---
+ sh.set.c   |  8 ++++----
+ tc.const.c |  2 +-
+ tcsh.man   | 12 ++++--------
+ 6 files changed, 13 insertions(+), 19 deletions(-)
+
 diff --git a/sh.c b/sh.c
 index f897317..322a5c6 100644
 --- a/sh.c
@@ -25,7 +40,7 @@ index 4e3f13c..7d31db9 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..4e814f8 100644
+index f2356d1..c425845 100644
 --- a/sh.proc.c
 +++ b/sh.proc.c
 @@ -558,9 +558,9 @@ pjwait(struct process *pp)
@@ -42,7 +57,7 @@ index f2356d1..4e814f8 100644
  	    continue;
  	if (fp->p_reason)
 diff --git a/sh.set.c b/sh.set.c
-index 0f98a2b..763a1dc 100644
+index 0f98a2b..1096460 100644
 --- a/sh.set.c
 +++ b/sh.set.c
 @@ -106,8 +106,8 @@ update_vars(Char *vp)
@@ -81,7 +96,7 @@ index 641e234..4d0c9e3 100644
  Char STRaout[]		= { 'a', '.', 'o', 'u', 't', '\0' };
  Char STRtty[]		= { 't', 't', 'y', '\0' };
 diff --git a/tcsh.man b/tcsh.man
-index 8cc45c8..3470659 100644
+index 8cc45c8..1e585a8 100644
 --- a/tcsh.man
 +++ b/tcsh.man
 @@ -4356,14 +4356,10 @@ Reset to 1 in login shells.
@@ -103,3 +118,6 @@ index 8cc45c8..3470659 100644
  abnormally, then 0200 is added to the status.  Builtin commands
  which fail return exit status `1', all other builtin commands
  return status `0'.
+-- 
+1.9.3
+
diff --git a/tcsh-6.18.01-repeated-words-man.patch b/tcsh-6.18.01-repeated-words-man.patch
index e27e0d4..23a8e34 100644
--- a/tcsh-6.18.01-repeated-words-man.patch
+++ b/tcsh-6.18.01-repeated-words-man.patch
@@ -1,7 +1,19 @@
-diff -upr tcsh-6.18.01_orig/tcsh.man tcsh-6.18.01_work/tcsh.man
---- tcsh-6.18.01_orig/tcsh.man	2013-04-05 16:22:07.299927566 +0200
-+++ tcsh-6.18.01_work/tcsh.man	2013-04-05 16:22:37.885019969 +0200
-@@ -1401,7 +1401,7 @@ The \fBglobstar\fR shell variable can be
+From f98a29af2d74816aa1711d64c7280d4115f83d3f Mon Sep 17 00:00:00 2001
+From: Fridolin Pokorny <fpokorny at redhat.com>
+Date: Wed, 27 Aug 2014 13:54:20 +0200
+Subject: [PATCH 11/14] Removed repeated words in man
+
+Resolves: #948884
+
+---
+ tcsh.man | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tcsh.man b/tcsh.man
+index de8be03..8cc45c8 100644
+--- a/tcsh.man
++++ b/tcsh.man
+@@ -1401,7 +1401,7 @@ The \fBglobstar\fR shell variable can be set to allow `**' or `***' as
  a file glob pattern that matches any string of characters including `/',
  recursively traversing any existing sub-directories.  For example, 
  `ls **.c' will list all the .c files in the current directory tree.
@@ -19,3 +31,6 @@ diff -upr tcsh-6.18.01_orig/tcsh.man tcsh-6.18.01_work/tcsh.man
  (e.g. `ls /usr/include/**/time.h' will list any file named `time.h'
  in the /usr/include directory tree; whereas `ls /usr/include/**time.h'
  will match any file in the /usr/include directory tree ending in `time.h').
+-- 
+1.9.3
+
diff --git a/tcsh-6.18.01-reverse-history-handling-in-loops.patch b/tcsh-6.18.01-reverse-history-handling-in-loops.patch
index 236f50d..3149b73 100644
--- a/tcsh-6.18.01-reverse-history-handling-in-loops.patch
+++ b/tcsh-6.18.01-reverse-history-handling-in-loops.patch
@@ -1,7 +1,7 @@
-From dde61c8a6ee767bbfa20018ab277e3e38e3a613f Mon Sep 17 00:00:00 2001
+From 598b93bd179a98d0cf09bac7645e8f8e11af6b44 Mon Sep 17 00:00:00 2001
 From: Roman Kollar <rkollar at redhat.com>
 Date: Fri, 12 Oct 2012 13:40:12 +0200
-Subject: [PATCH] Reverse patch for history handling in loops
+Subject: [PATCH 14/14] Reverse patch for history handling in loops
 
 Originally reported at Red Hat Bugzilla:
 https://bugzilla.redhat.com/show_bug.cgi?id=814069
@@ -9,12 +9,13 @@ https://bugzilla.redhat.com/show_bug.cgi?id=814069
 Reverse patch for commit 23a51b0a709628af57729a07cbbfae3c95e98e6f in the upstream repo
 
 Adjusted by Jaromir Koncicky (jkoncick) to fit with version 6.18.01
+
 ---
- sh.func.c | 137 +-------------------------------------------------------------
- 1 file changed, 1 insertion(+), 136 deletions(-)
+ sh.func.c | 134 +-------------------------------------------------------------
+ 1 file changed, 1 insertion(+), 133 deletions(-)
 
 diff --git a/sh.func.c b/sh.func.c
-index 31c5330..b564e53 100644
+index 869de12..61ef84c 100644
 --- a/sh.func.c
 +++ b/sh.func.c
 @@ -61,7 +61,6 @@ static	void	doagain		(void);
@@ -191,5 +192,5 @@ index 31c5330..b564e53 100644
  getword(struct Strbuf *wp)
  {
 -- 
-1.7.11.4
+1.9.3
 
diff --git a/tcsh.spec b/tcsh.spec
index 6856636..bf7e49f 100644
--- a/tcsh.spec
+++ b/tcsh.spec
@@ -1,23 +1,24 @@
 Summary: An enhanced version of csh, the C shell
 Name: tcsh
 Version: 6.18.01
-Release: 11%{?dist}
+Release: 12%{?dist}
 License: BSD
 Group: System Environment/Shells
 Source: http://ftp.funet.fi/pub/unix/shells/tcsh/%{name}-%{version}.tar.gz
-Patch1: tcsh-6.15.00-closem.patch
-Patch2: tcsh-6.14.00-tinfo.patch
-Patch3: tcsh-6.14.00-unprintable.patch
-Patch4: tcsh-6.15.00-hist-sub.patch
-Patch8: tcsh-6.14.00-syntax.patch
-Patch9: tcsh-6.13.00-memoryuse.patch
+
+# Those patches should be given in git format-patch (no need to comment here)
+
+Patch1:  tcsh-6.15.00-closem.patch
+Patch2:  tcsh-6.14.00-tinfo.patch
+Patch3:  tcsh-6.14.00-unprintable.patch
+Patch4:  tcsh-6.15.00-hist-sub.patch
+Patch8:  tcsh-6.14.00-syntax.patch
+Patch9:  tcsh-6.13.00-memoryuse.patch
 Patch11: tcsh-6.14.00-order.patch
 # Proposed upstream - http://github.com/tcsh-org/tcsh/pull/1
 Patch28: tcsh-6.17.00-manpage-spelling.patch
 # Proposed upstream - http://github.com/tcsh-org/tcsh/pull/2
 Patch31: tcsh-6.18.00-history-file-locking.patch
-# Accepted upstream - http://mx.gw.com/pipermail/tcsh-bugs/2012-December/000797.html
-#Patch32: tcsh-6.18.00-sigint-while-waiting-for-child.patch
 Patch33: tcsh-6.18.00-history-merge.patch
 Patch34: tcsh-6.18.01-repeated-words-man.patch
 # Proposed upstream - http://mx.gw.com/pipermail/tcsh-bugs/2013-April/000833.html
@@ -31,7 +32,7 @@ Requires(post): grep
 Requires(postun): coreutils, grep
 URL: http://www.tcsh.org/
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: autoconf, automake, ncurses-devel, gettext-devel
+BuildRequires: autoconf, automake, ncurses-devel, gettext-devel, git
 
 %description
 Tcsh is an enhanced but completely compatible version of csh, the C
@@ -42,22 +43,7 @@ spelling correction, a history mechanism, job control and a C language
 like syntax.
 
 %prep
-%setup -q -n %{name}-%{version}
-%patch1 -p1 -b .closem
-%patch2 -p1 -b .tinfo
-%patch3 -p1 -b .unprintable
-%patch4 -p1 -b .hist-sub
-%patch8 -p1 -b .syntax
-%patch9 -p1 -b .memoryuse
-%patch11 -p1 -b .order
-%patch28 -p1 -b .manpage-spelling
-%patch31 -p1 -b .history-file-locking
-#%%patch32 -p1 -b .sigint-while-waiting-for-child
-%patch33 -p1 -b .history-merge
-%patch34 -p1 -b .repeated-words-man
-%patch35 -p1 -b .elf-interpreter
-%patch36 -p1 -b .posix-exit-status-value
-%patch37 -p1 -b .reverse-history-handling-in-loops
+%autosetup -p1 -S git
 
 for i in Fixes WishList; do
  iconv -f iso-8859-1 -t utf-8 "$i" > "${i}_" && \
@@ -131,6 +117,9 @@ fi
 %{_mandir}/man1/*.1*
 
 %changelog
+* Wed Aug 27 2014 Pavel Raiskup <praiskup at redhat.com> - 6.18.01-12
+- use the %%autosetup macro
+
 * Mon Aug 18 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 6.18.01-11
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 


More information about the scm-commits mailing list