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 file-5.43+; last was file-5.40



details:   https://anonhg.NetBSD.org/src/rev/9c2c24727f53
branches:  trunk
changeset: 370698:9c2c24727f53
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Sep 24 20:07:53 2022 +0000

description:
Import file-5.43+; last was file-5.40

2022-09-20  17:12  Christos Zoulas <christos%zoulas.com@localhost>

        * fixed various clustefuzz issues

2022-09-19  15:54  Christos Zoulas <christos%zoulas.com@localhost>

        * Fix error detection for decompression code (Vincent Mihalkovic)

2022-09-15  13:50  Christos Zoulas <christos%zoulas.com@localhost>

        * Add MAGIC_NO_COMPRESS_FORK and use it to produce a more
          meaningful error message if we are sandboxing.

2022-09-15  10:45  Christos Zoulas <christos%zoulas.com@localhost>

        * Add built-in lzip decompression support (Michal Gorny)

2022-09-14  10:35  Christos Zoulas <christos%zoulas.com@localhost>

        * Add built-in zstd decompression support (Martin Rodriguez Reboredo)

2022-09-13  14:55  Christos Zoulas <christos%zoulas.com@localhost>

        * release 5.43

2022-09-10   9:17  Christos Zoulas <christos%zoulas.com@localhost>

        * Add octal indirect magic (Michal Gorny)

2022-08-17  11:43  Christos Zoulas <christos%zoulas.com@localhost>

        * PR/374: avoid infinite loop in non-wide code (piru)
        * PR/373: Obey MAGIC_CONTINUE with multiple magic files (vismarli)

2022-07-26  11:10  Christos Zoulas <christos%zoulas.com@localhost>

        * Fix bug with large flist (Florian Weimer)

2022-07-07  13:21  Christos Zoulas <christos%zoulas.com@localhost>

        * PR/364: Detect non-nul-terminated core filenames from QEMU
          (mam-ableton)

2022-07-04  15:45  Christos Zoulas <christos%zoulas.com@localhost>

        * PR/359: Add support for http://ndjson.org/ (darose)
        * PR/362: Fix wide printing (ro-ee)
        * PR/358: Fix width for -f - (jpalus)
        * PR/356: Fix JSON constant parsing (davewhite)

2022-06-10   9:40  Christos Zoulas <christos%zoulas.com@localhost>

        * release 5.42

2022-05-31  14:50   Christos Zoulas <christos%zoulas.com@localhost>

        * PR/348: add missing cases to prevent file from aborting on
          random magic files.

2022-05-27  21:05   Christos Zoulas <christos%zoulas.com@localhost>

        * PR/351: octalify filenames when not raw before printing.

2022-04-18  17:51   Christos Zoulas <christos%zoulas.com@localhost>

        * fix regex cacheing bug (Dirk Mueller)
        * merge file_regcomp and file_regerror() to simplify the code
          and reduce memory requirements for storing regexes (Dirk Mueller)

2022-03-19  12:56   Christos Zoulas <christos%zoulas.com@localhost>

        * cache regex (Dirk Mueller)
        * detect filesystem full by flushing output (Dirk Mueller)

2021-11-19  12:36   Christos Zoulas <christos%zoulas.com@localhost>

        * implement running decompressor programs using
          posix_spawnp(2) instead of vfork(2)

2021-10-24  11:51   Christos Zoulas <christos%zoulas.com@localhost>

        * Add support for msdos dates and times

2021-10-20   9:55   Christos Zoulas <christos%zoulas.com@localhost>

        * use the system byte swapping functions if available (Werner Fink)

2021-10-18  11:57  Christos Zoulas <christos%zoulas.com@localhost>

        * release 5.41

2021-09-23  03:51  Christos Zoulas <christos%zoulas.com@localhost>

        * Avinash Sonawane: Fix tzname detection

2021-09-03  09:17  Christos Zoulas <christos%zoulas.com@localhost>

        * Fix relationship tests with "search" magic, don't short circuit
          logic

2021-07-13  01:06  Christos Zoulas <christos%zoulas.com@localhost>

        * Fix memory leak in compile mode

