Bug 12125 - runqemu-gen-tapdevs not working when using directly from build-dir
Summary: runqemu-gen-tapdevs not working when using directly from build-dir
Status: RESOLVED WONTFIX
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: Scripts and Tools (show other bugs)
Version: 2.4
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.5
Assignee: Stephano Cetola
QA Contact:
URL:
Whiteboard: Backport 2.3.3?
Depends on:
Blocks:
 
Reported: 2017-09-25 14:46 UTC by Jose Perez C
Modified: 2018-01-29 20:43 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jose Perez C 2017-09-25 14:46:57 UTC
script runqemu-gen-tapdevs is not working when is used from build directory.

Note: Is working correctly when used from scripts directory 

commit b32174e58e89119e3ca2315030629a6580ccbd52


STEPS TO REPRODUCE: 

1. clone poky 
2. $source oe-init-build-env 
3. Under build directory run
    $  sudo ./../scripts/runqemu-gen-tapdevs 1000 1000 4 tmp/sysroots-components/x86_64/qemu-helper-native/usr/bin

EXPECTED RESULT:

script works correctly and TAP devices are generated 

ACTUAL RESULT:

sudo: runqemu-gen-tapdevs: command not found
Comment 1 Jose Perez C 2017-09-28 14:28:50 UTC
Correction to step 3 

3. Under build directory run
    $  sudo runqemu-gen-tapdevs 1000 1000 4 tmp/sysroots-components/x86_64/qemu-helper-native/usr/bin


Note: below command works correctly 

sudo ./../scripts/runqemu-gen-tapdevs 1000 1000 4 tmp/sysroots-components/x86_64/qemu-helper-native/usr/bin
Comment 2 brian avery 2017-09-28 20:12:35 UTC
This is because the PATH on most modern systems reset for security reasons when you sudo. So, we probably should close this bug and open another bug for documentation to make explicit that you should run it as sudo <absolute path> or <relative path> but should NOT rely on the PATH correctly resolving.

We may also want to add in the documentation bug that for this tool to work, the user needs to have built qemu-helper-native or else the tunctl command (which is what this uses) will not be available.
Comment 3 Stephano Cetola 2018-01-29 20:43:34 UTC
Replaced by Bug 12517.