<?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>16109</bug_id>
          
          <creation_ts>2025-12-19 20:01:09 +0000</creation_ts>
          <short_desc>do_rootfs step fails with read-only rootfs and systemd-compat-units package</short_desc>
          <delta_ts>2026-05-21 15:03:10 +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>core</component>
          <version>5.99</version>
          <rep_platform>x86</rep_platform>
          <op_sys>x86_64</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.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Zach Kozar">Zachary.Kozar</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>ccasciato</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</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>103626</commentid>
    <comment_count>0</comment_count>
    <who name="Zach Kozar">Zachary.Kozar</who>
    <bug_when>2025-12-19 20:01:09 +0000</bug_when>
    <thetext>After upgrading one of my projects from scarthgap to walnascar, I am getting this error when bitbaking my image that uses the read-only-rootfs option:

core-image-vins-1.0-r0 do_rootfs: The following packages could not be configured offline and rootfs is read-only: [&apos;100-systemd-compat-units&apos;]


It appears to be caused by this commit: https://github.com/openembedded/openembedded-core/commit/e88f22da19a7f3f9bf23f2a607ffde6b5b1a3265. The post-install script cannot be run because it was changed to run on the target, but this makes the systemd-compat-units recipe incompatible with the read-only rootfs option. I was able to fix this on my build by reverting the change in that commit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103758</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2026-01-08 15:37:42 +0000</bug_when>
    <thetext>Ross to reply. Reverting just leaves the race condition so that&apos;s not sufficient.

Next to fix in master and scarthgap, etc.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103858</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2026-01-13 16:42:27 +0000</bug_when>
    <thetext>Reverting that commit will just reintroduce a race condition, so that isn&apos;t really a solution because you&apos;re swapping a problem for another problem.

Looking at the recipe, none of that logic needs to happen on target. I shall send a patch to rewrite chunks of the recipe.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103864</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2026-01-13 18:48:05 +0000</bug_when>
    <thetext>I have a patch to change how that recipe works, can you test it please?

https://lore.kernel.org/openembedded-core/20260113184632.3953060-1-ross.burton@arm.com/T/#u

Also, are you aware that this package is only needed if you&apos;re building images with _both_ systemd and syvinit? That&apos;s not the best idea, and I recommend picking one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103893</commentid>
    <comment_count>4</comment_count>
    <who name="Zach Kozar">Zachary.Kozar</who>
    <bug_when>2026-01-14 21:39:05 +0000</bug_when>
    <thetext>Thanks. I applied your patch and am able to build with both systemd-compat-units and read-only-rootfs. 

And no, I did not know that. I am not using sysvinit, and it is not in my distro features. It looks like my BSP is adding sysvinit into systemd&apos;s packageconfig: https://github.com/nxp-imx/meta-imx/blob/walnascar-6.12.34-2.1.0/meta-imx-bsp/recipes-core/systemd/systemd_%25.bbappend. However they are not adding it to the distro features. I added my own systemd bbappend to remove it from the config, and can confirm it no longer pulls in systemd-compat-units. Sorry if this is off topic.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105528</commentid>
    <comment_count>5</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2026-05-21 15:03:10 +0000</bug_when>
    <thetext>Merged in 4dc01e016210acd15f153b25e609dce5eee9e0bb.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>