Author Topic: la-libtool.trid.xml for libtool library  (Read 707 times)

jenderek

  • Sr. Member
  • ****
  • Posts: 375
la-libtool.trid.xml for libtool library
« on: July 20, 2023, 08:52:30 PM »
Hello trid users,

some days i inspect my discs with visual disk space tool gdmap.  So i looked
in some directories for non colored areas.  Some samples use filename
extension la.

So i run trid utility on my la examples. My examples are not detected and are
described as "Unknown!".  (See appended output/trid-v-old.txt).

For comparison reason i also run the file format identification utility DROID
(See https://sourceforge.net/projects/droid/).  The samples are here also not
detected.

For comparison reason i also run file command (version 5.44) on such
samples. Here the samples are recognized. These are described as "libtool
library file" with additional information "ASCII text" (see appended
output/file-5.44.txt). Here no file name suffix is mentioned (see appended
output/file-ext-5.44.txt). Because of text character it gets here generic mime
type text/plain (see appended output/file-i-5.44.txt).

On Linux (mint and raspbian) the LA samples are described as "libtool shared
library" by shared mime data-base (see freedesktop.org.xml*). Instead of
generic mime type text/plain an own user defined one is used. That is
expressed inside TrID definition by line like:
 <Mime>application/x-shared-library-la</Mime>

There exist no file format specification but at least there exist a manual for
libtool and there exist a chapter about linking libraries. So i use that page
as reference that is expressed by line like:
 <RefURL>
 https://www.gnu.org/software/libtool/manual/html_node/Linking-libraries.html
 </RefURL>

So i run tridscan to generate la-libtool.trid.xml. Apparently all libtool
samples start with a comment line that looks like:
   # libxar.la - a libtool library file
So that first line is a comment line that is expressed inside front block
section by XML construct like:
   <Bytes>2320</Bytes>
   <ASCII> #</ASCII>
   <Pos>0</Pos>
The remaining part of the first line is expressed inside global strings
section by line like:
   <String>.LA - A LIBTOOL LIBRARY FILE</String>
That pattern is used by file command as characteristic.

With the new trid definition now all libtool LA examples are described (see
appended output/trid-v-new.txt). TrID definitions, some samples and output are
stored in archive la_.zip. I hope that my definitions can be used in future
version of triddefs. Unfortunately the LA suffix is also used for other file
formats like in EDLIN.LA.

With best wishes
Jörg Jenderek


Mark0

  • Administrator
  • Hero Member
  • *****
  • Posts: 2743
    • Mark0's Home Page
Re: la-libtool.trid.xml for libtool library
« Reply #1 on: August 04, 2023, 01:35:20 AM »
Thanks!

I found some .la file with less remarks so I refined the definition a bit.