Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/file/dist Import 5.38:



details:   https://anonhg.NetBSD.org/src/rev/31ff2e87d732
branches:  trunk
changeset: 1005695:31ff2e87d732
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Dec 17 02:23:53 2019 +0000

description:
Import 5.38:
        - Always accept -S (no sandbox) even if we don't support sandboxing
        - More syscalls elided for sandboxiing
        - For ELF dynamic means having an interpreter not just PT_DYNAMIC
        - Check for large ELF session header offset
        - When saving and restoring a locale, keep the locale name in our
          own storage.
        - Add a flag to disable CSV file detection.
        - Don't pass NULL/0 to memset to appease sanitizers.
        - Avoid spurious prints when looks for extensions or apple strings
          in fsmagic.
        - Add builtin decompressors for xz and and bzip.
        - Add a limit for the number of CDF elements.
        - More checks for overflow in CDF.

diffstat:

 external/bsd/file/dist/README                        |     7 +-
 external/bsd/file/dist/ltmain.sh                     |  5827 +++++++++++------
 external/bsd/file/dist/m4/libtool.m4                 |  2583 ++++---
 external/bsd/file/dist/m4/ltoptions.m4               |   127 +-
 external/bsd/file/dist/m4/ltsugar.m4                 |     7 +-
 external/bsd/file/dist/m4/ltversion.m4               |    12 +-
 external/bsd/file/dist/m4/lt~obsolete.m4             |     7 +-
 external/bsd/file/dist/magic/magdir/android          |    16 +-
 external/bsd/file/dist/magic/magdir/animation        |    89 +-
 external/bsd/file/dist/magic/magdir/audio            |    49 +-
 external/bsd/file/dist/magic/magdir/bsi              |     2 +-
 external/bsd/file/dist/magic/magdir/c-lang           |     4 +-
 external/bsd/file/dist/magic/magdir/cad              |   187 +-
 external/bsd/file/dist/magic/magdir/commands         |     5 +-
 external/bsd/file/dist/magic/magdir/compress         |    20 +-
 external/bsd/file/dist/magic/magdir/console          |    95 +-
 external/bsd/file/dist/magic/magdir/database         |    37 +-
 external/bsd/file/dist/magic/magdir/espressif        |     4 +-
 external/bsd/file/dist/magic/magdir/fonts            |    56 +-
 external/bsd/file/dist/magic/magdir/forth            |    80 +
 external/bsd/file/dist/magic/magdir/frame            |    24 +-
 external/bsd/file/dist/magic/magdir/games            |     6 +-
 external/bsd/file/dist/magic/magdir/gimp             |    32 +-
 external/bsd/file/dist/magic/magdir/git              |    13 +
 external/bsd/file/dist/magic/magdir/icc              |     4 +-
 external/bsd/file/dist/magic/magdir/images           |   290 +-
 external/bsd/file/dist/magic/magdir/javascript       |     7 +-
 external/bsd/file/dist/magic/magdir/linux            |     7 +-
 external/bsd/file/dist/magic/magdir/macintosh        |    39 +-
 external/bsd/file/dist/magic/magdir/mail.news        |    13 +-
 external/bsd/file/dist/magic/magdir/map              |    79 +-
 external/bsd/file/dist/magic/magdir/modulefile       |     9 +
 external/bsd/file/dist/magic/magdir/msdos            |   284 +-
 external/bsd/file/dist/magic/magdir/msooxml          |     4 +-
 external/bsd/file/dist/magic/magdir/ole2compounddocs |   484 +-
 external/bsd/file/dist/magic/magdir/openfst          |    17 +
 external/bsd/file/dist/magic/magdir/opentimestamps   |    16 +
 external/bsd/file/dist/magic/magdir/pdf              |     8 +-
 external/bsd/file/dist/magic/magdir/pmem             |    46 +
 external/bsd/file/dist/magic/magdir/python           |    25 +-
 external/bsd/file/dist/magic/magdir/rpi              |    16 +-
 external/bsd/file/dist/magic/magdir/rst              |    11 +
 external/bsd/file/dist/magic/magdir/ruby             |     6 +-
 external/bsd/file/dist/magic/magdir/sgml             |     6 +-
 external/bsd/file/dist/magic/magdir/sniffer          |     8 +-
 external/bsd/file/dist/magic/magdir/sosi             |    40 +
 external/bsd/file/dist/magic/magdir/ssh              |     6 +
 external/bsd/file/dist/magic/magdir/uuencode         |     7 +-
 external/bsd/file/dist/magic/magdir/varied.script    |    10 +-
 external/bsd/file/dist/magic/magdir/vax              |    19 +-
 external/bsd/file/dist/magic/magdir/windows          |   122 +-
 external/bsd/file/dist/magic/magdir/wordprocessors   |    50 +-
 external/bsd/file/dist/magic/magdir/zip              |     4 +-
 external/bsd/file/dist/src/Makefile.am               |     4 +-
 external/bsd/file/dist/src/ascmagic.c                |     7 +-
 external/bsd/file/dist/src/buffer.c                  |     7 +-
 external/bsd/file/dist/src/cdf.h                     |     3 +-
 external/bsd/file/dist/src/file_opts.h               |     9 +-
 external/bsd/file/dist/src/is_csv.c                  |   203 +
 external/bsd/file/dist/src/magic.h.in                |     2 +
 external/bsd/file/dist/src/seccomp.c                 |    28 +-
 external/bsd/file/dist/src/vasprintf.c               |     8 +-
 external/bsd/file/dist/tests/JW07022A.mp3.result     |     2 +-
 external/bsd/file/dist/tests/test.c                  |     6 +-
 64 files changed, 7497 insertions(+), 3708 deletions(-)

