Post-migration package drift audit — a measured methodology on a 631-package baseline: the extras sweep, grouping by source RPM, config drift, and versionlock
Verification scope
Section titled “Verification scope”Evidence on this page is the hardware track (E3) — VM 381 euler24-lab (openEuler 24.03 LTS SP4, Kickstart minimal install plus lab increments, 2026-11-05): the full four-step audit chain measured. Raw log: evidence/logs/openeuler-p5-drift-audit-vm.log.
The audit baseline: 631 packages, zero duplicates
Section titled “The audit baseline: 631 packages, zero duplicates”$ rpm -qa | wc -l631$ rpm -qa --qf '%{NAME}\n' | sort | uniq -d # duplicate detection (a reinstall of the same NEVRA leaves traces)(empty — clean)On a migrated machine, take these two numbers first: the total package count (cross-check against the assessment report; abnormal inflation/absence both point to a migration incident) and the duplicate detection (a signal of rpm database anomalies).
The orphan sweep: dnf repoquery —extras
Section titled “The orphan sweep: dnf repoquery —extras”$ dnf repoquery --extras | wc -l0--extras lists packages that are installed but in no enabled repository — on a migrated machine that’s the direct manifest of “leftovers from the old distribution” (typically: EPEL packages from the CentOS side, third-party packages since delisted). This lab machine reads 0 (clean install + a single DVD source; the reading matches expectations). For a non-zero on a migrated machine: decide each package’s fate one by one (look for an equivalent via the package name map, remove it if confirmed useless). Mind the precondition of that reading: the set of enabled repositories must be complete — an offline machine with only the DVD source attached would misjudge newer versions sitting in the update repo as extras; configure the full repo set or switch to a networked audit machine before auditing.
Grouping by origin: who brought in the most packages
Section titled “Grouping by origin: who brought in the most packages”$ rpm -qa --qf '%{SOURCERPM}\n' | sed 's/-[0-9].*//' | sort | uniq -c | sort -rn | head -6 27 libvirt 17 sssd 7 boost 6 util-linux 6 grub2 6 glusterfsGrouping at the source-RPM dimension reduces the 631 binary packages back to a source-package view (one libvirt source package brings 27 subpackages) — migration cross-checks, vulnerability-surface assessment (which subpackages a single SRPM’s CVEs touch), and slimming decisions all build on this view.
Config drift: rpm -Vc
Section titled “Config drift: rpm -Vc”$ rpm -Vc setupS.5....T. c /etc/csh.login # size/content and mtime both changedrpm -Vc checks only config files (c class) — this lab machine caught a real drift on the spot (/etc/csh.login was modified). How to read it on a migrated machine: for S.5 (content changed), diff each one to confirm it was an intentional edit or old-distribution residue; T (timestamp only) is usually the package manager’s own touch — mostly noise.
versionlock: the plugin has to be installed
Section titled “versionlock: the plugin has to be installed”$ dnf versionlock listNo such command: versionlock. … try: "dnf install 'dnf-command(versionlock)'"openEuler’s base install ships without the versionlock plugin (dnf itself offers the install command) — when you want to lock down “confirmed package versions” after the audit, start with dnf install dnf-command(versionlock). Suggested audit cadence: one full pass after migration (the four steps on this page) + periodic light rechecks alongside maintenance windows (the two light steps: extras and -Vc).
Unverified
Section titled “Unverified”- versionlock lock/unlock end-to-end was not executed (the plugin install command was measured; the hub carries a dnf version-lock basics page with the generic flow);
- Audit timing on large migrated machines (thousands of packages, multiple repos) untested (this 631-package baseline completed in seconds);
rpm -Vafull verification (the non-config surface) was not run (slow and noisy; the config surface -Vc already covers the drift’s main need).