Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package file for openSUSE:Factory checked in 
at 2022-09-16 13:31:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/file (Old)
 and      /work/SRC/openSUSE:Factory/.file.new.2083 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "file"

Fri Sep 16 13:31:51 2022 rev:131 rq:1003495 version:5.43

Changes:
--------
--- /work/SRC/openSUSE:Factory/file/file.changes        2022-08-28 
13:12:09.676520020 +0200
+++ /work/SRC/openSUSE:Factory/.file.new.2083/file.changes      2022-09-16 
13:32:00.293203598 +0200
@@ -1,0 +2,21 @@
+Wed Sep 14 08:58:50 UTC 2022 - Dr. Werner Fink <wer...@suse.de>
+
+- Add patch file-zstd.patch from upstream mailing list
+  * Add zstd decompression support
+- Run also upstream standard checks
+
+-------------------------------------------------------------------
+Tue Sep 13 20:09:35 UTC 2022 - Dirk M??ller <dmuel...@suse.com>
+
+- update to 5.43:
+  * Add octal indirect magic
+  * avoid infinite loop in non-wide code 
+  * Obey MAGIC_CONTINUE with multiple magic files
+  * Fix bug with large flist
+  * PR/364: Detect non-nul-terminated core filenames from QEMU
+  * PR/359: Add support for http://ndjson.org/ 
+  * PR/362: Fix wide printing 
+  * PR/358: Fix width for -f -
+- drop file-boo1201350.patch (upstream)
+
+-------------------------------------------------------------------
--- /work/SRC/openSUSE:Factory/file/python-magic.changes        2022-03-29 
18:13:45.139036145 +0200
+++ /work/SRC/openSUSE:Factory/.file.new.2083/python-magic.changes      
2022-09-16 13:32:00.317203675 +0200
@@ -1,0 +2,5 @@
+Wed Sep 14 09:00:26 UTC 2022 - Dr. Werner Fink <wer...@suse.de>
+
+- Update to 5.43 due to Dirk
+
+-------------------------------------------------------------------

Old:
----
  file-5.42.tar.gz
  file-5.42.tar.gz.asc
  file-boo1201350.patch

New:
----
  file-5.43.tar.gz
  file-5.43.tar.gz.asc
  file-zstd.patch

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

Other differences:
------------------
++++++ file.spec ++++++
--- /var/tmp/diff_new_pack.fBatoQ/_old  2022-09-16 13:32:02.041209245 +0200
+++ /var/tmp/diff_new_pack.fBatoQ/_new  2022-09-16 13:32:02.049209271 +0200
@@ -25,6 +25,7 @@
 BuildRequires:  pkgconfig(bzip2)
 BuildRequires:  pkgconfig(liblzma)
 BuildRequires:  pkgconfig(libseccomp)
+BuildRequires:  pkgconfig(libzstd)
 BuildRequires:  pkgconfig(zlib)
 URL:            http://www.darwinsys.com/file/
 # bug437293
@@ -33,7 +34,7 @@
 %endif
 #
 # Set Version also in python-magic.spec
-Version:        5.42
+Version:        5.43
 Release:        0
 Summary:        A Tool to Determine File Types
 License:        BSD-2-Clause
@@ -62,8 +63,8 @@
 Patch32:        file-5.19-clicfs.dif
 Patch37:        file-secure_getenv.patch
 Patch39:        file-5.28-btrfs-image.dif
-# Upstream commits as patch
-Patch42:        file-boo1201350.patch
+# Upstream mailing list
+Patch42:        file-zstd.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %global         _sysconfdir /etc
 %global         magicdir    %{_datadir}/file
@@ -108,7 +109,7 @@
 
 %prep
 %setup -q -n file-%{version}
-%patch42 -p0
+%patch42 -p1
 %patch1  -p0 -b .misc
 %patch4  -p0 -b .conf
 %patch5  -p0 -b .tex
