buildstream-plugins 2.2.0.dev1__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.
Files changed (58) hide show
  1. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/.asf.yaml +3 -0
  2. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/NEWS +24 -0
  3. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/PKG-INFO +2 -2
  4. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/requirements/test-requirements.txt +3 -1
  5. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/setup.cfg +1 -3
  6. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/setup.py +1 -1
  7. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/__init__.py +1 -1
  8. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/sources/cargo.py +35 -2
  9. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/sources/docker.py +30 -0
  10. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/sources/git.py +3 -1
  11. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/sources/pip.py +2 -0
  12. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins.egg-info/PKG-INFO +2 -2
  13. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/.tox/lint/lib/python3.11/site-packages/buildstream/data/projectconfig.yaml +0 -0
  14. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/.tox/lint/lib/python3.11/site-packages/buildstream/data/userconfig.yaml +0 -0
  15. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/.tox/lint/lib/python3.11/site-packages/buildstream/plugins/elements/compose.yaml +0 -0
  16. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/.tox/lint/lib/python3.11/site-packages/buildstream/plugins/elements/filter.yaml +0 -0
  17. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/.tox/lint/lib/python3.11/site-packages/buildstream/plugins/elements/import.yaml +0 -0
  18. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/.tox/lint/lib/python3.11/site-packages/buildstream/plugins/elements/manual.yaml +0 -0
  19. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/.tox/lint/lib/python3.11/site-packages/buildstream/plugins/elements/script.yaml +0 -0
  20. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/.tox/lint/lib/python3.11/site-packages/buildstream_plugins/elements/autotools.yaml +0 -0
  21. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/.tox/lint/lib/python3.11/site-packages/buildstream_plugins/elements/cmake.yaml +0 -0
  22. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/.tox/lint/lib/python3.11/site-packages/buildstream_plugins/elements/make.yaml +0 -0
  23. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/.tox/lint/lib/python3.11/site-packages/buildstream_plugins/elements/meson.yaml +0 -0
  24. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/.tox/lint/lib/python3.11/site-packages/buildstream_plugins/elements/pip.yaml +0 -0
  25. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/.tox/lint/lib/python3.11/site-packages/buildstream_plugins/elements/setuptools.yaml +0 -0
  26. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/.tox/release/lib/python3.11/site-packages/markdown_it/port.yaml +0 -0
  27. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/COMMITTERS.rst +0 -0
  28. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/LICENSE +0 -0
  29. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/MANIFEST.in +0 -0
  30. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/NOTICE +0 -0
  31. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/README.rst +0 -0
  32. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/project.conf +0 -0
  33. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/pyproject.toml +0 -0
  34. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/requirements/mypy-requirements.txt +0 -0
  35. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/requirements/plugin-requirements.txt +0 -0
  36. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/elements/__init__.py +0 -0
  37. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/elements/autotools.py +0 -0
  38. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/elements/autotools.yaml +0 -0
  39. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/elements/cmake.py +0 -0
  40. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/elements/cmake.yaml +0 -0
  41. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/elements/make.py +0 -0
  42. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/elements/make.yaml +0 -0
  43. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/elements/meson.py +0 -0
  44. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/elements/meson.yaml +0 -0
  45. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/elements/pip.py +0 -0
  46. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/elements/pip.yaml +0 -0
  47. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/elements/setuptools.py +0 -0
  48. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/elements/setuptools.yaml +0 -0
  49. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/sources/__init__.py +0 -0
  50. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/sources/_utils.py +0 -0
  51. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/sources/bzr.py +0 -0
  52. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins/sources/patch.py +0 -0
  53. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins.egg-info/SOURCES.txt +0 -0
  54. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins.egg-info/dependency_links.txt +0 -0
  55. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins.egg-info/entry_points.txt +0 -0
  56. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins.egg-info/not-zip-safe +0 -0
  57. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins.egg-info/requires.txt +0 -0
  58. {buildstream-plugins-2.2.0.dev1 → buildstream_plugins-2.3.0.dev1}/src/buildstream_plugins.egg-info/top_level.txt +0 -0
@@ -34,6 +34,9 @@ github:
34
34
  # disable rebase button:
35
35
  rebase: false
36
36
 
37
+ # Close branches when pull requests are merged
38
+ del_branch_on_merge: true
39
+
37
40
  # Enable pages publishing
38
41
  ghp_branch: gh-pages
39
42
  ghp_path: /docs
@@ -1,3 +1,27 @@
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
+
11
+ =========================
12
+ buildstream-plugins 2.2.0
13
+ =========================
14
+
15
+ o cargo: Fix mirroring (#55)
16
+
17
+ o cargo: Support authentication using .netrc (#57)
18
+
19
+ o docker: Fix authentication when using .netrc (#59)
20
+
21
+ o docker: Improve flexibility for mirroring (#58)
22
+
23
+ o cargo: Add support for source mirrors and bearer http authentication (#60, #64)
24
+
1
25
  =========================
2
26
  buildstream-plugins 2.1.0
3
27
  =========================
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: buildstream-plugins
3
- Version: 2.2.0.dev1
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
@@ -1,9 +1,11 @@
1
+ build
1
2
  pytest-env
2
3
  # Provide option to run tests in parallel, less reliable
3
4
  pytest-xdist
4
5
  pytest >= 6.0.1
5
- pytest-datafiles >= 2.0,<3
6
+ pytest-datafiles >= 3.0
6
7
  pylint
7
8
  pycodestyle
8
9
  pyftpdlib
9
10
  responses
11
+ wheel
@@ -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.",
@@ -15,4 +15,4 @@
15
15
  #
16
16
  # Remember to adjust this version number before tagging releases
17
17
  #
18
- __version__ = "2.2.0.dev1"
18
+ __version__ = "2.3.0.dev1"
@@ -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(commit_ref, tag)
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(
@@ -92,6 +92,8 @@ _PYTHON_VERSIONS = [
92
92
  "python3.9",
93
93
  "python3.10",
94
94
  "python3.11",
95
+ "python3.12",
96
+ "python3",
95
97
  ]
96
98
 
97
99
  # List of allowed extensions taken from
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: buildstream-plugins
3
- Version: 2.2.0.dev1
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