| Summary: | SRC_URI's for git repos should use 'protocol=http' whenever possible | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] Other YP Layers | Reporter: | Evadeflow <evadeflow> | ||||||
| Component: | layers | Assignee: | Richard Purdie <richard.purdie> | ||||||
| Status: | RESOLVED DUPLICATE | QA Contact: | |||||||
| Severity: | enhancement | ||||||||
| Priority: | Low | CC: | mhalstead, poky.bs.watcher, poky.watcher, richard.purdie | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | Future | ||||||||
| Hardware: | x86 | ||||||||
| OS: | Multiple | ||||||||
| Whiteboard: | |||||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||||
| Verified: | Documentation change: | Yes (doc changes required) | |||||||
| Attachments: |
|
||||||||
|
Description
Evadeflow
2012-10-18 14:20:33 UTC
Not every git repository we fetch from is accessed from git.yoctoproject.org. Changing all git:// urls to use protocol=git is therefore clearly a very bad idea since some upstreams may not support http. I'm therefore closing this as invalid since we cannot do what is being requested. (In reply to comment #1) > Not every git repository we fetch from is accessed from > git.yoctoproject.org. Changing all git:// urls to use protocol=git is > therefore clearly a very bad idea since some upstreams may not support http. > > I'm therefore closing this as invalid since we cannot do what is being > requested. Sorry if the description for this issue was misleading. I considered writing "all Yocto Project git repos", or "all HTTP-accessible repos", but I thought this would be understood implicitly. Of course we can't specify 'protocol=http' for repos that are not available via git-over-http. But there are a large number of repos that are, and changing the protocol will allow Yocto and its associated tools to work correctly for a larger number of people. In other words, I'm saying this: whenever there is a choice between cloning a git repository via git protocol or http protocol, http should be preferred, because doing otherwise is an unnecessary impediment to Yocto's adoption in corporate environments. Now that the Yocto Project repos are available via http, is there any upside to leaving things in a state where yocto-bsp does not work for people behind a firewall? Created attachment 893 [details]
Patch to change Yocto Project git SRC_URIs to use http
I was suggesting something like this, for Yocto 1.4...
The patch as it stands breaks all of the HOMEPAGE URLs it changes. (In reply to comment #4) > The patch as it stands breaks all of the HOMEPAGE URLs it changes. D'oh! Nice catch. I will tweak my perl one-liner and re-post... Created attachment 894 [details] Updated patch to change Yocto Project SRC_URIs to use http This was surprisingly tedious. I finally punted and opted for a little brute force. Here are the commands I used to generate this patch from the current master: > grep -rlI "SRC_URI *= *\"git://git.yoctoproject.org/" * | \ > xargs perl -spi -e "s#(SRC_URI *= *\")(git://git.yoctoproject.org/)#\1\2git/#" > grep -rlI "SRC_URI *= *\"git://git.yoctoproject.org/" * | \ > xargs perl -spi -e "s#(SRC_URI *= *\")(git://git.yoctoproject.org/.*)protocol=git#\1\2protocol=http#" I think it's correct now, but please review carefully... We have discussions in three related bugs here. Basically rather than update the metadata to fit some particiular firewall config or set of circumstances, I'd prefer to do this through our mirrors syntax. There may be some tweaking needed to make the mirrors syntax handle this but that should be possible. Closing some bugs so we link to one bug. *** This bug has been marked as a duplicate of bug 9738 *** |