Bug 5230

Summary: core-image-minimal now contains shadow
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Paul Eggleton <bluelightning>
Component: coreAssignee: Saul Wold <sgw>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: alexandrux.palalau, bluelightning, laurentiu.palcu, meta.mr.watcher, meta.watcher, Qi.Chen, richard.purdie
Version: 1.5   
Target Milestone: 1.5 M5   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: Regression (Used to work)
Verified: Documentation change: No (bug/feature does not impact docs)

Description Paul Eggleton 2013-09-18 15:02:02 UTC
core-image-minimal in master when built with sysvinit now contains shadow; in dylan that was not the case. This means /bin/login is now always provided by shadow, and thus the work that was done to provide that from busybox instead of tinylogin is not being utilised.

I have traced this to the addition of "inherit useradd" to sysvinit in the following commit:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=f638364eff3b7a2de7953d154fb2451c51729911

I'm not sure what the correct solution to this is but this is clearly not desirable; if nothing else, core-image-minimal is about 1.2M larger than it needs to be with shadow installed.
Comment 1 Saul Wold 2013-09-19 14:39:37 UTC
A recent change to sysvinit inherited useradd, which caused the core-image-minimal
image to gain about 1.2M with the shadow based tools.  Since we now have a split
busybox (with setuid), it has all the functionalify of shadow, so depend on that by
default, if shadow is included in an image then the update-alternatives will kick in
and override the busybox utilities.
Comment 2 Saul Wold 2013-09-24 21:05:20 UTC
Dug into this a little deeper today and it's getting interesting!  So simply 
changing the RDEPENDS to busybox causes other breakage, I think because the 
rootfs is missing some required file that the name groupadd needs to operate 
correctly, but I also realized that systemd provides halt and shutdown also.  
So began wonder if we should not have the shutdown group simply be part of the 
core base-files for oe-core that would remove the useradd from sysvinit, but we 
will still have useradd in systemd for log and systemd-journal groups.
Comment 4 Alexandru Palalau 2013-10-16 10:47:50 UTC
Verified on master branch.
Commit ID: 2b5bac02196b8bd30d223d508f5f7d4300889fd7