Fixup ubuntu kernel package

This commit is contained in:
Ettore Di Giacinto 2022-10-24 16:49:29 +00:00
parent 86af821583
commit cca8570a2c
2 changed files with 22 additions and 9 deletions

View File

@ -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}}

View File

@ -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"