]> git.pld-linux.org Git - packages/ctags.git/commitdiff
add branch diff
authorElan Ruusamäe <glen@delfi.ee>
Mon, 1 Feb 2016 08:00:44 +0000 (10:00 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Mon, 1 Feb 2016 08:00:44 +0000 (10:00 +0200)
outdated: ctags-5.8-memmove.patch, ctags-5.8-ocaml-crash.patch,
ctags-CVE-2014-7204.patch, format-security.patch

ctags-5.7-segment-fault.patch - may need recheck

branch.sh [new file with mode: 0755]
ctags-5.8-memmove.patch [deleted file]
ctags-5.8-ocaml-crash.patch [deleted file]
ctags-CVE-2014-7204.patch [deleted file]
ctags.spec
format-security.patch [deleted file]

diff --git a/branch.sh b/branch.sh
new file mode 100755 (executable)
index 0000000..3c4c21d
--- /dev/null
+++ b/branch.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+set -e
+svn=svn://svn.code.sf.net/p/ctags/code
+tag=ctags-5.8
+out=branch.diff
+
+d=$-
+filter() {
+       set -$d
+       # Excluding files which change version or were not in dist tarball
+       filterdiff \
+               -x 'NEWS' \
+               -x 'maintainer.mak' \
+               -x 'Test/*' \
+               -x 'website/*' \
+               | \
+       # remove revno's for smaller diffs
+       sed -e 's,^\([-+]\{3\} .*\)\t(revision [0-9]\+)$,\1,'
+}
+
+old=$svn/tags/$tag
+new=$svn/trunk
+echo >&2 "Running diff: $old -> $new"
+LC_ALL=C svn diff --old=$old --new=$new > $out.tmp
+revno=$(sed -ne 's,^[-+]\{3\} .*\t(revision \([0-9]\+\))$,\1,p' $out.tmp | sort -urn | head -n1)
+echo >&2 "Revision $revno"
+[ "$revno" -gt 0 ] || exit 1
+
+sed -i -e "1i# Revision $revno" $out.tmp
+filter < $out.tmp > $out.tmp2 && mv -f $out.{tmp2,tmp}
+
+if cmp -s branch.diff{,.tmp}; then
+       echo >&2 "No new diffs..."
+       rm -f branch.diff.tmp
+       exit 0
+fi
+mv -f branch.diff{.tmp,}
diff --git a/ctags-5.8-memmove.patch b/ctags-5.8-memmove.patch
deleted file mode 100644 (file)
index 5608f04..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-diff -r -u ctags-5.8.orig/routines.c ctags-5.8/routines.c
---- ctags-5.8.orig/routines.c  2013-06-13 10:42:08.048576327 -0400
-+++ ctags-5.8/routines.c       2013-06-13 10:48:25.150366836 -0400
-@@ -757,13 +757,13 @@
-                               else if (cp [0] != PATH_SEPARATOR)
-                                       cp = slashp;
- #endif
--                              strcpy (cp, slashp + 3);
-+                              memmove (cp, slashp + 3, strlen(slashp + 3) + 1);
-                               slashp = cp;
-                               continue;
-                       }
-                       else if (slashp [2] == PATH_SEPARATOR  ||  slashp [2] == '\0')
-                       {
--                              strcpy (slashp, slashp + 2);
-+                              memmove (slashp, slashp + 2, strlen(slashp + 2) + 1);
-                               continue;
-                       }
-               }
diff --git a/ctags-5.8-ocaml-crash.patch b/ctags-5.8-ocaml-crash.patch
deleted file mode 100644 (file)
index 8263cca..0000000
+++ /dev/null
@@ -1,251 +0,0 @@
-diff -up ctags-5.8/ocaml.c.me ctags-5.8/ocaml.c
---- ctags-5.8/ocaml.c.me       2012-08-02 12:42:21.652211192 +0200
-+++ ctags-5.8/ocaml.c  2012-08-02 13:06:59.751283639 +0200
-@@ -72,6 +72,7 @@ typedef enum {
-       OcaKEYWORD_if,
-       OcaKEYWORD_in,
-       OcaKEYWORD_let,
-+      OcaKEYWORD_value,
-       OcaKEYWORD_match,
-       OcaKEYWORD_method,
-       OcaKEYWORD_module,
-@@ -145,7 +146,7 @@ static const ocaKeywordDesc OcamlKeyword
-       { "try"       , OcaKEYWORD_try       }, 
-       { "type"      , OcaKEYWORD_type      }, 
-       { "val"       , OcaKEYWORD_val       }, 
--      { "value"     , OcaKEYWORD_let       }, /* just to handle revised syntax */
-+      { "value"     , OcaKEYWORD_value     }, /* just to handle revised syntax */
-       { "virtual"   , OcaKEYWORD_virtual   }, 
-       { "while"     , OcaKEYWORD_while     }, 
-       { "with"      , OcaKEYWORD_with      }, 
-@@ -297,7 +298,6 @@ static void eatComment (lexingState * st
-                       if (st->cp == NULL)
-                               return;
-                       c = st->cp;
--                      continue;
-               }
-               /* we've reached the end of the comment */
-               else if (*c == ')' && lastIsStar)
-@@ -308,13 +308,33 @@ static void eatComment (lexingState * st
-               {
-                       st->cp = c;
-                       eatComment (st);
-+
-                       c = st->cp;
-+                      if (c == NULL)
-+                          return;
-+
-                       lastIsStar = FALSE;
-+            c++;
-               }
-+              /* OCaml has a rule which says :
-+               *
-+               *   "Comments do not occur inside string or character literals.
-+               *    Nested comments are handled correctly."
-+               *
-+               * So if we encounter a string beginning, we must parse it to
-+               * get a good comment nesting (bug ID: 3117537)
-+               */
-+        else if (*c == '"')
-+        {
-+            st->cp = c;
-+            eatString (st);
-+            c = st->cp;
-+        }
-               else
-+        {
-                       lastIsStar = '*' == *c;
--
--              c++;
-+            c++;
-+        }
-       }
-       st->cp = c;
-@@ -554,8 +574,7 @@ static int getLastNamedIndex ( void )
-       for (i = stackIndex - 1; i >= 0; --i)
-       {
--              if (stack[i].contextName->buffer &&
--                      strlen (stack[i].contextName->buffer) > 0)
-+        if (vStringLength (stack[i].contextName) > 0)
-               {
-                       return i;
-               }
-@@ -866,6 +885,11 @@ static void prepareTag (tagEntryInfo * t
-       tag->kindName = OcamlKinds[kind].name;
-       tag->kind = OcamlKinds[kind].letter;
-+      if (kind == K_MODULE)
-+      {
-+              tag->lineNumberEntry = TRUE;
-+              tag->lineNumber = 1;
-+      }
-       parentIndex = getLastNamedIndex ();
-       if (parentIndex >= 0)
-       {
-@@ -880,9 +904,12 @@ static void prepareTag (tagEntryInfo * t
-  * more information to it in the future */
- static void addTag (vString * const ident, int kind)
- {
--      tagEntryInfo toCreate;
--      prepareTag (&toCreate, ident, kind);
--      makeTagEntry (&toCreate);
-+      if (OcamlKinds [kind].enabled  &&  ident != NULL  &&  vStringLength (ident) > 0)
-+      {
-+              tagEntryInfo toCreate;
-+              prepareTag (&toCreate, ident, kind);
-+              makeTagEntry (&toCreate);
-+      }
- }
- boolean needStrongPoping = FALSE;
-@@ -942,15 +969,17 @@ static void typeRecord (vString * const
- }
- /* handle :
-- * exception ExceptionName ... */
-+ * exception ExceptionName of ... */
- static void exceptionDecl (vString * const ident, ocaToken what)
- {
-       if (what == OcaIDENTIFIER)
-       {
-               addTag (ident, K_EXCEPTION);
-       }
--      /* don't know what to do on else... */
--
-+    else /* probably ill-formed, give back to global scope */
-+    { 
-+        globalScope (ident, what);
-+    }
-       toDoNext = &globalScope;
- }
-@@ -1006,7 +1035,6 @@ static void constructorValidation (vStri
-  */
- static void typeDecl (vString * const ident, ocaToken what)
- {
--
-       switch (what)
-       {
-               /* parameterized */
-@@ -1046,7 +1074,6 @@ static void typeDecl (vString * const id
-  * let typeRecord handle it. */
- static void typeSpecification (vString * const ident, ocaToken what)
- {
--
-       switch (what)
-       {
-       case OcaIDENTIFIER:
-@@ -1243,8 +1270,14 @@ static void localLet (vString * const id
-  * than the let definitions.
-  * Used after a match ... with, or a function ... or fun ...
-  * because their syntax is similar.  */
--static void matchPattern (vString * const UNUSED (ident), ocaToken what)
-+static void matchPattern (vString * const ident, ocaToken what)
- {
-+    /* keep track of [], as it
-+     * can be used in patterns and can
-+     * mean the end of match expression in
-+     * revised syntax */
-+    static int braceCount = 0;
-+
-       switch (what)
-       {
-       case Tok_To:
-@@ -1252,6 +1285,14 @@ static void matchPattern (vString * cons
-               toDoNext = &mayRedeclare;
-               break;
-+    case Tok_BRL:
-+        braceCount++;
-+        break;
-+
-+    case OcaKEYWORD_value:
-+              popLastNamed ();
-+        globalScope (ident, what);
-+        break;
-       case OcaKEYWORD_in:
-               popLastNamed ();
-@@ -1269,6 +1310,11 @@ static void mayRedeclare (vString * cons
- {
-       switch (what)
-       {
-+    case OcaKEYWORD_value:
-+        /* let globalScope handle it */
-+        globalScope (ident, what);
-+        break;
-+
-       case OcaKEYWORD_let:
-       case OcaKEYWORD_val:
-               toDoNext = localLet;
-@@ -1388,6 +1434,7 @@ static void classSpecif (vString * const
-  * nearly a copy/paste of globalLet. */
- static void methodDecl (vString * const ident, ocaToken what)
- {
-+
-       switch (what)
-       {
-       case Tok_PARL:
-@@ -1435,6 +1482,7 @@ vString *lastModule;
-  */
- static void moduleSpecif (vString * const ident, ocaToken what)
- {
-+
-       switch (what)
-       {
-       case OcaKEYWORD_functor:
-@@ -1566,7 +1614,7 @@ static void globalScope (vString * const
- {
-       /* Do not touch, this is used only by the global scope
-        * to handle an 'and' */
--      static parseNext previousParser = NULL;
-+      static parseNext previousParser = &globalScope;
-       switch (what)
-       {
-@@ -1608,6 +1656,7 @@ static void globalScope (vString * const
-               /* val is mixed with let as global
-                * to be able to handle mli & new syntax */
-       case OcaKEYWORD_val:
-+      case OcaKEYWORD_value:
-       case OcaKEYWORD_let:
-               cleanupPreviousParser ();
-               toDoNext = &globalLet;
-@@ -1617,7 +1666,7 @@ static void globalScope (vString * const
-       case OcaKEYWORD_exception:
-               cleanupPreviousParser ();
-               toDoNext = &exceptionDecl;
--              previousParser = NULL;
-+              previousParser = &globalScope;
-               break;
-               /* must be a #line directive, discard the
-@@ -1769,7 +1818,7 @@ static void computeModuleName ( void )
-       if (isLowerAlpha (moduleName->buffer[0]))
-               moduleName->buffer[0] += ('A' - 'a');
--      makeSimpleTag (moduleName, OcamlKinds, K_MODULE);
-+      addTag (moduleName, K_MODULE);
-       vStringDelete (moduleName);
- }
-@@ -1779,6 +1828,7 @@ static void initStack ( void )
-       int i;
-       for (i = 0; i < OCAML_MAX_STACK_SIZE; ++i)
-               stack[i].contextName = vStringNew ();
-+    stackIndex = 0;
- }
- static void clearStack ( void )
-@@ -1794,8 +1844,8 @@ static void findOcamlTags (void)
-       lexingState st;
-       ocaToken tok;
--      computeModuleName ();
-       initStack ();
-+      computeModuleName ();
-       tempIdent = vStringNew ();
-       lastModule = vStringNew ();
-       lastClass = vStringNew ();
diff --git a/ctags-CVE-2014-7204.patch b/ctags-CVE-2014-7204.patch
deleted file mode 100644 (file)
index 81c5e6e..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
---- ctags/jscript.c.orig       2008-10-13 00:27:38.000000000 +0200
-+++ ctags/jscript.c    2014-09-30 13:49:34.837349283 +0200
-@@ -1,5 +1,5 @@
- /*
-- *     $Id: jscript.c 666 2008-05-15 17:47:31Z dfishburn $
-+ *     $Id: jscript.c 791 2012-10-24 01:13:13Z dfishburn $
-  *
-  *     Copyright (c) 2003, Darren Hiebert
-  *
-@@ -215,6 +215,7 @@
-  *     Tag generation functions
-  */
-+/*
- static void makeConstTag (tokenInfo *const token, const jsKind kind)
- {
-       if (JsKinds [kind].enabled && ! token->ignoreTag )
-@@ -238,12 +239,13 @@
-       if (JsKinds [kind].enabled && ! token->ignoreTag )
-       {
--              /*
-+              *
-                * If a scope has been added to the token, change the token
-                * string to include the scope when making the tag.
--               */
-+               *
-               if ( vStringLength(token->scope) > 0 )
-               {
-+                      *
-                       fulltag = vStringNew ();
-                       vStringCopy(fulltag, token->scope);
-                       vStringCatS (fulltag, ".");
-@@ -251,8 +253,54 @@
-                       vStringTerminate(fulltag);
-                       vStringCopy(token->string, fulltag);
-                       vStringDelete (fulltag);
-+                      *
-+                      jsKind parent_kind = JSTAG_CLASS;
-+ 
-+                      * 
-+                       * if we're creating a function (and not a method),
-+                       * guess we're inside another function 
-+                       *
-+                      if (kind == JSTAG_FUNCTION)
-+                              parent_kind = JSTAG_FUNCTION;
-+ 
-+                      e.extensionFields.scope[0] = JsKinds [parent_kind].name;
-+                      e.extensionFields.scope[1] = vStringValue (token->scope);
-               }
--              makeConstTag (token, kind);
-+              * makeConstTag (token, kind); *
-+              makeTagEntry (&e);
-+      }
-+}
-+*/
-+
-+static void makeJsTag (tokenInfo *const token, const jsKind kind)
-+{
-+      if (JsKinds [kind].enabled && ! token->ignoreTag )
-+      {
-+              const char *const name = vStringValue (token->string);
-+              tagEntryInfo e;
-+              initTagEntry (&e, name);
-+
-+              e.lineNumber   = token->lineNumber;
-+              e.filePosition = token->filePosition;
-+              e.kindName         = JsKinds [kind].name;
-+              e.kind             = JsKinds [kind].letter;
-+
-+              if ( vStringLength(token->scope) > 0 )
-+              {
-+                      jsKind parent_kind = JSTAG_CLASS;
-+
-+                      /* 
-+                       * If we're creating a function (and not a method),
-+                       * guess we're inside another function 
-+                       */
-+                      if (kind == JSTAG_FUNCTION)
-+                              parent_kind = JSTAG_FUNCTION;
-+
-+                      e.extensionFields.scope[0] = JsKinds [parent_kind].name;
-+                      e.extensionFields.scope[1] = vStringValue (token->scope);
-+              }
-+
-+              makeTagEntry (&e);
-       }
- }
index 1a7a77818fc459d40b28ae640a463583c714a8df..d59dd8a451736b79d36477e3f1da294bb17fa8cd 100644 (file)
@@ -10,18 +10,17 @@ Summary(tr.UTF-8):  C dili için çapraz-başvuru (cross-reference) aracı
 Summary(uk.UTF-8):     Утиліта для індексації та побудови посилань для мови C
 Name:          ctags
 Version:       5.8
-Release:       5
+Release:       6
 License:       GPL v2+
 Group:         Development/Tools
 Source0:       http://downloads.sourceforge.net/ctags/%{name}-%{version}.tar.gz
 # Source0-md5: c00f82ecdcc357434731913e5b48630d
-Patch0:                format-security.patch
+Source1:       branch.sh
+Patch0:                branch.diff
+# Patch0-md5:  6a14a7eb89b1ef01f6849c9ad1fc169b
 Patch1:                %{name}-5.7-segment-fault.patch
 Patch2:                %{name}-5.8-css.patch
-Patch3:                %{name}-5.8-ocaml-crash.patch
 Patch4:                %{name}-5.8-cssparse.patch
-Patch5:                %{name}-5.8-memmove.patch
-Patch6:                %{name}-CVE-2014-7204.patch
 URL:           http://ctags.sourceforge.net/
 BuildRequires: autoconf >= 1.12
 BuildRequires: automake
@@ -136,13 +135,10 @@ Exuberant Ctags підтримує вивід файлу TAGS у стилі Emac
 
 %prep
 %setup -q
-%patch0 -p1
-%patch1 -p1
+%patch0 -p0
+#%patch1 -p1 recheck
 %patch2 -p1
-%patch3 -p1
 %patch4 -p1
-%patch5 -p1
-%patch6 -p1
 
 %build
 %{__autoconf}
diff --git a/format-security.patch b/format-security.patch
deleted file mode 100644 (file)
index 4597207..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- ctags-5.8/lregex.c~        2007-09-10 04:36:48.000000000 +0200
-+++ ctags-5.8/lregex.c 2012-12-12 12:48:02.020612120 +0100
-@@ -408,7 +408,7 @@
-               const char* regexfile = parameter + 1;
-               FILE* const fp = fopen (regexfile, "r");
-               if (fp == NULL)
--                      error (WARNING | PERROR, regexfile);
-+                      error (WARNING | PERROR, "%s", regexfile);
-               else
-               {
-                       vString* const regex = vStringNew ();
This page took 0.134287 seconds and 4 git commands to generate.