Bug 10329 - systemd: "Create missing sysusers offline" commit causes a bitbake build failure at do_install stage
Summary: systemd: "Create missing sysusers offline" commit causes a bitbake build fail...
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.1.2
Hardware: All x86_64
: High major
Target Milestone: 2.1.2
Assignee: Armin Kuster
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-09-23 23:58 UTC by Joe Konno
Modified: 2016-09-27 20:29 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments
'bitbake -DDD -v systemd' failure (189.13 KB, application/x-bzip)
2016-09-24 00:02 UTC, Joe Konno
no flags Details
'bitbake -v systemd' (26.38 KB, text/x-log)
2016-09-24 00:09 UTC, Joe Konno
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Konno 2016-09-23 23:58:01 UTC
All layers, including poky, have the 'krogoth' branch checked out. When I attempted to build an image this morning, I hit a snag building systemd. Here is the do_install step output:

"""
DEBUG: SITE files ['endian-little', 'common-linux', 'common-glibc', 'bit-64', 'x86_64-linux', 'common']
DEBUG: Executing shell function useradd_sysroot
Running groupadd commands...
NOTE: systemd: Performing groupadd with [--root /home/jbkonno/eywa/poky/build/tmp/sysroots/intel-internal-corei7-64 -r lock]
NOTE: systemd: Performing groupadd with [--root /home/jbkonno/eywa/poky/build/tmp/sysroots/intel-internal-corei7-64  -r systemd-journal]
Running useradd commands...
NOTE: systemd: Performing useradd with [--root /home/jbkonno/eywa/poky/build/tmp/sysroots/intel-internal-corei7-64     --system -d / -M --shell /bin/nologin systemd-timesync]
NOTE: systemd: Performing useradd with [--root /home/jbkonno/eywa/poky/build/tmp/sysroots/intel-internal-corei7-64    ]
Usage: useradd [options] LOGIN
       useradd -D
       useradd -D [options]

Options:
  -b, --base-dir BASE_DIR       base directory for the home directory of the
                                new account
  -c, --comment COMMENT         GECOS field of the new account
  -d, --home-dir HOME_DIR       home directory of the new account
  -D, --defaults                print or change default useradd configuration
  -e, --expiredate EXPIRE_DATE  expiration date of the new account
  -f, --inactive INACTIVE       password inactivity period of the new account
  -g, --gid GROUP               name or ID of the primary group of the new
                                account
  -G, --groups GROUPS           list of supplementary groups of the new
                                account
  -h, --help                    display this help message and exit
  -k, --skel SKEL_DIR           use this alternative skeleton directory
  -K, --key KEY=VALUE           override /etc/login.defs defaults
  -l, --no-log-init             do not add the user to the lastlog and
                                faillog databases
  -m, --create-home             create the user's home directory
  -M, --no-create-home          do not create the user's home directory
  -N, --no-user-group           do not create a group with the same name as
                                the user
  -o, --non-unique              allow to create users with duplicate
                                (non-unique) UID
  -p, --password PASSWORD       encrypted password of the new account
  -P, --clear-password PASSWORD clear password of the new account
  -r, --system                  create a system account
  -R, --root CHROOT_DIR         directory to chroot into
  -s, --shell SHELL             login shell of the new account
  -u, --uid UID                 user ID of the new account
  -U, --user-group              create a group with the same name as the user

ERROR: systemd: useradd command did not succeed.
"""

Note: the last useradd command lacks a LOGIN argument, causing the command to fail.

I reverted the following commit, and the package built without issue:

commit 66a4366e8fb4077a375e71c2169f3307254a36aa
Author:     Khem Raj <raj.khem@gmail.com>
AuthorDate: Tue Aug 9 13:48:35 2016 +0200
Commit:     Richard Purdie <richard.purdie@linuxfoundation.org>
CommitDate: Fri Sep 23 15:27:03 2016 +0100

    systemd: Create missing sysusers offline
    
    Some system users which are needed by systemd components were missing
    create these users knobbed with relevant packageconfig
    
    (From OE-Core rev: d18957925c6c073b7194e3a233efea24e436f74e)
    
    (From OE-Core rev: 901a6dbe420eb3f76503871ca3ccfe544b9b3b57)
    
    Signed-off-by: Khem Raj <raj.khem@gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
    (cherry picked from commit fd36a447d0da53e713d992b17ce86dd31ea63c67)
    Signed-off-by: Kristian Amlie <kristian.amlie@mender.io>
    Signed-off-by: Armin Kuster <akuster808@gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

I've been scratching my head all afternoon trying to find the bug in the recipe, but to no avail, so I'm filing this bug.
Comment 1 Joe Konno 2016-09-24 00:02:59 UTC
Created attachment 3440 [details]
'bitbake -DDD -v systemd' failure

Attached build log.
Comment 2 Joe Konno 2016-09-24 00:09:32 UTC
Created attachment 3441 [details]
'bitbake -v systemd'
Comment 5 Ross Burton 2016-09-27 13:00:16 UTC
Oh, krogoth, whoopss.  Reassigning to Armin.