<?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>14129</bug_id>
          
          <creation_ts>2020-11-18 11:26:38 +0000</creation_ts>
          <short_desc>wic: wrong rootfs file owner when using --exclude-path</short_desc>
          <delta_ts>2021-01-21 16:06:44 +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>3.2</version>
          <rep_platform>All</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>High</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>3.3 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Bartłomiej Burdukiewicz">bartlomiej.burdukiewicz</reporter>
          <assigned_to name="Paul Barker">paul</assigned_to>
          <cc>anuj.mittal</cc>
    
    <cc>erik.boto</cc>
    
    <cc>paul</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</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>88617</commentid>
    <comment_count>0</comment_count>
      <attachid>4749</attachid>
    <who name="Bartłomiej Burdukiewicz">bartlomiej.burdukiewicz</who>
    <bug_when>2020-11-18 11:26:38 +0000</bug_when>
    <thetext>Created attachment 4749
example wks file with --exclude-path parameter

After using additional switch &quot;--exclude-path&quot; in wks file, a whole rootfs becomes owned by local user (1000:1000).

Affected version poky@5232b03e22a49c368fbf4d79e05519ad5e48db4a
Working as expected: poky@6bf90676038a7a6111bbfeaef2f73614c7206b9e</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88738</commentid>
    <comment_count>1</comment_count>
    <who name="Erik Botö">erik.boto</who>
    <bug_when>2020-12-09 14:24:32 +0000</bug_when>
    <thetext>Seems like there&apos;s a few cases where in scripts/lib/wic/plugins/source/rootfs.py where a copy of the rootfs is created so that modifications can be done before creating the partitions, this happens if --exclude-path, --include_path or --change-directory is used. 

This temporary directory is created under ${WORKDIR}/build-wic, and since and since meta/classes/image_types_wic.bbclass has the line:

PSEUDO_IGNORE_PATHS .= &quot;,${WORKDIR}/build-wic&quot;

it will not use pseudo and the resulting file permissions will not be correct.

If I remove ${WORKDIR}/build-wic from PSEUDO_IGNORE_PATHS, the permissions seems ok even when using --exclude-path, but I&apos;m not sure if there&apos;s any unwanted side-effects of doing this. If so, maybe it&apos;s better to create the the temporary rootfs in some other directory, not in PSEUDO_IGNORE_PATHS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88742</commentid>
    <comment_count>2</comment_count>
    <who name="Erik Botö">erik.boto</who>
    <bug_when>2020-12-10 10:29:23 +0000</bug_when>
    <thetext>Seems like I ran into problems later, with pseudo aborting with a link to &quot;https://wiki.yoctoproject.org/wiki/Pseudo_Abort&quot;.

Looking at pseudo.log it seems like the partition files created in build-wic/ caused the problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88891</commentid>
    <comment_count>3</comment_count>
    <who name="Anuj Mittal">anuj.mittal</who>
    <bug_when>2021-01-08 01:12:40 +0000</bug_when>
    <thetext>This would need fixing in gatesgarth as well ...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88984</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2021-01-21 16:06:44 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=7a2545013cfed710011ab470ed30422e79622dca</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>4749</attachid>
            <date>2020-11-18 11:26:38 +0000</date>
            <delta_ts>2020-11-18 11:26:38 +0000</delta_ts>
            <desc>example wks file with --exclude-path parameter</desc>
            <filename>example.wks</filename>
            <type>application/vnd.lotus-1-2-3</type>
            <size>105</size>
            <attacher name="Bartłomiej Burdukiewicz">bartlomiej.burdukiewicz</attacher>
            
              <data encoding="base64">cGFydCAvIC0tc291cmNlIHJvb3RmcyAtLW9uZGlzayBtbWNibGswIC0tZnN0eXBlPWV4dDQgLS1s
YWJlbCByb290ZnMuMCAtLWFsaWduIDQwOTYgLS1leGNsdWRlLXBhdGg9aG9tZS8K
</data>

          </attachment>
      

    </bug>

</bugzilla>