<?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>5980</bug_id>
          
          <creation_ts>2014-03-17 07:43:51 +0000</creation_ts>
          <short_desc>cdrtools-native 3.01a17: do_install failed</short_desc>
          <delta_ts>2014-04-03 15:35:33 +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>x86</rep_platform>
          <op_sys>x86_64</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.6 M5</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Wiederkehr">michael.wiederkehr</reporter>
          <assigned_to name="Saul Wold">sgw</assigned_to>
          <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>41282</commentid>
    <comment_count>0</comment_count>
      <attachid>1820</attachid>
    <who name="Michael Wiederkehr">michael.wiederkehr</who>
    <bug_when>2014-03-17 07:43:51 +0000</bug_when>
    <thetext>Created attachment 1820
install log

Hi,

I&apos;ve tried to build yocto dora (genericx86 sato, intel sandy bridge) with several different hosts (Ubuntu 13.04, 13.10 and openSUSE 13.1) and get always the same error on building the cdrtools-native</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41386</commentid>
    <comment_count>1</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2014-03-18 19:21:33 +0000</bug_when>
    <thetext>I think I need some more details about what you are doing, I tried to reproduce 
this and I think somehow you are running this as root possibly?  There are some 
tests in the install-sh script to check if the -o and -g options are available. 
 In my builds, I get the following lines:

        ==&gt; INSTALLING 
&quot;/home/sgw/yocto/builds/world/tmp/work/x86_64-linux/cdrtools-native/3.01a20-r0/image/home/sgw/yocto/builds/world/tmp/sysroots/x86_64-linux/usr/include/schily/x86_64-linux-cc/xconfig.h&quot;
Intercept /home/sgw/yocto/poky/scripts/native-intercept/chown: root 
/tmp/xd.1855/xx.1855 -- do nothing
install: -o option available only to root -- ignored
install: -g option available only to root -- ignored

It is not recommeded that you run as root, if you are indeed not running as 
root, then the chmod command is a problem somehow in the install-sh, since it 
should fail and therefore set  the rootflag to FALSE in install-sh, you can see 
we use an intercept for chown (the --do nothing note), which is used in your 
build.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41414</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Wiederkehr">michael.wiederkehr</who>
    <bug_when>2014-03-19 10:24:19 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; I think I need some more details about what you are doing, I tried to
&gt; reproduce 
&gt; this and I think somehow you are running this as root possibly?  There are
&gt; some 
&gt; tests in the install-sh script to check if the -o and -g options are
&gt; available. 
&gt;  In my builds, I get the following lines:
&gt; 
&gt;         ==&gt; INSTALLING 
&gt; &quot;/home/sgw/yocto/builds/world/tmp/work/x86_64-linux/cdrtools-native/3.01a20-
&gt; r0/image/home/sgw/yocto/builds/world/tmp/sysroots/x86_64-linux/usr/include/
&gt; schily/x86_64-linux-cc/xconfig.h&quot;
&gt; Intercept /home/sgw/yocto/poky/scripts/native-intercept/chown: root 
&gt; /tmp/xd.1855/xx.1855 -- do nothing
&gt; install: -o option available only to root -- ignored
&gt; install: -g option available only to root -- ignored
&gt; 
&gt; It is not recommeded that you run as root, if you are indeed not running as 
&gt; root, then the chmod command is a problem somehow in the install-sh, since
&gt; it 
&gt; should fail and therefore set  the rootflag to FALSE in install-sh, you can
&gt; see 
&gt; we use an intercept for chown (the --do nothing note), which is used in your 
&gt; build.

Dear Saul,

thanks for your infos. I don&apos;t run hob/bitbake as root! 

For testing I commented out the line (install-sh) where the rootflag is set TRUE. After that change the build succeeds!

So as you mentioned the chmod command is the problem. I&apos;m running all hosts under VMWare WS. Maybe that causes the chmod problem?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41454</commentid>
    <comment_count>3</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2014-03-19 19:03:59 +0000</bug_when>
    <thetext>Ok, so you commented out that line out and it worked, looking further, can you 
you verify if the next check, inside the the rootflag = TRUE looking at the 
dsttmp file, it should be setting the rootflag to FLASE there.  I realized, the 
chown will pass because of the intercept and then the chmod will pass because 
it&apos;s still owned by you, so that will succeed and set rootflag to TRUE, which 
will then kick into the &quot;Win95&quot; check, which in this case should be our friend. 
 We should be checking if dsttmp file is owned by root, which it won&apos;t be and 
then set rootflag back to FALSE, if this check fails, then rootflag will remain 
TRUE and you encounter the failure you see.  So a question is which shell are 
you using, possibly a bash/dash issue then?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41508</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Wiederkehr">michael.wiederkehr</who>
    <bug_when>2014-03-20 10:17:37 +0000</bug_when>
    <thetext>Current shell is bash (open SUSE 13.1, GNOME)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42053</commentid>
    <comment_count>5</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2014-04-01 16:17:16 +0000</bug_when>
    <thetext>Sorry, I was away on a trip, back now.  In my comment #3, I suggested a course 
