<?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>5395</bug_id>
          
          <creation_ts>2013-10-28 13:30:39 +0000</creation_ts>
          <short_desc>Nativesdk postinstalls directory issues.</short_desc>
          <delta_ts>2026-03-20 14:02:19 +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>BitBake</product>
          <component>bitbake</component>
          <version>1.5</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>   </status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>6.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Nyström">david.nystrom</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>david.nystrom</cc>
    
    <cc>m.gwerder</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <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>38211</commentid>
    <comment_count>0</comment_count>
    <who name="David Nyström">david.nystrom</who>
    <bug_when>2013-10-28 13:30:39 +0000</bug_when>
    <thetext>nativesdk packages can&apos;t be used outside of the bitbake/OE environment, since
postinstall paths are hardcoded to SDK NATIVE_SYSROOT.


----------------- nativesdk-shadow_4.1.4.3-r13_x86_64-nativesdk.ipk postinstall -----------------
	if [ &quot;x$D&quot; != &quot;x&quot; ]; then
	  rootarg=&quot;--root=$D&quot;
	else
	  rootarg=&quot;&quot;
	fi

	pwconv $rootarg
	grpconv $rootarg
	update-alternatives --install /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/passwd passwd /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/passwd.shadow 200
	update-alternatives --install /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/chfn chfn /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/chfn.shadow 200
	update-alternatives --install /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/newgrp newgrp /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/newgrp.shadow 200
	update-alternatives --install /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/chsh chsh /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/chsh.shadow 200
	update-alternatives --install /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/groups groups /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/groups.shadow 200
	update-alternatives --install /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/sbin/chpasswd chpasswd /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/sbin/chpasswd.shadow 200
	update-alternatives --install /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/bin/login login /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/bin/login.shadow 200
	update-alternatives --install /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/sbin/vipw vipw /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/sbin/vipw.shadow 200
	update-alternatives --install /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/sbin/vigr vigr /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/sbin/vigr.shadow 200
	update-alternatives --install /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/bin/su su /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/bin/su.shadow 200

----------------- shadow_4.1.4.3-r13_x86_64.ipk postinstall -----------------
        if [ &quot;x$D&quot; != &quot;x&quot; ]; then
          rootarg=&quot;--root=$D&quot;
        else
          rootarg=&quot;&quot;
        fi

        pwconv $rootarg
        grpconv $rootarg
        update-alternatives --install /usr/bin/passwd passwd /usr/bin/passwd.shadow 200
        update-alternatives --install /usr/bin/chfn chfn /usr/bin/chfn.shadow 200
        update-alternatives --install /usr/bin/newgrp newgrp /usr/bin/newgrp.shadow 200
        update-alternatives --install /usr/bin/chsh chsh /usr/bin/chsh.shadow 200
        update-alternatives --install /usr/bin/groups groups /usr/bin/groups.shadow 200
        update-alternatives --install /usr/sbin/chpasswd chpasswd /usr/sbin/chpasswd.shadow 200
        update-alternatives --install /bin/login login /bin/login.shadow 200
        update-alternatives --install /sbin/vipw vipw /sbin/vipw.shadow 200
        update-alternatives --install /sbin/vigr vigr /sbin/vigr.shadow 200
        update-alternatives --install /bin/su su /bin/su.shadow 200</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38336</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2013-10-31 12:15:34 +0000</bug_when>
    <thetext>The issue is that the relocation code effectively changes the prefix that the packages were built with but this is not reflected in the postinstalls.

If you install into the default location you wouldn&apos;t hit this problem. Equally, if you install into a sysroot, then relocate the installation, you also wouldn&apos;t run into the issue.

We&apos;ll probably have to leave prefix/exec_prefix unexpanded as a parameter in the postinstalls for nativesdk, then have the package manager set this variable at installation time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42176</commentid>
    <comment_count>2</comment_count>
    <who name="mgwerder">m.gwerder</who>
    <bug_when>2014-04-02 14:42:07 +0000</bug_when>
    <thetext>Maybe related with this:

If the SDK is not installed to the default location, the native sysroot will be relocated during installation.
However, the /var/lib/opkg folder is left where it is and not relocated to the native sysroot. Therefore, the package manager does not work for nativesdk packages.

As a work-around, moving /var/lib/opkg manually into the relocated native sysroot brings package management back to live for the native sysroot.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96836</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-10-24 14:24:27 +0000</bug_when>
    <thetext>Bulk move from 4.99 or 0.00 to 5.99</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>