[File] [PATCH] of Magdir/compress for frozen file; extension *.F , *?XF

Jörg Jenderek joerg.jen.der.ek at gmx.net
Fri Apr 5 22:24:40 UTC 2019


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,
some days ago i run file command version 5.36 on some compressed
files done by old exotic tool "freeze".

Good news: All such samples are recognized and i get an output like:

GPLv2.txt.F:            frozen file 2.1
NOEXTENS.F:             frozen file 2.1
ONE-EXT.1XF:            frozen file 2.1
STATIST.DXF:            frozen file 2.1

Unfortunately no mine type by -i option and no filename extension by
- --extension is shown.

First i add Wikipedia URL about list of archive format. There freeze
compressor is mentioned. This is done by comment line
 # URL: https://en.wikipedia.org/wiki/List_of_archive_formats
There a link for the source freeze-2.5.0.tar.gz is mentioned, that
is hard to find, when searching for freeze without excluding snow,
ice water, etc. In c source file freeze.c and header file freeze.h i
found needed information.
The file name for frozen file is normally generated by appending
".F" like for example GPLv2.txt.
On DOS system this work seldom for examples like NOEXTENS. If
attaching .F to the file name is not possible like examples
ONE-EXT.1 and STATIST.DOC the DOS port replaces the second and third
character of the filename extension by XF.
This is now expressed by additional line
 !:ext	F/?XF
A user defined mime type is now shown by line like
 !:mime	application/x-freeze

After applying the above mentioned modifications by patch
file-5.36-compress-freeze.diff then all inspected examples are now
described with mime type and extension.

I hope my diff file can be applied in future version of file utility.

With best wishes
Jörg Jenderek
- --
Jörg Jenderek





















-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iF0EARECAB0WIQS5/qNWKD4ASGOJGL+v8rHJQhrU1gUCXKfVjgAKCRCv8rHJQhrU
1jAlAKCcVyCxWYE37gD3p8teQp72THJSvACgli0QN+03jNLffGNT9SyJw/u+mlY=
=9JML
-----END PGP SIGNATURE-----
-------------- next part --------------
--- file-5.36/magic/Magdir/compress.old	2018-09-01 14:52:39 +0000
+++ file-5.36/magic/Magdir/compress	2019-04-05 00:33:17 +0000
@@ -101,4 +101,11 @@
 # Freeze
+# URL: https://en.wikipedia.org/wiki/List_of_archive_formats
+# Reference: http://www.ibiblio.org/pub/Linux/utils/compress/freeze-2.5.0.tar.gz
+# /freeze-2.5.0/freeze.c /freeze-2.5.0/freeze.h
 0	string		\037\237	frozen file 2.1
+!:mime	application/x-freeze
+!:ext	F/?XF
 0	string		\037\236	frozen file 1.0 (or gzip 0.5)
+!:mime	application/x-freeze
+!:ext	F/?XF
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: file-5.36-compress-freeze.diff.sig
Type: application/octet-stream
Size: 95 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20190406/a221a61c/attachment.obj>


More information about the File mailing list