From cca8570a2c513ca4cfbc7d97f2e4844012c2847e Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Mon, 24 Oct 2022 16:49:29 +0000 Subject: [PATCH] Fixup ubuntu kernel package --- packages/kernels/build.yaml | 29 +++++++++++++++++++++-------- packages/kernels/collection.yaml | 2 +- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/packages/kernels/build.yaml b/packages/kernels/build.yaml index cd5c4ef..5d74ce4 100644 --- a/packages/kernels/build.yaml +++ b/packages/kernels/build.yaml @@ -1,12 +1,4 @@ image: "{{.Values.image}}:{{.Values.image_tag}}" -excludes: -- ^/boot/grub2 -- ^/boot/initrd - -unpack: true -includes: -- ^/boot|^/boot/.* -- ^/lib/modules|^/lib/modules.* steps: {{ if .Values.distribution }} @@ -40,3 +32,24 @@ steps: {{end}} {{end}} - kernel=$(ls /lib/modules | head -n1) && depmod -a "${kernel}" +{{if eq .Values.distribution "ubuntu" }} +- mkdir -p /package/boot +- mkdir -p /package/lib/modules +- cp -rfv /boot/* /package/boot +- cp -rfv /lib/modules/* /package/lib/modules +- rm -rf /package/boot/grub2 || true +- rm -rf /package/boot/grub || true +- rm -rf /package/boot/initrd || true +- rm -rf /package/boot/initrd.* || true +package_dir: "/package" +{{ else }} + +includes: +- ^/boot|^/boot/.* +- ^/lib/modules|^/lib/modules.* +excludes: +- ^/boot/grub2 +- ^/boot/initrd +unpack: true + +{{end}} diff --git a/packages/kernels/collection.yaml b/packages/kernels/collection.yaml index a843e63..d287095 100644 --- a/packages/kernels/collection.yaml +++ b/packages/kernels/collection.yaml @@ -16,7 +16,7 @@ packages: - category: "distro-kernels" name: "ubuntu" image_tag: "20.04" - version: "20.04+1" + version: "20.04+2" image: "ubuntu" distribution: "ubuntu" packages: "linux-image-generic-hwe-20.04 dracut dracut-network" \ No newline at end of file