diff options
author | Alejandro Hernandez Samaniego <alejandro@enedino.org> | 2021-02-24 10:26:32 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-03-11 14:04:45 +0000 |
commit | 0f84d24df8b83877b45b5d6aa3eca401b059071e (patch) | |
tree | 61407ab019cef36dab08fbb59115c26094348710 /bitbake/lib/bb/fetch2/__init__.py | |
parent | 271caebdc097fffe006a5a6399672b9b27900877 (diff) | |
download | poky-0f84d24df8b83877b45b5d6aa3eca401b059071e.tar.gz |
bitbake: bitbake: Add Azure Storage fetcher implementation
Allows bitbake to fetch from an Azure Storage account.
The fetcher submodule is compatible with the az:// URI protocol, its
functionality is based on bitbakes wget fetcher, superior in performance
to using a propietary tool like azcopy which can handle cloud storage
account operations with more functionality (that we dont need in a fetcher)
but less compatibility.
A sample URI uses can be defined in the following way:
SRC_URI = "az://<azure-storage-account>.blob.core.windows.net/<container>/foo.tar.xz"
This fetcher can easily be used with PREMIRRORS and SSTATE_MIRRORS, e.g.:
SSTATE_MIRRORS = "file://.* az://<azure-storage-account>.blob.core.windows.net/sstate-cache/PATH;downloadfilename=PATH \n"
PREMIRRORS_prepend = "\
git://.*/.* az://<azure-storage-account>.blob.core.windows.net/downloads/ \n \
ftp://.*/.* az://<azure-storage-account>.blob.core.windows.net/downloads/ \n \
http://.*/.* az://<azure-storage-account>.blob.core.windows.net/downloads/ \n \
https://.*/.* az://<azure-storage-account>.blob.core.windows.net/downloads/ \n \
"
Can also be used with non-public access Azure Storage accounts/containers via a
Shared Access Signature by declaring the AZ_SAS variable which will be
automatically used by the fetcher:
AZ_SAS="?sv=2000-01-01&ss=...&sig=somesignature"
(Bitbake rev: b103b02f2ce2f8f5079f17ec1a854f904c2110a4)
Signed-off-by: Alejandro Enedino Hernandez Samaniego <alhe@linux.microsoft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/__init__.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 19169d780f..cf0201c490 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
@@ -1243,7 +1243,7 @@ class FetchData(object): | |||
1243 | 1243 | ||
1244 | if checksum_name in self.parm: | 1244 | if checksum_name in self.parm: |
1245 | checksum_expected = self.parm[checksum_name] | 1245 | checksum_expected = self.parm[checksum_name] |
1246 | elif self.type not in ["http", "https", "ftp", "ftps", "sftp", "s3"]: | 1246 | elif self.type not in ["http", "https", "ftp", "ftps", "sftp", "s3", "az"]: |
1247 | checksum_expected = None | 1247 | checksum_expected = None |
1248 | else: | 1248 | else: |
1249 | checksum_expected = d.getVarFlag("SRC_URI", checksum_name) | 1249 | checksum_expected = d.getVarFlag("SRC_URI", checksum_name) |
@@ -1908,6 +1908,7 @@ from . import repo | |||
1908 | from . import clearcase | 1908 | from . import clearcase |
1909 | from . import npm | 1909 | from . import npm |
1910 | from . import npmsw | 1910 | from . import npmsw |
1911 | from . import az | ||
1911 | 1912 | ||
1912 | methods.append(local.Local()) | 1913 | methods.append(local.Local()) |
1913 | methods.append(wget.Wget()) | 1914 | methods.append(wget.Wget()) |
@@ -1927,3 +1928,4 @@ methods.append(repo.Repo()) | |||
1927 | methods.append(clearcase.ClearCase()) | 1928 | methods.append(clearcase.ClearCase()) |
1928 | methods.append(npm.Npm()) | 1929 | methods.append(npm.Npm()) |
1929 | methods.append(npmsw.NpmShrinkWrap()) | 1930 | methods.append(npmsw.NpmShrinkWrap()) |
1931 | methods.append(az.Az()) | ||