./sysutils/file, Tool for determining file type

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]

Branch: CURRENT, Version: 5.42, Package name: file-5.42, Maintainer: pkgsrc-users

File tests each argument in an attempt to classify it. There are
three sets of tests, performed in this order: file system tests,
magic number tests, and language tests.

This package also includes the magic number recognition libraries.

This implementation of file(1) is the standard "file" command for
Linux, *BSD, and other systems. It (as well as the magic file)
was originally written by Ian Darwin and is now maintained by a
group of developers lead by Christos Zoulas.

Required to build:

Master sites:

Filesize: 1079.928 KB

Version history: (Expand)

CVS history: (Expand)

   2022-08-16 14:46:39 by Thomas Klausner | Files touched by this commit (2) | Package updated
Log message:
file: update to 5.42.

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

	* release 5.42

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

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

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

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

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

	* 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>

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

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

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

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

	* Add support for msdos dates and times

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

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

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

	* release 5.41

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

	* Avinash Sonawane: Fix tzname detection

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

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

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

	* Fix memory leak in compile mode

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

	* 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>

	* 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>

	* 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>

	* 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>

	* count the total bytes found not the total byte positions
	  in order to determine encoding (Anatol Belski)
   2022-01-29 14:06:26 by Amitai Schleier | Files touched by this commit (2)
Log message:
Also set DYLD_LIBRARY_PATH=. (in addition to LD_PRELOAD) when generating
magic. Fixes build on macOS (Monterey and Snow Leopard tested) when file
is not already installed.
   2021-12-28 00:25:08 by Amitai Schleier | Files touched by this commit (4)
Log message:
Adjust previous use of LD_PRELOAD to fix Solaris 11 build, hoping it'll
fix the SmartOS bulk build (which gave similar errors, but which I
couldn't reproduce on my SmartOS or Tribblix systems).

Does not break:
- macOS 12.1
- NetBSD 9.2 and -current
- OpenBSD 7.0
- FreeBSD 13.0
- Tribblix m25.1
- CentOS 7 and 8
- Debian 9, 10, and 11
- Devuan 4
- Ubuntu 14, 16, 18, and 20
- Void
   2021-12-18 13:07:50 by Amitai Schleier | Files touched by this commit (2)
Log message:
On some Linux systems with a sufficiently old sysutils/file installed,
we get this error, followed by a bunch of warnings attempting to compile
magic anyway:

"lt-file: Compiled magic version [540] does not match with shared library \ 
magic version [538]"

Instead of using whatever libmagic might already be installed, use the
just-built libmagic. (There's probably a less hacky way.)
   2021-10-26 13:20:30 by Nia Alarie | Files touched by this commit (630)
Log message:
sysutils: Replace RMD160 checksums with BLAKE2s checksums

All checksums have been double-checked against existing RMD160 and
SHA512 hashes
   2021-10-07 16:58:44 by Nia Alarie | Files touched by this commit (630)
Log message:
sysutils: Remove SHA1 hashes for distfiles
   2021-04-08 12:40:43 by Nia Alarie | Files touched by this commit (2) | Package updated
Log message:
file: update to 5.40

2021-03-30  20:21  Christos Zoulas <christos@zoulas.com>

	* release 5.40

2021-02-05  16:31  Christos Zoulas <christos@zoulas.com>

	* 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>
	* PR/77: Trim trailing separator.

2020-12-17  15:44  Christos Zoulas <christos@zoulas.com>

	* 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>

	* fix multithreaded decompression file descriptor issue
	  by using close-on-exec (Denys Vlasenko)

2020-06-27  11:58  Christos Zoulas <christos@zoulas.com>

	* Exclude surrogate pairs from utf-8 detection (Michael Liu)

2020-06-25  12:53  Christos Zoulas <christos@zoulas.com>

	* Include # to the list of ignored format chars (Werner Fink)
   2020-11-23 14:16:19 by Nia Alarie | Files touched by this commit (3)
Log message:
file: Update to 5.39

2020-06-14  20:02  Christos Zoulas <christos@zoulas.com>

	* release 5.39

2020-06-07  20:00  Christos Zoulas <christos@zoulas.com>

	* Remove unused subtype_mime (Steve Grubb)
	* Remove unused check in okstat (Steve Grubb)
	* Fix mime-type in elf binaries by making sure $x is set
	* Fix indirect negative offsets broken by OFFNEGATIVE
	* Fix GUID equality check
	* PR/165: Handle empty array and strings in JSON
	* PR/162: Add --exclude-quiet

2020-06-06  15:33  Christos Zoulas <christos@zoulas.com>

	* Fix memory leak in ascmagic (Steve Grubb)

2020-06-04  00:21  Christos Zoulas <christos@zoulas.com>

	* Fix string comparison length with ignore whitespace

2020-05-31  00:11  Christos Zoulas <christos@zoulas.com>

	* Fix mingwin 64 compilation

2020-05-30  23:56  Christos Zoulas <christos@zoulas.com>

	* PR/159: whitelist getpid needed for file_pipe2file()

2020-05-09  18:57  Christos Zoulas <christos@zoulas.com>

	* Indicate negative offsets with a flag OFFNEGATIVE
	  so that -0 works.
	* Introduce "offset" magic type that can be used to
	  detect the file size, and bail on short files.
	* document DER better in the magic man page.

2020-03-11  21:53  Christos Zoulas <christos@zoulas.com>

	* fix memory leaks (SonarQube)

2020-03-08  21:33  Christos Zoulas <christos@zoulas.com>

	* fix memory leaks (SonarQube)
	* rewrite confusing loops (SonarQube)
	* fix bogus test (SonarQube)
	* pass a sized buffer to file_fmttime() (SonarQube)

	* fix memory leaks (SonarQube)

2020-02-20  15:50  Christos Zoulas <christos@zoulas.com>

	* Don't allow * in printf formats, or the code itself (Christoph Biedl)
	* Introduce a printf output size checker to avoid DoS attacks

2020-02-17  17:22  Christos Zoulas <christos@zoulas.com>

	* Avoid memory leak on error (oss-fuzz)
	* Check length of string on DER before derefercing and add new types
	* Add missing DER string (oss-fuzz)

2020-02-16  20:45  Christos Zoulas <christos@zoulas.com>

	* Add missing DER types, and debugging

2020-02-13  13:10  Christos Zoulas <christos@zoulas.com>

	* PR/140: Avoid abort with hand-crafted magic file (gockelhahn)
	* PR/139  Avoid DoS in printf with hand-crafted magic file (gockelhahn)
	* PR/138: Avoid crash with hand-crafted magic file (gockelhahn)

2020-02-12  17:30  Christos Zoulas <christos@zoulas.com>

	* PR/136: Fix static build by adding a libmagic.pc (Fabrice Fontaine)

2019-12-24  14:16  Christos Zoulas <christos@zoulas.com>

	* add guid support