<?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>14451</bug_id>
          
          <creation_ts>2021-06-25 07:48:49 +0000</creation_ts>
          <short_desc>devtool: deploy-target: failed to preserve ownership with --strip option</short_desc>
          <delta_ts>2021-07-27 15:50:41 +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>Scripts and Tools</component>
          <version>3.1.8</version>
          <rep_platform>x86</rep_platform>
          <op_sys>x86_64</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>3.4 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Florian Amstutz">florian.amstutz</reporter>
          <assigned_to name="Florian Amstutz">florian.amstutz</assigned_to>
          <cc>randy.macleod</cc>
    
    <cc>ross.burton</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>90763</commentid>
    <comment_count>0</comment_count>
    <who name="Florian Amstutz">florian.amstutz</who>
    <bug_when>2021-06-25 07:48:49 +0000</bug_when>
    <thetext>When running &quot;devtool deploy-target&quot; with the --strip option the ownership cannot be preserved during copying the files from &quot;image&quot; to &quot;deploy-target-stripped&quot;:
 
devtool deploy-target --strip --no-host-check --no-preserve less root@....2
cp: failed to preserve ownership for &apos;/home/yocto/sdk/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/less/551-r0/deploy-target-stripped/usr/bin/less&apos;: Operation not permitted
cp: failed to preserve ownership for &apos;/home/yocto/sdk/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/less/551-r0/deploy-target-stripped/usr/bin/lesskey&apos;: Operation not permitted
cp: failed to preserve ownership for &apos;/home/yocto/sdk/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/less/551-r0/deploy-target-stripped/usr/bin/lessecho&apos;: Operation not permitted
cp: failed to preserve ownership for &apos;/home/yocto/sdk/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/less/551-r0/deploy-target-stripped/usr/bin&apos;: Operation not permitted
cp: failed to preserve ownership for &apos;/home/yocto/sdk/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/less/551-r0/deploy-target-stripped/usr/share/man/man1/less.1&apos;: Operation not permitted
cp: failed to preserve ownership for &apos;/home/yocto/sdk/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/less/551-r0/deploy-target-stripped/usr/share/man/man1/lesskey.1&apos;: Operation not permitted
cp: failed to preserve ownership for &apos;/home/yocto/sdk/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/less/551-r0/deploy-target-stripped/usr/share/man/man1/lessecho.1&apos;: Operation not permitted
cp: failed to preserve ownership for &apos;/home/yocto/sdk/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/less/551-r0/deploy-target-stripped/usr/share/man/man1&apos;: Operation not permitted
cp: failed to preserve ownership for &apos;/home/yocto/sdk/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/less/551-r0/deploy-target-stripped/usr/share/man&apos;: Operation not permitted
cp: failed to preserve ownership for &apos;/home/yocto/sdk/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/less/551-r0/deploy-target-stripped/usr/share&apos;: Operation not permitted
cp: failed to preserve ownership for &apos;/home/yocto/sdk/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/less/551-r0/deploy-target-stripped/usr&apos;: Operation not permitted
cp: failed to preserve ownership for &apos;/home/yocto/sdk/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/less/551-r0/deploy-target-stripped&apos;: Operation not permitted
INFO: Successfully deployed /home/yocto/sdk/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/less/551-r0/deploy-target-stripped
 
On the target, the deployed files have the ownership of the eSDK user:
 
root@qemu:~# ls -lah /usr/bin/less
-rwx------    1 1002     1003      116.7K Jun 24 08:53 /usr/bin/less

&quot;devtool deploy-target&quot; without the --strip option works as expected. The files are owned by root.

This has been observed in the Yocto build environment and eSDK environment.
The eSDK has been built and installed on the same machine.
Tested on Ubuntu 16.04, 18.04 and 20.04.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90799</commentid>
    <comment_count>1</comment_count>
    <who name="Florian Amstutz">florian.amstutz</who>
    <bug_when>2021-06-30 11:51:42 +0000</bug_when>
    <thetext>The Bug has been introduced by commit a2db4fa127a3347fc6df31f895fb0b552669119e which added ${WORKDIR}/deploy-* to PSEUDO_IGNORE_PATHS.

By using the name &quot;devtool-deploy-target-stripped&quot; instead of &quot;deploy-target-stripped&quot; deploy-target with --strip works fine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90800</commentid>
    <comment_count>2</comment_count>
    <who name="Florian Amstutz">florian.amstutz</who>
    <bug_when>2021-06-30 15:10:54 +0000</bug_when>
    <thetext>I have provided a patch to the mailing list:
https://lists.yoctoproject.org/g/yocto/message/54019</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91026</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-07-27 15:50:41 +0000</bug_when>
    <thetext>Thanks Florian!

Commit link:
https://git.openembedded.org/openembedded-core/commit/?id=02661f20faf11d0fa2f1874bd423f5d9fa7a31c9</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>