<?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>6257</bug_id>
          
          <creation_ts>2014-04-30 20:30:27 +0000</creation_ts>
          <short_desc>read-only-rootfs and run-postinsts conflict</short_desc>
          <delta_ts>2014-07-02 03:09:42 +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>Other YP Layers</product>
          <component>layers</component>
          <version>1.5.1</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>1.7 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Volker">lists.volker</reporter>
          <assigned_to name="Chen Qi">Qi.Chen</assigned_to>
          <cc>jessica.zhang</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>43076</commentid>
    <comment_count>0</comment_count>
    <who name="Volker">lists.volker</who>
    <bug_when>2014-04-30 20:30:27 +0000</bug_when>
    <thetext>The image feature read-only-rootfs conflicts with the run-postinsts from meta/recipes-devtools/run-postinst

The run-postinsts script is installed to init.d and does basically do two things:
1. executes scripts that are stored in /etc/&lt;packagekind&gt;-postinsts/
2. removes itself from the runlevels to prevent these scripts to be executed all over again.

The 2nd step does not work when using the read-only-rootfs.

There might not be a good solution for it. ro-rootfs is per definition not persistent. So closing this ticket as &quot;WONTFIX&quot; or &quot;WORKSFORME&quot; which should be fine.


An alternative solution would be to modify run-postinsts script to do something like (pseudocode)
---
if [ allow_rootfs_run_postinsts in /etc/default/ro-rootfs ]; then
   mount -o rw,remount /
   &lt;run scripts&gt;
   mount -o ro,remount /
fi
---
While allow_rootfs_run_postinsts has to be set by an extra IMAGE_FEATURE or as additional, by default disabled, option to the existing read-only-rootfs feature.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>43082</commentid>
    <comment_count>1</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2014-05-01 14:47:48 +0000</bug_when>
    <thetext>Can you please let us know which version of oe-core/bitbake/Poky you are using?  There have been various patches for this, if you are 1.5.x based there might be fixes in 1.6, if your in 1.6 then we need to fix it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>43090</commentid>
    <comment_count>2</comment_count>
    <who name="Volker">lists.volker</who>
    <bug_when>2014-05-02 22:45:53 +0000</bug_when>
    <thetext>I run into in the poky git repository, HEAD of the dora branch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>43827</commentid>
    <comment_count>3</comment_count>
    <who name="Volker">lists.volker</who>
    <bug_when>2014-06-09 18:20:17 +0000</bug_when>
    <thetext>I still have the same problem in the tar.gz from 1.6.

On boot the following accures (please excuse typos):
----
update-rc.d: /etc/init.d/run-postinst exists during rc.d purge (continuing)
 Removing any system startup links for run-postinsts ...
   /etc/rcS.d/S99run-postinsts
rm: can&apos;t remove &apos;/etc/rcS.d/S99run-postinsts&apos;: Read-only file system
----</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>43848</commentid>
    <comment_count>4</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2014-06-11 09:26:28 +0000</bug_when>
    <thetext>The same problem occurred on master.

I think it&apos;s necessary to make patches for dora, daisy and master separately.

//Chen Qi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>43994</commentid>
    <comment_count>5</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2014-06-17 06:14:44 +0000</bug_when>
    <thetext>I&apos;ve sent out patches for daisy and master.
I&apos;ve also tested it on dora branch. There&apos;s no such problem as the codes in run-postinsts are different.

//Chen Qi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44280</commentid>
    <comment_count>6</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2014-07-02 03:09:42 +0000</bug_when>
    <thetext>Fixed for daisy and master.

http://git.openembedded.org/?p=openembedded-core.git&amp;a=commit;h=d51b1ced88958d31a1596e37db871257fe013446

http://git.openembedded.org/?p=openembedded-core.git&amp;a=commit;h=6c2f7ecee754ff3f29fdde17c0363f5d138057ff

//Chen Qi</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>