Skip to contentSkip to conversation

meta-initramfs-image: remove klibc utilities

PATCH In review Andrea Adami 2 participants 5 messages Apr 23, 2020 – Apr 27, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meta-initramfs-image: remove klibc utilities

klibc utils have no update-alternatives because these live ideally alone in th einitramfs. This image is not minimal having busybox, linux-utils, coreutils so to resolve the conflict we just remove the shared klibc utils and replace the klibc kexec and vmcore-dmesg.

Finally, remove EXCLUDE_FROM_WORLD.

Fix:
ERROR: meta-initramfs-image-1.0-r0 do_rootfs:
Postinstall scriptlets of ['busybox', 'util-linux-umount', 'util-linux-dmesg',
'coreutils', 'util-linux-mount', 'cpio', 'util-linux-kill', 'util-linux-losetup'] have failed.

---
 .../packagegroups/packagegroup-meta-initramfs.bb | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)
meta-initramfs/recipes-core/packagegroups/packagegroup-meta-initramfs.bb +2 -14
index bfede5a74..dc4928b5a 100644
@@ -15,22 +15,10 @@ RDEPENDS_packagegroup-meta-initramfs = "\
 "
 
 RDEPENDS_packagegroup-meta-initramfs-devtools = "\
-    libklibc  dracut \
-    klibc-utils-cat klibc-utils-losetup klibc-utils-readlink klibc-utils-chroot \
-    klibc-utils-ls klibc-utils-reboot klibc-utils-cpio klibc-utils-minips \
-    klibc-utils-resume klibc-utils-dd klibc-utils-mkdir klibc-utils-run-init \
-    klibc-utils-dmesg klibc-utils-mkfifo klibc-utils-sh.shared klibc-utils-false \
-    klibc-utils-mknod klibc-utils-sleep klibc-utils-fstype klibc-utils-mount \
-    klibc-utils-sync klibc-utils-halt klibc-utils-mv klibc-utils-true klibc-utils-ipconfig \
-    klibc-utils-nfsmount klibc-utils-umount klibc-utils-kill klibc-utils-nuke klibc-utils-uname \
-    mtdinfo-klibc ubiattach-klibc ubiblock-klibc ubicrc32-klibc ubidetach-klibc \
-    ubiformat-klibc ubimkvol-klibc ubinfo-klibc ubinize-klibc ubirename-klibc \
-    ubirmvol-klibc ubirsvol-klibc ubiupdatevol-klibc \
+    dracut \
     ${@bb.utils.contains_any("TRANSLATED_TARGET_ARCH", "i586 x86-64", "grubby", "", d)} \
     "
 
 RDEPENDS_packagegroup-meta-initramfs-kernel = "\
-    kexec-klibc vmcore-dmesg-klibc \
+    kexec vmcore-dmesg \
     "
-
-EXCLUDE_FROM_WORLD = "1"
Signature · 1 line
2.17.1
#1 lore raw
Quoted 35 lines · Andrea Adami

klibc utils have no update-alternatives because these live ideally alone in th einitramfs. This image is not minimal having busybox, linux-utils, coreutils so to resolve the conflict we just remove the shared klibc utils and replace the klibc kexec and vmcore-dmesg.

Finally, remove EXCLUDE_FROM_WORLD.

Fix:
ERROR: meta-initramfs-image-1.0-r0 do_rootfs:
Postinstall scriptlets of ['busybox', 'util-linux-umount', 'util-linux-dmesg',
'coreutils', 'util-linux-mount', 'cpio', 'util-linux-kill', 'util-linux-losetup'] have failed.

---
 .../packagegroups/packagegroup-meta-initramfs.bb | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)
meta-initramfs/recipes-core/packagegroups/packagegroup-meta-initramfs.bb +0 -8
index bfede5a74..dc4928b5a 100644
@@ -15,22 +15,10 @@ RDEPENDS_packagegroup-meta-initramfs = "\
 "
 
 RDEPENDS_packagegroup-meta-initramfs-devtools = "\
-    libklibc  dracut \
-    klibc-utils-cat klibc-utils-losetup klibc-utils-readlink klibc-utils-chroot \
-    klibc-utils-ls klibc-utils-reboot klibc-utils-cpio klibc-utils-minips \
-    klibc-utils-resume klibc-utils-dd klibc-utils-mkdir klibc-utils-run-init \
-    klibc-utils-dmesg klibc-utils-mkfifo klibc-utils-sh.shared klibc-utils-false \
-    klibc-utils-mknod klibc-utils-sleep klibc-utils-fstype klibc-utils-mount \
-    klibc-utils-sync klibc-utils-halt klibc-utils-mv klibc-utils-true klibc-utils-ipconfig \
-    klibc-utils-nfsmount klibc-utils-umount klibc-utils-kill klibc-utils-nuke klibc-utils-uname \