2021-07-01  03:51  Christos Zoulas <christos%zoulas.com@localhost>

        * PR/272: kiefermat: Only set returnval = 1 when we printed something
          (in all cases print or !print). This simplifies the logic and fixes
          the issue in the PR with -k and --mime-type there was no continuation
          printed before the default case.

2021-06-30  13:07  Christos Zoulas <christos%zoulas.com@localhost>

        * PR/270: Don't translate unprintable characters in %s magic formats
          when -r
        * PR/269: Avoid undefined behavior with clang (adding offset to NULL)

2021-05-09  18:38  Christos Zoulas <christos%zoulas.com@localhost>

        * Add a new flag (f) that requires that the match is a full word,
           not a partial word match.
        * Add varint types (unused)

2021-04-19  17:17  Christos Zoulas <christos%zoulas.com@localhost>

        * PR/256: mutableVoid: If the file is less than 3 bytes, use the file
          length to determine type
        * PR/259: aleksandr.v.novichkov: mime printing through indirect magic
          is not taken into account, use match directly so that it does.

2021-04-04  17:02  Christos Zoulas <christos%zoulas.com@localhost>

        * count the total bytes found not the total byte positions
          in order to determine encoding (Anatol Belski)

diffstat:

 external/bsd/file/dist/.travis.yml                         |    28 +
 external/bsd/file/dist/README.DEVELOPER                    |    49 +
 external/bsd/file/dist/README.md                           |   155 +
 external/bsd/file/dist/RELEASE-PROCEDURE                   |    29 +
 external/bsd/file/dist/acinclude.m4                        |    38 +-
 external/bsd/file/dist/fuzz/Dockerfile                     |    21 +
 external/bsd/file/dist/fuzz/build.sh                       |    29 +
 external/bsd/file/dist/fuzz/magic_fuzzer.c                 |    81 +
 external/bsd/file/dist/fuzz/project.yaml                   |     6 +
 external/bsd/file/dist/magic/magdir/acorn                  |    10 +-
 external/bsd/file/dist/magic/magdir/algol68                |    42 +-
 external/bsd/file/dist/magic/magdir/amigaos                |    73 +-
 external/bsd/file/dist/magic/magdir/android                |    12 +-
 external/bsd/file/dist/magic/magdir/animation              |    47 +-
 external/bsd/file/dist/magic/magdir/aria                   |    38 +
 external/bsd/file/dist/magic/magdir/arm                    |    41 +
 external/bsd/file/dist/magic/magdir/asf                    |     8 +-
 external/bsd/file/dist/magic/magdir/audio                  |   190 +-
 external/bsd/file/dist/magic/magdir/blit                   |     6 +-
 external/bsd/file/dist/magic/magdir/burp                   |     7 +
 external/bsd/file/dist/magic/magdir/bytecode               |    30 +
 external/bsd/file/dist/magic/magdir/c-lang                 |     7 +-
 external/bsd/file/dist/magic/magdir/c64                    |   147 +-
 external/bsd/file/dist/magic/magdir/cafebabe               |    16 +-
 external/bsd/file/dist/magic/magdir/ccf                    |    14 +
 external/bsd/file/dist/magic/magdir/compress               |     9 +-
 external/bsd/file/dist/magic/magdir/console                |   127 +-
 external/bsd/file/dist/magic/magdir/ctf                    |     2 +-
 external/bsd/file/dist/magic/magdir/database               |   249 +-
 external/bsd/file/dist/magic/magdir/dataone                |    28 +-
 external/bsd/file/dist/magic/magdir/der                    |    14 +-
 external/bsd/file/dist/magic/magdir/digital                |     3 +-
 external/bsd/file/dist/magic/magdir/dsf                    |    25 +
 external/bsd/file/dist/magic/magdir/espressif              |     4 +-
 external/bsd/file/dist/magic/magdir/etf                    |    33 +
 external/bsd/file/dist/magic/magdir/fonts                  |    90 +-
 external/bsd/file/dist/magic/magdir/forth                  |    30 +-
 external/bsd/file/dist/magic/magdir/freebsd                |    22 +-
 external/bsd/file/dist/magic/magdir/fsav                   |     8 +-
 external/bsd/file/dist/magic/magdir/gentoo                 |    80 +
 external/bsd/file/dist/magic/magdir/gnu                    |    36 +-
 external/bsd/file/dist/magic/magdir/gpu                    |    10 +-
 external/bsd/file/dist/magic/magdir/human68k               |     4 +-
 external/bsd/file/dist/magic/magdir/ibm6000                |     4 +-
 external/bsd/file/dist/magic/magdir/icc                    |    26 +-
 external/bsd/file/dist/magic/magdir/iff                    |     3 +-
 external/bsd/file/dist/magic/magdir/images                 |  3510 ++++++++---
 external/bsd/file/dist/magic/magdir/intel                  |   206 +-
 external/bsd/file/dist/magic/magdir/javascript             |   113 +-
 external/bsd/file/dist/magic/magdir/lif                    |    10 +-
 external/bsd/file/dist/magic/magdir/luks                   |   117 +-
 external/bsd/file/dist/magic/magdir/mach                   |    30 +-
 external/bsd/file/dist/magic/magdir/macintosh              |    16 +-
 external/bsd/file/dist/magic/magdir/make                   |    29 +-
 external/bsd/file/dist/magic/magdir/map                    |   112 +-
 external/bsd/file/dist/magic/magdir/maple                  |    58 +-
 external/bsd/file/dist/magic/magdir/mathematica            |   106 +-
 external/bsd/file/dist/magic/magdir/mcrypt                 |    16 +-
 external/bsd/file/dist/magic/magdir/misctools              |    35 +-
 external/bsd/file/dist/magic/magdir/modem                  |     4 +-
 external/bsd/file/dist/magic/magdir/motorola               |     4 +-
 external/bsd/file/dist/magic/magdir/mozilla                |     4 +-
 external/bsd/file/dist/magic/magdir/msooxml                |    14 +-
 external/bsd/file/dist/magic/magdir/msvc                   |   161 +-
 external/bsd/file/dist/magic/magdir/msx                    |    68 +-
 external/bsd/file/dist/magic/magdir/nifty                  |   202 +
 external/bsd/file/dist/magic/magdir/nim-lang               |    29 +
 external/bsd/file/dist/magic/magdir/ole2compounddocs       |   161 +-
 external/bsd/file/dist/magic/magdir/oric                   |    16 +
 external/bsd/file/dist/magic/magdir/os2                    |    47 +-
 external/bsd/file/dist/magic/magdir/palm                   |     3 +-
 external/bsd/file/dist/magic/magdir/pascal                 |    27 +-
 external/bsd/file/dist/magic/magdir/pci_ids                |   116 +
 external/bsd/file/dist/magic/magdir/pdf                    |     4 +-
 external/bsd/file/dist/magic/magdir/pgp-binary-keys        |     4 +-
 external/bsd/file/dist/magic/magdir/plan9                  |    11 +-
 external/bsd/file/dist/magic/magdir/pmem                   |    18 +-
 external/bsd/file/dist/magic/magdir/puzzle                 |    17 +
 external/bsd/file/dist/magic/magdir/python                 |   251 +-
 external/bsd/file/dist/magic/magdir/riff                   |    99 +-
 external/bsd/file/dist/magic/magdir/ringdove               |    45 +
 external/bsd/file/dist/magic/magdir/rpi                    |    25 +-
 external/bsd/file/dist/magic/magdir/sgi                    |    20 +-
 external/bsd/file/dist/magic/magdir/sgml                   |    49 +-
 external/bsd/file/dist/magic/magdir/sinclair               |     4 +-
 external/bsd/file/dist/magic/magdir/sniffer                |    57 +-
 external/bsd/file/dist/magic/magdir/spectrum               |     4 +-
 external/bsd/file/dist/magic/magdir/sql                    |   116 +-
 external/bsd/file/dist/magic/magdir/statistics             |     4 +-
 external/bsd/file/dist/magic/magdir/subtitle               |    38 +
 external/bsd/file/dist/magic/magdir/sysex                  |   147 +-
 external/bsd/file/dist/magic/magdir/timezone               |    11 +-
 external/bsd/file/dist/magic/magdir/tplink                 |    24 +-
 external/bsd/file/dist/magic/magdir/uf2                    |    72 +
 external/bsd/file/dist/magic/magdir/uuencode               |    18 +-
 external/bsd/file/dist/magic/magdir/virtual                |    90 +-
 external/bsd/file/dist/magic/magdir/webassembly            |     4 +-
 external/bsd/file/dist/magic/magdir/windows                |   540 +-
 external/bsd/file/dist/magic/magdir/wordprocessors         |   265 +-
 external/bsd/file/dist/magic/magdir/wsdl                   |     4 +-
 external/bsd/file/dist/magic/magdir/xilinx                 |     4 +-
 external/bsd/file/dist/magic/magdir/xo65                   |     9 +-
 external/bsd/file/dist/magic/magdir/xwindows               |    10 +-
 external/bsd/file/dist/magic/magdir/yara                   |     4 +-
 external/bsd/file/dist/magic/magdir/zfs                    |     4 +-
 external/bsd/file/dist/magic/magdir/zip                    |    32 +-
 external/bsd/file/dist/magic/scripts/create_filemagic_flac |    71 +
 external/bsd/file/dist/python/CHANGELOG.md                 |     5 +
 external/bsd/file/dist/python/HOWTO                        |     7 +
 external/bsd/file/dist/python/Makefile.am                  |     2 +-
 external/bsd/file/dist/python/file_magic/__init__.py       |     1 +
 external/bsd/file/dist/python/magic.py                     |    65 +-
 external/bsd/file/dist/python/magic.pyi                    |    93 +
 external/bsd/file/dist/python/pyproject.toml               |    31 +
 external/bsd/file/dist/python/tests.py                     |     8 +-
 external/bsd/file/dist/python/threads.py                   |    24 +
 external/bsd/file/dist/src/BNF                             |   151 +
 external/bsd/file/dist/src/Makefile.am                     |     2 +-
 external/bsd/file/dist/src/ascmagic.c                      |    10 +-
 external/bsd/file/dist/src/cdf.mk                          |     3 +
 external/bsd/file/dist/src/file_opts.h                     |     8 +-
 external/bsd/file/dist/src/fmtcheck.c                      |     9 +-
 external/bsd/file/dist/src/is_tar.c                        |    19 +-
 external/bsd/file/dist/src/magic.h.in                      |     2 +
 external/bsd/file/dist/src/memtest.c                       |   154 +
 external/bsd/file/dist/src/seccomp.c                       |    17 +-
 external/bsd/file/dist/src/strlcat.c                       |     9 +-
 external/bsd/file/dist/src/strlcpy.c                       |     9 +-
 external/bsd/file/dist/src/vasprintf.c                     |    13 +-
 external/bsd/file/dist/tests/JW07022A.mp3.result           |     2 +-
 external/bsd/file/dist/tests/Makefile.am                   |   128 +-
 external/bsd/file/dist/tests/android-vdex-1.result         |     1 +
 external/bsd/file/dist/tests/android-vdex-1.testfile       |   Bin 
 external/bsd/file/dist/tests/android-vdex-2.result         |     1 +
 external/bsd/file/dist/tests/android-vdex-2.testfile       |   Bin 
 external/bsd/file/dist/tests/arj.result                    |     1 +
 external/bsd/file/dist/tests/arj.testfile                  |   Bin 
 external/bsd/file/dist/tests/bcachefs.result               |     1 +
 external/bsd/file/dist/tests/bcachefs.testfile             |   Bin 
 external/bsd/file/dist/tests/cl8m8ocofedso.result          |     1 +
 external/bsd/file/dist/tests/cl8m8ocofedso.testfile        |   Bin 
 external/bsd/file/dist/tests/dsd64-dff.result              |     1 +
 external/bsd/file/dist/tests/dsd64-dff.testfile            |   Bin 
 external/bsd/file/dist/tests/dsd64-dsf.result              |     1 +
 external/bsd/file/dist/tests/dsd64-dsf.testfile            |   Bin 
 external/bsd/file/dist/tests/ext4.result                   |     1 +
 external/bsd/file/dist/tests/ext4.testfile                 |   Bin 
 external/bsd/file/dist/tests/gpkg-1-zst.result             |     1 +
 external/bsd/file/dist/tests/gpkg-1-zst.testfile           |   Bin 
 external/bsd/file/dist/tests/json1.result                  |     2 +-
 external/bsd/file/dist/tests/json2.result                  |     2 +-
 external/bsd/file/dist/tests/json3.result                  |     2 +-
 external/bsd/file/dist/tests/json4.result                  |     1 +
 external/bsd/file/dist/tests/json4.testfile                |     1 +
 external/bsd/file/dist/tests/json5.result                  |     1 +
 external/bsd/file/dist/tests/json5.testfile                |     1 +
 external/bsd/file/dist/tests/json6.result                  |     1 +
 external/bsd/file/dist/tests/json6.testfile                |     1 +
 external/bsd/file/dist/tests/json7.result                  |     1 +
 external/bsd/file/dist/tests/json7.testfile                |     1 +
 external/bsd/file/dist/tests/json8.result                  |     1 +
 external/bsd/file/dist/tests/json8.testfile                |     1 +
 external/bsd/file/dist/tests/jsonlines1.result             |     1 +
 external/bsd/file/dist/tests/jsonlines1.testfile           |     2 +
 external/bsd/file/dist/tests/matilde.arm.result            |     1 +
 external/bsd/file/dist/tests/matilde.arm.testfile          |   Bin 
 external/bsd/file/dist/tests/pcjr.result                   |     1 +
 external/bsd/file/dist/tests/pcjr.testfile                 |   Bin 
 external/bsd/file/dist/tests/test.c                        |    12 +-
 external/bsd/file/dist/tests/uf2.result                    |     1 +
 external/bsd/file/dist/tests/uf2.testfile                  |   Bin 
 171 files changed, 7880 insertions(+), 2155 deletions(-)

