<?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>12412</bug_id>
          
          <creation_ts>2017-12-10 15:14:45 +0000</creation_ts>
          <short_desc>WIC: rootfs wrong file ownership on rocko branch</short_desc>
          <delta_ts>2021-06-17 15:16:28 +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>Scripts and Tools</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>OBSOLETE</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>4.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andrej Rode">mail</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>akuster</cc>
    
    <cc>mail</cc>
    
    <cc>open.source</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>ross.burton</cc>
    
    <cc>stephano</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>78644</commentid>
    <comment_count>0</comment_count>
      <attachid>4154</attachid>
    <who name="Andrej Rode">mail</who>
    <bug_when>2017-12-10 15:14:45 +0000</bug_when>
    <thetext>Created attachment 4154
Patch reverting commit

Using the `wic` tool to create a rootfs results in all files owned by the unprivileged build user. 

Reverting commit 92e1c7d47e695eb4ce1a863cd0f6c49dca1c2339 fixes this behaviour. 

I think this might be due to `pseudo` not matching on permissions it has to apply to the files? Unfortunately I have no real in-depth experience, but reverting this commit at least fixes image creation on my side.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78689</commentid>
    <comment_count>1</comment_count>
    <who name="Stephano Cetola">stephano</who>
    <bug_when>2017-12-13 16:24:39 +0000</bug_when>
    <thetext>https://patchwork.openembedded.org/patch/146571/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78694</commentid>
    <comment_count>2</comment_count>
    <who name="Stephano Cetola">stephano</who>
    <bug_when>2017-12-13 22:38:32 +0000</bug_when>
    <thetext>Could you provide the exact wic command that you are running. I&apos;d like to be sure that I&apos;m reproducing the same problem that you are seeing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78930</commentid>
    <comment_count>3</comment_count>
    <who name="Andrej Rode">mail</who>
    <bug_when>2018-01-05 18:40:54 +0000</bug_when>
    <thetext>Will test the patch when I&apos;m back at my system next week. Will close the bug if it is fixed. 

The command I&apos;m running: `wic create ../meta-foo/contrib/wks/sdimage-16G.wks  -e foo-image -o images/$MACHINE`.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78963</commentid>
    <comment_count>4</comment_count>
    <who name="Stephano Cetola">stephano</who>
    <bug_when>2018-01-08 18:11:15 +0000</bug_when>
    <thetext>Thank you for testing Andrej. I do not believe the patch fixes this issue, but let me know your results. If it doesn&apos;t fix your issue I will reassign this to someone for a fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79076</commentid>
    <comment_count>5</comment_count>
    <who name="Andrej Rode">mail</who>
    <bug_when>2018-01-15 22:45:12 +0000</bug_when>
    <thetext>Testing with commit 78f29a052477dd81f0819287e3db405932bb7fae results in getting a non-root owned FS again.
What&apos;s strange: all Folders are owned by the non-privileged user. Files are owned by root.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79079</commentid>
    <comment_count>6</comment_count>
    <who name="Andrej Rode">mail</who>
    <bug_when>2018-01-16 00:11:12 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; Testing with commit 78f29a052477dd81f0819287e3db405932bb7fae results in
&gt; getting a non-root owned FS again.
&gt; What&apos;s strange: all Folders are owned by the non-privileged user. Files are
&gt; owned by root.

The patch i posted still applies and works around the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79261</commentid>
    <comment_count>7</comment_count>
    <who name="Stephano Cetola">stephano</who>
    <bug_when>2018-01-29 20:06:11 +0000</bug_when>
    <thetext>I see that reverting 92e1c7d47e695eb4ce1a863cd0f6c49dca1c2339 does fix the issue, but it also breaks parallel do_image_wic calls. I&apos;d like to find a solution to both issues so I am putting this back into design and pushing off till M3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84160</commentid>
    <comment_count>8</comment_count>
    <who name="Oleksandr Kravchuk">open.source</who>
    <bug_when>2019-06-12 23:20:12 +0000</bug_when>
    <thetext>rocko is not supported anymore. Should this issue be closed?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90687</commentid>
    <comment_count>9</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-06-17 15:16:28 +0000</bug_when>
    <thetext>Much has change so re-open if you can reproduce with oe-core/master.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>4154</attachid>
            <date>2017-12-10 15:14:45 +0000</date>
            <delta_ts>2017-12-10 15:14:45 +0000</delta_ts>
            <desc>Patch reverting commit</desc>
            <filename>0001-Revert-wic-copy-rootfs-directory-before-changing-fst.patch</filename>
            <type>text/plain</type>
            <size>2811</size>
            <attacher name="Andrej Rode">mail</attacher>
            
              <data encoding="base64">RnJvbSA4MTdlYTA4ODdlZjdkZmE1YWViOGE1MGFjZGQwYjUxZDg5YWNiMjlkIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBBbmRyZWogUm9kZSA8bW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KQogCi0gICAgICAgIHNlbGYuX2ltYWdlLnByZXBhcmUoc2VsZikKKyAg
ICAgICAgdHJ5OgorICAgICAgICAgICAgc2VsZi5faW1hZ2UucHJlcGFyZShzZWxmKQorICAgICAg
ICBmaW5hbGx5OgorICAgICAgICAgICAgaWYgZnN0YWJfcGF0aDoKKyAgICAgICAgICAgICAgICBz
aHV0aWwubW92ZShmc3RhYl9wYXRoICsgIi5vcmlnIiwgZnN0YWJfcGF0aCkKKwogICAgICAgICBz
ZWxmLl9pbWFnZS5sYXlvdXRfcGFydGl0aW9ucygpCiAgICAgICAgIHNlbGYuX2ltYWdlLmNyZWF0
ZSgpCiAKLS0gCjIuMTUuMQoK
</data>

          </attachment>
      

    </bug>

</bugzilla>