Bug 8522

Summary: dracut_git.bb does not pull in all dependencies
Product: [Build System, Metadata & Runtime] Other YP Layers Reporter: Gatis Paeglis <gatis.paeglis>
Component: layersAssignee: Joe Slater <joe.slater>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Undecided CC: meta.mr.watcher, meta.watcher, poky.bs.watcher, poky.watcher, ross.burton
Version: unspecified   
Target Milestone: ---   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Gatis Paeglis 2015-10-15 13:28:50 UTC
Layer/recipe: meta-initramfs/recipes-devtools/dracut/dracut_git.bb

Dracut git repository contains a file "dracut.spec" which lists:

Requires: util-linux >= 2.21

But dracut_git.bb only "cherry picks" some parts of the util-linux:

http://cgit.openembedded.org/meta-openembedded/tree/meta-initramfs/recipes-devtools/dracut/dracut_git.bb

where:

RDEPENDS_${PN} = "findutils cpio util-linux-blkid util-linux-getopt bash ldd"

So when trying to run the following drucut command on a device:

./dracut --host-only

it fails, because "findmnt" and "setsid" commands are missing from a device.

Changing RDEPENDS_${PN} to include "util-linux" fixes the issue.
Comment 1 Gatis Paeglis 2015-10-15 15:08:58 UTC
Of course pulling in the whole util-linux also does not seem optimal. Only I am unsure how to determine which binaries exactly are required by dracut.
Comment 2 Ross Burton 2015-10-16 08:57:04 UTC
Both setsid and findmnt are in the util-linux package, so that's exactly the right thing to do.

However, dracut isn't part of oe-core so it shouldn't be tracked here.  As you have a patch now, can you send it to the openembedded-devel mailing list?

(in our bug triage Randy expressed interest in this, so I'm moving it back to Layers and assigning to him)
Comment 3 Gatis Paeglis 2015-10-16 09:07:54 UTC
If Randy wants wants to take care of this issue, he can go ahead.
Comment 4 Gatis Paeglis 2015-10-16 12:08:47 UTC
Just a note:

I see that in earlier versions of dracut recipe it contained "util-linux" as a dependency:

# 'getopt' is in the util-linux main package
RDEPENDS_${PN} = "systemd findutils cpio util-linux-blkid util-linux bash ldd"

And then they tried to optimize things by including only some sub-set of util-linux-* and that is why findmnt and setsid suddenly disappeared in later builds.
Comment 5 Joe Slater 2015-10-22 20:16:49 UTC
Patch is in meta-initramfs on master-next.  Commit b5ecfed.

Bugs for meta-initramfs go to openembedded-devel.