@@ -162,6 +163,8 @@
 rm -f %{buildroot}%{_libdir}/*.la
 
 %check
+# Standard checks
+make check
 # Check out that the binary does not bail out:
 LD_LIBRARY_PATH=%{buildroot}%{_libdir}
 export LD_LIBRARY_PATH

++++++ python-magic.spec ++++++
--- /var/tmp/diff_new_pack.fBatoQ/_old  2022-09-16 13:32:02.073209348 +0200
+++ /var/tmp/diff_new_pack.fBatoQ/_new  2022-09-16 13:32:02.077209360 +0200
@@ -21,7 +21,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %global         _miscdir    %{_datadir}/misc
 Name:           python-magic
-Version:        5.42
+Version:        5.43
 Release:        0
 Summary:        Python module to use libmagic
 License:        BSD-3-Clause AND BSD-4-Clause

++++++ file-5.17-option.dif ++++++
--- /var/tmp/diff_new_pack.fBatoQ/_old  2022-09-16 13:32:02.129209529 +0200
+++ /var/tmp/diff_new_pack.fBatoQ/_new  2022-09-16 13:32:02.133209542 +0200
@@ -1,6 +1,8 @@
---- 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
-@@ -254,6 +254,8 @@
+Index: file-5.43/src/file.c
+===================================================================
+--- file-5.43.orig/src/file.c
++++ file-5.43/src/file.c
+@@ -260,6 +260,8 @@ main(int argc, char *argv[])
                        break;
                case 'e':
                case OPT_EXCLUDE_QUIET:
@@ -9,7 +11,7 @@
                        for (i = 0; i < __arraycount(nv); i++)
                                if (strcmp(nv[i].name, optarg) == 0)
                                        break;
-@@ -266,7 +268,7 @@
+@@ -272,7 +274,7 @@ main(int argc, char *argv[])
                        break;
  
                case 'f':
@@ -18,7 +20,7 @@
                                usage();
                        if (magic == NULL)
                                if ((magic = load(magicfile, flags)) == NULL)
-@@ -276,6 +278,8 @@
+@@ -282,6 +284,8 @@ main(int argc, char *argv[])
                        ++didsomefiles;
                        break;
                case 'F':
@@ -27,7 +29,7 @@
                        separator = optarg;
                        break;
                case 'i':
-@@ -288,6 +292,8 @@
+@@ -294,6 +298,8 @@ main(int argc, char *argv[])
                        action = FILE_LIST;
                        break;
                case 'm':

++++++ file-5.19-biorad.dif ++++++
--- /var/tmp/diff_new_pack.fBatoQ/_old  2022-09-16 13:32:02.149209593 +0200
+++ /var/tmp/diff_new_pack.fBatoQ/_new  2022-09-16 13:32:02.153209606 +0200
@@ -2,9 +2,11 @@
  magic/Magdir/images |    2 ++
  1 file changed, 2 insertions(+)
 
---- magic/Magdir/images
-+++ magic/Magdir/images        2022-06-13 08:30:37.596139595 +0000
-@@ -1951,6 +1951,8 @@
+Index: magic/Magdir/images
+===================================================================
+--- magic/Magdir/images.orig
++++ magic/Magdir/images
+@@ -1969,6 +1969,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    uleshort        <2

++++++ file-5.19-printf.dif ++++++
--- /var/tmp/diff_new_pack.fBatoQ/_old  2022-09-16 13:32:02.173209671 +0200
+++ /var/tmp/diff_new_pack.fBatoQ/_new  2022-09-16 13:32:02.177209684 +0200
@@ -2,9 +2,11 @@
  src/apprentice.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
---- src/apprentice.c
-+++ src/apprentice.c   2021-10-19 08:52:01.991343421 +0000
-@@ -2608,7 +2608,7 @@ check_format_type(const char *ptr, int t
+Index: src/apprentice.c
+===================================================================
+--- src/apprentice.c.orig
++++ src/apprentice.c
+@@ -2619,7 +2619,7 @@ check_format_type(const char *ptr, int t
                        }
                } else
                        h = 0;

++++++ file-5.19-zip2.0.dif ++++++
--- /var/tmp/diff_new_pack.fBatoQ/_old  2022-09-16 13:32:02.189209723 +0200
+++ /var/tmp/diff_new_pack.fBatoQ/_new  2022-09-16 13:32:02.193209736 +0200
@@ -2,9 +2,11 @@
  magic/Magdir/archive |    5 +++++
  1 file changed, 5 insertions(+)
 
---- magic/Magdir/archive
-+++ magic/Magdir/archive       2019-02-21 06:49:05.298138025 +0000
-@@ -1399,6 +1399,11 @@
+Index: magic/Magdir/archive
+===================================================================
+--- magic/Magdir/archive.orig
++++ magic/Magdir/archive
+@@ -1421,6 +1421,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

++++++ file-5.22-elf.dif ++++++
--- /var/tmp/diff_new_pack.fBatoQ/_old  2022-09-16 13:32:02.205209775 +0200
+++ /var/tmp/diff_new_pack.fBatoQ/_new  2022-09-16 13:32:02.205209775 +0200
@@ -2,9 +2,11 @@
  src/readelf.c |    6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)
 
---- src/readelf.c
-+++ src/readelf.c      2019-02-21 06:41:38.598573505 +0000
-@@ -824,7 +824,7 @@ do_core_note(struct magic_set *ms, unsig
+Index: src/readelf.c
+===================================================================
+--- src/readelf.c.orig
++++ src/readelf.c
+@@ -825,7 +825,7 @@ do_core_note(struct magic_set *ms, unsig
  
        default:
                if (type == NT_PRPSINFO && *flags & FLAGS_IS_CORE) {
@@ -13,7 +15,7 @@
                        unsigned char c;
                        /*
                         * Extract the program name.  We assume
-@@ -836,7 +836,9 @@ do_core_note(struct magic_set *ms, unsig
+@@ -837,7 +837,9 @@ do_core_note(struct magic_set *ms, unsig
                         * If the characters aren't all printable,
                         * reject it.
                         */

