First of all I know that this is not a place to discuss problems regarding issues to different meta-layers but I am recently working with meta-iotedge layer for kirkstone and I have noticed strange behavior, which may be touching core functionalities of oe-core. Maybe I'm wrong I dunno, but I would be pleased if somebody might help me solve this riddle :) Namely I wanted to make some code clean up of this meta layer because the dependencies and their order where done a little bit wrong. This is my testing repository https://github.com/Dvergatal/meta-iotedge/tree/welotec on which this strange behavior is observed. Generally the build order is supposed to be like that aziotd, iotedge, aziotctl and than aziot-edged. We do not consider aziot-keys as this is just a run dependency. Now first two aziotd and iotedge are building without any issued but than aziotctl and aziot-edged (this one does not build due to aziotctl error) fails. The weird behavior is noticed on aziotctl install process. The error is regarding install: invalid user ‘iotedge’, but aziotd and iotedge packages are installed to aziotctl sysroot. What I have noticed is that in file `build/tmp-glibc/work/core2-64-WelotecGmbH-linux/aziotctl/1.4.3.AUTOINC+cfa39b58ec-r0/recipe-sysroot/etc/passwd` this iotedge user is actually missing and this is odd because it should be there....
OK I have gladly been able to reproduce this issue without usage of this meta-iotedge meta layer and finally I know when it happens. BTW. Randy I'm sorry for adding you to CC list but I do not know if anybody has seen this bug, but I need some help so we could investigate it as it is related strictly to creation of sysroot on recipe build. Namely whenever we are appending a package name - which is adding new user and group which depends from another user(s) from different recipe(s) - to DEPENDS variable in our recipe, for some reason this user is not being created at all which is of course a bug probably in meta/classes/sstate.bbclass, but I haven't verified it yet. I have only seen that there was already a bug https://lore.kernel.org/all/fa38064e-eea8-8301-cb78-5e846b1341f2@emagii.com/T/ but it is already fixed.
Generally the chain looks like this: Recipe A DEPENDS on recipe B, which DEPENDS alike but on recipe C and creates user and group to which is being added user from recipe C
Known issue that may be related to: https://bugzilla.yoctoproject.org/show_bug.cgi?id=13419 https://bugzilla.yoctoproject.org/show_bug.cgi?id=13279 Pavel may take a look.
Randy I have already found where it is and what is the cause of it I have written it on https://bugzilla.yoctoproject.org/show_bug.cgi?id=13904
Additionally we will try in Welotec team to solve this, because this issue is on one side trivial and on the other difficult. The difficulty in it is how to pass the proper order of executin these scripts into this for loop in basepasswd_sysroot_postinst bash script...
Piotr, I'll leave to to you and Pavel to work out and set the ownership of the bug. Thanks for explaining what your plans are.
Yeah, sounds great:) Pavel if it's possible please contact me and we can discuss the issue.
Created attachment 4972 [details] Fix user add temporarily Correct order of posinsts execution passwd db Run user add scripts in three passes, first for adding groups, then users and at the end group memberships.
There were some changes in useradd recently. Need to check if the bug is still valid. Moving to M3
The issue is still valid as Richard has fixed only one part of it and it has been even discussed with him.
I think that after this patch https://git.openembedded.org/openembedded-core/commit/?id=322ef726132a47d977d2c6ee41de5358f1e85994 merged to master, the bug is fixed, but I still need to test it with master release, which I haven't done yet...
Bulk move of 5.1 bugs to 5.2. -- YP bug review (Randy)
Seems to be resolved by: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15084#c11