fetch2: add initial Amazon AWS S3 fetcher
PATCH 1/1 fetch2: add initial Amazon AWS S3 fetcher
Class for fetching files from Amazon S3 using the AWS Command Line Interface. The aws tool must be correctly installed and configured prior to use.
The class supports both download() and checkstatus(), which therefore allows S3 mirrors to be used for SSTATE_MIRRORS.
Signed-off-by Andre McCurdy <[email protected]>
--- lib/bb/fetch2/__init__.py | 6 ++- lib/bb/fetch2/s3.py | 96 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+), 2 deletions(-) create mode 100644 lib/bb/fetch2/s3.py
lib/bb/fetch2/__init__.py +4 -2
@@ -1196,13 +1196,13 @@ class FetchData(object): self.sha256_name = "sha256sum" if self.md5_name in self.parm: self.md5_expected = self.parm[self.md5_name] - elif self.type not in ["http", "https", "ftp", "ftps", "sftp"]: + elif self.type not in ["http", "https", "ftp", "ftps", "sftp", "s3"]: self.md5_expected = None else: self.md5_expected = d.getVarFlag("SRC_URI", self.md5_name) if self.sha256_name in self.parm: self.sha256_expected = self.parm[self.sha256_name] - elif self.type not in ["http", "https", "ftp", "ftps", "sftp"]: + elif self.type not in ["http", "https", "ftp", "ftps", "sftp", "s3"]: self.sha256_expected = None else: self.sha256_expected = d.getVarFlag("SRC_URI", self.sha256_name)
@@ -1787,6 +1787,7 @@ from . import svn from . import wget from . import ssh from . import sftp +from . import s3 from . import perforce from . import bzr from . import hg
@@ -1804,6 +1805,7 @@ methods.append(gitannex.GitANNEX()) methods.append(cvs.Cvs()) methods.append(ssh.SSH()) methods.append(sftp.SFTP()) +methods.append(s3.S3()) methods.append(perforce.Perforce()) methods.append(bzr.Bzr()) methods.append(hg.Hg())
lib/bb/fetch2/s3.py new file +96 -0
96 lines not on this page · raw message
Signature · 1 line
1.9.1