++++++ file-5.28-btrfs-image.dif ++++++
--- /var/tmp/diff_new_pack.fBatoQ/_old  2022-09-16 13:32:02.221209826 +0200
+++ /var/tmp/diff_new_pack.fBatoQ/_new  2022-09-16 13:32:02.225209839 +0200
@@ -13,9 +13,10 @@
  magic/Magdir/filesystems |   37 +++++++++++++++++++++++--------------
  1 file changed, 23 insertions(+), 14 deletions(-)
 
-diff --git a/magic/Magdir/filesystems b/magic/Magdir/filesystems
---- a/magic/Magdir/filesystems
-+++ b/magic/Magdir/filesystems
+Index: file-5.43/magic/Magdir/filesystems
+===================================================================
+--- file-5.43.orig/magic/Magdir/filesystems
++++ file-5.43/magic/Magdir/filesystems
 @@ -2302,20 +2302,29 @@
  >>0x10060        string          >\0             lockproto %s)
  

++++++ file-5.42.dif ++++++
--- /var/tmp/diff_new_pack.fBatoQ/_old  2022-09-16 13:32:02.233209865 +0200
+++ /var/tmp/diff_new_pack.fBatoQ/_new  2022-09-16 13:32:02.237209878 +0200
@@ -9,8 +9,10 @@
  src/dcore.c        |  207 
+++++++++++++++++++++++++++++++++++++++++++++++++++++
  8 files changed, 313 insertions(+), 68 deletions(-)
 
---- magic/Magdir/elf
-+++ magic/Magdir/elf   2022-06-13 08:44:29.248838085 +0000
+Index: magic/Magdir/elf
+===================================================================
+--- magic/Magdir/elf.orig
++++ magic/Magdir/elf
 @@ -152,7 +152,7 @@
  >18   leshort         47              Renesas H8/300H,
  >18   leshort         48              Renesas H8S,
@@ -20,8 +22,10 @@
  >18   leshort         51              Stanford MIPS-X,
  >18   leshort         52              Motorola Coldfire,
  >18   leshort         53              Motorola M68HC12,
---- magic/Magdir/linux
-+++ magic/Magdir/linux 2022-06-13 08:44:29.248838085 +0000
+Index: magic/Magdir/linux
+===================================================================
+--- magic/Magdir/linux.orig
++++ magic/Magdir/linux
 @@ -140,27 +140,31 @@
  # All known start with: b8 c0 07 8e d8 b8 00 90 8e c0 b9 00 01 29 f6 29
  # Linux kernel boot images (i386 arch) (Wolfram Kleff)
@@ -70,16 +74,20 @@
  # This also matches new kernels, which were caught above by "HdrS".
  0             belong  0xb8c0078e      Linux kernel
  >0x1e3                string  Loading         version 1.3.79 or older
---- magic/Magdir/msad
-+++ magic/Magdir/msad  2022-06-13 08:44:29.248838085 +0000
+Index: magic/Magdir/msad
+===================================================================
+--- /dev/null
++++ magic/Magdir/msad
 @@ -0,0 +1,5 @@
 
+#------------------------------------------------------------------------------
 +# msad:  file(1) magic for msad
 +# Microsoft visual C
 +# This must precede the heuristic for raw G3 data
 +4     string  Standard\ Jet\ DB       Microsoft Access Database
