| Summary: | build fails after user add/delete commands | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Humberto Ibarra <humberto.ibarra.lopez> | ||||||||||||||||||||
| Component: | core | Assignee: | Patrick Ohly <patrick.ohly> | ||||||||||||||||||||
| Status: | VERIFIED FIXED | QA Contact: | oscar lopez arandas <oscarx.lopez.arandas> | ||||||||||||||||||||
| Severity: | normal | ||||||||||||||||||||||
| Priority: | Medium+ | CC: | jose.perez.carranza, meta.mr.watcher, meta.watcher, patrick.ohly, ross.burton | ||||||||||||||||||||
| Version: | 2.3 | ||||||||||||||||||||||
| Target Milestone: | 2.3 M3 | ||||||||||||||||||||||
| Hardware: | x86 | ||||||||||||||||||||||
| OS: | Multiple | ||||||||||||||||||||||
| Whiteboard: | |||||||||||||||||||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||||||||||||||||||
| Verified: | Documentation change: | Yes (doc changes required) | |||||||||||||||||||||
| Attachments: |
|
||||||||||||||||||||||
|
Description
Humberto Ibarra
2017-02-01 18:18:42 UTC
Moving to Maxin who understands the useradd stuff far more than I do! Setting this in the "local.conf" file helps here. SORT_PASSWD_POSTPROCESS_COMMAND="" This error seems to be introduced by this commit (adding Patrick in cc): commit 753471db4534f121fe03b5d495fc3ec44f7207e7 Author: Patrick Ohly <patrick.ohly@intel.com> Date: Mon Jan 9 11:09:42 2017 +0100 rootfs-postcommands.bbclass: sort passwd entries Also setting Documentation change required as "yes" since we don't have documentation for "SORT_PASSWD_POSTPROCESS_COMMAND" variable. What is the content of the /etc passwd, group, shadow and related backup files at the time of the failure? Created attachment 3615 [details]
passwd
Created attachment 3616 [details]
passwd-
Created attachment 3617 [details]
group
Created attachment 3618 [details]
group-
Created attachment 3619 [details]
shadow
Created attachment 3620 [details]
shadow-
Created attachment 3621 [details]
gshadow
Created attachment 3622 [details]
gshadow-
There is an inconsistency in these files: "shadow-" contains a "games" entry, "passwd-" does not. Is that normal? My expectation was that the backup files represent the state before the last operation, so I'd expect "games" to be in "passwd-" and "shadow-" directly after removing the "games" user. Regardless whether the expectation is right or wrong, I suggest to simply delete the backup files instead of sorting them, as they can't be sorted when they are inconsistent and, more importantly, do not really belong into the target rootfs. Fixed by removing the backup files instead of sorting, as discussed with Maxin. See "rootfspostcommands: remove shadow backup files instead of trying to sort". Merged in oe-core e5628c80a52f3caeea9d9dc7f67d1b8a61222aef. build with success after user add/delete commands Build Configuration: BB_VERSION = "1.33.3" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "universal" TARGET_SYS = "i686-poky-linux" MACHINE = "genericx86" DISTRO = "poky" DISTRO_VERSION = "2.2+snapshot-20170420" TUNE_FEATURES = "m32 core2" COMMIT: = "HEAD:eff56e4f0d59b1d965a68e4f009b7f07717b7edd" STEPS: 1. Download the poky source and set the environment 2. Add the following lines in conf/local.conf INHERIT += "extrausers" EXTRA_USERS_PARAMS = "\ useradd -p '' tester1; \ useradd -p 'vz4kBbiMF9z6E' tester2; \ groupadd developers; \ userdel games; \ groupdel video; \ groupmod -g 1020 developers; \ usermod -s /bin/sh tester1; \ usermod -g users -G developers,sys tester2; \ " 3. Build the image EXPECTED OUTCOME: The build should end successfully ACTUAL OUTCOME: The build end successfully NOTES: ----snip---- poky-linux/core-image-minimal/1.0-r0/rootfs -g users -G developers,sys tester2] usermod: no changes DEBUG: Shell function set_user_group finished NOTE: Executing ssh_disable_dns_lookup ... DEBUG: Executing shell function ssh_disable_dns_lookup DEBUG: Shell function ssh_disable_dns_lookup finished NOTE: Executing sort_passwd ... DEBUG: Executing python function sort_passwd DEBUG: Python function sort_passwd finished NOTE: Executing write_image_manifest ... DEBUG: Executing python function write_image_manifest DEBUG: Python function write_image_manifest finished NOTE: Added oe-repo repo from file:///home/oscar/11007/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/oe-rootfs-repo 6 files removed NOTE: Executing: ldconfig -r/home/oscar/11007/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs-c new -v DEBUG: Python function do_rootfs finished ----snip---- |