meta-initramfs/recipes-core/packagegroups/packagegroup-meta-initramfs.bb RDEPENDS_packagegroup-meta-initramfs = "\ · line 23

Quoted 10 lines
meta-initramfs/recipes-core/packagegroups/packagegroup-meta-initramfs.bb +2 -4
-    mtdinfo-klibc ubiattach-klibc ubiblock-klibc ubicrc32-klibc ubidetach-klibc \
-    ubiformat-klibc ubimkvol-klibc ubinfo-klibc ubinize-klibc ubirename-klibc \
-    ubirmvol-klibc ubirsvol-klibc ubiupdatevol-klibc \
+    dracut \
     ${@bb.utils.contains_any("TRANSLATED_TARGET_ARCH", "i586 x86-64", "grubby", "", d)} \
     "
 
 RDEPENDS_packagegroup-meta-initramfs-kernel = "\
-    kexec-klibc vmcore-dmesg-klibc \
+    kexec vmcore-dmesg \

this creates a dependency on kexec-tools from oe-core, this however is not buildable on some arches e.g. riscv
so this change does not work as such, I think you can only add it as dependency where its supported.

Quoted 7 lines
meta-initramfs/recipes-core/packagegroups/packagegroup-meta-initramfs.bb +0 -3
     "
-
-EXCLUDE_FROM_WORLD = "1"
--

2.17.1

#2 lore raw
Quoted 44 lines · Khem Raj
Quoted 42 lines · Andrea Adami

klibc utils have no update-alternatives because these live ideally alone in th einitramfs. This image is not minimal having busybox, linux-utils, coreutils so to resolve the conflict we just remove the shared klibc utils and replace the klibc kexec and vmcore-dmesg.

Finally, remove EXCLUDE_FROM_WORLD.

Fix:
ERROR: meta-initramfs-image-1.0-r0 do_rootfs:
Postinstall scriptlets of ['busybox', 'util-linux-umount', 'util-linux-dmesg',
'coreutils', 'util-linux-mount', 'cpio', 'util-linux-kill', 'util-linux-losetup'] have failed.

---
 .../packagegroups/packagegroup-meta-initramfs.bb | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)
meta-initramfs/recipes-core/packagegroups/packagegroup-meta-initramfs.bb +1 -11
index bfede5a74..dc4928b5a 100644
@@ -15,22 +15,10 @@ RDEPENDS_packagegroup-meta-initramfs = "\
 "
 
 RDEPENDS_packagegroup-meta-initramfs-devtools = "\
-    libklibc  dracut \
-    klibc-utils-cat klibc-utils-losetup klibc-utils-readlink klibc-utils-chroot \
-    klibc-utils-ls klibc-utils-reboot klibc-utils-cpio klibc-utils-minips \
-    klibc-utils-resume klibc-utils-dd klibc-utils-mkdir klibc-utils-run-init \
-    klibc-utils-dmesg klibc-utils-mkfifo klibc-utils-sh.shared klibc-utils-false \
-    klibc-utils-mknod klibc-utils-sleep klibc-utils-fstype klibc-utils-mount \
-    klibc-utils-sync klibc-utils-halt klibc-utils-mv klibc-utils-true klibc-utils-ipconfig \
-    klibc-utils-nfsmount klibc-utils-umount klibc-utils-kill klibc-utils-nuke klibc-utils-uname \
-    mtdinfo-klibc ubiattach-klibc ubiblock-klibc ubicrc32-klibc ubidetach-klibc \
-    ubiformat-klibc ubimkvol-klibc ubinfo-klibc ubinize-klibc ubirename-klibc \
-    ubirmvol-klibc ubirsvol-klibc ubiupdatevol-klibc \
+    dracut \
     ${@bb.utils.contains_any("TRANSLATED_TARGET_ARCH", "i586 x86-64", "grubby", "", d)} \
     "
 
Quoted 9 lines

meta-initramfs/recipes-core/packagegroups/packagegroup-meta-initramfs.bb RDEPENDS_packagegroup-meta-initramfs = "\ · line 23

