]> git.pld-linux.org Git - packages/file.git/commitdiff
up to 5.27 auto/th/file-5.27-1
authorElan Ruusamäe <glen@delfi.ee>
Fri, 13 May 2016 16:33:05 +0000 (19:33 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Fri, 13 May 2016 16:33:05 +0000 (19:33 +0300)
001949.patch [deleted file]
file.spec
offset.patch [deleted file]
revert-close.patch [deleted file]

diff --git a/001949.patch b/001949.patch
deleted file mode 100644 (file)
index 40ef6b7..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-
-http://mx.gw.com/pipermail/file/2016/001949.html
-
-Unfortunately some new magic is problematic; here's a patch.
-
-christo
-
-Index: commands
-===================================================================
-RCS file: /p/file/cvsroot/file/magic/Magdir/commands,v
-retrieving revision 1.53
-diff -u -u -r1.53 commands
---- commands   23 Feb 2016 12:35:20 -0000      1.53
-+++ commands   17 Apr 2016 13:51:29 -0000
-@@ -101,7 +101,7 @@
- 0     string  =<?php
- >5    regex   [\ \n]
- >>6   string  /*\ Smarty\ version             Smarty compiled template
-->24   regex   [0-9.]+                         \b, version %s
-+>>>24 regex   [0-9.]+                         \b, version %s
- !:mime        text/x-php
- 0     string          Zend\x00                PHP script Zend Optimizer data
index da1f1d22b1a231e9455e45b694b5fa4aeb0e2fd4..ef2b4c5c4086e438864c9caa6f9604f3909c568f 100644 (file)
--- a/file.spec
+++ b/file.spec
@@ -29,12 +29,12 @@ Summary(uk.UTF-8):  Утиліта для визначення типів фай
 Summary(zh_CN.UTF-8):  判定文件类型的工具。
 Summary(zh_TW.UTF-8):  用於決定檔案類型的一個工具程式。
 Name:          file
-Version:       5.26
-Release:       2
+Version:       5.27
+Release:       1
 License:       distributable
 Group:         Applications/File
 Source0:       ftp://ftp.astron.com/pub/file/%{name}-%{version}.tar.gz
-# Source0-md5: bdd12400b90b78ce3c57e79c8d4e0e17
+# Source0-md5: 18f1c60aa27a296a26c2e9389ac92ba5
 Source1:       http://ftp1.pld-linux.org/people/glen/%{name}-non-english-man-pages.tar.bz2
 # Source1-md5: 6a45bcaefd19b94db36a1b2b7c5b806b
 Source2:       %{name}-zisofs.magic
@@ -44,9 +44,6 @@ Patch0:               %{name}-selinux.patch
 Patch1:                searchpath.patch
 Patch2:                automake.patch
 Patch4:                name-use-count.patch
-Patch5:                001949.patch
-Patch6:                revert-close.patch
-Patch7:                offset.patch
 URL:           http://www.darwinsys.com/file/
 BuildRequires: autoconf >= 2.50
 BuildRequires: automake
@@ -273,9 +270,6 @@ Wiązania Pythona 3 do biblioteki libmagic.
 %patch1 -p1
 %patch2 -p1
 %patch4 -p1
-%patch5 -p0 -d magic/Magdir
-%patch6 -p1 -R
-%patch7 -p1
 
 %if "%{cc_version}" < "3.4"
 %{__sed} -i -e 's,-Wextra,,' configure.ac
diff --git a/offset.patch b/offset.patch
deleted file mode 100644 (file)
index 1a38eaf..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-commit 20c59ad54afc7427ea680f84c8ee5a576ba54b08
-Author: Christos Zoulas <christos@zoulas.com>
-Date:   Mon Apr 18 15:10:34 2016 +0000
-
-    Downgrade DER comparison and offset lookup failures to be handled as match
-    failures.
-
-diff --git a/src/softmagic.c b/src/softmagic.c
-index 14a8bc5..5b5f0f9 100644
---- a/src/softmagic.c
-+++ b/src/softmagic.c
-@@ -186,11 +186,11 @@ match(struct magic_set *ms, struct magic *magic, uint32_t nmagic,
-                    ((text && (m->str_flags & FLT) == STRING_BINTEST) ||
-                     (!text && (m->str_flags & FLT) == STRING_TEXTTEST))) ||
-                   (m->flag & mode) != mode) {
-+flush:
-                       /* Skip sub-tests */
--                      while (magindex + 1 < nmagic &&
--                               magic[magindex + 1].cont_level != 0 &&
--                             ++magindex)
--                              continue;
-+                      while (magindex < nmagic - 1 &&
-+                          magic[magindex + 1].cont_level != 0)
-+                              magindex++;
-                       continue; /* Skip to next top-level test*/
-               }
-@@ -227,10 +227,7 @@ match(struct magic_set *ms, struct magic *magic, uint32_t nmagic,
-                        * main entry didn't match,
-                        * flush its continuations
-                        */
--                      while (magindex < nmagic - 1 &&
--                          magic[magindex + 1].cont_level != 0)
--                              magindex++;
--                      continue;
-+                      goto flush;
-               }
-               if ((e = handle_annotation(ms, m)) != 0) {
-@@ -255,8 +252,14 @@ match(struct magic_set *ms, struct magic *magic, uint32_t nmagic,
-               if (print && mprint(ms, m) == -1)
-                       return -1;
--              if (moffset(ms, m, nbytes, &ms->c.li[cont_level].off) == -1)
-+              switch (moffset(ms, m, nbytes, &ms->c.li[cont_level].off)) {
-+              case -1:
-                       return -1;
-+              case 0:
-+                      goto flush;
-+              default:
-+                      break;
-+              }
-               /* and any continuations that match */
-               if (file_check_mem(ms, ++cont_level) == -1)
-@@ -362,9 +365,16 @@ match(struct magic_set *ms, struct magic *magic, uint32_t nmagic,
-                               if (print && mprint(ms, m) == -1)
-                                       return -1;
--                              if (moffset(ms, m, nbytes,
--                                  &ms->c.li[cont_level].off) == -1)
-+                              switch (moffset(ms, m, nbytes,
-+                                  &ms->c.li[cont_level].off)) {
-+                              case -1:
-                                       return -1;
-+                              case 0:
-+                                      flush = 1;
-+                                      break;
-+                              default:
-+                                      break;
-+                              }
-                               if (*m->desc)
-                                       *need_separator = 1;
-@@ -813,9 +823,13 @@ moffset(struct magic_set *ms, struct magic *m, size_t nbytes, int32_t *op)
-       case FILE_DER:
-               {
-                       o = der_offs(ms, m, nbytes);
--                      if (o == -1) {
--                              file_error(ms, 0, "EOF computing DER offset");
--                              return -1;
-+                      if (o == -1 || (size_t)o > nbytes) {
-+                              if ((ms->flags & MAGIC_DEBUG) != 0) {
-+                                      (void)fprintf(stderr,
-+                                          "Bad DER offset %d nbytes=%zu",
-+                                          o, nbytes);
-+                              }
-+                              return 0;
-                       }
-                       break;
-               }
-@@ -825,12 +839,13 @@ moffset(struct magic_set *ms, struct magic *m, size_t nbytes, int32_t *op)
-               break;
-       }
--      if ((size_t)o >= nbytes) {
--              file_error(ms, 0, "Offset out of range");
-+      if ((size_t)o > nbytes) {
-+              file_error(ms, 0, "Offset out of range %zu > %zu",
-+                  (size_t)o, nbytes);
-               return -1;
-       }
-       *op = o;
--      return 0;
-+      return 1;
- }
- private uint32_t
-@@ -2107,8 +2122,13 @@ magiccheck(struct magic_set *ms, struct magic *m)
-               return 1;
-       case FILE_DER:
-               matched = der_cmp(ms, m);
--              if (matched == -1)
--                      file_error(ms, 0, "EOF comparing DER entries");
-+              if (matched == -1) {
-+                      if ((ms->flags & MAGIC_DEBUG) != 0) {
-+                              (void) fprintf(stderr,
-+                                  "EOF comparing DER entries");
-+                      }
-+                      return 0;
-+              }
-               return matched;
-       default:
-               file_magerror(ms, "invalid type %d in magiccheck()", m->type);
diff --git a/revert-close.patch b/revert-close.patch
deleted file mode 100644 (file)
index ab72671..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-commit c8581da4c79cfc3fe52bb6c398497ff3a9986abd
-Author: Christos Zoulas <christos@zoulas.com>
-Date:   Mon Feb 8 02:20:36 2016 +0000
-
-    doesn't matter if it is stdin; if we opened it, we close it.
-
-diff --git a/src/magic.c b/src/magic.c
-index 30faa8a..c3ceb50 100644
---- a/src/magic.c
-+++ b/src/magic.c
-@@ -346,7 +346,7 @@ private void
- close_and_restore(const struct magic_set *ms, const char *name, int fd,
-     const struct stat *sb)
- {
--      if (fd == STDIN_FILENO || name == NULL)
-+      if (name == NULL)
-               return;
-       (void) close(fd);
This page took 0.08538 seconds and 4 git commands to generate.