---- magic/Magdir/msdos
-+++ magic/Magdir/msdos 2022-06-13 08:44:29.248838085 +0000
+Index: magic/Magdir/msdos
+===================================================================
+--- magic/Magdir/msdos.orig
++++ magic/Magdir/msdos
 @@ -145,9 +145,9 @@
  >>(0x3c.l+22) leshort&0x0200  >0      (stripped to external PDB)
  >>(0x3c.l+22) leshort&0x1000  >0      system file
@@ -92,17 +100,19 @@
  
  # hooray, there's a DOS extender using the PE format, with a valid PE
  # executable inside (which just prints a message and exits if run in win)
-@@ -635,7 +635,7 @@
- # negative offset, must not lead into PSP
- >1          short   <-259
+@@ -750,7 +750,7 @@
+ >1            leshort <-259
  # that offset must be accessible
+ # add 10000h to jump at end of 64 KiB segment, add 1 for jump instruction and 
2 for 16-bit offset
 ->>(1,s+65539)   byte    x
 +>>(1.s+65539)   byte    x
+ # after jump next instruction for DEBUGGING!
+ #>>>&-1               ubelong x       \b, NEXT instruction %#8.8x
  >>>0        use msdos-com
- 
- # updated by Joerg Jenderek at Oct 2008,2015
---- magic/Makefile.am
-+++ magic/Makefile.am  2022-06-13 08:44:29.248838085 +0000
+Index: magic/Makefile.am
+===================================================================
+--- magic/Makefile.am.orig
++++ magic/Makefile.am
 @@ -5,7 +5,7 @@ MAGIC_FRAGMENT_BASE = Magdir
  MAGIC_DIR = $(top_srcdir)/magic
  MAGIC_FRAGMENT_DIR = $(MAGIC_DIR)/$(MAGIC_FRAGMENT_BASE)
@@ -120,7 +130,7 @@
  $(MAGIC_FRAGMENT_DIR)/application \
  $(MAGIC_FRAGMENT_DIR)/applix \
  $(MAGIC_FRAGMENT_DIR)/apt \
-@@ -105,7 +104,6 @@ $(MAGIC_FRAGMENT_DIR)/erlang \
+@@ -106,7 +105,6 @@ $(MAGIC_FRAGMENT_DIR)/erlang \
  $(MAGIC_FRAGMENT_DIR)/espressif \
  $(MAGIC_FRAGMENT_DIR)/esri \
  $(MAGIC_FRAGMENT_DIR)/fcs \
@@ -128,7 +138,7 @@
  $(MAGIC_FRAGMENT_DIR)/finger \
  $(MAGIC_FRAGMENT_DIR)/flash \
  $(MAGIC_FRAGMENT_DIR)/flif \
-@@ -150,6 +148,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \
+@@ -152,6 +150,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \
  $(MAGIC_FRAGMENT_DIR)/java \
  $(MAGIC_FRAGMENT_DIR)/javascript \
  $(MAGIC_FRAGMENT_DIR)/jpeg \
@@ -137,7 +147,7 @@
  $(MAGIC_FRAGMENT_DIR)/karma \
  $(MAGIC_FRAGMENT_DIR)/kde \
  $(MAGIC_FRAGMENT_DIR)/keepass \
-@@ -160,7 +160,6 @@ $(MAGIC_FRAGMENT_DIR)/lammps \
+@@ -162,7 +162,6 @@ $(MAGIC_FRAGMENT_DIR)/lammps \
  $(MAGIC_FRAGMENT_DIR)/lecter \
  $(MAGIC_FRAGMENT_DIR)/lex \
  $(MAGIC_FRAGMENT_DIR)/lif \
@@ -145,7 +155,7 @@
  $(MAGIC_FRAGMENT_DIR)/lisp \
  $(MAGIC_FRAGMENT_DIR)/llvm \
  $(MAGIC_FRAGMENT_DIR)/locoscript \
-@@ -168,7 +167,6 @@ $(MAGIC_FRAGMENT_DIR)/lua \
+@@ -170,7 +169,6 @@ $(MAGIC_FRAGMENT_DIR)/lua \
  $(MAGIC_FRAGMENT_DIR)/luks \
  $(MAGIC_FRAGMENT_DIR)/m4 \
  $(MAGIC_FRAGMENT_DIR)/mach \
@@ -153,7 +163,7 @@
  $(MAGIC_FRAGMENT_DIR)/macos \
  $(MAGIC_FRAGMENT_DIR)/magic \
  $(MAGIC_FRAGMENT_DIR)/mail.news \
