From 686694792b06b11b2cef0acf28d81e25a280cb72 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Wed, 22 Jan 2025 07:48:38 +0100 Subject: [PATCH] package/pkg-generic: store real version in legal manifest The legal manifest currently stores the $(PKG)_VERSION variable. However, that variable undergoes a set of changes so that it is suitable for creating files and Makefile rules; that new value is purely a technical, internal detail of how Buildroot handles things. In the legal manifest, we need access to the real value for the version, as this is what will allow actual references to the upstream package. If the version string is mangled, like slashes replaced with underscores, this introduces ambiguities as to what exactly the version is. In Buildroot, there is no package, with a constant version, that exhibits that issue; for those packages where it is possible to set a custom git tree and version, like linux or uboot, such a custom tree can have tags with a slash (not a colon or a space, forbidden by git); packages in a br2-external can also use such version strings as well. The packages that do have such versions are not legion, but they do exist. For example, Apache's ant buildsystem does use a slash in their reelase tags, like rel/1.10.15: https://github.com/apache/ant/tags Change the legal manifest to include the actual, original value as was set in the .mk file. Signed-off-by: Yann E. MORIN Cc: Thomas Petazzoni Cc: Luca Ceresoli Tested-by: Luca Ceresoli Reviewed-by: Luca Ceresoli Signed-off-by: Julien Olivain --- package/pkg-generic.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index fe0a7bef38..fb9d9996c8 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -1193,7 +1193,7 @@ else endif # other packages endif # redistribute - @$$(call legal-manifest,$$(call UPPERCASE,$(4)),$$($(2)_RAWNAME),$$($(2)_VERSION),$$(subst $$(space)$$(comma),$$(comma),$$($(2)_LICENSE)),$$($(2)_MANIFEST_LICENSE_FILES),$$($(2)_ACTUAL_SOURCE_TARBALL),$$($(2)_ACTUAL_SOURCE_SITE),$$(call legal-deps,$(1))) + @$$(call legal-manifest,$$(call UPPERCASE,$(4)),$$($(2)_RAWNAME),$$($(2)_DL_VERSION),$$(subst $$(space)$$(comma),$$(comma),$$($(2)_LICENSE)),$$($(2)_MANIFEST_LICENSE_FILES),$$($(2)_ACTUAL_SOURCE_TARBALL),$$($(2)_ACTUAL_SOURCE_SITE),$$(call legal-deps,$(1))) endif # ifneq ($$(call qstrip,$$($(2)_SOURCE)),) $$(foreach hook,$$($(2)_POST_LEGAL_INFO_HOOKS),$$(call $$(hook))$$(sep))