summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: bitbake: fetch2/gitsm: Fix fetch when the repository contains ↵Derek Straka2017-01-121-5/+2
| | | | | | | | | | | nested submodules This fixes a problem when the repository contains multiple levels of submodules via a resursive submodule init. (Bitbake rev: bc57798ff39cae5ffea194c867e07136f7b6f3ec) Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/gitsm: Fix when repository change submodulesFelipe F. Tonello2017-01-121-1/+1
| | | | | | | | | | | | | | This fix a problem when checking out a commit that changes the submodules previously checkout. Example: Recipe uses branch A and then it updates to use branch B, but branch B has different submodules dependencies then what branch A previously had. (Bitbake rev: 12f6c0651af8bd5d6efb751690571cf2fcd3eeb0) Signed-off-by: Felipe F. Tonello <eu@felipetonello.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/wget: fallback to GET if HEAD is rejected in checkstatus()Ross Burton2016-09-231-23/+49
| | | | | | | | | | | | | | | | | | The core change here is to fall back to GET requests if HEAD is rejected in the checkstatus() method, as you can't do a HEAD on Amazon S3 (used by Github archives). This meant removing the monkey patch that the default method was GET and adding a fixed redirect handler that doesn't reset to GET. Also, change the way the opener is constructed from an if/elif cluster to a conditionally constructed list. (Bitbake rev: b993d96203541cd2919d688559ab802078a7a506) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 6ec70d5d2e330b41b932b0a655b838a5f37df01e) Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch: use orig localpath when calling orig methodChristopher Larson2016-01-081-1/+1
| | | | | | | | | | | | | | | | When a mirror tarball is fetched, the original fetch method is called, which unpacks the mirror tarball. After the original method is called, it checks the localpath of the mirror tarball rather than the clone path, which isn't ideal, particularly if the mirror tarball was removed due to being out of date. We know the original fetch method will do what it needs to do to get its content in the form it needs from the mirror tarball, so we can use its localpath instead. (Bitbake rev: 022fe4481dc80121abb04e8a2b357722bc806475) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetcher: svn: Add support for checkout to a custom pathJens Rehsack2015-10-271-2/+7
| | | | | | | | | | | Add support for the Subversion fetcher to checkout modules to a custom path than the module name to avoid checkout is always module - svn is path based and tag/branch-checkout might break builds because of invaid path specs. (Bitbake rev: af88f538e61afa1b115be4d7afe00d8477f61750) Signed-off-by: Jens Rehsack <sno@netbsd.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/hg: Include missing errno importLogan Buchy2015-10-161-0/+1
| | | | | | | | | | errno.ENOENT checked if deletion of the fullmirror fails. Exception was thrown since module not imported (Bitbake rev: d92ebfc34b69ad5df2d151e6b8299fbb5afa3e5f) Signed-off-by: Logan Buchy <logan.buchy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: bb.fetch2.git: Import errno moduleRomain Perier2015-09-191-0/+1
| | | | | | | | | | Currently this module is dereferencing errno.ENOENT but the python module "errno" is not imported, which causes a crash when fetching from a git repository. (Bitbake rev: 93e4c9bb2393b1074f5a01e7eaaac742a59d8086) Signed-off-by: Romain Perier <romain.perier@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb.fetch2.{git, hg}: remove tarball if it needs updatingChristopher Larson2015-09-182-8/+12
| | | | | | | | | | | | | | | | | | | We were maintaining state in the form of ud.repochanged to determine whether we need to write the tarball in the case where the tarball already exists, but this state is maintained only in memory. If we need to update the git repo, set ud.repochanged to True, and then are interrupted or killed, the tarball will then be out of date. Rather than maintaining this state, simply remove the out of date tarball when we update the git repo, and it will be re-created with updated content in build_mirror_data. [YOCTO #6366] (Bitbake rev: eaaa81393f181432c8586b17ade623f42c9fed2e) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch.py: Fix recursion failure in url mappingMark Hatle2015-09-181-4/+10
| | | | | | | | | | | | | | | Instead of reproducessing the same line over and over and over, we remove the current line from the mirror list. This permits us to re-evaluate the list while excluding all matches that have previousily occured. Without this fix, adding this test results in a failure: RuntimeError: maximum recursion depth exceeded in cmp (Bitbake rev: 24a8e9a5b0ba145ae589178d74365c986ebca325) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/__init__.py: uri_replace regex handlingMark Hatle2015-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | We should only substitute one time. If we do it without a max count, we can end up matching over and over. Before this change: https://downloads.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz with a mirror of https://.*/[^/]* http://AAAA/A/A/A/ would end up either recursing indefinitely or result in: http://AAAA/A/A/A/A/A/A/A/A/A/bitbake-1.0.tar.gz (Bitbake rev: 4d254e02e2867dd9a6663508c8ca9f2733af71a8) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb.fetch: don't remove the clone when an update failsChristopher Larson2015-09-041-2/+4
| | | | | | | | | | | When our clone exists, but is out of date, and the attempt to update it fails, we don't necessarily want to remove the entire clone, particularly if it's a large repository. (Bitbake rev: 19af272ba5256653edeff6acbceeb09e3e478d61) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb.fetch: handle checksums consistently for mirrorsChristopher Larson2015-09-041-3/+4
| | | | | | | | | | | | If the main fetch method doesn't support checksums, the user will not be defining them in the recipe, so we don't want to check them for premirrors/mirrors either. This ensures that we never error due to missing checksums on a git mirror tarball. (Bitbake rev: 24c79bbed361b37f12d3351af13602e3d4386f4c) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb.fetch.git: remove leading '.' from gitsrcnameChristopher Larson2015-09-041-1/+4
| | | | | | | | | | | When using an absolute file URI, there's no host, and the path starts with '/', the dir under ${DL_DIR}/git2/ ends up starting with '.', so is hidden. Remove any leading '.' to fix this. (Bitbake rev: 8dce6964d56b36a77fb113f2ad496cc992a5ff36) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Fix default function parameter assignment to a listPaul Eggleton2015-08-191-10/+13
| | | | | | | | | | | | | | With python you should not assign a list as the default value of a function parameter - because a list is mutable, the result will be that the first time a value is passed it will actually modify the default. Reference: http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments (Bitbake rev: 7859f7388f2e3f675d0e1527cfde18625f36f637) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: wget.py: fix incorrect regexesAlexander Kanavin2015-08-011-2/+2
| | | | | | | | | | | [\.-_] means "any character between . and _" What was meant here is certainly "any character from the three characters .-_" (Bitbake rev: af13eaba627f199f91c048c435b9dbe19c79527f) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/wget.py: latest_versionstring now returns (version, revision)Aníbal Limón2015-07-221-6/+6
| | | | | | | | | | | | | | | | Now latest_versionstring method returns (version, revision) for comply the new return convention needed by SCM's like git get the current revision. bb/tests/fetch.py: Updated wget latest_versionstring test for comply new convention. [YOCTO #7605] (Bitbake rev: 8d454646cbe1b04758ca178d8c6fcfd02b818b7b) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/git.py: latest_versionstring now returns (version, revision)Aníbal Limón2015-07-221-6/+12
| | | | | | | | | | | | | | | | We need to know the revision associated with the upstream version in SCM like git, this change broke return convention, oe-core recipeutils get_recipe_upstream_version need to be updated. tests/fetch.py: Updated git latest_versionstring test for comply new convention. [YOCTO #7605] (Bitbake rev: fd175dc90024c503134c11cbd83e77d88c406ac8) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/git.py: latest_versionstring search in all tagsAníbal Limón2015-07-221-1/+1
| | | | | | | | | Don't limit the tag search for only tags end with ^{}. (Bitbake rev: 7006ab313766344cf33481228465082ed5977d28) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/wget.py: checkstatus disable SSL cert validation.Aníbal Limón2015-07-121-2/+18
| | | | | | | | | | | Since Python 2.7.9 ssl cert validation is enabled by default see PEP-0476, this causes verification errors on some https servers so disable by default. (Bitbake rev: e177170200ece76b36e3f7d5597651fdef67736f) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/wget.py: checkstatus fix using proxy handlerAníbal Limón2015-07-121-4/+16
| | | | | | | | | Only use ProxyHandler opener when exists proxies in env. (Bitbake rev: 0f062c5d99e12ce20c0e46a8e602448032144ff6) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/wget.py: Add support of connection cache in checkstatus.Aníbal Limón2015-07-122-5/+138
| | | | | | | | | | | | | fetch2/__init__.py: Add connection_cache param in Fetch __init__. In order to pass connection cache object to checkstatus method. [YOCTO #7796] (Bitbake rev: 9fa6407e6cefe66c77467419a8040d6957a6bb01) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/sftp: Set BatchMode=yes as argument to sftpOlof Johansson2015-07-121-1/+1
| | | | | | | | | | | Set BatchMode=yes instead of PasswordAuthentication=no. This will make sftp fail immediately, not only when SSH requires interactive authentication, but also on errors related to host key verifcation. (Bitbake rev: 31305853a177735cc9c4553ea8905cd0acfcb100) Signed-off-by: Olof Johansson <olof.johansson@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: git.py: create a branch when checkoutRobert Yang2015-07-121-0/+7
| | | | | | | | | | * Create a branch and named as upstream branch when checkout source * Set the branch to track remote branch. (Bitbake rev: 1ba20e4fe9c884515b200589fe379ad5eeda10bd) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Add fetch parameter to checkstatusyocto-1.9_M1Aníbal Limón2015-07-094-13/+13
| | | | | | | | | | In order to pass connection cache object to checkstatus function add fetch parameter. (Bitbake rev: fbb9c6f5538084e125b58118a86968908e6f895b) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/__init__.py: Add FetchConnectionCache classAníbal Limón2015-07-091-0/+36
| | | | | | | | | | FetchConnectionCache class acts as a container for socket connections useful when implement connection cache into fetcher modules. (Bitbake rev: 454da2cd17539ceb9caad6d76f034757e44ee12f) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Checkout to correct ref begore init and update submodulesFelipe F. Tonello2015-07-071-0/+1
| | | | | | | | | | | | This is nessary when specified branch with submodules is different then default (master) branch. [YOCTO #7771] (Bitbake rev: f7b0b5e33e00f3ce0744322eee93835ee76bf184) Signed-off-by: Felipe F. Tonello <eu@felipetonello.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: fetch2/hg.py: fix unpack error and mirror tarballRobert Yang2015-06-271-13/+66
| | | | | | | | | | | | | | | | | | Fixed: * do_unpack error: abort: repository DL_DIR/hg/vim.googlecode.com/hg/vim not found! * The mirror tarball doesn't work - Add the build_mirror_data to create the tarball - Unpack the mirror tarball when needed * The hg files will put in the dir like git: DL_DIR/hg, it was DL_DIR/hg/path/to/src/uri/path in the past. (Bitbake rev: 378647281ae883dd726f1e1b775dd35ef6a0e8d1) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch/perforce: Fix single file checkoutsRichard Purdie2015-06-271-1/+1
| | | | | | | | | | | Fetching directories with p4 worked but single files did not. This patch from Helmut Auer (helmut.auer@harman.com) fixes that issue. [YOCTO #7891] (Bitbake rev: 39da6579901c62a83ed9319c2016c58fbbc108fe) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Add explict getVar param for (non) expansionRichard Purdie2015-06-233-4/+4
| | | | | | | | | | | | | | Rather than just use d.getVar(X), use the more explict d.getVar(X, False) since at some point in the future, having the default of expansion would be nice. This is the first step towards that. This patch was mostly made using the command: sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *` (Bitbake rev: 659ef95c9b8aced3c4ded81c48bcc0fbde4d429f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch/hg: Disable checksums for archived downloadsAsh Charles2015-05-261-0/+7
| | | | | | | | | | | | | | | | Like the Git fetcher, the Mercurial fetcher shouldn't expect recipes to provide a checksum. As described [1], recipes using a mercurial fetcher that don't provide a checksum will fail in a the repository has previously been downloaded and archived. Credit to Rafaël Carré for figuring out the bug. [1] https://www.mail-archive.com/openembedded-devel@lists.openembedded.org/msg41328.html (Bitbake rev: 2df35a25b4968f64adfa673d5b73442c1a30829d) Signed-off-by: Ash Charles <ashcharles@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/git.py: Add gitpkgv_revision alternative version informationMike Looijmans2015-05-241-0/+25
| | | | | | | | | | | | | | | | gitpkgv_revision returns a sortable revision number that can be used in the PKGV variable for example. To mimic meta-openembedded gitpkgv behaviour to provide a sortable revision numner, one could set the following: PKGV = "1.0+${@bb.fetch2.get_srcrev(d, 'gitpkgv_revision')}" This would yield a package version like "1.0+69+fb5eb80". (Bitbake rev: 989c08f62aff7b707c25c692c23284f16506b7bc) Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/__init__.py: Make get_srcrev output configurableMike Looijmans2015-05-241-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | The idea here is to support package version numbering similar to gitpkgv in meta-openembedded. This commit is the first step towards such functionality. The original plan was to add a "get_pretty_srcrev" method to the fetcher, as per Richard's suggestion [1]. While writing this, I noticed that it would become a copy of get_srcrev with only two lines changed. So to create something more Pythonic than a boolean argument and conditionals around the calls to the fetcher's sortable_revision, I just made the method to be called on the fetcher an argument to the method. Defaulting to 'sortable_revision' prevents affecting existing code. Now if the git fetcher were to implement, say 'gitpkgv_revision' one could set the following in a recipe: PKGV="1.2+${@bb.fetch2.get_srcrev(d, 'gitpkgv_revision')}" and this would yield the same result as gitpkgv's GITPKGV variable. See for the discussion leading to this change: [1] http://lists.openembedded.org/pipermail/openembedded-core/2015-January/100345.html (Bitbake rev: 2f1f4483493cc290f5d2c07f9906e90eaea2f4c1) Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch/git: Fix uri in git checkstatusMarcin Smoczyński2015-05-191-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Pass proper repository url without arguments after a semicolon. Executing checkuri on a rule with git repository in SRC_URI does not report errors when working offline because wrong repository url is passed to the ls-remote command. For example "bitbake -c checkuri glibc" command executes: "git -c core.fsyncobjectfiles=0 ls-remote git://sourceware.org/git/glibc.git;branch=release/2.21/master" command in a shell subprocess to determine if url is valid. Shell subprocess executes in fact 2 commands: "git -c core.fsyncobjectfiles=0 ls-remote git://sourceware.org/git/glibc.git" and "branch=release/2.21/master" First one returns 127 or 128 depending on error but second one returns 0 because it is just env variable setup. Therefore we're not catching connection error. [YOCTO #7558] (Bitbake rev: efa44d04137977f883db4a643b0f774e91514722) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/hg.py: add clean functionRobert Yang2015-05-191-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed when bitbake vim -ccleanall: File: '/path/to/bitbake/lib/bb/fetch2/__init__.py', lineno: 1462, function: clean 1458: def clean(self, urldata, d): 1459: """ 1460: Clean any existing full or partial download 1461: """ *** 1462: bb.utils.remove(urldata.localpath) 1463: 1464: def try_premirror(self, urldata, d): 1465: """ 1466: Should premirrors be used? File: '/path/to/bitbake/lib/bb/utils.py', lineno: 633, function: remove 0629: subprocess.call(['rm', '-rf'] + glob.glob(path)) 0630: return 0631: for name in glob.glob(path): 0632: try: *** 0633: os.unlink(name) 0634: except OSError as exc: 0635: if exc.errno != errno.ENOENT: 0636: raise Exception: OSError: [Errno 21] Is a directory: '/path/to/downloads/hg/vim.googlecode.com/hg/vim' (Bitbake rev: 02763306662e15a4750395e5eab64ba98d1f9939) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Improve mirror building function error handlingRichard Purdie2015-05-161-1/+3
| | | | | | | | | | | | | | | First, when building mirror urls we don't do any fetching so we should never be calling clean functions. Currently, if a mirror url fails, we don't process it further to see if there are any mirrors of the mirror. We should do this even when the mirror url fails, else we may miss out on valid/useful mappings, particularly in the case of file:// urls. (Bitbake rev: b7fd3ec9994f664b17fc86423e6e7afac07e897b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Allow GIT_SMART_HTTP to be passed throughLiam R. Howlett2015-05-161-0/+1
| | | | | | | | | | Allow GIT_SMART_HTTP to be passed through to the fetch command so that servers that cannot use GIT_SMART_HTTP can be used by the fetcher. (Bitbake rev: e5c97a85bed0436d48eeaac2e32962cfb5371d2f) Signed-off-by: Liam R. Howlett <Liam.Howlett@WindRiver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: fetch2/git: Add URL when latest_revision generates an ↵Mariano Lopez2015-05-151-1/+2
| | | | | | | | | | | | | | | | exception. The URL is not sent when _latest_revision generates and exception. When performing the sanity checks it is not possible to know the URI that failed. This add the URL when latest_revision generates an exception. [YOCTO: #7592] (Bitbake rev: 9f2115b07a55cb14e4a74dc6fbd3707c28a234d0) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/git: ensure the unpacked origin remote points upstreamPaul Eggleton2015-05-151-14/+17
| | | | | | | | | | | | | | | | | If you're interested in using the checked out repository for development (e.g. in OE with devtool) then you ideally want the origin remote to point to the repository it was fetched from, so just set that after cloning. (As part of this I did a minor refactor so we have one function to generate the repository URL, which was already in two places.) Fixes [YOCTO #7756]. (Bitbake rev: 80ecd1c54d4c748cee3a7ce0d64013a346e7671e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Add BB_ALLOWED_NETWORKS supportLiam R. Howlett2015-05-121-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | BB_ALLOWED_NETWORKS is a list of hosts that the fetcher will be allowed to use when BB_NO_NETWORK is not set. If BB_NO_NETWORK is set, then networking is still disabled. If BB_ALLOWED_NETWORKS is not set, the behaviour remains the same as today. If BB_NO_NETWORK is NOT set, and BB_ALLOWED_NETWORKS is configured, then only the hosts in the list are usable by the fetcher. eg: BB_ALLOWED_NETWORKS="yoctoproject.org git.gnu.org" The fetcher will be able to download from yoctoproject.org, git.gnu.org, but not ftp.gnu.org or any other hostname that is not in the list. There is also limited support for wildcards on the beginning of the hosts, so BB_ALLOWED_NETWORKS="*.gnu.org" with match git.gnu.org and ftp.gnu.org as well as foo.git.gnu.org (Bitbake rev: c7263096ba31ba45daeeb9de90c1cb9ebef24a28) Signed-off-by: Liam R. Howlett <Liam.Howlett@WindRiver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch/hg: support submodulesDaniel McGregor2015-05-121-19/+36
| | | | | | | | | | | | | | | Use hg clone and hg pull to copy the source into the build directory rather than taring up the cloned repository and untarring in the destination. This allows submodules to be cloned. While here, make the default behaviour keep the hg scm data to match the behaviour of the git fetcher. (Bitbake rev: f002b1ca80cb542a4ed0c06c53c914cd5e076565) Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Allow git to use a different CA Bundle with private keysJason Wessel2015-05-121-0/+1
| | | | | | | | | | | | | | | | | | Setting BB_ENV_EXTRAWHITE to include GIT_SSL_CAINFO is enough to get "git ls-remote" to work for recipe parsing but it is not enough to get the fetcher to clone properly. This is because the fetcher has its own idea about what variables should be exported in the environment for some operations. It is desirable to use alternate CA Bundles for internal testing prior to using public keys for https, so we should allow the GIT_SSL_CAINFO to pass through. (Bitbake rev: 40ff92282bbf32cf644b021bf7cbb1f393dbb856) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch/git: Remove a possible trailing '/' in subpathAnders Darander2015-04-171-1/+1
| | | | | | | | | | | | If the subpath parameter to the git fetcher ends with a trailing '/', bb.utils.prunedir() will be called on '/'... Fixes [YOCTO #7620]. (Bitbake rev: 380a3fb372c8b0a53dd7528562e6e7a222dc76ef) Signed-off-by: Anders Darander <anders@chargestorm.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Revalidate checksums, YOCTO #5571Clemens Lang2015-03-091-10/+102
| | | | | | | | | | | | | | | | | | | | | | | [YOCTO #5571] -- https://bugzilla.yoctoproject.org/show_bug.cgi?id=5571 The following workflow (whether accidentally or deliberately) would previously not result in a checksum error, but would be helpful to do so: - Write a recipe with correct checksums - Fetch the sources for this recipe using bitbake - Change the checksums Since the bitbake fetcher writes a done stamp after the initial download and does not verify the checksums again (even if they are changed in the recipe afterwards), the change of checksums is silently ignored. Fix this without the overhead of computing the checksums from scratch on every do_fetch by storing them in pickled format in the done stamp and verifying that they still match those in the recipe. (Bitbake rev: fbd4a0d422cf7f43db2f9eab2e47c41246a9031e) Signed-off-by: Clemens Lang <clemens.lang@bmw-carit.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: wget remove scape of - in regexes don't neededAníbal Limón2015-02-161-9/+9
| | | | | | | (Bitbake rev: 8fa43245351f3ec0a5007b2742c08b7ef98e7879) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: wget _modelate_version improvmentsAníbal Limón2015-02-161-3/+3
| | | | | | | | | Fix sustition for rc, beta and alpha releses from -N to N weight. (Bitbake rev: 63a9e60a6d80cfd2693ec1a6359785dc19f98e1f) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: wget latest_versionstring improvments in get version by dirAníbal Limón2015-02-161-71/+37
| | | | | | | | | | | | | | Add support for scan every version directory using _check_latest_version makes code more robust because sometimes upstream projects publish new directories without files, causing don't find version. To support this new behaviour remove _check_latest_dir and replace for _check_latest_version_by_dir, (Bitbake rev: 1a75b3707743c32eec9d2cf566fb6bbea9f73784) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: wget add _check_latest_version_by_dirAníbal Limón2015-02-161-6/+46
| | | | | | | | | | | | | | | | | | | | | Add _check_latest_version_by_dir this function provides support for scan every directory newer than current dir in order to get latest_versionstring, example: http://somedoamin.com/project/v2.1/ http://somedoamin.com/project/v3.0/ Change return of _vercmp from True/False to -1/0/1 to provide test when current directory is equal to newer directory this helps to scan the same directory to get minor versions, example: http://somedoamin.com/project/v2.1/project-v2.1.2.tgz http://somedoamin.com/project/v2.1/project-v2.1.6.tgz (Bitbake rev: 5f7c5eb218a221165f59a0f4dd48d2d97f756193) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: wget latest_versionstring _check_latest_version improvmentsAníbal Limón2015-02-161-26/+25
| | | | | | | | | | In order to reduce code duplication now compile package_regex in _init_regexes instead of make this decision at _check_latest_version, (Bitbake rev: e7284e3ad0e7dd91ed59dfbf8450ef62e89c7e54) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: wget latest_versionstring improve _parse_pathAníbal Limón2015-02-161-20/+24
| | | | | | | | | | | Add support for get group only if exist in regex, this enables to use this function in _check_latestversion regardless if the regex is generic or specified by REGEX_URI. (Bitbake rev: 1127af5b8c458929c4685b0326f86870ed09442e) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetcher: use os.path.splitext() instead of string.split()Ross Burton2015-01-211-3/+3
| | | | | | | (Bitbake rev: 1689edd35477a126bfbf4bd3257c4f1f9e16f20d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>