SHA256
1
0
forked from pool/file

Accepting request 461937 from Base:System

- Update to file version 5.30
  * If we exceeded the offset in a search return no match
    (Christoph Biedl)
  * Be more lenient on corrupt CDF files (Christoph Biedl)
  * pacify ubsan sign extension (oss-fuzz/524)
  * off by one in cdf parsing (PR/593)
  * report debugging sections in elf (PR/591)
  * Allow @@@ in extensions
  * Add missing overflow check in der magic (Jonas Wagner)
- Mofify the patches
    file-5.16-ocloexec.patch
    file-5.19-biorad.dif
    file-5.28-btrfs-image.dif
- Rename patch file-5.29.dif to file-5.30.dif
- Add upstream patches
    file-5.30-150735.patch
    file-5.30-3c60e5.patch

OBS-URL: https://build.opensuse.org/request/show/461937
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/file?expand=0&rev=99
This commit is contained in:
Dominique Leuenberger 2017-03-07 23:42:01 +00:00 committed by Git OBS Bridge
commit 6d69455eee
12 changed files with 133 additions and 46 deletions

View File

@ -6,7 +6,7 @@
4 files changed, 6 insertions(+), 6 deletions(-)
--- src/apprentice.c
+++ src/apprentice.c 2016-11-24 09:09:50.912104836 +0000
+++ src/apprentice.c 2017-03-02 13:18:27.595290990 +0000
@@ -1102,7 +1102,7 @@ load_1(struct magic_set *ms, int action,
ssize_t len;
struct magic_entry me;
@ -35,8 +35,8 @@
file_error(ms, errno, "cannot open `%s'", dbname);
goto out;
--- src/compress.c
+++ src/compress.c 2016-11-24 09:09:50.912104836 +0000
@@ -393,7 +393,7 @@ file_pipe2file(struct magic_set *ms, int
+++ src/compress.c 2017-03-02 13:18:27.595290990 +0000
@@ -394,7 +394,7 @@ file_pipe2file(struct magic_set *ms, int
#else
{
int te;
@ -46,7 +46,7 @@
(void)unlink(buf);
errno = te;
--- src/file.c
+++ src/file.c 2016-11-24 09:09:50.912104836 +0000
+++ src/file.c 2017-03-02 13:18:27.595290990 +0000
@@ -471,7 +471,7 @@ unwrap(struct magic_set *ms, const char
f = stdin;
wid = 1;
@ -57,7 +57,7 @@
progname, fn, strerror(errno));
return 1;
--- src/magic.c
+++ src/magic.c 2016-11-24 09:09:50.912104836 +0000
+++ src/magic.c 2017-03-02 13:18:27.595290990 +0000
@@ -442,7 +442,7 @@ file_or_fd(struct magic_set *ms, const c
else
pos = lseek(fd, (off_t)0, SEEK_CUR);

View File

@ -3,8 +3,8 @@
1 file changed, 2 insertions(+)
--- magic/Magdir/images
+++ magic/Magdir/images 2016-11-24 09:13:02.360240173 +0000
@@ -1002,6 +1002,8 @@
+++ magic/Magdir/images 2017-03-02 13:17:22.400510894 +0000
@@ -1007,6 +1007,8 @@
# http://web.archive.org/web/20050317223257/www.cs.ubc.ca/spider/ladic/text/biorad.txt
# Samples: http://www.loci.wisc.edu/software/sample-data
14 leshort <2

View File

@ -8,15 +8,15 @@ The btrfs-image in its uncompressed form contains a directly usable
superblock. Rather than duplicate the superblock printer, split
that out and use it with both the on-disk superblock and the ones
contained within the image.
---
magic/Magdir/filesystems | 37 +++++++++++++++++++++++--------------
magic/Magdir/filesystems | 37 +++++++++++++++++++++++--------------
1 file changed, 23 insertions(+), 14 deletions(-)
diff --git a/magic/Magdir/filesystems b/magic/Magdir/filesystems
index 1e8e8a8..2579f48 100644
--- a/magic/Magdir/filesystems
+++ b/magic/Magdir/filesystems
@@ -2210,20 +2210,29 @@
@@ -2229,20 +2229,29 @@
>>0x10060 string >\0 lockproto %s)
# Russell Coker <russell@coker.com.au>
@ -52,10 +52,10 @@ index 1e8e8a8..2579f48 100644
+>0x70 lequad x \b%lld bytes used,
+>0x88 lequad x %lld devices
+
+0 lequad 0xbd5c25e27295668b BTRFS Filesystem Metadata Image
+>20 byte 1 \b, zlib compressed
+>20 byte 0 \b, uncompressed
+>>0x440 string _BHRfS_M \b, contains
+0 lequad 0xbd5c25e27295668b BTRFS Filesystem Metadata Image
+>20 byte 1 \b, zlib compressed
+>20 byte 0 \b, uncompressed
+>>0x440 string _BHRfS_M \b, contains
+>>>0x400 use btrfs_super_block
# dvdisaster's .ecc

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ea661277cd39bf8f063d3a83ee875432cc3680494169f952787e002bdd3884c0
size 783919

29
file-5.30-150735.patch Normal file
View File

@ -0,0 +1,29 @@
From 1507352bc5cbdebaa9f64f1c73876ec9d8a638bc Mon Sep 17 00:00:00 2001
From: Christos Zoulas <christos@zoulas.com>
Date: Tue, 14 Feb 2017 12:56:48 +0000
Subject: [PATCH] keep "[not] stripped" last since some scripts expect it to be
there.
---
src/readelf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/readelf.c b/src/readelf.c
index d1b71cf..3695c89 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -1373,12 +1373,12 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
}
}
- if (file_printf(ms, ", %sstripped", stripped ? "" : "not ") == -1)
- return -1;
if (has_debug_info) {
if (file_printf(ms, ", with debug_info") == -1)
return -1;
}
+ if (file_printf(ms, ", %sstripped", stripped ? "" : "not ") == -1)
+ return -1;
if (cap_hw1) {
const cap_desc_t *cdp;
switch (mach) {

32
file-5.30-3c60e5.patch Normal file
View File

@ -0,0 +1,32 @@
From 3c60e59aee7425ba599d208678b62efa9a4a1d3f Mon Sep 17 00:00:00 2001
From: Christos Zoulas <christos@zoulas.com>
Date: Tue, 21 Feb 2017 18:34:55 +0000
Subject: [PATCH] bump perl to exceed 'c'
---
magic/Magdir/perl | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/magic/Magdir/perl b/magic/Magdir/perl
index bbe10ba..3423b5c 100644
--- a/magic/Magdir/perl
+++ b/magic/Magdir/perl
@@ -33,14 +33,14 @@
# by Dmitry V. Levin and Alexey Tourbin
# check the first line
-0 search/1024 package
+0 search/8192 package
>0 regex \^package[\ \t]+[0-9A-Za-z_:]+\ *; Perl5 module source text
-!:strength + 10
+!:strength + 40
# not 'p', check other lines
-0 search/1024 !p
+0 search/8192 !p
>0 regex \^package[\ \t]+[0-9A-Za-z_:]+\ *;
>>0 regex \^1\ *;|\^(use|sub|my)\ .*[(;{=] Perl5 module source text
-!:strength + 10
+!:strength + 75
# Perl POD documents
# From: Tom Hukins <tom@eborcom.com>

View File

@ -10,7 +10,7 @@
8 files changed, 312 insertions(+), 67 deletions(-)
--- magic/Magdir/elf
+++ magic/Magdir/elf 2016-11-24 09:14:28.650497856 +0000
+++ magic/Magdir/elf 2017-03-02 13:21:26.971933119 +0000
@@ -128,7 +128,7 @@
>18 leshort 47 Renesas H8/300H,
>18 leshort 48 Renesas H8S,
@ -21,7 +21,7 @@
>18 leshort 52 Motorola Coldfire,
>18 leshort 53 Motorola M68HC12,
--- magic/Magdir/linux
+++ magic/Magdir/linux 2016-11-24 09:14:28.650497856 +0000
+++ magic/Magdir/linux 2017-03-02 13:21:26.971933119 +0000
@@ -101,23 +101,27 @@
# and Nicolas Lichtmaier <nick@debian.org>
# All known start with: b8 c0 07 8e d8 b8 00 90 8e c0 b9 00 01 29 f6 29
@ -67,7 +67,7 @@
0 belong 0xb8c0078e Linux kernel
>0x1e3 string Loading version 1.3.79 or older
--- magic/Magdir/msad
+++ magic/Magdir/msad 2016-11-24 09:14:28.650497856 +0000
+++ magic/Magdir/msad 2017-03-02 13:21:26.971933119 +0000
@@ -0,0 +1,5 @@
+#------------------------------------------------------------------------------
+# msad: file(1) magic for msad
@ -75,7 +75,7 @@
+# This must precede the heuristic for raw G3 data
+4 string Standard\ Jet\ DB Microsoft Access Database
--- magic/Magdir/msdos
+++ magic/Magdir/msdos 2016-11-30 12:48:39.837023419 +0000
+++ magic/Magdir/msdos 2017-03-02 13:21:26.971933119 +0000
@@ -104,9 +104,9 @@
>>>(0x3c.l+22) leshort&0x0200 >0 (stripped to external PDB)
>>>(0x3c.l+22) leshort&0x1000 >0 system file
@ -98,7 +98,7 @@
# updated by Joerg Jenderek at Oct 2008,2015
--- magic/Makefile.am
+++ magic/Makefile.am 2016-11-24 09:15:11.733627853 +0000
+++ magic/Makefile.am 2017-03-02 13:21:26.971933119 +0000
@@ -5,7 +5,7 @@ MAGIC_FRAGMENT_BASE = Magdir
MAGIC_DIR = $(top_srcdir)/magic
MAGIC_FRAGMENT_DIR = $(MAGIC_DIR)/$(MAGIC_FRAGMENT_BASE)
@ -124,7 +124,7 @@
$(MAGIC_FRAGMENT_DIR)/finger \
$(MAGIC_FRAGMENT_DIR)/flash \
$(MAGIC_FRAGMENT_DIR)/flif \
@@ -125,6 +123,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \
@@ -126,6 +124,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \
$(MAGIC_FRAGMENT_DIR)/java \
$(MAGIC_FRAGMENT_DIR)/javascript \
$(MAGIC_FRAGMENT_DIR)/jpeg \
@ -133,7 +133,7 @@
$(MAGIC_FRAGMENT_DIR)/karma \
$(MAGIC_FRAGMENT_DIR)/kde \
$(MAGIC_FRAGMENT_DIR)/keepass \
@@ -133,7 +133,6 @@ $(MAGIC_FRAGMENT_DIR)/kml \
@@ -134,7 +134,6 @@ $(MAGIC_FRAGMENT_DIR)/kml \
$(MAGIC_FRAGMENT_DIR)/lecter \
$(MAGIC_FRAGMENT_DIR)/lex \
$(MAGIC_FRAGMENT_DIR)/lif \
@ -141,7 +141,7 @@
$(MAGIC_FRAGMENT_DIR)/lisp \
$(MAGIC_FRAGMENT_DIR)/llvm \
$(MAGIC_FRAGMENT_DIR)/lua \
@@ -141,7 +140,6 @@ $(MAGIC_FRAGMENT_DIR)/luks \
@@ -142,7 +141,6 @@ $(MAGIC_FRAGMENT_DIR)/luks \
$(MAGIC_FRAGMENT_DIR)/m4 \
$(MAGIC_FRAGMENT_DIR)/mach \
$(MAGIC_FRAGMENT_DIR)/macos \
@ -149,7 +149,7 @@
$(MAGIC_FRAGMENT_DIR)/magic \
$(MAGIC_FRAGMENT_DIR)/mail.news \
$(MAGIC_FRAGMENT_DIR)/make \
@@ -163,10 +161,10 @@ $(MAGIC_FRAGMENT_DIR)/misctools \
@@ -164,10 +162,10 @@ $(MAGIC_FRAGMENT_DIR)/misctools \
$(MAGIC_FRAGMENT_DIR)/mkid \
$(MAGIC_FRAGMENT_DIR)/mlssa \
$(MAGIC_FRAGMENT_DIR)/mmdf \
@ -161,7 +161,7 @@
$(MAGIC_FRAGMENT_DIR)/msooxml \
$(MAGIC_FRAGMENT_DIR)/msx \
$(MAGIC_FRAGMENT_DIR)/msvc \
@@ -218,6 +216,8 @@ $(MAGIC_FRAGMENT_DIR)/python \
@@ -219,6 +217,8 @@ $(MAGIC_FRAGMENT_DIR)/python \
$(MAGIC_FRAGMENT_DIR)/qt \
$(MAGIC_FRAGMENT_DIR)/revision \
$(MAGIC_FRAGMENT_DIR)/riff \
@ -170,7 +170,7 @@
$(MAGIC_FRAGMENT_DIR)/rpm \
$(MAGIC_FRAGMENT_DIR)/rtf \
$(MAGIC_FRAGMENT_DIR)/ruby \
@@ -289,8 +289,20 @@ $(MAGIC_FRAGMENT_DIR)/zfs \
@@ -291,8 +291,20 @@ $(MAGIC_FRAGMENT_DIR)/zfs \
$(MAGIC_FRAGMENT_DIR)/zilog \
$(MAGIC_FRAGMENT_DIR)/zyxel
@ -192,7 +192,7 @@
# FIXME: Build file natively as well so that it can be used to compile
# the target's magic file; for now we bail if the local version does not match
@@ -302,19 +314,22 @@ FILE_COMPILE = $(top_builddir)/src/file$
@@ -304,19 +316,22 @@ FILE_COMPILE = $(top_builddir)/src/file$
FILE_COMPILE_DEP = $(FILE_COMPILE)
endif
@ -232,7 +232,7 @@
+# $(FILE_COMPILE) -C -m magic
+# @rm -fr magic
--- magic/Makefile.in
+++ magic/Makefile.in 2016-11-24 09:15:28.789283420 +0000
+++ magic/Makefile.in 2017-03-02 13:21:26.971933119 +0000
@@ -278,7 +278,7 @@ top_srcdir = @top_srcdir@
MAGIC_FRAGMENT_BASE = Magdir
MAGIC_DIR = $(top_srcdir)/magic
@ -258,7 +258,7 @@
$(MAGIC_FRAGMENT_DIR)/finger \
$(MAGIC_FRAGMENT_DIR)/flash \
$(MAGIC_FRAGMENT_DIR)/flif \
@@ -397,6 +395,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \
@@ -398,6 +396,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \
$(MAGIC_FRAGMENT_DIR)/java \
$(MAGIC_FRAGMENT_DIR)/javascript \
$(MAGIC_FRAGMENT_DIR)/jpeg \
@ -267,7 +267,7 @@
$(MAGIC_FRAGMENT_DIR)/karma \
$(MAGIC_FRAGMENT_DIR)/kde \
$(MAGIC_FRAGMENT_DIR)/keepass \
@@ -405,7 +405,6 @@ $(MAGIC_FRAGMENT_DIR)/kml \
@@ -406,7 +406,6 @@ $(MAGIC_FRAGMENT_DIR)/kml \
$(MAGIC_FRAGMENT_DIR)/lecter \
$(MAGIC_FRAGMENT_DIR)/lex \
$(MAGIC_FRAGMENT_DIR)/lif \
@ -275,7 +275,7 @@
$(MAGIC_FRAGMENT_DIR)/lisp \
$(MAGIC_FRAGMENT_DIR)/llvm \
$(MAGIC_FRAGMENT_DIR)/lua \
@@ -413,7 +412,6 @@ $(MAGIC_FRAGMENT_DIR)/luks \
@@ -414,7 +413,6 @@ $(MAGIC_FRAGMENT_DIR)/luks \
$(MAGIC_FRAGMENT_DIR)/m4 \
$(MAGIC_FRAGMENT_DIR)/mach \
$(MAGIC_FRAGMENT_DIR)/macos \
@ -283,7 +283,7 @@
$(MAGIC_FRAGMENT_DIR)/magic \
$(MAGIC_FRAGMENT_DIR)/mail.news \
$(MAGIC_FRAGMENT_DIR)/make \
@@ -435,10 +433,10 @@ $(MAGIC_FRAGMENT_DIR)/misctools \
@@ -436,10 +434,10 @@ $(MAGIC_FRAGMENT_DIR)/misctools \
$(MAGIC_FRAGMENT_DIR)/mkid \
$(MAGIC_FRAGMENT_DIR)/mlssa \
$(MAGIC_FRAGMENT_DIR)/mmdf \
@ -295,7 +295,7 @@
$(MAGIC_FRAGMENT_DIR)/msooxml \
$(MAGIC_FRAGMENT_DIR)/msx \
$(MAGIC_FRAGMENT_DIR)/msvc \
@@ -490,6 +488,8 @@ $(MAGIC_FRAGMENT_DIR)/python \
@@ -491,6 +489,8 @@ $(MAGIC_FRAGMENT_DIR)/python \
$(MAGIC_FRAGMENT_DIR)/qt \
$(MAGIC_FRAGMENT_DIR)/revision \
$(MAGIC_FRAGMENT_DIR)/riff \
@ -304,7 +304,7 @@
$(MAGIC_FRAGMENT_DIR)/rpm \
$(MAGIC_FRAGMENT_DIR)/rtf \
$(MAGIC_FRAGMENT_DIR)/ruby \
@@ -561,10 +561,22 @@ $(MAGIC_FRAGMENT_DIR)/zfs \
@@ -563,10 +563,22 @@ $(MAGIC_FRAGMENT_DIR)/zfs \
$(MAGIC_FRAGMENT_DIR)/zilog \
$(MAGIC_FRAGMENT_DIR)/zyxel
@ -328,7 +328,7 @@
# FIXME: Build file natively as well so that it can be used to compile
# the target's magic file; for now we bail if the local version does not match
@IS_CROSS_COMPILE_TRUE@FILE_COMPILE = file${EXEEXT}
@@ -786,23 +798,25 @@ uninstall-am: uninstall-pkgdataDATA
@@ -788,23 +800,25 @@ uninstall-am: uninstall-pkgdataDATA
.PRECIOUS: Makefile
@ -371,7 +371,7 @@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
--- src/Makefile.am
+++ src/Makefile.am 2016-11-24 09:14:28.686497129 +0000
+++ src/Makefile.am 2017-03-02 13:21:26.991932745 +0000
@@ -1,4 +1,4 @@
-MAGIC = $(pkgdatadir)/magic
+MAGIC = $(sysconfdir)/magic:$(pkgdatadir)/magic
@ -379,7 +379,7 @@
nodist_include_HEADERS = magic.h
--- src/dcore.c
+++ src/dcore.c 2016-11-24 09:14:28.686497129 +0000
+++ src/dcore.c 2017-03-02 13:21:26.991932745 +0000
@@ -0,0 +1,207 @@
+/*
+ * Show goo about ELF core files

3
file-5.30.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:694c2432e5240187524c9e7cf1ec6acc77b47a0e19554d34c14773e43dbbf214
size 789345

View File

@ -1,3 +1,24 @@
-------------------------------------------------------------------
Thu Mar 2 13:22:39 UTC 2017 - werner@suse.de
- Update to file version 5.30
* If we exceeded the offset in a search return no match
(Christoph Biedl)
* Be more lenient on corrupt CDF files (Christoph Biedl)
* pacify ubsan sign extension (oss-fuzz/524)
* off by one in cdf parsing (PR/593)
* report debugging sections in elf (PR/591)
* Allow @@@ in extensions
* Add missing overflow check in der magic (Jonas Wagner)
- Mofify the patches
file-5.16-ocloexec.patch
file-5.19-biorad.dif
file-5.28-btrfs-image.dif
- Rename patch file-5.29.dif to file-5.30.dif
- Add upstream patches
file-5.30-150735.patch
file-5.30-3c60e5.patch
-------------------------------------------------------------------
Wed Nov 30 12:49:11 UTC 2016 - werner@suse.de

View File

@ -1,7 +1,7 @@
#
# spec file for package file
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -32,7 +32,7 @@ Obsoletes: file-64bit
%endif
#
# Set Version also in python-magic.spec
Version: 5.29
Version: 5.30
Release: 0
Summary: A Tool to Determine File Types
License: BSD-2-Clause
@ -40,7 +40,7 @@ Group: Productivity/File utilities
Source: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
Source2: baselibs.conf
Source3: file-rpmlintrc
Patch: file-5.29.dif
Patch: file-5.30.dif
Patch1: file-5.19-misc.dif
Patch4: file-4.24-autoconf.dif
Patch5: file-5.14-tex.dif
@ -64,6 +64,9 @@ Patch35: file-5.24-nitpick.dif
Patch36: file-5.15-clear-invalid.patch
Patch37: file-secure_getenv.patch
Patch39: file-5.28-btrfs-image.dif
# upstream fixes
Patch40: file-5.30-150735.patch
Patch41: file-5.30-3c60e5.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%global _sysconfdir /etc
%global _miscdir %{_datadir}/misc
@ -109,6 +112,8 @@ to develop applications that require the magic "file" interface.
%prep
%setup -q -n file-%{version}
%patch40 -p1 -b .p40
%patch41 -p1 -b .p41
%patch1 -p0 -b .misc
%patch4 -p0 -b .conf
%patch5 -p0 -b .tex

View File

@ -1,7 +1,7 @@
#
# spec file for package python-magic
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -28,7 +28,7 @@ BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: zlib-devel
Url: http://www.darwinsys.com/file/
Version: 5.29
Version: 5.30
Release: 0
Summary: Python module to use libmagic
License: BSD-3-Clause and BSD-4-Clause

View File

@ -1,7 +1,7 @@
#
# spec file for package python3-magic
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -28,7 +28,7 @@ BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: zlib-devel
Url: http://www.darwinsys.com/file/
Version: 5.29
Version: 5.30
Release: 0
Summary: Python module to use libmagic
License: BSD-3-Clause and BSD-4-Clause