Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/file merge local changes between 5.39 and 5.40 ...



details:   https://anonhg.NetBSD.org/src/rev/d64004594187
branches:  trunk
changeset: 954430:d64004594187
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Apr 09 19:11:41 2021 +0000

description:
merge local changes between 5.39 and 5.40 and add magic entries from HEAD.

diffstat:

 external/bsd/file/dist/ChangeLog                |   30 ++
 external/bsd/file/dist/config.guess             |    8 +-
 external/bsd/file/dist/config.h.in              |    3 +
 external/bsd/file/dist/configure                |   22 +-
 external/bsd/file/dist/configure.ac             |    4 +-
 external/bsd/file/dist/doc/file.1               |   65 +++--
 external/bsd/file/dist/doc/magic.5              |    4 +-
 external/bsd/file/dist/magic/Makefile.am        |   11 +-
 external/bsd/file/dist/magic/Makefile.in        |   11 +-
 external/bsd/file/dist/magic/magdir/archive     |  104 ++++++++--
 external/bsd/file/dist/magic/magdir/cad         |    9 +-
 external/bsd/file/dist/magic/magdir/coff        |    7 +-
 external/bsd/file/dist/magic/magdir/commands    |    6 +-
 external/bsd/file/dist/magic/magdir/diff        |   15 +-
 external/bsd/file/dist/magic/magdir/elf         |   46 ++++-
 external/bsd/file/dist/magic/magdir/filesystems |  108 +++++++---
 external/bsd/file/dist/magic/magdir/games       |  200 +++++++++++++++++++-
 external/bsd/file/dist/magic/magdir/jpeg        |   13 +-
 external/bsd/file/dist/magic/magdir/linux       |   30 +-
 external/bsd/file/dist/magic/magdir/mail.news   |    4 +-
 external/bsd/file/dist/magic/magdir/msdos       |   83 ++++++++-
 external/bsd/file/dist/magic/magdir/pgp         |   53 +----
 external/bsd/file/dist/magic/magdir/xenix       |   20 +-
 external/bsd/file/dist/python/Makefile.in       |    2 +-
 external/bsd/file/dist/src/apprentice.c         |   21 +-
 external/bsd/file/dist/src/compress.c           |   31 ++-
 external/bsd/file/dist/src/der.c                |    6 +-
 external/bsd/file/dist/src/encoding.c           |  240 ++++++++++++++---------
 external/bsd/file/dist/src/file.c               |   15 +-
 external/bsd/file/dist/src/file.h               |   35 ++-
 external/bsd/file/dist/src/funcs.c              |   70 ++++++-
 external/bsd/file/dist/src/is_csv.c             |    8 +-
 external/bsd/file/dist/src/magic.c              |   17 +-
 external/bsd/file/dist/src/readelf.c            |  125 ++++++++---
 external/bsd/file/dist/src/softmagic.c          |  241 ++++++++++++-----------
 external/bsd/file/dist/tests/Makefile.in        |   18 +-
 external/bsd/file/include/config.h              |    9 +-
 37 files changed, 1201 insertions(+), 493 deletions(-)

diffs (truncated from 3399 to 300 lines):

diff -r 5a56c80de954 -r d64004594187 external/bsd/file/dist/ChangeLog
--- a/external/bsd/file/dist/ChangeLog  Fri Apr 09 18:58:00 2021 +0000
+++ b/external/bsd/file/dist/ChangeLog  Fri Apr 09 19:11:41 2021 +0000
@@ -1,3 +1,33 @@
+2021-03-30  20:21  Christos Zoulas <christos%zoulas.com@localhost>
+
+       * release 5.40
+
+2021-02-05  16:31  Christos Zoulas <christos%zoulas.com@localhost>
+
+       * PR/234: Add limit to the number of bytes to scan for encoding
+       * PR/230: Fix /T (trim flag) for regex
+
+2021-02-01  12:31  Christos Zoulas <christos%zoulas.com@localhost>
+       * PR/77: Trim trailing separator.
+
+2020-12-17  15:44  Christos Zoulas <christos%zoulas.com@localhost>
+
+       * PR/211: Convert system read errors from corrupt ELF
+         files into human readable error messages
+
+2020-12-08  16:24  Christos Zoulas <christos%zoulas.com@localhost>
+       
+       * fix multithreaded decompression file descriptor issue
+         by using close-on-exec (Denys Vlasenko)
+
+2020-06-27  11:58  Christos Zoulas <christos%zoulas.com@localhost>
+
+       * Exclude surrogate pairs from utf-8 detection (Michael Liu)
+
+2020-06-25  12:53  Christos Zoulas <christos%zoulas.com@localhost>
+       
+       * Include # to the list of ignored format chars (Werner Fink)
+
 2020-06-14  20:02  Christos Zoulas <christos%zoulas.com@localhost>
 
        * release 5.39
