Skip to content

v1.2.0

Choose a tag to compare

@zcalusic zcalusic released this 07 Nov 16:31
· 13 commits to master since this release
v1.2.0

A larger release: a newer Go, a removable flag for storage, DDR5 memory types, TinyGo support, and fixes for memory corruption in network detection, malformed SMBIOS tables and 32-bit disk sizes. sysinfo also never writes machine ID files any more.

Upgrade notes

  • Requires Go 1.27.
  • sysinfo never writes machine ID files. It used to copy /etc/machine-id and /var/lib/dbus/machine-id over each other when one was missing or they differed. That filled an intentionally empty /etc/machine-id (image templates, systemd first boot), wrote into containers, and during systemd's first boot replaced a valid D-Bus machine ID with "uninitialized". It now reads the systemd machine ID, falls back to the D-Bus one, ignores "uninitialized", and changes nothing.
  • cpu.threads counts all online CPUs, from /proc/cpuinfo. It came from runtime.NumCPU(), which counts only the CPUs the process may run on, so it was too low under taskset or a cpuset.
  • storage[].removable is new and always present, false included (Bipin B Narayan).

New

  • Memory types DDR5, LPDDR5 and HBM3, from the current SMBIOS specification (apocelipes).
  • The cpuid package builds with TinyGo (Moses Narrow).

Fixes

  • Network detection let the kernel write past the end of a Go struct: the SIOCETHTOOL ioctl copies back the whole struct ifreq, which the Go side declared too short.
  • A truncated SMBIOS table, or a record shorter than the fields read from it, could crash the parser or make it read the next record's bytes.
  • Disks of 2 TiB and larger got a wrong size on 32-bit systems.
  • AlmaLinux and Rocky Linux kept an empty version when their release file was missing; it now comes from os-release.
  • Read errors in /etc/os-release, /etc/sysconfig/clock and the udev database are no longer ignored.

Documentation

  • The README has fresh sample output, installs the demo with go install, and links pkg.go.dev.

Build and testing

  • CI is back on GitHub Actions: builds for amd64, 386 and arm64, go vet, tests, golangci-lint (with a configuration in the repo) and govulncheck.

Full Changelog: v1.1.3...v1.2.0