./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:
[pkgtools/cwrappers]

Master sites:

Filesize: 1079.928 KB

Version history: (Expand)


CVS history: (Expand)


   2024-01-13 21:08:25 by Taylor R Campbell | Files touched by this commit (8)
Log message:
*/builtin.mk: Disable for cross-build if executes target program.

We can't run target programs during cross-build, so we either need to
disable builtin detection or find another way to detect the target
program's version.

No change to native builds because this just makes some existing
logic conditional on native builds.
   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
	  logic

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)