Hello Daiane, On 18/10/2021 15:44:55-0300, Daiane Angolini wrote: > Since [1] the option -P is not available, so remove it from parsing lib. > > This is a partial fix for [YOCTO #14605]. > > During the do_rootfs, the error message when using -P is: > > useradd: unrecognized option '--clear-password' > > Signed-off-by: Daiane Angolini <[email protected]> > --- > meta/lib/oe/useradd.py | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/meta/lib/oe/useradd.py b/meta/lib/oe/useradd.py > index 8fc77568ff..63768311ee 100644 > --- a/meta/lib/oe/useradd.py > +++ b/meta/lib/oe/useradd.py > @@ -45,7 +45,6 @@ def build_useradd_parser(): > parser.add_argument("-N", "--no-user-group", dest="user_group", help="do > not create a group with the same name as the user", action="store_const", > const=False) > parser.add_argument("-o", "--non-unique", help="allow to create users > with duplicate (non-unique UID)", action="store_true") > parser.add_argument("-p", "--password", metavar="PASSWORD", > help="encrypted password of the new account") > - parser.add_argument("-P", "--clear-password", metavar="CLEAR_PASSWORD", > help="use this clear password for the new account")
This causes an issue in useradd-staticids.bbclass https://autobuilder.yoctoproject.org/typhoon/#/builders/115/builds/847/steps/12/logs/stdio File: '<code>', lineno: 20, function: <module> 0016:__anon_177__home_pokybuild_yocto_worker_reproducible_centos_build_meta_classes_siteinfo_bbclass(d) 0017:__anon_63__home_pokybuild_yocto_worker_reproducible_centos_build_meta_classes_update_rc_d_bbclass(d) 0018:__anon_23__home_pokybuild_yocto_worker_reproducible_centos_build_meta_classes_systemd_bbclass(d) 0019:__anon_195__home_pokybuild_yocto_worker_reproducible_centos_build_meta_classes_useradd_bbclass(d) *** 0020:__anon_311__home_pokybuild_yocto_worker_reproducible_centos_build_meta_classes_useradd_staticids_bbclass(d) 0021:__anon_114__home_pokybuild_yocto_worker_reproducible_centos_build_meta_classes_update_alternatives_bbclass(d) File: '/home/pokybuild/yocto-worker/reproducible-centos/build/meta/classes/useradd-staticids.bbclass', lineno: 307, function: __anon_311__home_pokybuild_yocto_worker_reproducible_centos_build_meta_classes_useradd_staticids_bbclass 0303:python __anonymous() { 0304: if not bb.data.inherits_class('nativesdk', d) \ 0305: and not bb.data.inherits_class('native', d): 0306: try: *** 0307: update_useradd_static_config(d) 0308: except NotImplementedError as f: 0309: bb.debug(1, "Skipping recipe %s: %s" % (d.getVar('PN'), f)) 0310: raise bb.parse.SkipRecipe(f) 0311:} File: '/home/pokybuild/yocto-worker/reproducible-centos/build/meta/classes/useradd-staticids.bbclass', lineno: 271, function: update_useradd_static_config 0267: # is a bit of a waste -- only process useradd/groupadd 0268: useradd_param = d.getVar('USERADD_PARAM:%s' % pkg) 0269: if useradd_param: 0270: #bb.warn("Before: 'USERADD_PARAM:%s' - '%s'" % (pkg, useradd_param)) *** 0271: d.setVar('USERADD_PARAM:%s' % pkg, rewrite_useradd(useradd_param, True)) 0272: #bb.warn("After: 'USERADD_PARAM:%s' - '%s'" % (pkg, d.getVar('USERADD_PARAM:%s' % pkg))) 0273: 0274: groupadd_param = d.getVar('GROUPADD_PARAM:%s' % pkg) 0275: if groupadd_param: File: '/home/pokybuild/yocto-worker/reproducible-centos/build/meta/classes/useradd-staticids.bbclass', lineno: 177, function: rewrite_useradd 0173: newparam += ['', ' --no-user-group'][uaargs.user_group is False] 0174: newparam += ['', ' --non-unique'][uaargs.non_unique] 0175: if uaargs.password != None: 0176: newparam += ['', ' --password %s' % uaargs.password][uaargs.password != None] *** 0177: elif uaargs.clear_password: 0178: newparam += ['', ' --clear-password %s' % uaargs.clear_password][uaargs.clear_password != None] 0179: newparam += ['', ' --root %s' % uaargs.root][uaargs.root != None] 0180: newparam += ['', ' --system'][uaargs.system] 0181: newparam += ['', ' --shell %s' % uaargs.shell][uaargs.shell != None] Exception: AttributeError: 'Namespace' object has no attribute 'clear_password' > parser.add_argument("-R", "--root", metavar="CHROOT_DIR", > help="directory to chroot into") > parser.add_argument("-r", "--system", help="create a system account", > action="store_true") > parser.add_argument("-s", "--shell", metavar="SHELL", help="login shell > of the new account") > -- > 2.30.2 > > > > -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#157200): https://lists.openembedded.org/g/openembedded-core/message/157200 Mute This Topic: https://lists.openembedded.org/mt/86422106/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