Quoted 3 lines
meta-initramfs/recipes-core/packagegroups/packagegroup-meta-initramfs.bb +1 -1
 RDEPENDS_packagegroup-meta-initramfs-kernel = "\
-    kexec-klibc vmcore-dmesg-klibc \
+    kexec vmcore-dmesg \

this creates a dependency on kexec-tools from oe-core, this however is not buildable on some arches e.g. riscv
so this change does not work as such, I think you can only add it as dependency where its supported.

Well, the problem was already there, kexec-tools klibc and oe-core both have

COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|freebsd.*)'

I really have no idea about the image purposes, I see there is dracut which seems to be buildable for most archs and does not have runtime deps on kexec-tools.
Maybe we can just remove kexec and vmcore-dmesg

Cheers
Andrea

Quoted 7 lines
Quoted 7 lines
meta-initramfs/recipes-core/packagegroups/packagegroup-meta-initramfs.bb +0 -3
     "
-
-EXCLUDE_FROM_WORLD = "1"
--

2.17.1

#3 lore raw
Quoted 58 lines · Andrea Adami
Quoted 44 lines · Khem Raj
Quoted 42 lines · Andrea Adami

klibc utils have no update-alternatives because these live ideally alone in th einitramfs. This image is not minimal having busybox, linux-utils, coreutils so to resolve the conflict we just remove the shared klibc utils and replace the klibc kexec and vmcore-dmesg.

Finally, remove EXCLUDE_FROM_WORLD.

Fix:
ERROR: meta-initramfs-image-1.0-r0 do_rootfs:
Postinstall scriptlets of ['busybox', 'util-linux-umount', 'util-linux-dmesg',
'coreutils', 'util-linux-mount', 'cpio', 'util-linux-kill', 'util-linux-losetup'] have failed.

---
 .../packagegroups/packagegroup-meta-initramfs.bb | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)
meta-initramfs/recipes-core/packagegroups/packagegroup-meta-initramfs.bb +1 -11
index bfede5a74..dc4928b5a 100644
@@ -15,22 +15,10 @@ RDEPENDS_packagegroup-meta-initramfs = "\
 "
 
 RDEPENDS_packagegroup-meta-initramfs-devtools = "\
-    libklibc  dracut \
-    klibc-utils-cat klibc-utils-losetup klibc-utils-readlink klibc-utils-chroot \
-    klibc-utils-ls klibc-utils-reboot klibc-utils-cpio klibc-utils-minips \
-    klibc-utils-resume klibc-utils-dd klibc-utils-mkdir klibc-utils-run-init \
-    klibc-utils-dmesg klibc-utils-mkfifo klibc-utils-sh.shared klibc-utils-false \
-    klibc-utils-mknod klibc-utils-sleep klibc-utils-fstype klibc-utils-mount \
-    klibc-utils-sync klibc-utils-halt klibc-utils-mv klibc-utils-true klibc-utils-ipconfig \
-    klibc-utils-nfsmount klibc-utils-umount klibc-utils-kill klibc-utils-nuke klibc-utils-uname \
-    mtdinfo-klibc ubiattach-klibc ubiblock-klibc ubicrc32-klibc ubidetach-klibc \
-    ubiformat-klibc ubimkvol-klibc ubinfo-klibc ubinize-klibc ubirename-klibc \
-    ubirmvol-klibc ubirsvol-klibc ubiupdatevol-klibc \
+    dracut \
     ${@bb.utils.contains_any("TRANSLATED_TARGET_ARCH", "i586 x86-64", "grubby", "", d)} \
     "
 
Quoted 9 lines

meta-initramfs/recipes-core/packagegroups/packagegroup-meta-initramfs.bb RDEPENDS_packagegroup-meta-initramfs = "\ · line 23

Quoted 3 lines
meta-initramfs/recipes-core/packagegroups/packagegroup-meta-initramfs.bb +1 -1
 RDEPENDS_packagegroup-meta-initramfs-kernel = "\
-    kexec-klibc vmcore-dmesg-klibc \
+    kexec vmcore-dmesg \

this creates a dependency on kexec-tools from oe-core, this however is not buildable on some arches e.g. riscv
so this change does not work as such, I think you can only add it as dependency where its supported.

Well, the problem was already there, kexec-tools klibc and oe-core both have

Quoted 9 lines

COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|freebsd.*)'

I really have no idea about the image purposes, I see there is dracut which seems to be buildable for most archs and does not have runtime deps on kexec-tools.
Maybe we can just remove kexec and vmcore-dmesg

