[mantic:linux-signed][PATCH 3/5] UBUNTU: Install snapd-info file if available

Dimitri John Ledkov dimitri.ledkov at canonical.com
Fri Jul 14 21:30:51 UTC 2023


Kernel snaps require top-level snapd-info file, as extracted from the
initrd. Vendor it into the signing tarball and install it in
.deb. Note this file is likely to move soon, thus two locations are
checked.

BugLink: https://bugs.launchpad.net/bugs/2027818
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov at canonical.com>
---
 debian/ancillary/linux-generate/debian/scripts/gen-rules | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/debian/ancillary/linux-generate/debian/scripts/gen-rules b/debian/ancillary/linux-generate/debian/scripts/gen-rules
index 1559d7da5c..962e182365 100755
--- a/debian/ancillary/linux-generate/debian/scripts/gen-rules
+++ b/debian/ancillary/linux-generate/debian/scripts/gen-rules
@@ -76,9 +76,11 @@ with open(out_rules, "w") as ofd:
         custom_dir=$(custom_top)/$(version)
         custom_tar=$(source)_$(version)_$(arch).tar.gz
         .PHONY: custom-upload
+        snapd_info=$(firstword $(wildcard /usr/lib/ubuntu-core-initramfs/main/usr/lib/snapd/info /usr/lib/snapd/info))
         custom-upload:
             install -d $(custom_dir)/control
             { echo "tarball"; } >$(custom_dir)/control/options
+            [ -n "$(snapd_info)" ] && cp $(snapd_info) $(custom_dir)/snapd-info
             cd $(custom_top) && tar czvf ../../../$(custom_tar) .
             dpkg-distaddfile $(custom_tar) raw-signing -
 
-- 
2.34.1




More information about the kernel-team mailing list