diffs (truncated from 19563 to 300 lines):

diff -r 9111e06bf402 -r 31ff2e87d732 external/bsd/file/dist/README
--- a/external/bsd/file/dist/README     Tue Dec 17 01:37:52 2019 +0000
+++ b/external/bsd/file/dist/README     Tue Dec 17 02:23:53 2019 +0000
@@ -1,6 +1,6 @@
 ## README for file(1) Command and the libmagic(3) library ##
 
-    @(#) $File: README,v 1.57 2019/02/06 00:20:56 christos Exp $
+    @(#) $File: README,v 1.59 2019/09/19 01:04:01 christos Exp $
 
 Mailing List: file%astron.com@localhost
 Mailing List archives: http://mailman.astron.com/pipermail/file/
@@ -24,6 +24,10 @@
 
        https://github.com/file/file
 
+We are continuously being fuzzed by OSS-FUZZ:
+
+       https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:file
+
 The major changes for 5.x are CDF file parsing, indirect magic, name/use
 (recursion) and overhaul in mime and ascii encoding handling.
 
@@ -91,6 +95,7 @@
 src/getline.c - replacement for OS's that don't have it.
 src/getopt_long.c - replacement for OS's that don't have it.
 src/gmtime_r.c - replacement for OS's that don't have it.
+src/is_csv.c - knows about Comma Separated Value file format (RFC 4180).
 src/is_json.c - knows about JavaScript Object Notation format (RFC 8259).
 src/is_tar.c, tar.h - knows about Tape ARchive format (courtesy John Gilmore).
 src/localtime_r.c - replacement for OS's that don't have it.
diff -r 9111e06bf402 -r 31ff2e87d732 external/bsd/file/dist/ltmain.sh
--- a/external/bsd/file/dist/ltmain.sh  Tue Dec 17 01:37:52 2019 +0000
+++ b/external/bsd/file/dist/ltmain.sh  Tue Dec 17 02:23:53 2019 +0000
@@ -1,9 +1,12 @@
-
-# libtool (GNU libtool) 2.4.2
+#! /bin/sh
+## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
+##               by inline-source v2014-01-03.01
+
+# libtool (GNU libtool) 2.4.6
+# Provide generalized library-building support services.
 # Written by Gordon Matzigkeit <gord%gnu.ai.mit.edu@localhost>, 1996
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
-# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 1996-2015 Free Software Foundation, Inc.
 # This is free software; see the source for copying conditions.  There is NO
 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
@@ -23,167 +26,673 @@
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING.  If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html,
-# or obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-# Usage: $progname [OPTION]... [MODE-ARG]...
-#
-# Provide generalized library-building support services.
-#
-#       --config             show all configuration variables
-#       --debug              enable verbose shell tracing
-#   -n, --dry-run            display commands without modifying any files
-#       --features           display basic configuration information and exit
-#       --mode=MODE          use operation mode MODE
-#       --preserve-dup-deps  don't remove duplicate dependency libraries
-#       --quiet, --silent    don't print informational messages
-#       --no-quiet, --no-silent
-#                            print informational messages (default)
-#       --no-warn            don't display warning messages
-#       --tag=TAG            use configuration variables from tag TAG
-#   -v, --verbose            print more informational messages than default
-#       --no-verbose         don't print the extra informational messages
-#       --version            print version information
-#   -h, --help, --help-all   print short, long, or detailed help message
-#
-# MODE must be one of the following:
-#
-#         clean              remove files from the build directory
-#         compile            compile a source file into a libtool object
-#         execute            automatically set library path, then run a program
-#         finish             complete the installation of libtool libraries
-#         install            install libraries or executables
-#         link               create a library or an executable
-#         uninstall          remove libraries from an installed directory
-#
-# MODE-ARGS vary depending on the MODE.  When passed as first option,
-# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
-# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
-#
-# When reporting a bug, please describe a test case to reproduce it and
-# include the following information:
-#
-#         host-triplet:        $host
-#         shell:               $SHELL
-#         compiler:            $LTCC
-#         compiler flags:              $LTCFLAGS
-#         linker:              $LD (gnu? $with_gnu_ld)
-#         $progname:   (GNU libtool) 2.4.2
-#         automake:    $automake_version
-#         autoconf:    $autoconf_version
-#
-# Report bugs to <bug-libtool%gnu.org@localhost>.
-# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
-# General help using GNU software: <http://www.gnu.org/gethelp/>.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
 
 PROGRAM=libtool
 PACKAGE=libtool
-VERSION=2.4.2
-TIMESTAMP=""
-package_revision=1.3337
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+VERSION=2.4.6
+package_revision=2.4.6
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Run './libtool --help' for help with using this script from the
+# command line.
+
+
+## ------------------------------- ##
+## User overridable command paths. ##
+## ------------------------------- ##
+
+# After configure completes, it has a better idea of some of the
+# shell tools we need than the defaults used by the functions shared
+# with bootstrap, so set those here where they can still be over-
+# ridden by the user, but otherwise take precedence.
+
+: ${AUTOCONF="autoconf"}
+: ${AUTOMAKE="automake"}
+
+
+## -------------------------- ##
+## Source external libraries. ##
+## -------------------------- ##
+
+# Much of our low-level functionality needs to be sourced from external
+# libraries, which are installed to $pkgauxdir.
+
+# Set a version string for this script.
+scriptversion=2015-01-20.17; # UTC
+
+# General shell script boiler plate, and helper functions.
+# Written by Gary V. Vaughan, 2004
+
+# Copyright (C) 2004-2015 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions.  There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# As a special exception to the GNU General Public License, if you distribute
+# this file as part of a program or library that is built using GNU Libtool,
+# you may include this file under the same distribution terms that you use
+# for the rest of that program.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Please report bugs or propose patches to gary%gnu.org@localhost.
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Evaluate this file near the top of your script to gain access to
+# the functions and variables defined here:
+#
+#   . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh
+#
+# If you need to override any of the default environment variable
+# settings, do that before evaluating this file.
+
+
+## -------------------- ##
+## Shell normalisation. ##
+## -------------------- ##
+
+# Some shells need a little help to be as Bourne compatible as possible.
+# Before doing anything else, make sure all that help has been provided!
+
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
   emulate sh
   NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac
 fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# A function that is used when there is no print builtin or printf.
-func_fallback_echo ()
-{
-  eval 'cat <<_LTECHO_EOF
-$1
-_LTECHO_EOF'
-}
-
-# NLS nuisances: We save the old values to restore during execute mode.
-lt_user_locale=
-lt_safe_locale=
-for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+
+# NLS nuisances: We save the old values in case they are required later.
+_G_user_locale=
+_G_safe_locale=
+for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
 do
-  eval "if test \"\${$lt_var+set}\" = set; then
-          save_$lt_var=\$$lt_var
-          $lt_var=C
-         export $lt_var
-         lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
-         lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
+  eval "if test set = \"\${$_G_var+set}\"; then
+          save_$_G_var=\$$_G_var
+          $_G_var=C
+         export $_G_var
+         _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\"
+         _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
        fi"
 done
-LC_ALL=C
-LANGUAGE=C
-export LANGUAGE LC_ALL
-
-$lt_unset CDPATH
-
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Make sure IFS has a sensible default
+sp=' '
+nl='
+'
+IFS="$sp       $nl"
+
+# There are apparently some retarded systems that use ';' as a PATH separator!
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+
+## ------------------------- ##
+## Locate command utilities. ##
+## ------------------------- ##
+
+
+# func_executable_p FILE
+# ----------------------
+# Check that FILE is an executable regular file.
+func_executable_p ()
+{
+    test -f "$1" && test -x "$1"
+}
+
+
+# func_path_progs PROGS_LIST CHECK_FUNC [PATH]
+# --------------------------------------------
+# Search for either a program that responds to --version with output
+# containing "GNU", or else returned by CHECK_FUNC otherwise, by
+# trying all the directories in PATH with each of the elements of
+# PROGS_LIST.
+#
+# CHECK_FUNC should accept the path to a candidate program, and
+# set $func_check_prog_result if it truncates its output less than



Home | Main Index | Thread Index | Old Index