[openwrt/openwrt] package: include abiversion tag in package metadata

LEDE Commits lede-commits at lists.infradead.org
Sun Jun 22 02:41:26 PDT 2025


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a61a2a9291eed08d735a499828f4f2c7f7744a45

commit a61a2a9291eed08d735a499828f4f2c7f7744a45
Author: Eric Fahlgren <ericfahlgren at gmail.com>
AuthorDate: Mon Jun 9 16:59:13 2025 -0700

    package: include abiversion tag in package metadata
    
    OpenWrt library packages are often named using their ABI version,
    for example 'libubus20250102'.  Updates that cause the ABI version
    to change result in changes to the package name.  This makes it
    impossible for downstream tools to determine when a package update
    is available without further information.
    
    The opkg package manager stores the ABI version as part of its
    package metadata in the ABIVersion field.  This makes extraction
    of the canonical name of the package possible, allowing various
    versions of a package to be associated with one another, their
    versions or build dates compared.
    
    We add a custom tag 'openwrt:abiversion=<ABI version>' to the
    apk v3 package metadata, restoring the status quo and making it
    functionally backwards compatible with opkg (the tag format was
    selected per the guidelines in the apk-tools documentation).
    
    Links: https://gitlab.alpinelinux.org/alpine/apk-tools/-/commit/1925de55beef8859c987f72c3b2727d756296ddb
    Signed-off-by: Eric Fahlgren <ericfahlgren at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19082
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 include/package-pack.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/package-pack.mk b/include/package-pack.mk
index d784d0ac3b..925c4ca4c7 100644
--- a/include/package-pack.mk
+++ b/include/package-pack.mk
@@ -376,6 +376,7 @@ else
 	$(FAKEROOT) $(STAGING_DIR_HOST)/bin/apk mkpkg \
 	  --info "name:$(1)$$(ABIV_$(1))" \
 	  --info "version:$(VERSION)" \
+	  $$(if $$(ABIV_$(1)),--info "tags:openwrt:abiversion=$$(ABIV_$(1))") \
 	  --info "description:$$(call description_escape,$$(strip $$(Package/$(1)/description)))" \
 	  $(if $(findstring all,$(PKGARCH)),--info "arch:noarch",--info "arch:$(PKGARCH)") \
 	  --info "license:$(LICENSE)" \




More information about the lede-commits mailing list