Add upstream bug fix commits
OBS-URL: https://build.opensuse.org/package/show/Base:System/file?expand=0&rev=223
This commit is contained in:
parent
420457b0b9
commit
e74af090ef
@ -1,6 +1,6 @@
|
||||
--- file-5.39/src/file.c.orig 2020-06-17 16:13:36.625305367 +0200
|
||||
+++ file-5.39/src/file.c 2020-06-17 16:15:12.429553163 +0200
|
||||
@@ -249,6 +249,8 @@
|
||||
@@ -251,6 +251,8 @@
|
||||
break;
|
||||
case 'e':
|
||||
case OPT_EXCLUDE_QUIET:
|
||||
@ -9,7 +9,7 @@
|
||||
for (i = 0; i < __arraycount(nv); i++)
|
||||
if (strcmp(nv[i].name, optarg) == 0)
|
||||
break;
|
||||
@@ -261,7 +263,7 @@
|
||||
@@ -263,7 +265,7 @@
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
@ -18,7 +18,7 @@
|
||||
usage();
|
||||
if (magic == NULL)
|
||||
if ((magic = load(magicfile, flags)) == NULL)
|
||||
@@ -271,6 +273,8 @@
|
||||
@@ -273,6 +275,8 @@
|
||||
++didsomefiles;
|
||||
break;
|
||||
case 'F':
|
||||
@ -27,7 +27,7 @@
|
||||
separator = optarg;
|
||||
break;
|
||||
case 'i':
|
||||
@@ -283,6 +287,8 @@
|
||||
@@ -285,6 +289,8 @@
|
||||
action = FILE_LIST;
|
||||
break;
|
||||
case 'm':
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
--- magic/Magdir/images
|
||||
+++ magic/Magdir/images 2019-05-27 08:52:51.674238380 +0000
|
||||
@@ -1290,6 +1290,8 @@
|
||||
@@ -1348,6 +1348,8 @@
|
||||
# https://web.archive.org/web/20050317223257/www.cs.ubc.ca/spider/ladic/text/biorad.txt
|
||||
# Samples: https://www.loci.wisc.edu/software/sample-data
|
||||
14 leshort <2
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
--- src/apprentice.c
|
||||
+++ src/apprentice.c 2019-02-21 06:39:25.249091320 +0000
|
||||
@@ -2465,6 +2465,12 @@ check_format_type(const char *ptr, int t
|
||||
@@ -2476,6 +2476,12 @@ check_format_type(const char *ptr, int t
|
||||
ptr++;
|
||||
if (*ptr == '#')
|
||||
ptr++;
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
--- magic/Magdir/archive
|
||||
+++ magic/Magdir/archive 2019-02-21 06:49:05.298138025 +0000
|
||||
@@ -1102,6 +1102,11 @@
|
||||
@@ -1117,6 +1117,11 @@
|
||||
0 string PK\x07\x08PK\x03\x04 Zip multi-volume archive data, at least PKZIP v2.50 to extract
|
||||
!:mime application/zip
|
||||
!:ext zip/cbz
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
--- src/readelf.c
|
||||
+++ src/readelf.c 2019-02-21 06:41:38.598573505 +0000
|
||||
@@ -818,7 +818,7 @@ do_core_note(struct magic_set *ms, unsig
|
||||
@@ -824,7 +824,7 @@ do_core_note(struct magic_set *ms, unsig
|
||||
|
||||
default:
|
||||
if (type == NT_PRPSINFO && *flags & FLAGS_IS_CORE) {
|
||||
@ -13,7 +13,7 @@
|
||||
unsigned char c;
|
||||
/*
|
||||
* Extract the program name. We assume
|
||||
@@ -830,7 +830,9 @@ do_core_note(struct magic_set *ms, unsig
|
||||
@@ -836,7 +836,9 @@ do_core_note(struct magic_set *ms, unsig
|
||||
* If the characters aren't all printable,
|
||||
* reject it.
|
||||
*/
|
||||
|
@ -29,7 +29,7 @@
|
||||
private char *mkdbname(struct magic_set *, const char *, int);
|
||||
private struct magic_map *apprentice_buf(struct magic_set *, struct magic *,
|
||||
size_t);
|
||||
@@ -3336,67 +3338,6 @@ byteswap(struct magic *magic, uint32_t n
|
||||
@@ -3347,67 +3349,6 @@ byteswap(struct magic *magic, uint32_t n
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -16,7 +16,7 @@ contained within the image.
|
||||
diff --git a/magic/Magdir/filesystems b/magic/Magdir/filesystems
|
||||
--- a/magic/Magdir/filesystems
|
||||
+++ b/magic/Magdir/filesystems
|
||||
@@ -2281,20 +2281,29 @@
|
||||
@@ -2296,20 +2296,29 @@
|
||||
>>0x10060 string >\0 lockproto %s)
|
||||
|
||||
# Russell Coker <russell@coker.com.au>
|
||||
|
@ -2,7 +2,7 @@ Index: file-5.38/src/seccomp.c
|
||||
===================================================================
|
||||
--- file-5.38.orig/src/seccomp.c
|
||||
+++ file-5.38/src/seccomp.c
|
||||
@@ -206,6 +206,9 @@ enable_sandbox_full(void)
|
||||
@@ -205,6 +205,9 @@ enable_sandbox_full(void)
|
||||
#ifdef __NR_newfstatat
|
||||
ALLOW_RULE(newfstatat);
|
||||
#endif
|
||||
|
36
file-5.40-1c677c04.patch
Normal file
36
file-5.40-1c677c04.patch
Normal file
@ -0,0 +1,36 @@
|
||||
From 1c677c04c0fa43ecfeccdb9705dbbd19fb356891 Mon Sep 17 00:00:00 2001
|
||||
From: Christos Zoulas <christos@zoulas.com>
|
||||
Date: Sun, 4 Apr 2021 21:02:19 +0000
|
||||
Subject: [PATCH] Don't count each byte encounter as 1, count the total number
|
||||
of bytes found (Anatol Belski). This makes it behave like 5.39.
|
||||
|
||||
---
|
||||
src/encoding.c | 5 ++---
|
||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git src/encoding.c src/encoding.c
|
||||
index c8b40439..c66703bb 100644
|
||||
--- src/encoding.c
|
||||
+++ src/encoding.c
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "file.h"
|
||||
|
||||
#ifndef lint
|
||||
-FILE_RCSID("@(#)$File: encoding.c,v 1.27 2021/02/05 21:33:49 christos Exp $")
|
||||
+FILE_RCSID("@(#)$File: encoding.c,v 1.28 2021/04/04 21:02:19 christos Exp $")
|
||||
#endif /* lint */
|
||||
|
||||
#include "magic.h"
|
||||
@@ -282,8 +282,7 @@ looks_ ## NAME(const unsigned char *buf, size_t nbytes, file_unichar_t *ubuf, \
|
||||
} \
|
||||
u = 0; \
|
||||
for (i = 0; i < __arraycount(dist); i++) { \
|
||||
- if (dist[i]) \
|
||||
- u++; \
|
||||
+ u+= dist[i]; \
|
||||
} \
|
||||
if (u < 3) \
|
||||
return 0; \
|
||||
--
|
||||
2.26.2
|
||||
|
29
file-5.40-6b34436a.patch
Normal file
29
file-5.40-6b34436a.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From 6b34436ac766dae64749b8d14f18c6910be40131 Mon Sep 17 00:00:00 2001
|
||||
From: Christos Zoulas <christos@zoulas.com>
|
||||
Date: Mon, 5 Apr 2021 16:36:14 +0000
|
||||
Subject: [PATCH] remove "u" from the pattern (Joerg Jenderek)
|
||||
|
||||
---
|
||||
magic/Magdir/mail.news | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git magic/Magdir/mail.news magic/Magdir/mail.news
|
||||
index 3a2eeb96..6a222910 100644
|
||||
--- magic/Magdir/mail.news
|
||||
+++ magic/Magdir/mail.news
|
||||
@@ -1,5 +1,5 @@
|
||||
#------------------------------------------------------------------------------
|
||||
-# $File: mail.news,v 1.26 2021/03/21 14:37:03 christos Exp $
|
||||
+# $File: mail.news,v 1.27 2021/04/05 16:36:14 christos Exp $
|
||||
# mail.news: file(1) magic for mail and news
|
||||
#
|
||||
# Unfortunately, saved netnews also has From line added in some news software.
|
||||
@@ -81,4 +81,4 @@
|
||||
# File format spec: https://wiki.dovecot.org/Design/Dcrypt/#File_format
|
||||
# From: Stephen Gildea
|
||||
0 string CRYPTED\003\007 Dovecot encrypted message
|
||||
->9 byte xu \b, dcrypt version %d
|
||||
+>9 byte x \b, dcrypt version %d
|
||||
--
|
||||
2.26.2
|
||||
|
25
file-5.40-9e2becec.patch
Normal file
25
file-5.40-9e2becec.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 9e2becec20d023409a1671bf10a682f699350e85 Mon Sep 17 00:00:00 2001
|
||||
From: Christos Zoulas <christos@zoulas.com>
|
||||
Date: Sun, 4 Apr 2021 21:03:43 +0000
|
||||
Subject: [PATCH] Encoding bug fix.
|
||||
|
||||
---
|
||||
ChangeLog | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git ChangeLog ChangeLog
|
||||
index 23a93cf4..2238ba6f 100644
|
||||
--- ChangeLog
|
||||
+++ ChangeLog
|
||||
@@ -1,3 +1,8 @@
|
||||
+2021-04-04 17:02 Christos Zoulas <christos@zoulas.com>
|
||||
+
|
||||
+ * count the total bytes found not the total byte positions
|
||||
+ in order to determine encoding (Anatol Belski)
|
||||
+
|
||||
2021-03-30 20:21 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* release 5.40
|
||||
--
|
||||
2.26.2
|
||||
|
@ -22,7 +22,7 @@ Index: file-5.38/src/file.h
|
||||
===================================================================
|
||||
--- file-5.38.orig/src/file.h
|
||||
+++ file-5.38/src/file.h
|
||||
@@ -676,4 +676,12 @@ static const char *rcsid(const char *p)
|
||||
@@ -691,4 +691,12 @@ static const char *rcsid(const char *p)
|
||||
#define __RCSID(a)
|
||||
#endif
|
||||
|
||||
|
22
file.changes
22
file.changes
@ -1,3 +1,25 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 6 07:39:00 UTC 2021 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- Add upstream commits as patches
|
||||
* file-5.40-1c677c04.patch
|
||||
Don't count each byte encounter as 1, count the total number
|
||||
of bytes found (Anatol Belski). This makes it behave like 5.39
|
||||
* file-5.40-6b34436a.patch
|
||||
remove "u" from the pattern (Joerg Jenderek)
|
||||
* file-5.40-9e2becec.patch
|
||||
Encoding bug fix
|
||||
- Fix offsets of patches
|
||||
* file-5.17-option.dif
|
||||
* file-5.19-biorad.dif
|
||||
* file-5.19-printf.dif
|
||||
* file-5.19-zip2.0.dif
|
||||
* file-5.22-elf.dif
|
||||
* file-5.23-endian.patch
|
||||
* file-5.28-btrfs-image.dif
|
||||
* file-5.38-allow-readlinkat.dif
|
||||
* file-secure_getenv.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Apr 3 07:32:11 UTC 2021 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
|
@ -64,6 +64,10 @@ Patch34: file-5.23-endian.patch
|
||||
Patch37: file-secure_getenv.patch
|
||||
Patch39: file-5.28-btrfs-image.dif
|
||||
Patch40: file-5.38-allow-readlinkat.dif
|
||||
# Upstream commits as patches
|
||||
Patch41: file-5.40-1c677c04.patch
|
||||
Patch42: file-5.40-9e2becec.patch
|
||||
Patch43: file-5.40-6b34436a.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%global _sysconfdir /etc
|
||||
%global _miscdir %{_datadir}/misc
|
||||
@ -107,6 +111,9 @@ to develop applications that require the magic "file" interface.
|
||||
|
||||
%prep
|
||||
%setup -q -n file-%{version}
|
||||
%patch41 -p0
|
||||
%patch42 -p0
|
||||
%patch43 -p0
|
||||
%patch1 -p0 -b .misc
|
||||
%patch4 -p0 -b .conf
|
||||
%patch5 -p0 -b .tex
|
||||
|
Loading…
Reference in New Issue
Block a user