Hello community,

here is the log from the commit of package file for openSUSE:Factory checked in 
at 2016-08-22 10:50:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/file (Old)
 and      /work/SRC/openSUSE:Factory/.file.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "file"

Changes:
--------
--- /work/SRC/openSUSE:Factory/file/file.changes        2016-02-22 
10:09:47.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.file.new/file.changes   2016-08-22 
10:50:17.000000000 +0200
@@ -1,0 +2,107 @@
+Thu Aug 18 12:24:36 UTC 2016 - [email protected]
+
+- Add patch file-5.28-compress.patch
+  to fix crash as found in build system
+
+-------------------------------------------------------------------
+Tue Aug 16 11:59:36 UTC 2016 - [email protected]
+
+- Update to file version 5.28
+  * fix leak on allocation failure
+  * PR/555: Avoid overflow for offset > nbytes
+  * PR/550: Segv on DER parsing:
+      - use the correct variable for length
+      - set offset to 0 on failure.
+- Port patches to 5.28
+  file-4.24-autoconf.dif
+  file-5.15-clear-invalid.patch
+  file-5.16-ocloexec.patch
+  file-5.19-biorad.dif
+  file-5.23-endian.patch
+  file-5.24-nitpick.dif
+  file-secure_getenv.patch
+- Remove patches now upstream
+  file-5.26-revert-close.patch
+- Rename patches
+  file-5.26.dif becomes file-5.28.dif
+
+-------------------------------------------------------------------
+Wed Jun  1 10:17:08 UTC 2016 - [email protected]
+
+- Update to file version 5.27
+  * Errors comparing DER entries or computing offsets
+    are just indications of malformed non-DER files.
+    Don't print them.
+  * Offset comparison was off-by-one.
+  * Fix compression code (Werner Fink)
+  * Put new bytes constant in the right file (not the generated one)
+- Remove patches
+    file-5.26-version.patch
+    file-5.26-downgrade_DER.patch
+    file-5.26-console.diff
+    file-5.26-zmagic.patch
+  as now upstream
+- Disable patch file-5.26-revert-close.patch for test
+- Modify patches
+    file-5.17-option.dif
+    file-5.26.dif
+
+-------------------------------------------------------------------
+Wed Apr 20 07:14:15 UTC 2016 - [email protected]
+
+- Add and revert upstream patch file-5.26-revert-close.patch
+  (commit 0177f6dd30e1f8c5639c058dcdf1d9edd9f8528c) to help
+  rpmbuild not to loose stdin 
+
+-------------------------------------------------------------------
+Tue Apr 19 11:52:49 UTC 2016 - [email protected]
+
+- Add patch file-5.26-zmagic.patch
+  to fix detection chain if for compresses files are expanded
+
+-------------------------------------------------------------------
+Tue Apr 19 09:38:07 UTC 2016 - [email protected]
+
+- Add upstream patch file-5.26-console.diff
+  to fix wrong detection of UNIF edb files 
+
+-------------------------------------------------------------------
+Tue Apr 19 09:35:28 UTC 2016 - [email protected]
+
+- Add upstream patch file-5.26-downgrade_DER.patch
+  to fix DER error messages as well oas offset handling 
+
+-------------------------------------------------------------------
+Mon Apr 18 12:13:33 UTC 2016 - [email protected]
+
+- Update to file version 5.26
+  * make the number of bytes read from files configurable.
+  * Add bounds checks for DER code (discovered by Thomas Jarosch)
+  * Change indirect recursion limit to indirect use count and
+    bump from 15 to 50 to prevent abuse.
+  * Add -00 which prints filename\0description\0
+  * Fix ID3 indirect parsing
+  * add DER parsing capability
+  * provide dprintf(3) for the OS's that don't have it.
+  * redo the compression code report decompression errors
+  * REG_STARTEND code is not working as expected, delete it.
+  * Add zlib support if we have it.
+  * PR/492: compression forking was broken with magic_buffer.
+- Removed patches as upstream now 
+   file-4.24-mips.dif
+   file-5.25-avoid-double-evaluation-in-python-bindings.dif
+- Modified patches
+   file-5.12-zip.dif
+   file-5.16-ocloexec.patch
+   file-5.19-printf.dif
+   file-5.19-zip2.0.dif
+   file-5.22-elf.dif
+   file-5.23-endian.patch
+   file-5.24-nitpick.dif
+   file-secure_getenv.patch
+- Renamed patches
+   file-5.23.dif becomes file-5.26.dif
+- Added patch from upstream to fix version handling of PHP files
+   file-5.26-version.patch
+
+-------------------------------------------------------------------
--- /work/SRC/openSUSE:Factory/file/python-magic.changes        2016-02-22 
10:09:47.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.file.new/python-magic.changes   2016-08-22 
10:50:17.000000000 +0200
@@ -1,0 +2,10 @@
+Wed Apr 20 08:49:18 UTC 2016 - [email protected]
+
+- Add Build Require python-setuptools
+
+-------------------------------------------------------------------
+Mon Apr 18 12:21:12 UTC 2016 - [email protected]
+
+- Now it's file 5.26 
+
+-------------------------------------------------------------------
--- /work/SRC/openSUSE:Factory/file/python3-magic.changes       2016-02-22 
10:09:47.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.file.new/python3-magic.changes  2016-08-22 
10:50:17.000000000 +0200
@@ -1,0 +2,10 @@
+Wed Apr 20 08:49:18 UTC 2016 - [email protected]
+
+- Add Build Require python3-setuptools
+
+-------------------------------------------------------------------
+Mon Apr 18 12:21:42 UTC 2016 - [email protected]
+
+- Now it's file 5.26 
+
+-------------------------------------------------------------------

