This release fixes four bugs in how the agent reads dnf history and package
names, all of which silently corrupted or dropped data on the server side.
Fixes
- Truncated altered count. The regex slicing each
dnf history listrow
ended in an unanchored lazy group, so the last column matched a single
character: a transaction touching 22 packages was sent as2.verifynever
caught it, since it compares transaction items rather than this field. - Skipped transactions with dnf status flags. Dnf appends
>,<,E,
*and#to the Altered column to describe the transaction. Once the
truncation above was fixed and the full column became visible, rows like
1295 EEfailed the row match and were dropped. The flags are now trimmed. - Missing hostname package.
GetHostnameshelled out to/usr/bin/hostname,
which belongs to the optionalhostnamepackage. On a minimal RHEL-family
install bothtxlog buildandtxlog verifyfailed with a fork/exec error.
It now usesos.Hostname. - Epoch duplicated in the version field.
SplitPackageNamereturned the
epoch both in its own field and still glued to the version, so
grub2-common-1:2.06-95.el9.noarchyielded epoch1and version1:2.06.
Note for operators: packages with an epoch were recorded on the server
with the old version string. Until those transactions are re-sent,txlog verifywill report them as differing — which is the correct reading of what
is stored.
Improvements
makehonors anARCHvariable (defaultamd64), so arm64 packages can be
built for Raspberry Pi.nfpm.yamltakes the architecture from the same
variable.- All HTTP calls share a single authenticated client, so the transaction loop
intxlog buildreuses connections instead of dialing per request. /etc/os-releaseis parsed once into a map instead of being re-read per field.- Go 1.26 idioms:
errors.AsType(which also handles wrapped errors) and
strings.SplitSeq.
Housekeeping
- Removed the orphaned
internal/clientpackage — 620 lines, roughly a quarter
of the repository — left behind wheninternal/mcp, its only consumer, was
deleted. - Dropped dead fields from
TransactionDetailand redundant bookkeeping in
cmd. - Added
TestParseHistoryLineandTestSplitPackageName; neither parser had
any coverage before.
Full Changelog: v1.19.1...v1.20.0