<?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>6204</bug_id>
          
          <creation_ts>2014-04-22 14:46:22 +0000</creation_ts>
          <short_desc>WIC does not check presence of e2fsprogs-native</short_desc>
          <delta_ts>2015-12-03 15:01:32 +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>deployment</component>
          <version>unspecified</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>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.1</target_milestone>
          <dependson>8474</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexandre Fournier">alexandre.fournier</reporter>
          <assigned_to name="Ed Bartosh">eduard.bartosh</assigned_to>
          <cc>bogdanx.a.voiculescu</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>joaohf</cc>
    
    <cc>magnus</cc>
          
          <qa_contact name="Daniel Istrate">daniel.alexandrux.istrate</qa_contact>
          <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>42817</commentid>
    <comment_count>0</comment_count>
    <who name="Alexandre Fournier">alexandre.fournier</who>
    <bug_when>2014-04-22 14:46:22 +0000</bug_when>
    <thetext>When using WIC to build ext2/3/4 partitions, mkfs.ext{2,3,4} may fail if e2fsprogs-native is not already baked. As mkfs.ext{2,3,4} is used in conjunction with pseudo it can execute system&apos;s mkfs instead of oe-core&apos;s.

This can be fixed by running &apos;bitbake e2fsprogs-native&apos; before &apos;wic create&apos;

$ wic create generic-pc -e test-image gives the following error:

Debug: exec_cmd: output for export PATH=/tmp/OE/tmp-eglibc/sysroots/x86_64-linux/sbin:/tmp/OE/tmp-eglibc/sysroots/x86_64-linux/usr/sbin:/tmp/OE/tmp-eglibc/sysroots/x86_64-linux/usr/bin:$PATH;export PSEUDO_PREFIX=/tmp/OE/tmp-eglibc/sysroots/x86_64-linux/usr;export PSEUDO_LOCALSTATEDIR=/tmp/OE/tmp-eglibc/work/openvox-oe-linux/test-image/1.0-r0/rootfs/../pseudo;export PSEUDO_PASSWD=/tmp/OE/tmp-eglibc/work/openvox-oe-linux/test-image/1.0-r0/rootfs;export PSEUDO_NOSYMLINKEXP=1;/tmp/OE/tmp-eglibc/sysroots/x86_64-linux/usr/bin/pseudo mkfs.ext4 -F -i 8192 /var/tmp/wic/build/rootfs_data.ext4 -d /tmp/OE/tmp-eglibc/work/openvox-oe-linux/test-image/1.0-r0/rootfs (rc = 1):

mkfs.ext4: invalid option -- &apos;d&apos;
Usage: mkfs.ext4 [-c|-l filename] [-b block-size] [-C cluster-size]
	[-i bytes-per-inode] [-I inode-size] [-J journal-options]
	[-G flex-group-size] [-N number-of-inodes]
	[-m reserved-blocks-percentage] [-o creator-os]
	[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]
	[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]
	[-t fs-type] [-T usage-type ] [-U UUID] [-jnqvDFKSV] device [blocks-count]

Warning: WARNING: export PATH=/tmp/OE/tmp-eglibc/sysroots/x86_64-linux/sbin:/tmp/OE/tmp-eglibc/sysroots/x86_64-linux/usr/sbin:/tmp/OE/tmp-eglibc/sysroots/x86_64-linux/usr/bin:$PATH;export PSEUDO_PREFIX=/tmp/OE/tmp-eglibc/sysroots/x86_64-linux/usr;export PSEUDO_LOCALSTATEDIR=/tmp/OE/tmp-eglibc/work/openvox-oe-linux/test-image/1.0-r0/rootfs/../pseudo;export PSEUDO_PASSWD=/tmp/OE/tmp-eglibc/work/openvox-oe-linux/test-image/1.0-r0/rootfs;export PSEUDO_NOSYMLINKEXP=1;/tmp/OE/tmp-eglibc/sysroots/x86_64-linux/usr/bin/pseudo mkfs.ext4 -F -i 8192 /var/tmp/wic/build/rootfs_data.ext4 -d /tmp/OE/tmp-eglibc/work/openvox-oe-linux/test-image/1.0-r0/rootfs returned &apos;1&apos; instead of 0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>43749</commentid>
    <comment_count>1</comment_count>
    <who name="João Henrique">joaohf</who>
    <bug_when>2014-06-03 23:39:59 +0000</bug_when>
    <thetext>Hi,

