Bug 10334 - useradd_sysroot fails due to the way USERADD_PARAM is set in systemd_229 recipe
Summary: useradd_sysroot fails due to the way USERADD_PARAM is set in systemd_229 recipe
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.1.2
Hardware: All Multiple
: Undecided major
Target Milestone: ---
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-09-27 13:49 UTC by Venka Gade
Modified: 2016-09-29 14:46 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Venka Gade 2016-09-27 13:49:15 UTC
A recent update to system recipe (systemd_229.bb) resulted in do_install to fail. The following are the changes:

USERADD_PACKAGES = "${PN} ${PN}-extra-utils"
USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-gateway;', '', d)}"
USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-remote;', '', d)}"
USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '--system -d / -M --shell /bin/nologin systemd-journal-upload;', '', d)}"
USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /bin/nologin systemd-timesync;', '', d)}"
USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /bin/nologin systemd-network;', '', d)}"
USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /bin/nologin systemd-coredump;', '', d)}"
USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /bin/nologin systemd-resolve;', '', d)}"
GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
USERADD_PARAM_${PN}-extra-utils += "--system -d / -M --shell /bin/nologin systemd-bus-proxy;"


To simplify things, lets shorten the above settings to:

USERADD_PACKAGES = "${PN}" "${PN}-a"
USERADD_PARAM_${PN} += x; 
USERADD_PARAM_${PN} += y;
USERADD_PARAM_${PN}-a = z;

As a result of parsing these settings by get_all_cmd_parse() in meta/classes/useradd.bbclass, this turns out to be:

x; y; ; z;

"; ".join(params) introduces an additional semicolon in the list. As a result, perform_useradd runs with empty argument listand causes do_install() to fail.
Comment 1 Richard Purdie 2016-09-29 14:43:08 UTC
Was this a bug with krogoth fixed by http://git.yoctoproject.org/cgit.cgi/poky/commit/?h=krogoth&id=2ea93e2b1db4a825543e37e68121d63a71c7d6b3 ?
Comment 2 Ross Burton 2016-09-29 14:46:01 UTC
Certainly looks like that was the fix, marking as resolved fixed.  Venka, if you can replicate with current oe-core/krogoth then please reopen.
Comment 3 Ross Burton 2016-09-29 14:46:23 UTC
(Actually closing this time)