<?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>11882</bug_id>
          
          <creation_ts>2017-08-01 17:00:35 +0000</creation_ts>
          <short_desc>iwlwifi: packaging error</short_desc>
          <delta_ts>2017-08-11 21:52:04 +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>BSPs</product>
          <component>bsps-meta-intel</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugzilla.yoctoproject.org/show_bug.cgi?id=11894</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>2.4 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Patrick Ohly">patrick.ohly</reporter>
          <assigned_to name="Saul Wold">sgw</assigned_to>
          <cc>jussi.laako</cc>
    
    <cc>mikko.ylinen</cc>
    
    <cc>ross.burton</cc>
    
    <cc>sgw</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>75566</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2017-08-01 17:00:35 +0000</bug_when>
    <thetext>Distro: refkit (= https://github.com/pohly/intel-iot-refkit/tree/updates2)
meta-intel: da5f7e708166ad2ecc5

ERROR: iwlwifi-30-r0 do_package: QA Issue: iwlwifi: Files/directories were installed but not shipped in any package:
  /etc
  /etc/modprobe.d
  /etc/modprobe.d/iwlwifi.conf
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
iwlwifi: 3 installed and not shipped files. [installed-vs-shipped]
ERROR: iwlwifi-30-r0 do_package: Fatal QA errors found, failing task.
ERROR: iwlwifi-30-r0 do_package: Function failed: do_package
ERROR: Logfile of failure stored in: /fast/build/refkit/pr/tmp-glibc/work/corei7-64-intel-common-refkit-linux/iwlwifi/30-r0/temp/log.do_package.17453
ERROR: Task (/fast/work/intel-iot-refkit-pr/openembedded-core/../meta-intel/common/recipes-kernel/iwlwifi/iwlwifi_git.bb:do_package) failed with exit code &apos;1&apos;

Jussi also mentioned another error once that is fixed: &quot;nothing provides kernel-module-cfg80211-4.9.30-yocto-standard needed by kernel-module-ath9k-common-4.9.30-yocto-standard-4.9.30+git0+299f12a06c_22a3e39758-r0.corei7-64-intel-common&quot;

This happens when the distro uses linux-intel.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75591</commentid>
    <comment_count>1</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2017-08-02 15:20:20 +0000</bug_when>
    <thetext>According to Saul, this works for him. We need to investigate why it fails in Refkit. Jussi, can you do that? If in doubt, build iwlwifi in Poky+meta-intel and compare.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75604</commentid>
    <comment_count>2</comment_count>
    <who name="Jussi Laako">jussi.laako</who>
    <bug_when>2017-08-03 12:18:41 +0000</bug_when>
    <thetext>meta-instal &quot;works&quot; if I build for example linux-yocto-rt 4.10 as kernel, because iwlwifi is not pulled in. But when kernel is linux-intel 4.9 it pulls in iwlwifi package as dependency and then build fails.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75605</commentid>
    <comment_count>3</comment_count>
    <who name="Jussi Laako">jussi.laako</who>
    <bug_when>2017-08-03 13:31:56 +0000</bug_when>
    <thetext>On poky, with &quot;core-image-minimal&quot; the build seems to work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75615</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-08-03 14:58:12 +0000</bug_when>
    <thetext>If it works in Poky but fails in refkit then that suggests that refkit is doing something, via a bbappend or distro config, to break it.

If there are no bbappends then my hunch is usrmerge interacting badly with the rm ${D}/usr in do_install.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75640</commentid>
    <comment_count>5</comment_count>
    <who name="Jussi Laako">jussi.laako</who>
    <bug_when>2017-08-04 07:45:33 +0000</bug_when>
    <thetext>I didn&apos;t find any bbappends or distro features that would be likely source of breaking it.

I don&apos;t know how to debug this further. I also find it strange that it doesn&apos;t fail on poky about the missing FILES_${PN} for the iwlwifi.conf from do_install_append(). I think it should fail there too. With my fix to the iwlwifi recipe to add the iwlwifi.conf to FILES_${PN} that error goes away and the package itself is built OK on both refkit and poky.

However, still the other error about missing kernel-module-cfg80211 remains on refkit, but doesn&apos;t appear on poky.

Based on what I checked, this is brought in through intel-common-drivers.scc. Manually pulling in that in the local.conf of both and get some warnings about unrelated config options that didn&apos;t end up in final config, refkit giving one warning more than poky while we shouldn&apos;t have any kernel config mods?


ERROR: refkit-image-common-1.0-r0 do_rootfs: Unable to install packages. Command &apos;/scratch/jlaako/build/tmp-glibc/work/intel_corei7_64-refkit-linux/refkit-image-common/1.0-r0/recipe-sysroot-native/usr/bin/opkg --volatile-cache -f /scratch/jlaako/build/tmp-glibc/work/intel_corei7_64-refkit-linux/refkit-image-common/1.0-r0/opkg.conf -t /scratch/jlaako/build/tmp-glibc/work/intel_corei7_64-refkit-linux/refkit-image-common/1.0-r0/temp/ipktemp/ -o /scratch/jlaako/build/tmp-glibc/work/intel_corei7_64-refkit-linux/refkit-image-common/1.0-r0/rootfs  --force_postinstall --prefer-arch-to-version   install connman-tools packagegroup-core-boot alsa-state lms8 rmc weston-init linux-firmware packagegroup-core-ssh-openssh pciutils kernel-modules run-postinsts packagegroup-common-test connman-client weston alsa-utils packagegroup-core-connectivity&apos; returned 1:
Collected errors:
 * Solver encountered 1 problem(s):
 * Problem 1/1:
 *   - nothing provides kernel-module-cfg80211-4.9.30-yocto-standard needed by kernel-module-ath9k-common-4.9.30-yocto-standard-4.9.30+git0+299f12a06c_22a3e39758-r0.corei7-64-intel-common
 *
 * Solution 1:
 *   - do not ask to install a package providing kernel-modules

 * opkg_finalize_intercepts: Failed to open dir /scratch/jlaako/build/tmp-glibc/work/intel_corei7_64-refkit-linux/refkit-image-common/1.0-r0/temp/ipktemp//opkg-mSKt9Y/opkg-intercept-Bf14Wq: No such file or directory.
 * rm_r: Failed to open dir /scratch/jlaako/build/tmp-glibc/work/intel_corei7_64-refkit-linux/refkit-image-common/1.0-r0/temp/ipktemp//opkg-mSKt9Y/opkg-intercept-Bf14Wq: No such file or directory.
 * rm_r: Failed to open dir /scratch/jlaako/build/tmp-glibc/work/intel_corei7_64-refkit-linux/refkit-image-common/1.0-r0/temp/ipktemp//opkg-mSKt9Y: No such file or directory.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75643</commentid>
    <comment_count>6</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-08-04 09:25:12 +0000</bug_when>
    <thetext>FWIW I tried building iwlwifi to look at this and can&apos;t even get past compile.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75659</commentid>
    <comment_count>7</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2017-08-04 18:41:00 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; FWIW I tried building iwlwifi to look at this and can&apos;t even get past
&gt; compile.

Were you using MACHINE=intel-corei7-64 and linux-intel?

The easiest way to reproduce this should be by checking out the intel-iot-refkit branch that I had mentioned in the description.

(In reply to comment #5)
&gt; I don&apos;t know how to debug this further. I also find it strange that it
&gt; doesn&apos;t fail on poky about the missing FILES_${PN} for the iwlwifi.conf from
&gt; do_install_append(). I think it should fail there too.

The recipe uses modules.bbclass, which does some automatic packaging of the installed files. I find it likely that this packaging fails due to usrmerge in refkit, due to a /lib/modules vs. /usr/lib/modules mismatch somewhere.

Someone needs to check whether the class or do_install do it wrong.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75704</commentid>
    <comment_count>8</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2017-08-07 22:54:57 +0000</bug_when>
    <thetext>So I can absolutely reproduce this in Poky/OE-Core with just enabling the usrmerge DISTRO_FEATURE, so there is something going on that I don&apos;t believe is correct, since it should not change that packaging behavior.

I also seems to loose the modules-load.d directory which MODULE_AUTOLOAD sets up, it&apos;s in the image, but does not get packaged either.  I see them getting installed into the image directory, but not packaged.

More digging is required.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75708</commentid>
    <comment_count>9</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2017-08-08 02:03:34 +0000</bug_when>
    <thetext>Further refined the issue to the bitbake.conf root_prefix changing to base_prefix (&quot;&quot;) from exec_prefix (&quot;/usr&quot;) in usrmerge mode, so next digging is to what that breaks in the kernel-module class, I think that&apos;s the issue now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75731</commentid>
    <comment_count>10</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2017-08-08 15:38:38 +0000</bug_when>
    <thetext>Found the issue in iwlwifi is removing the /usr which is where usrmerge puts everything, so that was wrong.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75756</commentid>
    <comment_count>11</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2017-08-08 23:39:32 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel/commit/?id=1a35dee120dde6c90af342974b528c5db1b838f9</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75769</commentid>
    <comment_count>12</comment_count>
    <who name="Jussi Laako">jussi.laako</who>
    <bug_when>2017-08-09 13:02:30 +0000</bug_when>
    <thetext>Thank you! Now the build succeeds on RefKit too!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75776</commentid>
    <comment_count>13</comment_count>
    <who name="Mikko Ylinen">mikko.ylinen</who>
    <bug_when>2017-08-09 17:30:47 +0000</bug_when>
    <thetext>(In reply to comment #12)
&gt; Thank you! Now the build succeeds on RefKit too!

I confirm it builds locally for me too but Refkit CI has this problem in do_install:

2017-08-09 10:24:17 | modinfo: ERROR: Module alias mac80211 not found.
2017-08-09 10:24:17 | depmod will prefer updates/ over kernel/ -- OK!
2017-08-09 10:24:17 | make[1]: /sbin/depmod: Command not found
2017-08-09 10:24:17 | Makefile.real:104: recipe for target &apos;install&apos; failed
2017-08-09 10:24:17 | make[1]: *** [install] Error 127
2017-08-09 10:24:17 | Makefile:40: recipe for target &apos;install&apos; failed
2017-08-09 10:24:17 | make: *** [install] Error 2
2017-08-09 10:24:17 | ERROR: oe_runmake failed</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75792</commentid>
    <comment_count>14</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2017-08-09 22:16:06 +0000</bug_when>
    <thetext>Ok, so I agree, my local build of refkit with all the images mentioned in the CI build set:

bitbake refkit-image-minimal refkit-image-computervision refkit-image-gateway refkit-image-industrial refkit-installer-image swtpm-wrappers-native ovmf 

and it succeeded for all of these, I tried to run the iot_test_export task, but something is missing in some setup, and it&apos;s not clear to me what.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75796</commentid>
    <comment_count>15</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2017-08-10 00:34:46 +0000</bug_when>
    <thetext>I reviewed the log file from https://intel-iot-refkit.01.org/job/intel-iot-refkit_pull-requests/272/console

I can see the do_install() calls the make install and there are 6 modules installed, including both the mac80211 and cfg80211 modules, but some how it fails to find the mac80211 module and possibly depmod itself, altough I wonder if that is an artifact of not finding the kernel module.

Not sure what the CI does differently with setup in local.conf/auto.conf?  Since I see there is at least the iot_test task that does not run by default, I am missing some vital information.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75800</commentid>
    <comment_count>16</comment_count>
    <who name="Mikko Ylinen">mikko.ylinen</who>
    <bug_when>2017-08-10 11:53:39 +0000</bug_when>
    <thetext>(In reply to comment #15)


&gt; 
&gt; I can see the do_install() calls the make install and there are 6 modules
&gt; installed, including both the mac80211 and cfg80211 modules, but some how it
&gt; fails to find the mac80211 module and possibly depmod itself, altough I
&gt; wonder if that is an artifact of not finding the kernel module.

I&apos;ve root caused the problem and the reason is iwlwifi&apos;s make install leaks to host paths. The build works on hosts that have mac80211.ko available but fails in CI because it does not have it.

A closer look to the .sh scripts in &apos;install:&apos; (Makefile.real) tells me they&apos;re relevant only if iwlwifi gets installed to your PC directly.

For our case we can probably skip them. Here&apos;s a trivial &quot;patch&quot; to, e.g., iwlwifi_git.bb&apos;s do_configure():

sed -i -e &apos;/blacklist.sh/,/update-initramfs.sh/ d&apos; ${S}/Makefile.real

(delete lines between blacklist.sh and update-initramfs.sh)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75822</commentid>
    <comment_count>17</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2017-08-11 21:52:04 +0000</bug_when>
    <thetext>Merged Mikko&apos;s patch to the Makefile:
http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel/commit/?id=53004c75177b2b4b9eb4b8fb32f7ee9e4a9308f4</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>