Old:
----
  file-4.24-mips.dif
  file-5.23.dif
  file-5.25-avoid-double-evaluation-in-python-bindings.dif
  file-5.25.tar.gz

New:
----
  file-5.28-compress.patch
  file-5.28.dif
  file-5.28.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ file.spec ++++++
--- /var/tmp/diff_new_pack.QkVfC0/_old  2016-08-22 10:50:18.000000000 +0200
+++ /var/tmp/diff_new_pack.QkVfC0/_new  2016-08-22 10:50:18.000000000 +0200
@@ -32,7 +32,7 @@
 %endif
 #
 # Set Version also in python-magic.spec
-Version:        5.25
+Version:        5.28
 Release:        0
 Summary:        A Tool to Determine File Types
 License:        BSD-2-Clause
@@ -40,7 +40,7 @@
 Source:         ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
 Source2:        baselibs.conf
 Source3:        file-rpmlintrc
-Patch:          file-5.23.dif
+Patch:          file-5.28.dif
 Patch1:         file-5.19-misc.dif
 Patch4:         file-4.24-autoconf.dif
 Patch5:         file-5.14-tex.dif
@@ -52,7 +52,6 @@
 Patch12:        file-5.17-option.dif
 Patch13:        file-4.21-scribus.dif
 Patch15:        file-4.21-xcursor.dif
-Patch20:        file-4.24-mips.dif
 Patch22:        file-5.19-cromfs.dif
 Patch25:        file-5.18-javacheck.dif
 Patch26:        file-5.19-solv.dif
@@ -64,7 +63,7 @@
 Patch35:        file-5.24-nitpick.dif
 Patch36:        file-5.15-clear-invalid.patch
 Patch37:        file-secure_getenv.patch
-Patch38:        file-5.25-avoid-double-evaluation-in-python-bindings.dif
+Patch38:        file-5.28-compress.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %global         _sysconfdir /etc
 %global         _miscdir    %{_datadir}/misc
@@ -75,31 +74,33 @@
 /etc/magic, which contains the classification criteria. This command is
 used by apsfilter to permit automatic printing of different file types.
 
-%package -n file-magic
+%package magic
 Summary:        The magic files for libmagic to use
 Group:          Productivity/File utilities
-Obsoletes:      libmagic-data
+Obsoletes:      libmagic-data < %{version}
+Provides:       libmagic-data = %{version}
 
-%description -n file-magic
+%description magic
 This package contains the basic magic files that libmagic reads and uses
 to estimate a file's type.
 
 %package -n %libname
 Summary:        Library with file's functionality
 Group:          System/Libraries
+Provides:       file:%{_libdir}/libmagic.so.%{somajor}
 Requires:       file-magic = %{version}
 
 %description -n %libname
 This library reads magic files and detects file types. Used by file command
 
-%package     -n file-devel
+%package devel
 Summary:        Include Files and Libraries mandatory for Development
 Group:          Development/Libraries/C and C++
 Provides:       file:/usr/include/magic.h
 Requires:       %libname = %{version}
 Requires:       glibc-devel
 
-%description -n file-devel
+%description devel
 This package contains all necessary include files and libraries needed
 to develop applications that require the magic "file" interface.
 
@@ -116,9 +117,6 @@
 %patch12 -p0 -b .opt
 %patch13 -p0 -b .scri
 %patch15 -p0 -b .xcur
-%ifarch mips
-%patch20 -p0 -b .mips
-%endif
 %patch22 -p0 -b .cromfs
 %patch25 -p0 -b .javacheck
 %patch26 -p0 -b .solv
@@ -130,9 +128,11 @@
 %patch35 -p0 -b .nitpick
 %patch36 -p1 -b .clear
 %patch37 -p1 -b .getenv
-%patch38 -p1 -b .pythondouble
+# PATCH-FIX-UPSTREAM -- fix crash as found in build system
+%patch38 -p0 -b .rpmbuild
 %patch -b .0
 test -s src/magic.h.in || cp -p src/magic.h src/magic.h.in
+rm -fv src/magic.h
 
 %build
 export LANG=POSIX
@@ -157,7 +157,10 @@
 rm -vf %{buildroot}%{_sysconfdir}/magic
 echo '# Localstuff: file(1) magic(5) for locally observed files' > 
%{buildroot}%{_sysconfdir}/magic
 echo '#     global magic file is %{_miscdir}/magic(.mgc)'      >> 
