<?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>4473</bug_id>
          
          <creation_ts>2013-05-09 12:37:05 +0000</creation_ts>
          <short_desc>kernel-tools-native&apos;s merge_config.sh isn&apos;t sh-compliant</short_desc>
          <delta_ts>2013-05-25 04:25: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>OE-Core</product>
          <component>kernel</component>
          <version>1.4</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>normal</bug_severity>
          <target_milestone>1.4.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ross Burton">ross.burton</reporter>
          <assigned_to name="Bruce Ashfield">bruce.ashfield</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>bruce.ashfield</cc>
    
    <cc>dvhart</cc>
    
    <cc>otavio</cc>
    
    <cc>tom.zanussi</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>32979</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2013-05-09 12:37:05 +0000</bug_when>
    <thetext>The merge_config.sh in kernel-tools-native uses &quot;trap&quot; syntax that isn&apos;t POSIX compliant, so when running under dash this produces an error, which means busybox won&apos;t configure.

In tracing this I discovered that copy of this tool in the kernel was fix in late 2012 by a certain Darren Hart.  The changes in the kernel should probably be backported to the yocto-kernel-tools repository as we&apos;ve had two reports of Ubuntu users with sh-&gt;dash failing to build busybox.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32980</commentid>
    <comment_count>1</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2013-05-09 12:39:05 +0000</bug_when>
    <thetext>I&apos;ll take this. I maintain the kern-tools, and already started fixing this yesterday.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32982</commentid>
    <comment_count>2</comment_count>
    <who name="Otavio Salvador">otavio</who>
    <bug_when>2013-05-09 12:57:59 +0000</bug_when>
    <thetext>Thanks, please backport the patch to 1.4 (and maybe 1.3) so people using Ubuntu 10.04 can use it without problems. I had some customers complaining about it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32983</commentid>
    <comment_count>3</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2013-05-09 13:04:07 +0000</bug_when>
    <thetext>I&apos;ll send the changes to the stable branches for testing. There are a few
patches we carry for extra functionality used by the kernel fragment processing
(which I&apos;ll send upstream for the next kernel cycle), so it&apos;s not a completely 
straight backport.

Do we have any issues reported on 1.3 ? We only started using merge_config.sh
for busybox in 1.4:

&gt; git tag --contains 56dc1720caa48344238d352c7b6e9b0f0d41aa54
1.4_M4.final
1.4_M4.rc1
1.4_M5.final
1.4_M5.rc1
1.4_M5.rc2
1.4_M5.rc3
1.4_M6.rc1
dylan-9.0.0

So I&apos;ll start with 1.4 and see if we get a tangible issue reported in 1.3. Merging it back
further increases the risk, and testing .. so I&apos;ll take the cautious route and wait on it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32985</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2013-05-09 13:05:43 +0000</bug_when>
    <thetext>Agreed, every report of this I&apos;ve seen was against master or 1.4 - 1.3 is safe from the busybox aspect at least.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32991</commentid>
    <comment_count>5</comment_count>
    <who name="Otavio Salvador">otavio</who>
    <bug_when>2013-05-09 13:56:18 +0000</bug_when>
    <thetext>But it is a risk as it is used by linux-yocto recipe in 1.3 so if it has same issue there it&apos;d be better to port the fix for it as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33002</commentid>
    <comment_count>6</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2013-05-09 14:51:27 +0000</bug_when>
    <thetext>Remember merge_config.sh is in the mainline kernel, let&apos;s do this properly and fix upstream first. I actually tested this on bash and dash when I wrote it.... hrm, not sure where the gap was here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33004</commentid>
    <comment_count>7</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2013-05-09 14:52:48 +0000</bug_when>
    <thetext>Upstream commit shows this is indeed tested on dash. How is this failing for people? Is it just that we haven&apos;t pulled in the upstream signal name fix?

$ git show 041b78c
commit 041b78c89b1fe68f44c45e8b6cc6c9f8ea8f0e4c
Author: Darren Hart &lt;dvhart@linux.intel.com&gt;
Date:   Tue Jan 10 15:41:10 2012 -0800

    merge_config.sh: use signal names compatible with dash and bash
    
    The SIGHUP SIGINT and SIGTERM names caused failures when running
    merge_config.sh with the dash shell.  Dropping the &quot;SIG&quot; component makes
    the script work in both bash and dash.
    
    Signed-off-by: Darren Hart &lt;dvhart@linux.intel.com&gt;
    Acked-by: John Stultz &lt;john.stultz@linaro.org&gt;
    Cc: Michal Marek &lt;mmarek@suse.cz&gt;
    Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
    Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;

diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
index 890276b..b91015d 100644
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -24,7 +24,7 @@ clean_up() {
        rm -f $TMP_FILE
        exit
 }
-trap clean_up SIGHUP SIGINT SIGTERM
+trap clean_up HUP INT TERM
 
 usage() {
        echo &quot;Usage: $0 [OPTIONS] [CONFIG [...]]&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33005</commentid>
    <comment_count>8</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2013-05-09 15:02:40 +0000</bug_when>
    <thetext>Darren: that&apos;s what I meant, I&apos;ll just pick up the mainline fixes, there&apos;s nothing I need to fix,
just backports.

My changes will go upstream as well, but they aren&apos;t the problem.

I need to have it out of tree for now,  for two reasons: busybox can&apos;t depend on the kernel,
and we don&apos;t want duplicate code. I&apos;ll just make sure that I&apos;m always trolling for the few
fixes and get them into kern-tools. Our packaging is like the kconfig-frontends, where it
is pulled out and packaged for other needs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33014</commentid>
    <comment_count>9</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2013-05-09 19:33:11 +0000</bug_when>
    <thetext>changes have been ported and local changes rebased. testing busy box and kernel for use case regressions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33020</commentid>
    <comment_count>10</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2013-05-10 04:33:17 +0000</bug_when>
    <thetext>Changes are done and pushed to the kern-tools repo. busybox and 3.8/3.4 kernel tested against master and 1.4.

Changes will be sent tomorrow, with 1.3 changes to follow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33210</commentid>
    <comment_count>11</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2013-05-22 16:24:49 +0000</bug_when>
    <thetext>Fix has been merged into master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=f259554b4e91eecbb009622a64e43c5619aedb92

and also dylan (for 1.4.1):

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=dylan&amp;id=3faa5039c8147d0bf9e352dc5ad1e9e12cf2086a

For danny the merge is still pending AFAICT.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>