Bug 9966

Summary: Suggested fleshing out of the do_install documentation
Product: [Documentation] Reference Reporter: ulfalizer
Component: handbookAssignee: Scott Rifenbark <srifenbark>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Undecided CC: bluelightning, poky.doc.watcher, poky.watcher, srifenbark
Version: 2.3   
Target Milestone: 2.2 M3   
Hardware: x86   
OS: Multiple   
Whiteboard: 18 July 2016: IN PROGRESS REVIEW
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Done (doc changes complete)

Description ulfalizer 2016-07-18 09:13:48 UTC
'8.1.12. do_install' could be extended as follows to make it clearer that the working directory is ${B} and to warn against a common problem I've seen:


  8.1.12. do_install
  
  Copies files that are to be packaged into the holding area ${D}. Runs with the
  current working directory set to ${B}, which is the compilation directory.
  
  Note {
  
  When installing files, be careful not to set the owner and group IDs of the
  installed files to unintended values. Some methods of copying files, notably
  recursive 'cp', can preserve the UID and/or GID of the original file, which is
  usually not what we want. The host-user-contaminated QA check checks for files
  that probably have the wrong ownership.
  
  Safe methods for installing files include the following:
  
    * The 'install' utility. This should be the preferred method.
    * 'cp' with --no-preserve=ownership
    * 'tar' with --no-same-owner (see bin_package.bbclass for an example)
  
  }
Comment 1 Scott Rifenbark 2016-07-18 19:20:15 UTC
Ulf, 

See http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#ref-tasks-install for the changes and report back... thanks,

Scott
Comment 2 ulfalizer 2016-07-18 19:33:28 UTC
Maybe host-user-contaminated could use code highlighting like in '5.6.7. QA Check Changes'. Looks good otherwise.

Looks like host-user-contaminated isn't mentioned in '7.62. insane.bbclass'. I could open a separate ticket for that later.

Cheers,
Ulf
Comment 3 Scott Rifenbark 2016-07-18 20:40:55 UTC
Ok - I added that formatting - http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#ref-tasks-install.

If you want to open a separate ticket for the other issue please do so. 

I am going to set this bug to RESOLVED and place the doc flag in "Done."

Scott