-@@ -192,11 +190,11 @@ $(MAGIC_FRAGMENT_DIR)/misctools \
+@@ -194,11 +192,11 @@ $(MAGIC_FRAGMENT_DIR)/misctools \
  $(MAGIC_FRAGMENT_DIR)/mkid \
  $(MAGIC_FRAGMENT_DIR)/mlssa \
  $(MAGIC_FRAGMENT_DIR)/mmdf \
@@ -166,16 +176,16 @@
  $(MAGIC_FRAGMENT_DIR)/msooxml \
  $(MAGIC_FRAGMENT_DIR)/msvc \
  $(MAGIC_FRAGMENT_DIR)/msx \
-@@ -258,6 +256,8 @@ $(MAGIC_FRAGMENT_DIR)/python \
- $(MAGIC_FRAGMENT_DIR)/qt \
+@@ -261,6 +259,8 @@ $(MAGIC_FRAGMENT_DIR)/qt \
  $(MAGIC_FRAGMENT_DIR)/revision \
+ $(MAGIC_FRAGMENT_DIR)/ringdove \
  $(MAGIC_FRAGMENT_DIR)/riff \
 +$(MAGIC_FRAGMENT_DIR)/apple \
 +$(MAGIC_FRAGMENT_DIR)/macintosh \
  $(MAGIC_FRAGMENT_DIR)/rpi \
  $(MAGIC_FRAGMENT_DIR)/rpm \
  $(MAGIC_FRAGMENT_DIR)/rpmsg \
-@@ -347,9 +347,21 @@ EXTRA_DIST = \
+@@ -351,9 +351,21 @@ EXTRA_DIST = \
  $(MAGIC_DIR)/scripts/create_filemagic_flac \
  $(MAGIC_FRAGMENTS)
  
@@ -199,7 +209,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
-@@ -361,19 +373,22 @@ FILE_COMPILE = $(top_builddir)/src/file$
+@@ -365,19 +377,22 @@ FILE_COMPILE = $(top_builddir)/src/file$
  FILE_COMPILE_DEP = $(FILE_COMPILE)
  endif
  
@@ -238,9 +248,11 @@
 +#       fi)
 +#     $(FILE_COMPILE) -C -m magic
 +#     @rm -fr magic
---- magic/Makefile.in
-+++ magic/Makefile.in  2022-06-13 08:44:29.248838085 +0000
-@@ -280,7 +280,7 @@ top_srcdir = @top_srcdir@
+Index: magic/Makefile.in
+===================================================================
+--- magic/Makefile.in.orig
++++ magic/Makefile.in
+@@ -283,7 +283,7 @@ top_srcdir = @top_srcdir@
  MAGIC_FRAGMENT_BASE = Magdir
  MAGIC_DIR = $(top_srcdir)/magic
  MAGIC_FRAGMENT_DIR = $(MAGIC_DIR)/$(MAGIC_FRAGMENT_BASE)
@@ -249,7 +261,7 @@
  MAGIC_FRAGMENTS = \
  $(MAGIC_DIR)/Header \
  $(MAGIC_DIR)/Localstuff \
-@@ -298,7 +298,6 @@ $(MAGIC_FRAGMENT_DIR)/animation \
+@@ -301,7 +301,6 @@ $(MAGIC_FRAGMENT_DIR)/animation \
  $(MAGIC_FRAGMENT_DIR)/aout \
  $(MAGIC_FRAGMENT_DIR)/apache \
  $(MAGIC_FRAGMENT_DIR)/apl \
@@ -257,7 +269,7 @@
  $(MAGIC_FRAGMENT_DIR)/application \
  $(MAGIC_FRAGMENT_DIR)/applix \
  $(MAGIC_FRAGMENT_DIR)/apt \
-@@ -379,7 +378,6 @@ $(MAGIC_FRAGMENT_DIR)/erlang \
+@@ -383,7 +382,6 @@ $(MAGIC_FRAGMENT_DIR)/erlang \
  $(MAGIC_FRAGMENT_DIR)/espressif \
  $(MAGIC_FRAGMENT_DIR)/esri \
  $(MAGIC_FRAGMENT_DIR)/fcs \
@@ -265,7 +277,7 @@
  $(MAGIC_FRAGMENT_DIR)/finger \
  $(MAGIC_FRAGMENT_DIR)/flash \
  $(MAGIC_FRAGMENT_DIR)/flif \
-@@ -424,6 +422,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \
+@@ -429,6 +427,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \
  $(MAGIC_FRAGMENT_DIR)/java \
  $(MAGIC_FRAGMENT_DIR)/javascript \
  $(MAGIC_FRAGMENT_DIR)/jpeg \
