Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

src: 2018-04-15 14:52 Christos Zoulas <christos%zoulas.com@localhost>



details:   https://anonhg.NetBSD.org/src/rev/9f18ddaac498
branches:  trunk
changeset: 318211:9f18ddaac498
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Apr 15 19:32:47 2018 +0000
description:
2018-04-15  14:52  Christos Zoulas <christos%zoulas.com@localhost>

        * release 5.33

2018-02-24  14:50  Christos Zoulas <christos%zoulas.com@localhost>

        * extend the support for ${x?:} expansions for magic descriptions

2018-02-21  16:25  Christos Zoulas <christos%zoulas.com@localhost>

        * add support for ${x?:} in mime types to handle
          pie binaries.

2017-11-03   9:23  Christos Zoulas <christos%zoulas.com@localhost>

        * add support for negative offsets (offsets from the end of file)

2017-09-26   8:22  Christos Zoulas <christos%zoulas.com@localhost>

        * close the file on error when writing magic (Steve Grubb)

2017-09-24  12:02  Christos Zoulas <christos%zoulas.com@localhost>

        * seccomp support (Paul Moore)

2017-09-02  11:53  Christos Zoulas <christos%zoulas.com@localhost>

        * release 5.32

2017-08-28  16:37  Christos Zoulas <christos%zoulas.com@localhost>

        * Always reset state in {file,buffer}_apprentice (Krzysztof Wilczynski)

2017-08-27  03:55  Christos Zoulas <christos%zoulas.com@localhost>

        * Fix always true condition (Thomas Jarosch)

2017-05-24  17:30  Christos Zoulas <christos%zoulas.com@localhost>

        * pickier parsing of numeric values in magic files.

2017-05-23  17:55  Christos Zoulas <christos%zoulas.com@localhost>

        * PR/615 add magic_getflags()

diffstat:

 external/bsd/file/dist/README                        |   48 +-
 external/bsd/file/dist/TODO                          |   15 +-
 external/bsd/file/dist/ltmain.sh                     |   24 +-
 external/bsd/file/dist/magic/magdir/acorn            |   35 +-
 external/bsd/file/dist/magic/magdir/animation        |   50 +-
 external/bsd/file/dist/magic/magdir/audio            |   82 +++-
 external/bsd/file/dist/magic/magdir/beetle           |    7 +
 external/bsd/file/dist/magic/magdir/c64              |   13 +-
 external/bsd/file/dist/magic/magdir/compress         |   43 +-
 external/bsd/file/dist/magic/magdir/console          |    4 +-
 external/bsd/file/dist/magic/magdir/dbpf             |   17 +
 external/bsd/file/dist/magic/magdir/fonts            |    4 +-
 external/bsd/file/dist/magic/magdir/games            |   42 +-
 external/bsd/file/dist/magic/magdir/gnu              |  118 ++++-
 external/bsd/file/dist/magic/magdir/images           |   82 ++-
 external/bsd/file/dist/magic/magdir/intel            |    4 +-
 external/bsd/file/dist/magic/magdir/macintosh        |  410 +++++++++++-------
 external/bsd/file/dist/magic/magdir/measure          |   39 +
 external/bsd/file/dist/magic/magdir/mozilla          |   14 +-
 external/bsd/file/dist/magic/magdir/msdos            |   17 +-
 external/bsd/file/dist/magic/magdir/msooxml          |   23 +-
 external/bsd/file/dist/magic/magdir/ole2compounddocs |   23 +-
 external/bsd/file/dist/magic/magdir/revision         |   22 +-
 external/bsd/file/dist/magic/magdir/riff             |   31 +-
 external/bsd/file/dist/magic/magdir/rpi              |   15 +
 external/bsd/file/dist/magic/magdir/sgml             |   13 +-
 external/bsd/file/dist/magic/magdir/spectrum         |   28 +-
 external/bsd/file/dist/magic/magdir/ssl              |    4 +-
 external/bsd/file/dist/magic/magdir/terminfo         |   13 +-
 external/bsd/file/dist/magic/magdir/tplink           |   82 +++
 external/bsd/file/dist/magic/magdir/vorbis           |   11 +-
 external/bsd/file/dist/magic/magdir/windows          |  211 ++++++++-
 external/bsd/file/dist/magic/magdir/zip              |   63 ++
 external/bsd/file/dist/src/Makefile.am               |    4 +-
 external/bsd/file/dist/src/ascmagic.c                |   33 +-
 external/bsd/file/dist/src/buffer.c                  |   90 ++++
 external/bsd/file/dist/src/file_opts.h               |    5 +-
 external/bsd/file/dist/src/is_tar.c                  |   16 +-
 external/bsd/file/dist/src/seccomp.c                 |  252 +++++++++++
 39 files changed, 1610 insertions(+), 397 deletions(-)

