<?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>10712</bug_id>
          
          <creation_ts>2016-11-23 14:18:07 +0000</creation_ts>
          <short_desc>Have wic split the rootfs filesystem and distribute specified subdirectories to different partitions</short_desc>
          <delta_ts>2017-02-16 12:11:30 +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>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>Future</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Kristian Amlie">kristian.amlie</reporter>
          <assigned_to name="Kristian Amlie">kristian.amlie</assigned_to>
          <cc>eduard.bartosh</cc>
    
    <cc>kristian.amlie</cc>
    
    <cc>maciek.borzecki</cc>
    
    <cc>mariano.lopez</cc>
    
    <cc>ross.burton</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>68536</commentid>
    <comment_count>0</comment_count>
    <who name="Kristian Amlie">kristian.amlie</who>
    <bug_when>2016-11-23 14:18:07 +0000</bug_when>
    <thetext>Originally discussed in mailing list thread: http://lists.openembedded.org/pipermail/openembedded-core/2016-November/129036.html

The motivation is to be able to generate multiple partitions using content from different parts of the rootfs filesystem.

Current proposal is:
This can be done by extending existing rootfs plugin. It should be able
to do 2 things:

- populate content of one rootfs directory to the partition. We can
  extend syntax of --rootfs-dir parameter to specify optional directory path to use

- exclude rootfs directories when populating partitions. I&apos;d propose to
  introduce --exclude-dirs wks parser option to handle this.

Example of wks file with proposed new options:
part /     --source rootfs --rootfs-dir=core-image-minimal       --ondisk sda --fstype=ext4 --label root --align 1024 --exclude-dirs data --exclude-dirs home
part /data --source rootfs --rootfs-dir=core-image-minimal:/home --ondisk sda --fstype=ext4 --label data --align 1024
part /home --source rootfs --rootfs-dir=core-image-minimal:/data --ondisk sda --fstype=ext4 --label data --align 1024</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68537</commentid>
    <comment_count>1</comment_count>
    <who name="Kristian Amlie">kristian.amlie</who>
    <bug_when>2016-11-23 14:19:56 +0000</bug_when>
    <thetext>On the mailing list, Maciej Borzecki pointed out that --exclude-dir may be a bad name since we do still want to the directory to be present. Can I suggest --exclude-content-of instead?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68540</commentid>
    <comment_count>2</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-11-23 15:47:39 +0000</bug_when>
    <thetext>It makes thanks for me. Thanks for pointing out.
What about a bit shorter name --exclude-content ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68567</commentid>
    <comment_count>3</comment_count>
    <who name="Kristian Amlie">kristian.amlie</who>
    <bug_when>2016-11-24 07:27:10 +0000</bug_when>
    <thetext>--exclude-content it is!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68575</commentid>
    <comment_count>4</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-11-24 15:27:28 +0000</bug_when>
    <thetext>Latest proposal is to use this syntax to exclude content or directories:

--exclude-path data/* - exclude content, but keep the directory
--exclude-path data - exclude directory and content
--exclude-path data/tmp/t* - exclude files and directories that match wildcard
--exclude-path data/db/tmp - exclude subdirectory and its content</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68577</commentid>
    <comment_count>5</comment_count>
    <who name="Kristian Amlie">kristian.amlie</who>
    <bug_when>2016-11-24 15:53:38 +0000</bug_when>
    <thetext>Looks good to me. I&apos;m still awaiting consensus on the mailing list, but I can start with the heart of the problem and make adjustments later.

I&apos;ll get started on this tomorrow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68579</commentid>
    <comment_count>6</comment_count>
    <who name="Kristian Amlie">kristian.amlie</who>
    <bug_when>2016-11-24 16:43:52 +0000</bug_when>
    <thetext>After further discussion on mailing list, latest proposal is to use rsync-style:

--exclude-path data/ - exclude content, but keep the directory
--exclude-path data - exclude directory and content
--exclude-path data/db/tmp/ - exclude subdirectory content only
--exclude-path data/db/tmp - exclude subdirectory and its content

This doesn&apos;t necessarily invalidate the earlier glob proposal, but I will not focus on that in the first iteration at least.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68593</commentid>
    <comment_count>7</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-11-25 12:51:04 +0000</bug_when>
    <thetext>Reassigning to Kristian as he&apos;ll be implementing this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69409</commentid>
    <comment_count>8</comment_count>
    <who name="Kristian Amlie">kristian.amlie</who>
    <bug_when>2016-12-30 08:07:35 +0000</bug_when>
    <thetext>This is likely to be merged soon, but there was talk about having an exclude option for the do_image_ext4 and similar functions as well, in addition to wic. We are going to need both in Mender. Should this ticket cover that or should I make a new one?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70281</commentid>
    <comment_count>9</comment_count>
    <who name="Kristian Amlie">kristian.amlie</who>
    <bug_when>2017-01-31 13:08:59 +0000</bug_when>
    <thetext>Setting milestone to &quot;Future&quot; for now. This is ready to be merged, but I don&apos;t know when the maintainers will do that. It might need a rebase, but I&apos;ll look at that after the sysroot issues have died down a bit, I don&apos;t think anyone has any spare cycles ATM.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70394</commentid>
    <comment_count>10</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2017-02-02 17:54:13 +0000</bug_when>
    <thetext>Cristian, can you rebase your changes on top of recent master and send them again for review? I&apos;ll try to push maintainers to merge them.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70413</commentid>
    <comment_count>11</comment_count>
    <who name="Kristian Amlie">kristian.amlie</who>
    <bug_when>2017-02-03 12:03:32 +0000</bug_when>
    <thetext>Thanks, Ed. I will repost shortly, I just need to retest them with the latest poky.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70448</commentid>
    <comment_count>12</comment_count>
    <who name="Kristian Amlie">kristian.amlie</who>
    <bug_when>2017-02-06 16:22:11 +0000</bug_when>
    <thetext>Rebased and retested patchset here: http://lists.openembedded.org/pipermail/openembedded-core/2017-February/132280.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70449</commentid>
    <comment_count>13</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2017-02-06 16:27:47 +0000</bug_when>
    <thetext>Kristian, thank you! I&apos;ll try to make sure your patchset is merged this time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70733</commentid>
    <comment_count>14</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2017-02-16 11:52:15 +0000</bug_when>
    <thetext>the patchset has been merged to master.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70734</commentid>
    <comment_count>15</comment_count>
    <who name="Kristian Amlie">kristian.amlie</who>
    <bug_when>2017-02-16 12:11:30 +0000</bug_when>
    <thetext>Thank you, Ed!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>