buildstream-plugins 2.2.0.dev2__tar.gz → 2.3.0.dev1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/.asf.yaml +3 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/NEWS +10 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/PKG-INFO +2 -2
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/requirements/test-requirements.txt +3 -1
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/setup.cfg +1 -3
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/setup.py +1 -1
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/__init__.py +1 -1
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/sources/cargo.py +35 -2
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/sources/docker.py +30 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/sources/git.py +3 -1
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/sources/pip.py +2 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins.egg-info/PKG-INFO +2 -2
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/.tox/lint/lib/python3.11/site-packages/buildstream/data/projectconfig.yaml +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/.tox/lint/lib/python3.11/site-packages/buildstream/data/userconfig.yaml +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/.tox/lint/lib/python3.11/site-packages/buildstream/plugins/elements/compose.yaml +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/.tox/lint/lib/python3.11/site-packages/buildstream/plugins/elements/filter.yaml +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/.tox/lint/lib/python3.11/site-packages/buildstream/plugins/elements/import.yaml +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/.tox/lint/lib/python3.11/site-packages/buildstream/plugins/elements/manual.yaml +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/.tox/lint/lib/python3.11/site-packages/buildstream/plugins/elements/script.yaml +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/.tox/lint/lib/python3.11/site-packages/buildstream_plugins/elements/autotools.yaml +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/.tox/lint/lib/python3.11/site-packages/buildstream_plugins/elements/cmake.yaml +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/.tox/lint/lib/python3.11/site-packages/buildstream_plugins/elements/make.yaml +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/.tox/lint/lib/python3.11/site-packages/buildstream_plugins/elements/meson.yaml +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/.tox/lint/lib/python3.11/site-packages/buildstream_plugins/elements/pip.yaml +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/.tox/lint/lib/python3.11/site-packages/buildstream_plugins/elements/setuptools.yaml +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/.tox/release/lib/python3.11/site-packages/markdown_it/port.yaml +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/COMMITTERS.rst +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/LICENSE +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/MANIFEST.in +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/NOTICE +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/README.rst +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/project.conf +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/pyproject.toml +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/requirements/mypy-requirements.txt +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/requirements/plugin-requirements.txt +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/elements/__init__.py +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/elements/autotools.py +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/elements/autotools.yaml +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/elements/cmake.py +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/elements/cmake.yaml +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/elements/make.py +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/elements/make.yaml +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/elements/meson.py +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/elements/meson.yaml +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/elements/pip.py +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/elements/pip.yaml +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/elements/setuptools.py +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/elements/setuptools.yaml +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/sources/__init__.py +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/sources/_utils.py +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/sources/bzr.py +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/sources/patch.py +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins.egg-info/SOURCES.txt +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins.egg-info/dependency_links.txt +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins.egg-info/entry_points.txt +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins.egg-info/not-zip-safe +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins.egg-info/requires.txt +0 -0
- {buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins.egg-info/top_level.txt +0 -0
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
=========================
|
|
2
|
+
buildstream-plugins 2.3.0
|
|
3
|
+
=========================
|
|
4
|
+
|
|
5
|
+
o pip: support Python 3.12 and future versions (#67)
|
|
6
|
+
|
|
7
|
+
o cargo, docker: Check tar member paths (#69)
|
|
8
|
+
|
|
9
|
+
o git: add tagger to annotated tags (fix for recent git versions) (#73)
|
|
10
|
+
|
|
1
11
|
=========================
|
|
2
12
|
buildstream-plugins 2.2.0
|
|
3
13
|
=========================
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: buildstream-plugins
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.0.dev1
|
|
4
4
|
Summary: A collection of plugins for BuildStream.
|
|
5
5
|
Home-page: https://buildstream.build
|
|
6
6
|
Author: The Apache Software Foundation
|
|
@@ -15,11 +15,11 @@ Classifier: Intended Audience :: Developers
|
|
|
15
15
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
16
|
Classifier: Operating System :: POSIX
|
|
17
17
|
Classifier: Programming Language :: Python :: 3
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.8
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.9
|
|
21
20
|
Classifier: Programming Language :: Python :: 3.10
|
|
22
21
|
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
23
|
Classifier: Topic :: Software Development :: Build Tools
|
|
24
24
|
Description-Content-Type: text/x-rst; charset=UTF-8
|
|
25
25
|
License-File: LICENSE
|
|
@@ -3,6 +3,7 @@ test = pytest
|
|
|
3
3
|
|
|
4
4
|
[tool:pytest]
|
|
5
5
|
addopts = --verbose --basetemp ./tmp --durations=20
|
|
6
|
+
testpaths = tests
|
|
6
7
|
norecursedirs = tests/sources/pip-build integration-cache tmp __pycache__ .eggs
|
|
7
8
|
python_files = tests/*.py
|
|
8
9
|
markers =
|
|
@@ -16,9 +17,6 @@ files = src
|
|
|
16
17
|
warn_unused_configs = True
|
|
17
18
|
warn_no_return = True
|
|
18
19
|
|
|
19
|
-
[mypy-copyreg,grpc,pluginbase,psutil,pyroaring,ruamel,multiprocessing.forkserver]
|
|
20
|
-
ignore_missing_imports = True
|
|
21
|
-
|
|
22
20
|
[egg_info]
|
|
23
21
|
tag_build =
|
|
24
22
|
tag_date = 0
|
|
@@ -53,11 +53,11 @@ setup(
|
|
|
53
53
|
"License :: OSI Approved :: Apache Software License",
|
|
54
54
|
"Operating System :: POSIX",
|
|
55
55
|
"Programming Language :: Python :: 3",
|
|
56
|
-
"Programming Language :: Python :: 3.7",
|
|
57
56
|
"Programming Language :: Python :: 3.8",
|
|
58
57
|
"Programming Language :: Python :: 3.9",
|
|
59
58
|
"Programming Language :: Python :: 3.10",
|
|
60
59
|
"Programming Language :: Python :: 3.11",
|
|
60
|
+
"Programming Language :: Python :: 3.12",
|
|
61
61
|
"Topic :: Software Development :: Build Tools",
|
|
62
62
|
],
|
|
63
63
|
description="A collection of plugins for BuildStream.",
|
|
@@ -28,6 +28,9 @@ Placing this source in the source list, after a source which stages a
|
|
|
28
28
|
Cargo.lock file, will allow this source to read the Cargo.lock file and
|
|
29
29
|
obtain the crates automatically into %{vendordir}.
|
|
30
30
|
|
|
31
|
+
Set the `ref` field to an empty list like so: `ref: []`, and then run
|
|
32
|
+
`bst source track path_to_bst_file.bst`.
|
|
33
|
+
|
|
31
34
|
**Usage:**
|
|
32
35
|
|
|
33
36
|
.. code:: yaml
|
|
@@ -41,7 +44,7 @@ obtain the crates automatically into %{vendordir}.
|
|
|
41
44
|
# Internal source reference, this is a list of dictionaries
|
|
42
45
|
# which store the crate names and versions.
|
|
43
46
|
#
|
|
44
|
-
# This will be automatically updated with `bst track`
|
|
47
|
+
# This will be automatically updated with `bst source track`
|
|
45
48
|
ref:
|
|
46
49
|
- name: packagename
|
|
47
50
|
version: 1.2.1
|
|
@@ -146,8 +149,14 @@ class Crate(SourceFetcher):
|
|
|
146
149
|
try:
|
|
147
150
|
mirror_file = self._get_mirror_file()
|
|
148
151
|
with tarfile.open(mirror_file) as tar:
|
|
149
|
-
tar.extractall(path=directory)
|
|
150
152
|
members = tar.getmembers()
|
|
153
|
+
if hasattr(tarfile, "tar_filter"):
|
|
154
|
+
# Python 3.12+ (and older versions with backports)
|
|
155
|
+
tar.extractall(path=directory, filter="tar")
|
|
156
|
+
else:
|
|
157
|
+
for member in members:
|
|
158
|
+
self._assert_tarinfo_safe(member, directory)
|
|
159
|
+
tar.extractall(path=directory, members=members)
|
|
151
160
|
|
|
152
161
|
if members:
|
|
153
162
|
dirname = members[0].name.split("/")[0]
|
|
@@ -184,6 +193,30 @@ class Crate(SourceFetcher):
|
|
|
184
193
|
# Private helpers #
|
|
185
194
|
########################################################
|
|
186
195
|
|
|
196
|
+
# Assert that a tarfile is safe to extract; specifically, make
|
|
197
|
+
# sure that we don't do anything outside of the target
|
|
198
|
+
# directory (this is possible, if, say, someone engineered a
|
|
199
|
+
# tarfile to contain paths that start with ..).
|
|
200
|
+
def _assert_tarinfo_safe(self, member: tarfile.TarInfo, target_dir: str):
|
|
201
|
+
final_path = os.path.abspath(os.path.join(target_dir, member.path))
|
|
202
|
+
if not final_path.startswith(target_dir):
|
|
203
|
+
raise SourceError(
|
|
204
|
+
"{}: Tarfile attempts to extract outside the staging area: "
|
|
205
|
+
"{} -> {}".format(self, member.path, final_path)
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
if member.islnk():
|
|
209
|
+
linked_path = os.path.abspath(os.path.join(target_dir, member.linkname))
|
|
210
|
+
if not linked_path.startswith(target_dir):
|
|
211
|
+
raise SourceError(
|
|
212
|
+
"{}: Tarfile attempts to hardlink outside the staging area: "
|
|
213
|
+
"{} -> {}".format(self, member.path, final_path)
|
|
214
|
+
)
|
|
215
|
+
|
|
216
|
+
# Don't need to worry about symlinks because they're just
|
|
217
|
+
# files here and won't be able to do much harm once we are
|
|
218
|
+
# in a sandbox.
|
|
219
|
+
|
|
187
220
|
# _download()
|
|
188
221
|
#
|
|
189
222
|
# Downloads the crate from the url and caches it.
|
|
@@ -570,6 +570,12 @@ class DockerSource(Source):
|
|
|
570
570
|
# extract files for the current layer
|
|
571
571
|
with tarfile.open(blob_path, tarinfo=ReadableTarInfo) as tar:
|
|
572
572
|
with self.tempdir() as td:
|
|
573
|
+
if hasattr(tarfile, "tar_filter"):
|
|
574
|
+
# Python 3.12+ (and older versions with backports)
|
|
575
|
+
tar.extraction_filter = tarfile.tar_filter
|
|
576
|
+
else:
|
|
577
|
+
for member in extract_fileset:
|
|
578
|
+
self._assert_tarinfo_safe(member, td)
|
|
573
579
|
tar.extractall(path=td, members=extract_fileset)
|
|
574
580
|
link_files(td, directory)
|
|
575
581
|
|
|
@@ -618,6 +624,30 @@ class DockerSource(Source):
|
|
|
618
624
|
|
|
619
625
|
return extract_fileset, delete_fileset
|
|
620
626
|
|
|
627
|
+
# Assert that a tarfile is safe to extract; specifically, make
|
|
628
|
+
# sure that we don't do anything outside of the target
|
|
629
|
+
# directory (this is possible, if, say, someone engineered a
|
|
630
|
+
# tarfile to contain paths that start with ..).
|
|
631
|
+
def _assert_tarinfo_safe(self, member: tarfile.TarInfo, target_dir: str):
|
|
632
|
+
final_path = os.path.abspath(os.path.join(target_dir, member.path))
|
|
633
|
+
if not final_path.startswith(target_dir):
|
|
634
|
+
raise SourceError(
|
|
635
|
+
"{}: Tarfile attempts to extract outside the staging area: "
|
|
636
|
+
"{} -> {}".format(self, member.path, final_path)
|
|
637
|
+
)
|
|
638
|
+
|
|
639
|
+
if member.islnk():
|
|
640
|
+
linked_path = os.path.abspath(os.path.join(target_dir, member.linkname))
|
|
641
|
+
if not linked_path.startswith(target_dir):
|
|
642
|
+
raise SourceError(
|
|
643
|
+
"{}: Tarfile attempts to hardlink outside the staging area: "
|
|
644
|
+
"{} -> {}".format(self, member.path, final_path)
|
|
645
|
+
)
|
|
646
|
+
|
|
647
|
+
# Don't need to worry about symlinks because they're just
|
|
648
|
+
# files here and won't be able to do much harm once we are
|
|
649
|
+
# in a sandbox.
|
|
650
|
+
|
|
621
651
|
|
|
622
652
|
# Plugin entry point
|
|
623
653
|
def setup():
|
|
@@ -654,7 +654,9 @@ class GitMirror(SourceFetcher):
|
|
|
654
654
|
for tag, commit_ref, annotated in self.tags:
|
|
655
655
|
if annotated:
|
|
656
656
|
with TemporaryFile(dir=tmpdir) as tag_file:
|
|
657
|
-
tag_data = "object {}\ntype commit\ntag {}\n".format(
|
|
657
|
+
tag_data = "object {}\ntype commit\ntag {}\ntagger Unspecified Tagger <unspecified-tagger> 0 +0000\n".format(
|
|
658
|
+
commit_ref, tag
|
|
659
|
+
)
|
|
658
660
|
tag_file.write(tag_data.encode("ascii"))
|
|
659
661
|
tag_file.seek(0, 0)
|
|
660
662
|
_, tag_ref = self.source.check_output(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: buildstream-plugins
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.0.dev1
|
|
4
4
|
Summary: A collection of plugins for BuildStream.
|
|
5
5
|
Home-page: https://buildstream.build
|
|
6
6
|
Author: The Apache Software Foundation
|
|
@@ -15,11 +15,11 @@ Classifier: Intended Audience :: Developers
|
|
|
15
15
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
16
|
Classifier: Operating System :: POSIX
|
|
17
17
|
Classifier: Programming Language :: Python :: 3
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.8
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.9
|
|
21
20
|
Classifier: Programming Language :: Python :: 3.10
|
|
22
21
|
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
23
|
Classifier: Topic :: Software Development :: Build Tools
|
|
24
24
|
Description-Content-Type: text/x-rst; charset=UTF-8
|
|
25
25
|
License-File: LICENSE
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{buildstream-plugins-2.2.0.dev2 → buildstream_plugins-2.3.0.dev1}/requirements/mypy-requirements.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|