these were mainly for testing builds of the given layer. So I think removing kexec and vmcore-dmesg is ok

Quoted 12 lines

Cheers
Andrea

Quoted 7 lines
Quoted 7 lines
meta-initramfs/recipes-core/packagegroups/packagegroup-meta-initramfs.bb +0 -3
     "
-
-EXCLUDE_FROM_WORLD = "1"
--

2.17.1

#4 lore raw

Khem,
please disregard this patch as superseded, a new one specific for the packagegroup is coming.

Thanks!
Andres

Quoted 85 lines · Khem Raj
Quoted 58 lines · Andrea Adami
Quoted 44 lines · Khem Raj
Quoted 42 lines · Andrea Adami

klibc utils have no update-alternatives because these live ideally alone in th einitramfs. This image is not minimal having busybox, linux-utils, coreutils so to resolve the conflict we just remove the shared klibc utils and replace the klibc kexec and vmcore-dmesg.

Finally, remove EXCLUDE_FROM_WORLD.

Fix:
ERROR: meta-initramfs-image-1.0-r0 do_rootfs:
Postinstall scriptlets of ['busybox', 'util-linux-umount', 'util-linux-dmesg',
'coreutils', 'util-linux-mount', 'cpio', 'util-linux-kill', 'util-linux-losetup'] have failed.

---
 .../packagegroups/packagegroup-meta-initramfs.bb | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)
meta-initramfs/recipes-core/packagegroups/packagegroup-meta-initramfs.bb +1 -11
index bfede5a74..dc4928b5a 100644
@@ -15,22 +15,10 @@ RDEPENDS_packagegroup-meta-initramfs = "\
 "
 
 RDEPENDS_packagegroup-meta-initramfs-devtools = "\
-    libklibc  dracut \
-    klibc-utils-cat klibc-utils-losetup klibc-utils-readlink klibc-utils-chroot \
-    klibc-utils-ls klibc-utils-reboot klibc-utils-cpio klibc-utils-minips \
-    klibc-utils-resume klibc-utils-dd klibc-utils-mkdir klibc-utils-run-init \
-    klibc-utils-dmesg klibc-utils-mkfifo klibc-utils-sh.shared klibc-utils-false \
-    klibc-utils-mknod klibc-utils-sleep klibc-utils-fstype klibc-utils-mount \
-    klibc-utils-sync klibc-utils-halt klibc-utils-mv klibc-utils-true klibc-utils-ipconfig \
-    klibc-utils-nfsmount klibc-utils-umount klibc-utils-kill klibc-utils-nuke klibc-utils-uname \
-    mtdinfo-klibc ubiattach-klibc ubiblock-klibc ubicrc32-klibc ubidetach-klibc \
-    ubiformat-klibc ubimkvol-klibc ubinfo-klibc ubinize-klibc ubirename-klibc \
-    ubirmvol-klibc ubirsvol-klibc ubiupdatevol-klibc \
+    dracut \
     ${@bb.utils.contains_any("TRANSLATED_TARGET_ARCH", "i586 x86-64", "grubby", "", d)} \
     "
 
Quoted 9 lines

meta-initramfs/recipes-core/packagegroups/packagegroup-meta-initramfs.bb RDEPENDS_packagegroup-meta-initramfs = "\ · line 23

Quoted 3 lines
meta-initramfs/recipes-core/packagegroups/packagegroup-meta-initramfs.bb +1 -1
 RDEPENDS_packagegroup-meta-initramfs-kernel = "\
-    kexec-klibc vmcore-dmesg-klibc \
+    kexec vmcore-dmesg \

this creates a dependency on kexec-tools from oe-core, this however is not buildable on some arches e.g. riscv
so this change does not work as such, I think you can only add it as dependency where its supported.

Well, the problem was already there, kexec-tools klibc and oe-core both have

Quoted 9 lines

COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|freebsd.*)'

I really have no idea about the image purposes, I see there is dracut which seems to be buildable for most archs and does not have runtime deps on kexec-tools.
Maybe we can just remove kexec and vmcore-dmesg

these were mainly for testing builds of the given layer. So I think removing kexec and vmcore-dmesg is ok

Quoted 12 lines

Cheers
Andrea

Quoted 7 lines
Quoted 7 lines
meta-initramfs/recipes-core/packagegroups/packagegroup-meta-initramfs.bb +0 -3
     "
-
-EXCLUDE_FROM_WORLD = "1"
--

2.17.1