Skip to content

spec: Update bpftool versioning scheme

Viktor Malik requested to merge vmalikrh/centos-stream-9:bpftool-version into main

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2139374

Upstream status: RHEL-only

The upstream has changed the versioning scheme of bpftool [1]. Instead of following the kernel version, it is now deduced from the libbpf version by adding +6 to the libbpf major version number.

This appropriately updates the bpftool sub-package version number. The version is deduced automatically from the libbpf version, which can be retrieved from tools/lib/bpf/libbpf.map.

One problem is that even though RPM allows to override sub-package version, doing that overrides the internal %{version} macro. The macro is used later throughout the specfile, so we reset it to its default value (%{specversion}) at the end of the bpftool sub-package definition.

[1] https://lore.kernel.org/bpf/20220210104237.11649-3-quentin@isovalent.com/

Signed-off-by: Viktor Malik vmalik@redhat.com

Merge request reports