SUMMARY Any plaintext file that starts with PACKAGE* and doesn't have a filename ending associated with a mime type, gets the mime type application/x-pak. This happens for example fore dkms.conf file that don't have licensing information preceding and therefore start with PACKAGE_NAME=<some_name> STEPS TO REPRODUCE echo "PACKAGEloremipsum" > foo OBSERVED RESULT foo has the mime type application/x-pak EXPECTED RESULT foo has the mime type text/plain SOFTWARE/OS VERSIONS Linux: 6.2.0-10018-tuxedo (available in About System) KDE Plasma Version: 5.27.7 KDE Frameworks Version: 5.108.0 Qt Version: 5.15.10
This would be a bug in the detection code upstream in shared-mime-info; please report it at https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues. Thanks!
(In reply to Nate Graham from comment #1) > This would be a bug in the detection code upstream in shared-mime-info; > please report it at > https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues. Thanks! thanks for the redirection
(In reply to Werner Sembach [TUXEDO] from comment #0) > STEPS TO REPRODUCE > echo "PACKAGEloremipsum" > foo > > OBSERVED RESULT > foo has the mime type application/x-pak That comes from the following entry in: /usr/share/mime/packages/freedesktop.org.xml <mime-type type="application/x-pak"> <comment>PAK archive</comment> ... <comment xml:lang="en_GB">PAK archive</comment> ... <generic-icon name="package-x-generic"/> <magic priority="80"> <match offset="0" type="string" value="PACK"/> </magic> <glob pattern="*.pak"/> </mime-type> Looks like the "PAK Archive" format was something in DOS back in the 1990's. Can give you a German Wiki article (seemingly no English equivalent): https://de.wikipedia.org/wiki/PAK_(Dateiformat)
(In reply to tagwerk19 from comment #3) > (In reply to Werner Sembach [TUXEDO] from comment #0) > > STEPS TO REPRODUCE > > echo "PACKAGEloremipsum" > foo > > > > OBSERVED RESULT > > foo has the mime type application/x-pak > That comes from the following entry in: > > /usr/share/mime/packages/freedesktop.org.xml > > <mime-type type="application/x-pak"> > <comment>PAK archive</comment> > ... > <comment xml:lang="en_GB">PAK archive</comment> > ... > <generic-icon name="package-x-generic"/> > <magic priority="80"> > <match offset="0" type="string" value="PACK"/> > </magic> > <glob pattern="*.pak"/> > </mime-type> > > Looks like the "PAK Archive" format was something in DOS back in the 1990's. > Can give you a German Wiki article (seemingly no English equivalent): > > https://de.wikipedia.org/wiki/PAK_(Dateiformat) A propriatary ancient format with a far to generic magic value :/ I guess if someone sees this and still has such a file lying around let me know, maybe there are additional magic values that can be used.
Bug is opened btw on freedesktop side: https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/210