%{buildroot}%{_sysconfdir}/magic
-%{nil install -s dcore %{buildroot}%{_bindir}}
+# Does not build
+%if %{with decore}
+install -s dcore %{buildroot}%{_bindir}
+%endif
 # Check out that the binary does not bail out:
 LD_LIBRARY_PATH=%{buildroot}%{_libdir}
 export LD_LIBRARY_PATH
@@ -171,25 +174,27 @@
 %postun -n %libname -p /sbin/ldconfig
 
 %files -n %libname
-%defattr (644,root,root,755)
+%defattr (-,root,root)
 %{_libdir}/lib*.so.*
 
-%files -n file-magic
-%defattr (644,root,root,755)
+%files magic
+%defattr (-,root,root)
 %config(noreplace) %{_sysconfdir}/magic
 %{_miscdir}/magic
 %{_miscdir}/magic.mgc
 %doc %{_mandir}/man5/magic.5.gz
 
 %files
-%defattr (644,root,root,755)
-%{nil %{_bindir}/dcore}
+%defattr (-,root,root)
+%if %{with decore}
+%attr(755,root,root) %{_bindir}/dcore
+%endif
 %attr(755,root,root) %{_bindir}/file
 %doc %{_mandir}/man1/file.1.gz
 %doc COPYING AUTHORS NEWS ChangeLog
 
-%files -n file-devel
-%defattr (644,root,root,755)
+%files devel
+%defattr (-,root,root)
 %{_libdir}/lib*.so
 %{_includedir}/magic.h
 %doc %{_mandir}/man3/libmagic.3.gz

++++++ python-magic.spec ++++++
--- /var/tmp/diff_new_pack.QkVfC0/_old  2016-08-22 10:50:18.000000000 +0200
+++ /var/tmp/diff_new_pack.QkVfC0/_new  2016-08-22 10:50:18.000000000 +0200
@@ -25,9 +25,10 @@
 BuildRequires:  findutils
 BuildRequires:  libtool
 BuildRequires:  python-devel
+BuildRequires:  python-setuptools
 BuildRequires:  zlib-devel
 Url:            http://www.darwinsys.com/file/
-Version:        5.25
+Version:        5.28
 Release:        0
 Summary:        Python module to use libmagic
 License:        BSD-3-Clause and BSD-4-Clause

python3-magic.spec: same change
++++++ baselibs.conf ++++++
--- /var/tmp/diff_new_pack.QkVfC0/_old  2016-08-22 10:50:18.000000000 +0200
+++ /var/tmp/diff_new_pack.QkVfC0/_new  2016-08-22 10:50:18.000000000 +0200
@@ -1,3 +1,6 @@
 libmagic1
-    obsoletes "file-<targettype> < <version>"
-    provides  "file-<targettype> = <version>"
+    requires "file-magic-<targettype> = <version>"
+file-devel
+    requires -file-<targettype>
+    requires "libmagic1-<targettype> = <version>"
+file-magic

++++++ file-4.24-autoconf.dif ++++++
--- /var/tmp/diff_new_pack.QkVfC0/_old  2016-08-22 10:50:18.000000000 +0200
+++ /var/tmp/diff_new_pack.QkVfC0/_new  2016-08-22 10:50:18.000000000 +0200
@@ -1,5 +1,10 @@
+---
+ doc/Makefile.am |    6 ++++--
+ src/readelf.h   |    4 ++++
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
 --- doc/Makefile.am
-+++ doc/Makefile.am    2013-09-30 00:00:00.000000000 +0000
++++ doc/Makefile.am    2016-08-16 11:45:43.001478793 +0000
 @@ -5,7 +5,8 @@ else
  man_MAGIC = magic.4
  endif
@@ -21,7 +26,7 @@
        sed -e s@__CSECTION__@1@g \
            -e s@__FSECTION__@${fsect}@g \
 --- src/readelf.h
-+++ src/readelf.h      2013-09-30 00:00:00.000000000 +0000
++++ src/readelf.h      2016-08-16 11:45:43.001478793 +0000
 @@ -34,7 +34,10 @@
  #ifndef __fake_elf_h__
  #define       __fake_elf_h__
@@ -33,7 +38,7 @@
  #include <stdint.h>
  #endif
  