diff -r 5a56c80de954 -r d64004594187 external/bsd/file/dist/config.guess
--- a/external/bsd/file/dist/config.guess       Fri Apr 09 18:58:00 2021 +0000
+++ b/external/bsd/file/dist/config.guess       Fri Apr 09 19:11:41 2021 +0000
@@ -188,10 +188,8 @@
            sh3el) machine=shl-unknown ;;
            sh3eb) machine=sh-unknown ;;
            sh5el) machine=sh5le-unknown ;;
-           earm*)
-               arch="${UNAME_MACHINE_ARCH#e}"
-               arch="${arch%eb}"
-               arch="${arch%hf}"
+           earmv*)
+               arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
                endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
                machine="${arch}${endian}"-unknown
                ;;
@@ -222,7 +220,7 @@
        # Determine ABI tags.
        case "$UNAME_MACHINE_ARCH" in
            earm*)
-               expr='s/v[0-9]//;s/earm/-eabi/;s/eb$//'
+               expr='s/^earmv[0-9]/-eabi/;s/eb$//'
                abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
                ;;
        esac
diff -r 5a56c80de954 -r d64004594187 external/bsd/file/dist/config.h.in
--- a/external/bsd/file/dist/config.h.in        Fri Apr 09 18:58:00 2021 +0000
+++ b/external/bsd/file/dist/config.h.in        Fri Apr 09 19:11:41 2021 +0000
@@ -125,6 +125,9 @@
 /* Define to 1 if you have the `newlocale' function. */
 #undef HAVE_NEWLOCALE
 
+/* Define to 1 if you have the `pipe2' function. */
+#undef HAVE_PIPE2
+
 /* Define to 1 if you have the `pread' function. */
 #undef HAVE_PREAD
 
diff -r 5a56c80de954 -r d64004594187 external/bsd/file/dist/configure
--- a/external/bsd/file/dist/configure  Fri Apr 09 18:58:00 2021 +0000
+++ b/external/bsd/file/dist/configure  Fri Apr 09 19:11:41 2021 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for file 5.39.
+# Generated by GNU Autoconf 2.69 for file 5.40.
 #
 # Report bugs to <christos%astron.com@localhost>.
 #
@@ -590,8 +590,8 @@
 # Identity of this package.
 PACKAGE_NAME='file'
 PACKAGE_TARNAME='file'
-PACKAGE_VERSION='5.39'
-PACKAGE_STRING='file 5.39'
+PACKAGE_VERSION='5.40'
+PACKAGE_STRING='file 5.40'
 PACKAGE_BUGREPORT='christos%astron.com@localhost'
 PACKAGE_URL=''
 
