rpm/lib
Panu Matilainen 61913883cc Replace per-file libmagic strings with MIME types in v6 packages
libmagic strings are useful for humans but less so for computers,
in particular when you start having things like

     PNG image data, 16 x 16, 8-bit/color RGBA, non-interlaced

All very fascinating but that level of image detail does not need to be
in package metadata. The libmagic strings also make the exact output
quite dependent on the exact libmagic version. They obviously want to
improve their output but for rpm's purposes, this is unwanted
instability. MIME types are far more predictable and also machine
processable in a whole different level, and that is what we'll use
for v6 packages.

We need to still produce fully compatible v4 packages though, and there are
external tools that look at the file class data in that tag, so we can't
just reuse the tag for MIME in v6 either. Which means we need to
duplicate all this goo, annoyingly. We get to drop some of it in v7,
one day...

Besides the concrete dictionary + per-file index header tags, add a
header extension to fill in gaps of data where possible and build into
a consumable format and add --filemime query alias for it, all very
very similar to --fileclass.

Add/adjust tests to match and show the difference between v4 and v6:
v4 packages have fileclass but only extension-populated mime types,
and v6 is the exact opposite.

Fixes: #1096
2024-09-24 11:57:12 +02:00
..
backend Replace typedef's with using = for new internal C++ constructs 2024-06-26 11:07:59 +03:00
CMakeLists.txt Build: Add include dirs to exported lib targets 2024-08-01 10:23:38 +03:00
cpio.c Natively allocate bunch of miscellaneous librpm structs 2024-04-30 09:06:31 +03:00
cpio.h Remove C++ guards from internal headers 2024-05-06 12:08:29 +03:00
depends.c Drop support for installing v3 packages 2024-09-19 16:36:58 +02:00
formats.c Use STL string for xml escaping too, it's a huge speedup 2024-05-23 12:58:17 +03:00
fprint.c Replace by-fingerprint rpmFpHash with STL unordered_map 2024-06-26 10:42:08 +02:00
fprint.h Replace by-fingerprint rpmFpHash with STL unordered_map 2024-06-26 10:42:08 +02:00
fsm.c Report unsafe symlinks during installation as a specific case 2024-08-27 13:32:57 +02:00
fsm.h Remove C++ guards from internal headers 2024-05-06 12:08:29 +03:00
gentagtbl.sh Use actual enum values in tag table sentinel to avoid int/enum mismatch 2010-09-21 15:26:25 +03:00
header.c Natively allocate main header related structs 2024-04-30 09:06:31 +03:00
header_internal.h Remove C++ guards from internal headers 2024-05-06 12:08:29 +03:00
headerfmt.c Take advantage of STL string for tag name formatting in queryformat 2024-05-23 12:58:17 +03:00
headerutil.c Drop self-provide retrofitting on v3 packages 2024-09-19 16:36:58 +02:00
manifest.c Add casts that C++ requires but C doesn't across librpm 2024-04-09 11:00:00 +03:00
manifest.h Remove C++ guards from internal headers 2024-05-06 12:08:29 +03:00
misc.h Remove C++ guards from internal headers 2024-05-06 12:08:29 +03:00
order.c Refactor ordering Tarjan algorithm to use STL vector for it's stack 2024-08-22 09:51:57 +03:00
package.c Take advantage of C++ native mutex facilities for keyid tracking 2024-09-24 10:08:38 +02:00
poptALL.c Add casts that C++ requires but C doesn't across librpm 2024-04-09 11:00:00 +03:00
poptI.c Add casts that C++ requires but C doesn't across librpm 2024-04-09 11:00:00 +03:00
poptQV.c Add casts that C++ requires but C doesn't across librpm 2024-04-09 11:00:00 +03:00
psm.c Convert triggers run tracking from local array to vector 2024-05-23 12:58:17 +03:00
query.c Drop top-level source for our global include directories 2023-09-13 13:34:17 +03:00
relocation.c Fix root relocation regression 2024-08-01 10:27:25 +03:00
rpmal.c Replace typedef's with using = for new internal C++ constructs 2024-06-26 11:07:59 +03:00
rpmal.h Use vectors for returning multiple values from rpmalAll*() 2024-05-07 09:16:12 +03:00
rpmchecksig.c Add casts that C++ requires but C doesn't across librpm 2024-04-09 11:00:00 +03:00
rpmchroot.c Axe the experimental non-privileged chroot support from b4c832ca 2023-09-15 16:23:46 +03:00
rpmchroot.h Remove C++ guards from internal headers 2024-05-06 12:08:29 +03:00
rpmdb.c Drop support for legacy region migration from rpmdb build 2024-09-19 16:36:58 +02:00
rpmdb_internal.h Replace typedef's with using = for new internal C++ constructs 2024-06-26 11:07:59 +03:00
rpmds.c Natively allocate rpmds, rpmfiles and rpmfi mains structs 2024-04-30 09:06:31 +03:00
rpmds_internal.h Remove C++ guards from internal headers 2024-05-06 12:08:29 +03:00
rpmfi.c Replace per-file libmagic strings with MIME types in v6 packages 2024-09-24 11:57:12 +02:00
rpmfi_internal.h Eliminate the ancient, useless fingerPrint_s -> fingerPrint typedef 2024-06-26 10:42:08 +02:00
rpmfs.c Natively allocate rpmfs structs 2024-04-30 09:06:31 +03:00
rpmfs.h Remove C++ guards from internal headers 2024-05-06 12:08:29 +03:00
rpmgi.c Natively allocate bunch of miscellaneous librpm structs 2024-04-30 09:06:31 +03:00
rpmgi.h Remove C++ guards from internal headers 2024-05-06 12:08:29 +03:00
rpminstall.c Drop support for installing v3 packages 2024-09-19 16:36:58 +02:00
rpmlead.c Bump the rpm version in the lead to 4 for v6 packages 2024-04-04 13:01:55 +03:00
rpmlead.h Remove C++ guards from internal headers 2024-05-06 12:08:29 +03:00
rpmlock.c Natively allocate bunch of miscellaneous librpm structs 2024-04-30 09:06:31 +03:00
rpmlock.h Remove C++ guards from internal headers 2024-05-06 12:08:29 +03:00
rpmplugins.c Natively allocate plugin structures, use a vector for storage 2024-04-30 09:06:31 +03:00
rpmplugins.h Remove C++ guards from internal headers 2024-05-06 12:08:29 +03:00
rpmprob.c Natively allocate rpmps and rpmprob structs, use vector for prob storage 2024-04-30 09:06:31 +03:00
rpmps.c Natively allocate rpmps and rpmprob structs, use vector for prob storage 2024-04-30 09:06:31 +03:00
rpmrc.c Take advantage of C++ native mutex facilities for rpmrc locking 2024-09-24 10:08:38 +02:00
rpmscript.c Filter Lua deprecation warnings based on the originating rpm version 2024-09-23 19:09:45 +02:00
rpmscript.h Remove C++ guards from internal headers 2024-05-06 12:08:29 +03:00
rpmtd.c Natively allocate main header related structs 2024-04-30 09:06:31 +03:00
rpmte.c Use an STL vector for the transaction main rpmte pointer storage 2024-05-08 09:40:10 +03:00
rpmte_internal.h Remove C++ guards from internal headers 2024-05-06 12:08:29 +03:00
rpmtriggers.c Fix %transfiletriggerpostun execution over multiple prefixes 2024-09-03 14:38:04 +03:00
rpmtriggers.h Fix inconsistencies wrt trigger priority handling 2024-09-03 14:38:04 +03:00
rpmts.c Fix minor memleak introduced in commit edbcb4501c 2024-07-30 10:32:59 +03:00
rpmts_internal.h Minimally convert transaction diskspace info to STL 2024-06-26 09:46:30 +03:00
rpmug.c Implement proper user/group lookup caching with STL maps 2024-05-07 09:51:16 +03:00
rpmug.h Remove C++ guards from internal headers 2024-05-06 12:08:29 +03:00
rpmvs.c Drop a leftover pthread.h include in rpmvs 2024-09-24 10:08:38 +02:00
rpmvs.h Remove C++ guards from internal headers 2024-05-06 12:08:29 +03:00
signature.c Add casts that C++ requires but C doesn't across librpm 2024-04-09 11:00:00 +03:00
signature.h Remove C++ guards from internal headers 2024-05-06 12:08:29 +03:00
tagexts.c Replace per-file libmagic strings with MIME types in v6 packages 2024-09-24 11:57:12 +02:00
tagname.c Eliminate pthread_once in tag table preparation 2024-09-24 10:08:38 +02:00
transaction.c Detach fingerprint storage from the rpmhash internals 2024-06-26 10:42:08 +02:00
verify.c Add casts that C++ requires but C doesn't across librpm 2024-04-09 11:00:00 +03:00