Bug 11390 - recipetool: create: git URLs containing git@ are being mangled internally
Summary: recipetool: create: git URLs containing git@ are being mangled internally
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: Scripts and Tools (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.4 M2
Assignee: Stanley Phoong
QA Contact: Shashwat Pandey
URL:
Whiteboard:
Depends on:
Blocks: 11394
  Show dependency tree
 
Reported: 2017-04-20 03:03 UTC by Paul Eggleton
Modified: 2017-10-04 08:47 UTC (History)
5 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 Paul Eggleton 2017-04-20 03:03:03 UTC
If you specify git@ in a git URL it seems that we're mangling the URL before passing it to git, resulting in the fetch failing:

---------------- snip ----------------
$ devtool add --version 2.4.2 mbedtls "git://git@github.com/ARMmbed/mbedtls.git;protocol=ssh"
NOTE: Fetching git://git///git@github.com/ARMmbed/mbedtls.git;protocol=ssh...
ERROR: Fetcher failure: Fetch command export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"; export SSH_AGENT_PID="2093"; export SSH_AUTH_SOCK="/tmp/ssh-TMxY5yCIKEJ5/agent.2070"; export PATH="/home/paul/poky/poky/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/paul/poky/poky/scripts:/home/paul/poky/poky/build/tmp/work/core2-64-poky-linux/defaultpkgname/1.0-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux:/home/paul/poky/poky/build/tmp/work/core2-64-poky-linux/defaultpkgname/1.0-r0/recipe-sysroot/usr/bin/crossscripts:/home/paul/poky/poky/build/tmp/work/core2-64-poky-linux/defaultpkgname/1.0-r0/recipe-sysroot-native/usr/sbin:/home/paul/poky/poky/build/tmp/work/core2-64-poky-linux/defaultpkgname/1.0-r0/recipe-sysroot-native/usr/bin:/home/paul/poky/poky/build/tmp/work/core2-64-poky-linux/defaultpkgname/1.0-r0/recipe-sysroot-native/sbin:/home/paul/poky/poky/build/tmp/work/core2-64-poky-linux/defaultpkgname/1.0-r0/recipe-sysroot-native/bin:/home/paul/poky/poky/bitbake/bin:/home/paul/poky/poky/build/tmp/hosttools"; export HOME="/home/paul"; git -c core.fsyncobjectfiles=0 ls-remote ssh://git///git@github.com/ARMmbed/mbedtls.git  failed with exit code 128, output:
ssh: connect to host git port 22: Connection refused
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
ERROR: Command 'script -e -q -c "recipetool --color=always create --devtool -o /tmp/devtool6p1w7894 'git://git@github.com/ARMmbed/mbedtls.git;protocol=ssh'  -x /home/paul/poky/poky/build/workspace/sources/devtoolsrcw9ofk69f -N mbedtls -V 2.4.2" /dev/null' failed
---------------- snip ----------------
Comment 1 Stanley Phoong 2017-07-12 09:30:54 UTC
Pushed commit to mailing list for review:
http://lists.openembedded.org/pipermail/openembedded-core/2017-July/139482.html
Comment 3 Shashwat Pandey 2017-10-03 06:54:25 UTC
Verified, issue is fixed.
Comment 4 Shashwat Pandey 2017-10-04 08:47:02 UTC
Verification logs:

a) Checkout to origin/master branch to get the fixes.

b) Perform devtool add --version 2.4.2 mbedtls "git://git@github.com/ARMmbed/mbedtls.git;protocol=https"

c) Verify that the SRC_URI generated with correct URL:

SRC_URI = "git://git@github.com/ARMmbed/mbedtls.git;protocol=https"

d) Verify bitbake mbedtls can build successfully

pokyuser@470685951ad4:/workdir/build$ bitbake mbedtls
Loading cache: 100% |##############################################################################################################################################################| Time: 0:00:00
Loaded 1299 entries from dependency cache.
Parsing recipes: 100% |############################################################################################################################################################| Time: 0:00:00
Parsing of 819 .bb files complete (818 cached, 1 parsed). 1276 targets, 44 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.35.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "universal"
TARGET_SYS        = "i586-poky-linux"
MACHINE           = "qemux86"
DISTRO            = "poky"
DISTRO_VERSION    = "2.4"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta
meta-poky
meta-yocto-bsp    = "master:fcdfe09d9cc4e2977bd602dfd18f729cd9f6d73d"
workspace         = "<unknown>:<unknown>"

Initialising tasks: 100% |#########################################################################################################################################################| Time: 0:00:00
Checking sstate mirror object availability: 100% |#################################################################################################################################| Time: 0:00:00
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: mbedtls-2.4.2+git999-r0 do_populate_lic: mbedtls: No generic license file exists for: Unknown in any provider
NOTE: mbedtls: compiling from external source tree /workdir/build/workspace/sources/mbedtls
NOTE: Tasks Summary: Attempted 537 tasks of which 525 didn't need to be rerun and all succeeded.

Summary: There was 1 WARNING message shown.