@@ -1338,7 +1338,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures file 5.39 to adapt to many kinds of systems.
+\`configure' configures file 5.40 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1408,7 +1408,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of file 5.39:";;
+     short | recursive ) echo "Configuration of file 5.40:";;
    esac
   cat <<\_ACEOF
 
@@ -1531,7 +1531,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-file configure 5.39
+file configure 5.40
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2187,7 +2187,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by file $as_me 5.39, which was
+It was created by file $as_me 5.40, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3075,7 +3075,7 @@
 
 # Define the identity of the package.
  PACKAGE='file'
- VERSION='5.39'
+ VERSION='5.40'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -14721,7 +14721,7 @@
 fi
 
 
-for ac_func in strndup mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale memmem
+for ac_func in strndup mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale memmem pipe2
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -15745,7 +15745,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by file $as_me 5.39, which was
+This file was extended by file $as_me 5.40, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -15811,7 +15811,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-file config.status 5.39
+file config.status 5.40
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -r 5a56c80de954 -r d64004594187 external/bsd/file/dist/configure.ac
--- a/external/bsd/file/dist/configure.ac       Fri Apr 09 18:58:00 2021 +0000
+++ b/external/bsd/file/dist/configure.ac       Fri Apr 09 19:11:41 2021 +0000
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT([file],[5.39],[christos%astron.com@localhost])
+AC_INIT([file],[5.40],[christos%astron.com@localhost])
 AM_INIT_AUTOMAKE([subdir-objects foreign])
 AM_MAINTAINER_MODE(disable)
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
@@ -167,7 +167,7 @@
 fi])
 
 dnl Checks for functions
-AC_CHECK_FUNCS(strndup mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale memmem)
+AC_CHECK_FUNCS(strndup mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale memmem pipe2)
 
 dnl Provide implementation of some required functions if necessary
 AC_REPLACE_FUNCS(getopt_long asprintf vasprintf strlcpy strlcat getline ctime_r asctime_r localtime_r gmtime_r pread strcasestr fmtcheck dprintf)
diff -r 5a56c80de954 -r d64004594187 external/bsd/file/dist/doc/file.1
--- a/external/bsd/file/dist/doc/file.1 Fri Apr 09 18:58:00 2021 +0000
+++ b/external/bsd/file/dist/doc/file.1 Fri Apr 09 19:11:41 2021 +0000
@@ -1,7 +1,7 @@
-.\"    $NetBSD: file.1,v 1.25 2020/06/15 00:37:24 christos Exp $
+.\"    $NetBSD: file.1,v 1.26 2021/04/09 19:11:41 christos Exp $
 .\"
-.\" $File: file.man,v 1.140 2020/06/07 17:41:07 christos Exp $
-.Dd June 7, 2020
+.\" $File: file.man,v 1.144 2021/02/05 22:08:31 christos Exp $
+.Dd February 5, 2021
 .Dt FILE 1
 .Os
 .Sh NAME
@@ -29,7 +29,7 @@
 .Nm
 .Op Fl Fl help
 .Sh DESCRIPTION
-This manual page documents version 5.39 of the
+This manual page documents version 5.40 of the
 .Nm
 command.
 .Pp
@@ -61,7 +61,7 @@
 Exceptions are well-known file formats (core files, tar archives)
 that are known to contain binary data.
 When modifying magic files or the program itself, make sure to
-.Em "preserve these keywords" .
+.Em preserve these keywords .
 Users depend on knowing that all the readable files in a directory
 have the word
 .Dq text
@@ -93,14 +93,14 @@
 .In exec.h
 in the standard include directory.
 These files have a
-.Dq "magic number"
+.Dq magic number
 stored in a particular place
 near the beginning of the file that tells the
 .Tn UNIX
 operating system
 that the file is a binary executable, and which of several types thereof.
 The concept of a
-.Dq "magic"
+.Dq magic number
 has been applied by extension to data files.
 Any file with some invariant identifier at a small fixed
 offset into the file can usually be described in this way.
@@ -170,7 +170,9 @@
 .Sh OPTIONS
 .Bl -tag -width indent
 .It Fl Fl apple
-Causes the file command to output the file type and creator code as
+Causes the
+.Nm
+command to output the file type and creator code as
 used by older MacOS versions.
 The code consists of eight letters,
 the first describing the file type, the latter the creator.
@@ -186,7 +188,7 @@
 Cause a checking printout of the parsed form of the magic file.
 This is usually used in conjunction with the
 .Fl m
-flag to debug a new magic file before installing it.
+option to debug a new magic file before installing it.
 .It Fl d
 Prints internal debugging information to stderr.
 .It Fl E
@@ -238,7 +240,7 @@
 but ignore tests that
 .Nm
 does not know about.
-This is intended for compatilibity with older versions of
+This is intended for compatibility with older versions of
 .Nm .
 .It Fl Fl extension
 Print a slash-separated list of valid extensions for the file type found.
@@ -272,13 +274,15 @@
 instead of:
 .Dq Fl f Ar namefile Fl F Ar @ .
 .It Fl h , Fl Fl no-dereference
-option causes symlinks not to be followed
+This option causes symlinks not to be followed
 (on systems that support symbolic links).
 This is the default if the environment variable
 .Dv POSIXLY_CORRECT
 is not defined.
 .It Fl i , Fl Fl mime
-Causes the file command to output mime type strings rather than the more
+Causes the
+.Nm
+command to output mime type strings rather than the more
 traditional human readable ones.
 Thus it may say
 .Sq text/plain; charset=us-ascii
@@ -308,7 +312,7 @@
 .Fl k
 option).
 .It Fl L , Fl Fl dereference
-option causes symlinks to be followed, as the like-named option in
+This option causes symlinks to be followed, as the like-named option in
 .Xr ls 1
 (on systems that support symbolic links).
 This is the default if the environment variable
@@ -341,6 +345,7 @@
 .It Li elf_notes Ta 256 Ta max ELF notes processed
 .It Li elf_phnum Ta 2048 Ta max ELF program sections processed
 .It Li elf_shnum Ta 32768 Ta max ELF sections processed
+.It Li encoding Ta 65536 Ta max number of bytes to scan for encoding evaluation
 .It Li indir Ta 50 Ta recursion limit for indirect magic
 .It Li name Ta 50 Ta use count limit for name/use magic



Home | Main Index | Thread Index | Old Index