summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/__init__.py
Commit message (Collapse)AuthorAgeFilesLines
...
* bitbake: fetch2: fix unpacking of deb packagesStephano Cetola2016-06-161-1/+1
| | | | | | | | | | | Python 3 changed the return value of check_output to binary rather than a string. This fix decodes the binary before calling splitlines, which requires a string. (Bitbake rev: 1072beefe172423873a22a10c7171e10d0401e1e) Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: fix unpacking of deb packagesPaul Eggleton2016-06-031-1/+12
| | | | | | | | | | | | | | | deb packages in modern Debian versions have the data tarball compressed with xz rather than gzip, and thus explicitly extracting data.tar.gz fails. Unfortunately ar doesn't support wildcards matching items to extract, so we have to find out what the name of the file is first and then extract it, relying on tar to figure out how to unpack it based on the filename rather than doing it with pipes and making that determination ourselves. (Bitbake rev: 17ff08d225a8fa7faffd683c028369574954fba9) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Convert to python 3Richard Purdie2016-06-021-20/+16
| | | | | | | | | Various misc changes to convert bitbake to python3 which don't warrant separation into separate commits. (Bitbake rev: d0f904d407f57998419bd9c305ce53e5eaa36b24) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Drop futures usage since we're python 3Richard Purdie2016-06-021-2/+0
| | | | | | (Bitbake rev: bf25f05ce4db11466e62f134f9a6916f886a93d9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch: Use OrderedDict for url parametersRichard Purdie2016-05-131-2/+3
| | | | | | | | Without this, the dict can reorder causing sanity test failures. (Bitbake rev: ca8c91acc9396385834b266d4e8b84d917e5e298) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Update logger.warn() -> logger.warning()Richard Purdie2016-05-111-18/+18
| | | | | | | | | | python deprecated logger.warn() in favour of logger.warning(). This is only used in bitbake code so we may as well just translate everything to avoid warnings under python 3. Its safe for python 2.7. (Bitbake rev: 676a5f592e8507e81b8f748d58acfea7572f8796) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: fetch2: Safer check for BB_ORIGENV datastoreLeonardo Sandoval2016-05-061-1/+2
| | | | | | | | | | | | | BB_ORIGENV value on the datastore can be NoneType thus raising an AttributeError exception when calling the getVar method. To avoid this, a check is done before accesing it. [YOCTO #9567] (Bitbake rev: f368f5ae64a1681873f3d81f3cb8fb38650367b0) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: export DBUS_SESSION_BUS_ADDRESS to support authentication ↵Ross Burton2016-04-291-2/+3
| | | | | | | | | | | | | | | | | | agents Some users may want to use authenticated SSH connections with credentials stored in a keyring, such as gnome-keyring. These typically need a DBus session bus connection, so pass DBUS_SESSION_BUS_ADDRESS into the fetcher environment. To avoid the user needing to set it in their local.conf (which wouldn't be usable) or adding it to the environment-cleansing whitelist (which would potentially impact builds) allow the variables being passed to the fetchers to come from the data store (first) or the original environment (second). (Bitbake rev: 20ad1ea87712d042bd5d89ce1957793f7ff71da0) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: BB_ALLOWED_NETWORKS should not care about port numbersOlof Johansson2016-04-031-0/+1
| | | | | | | | | | | | | | | | | Bitbake would fail to classify the following URL as belonging to a allowed network, because of the port number in the url. BB_ALLOWED_NETWORKS = "*.example.com" SRC_URI = "http://git.example.com:8080/foo.tar.gz" Since protocols aren't specified in the BB_ALLOWED_NETWORKS variable, it's reasonable to believe that this should work regardless of protocol being used. (Bitbake rev: ff603df23037e10fb2cfdf150429cba3f65072cd) Signed-off-by: Olof Johansson <olof.johansson@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Ensure that incorrect checksumed files are always renamedRichard Purdie2016-03-311-8/+21
| | | | | | | | | | | | | | There are some codepaths where the file checksum is verified and can be found to mismatch but the 'rename' logic doesn't kick in. If code relies on the presence of a file for the checksum having been checked (e.g. uninative.bbclass) then it can be used when the checksum hasn't matched. Therefore rename the file whenever an invalid checksum is encountered. (Bitbake rev: 69ef6c8a9db02bfa0e3fac72481ec26586a29a01) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Handle lockfiles for file:// urls redirected to mirrorsRichard Purdie2016-03-261-0/+8
| | | | | | | | | | | | | | | | | We recently dropped lockfiles for file:// urls which in itself makes sense. If a file url redirects to something like an http:// mirror, we'd have no lock taken for the original file and could race against others trying to download the file. We therefore need to ensure there is a lock taken in the mirror handling code. This adds code to take such a lock, assuming it isn't the same lock as the parent url. (Bitbake rev: 913b6ce22cd50eac96e8937c5ffc704bfce2c023) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cache: Make BB_DONT_CACHE variable externalMarkus Lehtonen2016-03-231-1/+1
| | | | | | | | | | | | | | This makes it possible to prevent a recipe to be cached, and thus, parsed every time. Use with care. [YOCTO #8853] (Bitbake rev: 78335c1fbe5266116700c2413aac28b00423a75b) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Make SRC_URI[md5sum] and SRC_URI[sha256sum] expand their valuesPeter Kjellerstedt2016-03-091-2/+2
| | | | | | | | | | | | | | | | | | | For some reason, the values for SRC_URI[md5sum] and SRC_URI[sha256sum] were not being expanded. That lead to the following code not working as expected: SRC_URI = "http://.../${PN}-${PV}.tar.gz" MD5SUM = "123abc..." SHA256SUM = "abcd1234..." SRC_URI[md5sum] = "${MD5SUM}" SRC_URI[sha256sum] = "${SHA256SUM}" (Bitbake rev: ba011470df0ea8bd89f01c0b02ec4b3969e60ce7) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Fix unpack for absolute file urlsRichard Purdie2016-03-021-1/+4
| | | | | | | | | The previous commit breaks absolute pathnames in file:// urls, this fixes it. (Bitbake rev: b8113a1800687a37a26ac28deafdbafd74cc138e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: fixes copying of file://dir; subdir=foo, bug 6128 and bug 6129Alexander Shashkevich2016-03-021-37/+24
| | | | | | | | | | | | | | When in SRC_URI appears file://dir;subdir=foo unpacker copies 'dir' to ${WORKDIR}, not ${WORKDIR}/foo as it should be. These changes are fixing following bugs as well: Bug 6128 - Incorrect wildcard unpack behaviour in fetcher Bug 6129 - Local directories unpack to a different location than local files (Bitbake rev: e659a3b0c2771679057ee3e13cd42e6c62383ff2) Signed-off-by: Alexander Shashkevich <alex@stunpix.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/npm: Enable fetcherRichard Purdie2016-02-281-0/+2
| | | | | | | | For some reason the enablement piece of the patch went missing, add it. (Bitbake rev: 0270b5a3873ed0aeca3a66198c87a6164fb644b8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Skip lockfiles and donestamps for local filesRichard Purdie2016-02-281-4/+18
| | | | | | | | | | | | For local files, there are no races with downloads, we don't need ".done" stamps and we don't need lockfiles. This considerably cleans up DL_DIR and all the pointless ".done" files as well as removes stalls over local files with the same name. (Bitbake rev: 48e903745db578d9b9b425a8d411c1369df0eb94) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/__init__.py: Error if lockfile path invalidRichard Purdie2016-02-281-1/+4
| | | | | | | | | Rather than create ".lock" and ".done" files with no name, error, forcing us to fix the cases where this is a problem. (Bitbake rev: 81158071508cc68c39db7d501370872f44d335cc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/__init__: Fix decodeurl to better handle urls without pathsRichard Purdie2016-02-281-2/+5
| | | | | | | | | | | | | | | | | | | | | If we specify urls such as npm://somehost;someparams the fetcher currently does a poor job of handling mirrors of these urls due to deficiencies in the way decodeurl works. This is because "somehost" is returned as a path, not a host. This tweaks the code so that unless its a file url, the host is returned correctly. This patch also adds test cases for these urls to the exist set of test urls. We need to tweak the URI() class since this thinks this is a relative url which is clearly isn't. We also need to handle the fact that encodeurl will error if passed a url of this form (it would want the path to be '/'. (Bitbake rev: 83203cd2e677706e0111892a7843b83263cb8bd9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: FileChecksumCache: add get_checksums() methodMarkus Lehtonen2016-02-181-44/+1
| | | | | | | | | | Move the local file checksum functionality from bb.fetch2 into bb.checksum module. (Bitbake rev: 4f60933283f377d68f191db849dac6c1dc7a0aed) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb/cache: drop some unused argumentsMarkus Lehtonen2016-02-181-5/+5
| | | | | | | | | | Drop unused 'd' argument from the cache save methods, simplifying the API. (Bitbake rev: 81bc1f20662c39ee8db1da45b1e8c7eb64abacf3) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb: Add expansion parameter to getVarFlagRichard Purdie2016-02-041-3/+3
| | | | | | | | | | | | | | | This sets the scene for removing the default False for expansion from getVarFlag. This would later allow True to become the expand default. On the most part this is an automatic translation with: sed -e 's:\(\.getVarFlag([^,()]*, [^,()]*\)):\1, False):g' -i `grep -ril getVar *` There should be no functional change from this patch. (Bitbake rev: 7c3b99c6a716095af3ffce0b15110e91fb49c913) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Simplify logic in verify_checksum()Peter Kjellerstedt2016-01-301-20/+10
| | | | | | | | | | | The recent change to verify_checksum() to only show checksum warnings if no checksums are supplied made it possible to simplify the logic a bit more. (Bitbake rev: 1dc00b874acae44bbba9d8028d94f7bc97ddcd76) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Don't show checksum warnings if a single checksum was suppliedRichard Purdie2016-01-241-3/+1
| | | | | | | | | | If one checksum is supplied to a SRC_URI, we really don't want to show warnings about the other type which isn't present as one checksum is really good enough for most cases. (Bitbake rev: 43358a9b595b2928458a5f463cf1949394160c3a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/__init__.py: Add support for 7-ZipJuro Bystricky2016-01-061-0/+4
| | | | | | | | | | | | | | 7-Zip is a file archiver claiming the highest compression ratio. This patch allows using 7-Zip commpressed files in bitbake recipes. Two common formats are supported: SRC_URI = "file://abc.tar.7z" SRC_URI = "file://abc.7z" (Bitbake rev: 7120f5bfaae54e91bc95da5667831424724ce613) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch: use orig localpath when calling orig methodChristopher Larson2015-12-181-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: 1732ad65d6c7d67b7d07cb30c074f5016adadbea) 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: fetch2: Remove crazy code in unpackRichard Purdie2015-11-161-3/+0
| | | | | | | | | | This looks reasonable until you realise self.localpath is a function. Data expansion of something which isn't a string is the original value so this code just wastes CPU cycles and makes no sense. Remove it. (Bitbake rev: 37214ea9bf484998b75dbc1200d53f1afc5257ed) 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: 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: fetch2/wget.py: Add support of connection cache in checkstatus.Aníbal Limón2015-07-121-1/+2
| | | | | | | | | | | | | 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: Add fetch parameter to checkstatusyocto-1.9_M1Aníbal Limón2015-07-091-10/+10
| | | | | | | | | | 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: bitbake: Add explict getVar param for (non) expansionRichard Purdie2015-06-231-1/+1
| | | | | | | | | | | | | | 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: 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: 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: 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: 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: 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: 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>
* bitbake: lib/fetch2: Tweak get_srcrev() function descriptionRichard Purdie2015-01-211-2/+4
| | | | | | | | Tweak the comments on get_srcrev() to better describe its function. (Bitbake rev: b4d40f1ac7b32990c456cce261f99a5a157b5ae5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cache/fetch2/siggen: Ensure we track include history for file checksumsRichard Purdie2015-01-081-17/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, if you reference a file url, its checksum is included in the task hash, however if you change to a different file at a different location, perhaps taking advantage of the FILESPATH functionality, the system will not reparse the file in question and change its checksum to match the new file. To correctly handle this, the system not only needs to know if the existing file still exists or not, but also check the existance of every file it would have looked at when computing the original file. We already do this in the bitbake parsing code for class inclusion. This change uses the same technique to log the file list we looked at and if files in these locations exist when they previously did not, to invalidate and reparse the file. Since data stored in the cache is flattened text, we have to use a string form of the data and split on the ":" character which is ugly, but is an internal detail we can improve later if a better method is found. The cache version changes to trigger a reparse since the previous cache data is now incompatible. [YOCTO #7019] (Bitbake rev: 6c0706a28d72c591f1b75b6e3f3b645859387c7e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: add means of disabling SRC_URI checksumsPaul Eggleton2014-12-091-1/+2
| | | | | | | | | | | If we're fetching outside of the context of a recipe, it's handy to be able to disable checksum functionality so you don't get a meaningless warning about the signatures being missing. (Bitbake rev: 49dbcfbc56a206964acc5de761bba31be0283ba1) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: add .lz compression supportKoen Kooi2014-10-281-1/+5
| | | | | | | | | | See http://www.nongnu.org/lzip/lzip.html for details on the compression format. (Bitbake rev: 9027b1273b5405c7269b013604ab417771b5eafe) Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetcher: fix getVar call due to incorrect argument datatypeAlejandro Hernandez2014-10-111-1/+1
| | | | | | | (Bitbake rev: 2ac33aac3446cb12227f1b8daa5f27f417c9bb9e) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetcher: fix BB_STRICT_CHECKSUM datatype checkAlejandro Hernandez2014-10-061-2/+2
| | | | | | | | | | | Forcing strict to be a string, to avoid problems when performing comparisons [YOCTO #6762] (Bitbake rev: b8ed2098bdea2afd93ab4e3e1b834f3a31cb60de) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch: Extend testing of subdir unpack parameter and fixRichard Purdie2014-09-291-0/+2
| | | | | | | | | This fixes urls of the form file://some/path/file;subdir=b. It also adds in a couple of tests so we now tests these corner cases. (Bitbake rev: 46306912a96444790efa9418d934dfdd36773ba1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>