<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>15863</bug_id>
          
          <creation_ts>2025-05-14 09:50:01 +0000</creation_ts>
          <short_desc>useradd: using only USERADD_DEPENDS gives errors about not setting one of the useradd class variables</short_desc>
          <delta_ts>2026-08-20 13:03:57 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>oe-core other</component>
          <version>5.0.9</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>6.1 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ludovic Jozeau">ludovic.jozeau+yocto-bug</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>ccasciato</cc>
    
    <cc>mathieu.dubois-briand</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>yoann.congal</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>101957</commentid>
    <comment_count>0</comment_count>
    <who name="Ludovic Jozeau">ludovic.jozeau+yocto-bug</who>
    <bug_when>2025-05-14 09:50:01 +0000</bug_when>
    <thetext>I have a recipe that depends on the user/group created in another one (while not creating users nor groups itself), so I naturally tried to use the new USERADD_DEPENDS variable from the useradd class

unfortunately it gives the following errors:

&quot;inherits useradd but doesn&apos;t set USERADD_PACKAGES&quot;

then when I set USERADD_PACKAGES to &quot;${PN}&quot;

I now have this error:

&quot;... inherits useradd but doesn&apos;t set USERADD_PARAM, GROUPADD_PARAM or GROUPMEMS_PARAM for package ...&quot;

I think the USERADD_DEPENDS variable should also be checked if it is set

also extending the tests in selftest-users, something like:

# usegroup1.bb:

SUMMARY = &quot;usegroupb1&quot;
LIC_FILES_CHKSUM = &quot;file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302&quot;

LICENSE = &quot;MIT&quot;

USERADD_DEPENDS = &quot;dcreategroup&quot;

S = &quot;${WORKDIR}&quot;

EXCLUDE_FROM_WORLD=&quot;1&quot;

inherit useradd allarch

USERADD_PACKAGES = &quot;${PN}&quot;

TESTDIR = &quot;${D}${sysconfdir}/creategroup&quot;

do_install() {
	install -d   ${TESTDIR}
	install -d   ${TESTDIR}/dir
	touch        ${TESTDIR}/file
	ln -s ./file ${TESTDIR}/symlink
	install -d   ${TESTDIR}/fifotest
	mkfifo       ${TESTDIR}/fifotest/fifo

	chown    d_user:d_group ${TESTDIR}/file
	chown -R d_user:b_group ${TESTDIR}/dir
	chown -h d_user:d_group ${TESTDIR}/symlink
	chown -R d_user:b_group ${TESTDIR}/fifotest
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101961</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-05-15 14:43:30 +0000</bug_when>
    <thetext>Yoann or Ludovic to send a patch, hopefully.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103195</commentid>
    <comment_count>2</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2025-11-06 10:57:03 +0000</bug_when>
    <thetext>Bulk move to 6.0 M1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104954</commentid>
    <comment_count>3</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2026-04-03 09:25:41 +0000</bug_when>
    <thetext>(Unassigning myself since a do not realistically have the time to work on this)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104986</commentid>
    <comment_count>4</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2026-04-08 18:51:09 +0000</bug_when>
    <thetext>Patches sent: https://lore.kernel.org/openembedded-core/20260408150003.18063-1-zizuzacker@gmail.com/T/#t</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105207</commentid>
    <comment_count>5</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2026-04-23 11:25:33 +0000</bug_when>
    <thetext>v3: https://lore.kernel.org/openembedded-core/20260423100405.25255-1-zizuzacker@gmail.com/T/#u</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106584</commentid>
    <comment_count>6</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-08-20 13:03:57 +0000</bug_when>
    <thetext>Patches merged:
https://git.openembedded.org/openembedded-core/commit/?id=8ad8c52d7cad06b0f3f6e5099db43bb64845bab4
https://git.openembedded.org/openembedded-core/commit/?id=36eac58184a22ba972f8613bd9f564e0f6bd1680
https://git.openembedded.org/openembedded-core/commit/?id=09a901b9874f76e665fb4ba9e537703a792011e3</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>