@@ -274,7 +286,7 @@
  $(MAGIC_FRAGMENT_DIR)/karma \
  $(MAGIC_FRAGMENT_DIR)/kde \
  $(MAGIC_FRAGMENT_DIR)/keepass \
-@@ -434,7 +434,6 @@ $(MAGIC_FRAGMENT_DIR)/lammps \
+@@ -439,7 +439,6 @@ $(MAGIC_FRAGMENT_DIR)/lammps \
  $(MAGIC_FRAGMENT_DIR)/lecter \
  $(MAGIC_FRAGMENT_DIR)/lex \
  $(MAGIC_FRAGMENT_DIR)/lif \
@@ -282,7 +294,7 @@
  $(MAGIC_FRAGMENT_DIR)/lisp \
  $(MAGIC_FRAGMENT_DIR)/llvm \
  $(MAGIC_FRAGMENT_DIR)/locoscript \
-@@ -442,7 +441,6 @@ $(MAGIC_FRAGMENT_DIR)/lua \
+@@ -447,7 +446,6 @@ $(MAGIC_FRAGMENT_DIR)/lua \
  $(MAGIC_FRAGMENT_DIR)/luks \
  $(MAGIC_FRAGMENT_DIR)/m4 \
  $(MAGIC_FRAGMENT_DIR)/mach \
@@ -290,7 +302,7 @@
  $(MAGIC_FRAGMENT_DIR)/macos \
  $(MAGIC_FRAGMENT_DIR)/magic \
  $(MAGIC_FRAGMENT_DIR)/mail.news \
-@@ -466,11 +464,11 @@ $(MAGIC_FRAGMENT_DIR)/misctools \
+@@ -471,11 +469,11 @@ $(MAGIC_FRAGMENT_DIR)/misctools \
  $(MAGIC_FRAGMENT_DIR)/mkid \
  $(MAGIC_FRAGMENT_DIR)/mlssa \
  $(MAGIC_FRAGMENT_DIR)/mmdf \
@@ -303,16 +315,16 @@
  $(MAGIC_FRAGMENT_DIR)/msooxml \
  $(MAGIC_FRAGMENT_DIR)/msvc \
  $(MAGIC_FRAGMENT_DIR)/msx \
-@@ -532,6 +530,8 @@ $(MAGIC_FRAGMENT_DIR)/python \
- $(MAGIC_FRAGMENT_DIR)/qt \
+@@ -538,6 +536,8 @@ $(MAGIC_FRAGMENT_DIR)/qt \
  $(MAGIC_FRAGMENT_DIR)/revision \
+ $(MAGIC_FRAGMENT_DIR)/ringdove \
  $(MAGIC_FRAGMENT_DIR)/riff \
 +$(MAGIC_FRAGMENT_DIR)/apple \
 +$(MAGIC_FRAGMENT_DIR)/macintosh \
  $(MAGIC_FRAGMENT_DIR)/rpi \
  $(MAGIC_FRAGMENT_DIR)/rpm \
  $(MAGIC_FRAGMENT_DIR)/rpmsg \
-@@ -621,10 +621,22 @@ EXTRA_DIST = \
+@@ -628,10 +628,22 @@ EXTRA_DIST = \
  $(MAGIC_DIR)/scripts/create_filemagic_flac \
  $(MAGIC_FRAGMENTS)
  
@@ -336,7 +348,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}
-@@ -849,23 +861,25 @@ uninstall-am: uninstall-pkgdataDATA
+@@ -855,23 +867,25 @@ uninstall-am: uninstall-pkgdataDATA
  
  .PRECIOUS: Makefile
  
@@ -378,16 +390,20 @@
  
  # 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    2022-06-13 08:44:29.248838085 +0000
+Index: src/Makefile.am
+===================================================================
+--- src/Makefile.am.orig
++++ src/Makefile.am
 @@ -1,4 +1,4 @@
 -MAGIC = $(pkgdatadir)/magic
 +MAGIC = $(sysconfdir)/magic:$(pkgdatadir)/magic
  lib_LTLIBRARIES = libmagic.la
  nodist_include_HEADERS = magic.h
  