diffs (truncated from 2847 to 300 lines):

diff -r d6e53b4425fb -r 9f18ddaac498 external/bsd/file/dist/README
--- a/external/bsd/file/dist/README     Sun Apr 15 18:24:52 2018 +0000
+++ b/external/bsd/file/dist/README     Sun Apr 15 19:32:47 2018 +0000
@@ -1,13 +1,12 @@
 ## README for file(1) Command ##
 
-    @(#) $File: README,v 1.50 2016/04/16 22:40:54 christos Exp $
+    @(#) $File: README,v 1.53 2018/03/11 13:06:47 glen Exp $
 
-Mailing List: file%mx.gw.com@localhost  
-Mailing List archives: http://mx.gw.com/pipermail/file/  
-Bug tracker: http://bugs.gw.com/  
+Mailing List: file%mx.gw.com@localhost  [currently down]
+Mailing List archives: http://mx.gw.com/pipermail/file/  [currently down]
+Bug tracker: http://bugs.gw.com/  [currently down]
 E-mail: christos%astron.com@localhost
-
-[![Build Status](https://travis-ci.org/file/file.png?branch=master)](https://travis-ci.org/file/file)
+Build Status: https://travis-ci.org/file/file
 
 Phone: Do not even think of telephoning me about this program. Send cash first!
 
@@ -67,28 +66,6 @@
 COPYING - read this first.  
 README - read this second (you are currently reading this file).  
 INSTALL - read on how to install
-src/localtime_r.c
-src/magic.c
-src/magic.h
-src/mygetopt.h
-src/newtest2.c
-src/newtest3.c
-src/pread.c
-src/print.c
-src/readcdf.c
-src/readelf.c
-src/readelf.h
-src/regex.c
-src/regex2.c
-src/softmagic.c
-src/strcasestr.c
-src/strlcat.c
-src/strlcpy.c
-src/strndup.c
-src/tar.h
-src/teststrchr.c
-src/vasprintf.c
-src/x.c
 src/apprentice.c - parses /etc/magic to learn magic  
 src/apptype.c - used for OS/2 specific application type magic  
 src/ascmagic.c - third & last set of tests, based on hardwired assumptions.  
@@ -96,6 +73,7 @@
 src/asprintf.c - replacement for OS's that don't have it.  
 src/asctime_r.c - replacement for OS's that don't have it.  
 src/asprintf.c - replacement for OS's that don't have it.  
+src/buffer.c - buffer handling functions.
 src/cdf.[ch] - parser for Microsoft Compound Document Files  
 src/cdf_time.c - time converter for CDF.  
 src/compress.c - handles decompressing files to look inside.  
@@ -128,6 +106,7 @@
 src/strcasestr.c - replacement for OS's that don't have it.  
 src/strlcat.c - replacement for OS's that don't have it.  
 src/strlcpy.c - replacement for OS's that don't have it.  
+src/strndup.c - replacement for OS's that don't have it.  
 src/tar.h - tar file definitions
 src/vasprintf.c - for systems that don't have it.  
 doc/file.man - man page for the command  
@@ -156,6 +135,19 @@
 
 ------------------------------------------------------------------------------
 
+gpg for dummies:
+
+$ gpg --verify file-X.YY.tar.gz.asc file-X.YY.tar.gz
+gpg: assuming signed data in `file-X.YY.tar.gz'
+gpg: Signature made WWW MMM DD HH:MM:SS YYYY ZZZ using DSA key ID KKKKKKKK
+
+To download the key:
+
+$ gpg --keyserver hkp://keys.gnupg.net --recv-keys KKKKKKKK
+
+------------------------------------------------------------------------------
+
+
 Parts of this software were developed at SoftQuad Inc., developers
 of SGML/HTML/XML publishing software, in Toronto, Canada.
 SoftQuad was swallowed up by Corel in 2002 and does not exist any longer.
diff -r d6e53b4425fb -r 9f18ddaac498 external/bsd/file/dist/TODO
--- a/external/bsd/file/dist/TODO       Sun Apr 15 18:24:52 2018 +0000
+++ b/external/bsd/file/dist/TODO       Sun Apr 15 19:32:47 2018 +0000
@@ -31,6 +31,19 @@
 # rule 2
 >0     ....
 ...
+---
+- Merge the stat code dance in one place and keep it in one place
+  (perhaps struct buffer).
+- Enable seeking around if offset > nbytes if possible (the fd
+  is seekable).
+- We could use file_pipe2file more (for EOF offsets, CDF documents),
+  but that is expensive; perhaps we should provide a way to disable it
+- The implementation of struct buffer needs re-thinking and more work.
+  For example we don't always pass the fd in the child. This is not
+  important yet as we don't have yet cases where use/indirect magic
+  needs negative offsets.
+- Really the whole thing just needs here's an (offset, buffer, size)
+  you have (filebuffer, filebuffersize &&|| fd), fill the buffer with
+  data from offset. The buffer API should be changed to just do that.
 
 christos
-
diff -r d6e53b4425fb -r 9f18ddaac498 external/bsd/file/dist/ltmain.sh
--- a/external/bsd/file/dist/ltmain.sh  Sun Apr 15 18:24:52 2018 +0000
+++ b/external/bsd/file/dist/ltmain.sh  Sun Apr 15 19:32:47 2018 +0000
@@ -133,9 +133,8 @@
 # function.
 progpath="$0"
 
-unset CP
-unset MV
-unset RM
+
+
 : ${CP="cp -f"}
 test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
 : ${MAKE="make"}
@@ -6900,11 +6899,7 @@
            # Finalize command for both is simple: just hardcode it.
            if test "$hardcode_direct" = yes &&
               test "$hardcode_direct_absolute" = no; then
-             if test -f "$inst_prefix_dir$libdir/$linklib"; then
-               add="$inst_prefix_dir$libdir/$linklib"
-             else
-               add="$libdir/$linklib"
-             fi
+             add="$libdir/$linklib"
            elif test "$hardcode_minus_L" = yes; then
              add_dir="-L$libdir"
              add="-l$name"
@@ -7396,7 +7391,6 @@
        # Calculate the version variables.
        major=
        versuffix=
-       versuffix2=
        verstring=
        case $version_type in
        none) ;;
@@ -7457,7 +7451,6 @@
          func_arith $current - $age
          major=.$func_arith_result
          versuffix="$major.$age.$revision"
-         versuffix2="$major.$age"
          ;;
 
        osf)
@@ -7518,10 +7511,8 @@
          esac
          if test "$need_version" = no; then
            versuffix=
-           versuffix2=
          else
            versuffix=".0.0"
-           versuffix2=".0.0"
          fi
        fi
 
@@ -7529,7 +7520,6 @@
        if test "$avoid_version" = yes && test "$need_version" = no; then
          major=
          versuffix=
-         versuffix2=
          verstring=""
        fi
 
@@ -7640,7 +7630,7 @@
          *-*-netbsd*)
            # Don't link with libc until the a.out ld.so is fixed.
            ;;
-         *-*-openbsd* | *-*-mirbsd* | *-*-freebsd* | *-*-dragonfly*)
+         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
            # Do not include libc due to us having libc/libc_r.
            ;;
          *-*-sco3.2v5* | *-*-sco5v6*)
@@ -7663,14 +7653,12 @@
        libname_save=$libname
        release_save=$release
        versuffix_save=$versuffix
-       versuffix2_save=$versuffix2
        major_save=$major
        # I'm not sure if I'm treating the release correctly.  I think
        # release should show up in the -l (ie -lgmp5) so we don't want to
        # add it in twice.  Is that correct?
        release=""
        versuffix=""
-       versuffix2=""
        major=""
        newdeplibs=
        droppeddeps=no
@@ -7947,7 +7935,6 @@
          ;;
        esac
        versuffix=$versuffix_save
-       versuffix2=$versuffix2_save
        major=$major_save
        release=$release_save
        libname=$libname_save
@@ -9432,8 +9419,7 @@
 
 # Directory that this library needs to be installed in:
 libdir='$install_libdir'"
-         if test "$installed" = no && test "$need_relink" = yes && \
-            test -n "$relink_command"; then
+         if test "$installed" = no && test "$need_relink" = yes; then
            $ECHO >> $output "\
 relink_command=\"$relink_command\""
          fi
diff -r d6e53b4425fb -r 9f18ddaac498 external/bsd/file/dist/magic/magdir/acorn
--- a/external/bsd/file/dist/magic/magdir/acorn Sun Apr 15 18:24:52 2018 +0000
+++ b/external/bsd/file/dist/magic/magdir/acorn Sun Apr 15 19:32:47 2018 +0000
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: acorn,v 1.5 2009/09/19 16:28:07 christos Exp $
+# $File: acorn,v 1.6 2017/10/19 16:40:37 christos Exp $
 # acorn:  file(1) magic for files found on Acorn systems
 #
 
@@ -67,3 +67,36 @@
 >>8    byte    x       version %d,
 >>10   leshort =1      1 pattern
 >>10   leshort !1      %d patterns
+
+# From: Joerg Jenderek
+# URL: https://www.kyzer.me.uk/pack/xad/#PackDir
+# reference: https://www.kyzer.me.uk/pack/xad/xad_PackDir.lha/PackDir.c
+# GRR: line below is too general as it matches also "Git pack" in ./revision
+0      string  PACK\0
+# check for valid compression method 0-4
+>5     ulelong <5
+# https://www.riscosopen.org/wiki/documentation/show/Introduction%20To%20Filing%20Systems
+# To skip "Git pack" version 0 test for root directory object like
+# ADFS::RPC.$.websitezip.FONTFIX
+>>9    string  >ADFS\  PackDir archive (RISC OS)
+# TrID labels above as "Acorn PackDir compressed Archive"
+# compression mode y (0 - 4) for GIF LZW with a maximum n bits
+# (y~n,0~12,1~13,2~14,3~15,4~16)
+>>>5   ulelong+12 x    \b, LZW %u-bits compression
+# http://www.filebase.org.uk/filetypes
+# !Packdir compressed archive has three hexadecimal digits code 68E
+!:mime application/x-acorn-68E
+!:ext  pkd/bin
+# null terminated root directory object like IDEFS::IDE-4.$.Apps.GRAPHICS.!XFMPdemo
+>>>9   string  x       \b, root "%s"
+# load address 0xFFFtttdd, ttt is the object filetype and dddddddddd is time
+>>>>&1 ulelong x       \b, load address 0x%x
+# execution address 0xdddddddd dddddddddd is 40 bit unsigned centiseconds since 1.1.1900 UTC
+>>>>&5 ulelong x       \b, exec address 0x%x
+# attributes (bits: 0~owner read,1~owner write,3~no delete,4~public read,5~public write)
+>>>>&9 ulelong x       \b, attributes 0x%x 
+# number of entries in this directory. for root dir 0
+#>>>&13        ulelong x       \b, entries 0x%x 
+# the entries start here with object name
+>>>>&17        string  x       \b, 1st object "%s"
+
diff -r d6e53b4425fb -r 9f18ddaac498 external/bsd/file/dist/magic/magdir/animation
--- a/external/bsd/file/dist/magic/magdir/animation     Sun Apr 15 18:24:52 2018 +0000
+++ b/external/bsd/file/dist/magic/magdir/animation     Sun Apr 15 19:32:47 2018 +0000
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: animation,v 1.63 2017/05/26 14:33:07 christos Exp $
+# $File: animation,v 1.66 2017/10/06 15:36:38 christos Exp $
 # animation:  file(1) magic for animation/movie formats
 #
 # animation formats
@@ -56,20 +56,20 @@
 >>11   byte            6               \b, Release 6 MBMS Extended Presentations
 >>11   byte            7               \b, Release 7 MBMS Extended Presentations
 >8     string          3gg             \b, MPEG v4 system, 3GPP
->11    byte            6               \b, Release 6 General Profile
 !:mime video/3gpp
+>>11   byte            6               \b, Release 6 General Profile
 >8     string          3gp             \b, MPEG v4 system, 3GPP
->11    byte            1               \b, Release %d (non existent)
->11    byte            2               \b, Release %d (non existent)
->11    byte            3               \b, Release %d (non existent)
->11    byte            4               \b, Release %d
->11    byte            5               \b, Release %d
->11    byte            6               \b, Release %d
->11    byte            7               \b, Release %d Streaming Servers
 !:mime video/3gpp
+>>11   byte            1               \b, Release %d (non existent)
+>>11   byte            2               \b, Release %d (non existent)
+>>11   byte            3               \b, Release %d (non existent)
+>>11   byte            4               \b, Release %d
+>>11   byte            5               \b, Release %d
+>>11   byte            6               \b, Release %d
+>>11   byte            7               \b, Release %d Streaming Servers
 >8     string          3gs             \b, MPEG v4 system, 3GPP
->11    byte            7               \b, Release %d Streaming Servers



Home | Main Index | Thread Index | Old Index