Not only e2fsprogs-native but syslinux-native, syslinux, and mtools-native must be baked before &apos;wic create&apos;. If you are using bootimg-pcbios or bootimg-efi.

As wic is a tool that could be used without OE, maybe it&apos;s necessary implements a environment check? or if wic is running inside OE environment it should  bake the needed tools, without user requests?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50090</commentid>
    <comment_count>2</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-04-05 10:33:39 +0000</bug_when>
    <thetext>Currently wic can&apos;t be used without oe build system as it&apos;s tightly coupled with tools and build artifacts produced by it.

However, there is a feature request to detach wic from the build system: https://bugzilla.yoctoproject.org/show_bug.cgi?id=6558

I like the idea of environment check and two working modes of wic, but I think it would be better if we take step by step approach. As a first step I&apos;d rather make sure wic is using only native tools. This would allow us to fully  understand wic runtime dependencies and make wic more stable, i.e. independent of host environment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50105</commentid>
    <comment_count>3</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-04-07 08:16:19 +0000</bug_when>
    <thetext>This patch partly fixes the issue as wic will not be able to find host tools anymore: http://lists.openembedded.org/pipermail/openembedded-core/2015-April/103397.html

I&apos;m going to add requirements to bake parted-native, syslinux, e2fsprogs and mtools to the documentation and close this issue.

Please, speak up if you think something else should be done.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50299</commentid>
    <comment_count>4</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-04-14 14:36:48 +0000</bug_when>
    <thetext>My patch got accepted: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=024514037ddcc92de4f685f85bb916b2815fb47e

So, I think this issue is fixed. I&apos;m going to update documentation accordingly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55125</commentid>
    <comment_count>5</comment_count>
    <who name="Daniel Istrate">daniel.alexandrux.istrate</who>
    <bug_when>2015-10-09 15:18:49 +0000</bug_when>
    <thetext>Verified on master: eac61f37e36099f74485dab398b57f3812826d17


Steps to verify:
1. bitbake core-image-minimal syslinux dosfstools-native mtools-native syslinux-native parted-native 
2. bitbake -c clean e2fsprogs-native
3. [daniel@fedora-ws poky-build]$ wic create directdisk -e core-image-minimal
Checking basic build environment...
Done.

Creating image(s)...

Error: exec_cmd: &apos;export PSEUDO_PREFIX=/media/ssd/poky-build/tmp/sysroots/x86_64-linux/usr;export PSEUDO_LOCALSTATEDIR=/media/ssd/poky-build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs/../pseudo;export PSEUDO_PASSWD=/media/ssd/poky-build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs;export PSEUDO_NOSYMLINKEXP=1;/media/ssd/poky-build/tmp/sysroots/x86_64-linux/usr/bin/pseudo mkfs.ext4 -F -i 8192 /var/tmp/wic/build/rootfs_platform.7.ext4 -L platform -d /media/ssd/poky-build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs&apos; returned &apos;1&apos; instead of 0
[daniel@fedora-ws poky-build]$ 

4. [daniel@fedora-ws poky-build]$ rpm -qa |grep e2fsprogs
e2fsprogs-libs-1.42.12-4.fc21.x86_64
e2fsprogs-1.42.12-4.fc21.x86_64


At step 3 wic should provide a more meaningful message.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55551</commentid>
    <comment_count>6</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-10-21 12:19:12 +0000</bug_when>
    <thetext>The reason for that is that mkfs is run with pseudo and exec_native_cmd isn&apos;t aware of that. I&apos;ll modify it that it supports pseudo.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55557</commentid>
    <comment_count>7</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-10-21 13:16:12 +0000</bug_when>
    <thetext>sent for review: http://lists.openembedded.org/pipermail/openembedded-core/2015-October/111822.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56742</commentid>
    <comment_count>8</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-11-24 13:56:40 +0000</bug_when>
    <thetext>Updated the patch and sent for review again: http://lists.openembedded.org/pipermail/openembedded-core/2015-November/113271.html as previous was forgotten and doesn&apos;t apply anymore.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56998</commentid>
    <comment_count>9</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-12-03 15:01:32 +0000</bug_when>
    <thetext>Patch has been merged upstream: http://cgit.openembedded.org/openembedded-core/commit/?id=04bab58809c63c9114feb0aadc9b6115be10fcc4</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>