github txlog/agent v1.20.0

3 hours ago

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 list row
    ended in an unanchored lazy group, so the last column matched a single
    character: a transaction touching 22 packages was sent as 2. verify never
    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 EE failed the row match and were dropped. The flags are now trimmed.
  • Missing hostname package. GetHostname shelled out to /usr/bin/hostname,
    which belongs to the optional hostname package. On a minimal RHEL-family
    install both txlog build and txlog verify failed with a fork/exec error.
    It now uses os.Hostname.
  • Epoch duplicated in the version field. SplitPackageName returned the
    epoch both in its own field and still glued to the version, so
    grub2-common-1:2.06-95.el9.noarch yielded epoch 1 and version 1: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 verify will report them as differing — which is the correct reading of what
is stored.

Improvements

  • make honors an ARCH variable (default amd64), so arm64 packages can be
    built for Raspberry Pi. nfpm.yaml takes the architecture from the same
    variable.
  • All HTTP calls share a single authenticated client, so the transaction loop
    in txlog build reuses connections instead of dialing per request.
  • /etc/os-release is 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/client package — 620 lines, roughly a quarter
    of the repository — left behind when internal/mcp, its only consumer, was
    deleted.
  • Dropped dead fields from TransactionDetail and redundant bookkeeping in
    cmd.
  • Added TestParseHistoryLine and TestSplitPackageName; neither parser had
    any coverage before.

Full Changelog: v1.19.1...v1.20.0

Don't miss a new agent release

NewReleases is sending notifications on new releases.