Rpm --verify rpm show missing files

I did a verification on rpm itself with command

rpm -Va rpm

and I got the following result:

.........    /usr/lib/rpm/rpmdb_dump
.........    /usr/lib/rpm/rpmdb_load
.........    /usr/lib/rpm/rpmdb_migrate
.........    /usr/lib/rpm/rpmpopt-4.18.0
.........    /usr/lib/rpm/rpmrc
.........    /usr/lib/rpm/tgpg
.........    /usr/lib/sysimage/rpm
.........  g /usr/lib/sysimage/rpm/.rpm.lock
missing   c /usr/lib/sysimage/rpm/Index.db
missing   c /usr/lib/sysimage/rpm/Packages.db
.........  c /usr/lib/sysimage/rpm/rpmdb.sqlite
.........  c /usr/lib/sysimage/rpm/rpmdb.sqlite-shm
.........  c /usr/lib/sysimage/rpm/rpmdb.sqlite-wal
.........    /usr/lib/systemd/system/rpmdb-migrate.service
.........    /usr/lib/systemd/system/rpmdb-rebuild.service
.........    /usr/share/doc/rpm
.........  d /usr/share/doc/rpm/CREDITS
.........  d /usr/share/doc/rpm/arch_dependencies.md
.........  d /usr/share/doc/rpm/autosetup.md
.........  d /usr/share/doc/rpm/boolean_dependencies.md
.........  d /usr/share/doc/rpm/buildprocess.md
.........  d /usr/share/doc/rpm/conditionalbuilds.md
.........  d /usr/share/doc/rpm/dependencies.md
.........  d /usr/share/doc/rpm/dependency_generators.md
.........  d /usr/share/doc/rpm/file_triggers.md
.........  d /usr/share/doc/rpm/format.md
.........  d /usr/share/doc/rpm/hregions.md

why /usr/lib/sysimage/rpm/Index.db and /usr/lib/sysimage/rpm/Packages.db missing?

and what are flags g,a,l,c stand for? where can I get more info about them?

From man rpm (you run man rpm from the command line) way down

       The format of the output is a string of 9 characters, a possible attribute marker:

              c %config configuration file.
              d %doc documentation file.
              g %ghost file (i.e. the file contents are not included in the package payload).
              l %license license file.
              r %readme readme file.

And further

              S file Size differs
              M Mode differs (includes permissions and file type)
              5 digest (formerly MD5 sum) differs
              D Device major/minor number mismatch
              L readLink(2) path mismatch
              U User ownership differs
              G Group ownership differs
              T mTime differs
              P caPabilities differ

These are the letters indicating the type of verification error.

but there’s no letter a .

Which ā€œaā€ are you referring to?

Probably a bug in your rpm version, the missing files are not on disk and do not give an error in the version I have, rpm-4.18.0-1.fc37.x86_64
They are visible with ā€œrpm -ql rpmā€ but disappear with ā€œrpm -ql --noghostā€ rpm.

When asking about the a flag are you referring to a segment of output from rpm -Vav that looks like this?
I got no output from rpm -Va and had to add the verbose option to show your posted output.

.........    /usr/bin/rpmquery
.........    /usr/bin/rpmverify
.........  a /usr/lib/.build-id
.........  a /usr/lib/.build-id/8c
.........  a /usr/lib/.build-id/8c/92012eaaea9d2f59ab90205b1effe69c64f7e8
.........  a /usr/lib/.build-id/92
.........  a /usr/lib/.build-id/92/5ebbb009c38021613c5f9230f60b29bf7a44ea
.........  a /usr/lib/.build-id/9b
.........  a /usr/lib/.build-id/9b/c276fc5f9fec6eae1de4cf8f7172b4ef612727
.........  a /usr/lib/.build-id/d4
.........  a /usr/lib/.build-id/d4/d588f44578fac7829009d96e5e16a8a561f36f
.........  a /usr/lib/.build-id/dd
.........  a /usr/lib/.build-id/dd/ba3952434538a71668ca5b1de07589356d3c4e
.........    /usr/lib/rpm
.........    /usr/lib/rpm/fileattrs
.........    /usr/lib/rpm/lua
.........    /usr/lib/rpm/macros
.........    /usr/lib/rpm/macros.d

If so then note that the path is a build path /usr/lib/.build-id/ and probably exists because you have an additional package rpm-build installed as I do.

I do not find that flag documented in the man page for either ā€œrpmā€ or ā€œrpmbuildā€ but I conjecture that it possibly means ā€˜additional’, ā€˜added’ or something similar.

I just ran an upgrade from F36 to F37 yesterday and I found that build path contains 256 subdirectories all with the date of Dec 1 (the date of the upgrade). Under those subdirs I find over 10,000 additional entries which are all links to various files&directories on the system. I have over 2500 rpm packages installed on this system

Those links all have various dates roughly corresponding to when dnf upgrades were done and may be related to when drpm files were downloaded as part of the upgrades since a drpm requires a rebuild of the original already installed rpm.

From my point of view it is not a worry, but feel the meaning should be documented since it does appear in the verify output.

Remarkable, ā€œrpm -Va rpmā€ shows nothing, but ā€œrpm -Vav rpmā€ shows the .db files as missing… They are really not there, I assume they belong to the before-sqlite database format.

The ā€œaā€ stands for artifact, ā€œrpm -qlA rpmā€ shows only the ā€œaā€ labelled files.

Manpage:
–excludeartifacts
Don’t install any files which are marked as artifacts, such as build-id links.

This is the complete actual list from the rpm source:
if ((fflags & RPMFILE_DOC))
*p++ = ā€˜d’;
if ((fflags & RPMFILE_CONFIG))
*p++ = ā€˜c’;
if ((fflags & RPMFILE_SPECFILE))
*p++ = ā€˜s’;
if ((fflags & RPMFILE_MISSINGOK))
*p++ = ā€˜m’;
if ((fflags & RPMFILE_NOREPLACE))
*p++ = ā€˜n’;
if ((fflags & RPMFILE_GHOST))
*p++ = ā€˜g’;
if ((fflags & RPMFILE_LICENSE))
*p++ = ā€˜l’;
if ((fflags & RPMFILE_README))
*p++ = ā€˜r’;
if ((fflags & RPMFILE_ARTIFACT))
*p++ = ā€˜a’;

1 Like

Don’t know about the rpm progression, but mine was a new install with F32 and upgraded since. I show those 2 files as missing.

Sorry, I was confused by the o.p. mentioning the ā€œrpm -Vaā€ command but showing the output of ā€œrpm -Va -vā€.

The manual page speaks concerning the attributes about a string of 9 characters, and explains 5 of them. From the source code, I’ve the impression, at least with missing files, that only the first one is printed. A small source code modification delivers:

missing   cmng /usr/lib/sysimage/rpm/Index.db
missing   cmng /usr/lib/sysimage/rpm/Packages.db

which corresponds with rpm’s spec file:

attr(0644, root, root) %ghost %config(missingok,noreplace) /usr/lib/sysimage/rpm/*

So apparently here is declared that all files in /usr/lib/sysimage/rpm are allowed to be missing and thus not printed during rpm -V

So: for verification use ā€œrpm -Vā€ without ā€œ-vā€ and trust the good old unix philosophy: if nothing is printed, it is OK.

1 Like