---- src/dcore.c
-+++ src/dcore.c        2022-06-13 08:44:29.248838085 +0000
+Index: src/dcore.c
+===================================================================
+--- /dev/null
++++ src/dcore.c
 @@ -0,0 +1,207 @@
 +/*
 + * Show goo about ELF core files

++++++ file-5.42.tar.gz -> file-5.43.tar.gz ++++++
++++ 20572 lines of diff (skipped)

++++++ file-secure_getenv.patch ++++++
--- /var/tmp/diff_new_pack.fBatoQ/_old  2022-09-16 13:32:02.473210640 +0200
+++ /var/tmp/diff_new_pack.fBatoQ/_new  2022-09-16 13:32:02.477210653 +0200
@@ -6,7 +6,7 @@
 
 --- file-5.42/configure.ac
 +++ file-5.42/configure.ac     2022-06-13 08:34:50.347521415 +0000
-@@ -114,6 +114,8 @@ if test "$enable_xzlib" != "no"; then
+@@ -122,6 +122,8 @@ if test "$enable_xzlib" != "no"; then
  fi
  AC_CHECK_TYPE([sig_t],[AC_DEFINE([HAVE_SIG_T],1,[Have sig_t 
type])],,[#include <signal.h>])
  
@@ -17,7 +17,7 @@
  AC_TYPE_SIZE_T
 --- file-5.42/src/file.h
 +++ file-5.42/src/file.h       2022-06-13 08:34:50.347521415 +0000
-@@ -706,4 +706,12 @@ static const char *rcsid(const char *p)
+@@ -709,4 +709,12 @@ static const char *rcsid(const char *p)
  #define __RCSID(a)
  #endif
  

++++++ file-zstd.patch ++++++
Uses the streaming decompression API of libzstd to obtain inflated info for
magic processing from Zstandard compressed data.
---
 configure.ac   | 19 ++++++++++++++
 src/compress.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 87 insertions(+)

diff --git a/configure.ac b/configure.ac
index ffbe0f69..9172be9d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,6 +49,11 @@ AC_ARG_ENABLE([xzlib],
 [AS_HELP_STRING([--disable-xzlib], [disable liblzma/xz compression support 
@<:@default=auto@:>@])])
 AC_MSG_RESULT($enable_xzlib)
 
+AC_MSG_CHECKING(for zstdlib support)
+AC_ARG_ENABLE([zstdlib],
+[AS_HELP_STRING([--disable-zstdlib], [disable zstdlib compression support 
@<:@default=auto@:>@])])
+AC_MSG_RESULT($enable_zstdlib)
+
 AC_MSG_CHECKING(for libseccomp support)
 AC_ARG_ENABLE([libseccomp],
 [AS_HELP_STRING([--disable-libseccomp], [disable libseccomp sandboxing 
@<:@default=auto@:>@])])
@@ -112,6 +117,9 @@ fi
 if test "$enable_xzlib" != "no"; then
   AC_CHECK_HEADERS(lzma.h)
 fi
+if test "$enable_zstdlib" != "no"; then
+  AC_CHECK_HEADERS(zstd.h zstd_errors.h)
+fi
 AC_CHECK_TYPE([sig_t],[AC_DEFINE([HAVE_SIG_T],1,[Have sig_t type])],,[#include 
<signal.h>])
 
 dnl Checks for typedefs, structures, and compiler characteristics.
@@ -180,6 +188,9 @@ fi
 if test "$enable_xzlib" != "no"; then
   AC_CHECK_LIB(lzma, lzma_stream_decoder)
 fi
+if test "$enable_zstdlib" != "no"; then
+  AC_CHECK_LIB(zstd, ZSTD_createDStream)
+fi
 if test "$enable_libseccomp" != "no"; then
     AC_CHECK_LIB(seccomp, seccomp_init)
 fi
@@ -215,6 +226,14 @@ fi
 if  test "$ac_cv_header_lzma_h$ac_cv_lib_lzma_lzma_stream_decoder" = "yesyes"; 
then
   AC_DEFINE([XZLIBSUPPORT], 1, [Enable xzlib compression support])
 fi
+if test "$enable_zstdlib" = "yes"; then
+  if test "$ac_cv_header_zstd_h$ac_cv_lib_zstd_ZSTD_createDStream" != 
"yesyes"; then
+    AC_MSG_ERROR([zstdlib support requested but not found])
+  fi
+fi
+if  test "$ac_cv_header_zstd_h$ac_cv_lib_zstd_ZSTD_createDStream" = "yesyes"; 
then
+  AC_DEFINE([ZSTDLIBSUPPORT], 1, [Enable zstdlib compression support])
+fi
 
 AC_CONFIG_FILES([Makefile src/Makefile magic/Makefile tests/Makefile 
doc/Makefile python/Makefile libmagic.pc])
 AC_OUTPUT
diff --git a/src/compress.c b/src/compress.c
index 113077ae..abb8e766 100644
--- a/src/compress.c
+++ b/src/compress.c
@@ -79,6 +79,12 @@ typedef void (*sig_t)(int);
 #include <lzma.h>
 #endif
 
+#if defined(HAVE_ZSTD_H) && defined(ZSTDLIBSUPPORT)
+#define BUILTIN_ZSTDLIB
+#include <zstd.h>
+#include <zstd_errors.h>
+#endif
+
 #ifdef DEBUG
 int tty = -1;
 #define DPRINTF(...)   do { \
@@ -175,6 +181,7 @@ private const struct {
 #define METH_FROZEN    2
 #define METH_BZIP      7
 #define METH_XZ                9
+#define METH_ZSTD      12
 #define METH_LZMA      13
 #define METH_ZLIB      14
     { { .magic = "\037\235" }, 2, gzip_args, NULL },   /* 0, compressed */
