When building an image with PACKAGE_CLASSES = "package_ipk", the useradd command can output a warning because "/bin/false" does not exist. This happens when the init is systemd ``` NOTE: dbus: Performing useradd with [--root /home/louis/projets/blota/builds/build-memfault/tmp/work/beaglebone_yocto-poky-lin ux-gnueabi/memfault-image/1.0-r0/rootfs --system --home /var/lib/dbus --no-create-home --shell /b in/false --user-group messagebus] [...] useradd: Warning: missing or non-executable shell '/bin/false' ``` It seems that for ipks, this useradd command is executed before update-alternatives which creates the symlink '/bin/false' For rpms, update-alternatives is called before. Is it possible to force the update-alternatives to be executed first ?
Thanks Louis. Are you willing and able to submit a patch? https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded
Hello, unfortunately, I couldn't find how to maanage the order of those tasks or how to make one depends on the other.
I'm unconvinced that this is a Medium+ as this is just useradd pointing out that the shell for the new user doesn't exist _yet_. I'm curious how this doesn't happen with rpm, potentially rpm/dnf is hiding the warning, because the useradd is a preinst and the update-alternatives are postinsts, so it's entirely correct for the useradd fragment (dbus's preinst) to execute before update-alternatives (buybox postinst).
Maybe I misunderstood something In the log.do_rootfs in case of packages rpm, it's installing busybox and running update-alternative commands (as postinstall) around line 880. I think this is were /bin/false should be created. useradd commands are done far later at line 4575. In the case of ipks, I see some log about busybox installation first, then the failing useradd occurs, and then the update-alternatives are done. Note that some useradd are done after. I am not sure, but it looks like busybox postinstall is done right after its installation in rpms while it's delayed in ipks. I hope that helps, Louis
Sure, but they're both behaving "correctly": there's no explicit dependency on busybox from dbus. rpm and opkg are just installing and configuring in a different order. Is this causing any actual problems, or is it just a warning that you noticed in the log?
It's just something I noticed. I thought it revealed a missing dependency but it's probably fine as it is
Ross and Louis seem to agree that this isn't a bug. Re-open if that's not accurate.