diffs (truncated from 14709 to 300 lines):

diff -r ee1e4111dbd9 -r 9c2c24727f53 external/bsd/file/dist/.travis.yml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/file/dist/.travis.yml        Sat Sep 24 20:07:53 2022 +0000
@@ -0,0 +1,28 @@
+# $File: .travis.yml,v 1.8 2016/06/28 06:34:34 kim Exp $
+
+language: c
+
+os:
+ - linux
+ - osx
+
+compiler:
+ - gcc
+ - clang
+
+before_install:
+ - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update -qq; fi
+ - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get install -qq automake libtool make python zlib1g-dev; fi
+
+script:
+ - autoreconf -f -i
+ - ./configure --disable-silent-rules
+ - make -j4
+ - make -C tests check
+
+notifications:
+ email:
+  recipients:
+   - file-tests%mx.gw.com@localhost
+  on_success: change
+  on_failure: always
diff -r ee1e4111dbd9 -r 9c2c24727f53 external/bsd/file/dist/README.DEVELOPER
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/file/dist/README.DEVELOPER   Sat Sep 24 20:07:53 2022 +0000
@@ -0,0 +1,49 @@
+# How to get started developing
+
+@(#) $File: README.DEVELOPER,v 1.9 2021/09/20 14:04:39 christos Exp $
+
+## Auto files
+
+After checking out the source, run the following:
+
+       autoreconf -f -i
+       make distclean  # this can fail if you have not built before
+       ./configure --disable-silent-rules
+       make -j4
+       make -C tests check
+
+If you see errors, make sure you have the latest libtool and autoconf
+This has been tested with autoconf-2.69 and libtool-2.4.2
+
+## Installing dependencies
+
+If your platform doesn't have the above tools, install the following
+packages first.
+
+### Debian
+
+       apt-get install \
+           automake \
+           gcc \
+           libtool \
+           make \
+           python \
+           zlib1g-dev \
+
+See also `.travis.yml`.
+
+### Mac OS X (MacPorts)
+
+       port install \
+           autoconf \
+           automake \
+           libtool \
+
+### Mac OS X (HomeBrew)
+
+       brew install autoconf automake libtool
+
+Tested with:
+       autoconf 2.69
+       automake 1.16.1
+       libtool 2.4.6
diff -r ee1e4111dbd9 -r 9c2c24727f53 external/bsd/file/dist/README.md
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/file/dist/README.md  Sat Sep 24 20:07:53 2022 +0000
@@ -0,0 +1,155 @@
+## README for file(1) Command and the libmagic(3) library ##
+
+    @(#) $File: README.md,v 1.4 2021/10/21 01:51:31 christos Exp $
+
+- Bug Tracker: <https://bugs.astron.com/>
+- Build Status: <https://travis-ci.org/file/file>
+- Download link: <ftp://ftp.astron.com/pub/file/>
+- E-mail: <christos%astron.com@localhost>
+- Fuzzing link: <https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:file>
+- Home page: https://www.darwinsys.com/file/
+- Mailing List archives: <https://mailman.astron.com/pipermail/file/>
+- Mailing List: <file%astron.com@localhost>
+- Public repo: <https://github.com/file/file>
+- Test framework: <https://github.com/file/file-tests>
+
+Phone: Do not even think of telephoning me about this program. Send
+cash first!
+
+This is Release 5.x of Ian Darwin's (copyright but distributable)
+file(1) command, an implementation of the Unix File(1) command.
+It knows the 'magic number' of several thousands of file types.
+This version is the standard "file" command for Linux, *BSD, and
+other systems. (See "patchlevel.h" for the exact release number).
+
+The major changes for 5.x are CDF file parsing, indirect magic,
+name/use (recursion) and overhaul in mime and ascii encoding
+handling.
+
+The major feature of 4.x is the refactoring of the code into a
+library, and the re-write of the file command in terms of that
+library. The library itself, libmagic can be used by 3rd party
+programs that wish to identify file types without having to fork()
+and exec() file. The prime contributor for 4.0 was Mans Rullgard.
+
+UNIX is a trademark of UNIX System Laboratories.
+
+The prime contributor to Release 3.8 was Guy Harris, who put in
+megachanges including byte-order independence.
+
+The prime contributor to Release 3.0 was Christos Zoulas, who put
+in hundreds of lines of source code changes, including his own
+ANSIfication of the code (I liked my own ANSIfication better, but
+his (__P()) is the "Berkeley standard" way of doing it, and I wanted
+UCB to include the code...), his HP-like "indirection" (a feature
+of the HP file command, I think), and his mods that finally got
+the uncompress (-z) mode finished and working.
+
+This release has compiled in numerous environments; see PORTING
+for a list and problems.
+
+This fine freeware file(1) follows the USG (System V) model of the
+file command, rather than the Research (V7) version or the V7-derived
+4.[23] Berkeley one. That is, the file /etc/magic contains much of
+the ritual information that is the source of this program's power.
+My version knows a little more magic (including tar archives) than
+System V; the /etc/magic parsing seems to be compatible with the
+(poorly documented) System V /etc/magic format (with one exception;
+see the man page).
+
+In addition, the /etc/magic file is built from a subdirectory
+for easier(?) maintenance.  I will act as a clearinghouse for
+magic numbers assigned to all sorts of data files that
+are in reasonable circulation. Send your magic numbers,
+in magic(5) format please, to the maintainer, Christos Zoulas.
+
+COPYING - read this first.
+* `README` - read this second (you are currently reading this file).
+* `INSTALL` - read on how to install
+* `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.
+* `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.
+* `src/ctime_r.c` - replacement for OS's that don't have it.
+* `src/der.[ch]` - parser for Distinguished Encoding Rules
+* `src/dprintf.c` - replacement for OS's that don't have it.
+* `src/elfclass.h` - common code for elf 32/64.
+* `src/encoding.c` - handles unicode encodings
+* `src/file.c` - the main program
+* `src/file.h` - header file
+* `src/file_opts.h` - list of options
+* `src/fmtcheck.c` - replacement for OS's that don't have it.
+* `src/fsmagic.c` - first set of tests the program runs, based on filesystem info
+* `src/funcs.c` - utilility functions
+* `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.
+* `src/magic.h.in` - source file for magic.h
+* `src/mygetopt.h` - replacement for OS's that don't have it.
+* `src/magic.c` - the libmagic api
+* `src/names.h` - header file for ascmagic.c
+* `src/pread.c` - replacement for OS's that don't have it.
+* `src/print.c` - print results, errors, warnings.
+* `src/readcdf.c` - CDF wrapper.
+* `src/readelf.[ch]` - Stand-alone elf parsing code.
+* `src/softmagic.c` - 2nd set of tests, based on /etc/magic
+* `src/mygetopt.h` - replacement for OS's that don't have it.
+* `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
+* `doc/magic.man` - man page for the magic file, courtesy Guy Harris.
+       Install as magic.4 on USG and magic.5 on V7 or Berkeley; cf Makefile.
+
+Magdir - directory of /etc/magic pieces
+------------------------------------------------------------------------------
+
+If you submit a new magic entry please make sure you read the following
+guidelines:
+
+- Initial match is preferably at least 32 bits long, and is a _unique_ match
+- If this is not feasible, use additional check
+- Match of <= 16 bits are not accepted
+- Delay printing string as much as possible, don't print output too early
+- Avoid printf arbitrary byte as string, which can be a source of
+  crash and buffer overflow
+
+- Provide complete information with entry:
+  * One line short summary
+  * Optional long description
+  * File extension, if applicable
+  * Full name and contact method (for discussion when entry has problem)
+  * Further reference, such as documentation of format
+
+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 ee1e4111dbd9 -r 9c2c24727f53 external/bsd/file/dist/RELEASE-PROCEDURE
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/file/dist/RELEASE-PROCEDURE  Sat Sep 24 20:07:53 2022 +0000
@@ -0,0 +1,29 @@
+# HOW TO RELEASE FILE
+
+@(#) $File: RELEASE-PROCEDURE,v 1.7 2021/10/18 16:38:25 christos Exp $
+
+1)  Update version number in configure.ac
+2)  Note the new version in ChangeLog
+3)  Update README.md if applicable
+4)  Commit changes into CVS
+5)  Rebuild and run tests (see README.DEVELOPER)
+6)  Tag the release with FILEx_yy
+7)  Create the source tarball: make distcheck
+7a) Sign the source tarball.
+       gpg --armor --detach-sign mysoftware-0.4.tar.gz
+8)  Make the source tarball available on ftp
+9)  Add the new version to bugs.astron.com:
+    - Click: Manage > Manage Projects > file
+    - Scroll down to "Versions"
+    - Click on "Edit" next to the HEAD version
+    - Change the "Version" from HEAD to the newly released version
+    - Change the "Date Order" to the current time
+    - Check the "Released" box
+    - Click on "Update Version"
+    - Type HEAD into the box at the bottom of the version list and
+      click on "Add and Edit Version"
+    - Set the "Date Order" to 2030-01-01 (i.e. far in the future)
+    - Click on "Update Version"
+10) Mail an announcement to file%astron.com@localhost containing a summary of the
+    ChangeLog changes. Historically we don't mention magic changes in the
+    ChangeLog or the mail message, only source changes.
diff -r ee1e4111dbd9 -r 9c2c24727f53 external/bsd/file/dist/acinclude.m4
--- a/external/bsd/file/dist/acinclude.m4       Sat Sep 24 19:55:44 2022 +0000
+++ b/external/bsd/file/dist/acinclude.m4       Sat Sep 24 20:07:53 2022 +0000
@@ -3,8 +3,9 @@
 AC_DEFUN([AC_STRUCT_TIMEZONE_DAYLIGHT],
 [AC_REQUIRE([AC_STRUCT_TM])dnl
 AC_CACHE_CHECK([for tm_zone in struct tm], ac_cv_struct_tm_zone,
-[AC_TRY_COMPILE([#include <sys/types.h>
-#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_zone;],
+[AC_COMPILE_IFELSE(
+[AC_LANG_PROGRAM([#include <sys/types.h>
+#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_zone;])],
   ac_cv_struct_tm_zone=yes, ac_cv_struct_tm_zone=no)])
 if test "$ac_cv_struct_tm_zone" = yes; then
   AC_DEFINE(HAVE_TM_ZONE,1,[HAVE_TM_ZONE])
@@ -14,35 +15,35 @@
 # consider it declared and we won't give our own extern.
 AC_CHECK_DECLS([tzname], , , [#include <time.h>])
 AC_CACHE_CHECK(for tzname, ac_cv_var_tzname,
-[AC_TRY_LINK(
-[#include <time.h>
-#if !HAVE_DECL_TZNAME
+[AC_LINK_IFELSE(



Home | Main Index | Thread Index | Old Index