SQLite Forum

Usage of application_id and magic.txt
Login
This is a response having read all the messages on this thread posted through "Nov 13, 2021, 2:09 PM".

I believe there is a misunderstanding between "old hands" in the use of SQLite, Unix and Unix/Unix-like culture, etc vs "newcomers" to these things.

Specifically, I can very well see that, as a newcomer, I could read the information provided by the file magic.txt at the link provided and think "OK, well, this file is telling me I probably should do X, and these people at sqlite.org are the ones responsible for this file and its contents, so obviously these people are the ones I should ask about how to do X".  I'd say that messages #1, 3, 5, and 8 are representative of this point of view.

For the record, I do not think this is a particularly unreasonable thing for people in this class of people to think.  (It may not be a *correct* thing for them to think, mind you, but it is not an unreasonable thing at first glance!)

If it matters, I've been (at least casually) following SQLite, Unix, Unix/Unix-like culture, etc for at *least* two weeks now, so hopefully I can fairly describe myself as not exactly a newcomer to these things.

On the other hand, I can very well see that, as a "old hand" of these very same things, it is probably Blatantly Obvious to me that Of Course the people at sqlite.org have *nothing* to do with file(1) and its configuration, how to get magic numbers registered, etc etc etc, and why would anyone think otherwise when they should instead Just Know (or at least Just Know How To Find Out) about file(1), how to get new magic numbers registered, etc etc etc, so why are they asking me/us about this stuff in the first place?  I'd say that messages #2, 6, and perhaps to some extent 7 are representative of this point of view.

-----

In the interest of, hopefully, reconciling this misunderstanding, and perhaps even preventing it from reoccurring in the future, I'd like to suggest the following:

(1) I did a search engine search (I happened to use Bing, I suspect others would work about as well) for the following string herein enclosed by double-quotes (the actual search did not include the double-quotes):

     "file(1) magic.txt"

(2) Of the links provided by my chosen search engine for that phrase, the one at https://www.man7.org/linux/man-pages/man1/file.1.html seemed fairly immediately applicable to the question at hand.

(3) On that page, in the Colophon section, the following text seemed applicable:

     This page is part of the file (a file type guesser) project.
     Information about the project can be found at
     http://www.darwinsys.com/file/.

Also, earlier on that page, in the Magic Directory and History sections, the following text seemed of interest:

     The magic file entries have been collected from various sources,
     mainly USENET, and contributed by various authors.  Christos Zoulas
     (address below) will collect additional or corrected magic file
     entries.  A consolidation of magic file entries will be distributed
     periodically.

and

     Primary development and maintenance from 1990 to the present by
     Christos Zoulas ⟨christos@astron.com⟩.

(4) At the darwinsys.com page, you will find a link to the "file" mailing list, at https://mailman.astron.com/mailman/listinfo/file .  Following that link and perusing through it shows that the file(1) program and its resources for magic numbers is under current active maintenance.

You will also find a link to a read-only copy of the source code, at https://github.com/file/file .  On that page, the contents of the file README.md appears to have some applicable information for the purposes of the original poster to this thread.

Hopefully items (1) through (4) above adequately well answer the question originally posed, or at least provide enough information that the original poster can move forward on their own to achieve their desired goal.

(5) For the purpose of avoiding this question going forward, I would suggest that the contents of the magic.txt file as provided by the source code of SQLite be augmented by the following information (or similar information intended to achieve the same effect), as a comment forming a new paragraph(s) following the paragraph beginning with "INTEGER can be any signed 32-bit integer.":

     The following is provided as an example of what magic(5) text for 
     the Unix file(1) utility looks like.  The developers of SQLite, 
     and the community of developers and users of SQLite found at 
     sqlite.org, have no influence on or ability to register your 
     chosen magic number information.  

     For more information on how to accomplish this, look at the 
     information at the following links (which were all known good as 
     of November 2021).  The community of developers and users of 
     SQLite do not really have more information on how to register 
     magic numbers for your application beyond what is available at 
     these links:

     https://www.man7.org/linux/man-pages/man1/file.1.html
     http://www.darwinsys.com/file/
     https://github.com/file/file/blob/master/README.md
     https://mailman.astron.com/mailman/listinfo/file

For the record, I freely grant permission for the above text, as-is or modified as seems appropriate, to be incorporated into the contents of the SQLite magic.txt file by the developers of SQLite under the standard license terms for SQLite and without further attribution or credit to me (or, if the developers see fit, with whatever attribution or credit they provide for other patches provided by people external to the core development team for SQLite).

-----

Somewhat unrelated to the above, but related to it, apparently there are *other* file type guessing programs out there besides file(1).  (I learned this in following the links provided above and related web-surfing.)

It is possible this might be of some interest to the original poster in this thread, and/or to the development team for SQLite.

In particular, I found reference to the following (I haven't especially perused these links much beyond noting their existence):

https://www.nationalarchives.gov.uk/information-management/manage-information/preserving-digital-records/droid/ and 
http://www.nationalarchives.gov.uk/PRONOM/Default.aspx

https://mark0.net/soft-trid-e.html

It looks like there might be others out there as well.



Hope this is of some use, interest.  Thanks for your time.

Be well.

Joseph R. Justice
jayarejay@gmail.com