though the install-sh script, can you verify that is what&apos;s happening via 
echo&apos;s or other debug checks?

Let me know if you can do that, I really would like to track down what you are 
seeing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42127</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Wiederkehr">michael.wiederkehr</who>
    <bug_when>2014-04-02 08:25:27 +0000</bug_when>
    <thetext>Hi, no problem. With commenting out the chown/chmod line I was able to continue with my work.

Now I know whats going wrong. I&apos;ve logged out the result of &quot;ls -l {dsttmp}&quot;:

-rwxr-xr-x 1 wroot wroot 1 Apr  2 09:32 /tmp/xd.3191/xx.3191

The problem is the (stupid) user name &quot;wroot&quot;! Grep for &quot;root&quot; will succeed then and rootflag stays TRUE.

I used that username for all host installations!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42187</commentid>
    <comment_count>7</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2014-04-02 20:29:28 +0000</bug_when>
    <thetext>Ah, that will do it, I guess we could modify the script to check for uid of 0 
instead of root, but this is such an edge case, but I will provide a quick 
patch here for you to test if you can.

85c85,87
&lt; 	ls -l ${dsttmp} 2&gt; /dev/null | grep root &gt; /dev/null || rootflag=FALSE
---
&gt; 	if [ `ls -l ${dsttmp} 2&gt; /dev/null | awk &apos;{print $3}&apos;` = 0 ]; then
&gt; 		rootflag=FALSE
&gt; 	fi

But I think I will close this offically, unless you feel strongly that we need 
to patch the cdrtools scripts.

Sau!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42200</commentid>
    <comment_count>8</comment_count>
    <who name="Michael Wiederkehr">michael.wiederkehr</who>
    <bug_when>2014-04-03 07:39:46 +0000</bug_when>
    <thetext>Hi Saul,

I&apos;ve tried your fix, but the build still fails!

I modified the fix to get numeric uid output (option -n) and checking the uid to be unequal zero:

85c85,87
&lt; 	ls -l ${dsttmp} 2&gt; /dev/null | grep root &gt; /dev/null || rootflag=FALSE
---
&gt; 	if [ `ls -n ${dsttmp} 2&gt; /dev/null | awk &apos;{print $3}&apos;` != 0 ]; then
&gt; 		rootflag=FALSE
&gt; 	fi

For me it&apos;s ok when you close this case. I change the username of my host installations to avoid the problem!

Thanks a lot for your help.

Best regards

Michael</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42242</commentid>
    <comment_count>9</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2014-04-03 15:35:33 +0000</bug_when>
    <thetext>User name confusion with wroot</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>1820</attachid>
            <date>2014-03-17 07:43:51 +0000</date>
            <delta_ts>2014-03-17 07:43:51 +0000</delta_ts>
            <desc>install log</desc>
            <filename>log.do_install.28018</filename>
            <type>application/octet-stream</type>
            <size>2188</size>
            <attacher name="Michael Wiederkehr">michael.wiederkehr</attacher>
            
              <data encoding="base64">REVCVUc6IEV4ZWN1dGluZyBzaGVsbCBmdW5jdGlvbiBkb19pbnN0YWxsCgk9PT4gTUFLSU5HICJp
bnN0YWxsIiBPTiBTVUJESVJFQ1RPUlkgIlNSQ1JPT1QvY29uZiIKbWFrZVsxXTogRW50ZXJpbmcg
ZGlyZWN0b3J5IGAvaG9tZS93cm9vdC9wb2t5LWRvcmEtMTAuMC4xL2J1aWxkL3RtcC93b3JrL3g4
Nl82NC1saW51eC9jZHJ0b29scy1uYXRpdmUvMy4wMWExNy1yMC9jZHJ0b29scy0zLjAxL2NvbmYn
Cgk9PT4gTUFLSU5HIERJUkVDVE9SWSAiL2hvbWUvd3Jvb3QvcG9reS1kb3JhLTEwLjAuMS9idWls
ZC90bXAvd29yay94ODZfNjQtbGludXgvY2RydG9vbHMtbmF0aXZlLzMuMDFhMTctcjAvaW1hZ2Uv
aG9tZS93cm9vdC9wb2t5LWRvcmEtMTAuMC4xL2J1aWxkL3RtcC9zeXNyb290cy94ODZfNjQtbGlu
dXgvdXNyL2luY2x1ZGUvc2NoaWx5L3g4Nl82NC1saW51eC1jYyIKCT09PiBJTlNUQUxMSU5HICIv
aG9tZS93cm9vdC9wb2t5LWRvcmEtMTAuMC4xL2J1aWxkL3RtcC93b3JrL3g4Nl82NC1saW51eC9j
ZHJ0b29scy1uYXRpdmUvMy4wMWExNy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