-@@ -339,4 +342,5 @@ typedef struct {
+@@ -398,4 +401,5 @@ typedef struct {
  #define       AV_386_SSE4_1           0x00800000
  #define       AV_386_SSE4_2           0x01000000
  

++++++ file-5.12-zip.dif ++++++
--- /var/tmp/diff_new_pack.QkVfC0/_old  2016-08-22 10:50:18.000000000 +0200
+++ /var/tmp/diff_new_pack.QkVfC0/_new  2016-08-22 10:50:18.000000000 +0200
@@ -1,22 +1,32 @@
+---
+ magic/Magdir/archive |   19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
 --- magic/Magdir/archive
-+++ magic/Magdir/archive       2013-09-30 00:00:00.000000000 +0000
-@@ -589,6 +589,19 @@
- # Zip archives (Greg Roelofs, c/o [email protected])
- 0     string          PK\005\006      Zip archive data (empty)
++++ magic/Magdir/archive       2016-04-18 11:37:48.369637727 +0000
+@@ -776,6 +776,25 @@
+ !:mime application/zip
+ !:ext zip/cbz
  0     string          PK\003\004
 +>30   ubelong         !0x6d696d65
 +>>4   byte            0x00            Zip archive data
 +!:mime        application/zip
++!:ext zip/cbz
 +>>4   byte            0x09            Zip archive data, at least v0.9 to 
extract
 +!:mime        application/zip
++!:ext zip/cbz
 +>>4   byte            0x0a            Zip archive data, at least v1.0 to 
extract
 +!:mime        application/zip
++!:ext zip/cbz
 +>>4   byte            0x0b            Zip archive data, at least v1.1 to 
extract
 +!:mime        application/zip
++!:ext zip/cbz
 +>>0x161       string          WINZIP          Zip archive data, WinZIP 
self-extracting
 +!:mime        application/zip
++!:ext zip/cbz
 +>>4   byte            0x14            Zip archive data, at least v2.0 to 
extract
 +!:mime        application/zip
++!:ext zip/cbz
  
  # Specialised zip formats which start with a member named 'mimetype'
  # (stored uncompressed, with no 'extra field') containing the file's MIME 
type.

++++++ file-5.15-clear-invalid.patch ++++++
--- /var/tmp/diff_new_pack.QkVfC0/_old  2016-08-22 10:50:18.000000000 +0200
+++ /var/tmp/diff_new_pack.QkVfC0/_new  2016-08-22 10:50:18.000000000 +0200
@@ -8,14 +8,12 @@
 [  205s] /usr/share/misc/magic, 5352: Warning: type `clear             x' 
invalid
 
 ---
- magic/Magdir/elf |    1 -
+ file-5.28/magic/Magdir/elf |    1 -
  1 file changed, 1 deletion(-)
 
-Index: file-5.15/magic/Magdir/elf
-===================================================================
---- file-5.15.orig/magic/Magdir/elf    2013-09-29 01:42:19.000000000 +0100
-+++ file-5.15/magic/Magdir/elf 2013-09-29 01:43:25.000000000 +0100
-@@ -30,7 +30,6 @@
+--- file-5.28/magic/Magdir/elf
++++ file-5.28/magic/Magdir/elf 2016-08-16 11:50:06.748513191 +0000
+@@ -56,7 +56,6 @@
  #>>>(0x38+0xcc) string        >\0             of '%s'
  #>>>(0x38+0x10) lelong        >0              (signal %d),
  >16   leshort         &0xff00         processor-specific,

++++++ file-5.16-ocloexec.patch ++++++
--- /var/tmp/diff_new_pack.QkVfC0/_old  2016-08-22 10:50:18.000000000 +0200
+++ /var/tmp/diff_new_pack.QkVfC0/_new  2016-08-22 10:50:18.000000000 +0200
@@ -1,6 +1,13 @@
+---
+ src/apprentice.c |    6 +++---
+ src/compress.c   |    2 +-
+ src/file.c       |    2 +-
+ src/magic.c      |    2 +-
+ 4 files changed, 6 insertions(+), 6 deletions(-)
+
 --- src/apprentice.c
-+++ src/apprentice.c   2013-09-30 00:00:00.000000000 +0000
-@@ -944,7 +944,7 @@ load_1(struct magic_set *ms, int action,
++++ src/apprentice.c   2016-08-16 11:47:57.766941986 +0000
+@@ -1106,7 +1106,7 @@ load_1(struct magic_set *ms, int action,
        ssize_t len;
        struct magic_entry me;
  
@@ -9,7 +16,7 @@
        if (f == NULL) {
                if (errno != ENOENT)
                        file_error(ms, errno, "cannot read magic file `%s'",
-@@ -2605,7 +2605,7 @@ apprentice_map(struct magic_set *ms, con
+@@ -2950,7 +2950,7 @@ apprentice_map(struct magic_set *ms, con
        if (dbname == NULL)
                goto error;
  
@@ -18,7 +25,7 @@
                goto error;
  
        if (fstat(fd, &st) == -1) {
-@@ -2717,7 +2717,7 @@ apprentice_compile(struct magic_set *ms,
+@@ -3085,7 +3085,7 @@ apprentice_compile(struct magic_set *ms,
        if (dbname == NULL) 
                goto out;
  
@@ -28,8 +35,8 @@
                file_error(ms, errno, "cannot open `%s'", dbname);
                goto out;
 --- src/compress.c
-+++ src/compress.c     2013-09-30 00:00:00.000000000 +0000
-@@ -250,7 +250,7 @@ file_pipe2file(struct magic_set *ms, int
++++ src/compress.c     2016-08-16 11:47:57.766941986 +0000
+@@ -389,7 +389,7 @@ file_pipe2file(struct magic_set *ms, int
  #else
        {
                int te;
@@ -39,8 +46,8 @@
                (void)unlink(buf);
                errno = te;
 --- src/file.c
-+++ src/file.c 2013-09-30 00:00:00.000000000 +0000
-@@ -390,7 +390,7 @@ unwrap(struct magic_set *ms, const char
++++ src/file.c 2016-08-16 11:47:57.766941986 +0000
+@@ -467,7 +467,7 @@ unwrap(struct magic_set *ms, const char
                f = stdin;
                wid = 1;
        } else {
@@ -50,8 +57,8 @@
                            progname, fn, strerror(errno));
                        return 1;
 --- src/magic.c
-+++ src/magic.c        2013-12-02 10:36:33.334786103 +0000
-@@ -372,7 +372,7 @@ file_or_fd(struct magic_set *ms, const c
++++ src/magic.c        2016-08-16 11:47:57.766941986 +0000
+@@ -442,7 +442,7 @@ file_or_fd(struct magic_set *ms, const c
                else
                        pos = lseek(fd, (off_t)0, SEEK_CUR);
        } else {

++++++ file-5.17-option.dif ++++++
--- /var/tmp/diff_new_pack.QkVfC0/_old  2016-08-22 10:50:19.000000000 +0200
+++ /var/tmp/diff_new_pack.QkVfC0/_new  2016-08-22 10:50:19.000000000 +0200
@@ -1,6 +1,10 @@
+---
+ src/file.c |    8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
 --- src/file.c
-+++ src/file.c 2014-02-18 08:50:59.990452075 +0000
-@@ -198,6 +198,8 @@ main(int argc, char *argv[])
++++ src/file.c 2016-06-01 10:13:21.169126906 +0000
+@@ -225,6 +225,8 @@ main(int argc, char *argv[])
                        flags |= MAGIC_ERROR;
                        break;
                case 'e':
@@ -9,7 +13,7 @@
                        for (i = 0; i < sizeof(nv) / sizeof(nv[0]); i++)
                                if (strcmp(nv[i].name, optarg) == 0)
                                        break;
-@@ -209,7 +211,7 @@ main(int argc, char *argv[])
+@@ -236,7 +238,7 @@ main(int argc, char *argv[])
                        break;
  
                case 'f':
@@ -18,7 +22,7 @@
                                usage();
                        if (magic == NULL)
                                if ((magic = load(magicfile, flags)) == NULL)
-@@ -218,6 +220,8 @@ main(int argc, char *argv[])
+@@ -246,6 +248,8 @@ main(int argc, char *argv[])
                        ++didsomefiles;
                        break;
                case 'F':
@@ -27,7 +31,7 @@
                        separator = optarg;
                        break;
                case 'i':
-@@ -230,6 +234,8 @@ main(int argc, char *argv[])
+@@ -258,6 +262,8 @@ main(int argc, char *argv[])
                        action = FILE_LIST;
                        break;
                case 'm':

++++++ file-5.19-biorad.dif ++++++
--- /var/tmp/diff_new_pack.QkVfC0/_old  2016-08-22 10:50:19.000000000 +0200
+++ /var/tmp/diff_new_pack.QkVfC0/_new  2016-08-22 10:50:19.000000000 +0200
@@ -1,6 +1,10 @@
+---
+ magic/Magdir/images |    2 ++
+ 1 file changed, 2 insertions(+)
+
 --- magic/Magdir/images
-+++ magic/Magdir/images        2014-06-24 16:36:26.658235329 +0000
-@@ -655,6 +655,8 @@
++++ magic/Magdir/images        2016-08-16 11:46:27.356644029 +0000
+@@ -996,6 +996,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

++++++ file-5.19-printf.dif ++++++
--- /var/tmp/diff_new_pack.QkVfC0/_old  2016-08-22 10:50:19.000000000 +0200
+++ /var/tmp/diff_new_pack.QkVfC0/_new  2016-08-22 10:50:19.000000000 +0200
@@ -1,6 +1,10 @@
+---
+ src/apprentice.c |    8 ++++++++
+ 1 file changed, 8 insertions(+)
+
 --- src/apprentice.c
-+++ src/apprentice.c   2014-06-24 16:33:48.770235732 +0000
-@@ -2173,8 +2173,16 @@ check_format_type(const char *ptr, int t
++++ src/apprentice.c   2016-04-18 11:33:37.966264194 +0000
+@@ -2350,8 +2350,16 @@ check_format_type(const char *ptr, int t
                        }
                } else
                        h = 0;
@@ -16,4 +20,4 @@
 +                      ptr++;
                if (*ptr == '.')
                        ptr++;
-               while (isdigit((unsigned char)*ptr)) ptr++;
+ #define CHECKLEN() do { \

++++++ file-5.19-zip2.0.dif ++++++
--- /var/tmp/diff_new_pack.QkVfC0/_old  2016-08-22 10:50:19.000000000 +0200
+++ /var/tmp/diff_new_pack.QkVfC0/_new  2016-08-22 10:50:19.000000000 +0200
@@ -1,13 +1,18 @@
+---
+ magic/Magdir/archive |    5 +++++
+ 1 file changed, 5 insertions(+)
+
 --- magic/Magdir/archive
-+++ magic/Magdir/archive       2014-06-25 08:56:37.758234870 +0000
-@@ -586,6 +586,10 @@
- # PKZIP multi-volume archive
++++ magic/Magdir/archive       2016-04-18 11:39:51.791354756 +0000
+@@ -770,6 +770,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
 +>30   ubelong         0x6d696d65      Zip archive data, at least v2.0 to 
extract
 +>>34  ubelong         0x74797065      \b, mime type
 +>>>38 regex           application/[a-z+-]+    \b %s
 +!:mime        application/unknown+zip
++!:ext zip/cbz
  
  # Zip archives (Greg Roelofs, c/o [email protected])
  0     string          PK\005\006      Zip archive data (empty)

++++++ file-5.22-elf.dif ++++++
--- /var/tmp/diff_new_pack.QkVfC0/_old  2016-08-22 10:50:19.000000000 +0200
+++ /var/tmp/diff_new_pack.QkVfC0/_new  2016-08-22 10:50:19.000000000 +0200
@@ -3,8 +3,8 @@
  1 file changed, 4 insertions(+), 2 deletions(-)
 
 --- src/readelf.c
-+++ src/readelf.c      2015-01-19 10:25:08.749519408 +0000
-@@ -706,7 +706,7 @@ do_core_note(struct magic_set *ms, unsig
++++ src/readelf.c      2016-04-18 11:25:34.395199288 +0000
+@@ -728,7 +728,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
-@@ -718,7 +718,9 @@ do_core_note(struct magic_set *ms, unsig
+@@ -740,7 +740,9 @@ do_core_note(struct magic_set *ms, unsig
                         * If the characters aren't all printable,
                         * reject it.
                         */

++++++ file-5.23-endian.patch ++++++
--- /var/tmp/diff_new_pack.QkVfC0/_old  2016-08-22 10:50:19.000000000 +0200
+++ /var/tmp/diff_new_pack.QkVfC0/_new  2016-08-22 10:50:19.000000000 +0200
@@ -4,7 +4,7 @@
  2 files changed, 10 insertions(+), 114 deletions(-)
 
 --- src/apprentice.c
-+++ src/apprentice.c   2014-10-13 11:02:16.000000000 +0000
++++ src/apprentice.c   2016-08-16 11:48:47.694001873 +0000
 @@ -54,6 +54,7 @@ FILE_RCSID("@(#)$File: apprentice.c,v 1.
  #if defined(HAVE_LIMITS_H)
  #include <limits.h>
@@ -28,7 +28,7 @@
  private char *mkdbname(struct magic_set *, const char *, int);
  private struct magic_map *apprentice_buf(struct magic_set *, struct magic *,
      size_t);
-@@ -3119,67 +3122,6 @@ byteswap(struct magic *magic, uint32_t n
+@@ -3176,67 +3179,6 @@ byteswap(struct magic *magic, uint32_t n
  }
  
  /*
@@ -97,8 +97,8 @@
   */
  private void
 --- src/cdf.c
-+++ src/cdf.c  2015-06-11 15:12:51.017518448 +0000
-@@ -50,6 +50,7 @@ FILE_RCSID("@(#)$File: cdf.c,v 1.76 2015
++++ src/cdf.c  2016-08-16 11:48:47.694001873 +0000
+@@ -50,6 +50,7 @@ FILE_RCSID("@(#)$File: cdf.c,v 1.82 2016
  #ifdef HAVE_LIMITS_H
  #include <limits.h>
  #endif

++++++ file-5.24-nitpick.dif ++++++
--- /var/tmp/diff_new_pack.QkVfC0/_old  2016-08-22 10:50:19.000000000 +0200
+++ /var/tmp/diff_new_pack.QkVfC0/_new  2016-08-22 10:50:19.000000000 +0200
@@ -4,13 +4,13 @@
  2 files changed, 10 insertions(+), 2 deletions(-)
 
 --- src/file.c
-+++ src/file.c 2015-07-14 11:45:26.449520700 +0000
++++ src/file.c 2016-08-16 11:49:23.481327975 +0000
 @@ -96,10 +96,12 @@ private const struct option long_options
  #define OPT_MIME_ENCODING     5
- #define OPT(shortname, longname, opt, doc)      \
+ #define OPT(shortname, longname, opt, def, doc)      \
      {longname, opt, NULL, shortname},
 +#define OPT_POSIX             OPT
- #define OPT_LONGONLY(longname, opt, doc, id)        \
+ #define OPT_LONGONLY(longname, opt, def, doc, id)        \
      {longname, opt, NULL, id},
  #include "file_opts.h"
  #undef OPT
@@ -18,7 +18,7 @@
  #undef OPT_LONGONLY
      {0, 0, NULL, 0}
  };
-@@ -595,6 +597,7 @@ docprint(const char *opts)
+@@ -617,6 +619,7 @@ docprint(const char *opts, int def)
  private void
  help(void)
  {
@@ -26,17 +26,17 @@
        (void)fputs(
  "Usage: file [OPTION...] [FILE...]\n"
  "Determine type of FILEs.\n"
-@@ -602,11 +605,16 @@ help(void)
- #define OPT(shortname, longname, opt, doc)      \
+@@ -624,11 +627,16 @@ help(void)
+ #define OPT(shortname, longname, opt, def, doc)      \
        fprintf(stdout, "  -%c, --" longname, shortname), \
-       docprint(doc);
-+#define OPT_POSIX(shortname, longname, opt, doc) \
+       docprint(doc, def);
++#define OPT_POSIX(shortname, longname, opt, def, doc) \
 +      fprintf(stdout, "  -%c, --" longname "%s", shortname, \
 +              (shortname == 'L') ? (posix ? " (default)" : "") : (posix ? "" 
: " (default)")), \
-+      docprint(doc);
- #define OPT_LONGONLY(longname, opt, doc, id)        \
++      docprint(doc, def);
+ #define OPT_LONGONLY(longname, opt, def, doc, id)        \
        fprintf(stdout, "      --" longname),   \
-       docprint(doc);
+       docprint(doc, def);
  #include "file_opts.h"
  #undef OPT
 +#undef OPT_POSIX
@@ -44,15 +44,15 @@
        fprintf(stdout, "\nReport bugs to http://bugs.gw.com/\n";);
        exit(0);
 --- src/file_opts.h
-+++ src/file_opts.h    2013-09-30 13:44:17.000000000 +0000
-@@ -36,8 +36,8 @@ OPT_LONGONLY("mime-encoding", 0, "
- OPT('k', "keep-going", 0, "           don't stop at the first match\n")
- OPT('l', "list", 0, "                 list magic strength\n")
++++ src/file_opts.h    2016-08-16 11:49:23.481327975 +0000
+@@ -36,8 +36,8 @@ OPT_LONGONLY("mime-encoding", 0, 0, "
+ OPT('k', "keep-going", 0, 0, "           don't stop at the first match\n")
+ OPT('l', "list", 0, 0, "                 list magic strength\n")
  #ifdef S_IFLNK
--OPT('L', "dereference", 0, "          follow symlinks (default)\n")
--OPT('h', "no-dereference", 0, "       don't follow symlinks\n")
-+OPT_POSIX('L', "dereference", 0, "          follow symlinks\n")
-+OPT_POSIX('h', "no-dereference", 0, "       don't follow symlinks\n")
+-OPT('L', "dereference", 0, 1, "          follow symlinks")
+-OPT('h', "no-dereference", 0, 2, "       don't follow symlinks")
++OPT_POSIX('L', "dereference", 0, 0, "          follow symlinks")
++OPT_POSIX('h', "no-dereference", 0, 0, "       don't follow symlinks")
  #endif
- OPT('n', "no-buffer", 0, "            do not buffer output\n")
- OPT('N', "no-pad", 0, "               do not pad output\n")
+ OPT('n', "no-buffer", 0, 0, "            do not buffer output\n")
+ OPT('N', "no-pad", 0, 0, "               do not pad output\n")

++++++ file-5.28-compress.patch ++++++
-- Subject: Crash with file-5.28/libmagic and rpmbuild

| Hi,
| 
| interesting crash with libmagic from file-5.28 used by rpmbuild or better
| its librpmbuild.so.3.  See attached backtrace.  It looks like strlcpy()
| runs on a NULL pointer as source.  As well as it is not clrear why an
| ascii file like apefooter_8h__incl.md5 with a MD5 sum without line terminat=
| or
| does cause the libmagic to do an uncompress:
| 
|  file /home/abuild/rpmbuild/BUILDROOT/taglib-1.11-0.x86_64/usr/share/doc/pa=
| ckages/libtag-devel/html/apefooter_8h__incl.md5
|  /home/abuild/rpmbuild/BUILDROOT/taglib-1.11-0.x86_64/usr/share/doc/package=
| s/libtag-devel/html/apefooter_8h__incl.md5: ASCII text, with no line termin=
| ators
| 

It has been fixed on HEAD:

Best,

christos

Index: src/compress.c
===================================================================
RCS file: /p/file/cvsroot/file/src/compress.c,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -r1.97 -r1.98
--- src/compress.c  13 May 2016 23:02:28 -0000      1.97
+++ src/compress.c  28 Jun 2016 16:38:26 -0000      1.98
@@ -517,7 +517,7 @@
 
        return OKDATA;
 err:
-       strlcpy((char *)*newch, z.msg, bytes_max);
+       strlcpy((char *)*newch, z.msg ? z.msg : zError(rc), bytes_max);
        *n = strlen((char *)*newch);
        return ERRDATA;
 }
++++++ file-4.24-mips.dif -> file-5.28.dif ++++++
++++ 675 lines (skipped)
++++ between /work/SRC/openSUSE:Factory/file/file-4.24-mips.dif
++++ and /work/SRC/openSUSE:Factory/.file.new/file-5.28.dif

++++++ file-5.25.tar.gz -> file-5.28.tar.gz ++++++
++++ 10037 lines of diff (skipped)

++++++ file-rpmlintrc ++++++
--- /var/tmp/diff_new_pack.QkVfC0/_old  2016-08-22 10:50:19.000000000 +0200
+++ /var/tmp/diff_new_pack.QkVfC0/_new  2016-08-22 10:50:19.000000000 +0200
@@ -1,4 +1,4 @@
 addFilter(".*Warning:.*using.*regular.*magic.*file.*/usr/share/misc/magic.*")
-addFilter(".*E:.*shlib-fixed-dependency.*")
-addFilter(".*W:.*no-dependency-on.*")
+addFilter(".*W:.*no-dependency-on file.*/file-libs/libfile.*")
 addFilter(".*W:.*name-repeated-in-summary.*")
+addFilter(".*E:.*shlib-fixed-dependency.*")

++++++ file-secure_getenv.patch ++++++
--- /var/tmp/diff_new_pack.QkVfC0/_old  2016-08-22 10:50:19.000000000 +0200
+++ /var/tmp/diff_new_pack.QkVfC0/_new  2016-08-22 10:50:19.000000000 +0200
@@ -1,13 +1,13 @@
 ---
- file-5.23/configure.ac |    2 ++
- file-5.23/src/file.c   |    2 +-
- file-5.23/src/file.h   |    8 ++++++++
- file-5.23/src/magic.c  |   10 +++++-----
+ file-5.28/configure.ac |    2 ++
+ file-5.28/src/file.c   |    2 +-
+ file-5.28/src/file.h   |    8 ++++++++
+ file-5.28/src/magic.c  |   10 +++++-----
  4 files changed, 16 insertions(+), 6 deletions(-)
 
---- file-5.23/configure.ac
-+++ file-5.23/configure.ac     2015-06-11 15:17:36.393695978 +0000
-@@ -90,6 +90,8 @@ AC_CHECK_TYPE([sig_t],[AC_DEFINE([HAVE_S
+--- file-5.28/configure.ac
++++ file-5.28/configure.ac     2016-08-16 11:51:12.795269362 +0000
+@@ -97,6 +97,8 @@ AC_CHECK_TYPE([sig_t],[AC_DEFINE([HAVE_S
  #include <signal.h>
  #endif])
  
@@ -16,9 +16,9 @@
  dnl Checks for typedefs, structures, and compiler characteristics.
  AC_C_CONST
  AC_TYPE_OFF_T
---- file-5.23/src/file.c
-+++ file-5.23/src/file.c       2015-06-11 00:00:00.000000000 +0000
-@@ -596,7 +596,7 @@ docprint(const char *opts)
+--- file-5.28/src/file.c
++++ file-5.28/src/file.c       2016-08-16 11:51:12.795269362 +0000
+@@ -619,7 +619,7 @@ docprint(const char *opts, int def)
  private void
  help(void)
  {
@@ -27,9 +27,9 @@
        (void)fputs(
  "Usage: file [OPTION...] [FILE...]\n"
  "Determine type of FILEs.\n"
---- file-5.23/src/file.h
-+++ file-5.23/src/file.h       2015-06-11 15:18:48.037518208 +0000
-@@ -602,4 +602,12 @@ static const char *rcsid(const char *p)
+--- file-5.28/src/file.h
++++ file-5.28/src/file.h       2016-08-16 11:51:12.795269362 +0000
+@@ -615,4 +615,12 @@ static const char *rcsid(const char *p)
  #define __RCSID(a)
  #endif
  
@@ -42,9 +42,9 @@
 +#endif
 +
  #endif /* __file_h__ */
---- file-5.23/src/magic.c
-+++ file-5.23/src/magic.c      2015-06-11 15:20:08.373518300 +0000
-@@ -177,7 +177,7 @@ get_default_magic(void)
+--- file-5.28/src/magic.c
++++ file-5.28/src/magic.c      2016-08-16 11:51:12.795269362 +0000
+@@ -185,7 +185,7 @@ get_default_magic(void)
                free(default_magic);
                default_magic = NULL;
        }
@@ -53,7 +53,7 @@
                return MAGIC;
  
        if (asprintf(&hmagicpath, "%s/.magic.mgc", home) < 0)
-@@ -214,16 +214,16 @@ out:
+@@ -222,16 +222,16 @@ out:
        }
  
        /* First, try to get a magic file from user-application data */
@@ -73,7 +73,7 @@
                _w32_append_path(&hmagicpath, "%s%s", home, hmagic);
  
        /* Fourth, try to get magic file relative to exe location */
-@@ -244,7 +244,7 @@ magic_getpath(const char *magicfile, int
+@@ -252,7 +252,7 @@ magic_getpath(const char *magicfile, int
        if (magicfile != NULL)
                return magicfile;
  

++++++ pre_checkin.sh ++++++
--- /var/tmp/diff_new_pack.QkVfC0/_old  2016-08-22 10:50:19.000000000 +0200
+++ /var/tmp/diff_new_pack.QkVfC0/_new  2016-08-22 10:50:19.000000000 +0200
@@ -2,3 +2,4 @@
 # This script is called automatically during autobuild checkin.
 version=$(grep '^Version:.*' file.spec)
 sed -ri "s,^Version:.*,$version," python-magic.spec
+sed -ri "s,^Version:.*,$version," python3-magic.spec


Reply via email to