@@ -223,6 +230,10 @@ private int uncompressbzlib(const unsigned char *, 
unsigned char **, size_t,
 private int uncompressxzlib(const unsigned char *, unsigned char **, size_t,
     size_t *);
 #endif
+#ifdef BUILTIN_ZSTDLIB
+private int uncompresszstd(const unsigned char *, unsigned char **, size_t,
+    size_t *);
+#endif
 
 static int makeerror(unsigned char **, size_t *, const char *, ...)
     __attribute__((__format__(__printf__, 3, 4)));
@@ -697,6 +708,55 @@ err:
 }
 #endif
 
+#ifdef BUILTIN_ZSTDLIB
+private int
+uncompresszstd(const unsigned char *old, unsigned char **newch,
+    size_t bytes_max, size_t *n)
+{
+       size_t rc;
+       ZSTD_DStream *zstd;
+       ZSTD_inBuffer in;
+       ZSTD_outBuffer out;
+
+       if ((zstd = ZSTD_createDStream()) == NULL)
+               return makeerror(newch, n, "No ZSTD decompression stream, %s", 
strerror(errno));
+
+       rc = ZSTD_DCtx_reset(zstd, ZSTD_reset_session_only);
+       if (ZSTD_isError(rc))
+               goto err;
+
+       if ((*newch = CAST(unsigned char *, malloc(bytes_max + 1))) == NULL) {
+               ZSTD_freeDStream(zstd);
+               return makeerror(newch, n, "No buffer, %s", strerror(errno));
+       }
+
+       in.src = CCAST(const void *, old);
+       in.size = *n;
+       in.pos = 0;
+       out.dst = RCAST(void *, *newch);
+       out.size = bytes_max;
+       out.pos = 0;
+
+       rc = ZSTD_decompressStream(zstd, &out, &in);
+       if (ZSTD_isError(rc))
+               goto err;
+
+       *n = out.pos;
+
+       ZSTD_freeDStream(zstd);
+
+       /* let's keep the nul-terminate tradition */
+       (*newch)[*n] = '\0';
+
+       return OKDATA;
+err:
+       ZSTD_freeDStream(zstd);
+       snprintf(RCAST(char *, *newch), bytes_max, "zstd error %d", 
ZSTD_getErrorCode(rc));
+       *n = strlen(RCAST(char *, *newch));
+       return ERRDATA;
+}
+#endif
+
 
 static int
 makeerror(unsigned char **buf, size_t *len, const char *fmt, ...)
@@ -863,6 +923,10 @@ methodname(size_t method)
        case METH_XZ:
        case METH_LZMA:
                return "xzlib";
+#endif
+#ifdef BUILTIN_ZSTDLIB
+       case METH_ZSTD:
+               return "zstd";
 #endif
        default:
                return compr[method].argv[0];
@@ -899,6 +963,10 @@ uncompressbuf(int fd, size_t bytes_max, size_t method, 
const unsigned char *old,
        case METH_XZ:
        case METH_LZMA:
                return uncompressxzlib(old, newch, bytes_max, n);
+#endif
+#ifdef BUILTIN_ZSTDLIB
+       case METH_ZSTD:
+               return uncompresszstd(old, newch, bytes_max, n);
 #endif
        default:
                break;
-- 
2.37.3

-- 
File mailing list
f...@astron.com
https://mailman.astron.com/mailman/listinfo/file

Reply via email to