update to new version 5.29
This commit is contained in:
parent
c3d464c025
commit
6947e7d7e3
@ -5,27 +5,14 @@ Subject: [PATCH] file-5.04-generic-msdos.patch
|
||||
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
magic/Magdir/msdos | 46 +++++++++++++++++++++++-----------------------
|
||||
1 file changed, 23 insertions(+), 23 deletions(-)
|
||||
magic/Magdir/msdos | 38 +++++++++++++++++++-------------------
|
||||
1 file changed, 19 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/magic/Magdir/msdos b/magic/Magdir/msdos
|
||||
index d1a19a6..9e89f11 100644
|
||||
--- a/magic/Magdir/msdos
|
||||
+++ b/magic/Magdir/msdos
|
||||
@@ -333,9 +333,9 @@
|
||||
# but it isn't feasible to match all COM files since there must be at least
|
||||
# two dozen different one-byte "magics".
|
||||
# test too generic ?
|
||||
-0 byte 0xe9 DOS executable (COM)
|
||||
->0x1FE leshort 0xAA55 \b, boot code
|
||||
->6 string SFX\ of\ LHarc (%s)
|
||||
+#0 byte 0xe9 DOS executable (COM)
|
||||
+#>0x1FE leshort 0xAA55 \b, boot code
|
||||
+#>6 string SFX\ of\ LHarc (%s)
|
||||
|
||||
# DOS device driver updated by Joerg Jenderek at May 2011
|
||||
# http://maben.homeip.net/static/S100/IBM/software/DOS/DOS%20techref/CHAPTER.009
|
||||
@@ -413,7 +413,7 @@
|
||||
@@ -404,7 +404,7 @@
|
||||
# GRR: line below too general as it catches also
|
||||
# rt.lib DYADISKS.PIC and many more
|
||||
# start with assembler instruction MOV
|
||||
@ -34,29 +21,31 @@ index d1a19a6..9e89f11 100644
|
||||
# skip "AppleWorks word processor data" like ARTICLE.1 ./apple
|
||||
>4 string !O====
|
||||
# skip some unknown basic binaries like RocketRnger.SHR
|
||||
@@ -437,14 +437,14 @@
|
||||
@@ -428,17 +428,17 @@
|
||||
# updated by Joerg Jenderek at Oct 2008
|
||||
0 ulelong 0xffff10eb DR-DOS executable (COM)
|
||||
# byte 0xeb conflicts with "sequent" magic leshort 0xn2eb
|
||||
-0 ubeshort&0xeb8d >0xeb00
|
||||
+#0 ubeshort&0xeb8d >0xeb00
|
||||
# DR-DOS STACKER.COM SCREATE.SYS missed
|
||||
->0 byte 0xeb
|
||||
->>0x1FE leshort 0xAA55 DOS executable (COM), boot code
|
||||
->>85 string UPX DOS executable (COM), UPX compressed
|
||||
->>4 string \ $ARX DOS executable (COM), ARX self-extracting archive
|
||||
->>4 string \ $LHarc DOS executable (COM), LHarc self-extracting archive
|
||||
->>0x20e string SFX\ by\ LARC DOS executable (COM), LARC self-extracting archive
|
||||
+#>0 byte 0xeb
|
||||
+#>>0x1FE leshort 0xAA55 DOS executable (COM), boot code
|
||||
+#>>85 string UPX DOS executable (COM), UPX compressed
|
||||
+#>>4 string \ $ARX DOS executable (COM), ARX self-extracting archive
|
||||
+#>>4 string \ $LHarc DOS executable (COM), LHarc self-extracting archive
|
||||
+#>>0x20e string SFX\ by\ LARC DOS executable (COM), LARC self-extracting archive
|
||||
# updated by Joerg Jenderek at Oct 2008,2015
|
||||
# following line is too general
|
||||
0 ubyte 0xb8
|
||||
@@ -492,27 +492,27 @@
|
||||
|
||||
0 name msdos-com
|
||||
>0 byte x DOS executable (COM)
|
||||
>6 string SFX\ of\ LHarc \b, %s
|
||||
->0x1FE leshort 0xAA55 \b, boot code
|
||||
->85 string UPX \b, UPX compressed
|
||||
->4 string \ $ARX \b, ARX self-extracting archive
|
||||
->4 string \ $LHarc \b, LHarc self-extracting archive
|
||||
->0x20e string SFX\ by\ LARC \b, LARC self-extracting archive
|
||||
+#>0x1FE leshort 0xAA55 \b, boot code
|
||||
+#>85 string UPX \b, UPX compressed
|
||||
+#>4 string \ $ARX \b, ARX self-extracting archive
|
||||
+#>4 string \ $LHarc \b, LHarc self-extracting archive
|
||||
+#>0x20e string SFX\ by\ LARC \b, LARC self-extracting archive
|
||||
|
||||
# JMP 8bit
|
||||
0 byte 0xeb
|
||||
@@ -508,27 +508,27 @@
|
||||
# GRR search is not working
|
||||
#2 search/28 \xcd\x21 COM executable for MS-DOS
|
||||
#WHICHFAT.cOM
|
||||
|
||||
@ -12,7 +12,7 @@ diff --git a/doc/file.man b/doc/file.man
|
||||
index fff7730..3a524f5 100644
|
||||
--- a/doc/file.man
|
||||
+++ b/doc/file.man
|
||||
@@ -583,6 +583,11 @@ program, and are not covered by the above license.
|
||||
@@ -586,6 +586,11 @@ program, and are not covered by the above license.
|
||||
.Sh RETURN CODE
|
||||
.Nm
|
||||
returns 0 on success, and non-zero on error.
|
||||
|
||||
@ -12,7 +12,7 @@ diff --git a/magic/Magdir/python b/magic/Magdir/python
|
||||
index d954ee6..52796ba 100644
|
||||
--- a/magic/Magdir/python
|
||||
+++ b/magic/Magdir/python
|
||||
@@ -42,20 +42,24 @@
|
||||
@@ -43,20 +43,24 @@
|
||||
# from module.submodule import func1, func2
|
||||
0 regex \^from\\s+(\\w|\\.)+\\s+import.*$ Python script text executable
|
||||
!:mime text/x-python
|
||||
@ -43,7 +43,7 @@ index d954ee6..52796ba 100644
|
||||
|
||||
# try:
|
||||
# except: or finally:
|
||||
@@ -65,8 +69,10 @@
|
||||
@@ -66,8 +70,10 @@
|
||||
!:mime text/x-python
|
||||
>&0 search/4096 finally: Python script text executable
|
||||
!:mime text/x-python
|
||||
|
||||
@ -1,39 +0,0 @@
|
||||
From 62e28c9ee3a66f6401da0acd414eb07cd1bf8a4e Mon Sep 17 00:00:00 2001
|
||||
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||
Date: Mon, 27 Jun 2016 00:52:25 +0200
|
||||
Subject: [PATCH] compress: don't try to copy NULL string
|
||||
|
||||
In zlib there are few functions which can fail and set msg
|
||||
to NULL instead of some message.
|
||||
|
||||
if we pass NULL as source then strlcpy just crashes because it
|
||||
tries to dereference NULL-pointer so for error reporting when
|
||||
msg is NULL we will just convert rc to message via zError().
|
||||
|
||||
In case of RPM's usage inflate() was returning Z_NEED_DICT.
|
||||
|
||||
References: https://bugzilla.redhat.com/show_bug.cgi?id=1350252
|
||||
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||
---
|
||||
src/compress.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/compress.c b/src/compress.c
|
||||
index 1988fe7..6f6e967 100644
|
||||
--- a/src/compress.c
|
||||
+++ b/src/compress.c
|
||||
@@ -517,7 +517,10 @@ uncompresszlib(const unsigned char *old, unsigned char **newch,
|
||||
|
||||
return OKDATA;
|
||||
err:
|
||||
- strlcpy((char *)*newch, z.msg, bytes_max);
|
||||
+ if (z.msg != NULL)
|
||||
+ strlcpy((char *)*newch, z.msg, bytes_max);
|
||||
+ else
|
||||
+ strlcpy((char *)*newch, zError(rc), bytes_max);
|
||||
*n = strlen((char *)*newch);
|
||||
return ERRDATA;
|
||||
}
|
||||
--
|
||||
2.5.5
|
||||
|
||||
@ -1,45 +0,0 @@
|
||||
From ca13da68883e74d287cfb44b596cd134a82c4b7e Mon Sep 17 00:00:00 2001
|
||||
From: Christos Zoulas <christos@zoulas.com>
|
||||
Date: Tue, 28 Jun 2016 17:10:22 +0000
|
||||
Subject: [PATCH] PR/562: Reiner Herrmann: Avoid double encoding with python3
|
||||
|
||||
Upstream-commit: 73e043d2a986234b187a00ed0c8d1f7bf83df372
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
python/magic.py | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/python/magic.py b/python/magic.py
|
||||
index c48f7d5..b0f7a17 100644
|
||||
--- a/python/magic.py
|
||||
+++ b/python/magic.py
|
||||
@@ -134,7 +134,7 @@ class Magic(object):
|
||||
if isinstance(r, str):
|
||||
return r
|
||||
else:
|
||||
- return str(r).encode('utf-8')
|
||||
+ return str(r, 'utf-8')
|
||||
|
||||
def descriptor(self, fd):
|
||||
"""
|
||||
@@ -152,7 +152,7 @@ class Magic(object):
|
||||
if isinstance(r, str):
|
||||
return r
|
||||
else:
|
||||
- return str(r).encode('utf-8')
|
||||
+ return str(r, 'utf-8')
|
||||
|
||||
def error(self):
|
||||
"""
|
||||
@@ -163,7 +163,7 @@ class Magic(object):
|
||||
if isinstance(e, str):
|
||||
return e
|
||||
else:
|
||||
- return str(e).encode('utf-8')
|
||||
+ return str(e, 'utf-8')
|
||||
|
||||
def setflags(self, flags):
|
||||
"""
|
||||
--
|
||||
2.5.5
|
||||
|
||||
@ -50,9 +50,9 @@ diff --git a/src/apprentice.c b/src/apprentice.c
|
||||
index e395854..ecc1214 100644
|
||||
--- a/src/apprentice.c
|
||||
+++ b/src/apprentice.c
|
||||
@@ -452,7 +452,7 @@ apprentice_1(struct magic_set *ms, const char *fn, int action)
|
||||
#ifndef COMPILE_ONLY
|
||||
map = apprentice_map(ms, fn);
|
||||
@@ -454,7 +454,7 @@ apprentice_1(struct magic_set *ms, const char *fn, int action)
|
||||
if (map == (struct magic_map *)-1)
|
||||
return -1;
|
||||
if (map == NULL) {
|
||||
- if (ms->flags & MAGIC_CHECK)
|
||||
+ if (ms->flags & MAGIC_CHECK && strcmp("/etc/magic", fn) != 0)
|
||||
|
||||
16
file.spec
16
file.spec
@ -4,8 +4,8 @@
|
||||
|
||||
Summary: A utility for determining file types
|
||||
Name: file
|
||||
Version: 5.28
|
||||
Release: 4%{?dist}
|
||||
Version: 5.29
|
||||
Release: 1%{?dist}
|
||||
License: BSD
|
||||
Group: Applications/File
|
||||
Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
|
||||
@ -25,12 +25,6 @@ Patch14: file-5.19-cafebabe.patch
|
||||
Patch15: file-5.22-awk-perl.patch
|
||||
Patch17: file-5.24-varied.patch
|
||||
|
||||
# https://github.com/file/file/pull/8
|
||||
Patch100: file-5.28-compress-sigsegv.patch
|
||||
|
||||
# avoid double encoding with Python 3 (#1367144)
|
||||
Patch101: file-5.28-py3-double-enc.patch
|
||||
|
||||
URL: http://www.darwinsys.com/file/
|
||||
Requires: file-libs = %{version}-%{release}
|
||||
BuildRequires: zlib-devel
|
||||
@ -103,9 +97,6 @@ file(1) command.
|
||||
%patch15 -p1
|
||||
%patch17 -p1
|
||||
|
||||
%patch100 -p1
|
||||
%patch101 -p1
|
||||
|
||||
# Patches can generate *.orig files, which can't stay in the magic dir,
|
||||
# otherwise there will be problems with compiling magic file!
|
||||
rm -fv magic/Magdir/*.orig
|
||||
@ -212,6 +203,9 @@ cd %{py3dir}
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Oct 25 2016 Kamil Dudka <kdudka@redhat.com> - 5.29-1
|
||||
- update to new version 5.29
|
||||
|
||||
* Wed Aug 17 2016 Kamil Dudka <kdudka@redhat.com> - 5.28-4
|
||||
- avoid double encoding with Python 3 (#1367144)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user