[RFC/upstream:linux 2/5] kbuild: snap-pkg: cut too long version property
Masahiro Yamada
masahiro.yamada at canonical.com
Tue Feb 28 09:49:46 UTC 2023
$(KERNELVERSION) can become longer than the 32-chars limit, then the
following error occurs:
Issues while validating snapcraft.yaml: The 'version' property does not match the required schema: '6.2.0-rc8-00151-g925cf0457d7e-dirty' is too long (maximum length is 32)
Signed-off-by: Masahiro Yamada <masahiro.yamada at canonical.com>
---
scripts/Makefile.package | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/Makefile.package b/scripts/Makefile.package
index 3058d0cdb578..037d42db0b55 100644
--- a/scripts/Makefile.package
+++ b/scripts/Makefile.package
@@ -138,7 +138,7 @@ snap-pkg:
mkdir $(objtree)/snap
$(MAKE) clean
$(call cmd,src_tar,$(KERNELPATH))
- sed "s at KERNELRELEASE@$(KERNELRELEASE)@; \
+ sed "s at KERNELRELEASE@$$(echo $(KERNELRELEASE) | cut -b -32)@; \
s at SRCTREE@$(shell realpath $(KERNELPATH).tar.gz)@" \
$(srctree)/scripts/package/snapcraft.template > \
$(objtree)/snap/snapcraft.yaml
--
2.34.1
More information about the kernel-team
mailing list